transaction library

The cryptocurrencies that support transaction assembly are listed.

Classes

AbiDecoder
ABI decoder for Ethereum smart contract function calls
AbiUtil
Function for encode eth function, support rawEncode, encodeSingle.
AccountMeta
Account Meta
Action
near transaction action type, require Transfer or FunctionCall and enumValue.
AddressLookupTableAccount
Address Lookup Table Account
AddressLookupTableState
Address Lookup Table State
AlgoTxData
AlgoTxData requires transaction, to_sign, to_sign is the parameter to be signed.
AlgoTxSigner
Require AlgoTxData and wallet.
AlphTxData
AlphTxData requires unsignedTx, txId, txId is the parameter to be signed.
AlphTxSigner
Require AlphTxData and wallet.
AptosTxData
AptosTxData requires to_sign_message, transaction, to_sign_message is the parameter to be signed.
AptosTxSigner
Require AptosTxData and wallet.
Btcb2SighashInput
Btcb2SignedTransaction
A fully signed BTCB2 transaction ready for broadcasting by the caller.
Btcb2SpentOutput
A previous or new transaction output used by the UNIFIED sighash.
Btcb2TransactionAssembler
Builds and signs the validated service-provided BTCB2 assembly state.
Btcb2TransactionAssemblyData
Fully validated, deterministic BTCB2 transaction assembly returned by the service. The signing digest is always recomputed locally from this data.
Btcb2TransactionDraft
Unsigned transaction plus the exact UNIFIED digests to be signed.
Btcb2TransactionFee
Fee selected by the service for an assembled BTCB2 transaction.
Btcb2TransactionInput
One input returned by the BTCB2 transaction assembly endpoint.
Btcb2TransactionOutput
One output returned by the BTCB2 transaction assembly endpoint.
Btcb2UnifiedSighash
BTCB2's post-activation UNIFIED signature-hash algorithm.
BtcTransferInfo
Buffer
Buffer
BufferReader
Buffer Reader
BufferReaderIterator
Buffer Reader Iterator
BufferWriter
Buffer Writer
ByteLength
Byte Length
CkbTxData
CkbTxData requires version, hash, cellDeps, headerDeps, inputs, outputs, outputsData, witnesses getMessage is the parameter to be signed.
CkbTxSigner
Require CkbTxData and wallet.
CosmosTxData
CosmosTxData requires msgs, data, config, memo, fee msgs is the parameter to be signed.
CosmosTxSigner
Require CosmosTxData and wallet.
Decoded
Ed25519Keypair
Ed25519 Keypair
Eip1559TxData
EIP712Domain
For typed data EIP712 domain.
EIP712TypedData
For typed data V1
Eip7702Authorization
Eip7702TxData
EthDataDecoder
EthTxData
EthTxDataRaw
EthTxSigner
Require EthTxData and wallet.
FilTransaction
FilTxData
FilTxData requires transaction, to_sign, to_sign is the parameter to be signed.
FilTxSigner
Require FilTxData and wallet.
FunctionCall
GsplItem
GsplTxData
GsplTxSigner
IcpTxData
IcpTxData requires transaction, to_sign, to_sign is the parameter to be signed.
IcpTxSigner
Require IcpTxData and wallet.
Input
KasTxData
KasTxData requires version, inputs, outputs, lockTime, subnetworkId, allowOrphan inputs is the parameter to be signed.
KasTxSigner
Require KasTxData and wallet.
Keypair
Keypair
LegacyTxData
Message
Message
MessageHeader
Message Header
MessageInstruction
Message Instruction
NaClDetached
NaCl Detached
NaClKeypair
NaCl Keypair
NaClSign
NaCl Sign
NearTransferType
NearTxData
NearTxData requires transaction, hash, hash is the parameter to be signed.
NearTxSigner
Require NearTxData and wallet.
Output
PreviousOutpoint
Program
Program
PSBTSigner
PsbtTxData
PsbtTxSigner
PSBT transaction signer for Bitcoin Legacy and Taproot transactions
Pubkey
Public Key
PublicKey
ScGoFfiBridge
FFI bridge over the native SC signing library.
ScpCoveredFields
ScpDigestResult
Data models for SCP (SiaCoin Prime) transactions.
ScPolicy
ScPolicyDetail
ScpSiacoinInput
ScpSiacoinOutput
ScpSigHash
Pure-Dart implementation of the SCP V2 signing digest (scpSigHash).
ScpTransactionSignature
ScpTxData
Holds the assembled SCP transaction plus the signing digests.
ScpTxSigner
Signs a ScpTxData by producing Ed25519 signatures for each digest in ScpTxData.toSign and writing them into the transaction's transactionSignatures[*].signature slots (base64-encoded).
ScpUnlockConditions
ScpUnsignedTransaction
Raw unsigned transaction input from the SCP API.
ScriptPublicKey
ScSatisfiedPolicy
ScStateElement
ScTransactionBuilder
Assembles an SC transaction through the signing-digest pipeline.
ScTxData
Holds the assembled SC transaction plus the signing digests.
ScTxSigner
Signs a ScTxData by producing Ed25519 signatures for each digest in ScTxData.toSign and writing them into the V2 transaction's satisfiedPolicy.signatures slots.
ScUnsignedParent
ScUnsignedSiacoinInput
ScUnsignedSiacoinOutput
ScUnsignedTransaction
Raw unsigned transaction input for the SC WASM module (sc.wasm).
ScV2SemanticBridge
Optional semantic-signing capability implemented by the bundled SC bridges. It is separate from ScWasmBridge so existing custom bridges that only implement full transaction construction remain source-compatible.
ScV2SemanticOutput
A normalized SC V2 siacoin output safe to display before signing.
ScV2TransactionSemantics
Canonical, key-free SC V2 transaction semantics and its signing digest.
ScWasmBridge
Bridge for computing SC transaction signing digests.
ScWasmBridgeBase
Base ScWasmBridge that serializes the unsigned transaction to JSON and delegates the actual digest computation to processJson.
ScWasmIsolateBridge
Runs SC WASM work outside the caller's isolate.
ScWasmResult
Result from the SC WASM after processing a ScUnsignedTransaction.
ScWasmRunBridge
Signer
Signer
SolanaTransaction
Transaction
SolTxData
SolTxData requires initTokenAddress, transaction, blockhash, lastValidBlockHeight, fee transaction is the parameter to be signed.
SolTxDataV2
Provide another way to get SolTxData
SolTxSigner
Require SolTxData and wallet.
SolTxSignerV2
Provide another way to sign sol message.
Transaction
TransactionInstruction
Transaction Instruction
Transfer
TxNetwork
TypedDataField
For typed data field, require name and type.
TypedDataUtil
Utils for typed data.
TypedMessage
For typed data V3, V4
XrpAmount
XrpAmountType
XrpTokenAmount
XRPTransaction
The base class for all transaction types https://xrpl.org/transaction-types.html. Represents fields common to all transaction types https://xrpl.org/transaction-common-fields.html.
XrpTransactionType
XrpTxData
XrpTxData requires account, transactionType, destination, amount, limitAmount, sequence, fee, lastLedgerSequence XrpTxData is the parameter to be signed.
XrpTxSigner
Require XrpTxData and wallet.

Enums

BtcSignDataType
BtcTxType
BufferEncoding
Buffer Encoding
EthTxType
TypedDataVersion
data version include V1, V3 and V4.

Constants

maxSeedLength → const int
The Maximum lengthin bytes of derived public key seed.
pubkeyLength → const int
NaCl
scV2MaxSemanticTransactionBytes → const int
Maximum semantic payload accepted by the SC V2 UR wire protocol.
scV2SiacoinTransferProfile → const String
The only SC V2 semantic signing profile currently supported.
seckeyLength → const int
Secret key length in bytes.
sign → const NaClSign
NaCl Sign singleton.
signatureLength → const int
Signature length in bytes.
TRANSACTION_TYPE → const int

Properties

EIP7702_MAGIC → String
final
TRANSACTION_TYPE_BUFFER → Uint8List
final

Functions

bufferToHex(Uint8List buf) → String
Converts a Uint8List into a hex String.
concatSig(Uint8List r, Uint8List s, Uint8List v) → String
concatSigCompact(Uint8List r, Uint8List s) → String
decode(Uint8List input, [bool stream = false]) → dynamic
decodeLength(BufferReader reader) → int
Returns the short-vec encoded length.
encode(dynamic input) → Uint8List
encodeLength(int length, int offset) → Uint8List
hashPersonalMessage(dynamic message) → Uint8List
Returns the keccak-256 hash of message, prefixed with the header used by the eth_sign RPC call. The output of this function can be fed into ecsign to produce the same signature as the eth_sign call for a given message, or fed to ecrecover along with a signature to recover the public key used to produce the signature.
intToBuffer(dynamic i) → Uint8List
Converts an int or BigInt to a Uint8List
intToHex(dynamic i) → String
Converts a int into a hex String
keccak(dynamic a, {int bits = 256}) → Uint8List
Creates Keccak hash of the input
padToEven(String value) → String
Pads a String to have an even length
safeParseInt(String v, [int base = 10]) → int
signToCompact({required Uint8List message, required Uint8List privateKey}) → String
signTypedData({required Uint8List privateKey, required String jsonData, required TypedDataVersion version}) → String
Sign typed data, support all versions
signTypedDataCompact({required Uint8List privateKey, required String jsonData, required TypedDataVersion version}) → String
Sign typed data compact, support all versions
stripHexPrefix(String str) → String
toBuffer(dynamic v) → Uint8List

Typedefs

ScWasmLoader = Future<Uint8List> Function()
Loads the bundled SC WASM bytes.