Constructors
constructor
- new Engine(near: Near, keyStore: KeyStore, signer: Account, contractID: string): Engine
-
Parameters
-
near: Near
-
-
signer: Account
-
contractID: string
Properties
contractID
contractID: string
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>>
-
Parameters
-
methodName: string
-
Optional args: Uint8Array
deployCode
- deployCode(bytecode: Bytecodeish): Promise<Result<string, string>>
-
Parameters
Returns Promise<Result<string, string>>
getAccount
- getAccount(): Promise<Result<Account, string>>
-
Returns Promise<Result<Account, string>>
getBalance
- getBalance(address: string): Promise<Result<bigint, string>>
-
Parameters
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
Returns Promise<Result<Uint8Array, string>>
getNonce
- getNonce(address: string): Promise<Result<bigint, string>>
-
Parameters
Returns Promise<Result<bigint, string>>
getOwner
- getOwner(): Promise<Result<string, string>>
-
Returns Promise<Result<string, string>>
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
Returns Promise<Result<string, string>>
install
- install(contractCode: Uint8Array): Promise<Result<string, string>>
-
Parameters
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
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
-
-
input: string | Uint8Array
Returns Promise<Result<Uint8Array, string>>
Static connect
-
Parameters
Returns Promise<Engine>