invokeRead
Execute a contract invocation in read-only mode.
Input Arguments
Success Response
The wallet will return the direct response from the RPC node.
Argument
type: 'String' | 'Boolean' | 'Hash160' | 'Hash256' | 'Integer' | 'ByteArray' | 'Array' | 'Address'
The type of the argument with you are using. The type is an array, please see the example for the value.
value: string
String representation of the argument which you are using
Signer
account: string
scriptHash of the address
allowedContracts?: Array
Contracts of the signature can take effect, if scopes is CustomContracts
allowedGroups?: Array
Pubkeys of the signature can take effect, if scopes is CustomGroups
Scopes
0
Only transactions are signed and no contracts are allowed to use this signature.
1
It only applies to the chain call entry. That is, if the user invokes contract A, and then contract A calls contract B, only contract A can use the signature. It is recommended as the default value for the wallet.
16
Custom contract. The signature can be used in the specified contract. It can be used in conjunction with CalledByEntry.
32
Custom contract groups that can be used in a specified contract group. It can be used in conjunction with CalledByEntry.
64
Indicates that the current context must satisfy the specified rules.
128
Global. The risk is extremely high because the contract may transfer all assets in the address. Only choose it when the contract is extremely trusted.
WitnessRule
WitnessCondition
Indicates that the condition is met when the current context has the specified script hash.
Indicates that the condition is met when the current context has the specified group.
Indicates that the condition is met when the current context is the entry point or is called by the entry point.
Indicates that the condition is met when the current context is called by the specified contract.
BooleanWitnessCondition
type: 'Boolean'
The type of the BooleanWitnessCondition.
expression: boolean
The expression of the BooleanWitnessCondition.
AndWitnessCondition
NotWitnessCondition
OrWitnessCondition
ScriptHashWitnessCondition
type: 'ScriptHash'
The type of the ScriptHashWitnessCondition.
hash: string
The hash of the ScriptHashWitnessCondition.
GroupWitnessCondition
type: 'Group'
The type of the GroupWitnessCondition.
group: string
The group of the GroupWitnessCondition.
CalledByEntryWitnessCondition
type: 'CalledByEntry'
The type of the CalledByEntryWitnessCondition.
CalledByContractWitnessCondition
type: 'CalledByContract'
The type of the CalledByContractWitnessCondition.
hash: string
The hash of the CalledByContractWitnessCondition.
CalledByGroupWitnessCondition
type: 'CalledByGroup'
The type of the CalledByGroupWitnessCondition.
group: string
The group of the CalledByGroupWitnessCondition.
Error Response
type: string
The type of error which has occured
description: string
A description of the error which has occured
data: string
Any raw data associated with the error
Example
Request
Response
最后更新于
这有帮助吗?