agent_dart
library
Classes
AccountBalanceArgs
AccountBalanceArgsNew
Actor
An actor base class. An actor is an object containing only functions that will
return a promise. These functions are derived from the IDL definition.
ActorConfig
Configuration that can be passed to customize the Actor behaviour.
ActorMetadata
Internal metadata for actors. It's an enhanced version of ActorConfig with
some fields marked as required (as they are defaulted) and canisterId as
a Principal type.
ActorMethod
AesDecryptReq
AesEncryptReq
Agent
An Agent able to make calls and queries to a Replica.
AgentBLS
AgentDart
Main entrypoint of the Rust API
AgentFactory
AnonymousIdentity
ArchiveOptions
AssetActor
Try to understand how idl can be transformed.
AuthClient
AuthClientCreateOptions
AuthClientLoginOptions
AuthPayload
AuthResponse
AuthResponseFailure
AuthResponseSuccess
BaseAccount
BaseBlob
BaseRequest
BaseSigner <T extends BaseAccount , R extends SignablePayload , E >
Bech32
Bech32Codec
Bech32Decoder
Bech32Encoder
BigIntEncoder
BLSVerifyReq
BoolClass
Represents an IDL Bool
BufferEncoder
BufferPipe <T >
ByteBufferEncoder
CallConfig
CallOptions
Options when doing a Agent.call
call.
CallRequest
CallResponseBody
CanisterActor
CanisterId
Cert
CertDelegation
Certificate
CoinType
CombineSignedTransactionResult
ConstructType <T >
CreateUrlOptions
Options for createAuthenticationRequestUrl.
All these options may be limited further by the identity provider,
or an error can happen.
Credentials
CType <T >
Represents an IDL type.
DartRandom
DefaultHttpAgentOption
Delegation
DelegationChain
A chain of delegations. This is JSON Serializable.
This is the object to serialize and pass to a DelegationIdentity .
It does not keep any private keys.
DelegationIdentity
An Identity that adds delegation to a request. Everywhere in this class,
the name innerKey refers to the SignIdentity that is being used to
sign the requests, while originalKey is the identity that is being borrowed.
More identities can be used in the middle to delegate.
DelegationIdentityPublicKey
DelegationValidChecks
List of things to check for a delegation chain validity.
DelegationWithSignature
E2EResponse
ECKeys
ED25519FromSeedReq
Ed25519KeyIdentity
Ed25519KeyIdentityRecoveredFromII
Ed25519KeyPair
Ed25519PublicKey
ED25519Res
ED25519SignReq
ED25519VerifyReq
EmptyClass <T >
EncryptMessageResponse
Endpoint
Expiry
ExternalLibrary
This is only intended to be used by automatically generated code,
instead of developers.
FetchResponse
FieldOptions
FixedIntClass
FixedNatClass
FloatClass
FromStorageResult
FuncClass
HttpAgent
HttpAgentBaseRequest <T extends WithToJson >
HttpAgentCallRequest
HttpAgentOptions
HttpAgentQueryRequest
HttpAgentReadStateRequest
HttpAgentRequestTransformFn
HttpAgentSubmitRequest
HttpResponseBody
ICPAccount
ICPSigner
ICPTs
Identity
IDL
IDLTypeIds
IntClass
Implicit types BigInt | int .
KeyDerivator
KeyDerivedRes
KeyPair
A Key Pair, containing a secret and public key.
KeyStore
Ledger
LedgerCanisterInitPayload
LedgerMethods
NatClass
NativeDeriveKeyResult
NotifyCanisterArgs
NullClass
OptClass <T >
Options
P256FromSeedReq
P256Identity
P256IdentityExport
P256KeyPair
P256PublicKey
P256ShareSecretReq
P256SignWithSeedReq
P256VerifyReq
PayloadDuration
PBKDFDeriveReq
PemFile
Phrase
PhraseToSeedReq
PrimitiveType <T >
Principal
PrincipalClass
PrincipalEncoder
ProxyAgent
ProxyMessage <T >
ProxyMessageBase
ProxyMessageCall
ProxyMessageCallResponse
ProxyMessageError <T >
ProxyMessageGetPrincipal
ProxyMessageGetPrincipalResponse
ProxyMessageKind
ProxyMessageQuery
ProxyMessageQueryResponse
ProxyMessageReadState
ProxyMessageReadStateResponse
ProxyMessageStatus
ProxyMessageStatusResponse
ProxyStubAgent
PublicKey
QueryFields
Options when doing a Agent.query call.
QueryRequest
QueryResponse
QueryResponseBase
QueryResponseRejected
QueryResponseReplied
QueryResponseStatus
type QueryResponse = QueryResponseReplied | QueryResponseRejected;
QueryResponseWithStatus
ReadRequestType
ReadStateOptions
Options when doing a Agent.readState call.
ReadStateRequest
ReadStateResponse
ReadStateResponseResult
RecClass <T >
Represents a reference to IDL type, used for defining recursive data types.
RecordClass
ReplicaRejectCode
Codes used by the replica for rejecting a message.
See https://sdk.dfinity.org/docs/interface-spec/#reject-codes
for the interface spec.
Reply
ReservedClass
A reserved class with no usages.
ResponseBody
RosettaApi
Manages Rosetta API calls.
RosettaTransaction
Contains information about a transaction.
SchnorrFromSeedReq
SchnorrIdentity
SchnorrIdentityExport
SchnorrKeyPair
SchnorrPublicKey
SchnorrSignWithSeedReq
SchnorrVerifyReq
ScriptDeriveReq
Secp256k1FromSeedReq
Secp256k1IdentityExport
Secp256k1KeyIdentity
Secp256k1KeyPair
Secp256k1PublicKey
Secp256k1RecoverReq
Secp256k1ShareSecretReq
Secp256k1SignWithRngReq
Secp256k1SignWithSeedReq
Secp256k1VerifyReq
SeedToKeyReq
SelfDescribeEncoder
SendArgs
SendOpts
ServiceClass
SHA224
SHA256
SignatureFFI
Signed <T >
SignedDelegation
Signer <T extends SignablePayload , R >
SignIdentity
An Identity that can sign blobs.
SubmitRequestType
SubmitResponse
TextClass
TimeStamp
ToCborable
ToHashable
Tokens
TransferArgs
TransferError
TransferResult
TupleClass <T extends List >
TypeTable
An IDL Type Table, which precedes the data in the stream.
UnSigned <T >
VariantClass
VecClass <T >
Visitor <D , R >
WalletInstance
Functions
aes128CtrDecrypt ({required AesDecryptReq req })
→ Future <Uint8List >
aes128CtrEncrypt ({required AesEncryptReq req })
→ Future <Uint8List >
aes256CbcDecrypt ({required AesDecryptReq req })
→ Future <Uint8List >
aes256CbcEncrypt ({required AesEncryptReq req })
→ Future <Uint8List >
aes256GcmDecrypt ({required AesDecryptReq req })
→ Future <Uint8List >
aes256GcmEncrypt ({required AesEncryptReq req })
→ Future <Uint8List >
assetIDL ()
→ Service
backoff (num startingThrottleInMsec , num backoffFactor )
→ PollStrategy
base32Decode (String input )
→ Uint8List
base32Encode (Uint8List input )
→ String
base64Decode (String value )
→ Uint8List
base64Encode (dynamic value )
→ String
base64Pad (String value )
→ String
base64Trim (String value )
→ String
base64Validate (String ? value )
→ bool
bitnot (BigInt bn , {int ? bitLength })
→ BigInt
blobFromBuffer (ByteBuffer b )
→ BinaryBlob
blobFromHex (String hex )
→ BinaryBlob
blobFromText (String text )
→ BinaryBlob
blobFromUint32Array (Uint32List arr )
→ BinaryBlob
blobFromUint8Array (Uint8List arr )
→ BinaryBlob
blobToHex (BinaryBlob blob )
→ String
blobToUint8Array (BinaryBlob blob )
→ Uint8List
blsInit ()
→ Future <bool >
blsVerify ({required BLSVerifyReq req })
→ Future <bool >
bnMax (List <BigInt > list )
→ BigInt
bnMin (List <BigInt > list )
→ BigInt
bnSqrt (BigInt bn )
→ BigInt
bnToBn (dynamic value )
→ BigInt
bnToHex (BigInt bn , {int bitLength = -1 , Endian endian = Endian.big , bool isNegative = false , bool include0x = false })
→ String
bnToU8a (BigInt ? value , {int bitLength = -1 , Endian endian = Endian.little , bool isNegative = false })
→ Uint8List
bufEquals (ByteBuffer b1 , ByteBuffer b2 )
→ bool
bytesToHex (List <int > bytes , {bool include0x = false })
→ String
Converts the bytes
given as a list of integers into a hexadecimal
representation.
bytesToInt (List <int > bytes )
→ BigInt
Converts the bytes from that list (big endian) to a BigInt.
bytesUnwrapDer (Uint8List derEncoded , Uint8List oid )
→ Uint8List
Extracts a payload from the given derEncoded
data, and checks that it was
tagged with the given oid
.
bytesUnwrapDerSignature (Uint8List derEncoded )
→ Uint8List
ECDSA DER Signature
0x30|b1|0x02|b2|r|0x02|b3|s
b1 = Length of remaining data
b2 = Length of r
b3 = Length of s
bytesWrapDer (Uint8List payload , Uint8List oid )
→ Uint8List
Wraps the given payload
in a DER encoding tagged with the given encoded
oid
like so: SEQUENCE(oid, BITSTRING(payload))
bytesWrapDerSignature (Uint8List rawSignature )
→ Uint8List
cborDecode <T > (List <int > value )
→ T
cborEncode (dynamic value , {SelfDescribeEncoder ? withSerializer })
→ Uint8List
chain (List <PollStrategy > strategies )
→ PollStrategy
combine (ConstructionCombineRequestPart req )
→ CombineSignedTransactionResult
compactToBn (Map <String , dynamic > value )
→ BigInt
compareLists <T extends Comparable <T > > (List <T > a , List <T > b )
→ int
compareListsBy <T > (List <T > a , List <T > b , int compare (T a , T b ) )
→ int
concat (List <BinaryBlob > bs )
→ BinaryBlob
conditionalDelay (PollPredicate <bool > condition , int timeInMsec )
→ PollStrategy
convertArray (List <int > arr )
→ Uint8List
convertString (String str , {bool useDartEncode = true })
→ Uint8List
crc32Add (Uint8List buf )
→ Uint8List
Prepend a big-endian CRC32 checksum.
crc32Del (Uint8List buf )
→ Uint8List
Given an account address with a prepended big-endian CRC32 checksum, verify
the checksum and remove it.
createAssetCanisterActor (ActorConfig config )
→ CanisterActor
Create a management canister actor.
@param config
createAuthenticationRequestUrl (CreateUrlOptions options )
→ Uri
Create a URL that can be used to redirect the browser to request
authentication (e.g. using the authentication provider). Will throw if some
options are invalid.
createDelegationChainFromAccessToken (String accessToken )
→ DelegationChain
Create a DelegationChain from an AccessToken extracted from a redirect URL.
@param accessToken The access token extracted from a redirect URL.
decodeBigInt (List <int > bytes , {Endian endian = Endian.little })
→ BigInt
decodeLenBytes (Uint8List buf , int offset )
→ int
decodePhrase (Map <String , dynamic > keyStore , String psw )
→ Future <String >
decodePrincipalId (Pipe b )
→ PrincipalId
decodePrivateKey (Map <String , dynamic > keyStore , {String ? password })
→ Future <String >
decodeReturnValue (List <CType > types , BinaryBlob msg )
→ dynamic
decrypt (Map <String , dynamic > keyStore , {String ? password })
→ Future <String >
decryptCborPhrase (List <int > bytes , {String ? password })
→ Future <String >
decryptMessage ({required Secp256k1KeyIdentity identity , required Secp256k1PublicKey theirPublicKey , required String cipherText })
→ Future <String >
decryptP256Message ({required P256Identity identity , required P256PublicKey theirPublicKey , required String cipherText })
→ Future <String >
decryptPhrase (Map <String , dynamic > keyStore , String passphrase )
→ Future <String >
defaultFetch ({required String endpoint , String ? host , String ? defaultHost , FetchMethod method = FetchMethod.post , Duration ? timeout = defaultTimeout , bool cbor = true , dynamic body })
→ Future <Map <String , dynamic > >
defaultFetch is a wrapper of http.get
,
which can be replaced by any other http packages (e.g. dio
).
http
has embedded by default, so the library use it directly.
Users can set host should be full path of http/https.
Usually the usage could be defaultHost+endpoint
and set the defaultHost to somewhere final,
then change the endpoint programmatically.
defaultTimeout is the default timeout limit,
and throw error directly to end the request section.
defaultStrategy ()
→ PollStrategy
derBlobFromBlob (BinaryBlob blob )
→ DerEncodedBlob
derive (Uint8List parentKey , Uint8List parentChaincode , int i )
→ Set <Uint8List >
domainSep (String s )
→ Uint8List
dropLeadingUserNumber (String s )
→ String
ecKeysfromSeed (Uint8List seed , {int index = 0 , int coinType = CoinType.icp })
→ ECKeys
ecTransferCombine (Secp256k1KeyIdentity identity , SignablePayload payloadsRes )
→ Future <CombineSignedTransactionResult >
ed25519FromSeed ({required ED25519FromSeedReq req })
→ Future <ED25519Res >
ed25519KeyIdentityFromPem (String pem )
→ Future <Ed25519KeyIdentity >
ed25519Sign ({required ED25519SignReq req })
→ Future <Uint8List >
ed25519Verify ({required ED25519VerifyReq req })
→ Future <bool >
encodeBigInt (BigInt number , {Endian endian = Endian.little , int ? bitLength })
→ Uint8List
encodeLen (Uint8List buf , int offset , int len )
→ int
encodeLenBytes (int len )
→ int
encodePhrase (String prvKey , {String ? password , Map <String , dynamic > ? options })
→ Future <String >
encodePrivateKey (String prvKey , {String ? password , Map <String , dynamic > ? options })
→ Future <String >
encrypt (String privateKey , {String ? password , Map <String , dynamic > ? options })
→ Future <String >
encryptCborPhrase (String phrase , {String ? password , Map <String , dynamic > ? options })
→ Future <Uint8List >
encryptMessage ({required Secp256k1KeyIdentity identity , required Secp256k1PublicKey theirPublicKey , required String text })
→ Future <EncryptMessageResponse >
encryptP256Message ({required P256Identity identity , required P256PublicKey theirPublicKey , required String text , Uint8List ? sharedSecret })
→ Future <E2EResponse >
encryptPhrase (String phrase , {String ? password , Map <String , dynamic > ? options })
→ Future <String >
findLabel (Uint8List l , List <List > trees )
→ List ?
flattenForks (List t )
→ List <List >
fromBech32Address (String address )
→ String
fromMnemonicWithoutValidation (String mnemonic , List <int > ? derivationPath , {int offset = hardened })
→ Future <Ed25519KeyIdentity >
Create an Ed25519 based on a mnemonic phrase according to SLIP 0010:
https://github.com/satoshilabs/slips/blob/master/slip-0010.md
fromSeedWithSlip0010 (Uint8List masterSeed , List <int > ? derivationPath , {int offset = hardened })
→ Future <Ed25519KeyIdentity >
Create an Ed25519 according to SLIP 0010:
https://github.com/satoshilabs/slips/blob/master/slip-0010.md
generateMasterKey (Uint8List seed )
→ Set <Uint8List >
generateMnemonic ({Language language = bip39.Language.english , String passphrase = '' , int bitLength = 128 })
→ String
getAccessTokenFromURL (dynamic url )
→ String ?
Analyze a URL and try to extract an AccessToken from it.
@param url The URL to look into.
getAccessTokenFromWindow (dynamic link )
→ String ?
Returns an AccessToken from the Window object. This cannot be used in Node,
instead use the {@link getAccessTokenFromURL} function.
getAccountIdFromDerKey (Uint8List der )
→ Uint8List
getAccountIdFromEd25519PublicKey (Uint8List publicKey )
→ Uint8List
getAccountIdFromPrincipalID (String id )
→ Uint8List
getAccountIdFromRawPublicKey (Uint8List publicKey )
→ Uint8List
getCrc32 (ByteBuffer buf )
→ int
Calculate the CRC32 of a blob.
getDerFromFFI (Uint8List seed )
→ Future <Uint8List >
getDerivedKey (String kdf , Map <String , dynamic > params )
→ KeyDerivator
getDerivedKey by kdf
type
getECkeyFromPrivateKey (Uint8List prv )
→ Future <ECKeys >
getECKeys (String mnemonic , {Language language = bip39.Language.english , String passphrase = '' , int index = 0 , int coinType = CoinType.icp })
→ ECKeys
getECKeysAsync (String phrase , {String passphrase = '' , int index = 0 , int coinType = CoinType.icp })
→ Future <ECKeys >
getECShareSecret (Uint8List privateKey , Uint8List rawPublicKey )
→ Future <Uint8List >
getManagementCanister (CallConfig config )
→ CanisterActor
getP256DerPubFromFFI (Uint8List seed )
→ Future <Uint8List >
getP256ShareSecret (Uint8List privateKey , Uint8List rawPublicKey )
→ Future <Uint8List >
getPathWithCoinType ({int coinType = CoinType.icp })
→ String
getPemFile (String path )
→ Future <PemFile >
getPrincipalFromECPublicKey (Uint8List publicKey )
→ String
getPublicFromPrivateKey (Uint8List privateKey , [bool compress = false ])
→ Uint8List ?
getPublicFromPrivateKeyBigInt (BigInt bigint , [bool compress = false ])
→ Uint8List ?
getRandomValues ([int length = _defaultLength ])
→ Uint8List
getSchnorrPubFromFFI (Uint8List seed )
→ Future <Uint8List >
hash (Uint8List data )
→ BinaryBlob
hashKeyValue (dynamic key , dynamic val )
→ Uint8List
hashOfMap (Map map )
→ Uint8List
hashString (String value )
→ BinaryBlob
hashTreeToString (List tree )
→ String
Make a human readable string out of a hash tree.
@param tree
hashValue (dynamic value )
→ BinaryBlob
hexAddPrefix (String ? value )
→ String
hexFixLength (String value , {int bitLength = -1 , bool withPadding = false , bool include0x = true })
→ String
hexHasPrefix (String value )
→ bool
hexStripPrefix (String value )
→ String
hexToBn (dynamic value , {Endian endian = Endian.big , bool isNegative = false })
→ BigInt
hexToBytes (String hexStr )
→ List <int >
Converts the hexadecimal string, which can be prefixed with 0x,
to a byte sequence.
hexToNumber (dynamic value )
→ int ?
hexToPlainText (String hex )
→ String
hexToString (String value )
→ String
hexToU8a (String value , [int bitLength = -1 ])
→ Uint8List
value
should be 0x
hex string.
hexToU8aStream (String value )
→ Uint8List
httpCanisterUpdateId (Map update )
→ Uint8List
httpCanisterUpdateRepresentationIndependentHash (Map update )
→ Uint8List
httpReadStateRepresentationIndependentHash (Map readState )
→ Uint8List
idlDecode (List <CType > retTypes , Uint8List bytes )
→ List
Decode a binary value
@param retTypes - Types expected in the buffer.
@param bytes - hex-encoded string, or buffer.
@returns Value deserialized to JS type
idlEncode (List <CType > argTypes , List args )
→ BinaryBlob
Encode a array of values
@returns {Buffer} serialised value
idlHash (String s )
→ int
idlLabelToId (String label )
→ num
initCborSerializer ()
→ SelfDescribeEncoder
initCborSerializerNoHead ()
→ SelfDescribeEncoder
isAccountId (String str )
→ bool
isAddress (String str )
→ bool
isAscii (dynamic value )
→ bool
isBase64 (String value )
→ bool
isBech32 (String str )
→ bool
isByteString (String byStr , {required int length })
→ bool
isDelegationValid (DelegationChain chain , DelegationValidChecks ? checks )
→ bool
Analyze a DelegationChain and validate that it's valid, ie. not expired and
apply to the scope.
isDerPublicKey (Uint8List pub , Uint8List oid )
→ bool
isDerSignature (Uint8List sig )
→ bool
isHex (dynamic value , {int bits = -1 , bool ignoreLength = false })
→ bool
isIP (String value , String type )
→ bool
isJsonObject (dynamic value )
→ bool
isPrivateKey (String str )
→ bool
isPublicKey (String str )
→ bool
isSignature (String str )
→ bool
isTestChain (String value )
→ bool
isUrl (String url )
→ bool
isUtf8 (dynamic value )
→ bool
lebDecode <T > (BufferPipe <T > pipe )
→ BigInt
Decode a leb encoded buffer into a bigint. The number will always be positive
(does not support signed leb encoding).
lebEncode (dynamic value )
→ Uint8List
Encode a positive number (or bigint) into a Buffer. The number will be floored to the
nearest integer.
@param value The number to encode.
log2 (num x )
→ num
lookupPath (List path , List tree )
→ Uint8List ?
lookupPathEx (List path , List tree )
→ Uint8List ?
makeBigIntToString (Map input )
→ Map
makeNonce ()
→ Nonce
makeNonceTransform ([NonceFunc nonceFn = makeNonce ])
→ HttpAgentRequestTransformFnCall
makeReadStateFromUpdate (Map update )
→ Map <String , dynamic >
makeSignatureData (Uint8List messageId )
→ Uint8List
managementIDL ()
→ Service
maxAttempts (int count )
→ PollStrategy
mnemonicPhraseToSeed ({required PhraseToSeedReq req })
→ Future <Uint8List >
mnemonicSeedToKey ({required SeedToKeyReq req })
→ Future <Uint8List >
mnemonicToSeed (String phrase , {Language language = bip39.Language.english , String passphrase = '' })
→ Uint8List
nativeDeriveKey ({required String kdf , required List <int > iv , required String ? message , required Uint8List ? useCipherText , required Map <String , dynamic > kdfParams , required String salt , String ? passphrase })
→ Future <NativeDeriveKeyResult >
newtonIteration (BigInt n , BigInt x0 )
→ BigInt
numberToHex (dynamic number , {bool pad = false , bool include0x = false , int ? forcePadLen })
→ String
Converts the number
, which can either be a dart int or a BigInt ,
into a hexadecimal representation. The number needs to be positive or zero.
once ()
→ PollPredicate <bool >
p256FromSeed ({required P256FromSeedReq req })
→ Future <P256IdentityExport >
p256GetSharedSecret ({required P256ShareSecretReq req })
→ Future <Uint8List >
p256Sign ({required P256SignWithSeedReq req })
→ Future <SignatureFFI >
p256Verify ({required P256VerifyReq req })
→ Future <bool >
parseStringToU8a (String str )
→ Uint8List
parseUserNumber (String s )
→ BigInt ?
BigInt parses various things we do not want to allow, like:
pbkdf2DeriveKey ({required PBKDFDeriveReq req })
→ Future <KeyDerivedRes >
plainTextToHex (String plainText )
→ String
pollForResponse (Agent agent , Principal canisterId , RequestId requestId , PollStrategy strategy , String method , {BinaryBlob ? overrideCertificate })
→ Future <BinaryBlob >
randomAsHex ([int length = 32 ])
→ String
randomAsNumber ()
→ int
randomAsU8a ([int length = _defaultLength ])
→ Uint8List
readIntLE (BufferPipe pipe , int byteLength )
→ BigInt
readUIntLE (BufferPipe pipe , int byteLength )
→ BigInt
reconstruct (List t )
→ Future <Uint8List >
recoverSecp256k1PubKey (Uint8List preHashedMessage , Uint8List signature )
→ Future <Uint8List >
requestIdOf (Map <String , dynamic > request )
→ RequestId
Get the RequestId of the provided ic-ref request.
RequestId is the result of the representation-independent-hash function.
https://sdk.dfinity.org/docs/interface-spec/index.html#hash-of-map
@param request - ic-ref request to hash into RequestId
requestIdToHex (RequestId requestId )
→ String
safeRead <T > (BufferPipe <T > pipe , int ref )
→ List <T >
schnorrFromSeed ({required SchnorrFromSeedReq req })
→ Future <SchnorrIdentityExport >
schnorrSign ({required SchnorrSignWithSeedReq req })
→ Future <SignatureFFI >
schnorrVerify ({required SchnorrVerifyReq req })
→ Future <bool >
scryptDeriveKey ({required ScriptDeriveReq req })
→ Future <KeyDerivedRes >
secp256K1FromSeed ({required Secp256k1FromSeedReq req })
→ Future <Secp256k1IdentityExport >
secp256K1GetSharedSecret ({required Secp256k1ShareSecretReq req })
→ Future <Uint8List >
secp256k1KeyIdentityFromPem (String pem )
→ Future <Secp256k1KeyIdentity >
secp256K1Recover ({required Secp256k1RecoverReq req })
→ Future <Uint8List >
secp256K1Sign ({required Secp256k1SignWithSeedReq req })
→ Future <SignatureFFI >
secp256K1SignRecoverable ({required Secp256k1SignWithSeedReq req })
→ Future <SignatureFFI >
secp256K1SignWithRng ({required Secp256k1SignWithRngReq req })
→ Future <SignatureFFI >
secp256K1Verify ({required Secp256k1VerifyReq req })
→ Future <bool >
serializeValue (int major , int minor , String val )
→ ByteBuffer
sha224Hash (ByteBuffer buf )
→ Uint8List
sha256Chunks (List chunks )
→ Uint8List
sha256Hash (ByteBuffer buf )
→ Uint8List
signP256Async (Uint8List blob , Uint8List seed )
→ Future <Uint8List >
signSchnorrAsync (Uint8List blob , Uint8List seed , {Uint8List ? auxRand })
→ Future <Uint8List >
signSecp256k1 (String message , BinaryBlob secretKey )
→ Uint8List
signSecp256k1Async (Uint8List blob , Uint8List seed )
→ Future <Uint8List >
signSecp256k1Recoverable (Uint8List blob , Uint8List seed )
→ Future <Uint8List >
signSecp256k1WithRNG (Uint8List blob , Uint8List bytes )
→ Future <Uint8List >
slebDecode (BufferPipe pipe )
→ BigInt
Decode a leb encoded buffer into a bigint. The number is decoded with support for negative
signed-leb encoding.
@param pipe A Buffer containing the signed leb encoded bits.
slebEncode (Comparable value )
→ Uint8List
Encode a number (or bigint) into a Buffer, with support for negative numbers.
The number will be floored to the nearest integer.
@param value The number to encode.
stringShorten (String value , {int prefixLength = 6 })
→ String
stringToU8a (String msg , {String ? enc , bool useDartEncode = true })
→ Uint8List
strip0xHex (String hex )
→ String
textDecoder (Uint8List value )
→ String
textEncoder (String value )
→ Uint8List
throttlePolling (int throttleMilliseconds )
→ PollStrategy
Throttle polling.
@param throttleMilliseconds
timeout (Duration duration )
→ PollStrategy
toBech32Address (String address )
→ String
toBigEndianArray (int n )
→ Uint8List
Converts a 32-bit unsigned integer to a big endian byte array.
toReadableString (dynamic x )
→ String
transactionDecoder (String txnHash )
→ Map <String , dynamic >
transferCombine (Ed25519KeyIdentity identity , SignablePayload payloadsRes )
→ Future <CombineSignedTransactionResult >
tryToJson (CType type , dynamic value )
→ Uint8List ?
u8aConcat (List list )
→ Uint8List
u8aEq (Uint8List a , Uint8List b )
→ bool
u8aFixLength (Uint8List value , {int bitLength = -1 , bool atStart = false })
→ Uint8List
u8aSorted (List <Uint8List > u8as )
→ List <Uint8List >
u8aToBn (Uint8List u8a , {Endian endian = Endian.little , bool isNegative = false })
→ BigInt
u8aToBuffer (Uint8List u8a )
→ ByteBuffer
u8aToHex (Uint8List u8a , {bool include0x = true })
→ String
u8aToString (Uint8List u8a , {bool useDartEncode = false })
→ String
u8aToU8a (dynamic value , {bool useDartEncode = true })
→ Uint8List
validateMnemonic (String value , {Language language = bip39.Language.english , String passphrase = '' })
→ bool
verifyP256Async (Uint8List blob , Uint8List signature , P256PublicKey publicKey )
→ Future <bool >
verifySchnorrAsync (Uint8List blob , Uint8List signature , SchnorrPublicKey publicKey )
→ Future <bool >
verifySecp256k1 (String message , Uint8List signature , Secp256k1PublicKey publicKey )
→ bool
verifySecp256k1Blob (Uint8List blob , Uint8List signature , Secp256k1PublicKey publicKey )
→ bool
withRetry <T > (FutureOr <T > action (), {int retryTimes = 3 , int retryIntervalMills = 500 })
→ Future <T >
writeIntLE (dynamic value , int byteLength )
→ Uint8List
writeUIntLE (dynamic value , int byteLength )
→ Uint8List
zipWith <TX , TY , TR > (List <TX > xs , List <TY > ys , TR f (TX a , TY b ) )
→ List <TR >
Typedefs
ActorConstructor
= CanisterActor Function(ActorConfig config )
AuthFunction
= Future <String > Function(AuthPayload paylod )
BinaryBlob
= Uint8List
CreateActorMethod
= ActorMethod Function(Actor actor , String methodName , Func func )
DerEncodedBlob
= BinaryBlob
Envelope <T >
= UnSigned <T >
FetchFunction <T >
= Future <T > Function({dynamic body , required String endpoint , String ? host , FetchMethod method })
Func
= FuncClass
HttpAgentRequest
= HttpAgentBaseRequest <WithToJson >
HttpAgentRequestTransformFnCall
= Future <HttpAgentRequest ? > Function(HttpAgentRequest args )
MethodCaller
= Future Function(CallConfig options , List args )
Nonce
= BinaryBlob
NonceFunc
= Nonce Function()
Opt <T >
= OptClass <T >
Pipe <T >
= BufferPipe <T >
PollPredicate <T >
= Future <T > Function(Principal canisterId , RequestId requestId , RequestStatusResponseStatus status )
PollStrategy
= Future <void > Function(Principal canisterId , RequestId requestId , RequestStatusResponseStatus status )
PollStrategyFactory
= PollStrategy Function()
PrincipalId
= Principal
ReadRequest
= ReadStateRequest
Rec <T >
= RecClass <T >
Record
= RecordClass
RequestId
= BinaryBlob
Service
= ServiceClass
SigningCallback
= void Function([dynamic data ])
SigningFunc
= Future <Uint8List > Function(Uint8List blob , Uint8List seed )
Tuple <T >
= TupleClass <List >
Variant
= VariantClass
Vec <T >
= VecClass <T >
VerifyFunc
= Future <bool > Function(Uint8List blob , Uint8List signature , P256PublicKey publicKey )