Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Engine

Index

Constructors

constructor

  • new Engine(near: Near, keyStore: KeyStore, signer: Account, contractID: string): Engine

Properties

contractID

contractID: string

keyStore

keyStore: KeyStore

near

near: Near

signer

signer: Account

Methods

call

  • call(contract: string, input: string | Uint8Array): Promise<Result<Uint8Array, string>>
  • Parameters

    • contract: string
    • input: string | Uint8Array

    Returns Promise<Result<Uint8Array, string>>

Protected callFunction

  • callFunction(methodName: string, args?: Uint8Array): Promise<Result<Buffer, string>>
  • Parameters

    • methodName: string
    • Optional args: Uint8Array

    Returns Promise<Result<Buffer, string>>

Protected callMutativeFunction

  • callMutativeFunction(methodName: string, args?: Uint8Array): Promise<Result<TransactionOutcome, string>>

deployCode

  • deployCode(bytecode: Bytecodeish): Promise<Result<string, string>>

getAccount

  • getAccount(): Promise<Result<Account, string>>
  • Returns Promise<Result<Account, string>>

getBalance

  • getBalance(address: string): Promise<Result<bigint, string>>
  • Parameters

    • address: string

    Returns Promise<Result<bigint, string>>

getBlockHash

  • getBlockHash(): Promise<Result<string, string>>
  • Returns Promise<Result<string, string>>

getBlockHeight

  • getBlockHeight(): Promise<Result<number, string>>
  • Returns Promise<Result<number, string>>

getBridgeProvider

  • getBridgeProvider(): Promise<Result<string, string>>
  • Returns Promise<Result<string, string>>

getChainID

  • getChainID(): Promise<Result<bigint, string>>
  • Returns Promise<Result<bigint, string>>

getCode

  • getCode(address: string): Promise<Result<Uint8Array, string>>
  • Parameters

    • address: string

    Returns Promise<Result<Uint8Array, string>>

getNonce

  • getNonce(address: string): Promise<Result<bigint, string>>
  • Parameters

    • address: string

    Returns Promise<Result<bigint, string>>

getOwner

  • getOwner(): Promise<Result<string, string>>
  • Returns Promise<Result<string, string>>

getStorage

getStorageAt

  • getStorageAt(address: string, key: string | number | bigint): Promise<Result<bigint, string>>
  • Parameters

    • address: string
    • key: string | number | bigint

    Returns Promise<Result<bigint, string>>

getVersion

  • getVersion(): Promise<Result<string, string>>
  • Returns Promise<Result<string, string>>

initialize

  • initialize(options: any): Promise<Result<string, string>>
  • Parameters

    • options: any

    Returns Promise<Result<string, string>>

install

  • install(contractCode: Uint8Array): Promise<Result<string, string>>
  • Parameters

    • contractCode: Uint8Array

    Returns Promise<Result<string, string>>

Private prepareInput

  • prepareInput(args?: string | Uint8Array): Buffer
  • Parameters

    • Optional args: string | Uint8Array

    Returns Buffer

upgrade

  • upgrade(contractCode: Uint8Array): Promise<Result<string, string>>
  • Parameters

    • contractCode: Uint8Array

    Returns Promise<Result<string, string>>

view

  • view(sender: string, address: string, amount: Amount, input: string | Uint8Array): Promise<Result<Uint8Array, string>>
  • Parameters

    • sender: string
    • address: string
    • amount: Amount
    • input: string | Uint8Array

    Returns Promise<Result<Uint8Array, string>>

Static connect

Generated using TypeDoc