sui
library
Functions
argumentToGrpcArgument (Map <String , dynamic > arg )
→ Argument
asIndices (int bitmap )
→ Uint8List
base64UrlCharTo6Bits (String base64UrlChar )
→ List <int >
base64UrlStringToBitVector (String base64UrlString )
→ List <int >
bytesEqual (Uint8List a , Uint8List b )
→ bool
callArgToGrpcInput (Map <String , dynamic > arg )
→ Input
chunk <T > (List <T > arr , int size )
→ List <List <T > >
commandToGrpcCommand (Map cmd )
→ Command
computeZkLoginAddressFromSeed (BigInt addressSeed , String iss )
→ String
decodeBase64URL (String s , int i )
→ String
decodeBigIntToUnsigned (List <int > magnitude )
→ BigInt
decodeSuiPrivateKey (String value )
→ (SignatureScheme , Uint8List )
This returns an ParsedKeypair object based by validating the
33-byte Bech32 encoded string starting with suiprivkey, and
parse out the signature scheme and the private key in bytes.
deriveDynamicFieldId ({required String parentObjectId , required String keyTypeTag , required Uint8List keyBcs })
→ String
Deterministic UID of a dynamic field. Lets callers getObject(uid)
directly instead of paginating listDynamicFields.
encodeBigInt (BigInt ? number )
→ Uint8List
encodeBigIntAsUnsigned (BigInt number )
→ Uint8List
encodeSuiPrivateKey (Uint8List bytes , SignatureScheme scheme )
→ String
This returns a Bech32 encoded string starting with suiprivkey,
encoding 33-byte flag || bytes for the given the 32-byte private
key and its signature scheme.
expectClient (BuildOptions options )
→ SuiClient
findFirstNonZeroIndex (Uint8List bytes )
→ int
generateMnemonic ({int strength = 128 })
→ String
getHexByteLength (String value )
→ int
getIdFromCallArg (dynamic arg )
→ dynamic
getMoveObject (dynamic data )
→ SuiMoveObject ?
getMoveObjectType (SuiObjectResponse resp )
→ String ?
getMovePackageContent (dynamic data )
→ dynamic
getObjectDeletedResponse (SuiObjectResponse resp )
→ SuiObjectRef ?
getObjectFields (dynamic resp )
→ dynamic
getObjectOwner (SuiObjectResponse resp )
→ ObjectOwner ?
getObjectPreviousTransactionDigest (SuiObjectResponse resp )
→ TransactionDigest ?
getObjectReference (SuiObjectResponse resp )
→ SuiObjectRef ?
getObjectType (SuiObjectResponse resp )
→ String ?
getObjectVersion (dynamic data )
→ int ?
getRandom ()
→ FortunaRandom
getSharedObjectInitialVersion (SuiObjectResponse resp )
→ int ?
getSharedObjectInput (dynamic arg )
→ dynamic
getSuiObjectData (SuiObjectResponse resp )
→ SuiObject ?
getTransactionKind (SuiTransactionBlockResponse data )
→ dynamic
getZkLoginSignature (ZkLoginSignature signature )
→ String
getZkLoginSignatureBytes (ZkLoginSignature signature )
→ Uint8List
hasPublicTransfer (dynamic data )
→ bool
isHex (String value )
→ bool
isImmutableObject (SuiObjectResponse resp )
→ bool
isMutableSharedObjectInput (dynamic arg )
→ bool
isSharedObject (SuiObjectResponse resp )
→ bool
isSharedObjectInput (dynamic arg )
→ bool
isSuiObjectResponse (SuiObjectResponse resp )
→ bool
isValidBIP32Path (String path )
→ bool
Parse and validate a path that is compliant to BIP-32 in form m/54'/784'/{account_index}'/{change_index}/{address_index}
for Secp256k1 and m/74'/784'/{account_index}'/{change_index}/{address_index} for Secp256r1.
isValidHardenedPath (String path )
→ bool
Parse and validate a path that is compliant to SLIP-0010 in form m/44'/784'/{account_index}'/{change_index}'/{address_index}'.
isValidMnemonics (String mnemonics )
→ bool
isValidSuiAddress (String value )
→ bool
isValidSuiNSName (String name )
→ bool
isValidSuiObjectId (String value )
→ bool
isValidTransactionDigest (String value )
→ bool
mnemonicToSeed (String mnemonics )
→ Uint8List
Uses KDF to derive 64 bytes of key data from mnemonic with empty password.
mnemonicToSeedHex (String mnemonics )
→ String
Derive the seed in hex format from mnemonic with empty password.
normalizeStructTag (StructTag type )
→ String
normalizeStructTagString (String type )
→ String
normalizeSuiAddress (String value , [bool forceAdd0x = false ])
→ String
Perform the following operations:
normalizeSuiNSName (String name , [SuiNSType format = SuiNSType.at ])
→ String
normalizeSuiObjectId (String value , [bool forceAdd0x = false ])
→ String
padLeftUint8List (Uint8List data , [int len = 32 ])
→ Uint8List
parsePartialSignatures (MultiSigStruct multisig )
→ List <ParsedPartialMultiSigSignature >
Parse multisig structure into an array of individual signatures: signature scheme, the actual individual signature, public key and its weight.
parseSerializedSignature (String serializedSignature )
→ SignaturePubkeyPair
parseStructTag (String type )
→ StructTag
parseTypeTag (String type )
→ dynamic
parseZkLoginSignature (Uint8List signature )
→ ZkLoginDeserializedSignature
prepareSuiAddress (String address )
→ String
publicKeyFromRawBytes (String signatureScheme , Uint8List bytes )
→ PublicKey
splitGenericParameters (String str , [(String , String ) genericSeparators = ('<', '>') ])
→ List <String >
toBigEndianBytes (BigInt num , int width )
→ Uint8List
Derive bytearray from num where the bytearray is not padded with 0.
toIterableGrpcArguments (List ? args )
→ List <Argument >
toPaddedBigEndianBytes (BigInt num , int width )
→ Uint8List
Derive bytearray from num where the bytearray is padded to the left with 0s to the specified width.
toSerializedSignature (SignatureScheme signatureScheme , Uint8List signature , PublicKey pubKey )
→ String
toZkLoginPublicIdentifier (BigInt addressSeed , String iss )
→ ZkLoginPublicIdentifier
transactionDataToGrpcTransaction (TransactionData data )
→ Transaction
verifyExtendedClaim (String claim )
→ (dynamic , dynamic )