SigningRequest
Summary
Members | Descriptions |
---|---|
| The signing request version. |
| The raw signing request data. |
| The request signature. |
| Create a new signing request. Normally not used directly, see the |
| Sign the request, mutating. |
| Get the signature digest for this request. |
| Set the signature data for this request, mutating. |
| Set the request callback, mutating. |
| Set broadcast flag. |
| |
| Get the request data without header or signature. |
| Get signature data, returns an empty array if request is not signed. |
| ABI definitions required to resolve request. |
| Whether TaPoS values are required to resolve request. |
| Resolve required ABI definitions. |
| Decode raw actions actions to object representations. |
| |
| |
| Get the id of the chain where this request is valid. |
| Return the actions in this request with action data encoded. |
| Unresolved transaction. |
| Whether the request is an identity request. |
| Whether the request should be broadcast by signer. |
| Present if the request is an identity request and requests a specific account. This returns |
| Present if the request is an identity request and requests a specific permission. This returns |
| Get raw info dict |
| Get metadata values as T |
| Get metadata values as T |
| Get metadata values as strings. |
| Set a metadata key. |
| Return a deep copy of this request. |
| Present if the request is an identity request and requests a specific permission. This returns |
| |
| |
| |
| Create a new signing request. |
| Creates an identity request. |
| Create a request from a chain id and serialized transaction. |
| Creates a signing request from encoded |
|
Members
public readonly byte
Version
= 2
The signing request version.
public readonly SigningRequestData
Data
The raw signing request data.
public RequestSignature
Signature
The request signature.
public
SigningRequest
(byte version, SigningRequestData data,
IZlibProvider
zlib, IAbiSerializationProvider abiSerializationProvider, RequestSignature signature)
Create a new signing request. Normally not used directly, see the create
and from
class methods.
public void
Sign
(ISignProvider signatureProvider)
Sign the request, mutating.
Parameters
signatureProvider
The signature provider that provides a signature for the signer.
public byte[]
GetSignatureDigest
()
Get the signature digest for this request.
public void
SetSignature
(string signer, string signature)
Set the signature data for this request, mutating.
Parameters
signer
Account name of signer.signature
The signature string.
public void
SetCallback
(string url, bool background)
Set the request callback, mutating.
Parameters
url
Where the callback should be sent.background
Whether the callback should be sent in the background.
public void
SetBroadcast
(bool broadcast)
Set broadcast flag.
Parameters
broadcast
Whether the transaction should be broadcast by receiver.
public string
Encode
(bool? compress, bool? slashes)
public byte[]
GetData
()
Get the request data without header or signature.
public byte[]
GetSignatureData
()
Get signature data, returns an empty array if request is not signed.
public List< string >
GetRequiredAbis
()
ABI definitions required to resolve request.
public bool
RequiresTapos
()
Whether TaPoS values are required to resolve request.
public async Task< Dictionary< string, Abi > >
FetchAbis
(IAbiSerializationProvider abiSerializationProvider)
Resolve required ABI definitions.
public Action[]
ResolveActions
(Dictionary< string, Abi > abis, PermissionLevel signer)
Decode raw actions actions to object representations.
Parameters
abis
ABI defenitions required to decode all actions.signer
Placeholders in actions will be resolved to signer if set.
public Transaction
ResolveTransaction
(Dictionary< string, Abi > abis, PermissionLevel signer,
TransactionContext
ctx)
public ResolvedSigningRequest
Resolve
(Dictionary< string, Abi > abis, PermissionLevel signer,
TransactionContext
ctx)
public string
GetChainId
()
Get the id of the chain where this request is valid.
Returns
The 32-byte chain id as hex encoded string.
public Action[]
GetRawActions
()
Return the actions in this request with action data encoded.
public Transaction
GetRawTransaction
()
Unresolved transaction.
public bool
IsIdentity
()
Whether the request is an identity request.
public bool
ShouldBroadcast
()
Whether the request should be broadcast by signer.
public string
GetIdentity
()
Present if the request is an identity request and requests a specific account. This returns nil
unless a specific identity has been requested, use isIdentity
to check id requests.
public string
GetIdentityPermission
()
Present if the request is an identity request and requests a specific permission. This returns nil
unless a specific permission has been requested, use isIdentity
to check id requests.
public Dictionary< string, byte[]>
GetRawInfo
()
Get raw info dict
public T
GetInfo< T >
(string key, string abiSerializableType)
Get metadata values as T
public string
GetInfo
(string key, string abiSerializableType)
Get metadata values as T
public Dictionary< string, string >
GetInfos
()
Get metadata values as strings.
public void
SetInfoKey
(string key, object value, string abiSerializableType)
Set a metadata key.
public SigningRequest
Clone
()
Return a deep copy of this request.
public string
GetIdentityScope
()
Present if the request is an identity request and requests a specific permission. This returns nil
unless a specific permission has been requested, use isIdentity
to check id requests.
private readonly
IZlibProvider
_zlib
private readonly IAbiSerializationProvider
_abiSerializationProvider
private void
ReplacePlaceholders
(Dictionary< string, object > dataDict, PermissionLevel signer)
public static async Task< SigningRequest >
Create
(SigningRequestCreateArguments args, SigningRequestEncodingOptions options)
Create a new signing request.
public static async Task< SigningRequest >
Identity
(SigningRequestCreateIdentityArguments args, SigningRequestEncodingOptions options)
Creates an identity request.
public static SigningRequest
FromTransaction
(object chainId, object serializedTransaction, SigningRequestEncodingOptions options)
Create a request from a chain id and serialized transaction.
Parameters
chainId
The chain id where the transaction is valid.serializedTransaction
The serialized transaction.options
Creation options.
public static SigningRequest
From
(string uri, SigningRequestEncodingOptions options)
Creates a signing request from encoded esr:
uri string.
public static SigningRequest
FromData
(byte[] data, SigningRequestEncodingOptions options)
Last updated