Provider Api
ProviderEvents
Ƭ ProviderEvents<Addr>: Object
Type parameters
| Name | Type |
|---|---|
Addr | Address |
Type declaration
| Name | Type | Description |
|---|---|---|
connected | Record<string, never> | Called when inpage provider connects to the extension |
disconnected | Error | Called when inpage provider disconnects from extension |
transactionsFound | { address: Addr ; transactions: Transaction<Addr>[] ; info: TransactionsBatchInfo } | Called on each new transactions batch, received on subscription |
transactionsFound.address | Addr | Contract address |
transactionsFound.transactions | Transaction<Addr>[] | Guaranteed to be non-empty and ordered by descending lt |
transactionsFound.info | TransactionsBatchInfo | Describes transactions lt rage |
contractStateChanged | { address: Addr ; state: ContractState } | Called every time contract state changes |
contractStateChanged.address | Addr | Contract address |
contractStateChanged.state | ContractState | New contract state |
messageStatusUpdated | { address: Addr ; hash: string ; transaction?: Transaction<Addr> } | Called every time a delayed message was delivered or expired |
messageStatusUpdated.address | Addr | Account address |
messageStatusUpdated.hash | string | Message hash |
messageStatusUpdated.transaction? | Transaction<Addr> | If not null, the transaction of the delivered message. Otherwise, the message has expired. |
networkChanged | { selectedConnection: string ; networkId: number } | Called each time the user changes network |
networkChanged.selectedConnection | string | Network group name Deprecated networkId should be used instead |
networkChanged.networkId | number | Numeric network id |
permissionsChanged | { permissions: Partial<Permissions<Addr>> } | Called when permissions are changed. Mostly when account has been removed from the current accountInteraction permission, or disconnect method was called |
permissionsChanged.permissions | Partial<Permissions<Addr>> | - |
loggedOut | Record<string, never> | Called when the user logs out of the extension |
Defined in:
ProviderApi
Ƭ ProviderApi<Addr>: Object
Type parameters
| Name | Type |
|---|---|
Addr | Address |
Type declaration
| Name | Type | Description |
|---|---|---|
requestPermissions | { input: { permissions: UniqueArray<Permission[]> } ; output: Partial<Permissions<Addr>> } | Requests new permissions for current origin. Shows an approval window to the user. Will overwrite already existing permissions --- Required permissions: none |
requestPermissions.input | { permissions: UniqueArray<Permission[]> } | - |
requestPermissions.input.permissions | UniqueArray<Permission[]> | - |
requestPermissions.output | Partial<Permissions<Addr>> | - |
changeAccount | { output: Partial<Permissions<Addr>> } | Updates accountInteraction permission value --- Requires permissions: accountInteraction |
changeAccount.output | Partial<Permissions<Addr>> | - |
disconnect | Record<string, never> | Removes all permissions for current origin and stops all subscriptions --- Required permissions: none |
subscribe | { input: { address: Addr ; subscriptions: Partial<ContractUpdatesSubscription> } ; output: ContractUpdatesSubscription } | Subscribes to contract updates. Can also be used to update subscriptions --- Required permissions: basic |
subscribe.input | { address: Addr ; subscriptions: Partial<ContractUpdatesSubscription> } | - |
subscribe.input.address | Addr | Contract address |
subscribe.input.subscriptions | Partial<ContractUpdatesSubscription> | Subscription changes |
subscribe.output | ContractUpdatesSubscription | - |
unsubscribe | { input: { address: Addr } } | Fully unsubscribe from specific contract updates --- Required permissions: none |
unsubscribe.input | { address: Addr } | - |
unsubscribe.input.address | Addr | Contract address |
unsubscribeAll | Record<string, never> | Fully unsubscribe from all contracts --- Required permissions: none |
getProviderState | { output: { version: string ; numericVersion: number ; selectedConnection: string ; networkId: number ; supportedPermissions: UniqueArray<Permission[]> ; permissions: Partial<Permissions<Addr>> ; subscriptions: { [address: string]: ContractUpdatesSubscription; } } } | Returns provider api state --- Required permissions: none |
getProviderState.output | { version: string ; numericVersion: number ; selectedConnection: string ; networkId: number ; supportedPermissions: UniqueArray<Permission[]> ; permissions: Partial<Permissions<Addr>> ; subscriptions: { [address: string]: ContractUpdatesSubscription; } } | - |
getProviderState.output.version | string | Provider api version in semver format (x.y.z) |
getProviderState.output.numericVersion | number | Provider api version in uint32 format (xxxyyyzzz) |
getProviderState.output.selectedConnection | string | Selected connection group name (mainnet / testnet / etc.) Deprecated networkId should be used instead |
getProviderState.output.networkId | number | Numeric network id |
getProviderState.output.supportedPermissions | UniqueArray<Permission[]> | List of supported permissions |
getProviderState.output.permissions | Partial<Permissions<Addr>> | Object with active permissions attached data |
getProviderState.output.subscriptions | { [address: string]: ContractUpdatesSubscription; } | Current subscription states |
getFullContractState | { input: { address: Addr } ; output: { state: FullContractState | undefined } } | Requests contract data --- Required permissions: basic |
getFullContractState.input | { address: Addr } | - |
getFullContractState.input.address | Addr | Contract address |
getFullContractState.output | { state: FullContractState | undefined } | - |
getFullContractState.output.state | FullContractState | undefined | Contract state or undefined if it doesn't exist |
getAccountsByCodeHash | { input: { codeHash: string ; continuation?: string ; limit?: number } ; output: { accounts: Addr[] ; continuation: string | undefined } } | Requests accounts with specified code hash --- Required permissions: basic |
getAccountsByCodeHash.input | { codeHash: string ; continuation?: string ; limit?: number } | - |
getAccountsByCodeHash.input.codeHash | string | Hex encoded code hash |
getAccountsByCodeHash.input.continuation? | string | Last address from previous batch |
getAccountsByCodeHash.input.limit? | number | Optional limit. Values grater than 50 have no effect |
getAccountsByCodeHash.output | { accounts: Addr[] ; continuation: string | undefined } | - |
getAccountsByCodeHash.output.accounts | Addr[] | List of account addresses |
getAccountsByCodeHash.output.continuation | string | undefined | Last address from this batch. Should be used as a continuation for further requests |
getTransactions | { input: { address: Addr ; continuation?: TransactionId ; limit?: number } ; output: { transactions: Transaction<Addr>[] ; continuation: TransactionId | undefined ; info?: TransactionsBatchInfo } } | Requests contract transactions --- Required permissions: basic |
getTransactions.input | { address: Addr ; continuation?: TransactionId ; limit?: number } | - |
getTransactions.input.address | Addr | Contract address |
getTransactions.input.continuation? | TransactionId | Id of the transaction from which to request the next batch |
getTransactions.input.limit? | number | Optional limit. Values greater than 50 have no effect |
getTransactions.output | { transactions: Transaction<Addr>[] ; continuation: TransactionId | undefined ; info?: TransactionsBatchInfo } | - |
getTransactions.output.transactions | Transaction<Addr>[] | Transactions list in descending order (from latest lt to the oldest) |
getTransactions.output.continuation | TransactionId | undefined | Previous transaction id of the last transaction in result. Can be used to continue transactions batch |
getTransactions.output.info? | TransactionsBatchInfo | Describes transactions lt rage (none if empty transactions array) |
getTransaction | { input: { hash: string } ; output: { transaction: Transaction<Addr> | undefined } } | Fetches transaction by the exact hash --- Required permissions: basic |
getTransaction.input | { hash: string } | - |
getTransaction.input.hash | string | Hex encoded transaction hash |
getTransaction.output | { transaction: Transaction<Addr> | undefined } | - |
getTransaction.output.transaction | Transaction<Addr> | undefined | Transaction |
findTransaction | { input: { inMessageHash?: string } ; output: { transaction: Transaction<Addr> | undefined } } | Searches transaction by filters NOTE: at least one filter must be specified --- Required permissions: basic |
findTransaction.input | { inMessageHash?: string } | - |
findTransaction.input.inMessageHash? | string | Hex encoded incoming message hash |
findTransaction.output | { transaction: Transaction<Addr> | undefined } | - |
findTransaction.output.transaction | Transaction<Addr> | undefined | Transaction |
runLocal | { input: { address: Addr ; cachedState?: FullContractState ; responsible?: boolean ; functionCall: FunctionCall<Addr> } ; output: { output: TokensObject<Addr> | undefined ; code: number } } | Executes only a compute phase locally --- Required permissions: basic |
runLocal.input | { address: Addr ; cachedState?: FullContractState ; responsible?: boolean ; functionCall: FunctionCall<Addr> } | - |
runLocal.input.address | Addr | Contract address |
runLocal.input.cachedState? | FullContractState | Cached contract state |
runLocal.input.responsible? | boolean | Whether to run the method locally as responsible. This will use internal message with unlimited account balance. |
runLocal.input.functionCall | FunctionCall<Addr> | Function call params |
runLocal.output | { output: TokensObject<Addr> | undefined ; code: number } | - |
runLocal.output.output | TokensObject<Addr> | undefined | Execution output |
runLocal.output.code | number | TVM execution code |
executeLocal | { input: { address: Addr ; cachedState?: FullContractState ; stateInit?: string ; payload?: string | FunctionCall<Addr> ; messageHeader: { type: "external" ; publicKey: string ; withoutSignature?: boolean } | { type: "internal" ; sender: Addr ; amount: string ; bounce: boolean ; bounced?: boolean } ; executorParams?: { disableSignatureCheck?: boolean ; overrideBalance?: string | number } } ; output: { transaction: Transaction<Addr> ; newState: FullContractState | undefined ; output: TokensObject<Addr> | undefined } } | Executes all transaction phases locally, producing a new state --- Required permissions: basic |
executeLocal.input | { address: Addr ; cachedState?: FullContractState ; stateInit?: string ; payload?: string | FunctionCall<Addr> ; messageHeader: { type: "external" ; publicKey: string ; withoutSignature?: boolean } | { type: "internal" ; sender: Addr ; amount: string ; bounce: boolean ; bounced?: boolean } ; executorParams?: { disableSignatureCheck?: boolean ; overrideBalance?: string | number } } | - |
executeLocal.input.address | Addr | Contract address |
executeLocal.input.cachedState? | FullContractState | Cached contract state |
executeLocal.input.stateInit? | string | Optional base64 encoded .tvc file |
executeLocal.input.payload? | string | FunctionCall<Addr> | Function call |
executeLocal.input.messageHeader | { type: "external" ; publicKey: string ; withoutSignature?: boolean } | { type: "internal" ; sender: Addr ; amount: string ; bounce: boolean ; bounced?: boolean } | Message header |
executeLocal.input.executorParams? | { disableSignatureCheck?: boolean ; overrideBalance?: string | number } | Optional executor parameters used during local contract execution |
executeLocal.input.executorParams.disableSignatureCheck? | boolean | If true, signature verification always succeeds |
executeLocal.input.executorParams.overrideBalance? | string | number | Explicit account balance in nano EVER |
executeLocal.output | { transaction: Transaction<Addr> ; newState: FullContractState | undefined ; output: TokensObject<Addr> | undefined } | - |
executeLocal.output.transaction | Transaction<Addr> | Executed transaction |
executeLocal.output.newState | FullContractState | undefined | Contract state after the executed transaction |
executeLocal.output.output | TokensObject<Addr> | undefined | Parsed function call output |
getExpectedAddress | { input: { tvc: string ; abi: string ; workchain?: number ; publicKey?: string ; initParams: TokensObject<Addr> } ; output: { address: Addr ; stateInit: string ; hash: string } } | Calculates contract address from code and init params --- Required permissions: basic |
getExpectedAddress.input | { tvc: string ; abi: string ; workchain?: number ; publicKey?: string ; initParams: TokensObject<Addr> } | - |
getExpectedAddress.input.tvc | string | Base64 encoded TVC file |
getExpectedAddress.input.abi | string | Contract ABI |
getExpectedAddress.input.workchain? | number | Contract workchain. 0 by default |
getExpectedAddress.input.publicKey? | string | Public key, which will be injected into the contract. 0 by default |
getExpectedAddress.input.initParams | TokensObject<Addr> | State init params |
getExpectedAddress.output | { address: Addr ; stateInit: string ; hash: string } | - |
getExpectedAddress.output.address | Addr | Contract address |
getExpectedAddress.output.stateInit | string | Base64 encoded state init |
getExpectedAddress.output.hash | string | Hex encoded state init hash |
getContractFields | { input: { address: Addr ; abi: string ; cachedState?: FullContractState ; allowPartial: boolean } ; output: { fields?: TokensObject<Addr> ; state: FullContractState | undefined } } | Unpacks all fields from the contract state using the specified ABI --- Required permissions: basic |
getContractFields.input | { address: Addr ; abi: string ; cachedState?: FullContractState ; allowPartial: boolean } | - |
getContractFields.input.address | Addr | Contract address |
getContractFields.input.abi | string | Contract ABI |
getContractFields.input.cachedState? | FullContractState | Cached contract state |
getContractFields.input.allowPartial | boolean | Don't fail if something is left in a cell after unpacking |
getContractFields.output | { fields?: TokensObject<Addr> ; state: FullContractState | undefined } | - |
getContractFields.output.fields? | TokensObject<Addr> | Parsed contracts fields |
getContractFields.output.state | FullContractState | undefined | Contract state or undefined if it doesn't exist |
unpackInitData | { input: { abi: string ; data: string } ; output: { publicKey: string | undefined ; initParams: TokensObject<Addr> } } | Decodes initial contract data using the specified ABI --- Required permissions: basic |
unpackInitData.input | { abi: string ; data: string } | - |
unpackInitData.input.abi | string | Contract ABI |
unpackInitData.input.data | string | Base64 encoded init data BOC. |
unpackInitData.output | { publicKey: string | undefined ; initParams: TokensObject<Addr> } | - |
unpackInitData.output.publicKey | string | undefined | Optional hex encoded public key |
unpackInitData.output.initParams | TokensObject<Addr> | State init params |
getBocHash | { input: { boc: string } ; output: { hash: string } } | Computes hash of base64 encoded BOC --- Required permissions: basic |
getBocHash.input | { boc: string } | - |
getBocHash.input.boc | string | Base64 encoded cell BOC |
getBocHash.output | { hash: string } | - |
getBocHash.output.hash | string | Hex encoded cell hash |
packIntoCell | { input: { abiVersion?: AbiVersion ; structure: AbiParam[] ; data: TokensObject<Addr> } ; output: { boc: string ; hash: string } } | Creates base64 encoded BOC --- Required permissions: basic |
packIntoCell.input | { abiVersion?: AbiVersion ; structure: AbiParam[] ; data: TokensObject<Addr> } | - |
packIntoCell.input.abiVersion? | AbiVersion | ABI version. 2.2 if not specified otherwise |
packIntoCell.input.structure | AbiParam[] | Cell structure |
packIntoCell.input.data | TokensObject<Addr> | Cell data |
packIntoCell.output | { boc: string ; hash: string } | - |
packIntoCell.output.boc | string | Base64 encoded cell BOC |
packIntoCell.output.hash | string | Hex encoded cell hash |
unpackFromCell | { input: { abiVersion?: AbiVersion ; structure: AbiParam[] ; boc: string ; allowPartial: boolean } ; output: { data: TokensObject<Addr> } } | Decodes base64 encoded BOC --- Required permissions: basic |
unpackFromCell.input | { abiVersion?: AbiVersion ; structure: AbiParam[] ; boc: string ; allowPartial: boolean } | - |
unpackFromCell.input.abiVersion? | AbiVersion | ABI version. 2.2 if not specified otherwise |
unpackFromCell.input.structure | AbiParam[] | Cell structure |
unpackFromCell.input.boc | string | Base64 encoded cell BOC |
unpackFromCell.input.allowPartial | boolean | Don't fail if something is left in a cell after unpacking |
unpackFromCell.output | { data: TokensObject<Addr> } | - |
unpackFromCell.output.data | TokensObject<Addr> | Cell data |
extractPublicKey | { input: { boc: string } ; output: { publicKey: string } } | Extracts public key from raw account state NOTE: can only be used on contracts which are deployed and has pubkey header --- Required permissions: basic |
extractPublicKey.input | { boc: string } | - |
extractPublicKey.input.boc | string | Base64 encoded account state See FullContractState |
extractPublicKey.output | { publicKey: string } | - |
extractPublicKey.output.publicKey | string | Hex encoded public key |
codeToTvc | { input: { code: string } ; output: { tvc: string ; hash: string } } | Converts base64 encoded contract code into tvc with default init data --- Required permissions: basic |
codeToTvc.input | { code: string } | - |
codeToTvc.input.code | string | Base64 encoded contract code |
codeToTvc.output | { tvc: string ; hash: string } | - |
codeToTvc.output.tvc | string | Base64 encoded state init |
codeToTvc.output.hash | string | Hex encoded cell hash |
mergeTvc | { input: { code: string ; data: string } ; output: { tvc: string ; hash: string } } | Merges base64 encoded contract code and state into a tvc --- Required permissions: basic |
mergeTvc.input | { code: string ; data: string } | - |
mergeTvc.input.code | string | Base64 encoded contract code |
mergeTvc.input.data | string | Base64 encoded contract data |
mergeTvc.output | { tvc: string ; hash: string } | - |
mergeTvc.output.tvc | string | Base64 encoded state init |
mergeTvc.output.hash | string | Hex encoded cell hash |
splitTvc | { input: { tvc: string } ; output: { data: string | undefined ; code: string | undefined } } | Splits base64 encoded state init into code and data --- Required permissions: basic |
splitTvc.input | { tvc: string } | - |
splitTvc.input.tvc | string | Base64 encoded state init |
splitTvc.output | { data: string | undefined ; code: string | undefined } | - |
splitTvc.output.data | string | undefined | Base64 encoded init data |
splitTvc.output.code | string | undefined | Base64 encoded contract code |
setCodeSalt | { input: { code: string ; salt: string } ; output: { code: string ; hash: string } } | Inserts salt into code --- Required permissions: basic |
setCodeSalt.input | { code: string ; salt: string } | - |
setCodeSalt.input.code | string | Base64 encoded contract code |
setCodeSalt.input.salt | string | Base64 encoded salt (as BOC) |
setCodeSalt.output | { code: string ; hash: string } | - |
setCodeSalt.output.code | string | Base64 encoded contract code with salt |
setCodeSalt.output.hash | string | Hex encoded cell hash |
getCodeSalt | { input: { code: string } ; output: { salt: string | undefined } } | Retrieves salt from code. Returns undefined if code doesn't contain salt --- Required permissions: basic |
getCodeSalt.input | { code: string } | - |
getCodeSalt.input.code | string | Base64 encoded contract code |
getCodeSalt.output | { salt: string | undefined } | - |
getCodeSalt.output.salt | string | undefined | Base64 encoded salt (as BOC) |
encodeInternalInput | { input: FunctionCall<Addr> ; output: { boc: string } } | Creates internal message body --- Required permissions: basic |
encodeInternalInput.input | FunctionCall<Addr> | - |
encodeInternalInput.output | { boc: string } | - |
encodeInternalInput.output.boc | string | Base64 encoded message body BOC |
decodeInput | { input: { body: string ; abi: string ; method: string | string[] ; internal: boolean } ; output: { method: string ; input: TokensObject<Addr> } | null } | Decodes body of incoming message --- Required permissions: basic |
decodeInput.input | { body: string ; abi: string ; method: string | string[] ; internal: boolean } | - |
decodeInput.input.body | string | Base64 encoded message body BOC |
decodeInput.input.abi | string | Contract ABI |
decodeInput.input.method | string | string[] | Specific method from specified contract ABI. When an array of method names is passed it will try to decode until first successful > Note! If method param was provided as string, it will assume that message body contains > specified function and this method will either return output or throw an exception. If you just want > to try to decode specified method, use ['method'], in that case it will return null > if message body doesn't contain requested method. |
decodeInput.input.internal | boolean | Function call type |
decodeInput.output | { method: string ; input: TokensObject<Addr> } | null | - |
decodeOutput | { input: { body: string ; abi: string ; method: string | string[] } ; output: { method: string ; output: TokensObject<Addr> } | null } | Decodes body of outgoing message --- Required permissions: basic |
decodeOutput.input | { body: string ; abi: string ; method: string | string[] } | - |
decodeOutput.input.body | string | Base64 encoded message body BOC |
decodeOutput.input.abi | string | Contract ABI |
decodeOutput.input.method | string | string[] | Specific method from specified contract ABI. When an array of method names is passed it will try to decode until first successful > Note! If method param was provided as string, it will assume that message body contains > specified function and this method will either return output or throw an exception. If you just want > to try to decode specified method, use ['method'], in that case it will return null > if message body doesn't contain requested method. |
decodeOutput.output | { method: string ; output: TokensObject<Addr> } | null | - |
decodeEvent | { input: { body: string ; abi: string ; event: string | string[] } ; output: { event: string ; data: TokensObject<Addr> } | null } | Decodes body of event message --- Required permissions: basic |
decodeEvent.input | { body: string ; abi: string ; event: string | string[] } | - |
decodeEvent.input.body | string | Base64 encoded message body BOC |
decodeEvent.input.abi | string | Contract ABI |
decodeEvent.input.event | string | string[] | Specific event from specified contract ABI. When an array of event names is passed it will try to decode until first successful > Note! If event param was provided as string, it will assume that message body contains > specified event and this method will either return output or throw an exception. If you just want > to try to decode specified event, use ['event'], in that case it will return null > if message body doesn't contain requested event. |
decodeEvent.output | { event: string ; data: TokensObject<Addr> } | null | - |
decodeTransaction | { input: { transaction: Transaction<Addr> ; abi: string ; method: string | string[] } ; output: { method: string ; input: TokensObject<Addr> ; output: TokensObject<Addr> } | null } | Decodes function call --- Required permissions: basic |
decodeTransaction.input | { transaction: Transaction<Addr> ; abi: string ; method: string | string[] } | - |
decodeTransaction.input.transaction | Transaction<Addr> | Transaction with the function call |
decodeTransaction.input.abi | string | Contract ABI |
decodeTransaction.input.method | string | string[] | Specific method from specified contract ABI. When an array of method names is passed it will try to decode until first successful. > Note! If method param was provided as string, it will assume that transaction contains > specified call and this method will either return output or throw an exception. If you just want > to try to decode specified method, use ['method'], in that case it will return null > if transaction doesn't contain requested method. |
decodeTransaction.output | { method: string ; input: TokensObject<Addr> ; output: TokensObject<Addr> } | null | - |
decodeTransactionEvents | { input: { transaction: Transaction<Addr> ; abi: string } ; output: { events: { event: string ; data: TokensObject<Addr> }[] } } | Decodes transaction events --- Required permissions: basic |
decodeTransactionEvents.input | { transaction: Transaction<Addr> ; abi: string } | - |
decodeTransactionEvents.input.transaction | Transaction<Addr> | Transaction with the function call |
decodeTransactionEvents.input.abi | string | Contract ABI |
decodeTransactionEvents.output | { events: { event: string ; data: TokensObject<Addr> }[] } | - |
decodeTransactionEvents.output.events | { event: string ; data: TokensObject<Addr> }[] | Successfully decoded events |
verifySignature | { input: { publicKey: string ; dataHash: string ; signature: string ; withSignatureId?: boolean | number } ; output: { isValid: boolean } } | Checks if a specific data hash was signed with the specified key --- Requires permissions: basic |
verifySignature.input | { publicKey: string ; dataHash: string ; signature: string ; withSignatureId?: boolean | number } | - |
verifySignature.input.publicKey | string | The public key of the preferred account. It is the same publicKey as the accountInteraction.publicKey, but it must be explicitly provided |
verifySignature.input.dataHash | string | Base64 or hex encoded arbitrary bytes hash (data must be 32 bytes long) |
verifySignature.input.signature | string | Base64 or hex encoded signature bytes (data must be 64 bytes long) |
verifySignature.input.withSignatureId? | boolean | number | Whether to use the signature id during verification (true by default). - If true, uses the signature id of the selected network (if the capability is enabled). - If false, forces signature check to ignore any signature id. - If number, uses the specified number as a signature id. |
verifySignature.output | { isValid: boolean } | - |
verifySignature.output.isValid | boolean | Returns true if message was signed with this key |
sendUnsignedExternalMessage | { input: { recipient: Addr ; stateInit?: string ; payload?: string | FunctionCall<Addr> ; local?: boolean ; executorParams?: { disableSignatureCheck?: boolean ; overrideBalance?: string | number } } ; output: { transaction: Transaction<Addr> ; output: TokensObject<Addr> | undefined } } | Sends an unsigned external message to the contract --- Required permissions: basic |
sendUnsignedExternalMessage.input | { recipient: Addr ; stateInit?: string ; payload?: string | FunctionCall<Addr> ; local?: boolean ; executorParams?: { disableSignatureCheck?: boolean ; overrideBalance?: string | number } } | - |
sendUnsignedExternalMessage.input.recipient | Addr | Message destination address |
sendUnsignedExternalMessage.input.stateInit? | string | Optional base64 encoded .tvc file |
sendUnsignedExternalMessage.input.payload? | string | FunctionCall<Addr> | Function call |
sendUnsignedExternalMessage.input.local? | boolean | Whether to only run it locally (false by default) Can be used as alternative runLocal method |
sendUnsignedExternalMessage.input.executorParams? | { disableSignatureCheck?: boolean ; overrideBalance?: string | number } | Optional executor parameters used during local contract execution |
sendUnsignedExternalMessage.input.executorParams.disableSignatureCheck? | boolean | If true, signature verification always succeds |
sendUnsignedExternalMessage.input.executorParams.overrideBalance? | string | number | Explicit account balance in nano EVER |
sendUnsignedExternalMessage.output | { transaction: Transaction<Addr> ; output: TokensObject<Addr> | undefined } | - |
sendUnsignedExternalMessage.output.transaction | Transaction<Addr> | Executed transaction |
sendUnsignedExternalMessage.output.output | TokensObject<Addr> | undefined | Parsed function call output |
addAsset | { input: { account: Addr ; type: AssetType ; params: AssetTypeParams<AssetType, Addr> } ; output: { newAsset: boolean } } | Adds asset to the selected account --- Requires permissions: accountInteraction |
addAsset.input | { account: Addr ; type: AssetType ; params: AssetTypeParams<AssetType, Addr> } | - |
addAsset.input.account | Addr | Owner's wallet address. It is the same address as the accountInteraction.address, but it must be explicitly provided |
addAsset.input.type | AssetType | Which asset to add |
addAsset.input.params | AssetTypeParams<AssetType, Addr> | Asset parameters |
addAsset.output | { newAsset: boolean } | - |
addAsset.output.newAsset | boolean | Returns true if the account did not have this asset before |
signData | { input: { publicKey: string ; data: string ; withSignatureId?: boolean | number } ; output: { dataHash: string ; signature: string ; signatureHex: string ; signatureParts: { high: string ; low: string } } } | Signs arbitrary data. NOTE: hashes data before signing. Use signDataRaw to sign without hash. --- Requires permissions: accountInteraction |
signData.input | { publicKey: string ; data: string ; withSignatureId?: boolean | number } | - |
signData.input.publicKey | string | The public key of the preferred account. It is the same publicKey as the accountInteraction.publicKey, but it must be explicitly provided |
signData.input.data | string | Base64 encoded arbitrary bytes |
signData.input.withSignatureId? | boolean | number | Whether to use the signature id for signing (true by default). - If true, uses the signature id of the selected network (if the capability is enabled). - If false, forces signature check to ignore any signature id. - If number, uses the specified number as a signature id. |
signData.output | { dataHash: string ; signature: string ; signatureHex: string ; signatureParts: { high: string ; low: string } } | - |
signData.output.dataHash | string | Hex encoded data hash |
signData.output.signature | string | Base64 encoded signature bytes (data is guaranteed to be 64 bytes long) |
signData.output.signatureHex | string | Hex encoded signature bytes (data is guaranteed to be 64 bytes long) |
signData.output.signatureParts | { high: string ; low: string } | Same signature, but split into two uint256 parts |
signData.output.signatureParts.high | string | High 32 bytes of the signature as uint256 |
signData.output.signatureParts.low | string | Low 32 bytes of the signature as uint256 |
signDataRaw | { input: { publicKey: string ; data: string ; withSignatureId?: boolean | number } ; output: { signature: string ; signatureHex: string ; signatureParts: { high: string ; low: string } } } | Signs arbitrary data without hashing it --- Requires permissions: accountInteraction |
signDataRaw.input | { publicKey: string ; data: string ; withSignatureId?: boolean | number } | - |
signDataRaw.input.publicKey | string | The public key of the preferred account. It is the same publicKey as the accountInteraction.publicKey, but it must be explicitly provided |
signDataRaw.input.data | string | Base64 encoded arbitrary bytes |
signDataRaw.input.withSignatureId? | boolean | number | Whether to use the signature id for signing (true by default). - If true, uses the signature id of the selected network (if the capability is enabled). - If false, forces signature check to ignore any signature id. - If number, uses the specified number as a signature id. |
signDataRaw.output | { signature: string ; signatureHex: string ; signatureParts: { high: string ; low: string } } | - |
signDataRaw.output.signature | string | Base64 encoded signature bytes (data is guaranteed to be 64 bytes long) |
signDataRaw.output.signatureHex | string | Hex encoded signature bytes (data is guaranteed to be 64 bytes long) |
signDataRaw.output.signatureParts | { high: string ; low: string } | Same signature, but split into two uint256 parts |
signDataRaw.output.signatureParts.high | string | High 32 bytes of the signature as uint256 |
signDataRaw.output.signatureParts.low | string | Low 32 bytes of the signature as uint256 |
encryptData | { input: { publicKey: string ; recipientPublicKeys: string[] ; algorithm: EncryptionAlgorithm ; data: string } ; output: { encryptedData: EncryptedData[] } } | Encrypts arbitrary data with specified algorithm for each specified recipient --- Requires permissions: accountInteraction |
encryptData.input | { publicKey: string ; recipientPublicKeys: string[] ; algorithm: EncryptionAlgorithm ; data: string } | - |
encryptData.input.publicKey | string | The public key of the preferred account. It is the same publicKey as the accountInteraction.publicKey, but it must be explicitly provided |
encryptData.input.recipientPublicKeys | string[] | Public keys of recipients. Hex encoded |
encryptData.input.algorithm | EncryptionAlgorithm | Encryption algorithm. Nonce will be generated for each recipient |
encryptData.input.data | string | Base64 encoded data |
encryptData.output | { encryptedData: EncryptedData[] } | - |
encryptData.output.encryptedData | EncryptedData[] | Encrypted data for each recipient public key |
decryptData | { input: { encryptedData: EncryptedData } ; output: { data: string } } | Decrypts encrypted data --- Requires permissions: accountInteraction |
decryptData.input | { encryptedData: EncryptedData } | - |
decryptData.input.encryptedData | EncryptedData | Encrypted data. The recipient's public key must match the public key of the current account. |
decryptData.output | { data: string } | - |
decryptData.output.data | string | Base64 encoded decrypted data |
estimateFees | { input: { sender: Addr ; recipient: Addr ; amount: string ; payload?: FunctionCall<Addr> ; stateInit?: string } ; output: { fees: string } } | Calculates transaction fees --- Required permissions: accountInteraction |
estimateFees.input | { sender: Addr ; recipient: Addr ; amount: string ; payload?: FunctionCall<Addr> ; stateInit?: string } | - |
estimateFees.input.sender | Addr | This wallet will be used to send the message. It is the same address as the accountInteraction.address, but it must be explicitly provided |
estimateFees.input.recipient | Addr | Message destination address |
estimateFees.input.amount | string | Amount of nano EVER to send |
estimateFees.input.payload? | FunctionCall<Addr> | Optional function call |
estimateFees.input.stateInit? | string | Optional base64 encoded TVC NOTE: If the selected contract do not support this, an error is returned |
estimateFees.output | { fees: string } | - |
estimateFees.output.fees | string | Fees in nano EVER |
sendMessage | { input: { sender: Addr ; recipient: Addr ; amount: string ; bounce: boolean ; payload?: FunctionCall<Addr> ; stateInit?: string } ; output: { transaction: Transaction<Addr> } } | Sends an internal message from the user account. Shows an approval window to the user. --- Required permissions: accountInteraction |
sendMessage.input | { sender: Addr ; recipient: Addr ; amount: string ; bounce: boolean ; payload?: FunctionCall<Addr> ; stateInit?: string } | - |
sendMessage.input.sender | Addr | Preferred wallet address. It is the same address as the accountInteraction.address, but it must be explicitly provided |
sendMessage.input.recipient | Addr | Message destination address |
sendMessage.input.amount | string | Amount of nano EVER to send |
sendMessage.input.bounce | boolean | Whether to bounce message back on error |
sendMessage.input.payload? | FunctionCall<Addr> | Optional function call |
sendMessage.input.stateInit? | string | Optional base64 encoded TVC NOTE: If the selected contract do not support this, an error is returned |
sendMessage.output | { transaction: Transaction<Addr> } | - |
sendMessage.output.transaction | Transaction<Addr> | Executed transaction |
sendMessageDelayed | { input: { sender: Addr ; recipient: Addr ; amount: string ; bounce: boolean ; payload?: FunctionCall<Addr> ; stateInit?: string } ; output: { message: DelayedMessage<Addr> } } | Sends an internal message from the user account without waiting for the transaction. Shows an approval window to the user. See messageStatusUpdated --- Required permissions: accountInteraction |
sendMessageDelayed.input | { sender: Addr ; recipient: Addr ; amount: string ; bounce: boolean ; payload?: FunctionCall<Addr> ; stateInit?: string } | - |
sendMessageDelayed.input.sender | Addr | Preferred wallet address. It is the same address as the accountInteraction.address, but it must be explicitly provided |
sendMessageDelayed.input.recipient | Addr | Message destination address |
sendMessageDelayed.input.amount | string | Amount of nano EVER to send |
sendMessageDelayed.input.bounce | boolean | Whether to bounce message back on error |
sendMessageDelayed.input.payload? | FunctionCall<Addr> | Optional function call |
sendMessageDelayed.input.stateInit? | string | Optional base64 encoded TVC NOTE: If the selected contract do not support this, an error is returned |
sendMessageDelayed.output | { message: DelayedMessage<Addr> } | - |
sendMessageDelayed.output.message | DelayedMessage<Addr> | External message info |
sendExternalMessage | { input: { publicKey: string ; recipient: Addr ; stateInit?: string ; payload: FunctionCall<Addr> ; local?: boolean ; executorParams?: { disableSignatureCheck?: boolean ; overrideBalance?: string | number } } ; output: { transaction: Transaction<Addr> ; output: TokensObject<Addr> | undefined } } | Sends an external message to the contract Shows and approval window to the user --- Required permissions: accountInteraction |
sendExternalMessage.input | { publicKey: string ; recipient: Addr ; stateInit?: string ; payload: FunctionCall<Addr> ; local?: boolean ; executorParams?: { disableSignatureCheck?: boolean ; overrideBalance?: string | number } } | - |
sendExternalMessage.input.publicKey | string | The public key of the preferred account. It is the same publicKey as the accountInteraction.publicKey, but it must be explicitly provided |
sendExternalMessage.input.recipient | Addr | Message destination address |
sendExternalMessage.input.stateInit? | string | Optional base64 encoded .tvc file |
sendExternalMessage.input.payload | FunctionCall<Addr> | Function call |
sendExternalMessage.input.local? | boolean | Whether to only run it locally (false by default) Can be used as alternative runLocal method but with user signature |
sendExternalMessage.input.executorParams? | { disableSignatureCheck?: boolean ; overrideBalance?: string | number } | Optional executor parameters used during local contract execution |
sendExternalMessage.input.executorParams.disableSignatureCheck? | boolean | If true, signature verification always succeds |
sendExternalMessage.input.executorParams.overrideBalance? | string | number | Explicit account balance in nano EVER |
sendExternalMessage.output | { transaction: Transaction<Addr> ; output: TokensObject<Addr> | undefined } | - |
sendExternalMessage.output.transaction | Transaction<Addr> | Executed transaction |
sendExternalMessage.output.output | TokensObject<Addr> | undefined | Parsed function call output |
sendExternalMessageDelayed | { input: { publicKey: string ; recipient: Addr ; stateInit?: string ; payload: FunctionCall<Addr> } ; output: { message: DelayedMessage<Addr> } } | Sends an external message to the contract without waiting for the transaction. Shows and approval window to the user See messageStatusUpdated --- Required permissions: accountInteraction |
sendExternalMessageDelayed.input | { publicKey: string ; recipient: Addr ; stateInit?: string ; payload: FunctionCall<Addr> } | - |
sendExternalMessageDelayed.input.publicKey | string | The public key of the preferred account. It is the same publicKey as the accountInteraction.publicKey, but it must be explicitly provided |
sendExternalMessageDelayed.input.recipient | Addr | Message destination address |
sendExternalMessageDelayed.input.stateInit? | string | Optional base64 encoded .tvc file |
sendExternalMessageDelayed.input.payload | FunctionCall<Addr> | Function call |
sendExternalMessageDelayed.output | { message: DelayedMessage<Addr> } | - |
sendExternalMessageDelayed.output.message | DelayedMessage<Addr> | External message info |
Defined in:
ProviderEvent
Ƭ ProviderEvent: keyof ProviderEvents
Defined in:
ProviderEventData
Ƭ ProviderEventData<T, Addr>: ProviderEvents<Addr>[T]
Type parameters
| Name | Type |
|---|---|
T | extends ProviderEvent |
Addr | Address |
Defined in:
RawProviderEventData
Ƭ RawProviderEventData<T>: ProviderEventData<T, string>
Type parameters
| Name | Type |
|---|---|
T | extends ProviderEvent |
Defined in:
ProviderMethod
Ƭ ProviderMethod: keyof ProviderApi
Defined in:
ProviderApiRequestParams
Ƭ ProviderApiRequestParams<T, Addr>: ProviderApi<Addr>[T] extends { input: infer I } ? I : undefined
Type parameters
| Name | Type |
|---|---|
T | extends ProviderMethod |
Addr | Address |
Defined in:
RawProviderApiRequestParams
Ƭ RawProviderApiRequestParams<T>: ProviderApiRequestParams<T, string>
Type parameters
| Name | Type |
|---|---|
T | extends ProviderMethod |
Defined in:
ProviderApiResponse
Ƭ ProviderApiResponse<T, Addr>: ProviderApi<Addr>[T] extends { output: infer O } ? O : undefined
Type parameters
| Name | Type |
|---|---|
T | extends ProviderMethod |
Addr | Address |
Defined in:
RawProviderApiResponse
Ƭ RawProviderApiResponse<T>: ProviderApiResponse<T, string>
Type parameters
| Name | Type |
|---|---|
T | extends ProviderMethod |
Defined in: