dataformat library
TON-specific data formats
Classes
- ABIArgument
- ABIError
- ({String message})
- ABIField
- ABIGetter
- ABIReceiver
- Either a ABIRInternal or ABIRExternal
- ABIReceiverMessage
- Either of: ABIRmTyped, ABIRmAny, ABIRmEmpty or ABIRmText
- ABIRExternal
- ({ABIReceiverMessage message})
- ABIRInternal
- ({ABIReceiverMessage message})
- ABIRmAny
- ABIRmEmpty
- ABIRmText
- ABIRmTyped
- ABITrDict
- ({String key, String value, StringIntBool? format, StringIntBool? keyFormat, StringIntBool? valueFormat})
- ABITrSimple
- ({String type, bool? optional, StringIntBool? format})
- ABIType
- ABITypeRef
- Either a ABITrSimple or ABITrDict
- AccountStatus
- Either of: AsUninitialized, AsFrozen, AsActive, AsNonExisting
- AccountStatusChange
- Either of: AscUnchanged, AscFrozen, AscDeleted
- Address
- Either of: InternalAddress or ExternalAddress
- AddressParams
- (bool isBounceable, bool isTestOnly, InternalAddress address)
- AsActive
- Empty class, used as a type name
- AscDeleted
- Empty class, used as a type name
- AscFrozen
- Empty class, used as a type name
- AscUnchanged
- Empty class, used as a type name
- AsFrozen
- Empty class, used as a type name
- AsNonExisting
- Empty class, used as a type name
- AsUnitialized
- Empty class, used as a type name
- BitBuilder
- Uses Uint8List for working with BitStrings
- BitReader
- Used for reading BitStrings
- BitString
- BitString in Uint8List with an offset and a length
- Builder
- Builder for Cells
- Cell
- Cell, as described in TVM spec
- CmiExternalIn
-
({ ExternalAddress? src, InternalAddress dest, BigInt importFee, })
- CmiExternalOut
-
({ InternalAddress src, ExternalAddress? dest, BigInt createdLt, int createdAt, })
- CmiInternal
-
({ bool ihrDisabled, bool bounce, bool bounced, InternalAddress src, InternalAddress dest, CurrencyCollection value, BigInt ihrFee, BigInt forwardFee, BigInt createdLt, int createdAt, })
- CmirExternalOut
-
({ InternalAddress? src, ExternalAddress? dest, BigInt createdLt, int createdAt, })
- CmirInternal
-
({ bool ihrDisabled, bool bounce, bool bounced, InternalAddress? src, InternalAddress dest, CurrencyCollection value, BigInt ihrFee, BigInt forwardFee, BigInt createdLt, int createdAt, })
- CommonMessageInfo
- Either of: CmiInternal, CmiExternalIn, CmiExternalOut
- CommonMessageInfoRelaxed
- Either of: CmirInternal, CmirExternalOut
- ComputeSkipReason
- Either of: CsrNoState, CsrBadState, CsrNoGas
- Contract
-
ContractProvider? provider; late InternalAddress address; ContractInit? init; ContractABI? abi;
- ContractABI
- ({String? name, List
- ContractGetMethodResult
-
({ TupleReader stack, BigInt? gasUsed, String? logs, })
- ContractInit
- ({Cell code, Cell data})
- ContractMaybeInit
- ({Cell? code, Cell? data})
- ContractProvider
-
(Future<ContractState> Function() getState, Future<ContractGetMethodResult> Function(String name, List<TupleItem> args) get, Future<void> Function(Cell message) external, Future<void> Function( Sender via, { required StringBigInt value, bool? bounce, SendMode? sendMode, StringCell? body, }) internal)
- ContractState
- ContractStateLast
- ({BigInt lt, Uint8List hash})
- ContractStateType
- Either CstUninit, CstActive or CstFrozen
- CsrBadState
- Empty class, used as a type
- CsrNoGas
- Empty class, used as a type
- CsrNoState
- Empty class, used as a type
- CstActive
- CstFrozen
- CstUninit
- CurrencyCollection
-
Dictionary<
K extends DictionaryKeyType, V> - Dictionary/HashMap
-
DictionaryKey<
K extends DictionaryKeyType> -
({ int bits, BigInt Function(K src) serialize, K Function(BigInt src) parse, })
- DictionaryKeyType
- Either of: DktInternalAddress, DktInt, DktBigInt or DktUint8List
-
DictionaryValue<
V> -
({ void Function(V src, Builder builder) serialize, V Function(Slice src) parse, })
- DktBigInt
- Wrapper around BigInt, has only one field: BigInt key
- DktInt
- Wrapper around int, has only one field: int key
- DktInternalAddress
- Wrapper around InternalAddress, has only one field: InternalAddress key
- DktUint8List
- Wrapper around Uint8List, has only one field: Uint8List key
- ExternalAddress
- Class for working with External Addresses
- HashUpdate
-
({ Uint8List oldHash, Uint8List newHash, })
- InternalAddress
- Message
-
({ CommonMessageInfo info, StateInit? init, Cell body, })
- MessageRelaxed
-
({ CommonMessageInfoRelaxed info, StateInit? init, Cell body, })
- Nano
- For converting to and from nano values
- SbiBigInt
- Subtype of StringBigInt union type (sealed class) with BigInt value
- SbiString
- Subtype of StringBigInt union type (sealed class) with String value
- ScCell
- Subtype of StringCell union type (sealed class) with Cell value
- ScString
- Subtype of StringCell union type (sealed class) with String value
- Sender
- SenderArguments
- SendMode
- Enum-like type
- SiaInternalAddress
- Subtype of StringInternalAddress union type (sealed class) with InternalAddress value
- SiaString
- Subtype of StringInternalAddress union type (sealed class) with String value
- SibBool
- Subtype of StringIntBool union type (sealed class) with bool value
- SibInt
- Subtype of StringIntBool union type (sealed class) with int value
- SibString
- Subtype of StringIntBool union type (sealed class) with String value
- SimpleLibrary
- (bool public, Cell root)
- Slice
- Slice is used for reading Cell data
- SplitMergeInfo
- StateInit
-
([int? splitDepth, TickTock? special, Cell? code, Cell? data, Dictionary<DktBigInt, SimpleLibrary>? libraries])
- StorageUsedShort
-
({ BigInt cells, BigInt bits, })
- StringBigInt
- String | BigInt value Either of: SbiString, SbiBigInt
- StringCell
- String | Cell value Either of: ScString, ScCell
- StringIntBool
- String | int | bool value Either of: SibString, SibInt, SibBool
- StringInternalAddress
- String | InternalAddress value Either of: SiaString, SiaInternalAddress
- TbpNegativeFunds
- Empty class, used as a type name
- TbpNoFunds
-
({ StorageUsedShort messageSize, BigInt requiredForwardFees, })
- TbpOk
-
({ StorageUsedShort messageSize, BigInt messageFees, BigInt forwardFees, })
- TcpSkipped
- ({ ComputeSkipReason reason })
- TcpVm
-
({ bool success, bool messageStateUsed, bool accountActivated, BigInt gasFees, BigInt gasUsed, BigInt gasLimit, BigInt? gasCredit, int mode, int exitCode, int? exitArg, int vmSteps, BigInt vmInitStateHash, BigInt vmFinalStateHash, })
- TdGeneric
-
({ bool creditFirst, TransactionStoragePhase? storagePhase, TransactionCreditPhase? creditPhase, TransactionComputePhase computePhase, TransactionActionPhase? actionPhase, bool aborted, TransactionBouncePhase? bouncePhase, bool destroyed, })
- TdMergeInstall
-
({ SplitMergeInfo splitInfo, Transaction prepareTransaction, TransactionStoragePhase? storagePhase, TransactionCreditPhase? creditPhase, TransactionComputePhase computePhase, TransactionActionPhase? actionPhase, bool aborted, bool destroyed, })
- TdMergePrepare
-
({ SplitMergeInfo splitInfo, TransactionStoragePhase storagePhase, bool aborted, })
- TdSplitInstall
-
({ SplitMergeInfo splitInfo, Transaction prepareTransaction, bool installed, })
- TdSplitPrepare
-
({ SplitMergeInfo splitInfo, TransactionStoragePhase? storagePhase, TransactionComputePhase computePhase, TransactionActionPhase? actionPhase, bool aborted, bool destroyed, })
- TdStorage
-
({ TransactionStoragePhase storagePhase, })
- TdTickTock
-
({ bool isTock, TransactionStoragePhase storagePhase, TransactionComputePhase computePhase, TransactionActionPhase? actionPhase, bool aborted, bool destroyed, })
- TiBuilder
- TupleItemBuilder with Cell cell field
- TiCell
- TupleItemCell with Cell cell field
- TickTock
- (bool tick, bool tock)
- TiInt
- TupleItemInt with BigInt value field
- TiNan
- TupleItemNan
- TiNull
- TupleItemNull
- TiSlice
- TupleItemTuple with Cell cell field
- TiTuple
- TupleItemTuple with List
- Transaction
-
({ BigInt address, BigInt lt, BigInt prevTransactionHash, BigInt prevTransactionLt, int now, int outMessagesCount, AccountStatus oldStatus, AccountStatus endStatus, Message? inMessage, Dictionary<DktInt, Message> outMessages, CurrencyCollection totalFees, HashUpdate stateUpdate, TransactionDescription description, })
- TransactionActionPhase
-
({ bool success, bool valid, bool noFunds, AccountStatusChange statusChange, BigInt? totalForwardFees, BigInt? totalActionFees, int resultCode, int? resultArg, int totalActions, int specActions, int skippedActions, int messagesCreated, BigInt actionListHash, StorageUsedShort totalMessageSize, })
- TransactionBouncePhase
- Either of: TbpNegativeFunds, TbpNoFunds, TbpOk
- TransactionComputePhase
- Either of: TcpSkipped, TcpVm
- TransactionCreditPhase
-
({ BigInt? dueFeesCollected, CurrencyCollection credit, })
- TransactionDescription
- Either of: TdGeneric, TdStorage, TdTickTock, TdSplitPrepare, TdSplitInstall, TdMergePrepare, TdMergeInstall
- TransactionStoragePhase
-
({ BigInt storageFeesCollected, BigInt? storageFeesDue, AccountStatusChange statusChange, })
- TupleBuilder
- TupleItem
- Base class for all tuple items (Ti's)
- TupleReader
- Writable
- Writable type
Enums
- CellType
- Cell types, either of: ordinary, prunedBranch, library, merkleProof, merkleUpdate
Functions
-
address(
String src) → InternalAddress -
beginCell(
) → Builder - Returns a new Builder for Cells
-
comment(
String src) → Cell -
contractAddress(
int workChain, StateInit init) → InternalAddress -
exoticMerkleProof(
BitString bits, List< Cell> refs) → ({int proofDepth, Uint8List proofHash}) - Returns a record of proofDepth as int, proofHash as Uint8List for one reference in Merkle Proof cell
-
exoticMerkleUpdate(
BitString bits, List< Cell> refs) → ({int proofDepth1, int proofDepth2, Uint8List proofHash1, Uint8List proofHash2}) - Returns a record of two proofDepth as int, proofHash as Uint8List, with one for each referenced in Merkle Update cell
-
exoticPruned(
BitString bits, List< Cell> refs) → ExoticPruned - Returns a ExoticPruned representation of a passed Cell of bits and refs
-
external(
{required StringInternalAddress to, ContractMaybeInit? init, Cell? body}) → Message -
internal(
{required StringInternalAddress to, required StringBigInt value, bool? bounce, ContractMaybeInit? init, StringCell? body}) → MessageRelaxed -
loadAccountStatus(
Slice slice) → AccountStatus -
Returns an AccountStatus from the Slice
slice
-
loadAccountStatusChange(
Slice slice) → AccountStatusChange -
loadCommonMessageInfo(
Slice slice) → CommonMessageInfo -
loadCommonMessageInfoRelaxed(
Slice slice) → CommonMessageInfoRelaxed -
loadComputeSkipReason(
Slice slice) → ComputeSkipReason - Throws 'Unknown ComputeSkipReason...' if it's not one of: CsrNoState, CsrBadState, CsrNoGas
-
loadCurrencyCollection(
Slice slice) → CurrencyCollection -
loadHashUpdate(
Slice slice) → dynamic - Throws 'Invalid data' if the loaded uint of 8 bits != 0x72
-
loadMessage(
Slice slice) → Message -
loadMessageRelaxed(
Slice slice) → MessageRelaxed -
loadSimpleLibrary(
Slice slice) → SimpleLibrary -
loadSplitMergeInfo(
Slice slice) → SplitMergeInfo -
loadStateInit(
Slice slice) → StateInit -
loadStorageUsedShort(
Slice slice) → StorageUsedShort -
loadTickTock(
Slice slice) → TickTock -
loadTransaction(
Slice slice) → Transaction - Throws 'Invalid data' if read uint of 4 bits != 0x07
-
loadTransactionActionPhase(
Slice slice) → TransactionActionPhase -
loadTransactionBouncePhase(
Slice slice) → TransactionBouncePhase -
loadTransactionComputePhase(
Slice slice) → TransactionComputePhase -
loadTransactionCreditPhase(
Slice slice) → dynamic -
loadTransactionDescription(
Slice slice) → TransactionDescription - Throws 'Unsupported transaction...' on unsupported transaction description type
-
loadTransactionStoragePhase(
Slice slice) → TransactionStoragePhase -
parseTuple(
Cell src) → List< TupleItem> - Returns a List
-
serializeTuple(
List< TupleItem> src) → Cell - Returns a Cell out of the List
-
storeAccountStatus(
AccountStatus src) → Builder Function(Builder builder) -
Returns a Function from AccountStatus
src
, which, when called, would store account status to builder and return back the builder -
storeAccountStatusChange(
AccountStatusChange src) → void Function(Builder builder) -
storeCommonMessageInfo(
CommonMessageInfo source) → void Function(Builder builder) -
storeCommonMessageInfoRelaxed(
CommonMessageInfoRelaxed source) → void Function(Builder builder) -
storeComputeSkipReason(
ComputeSkipReason src) → void Function(Builder builder) -
storeCurrencyCollection(
CurrencyCollection collection) → void Function(Builder builder) -
storeHashUpdate(
HashUpdate src) → void Function(Builder builder) -
storeMessage(
Message message, {bool forceRef = false}) → void Function(Builder builder) -
storeMessageRelaxed(
MessageRelaxed message, {bool forceRef = false}) → void Function(Builder builder) -
storeSimpleLibrary(
SimpleLibrary src) → void Function(Builder builder) -
storeSplitMergeInfo(
SplitMergeInfo src) → void Function(Builder builder) -
storeStateInit(
StateInit src) → void Function(Builder builder) -
storeStorageUsedShort(
StorageUsedShort src) → void Function(Builder builder) -
storeTickTock(
TickTock src) → void Function(Builder builder) -
storeTransaction(
Transaction src) → void Function(Builder builder) -
storeTransactionActionPhase(
TransactionActionPhase src) → void Function(Builder builder) -
storeTransactionBouncePhase(
TransactionBouncePhase src) → void Function(Builder builder) -
storeTransactionComputePhase(
TransactionComputePhase src) → void Function(Builder builder) -
storeTransactionCreditPhase(
TransactionCreditPhase src) → void Function(Builder builder) -
storeTransactionDescription(
TransactionDescription src) → void Function(Builder builder) -
storeTransactionStoragePhase(
TransactionStoragePhase src) → void Function(Builder builder)