brambldart library

Classes

AbstractTransactionUpdateFetcher
AddressChain
Addresses
BIP-0044 Multi-Account Hierarchy for Deterministic Wallets is a Bitcoin standard defining a structure and algorithm to build a hierarchy tree of keys from a single root private key. Note that this is the derivation scheme used by Icarus / Yoroi.
AddressesImpl
AddressGenerator
Class that will be used by the Credential Manager to generate addresses
Amount
ApiKeyAuthInterceptor
ArbitAmount
Utility class to easily convert amounts of Arbit into different units of quantities.
ArbitAmountConverter
ArbitAmountNullableConverter
ArbitBox
Box that contains arbits as well as the ArbitBox that it is owned by a particular address
ArbitTransaction
AssetAmount
Utility class to deserialize asset quantities. This may be updated as we understand more about the use cases for assets
AssetAmountConverter
AssetBox
Box that contains assets which is owned by a particular address
AssetCode
AssetCode serves as a unique identifier for user issued assets
AssetRecipient
AssetTransaction
AuthInterceptor
Balance
The amounts for polys and arbits are displayed as 10^-9 of the respective denomination
Base16Data
Byte data represented by Base-16 (Hex) encoded text. @param value the data bytes
Base58Data
Byte data represented by Base-58 encoded text. @param value the underlying bytes data
BifrostDateTime
Convert Bifrost block time (secondsSinceEpoch in UTC) to DateTime and back.
BifrostDateTimeDecoder
BifrostDateTimeEncoder
Bip32KeyPair
Block
BlockNum
For operations that are reading data from the blockchain without making a transaction that would modify it, the Bifrost client can read that data from previous states of the blockchain as well. This class specifies which state to use.
BlockResponse
Box<T>
BoxId<T>
BoxIdConverter
BramblClient
Class for sending requests over an HTTP JSON-RPC API endpoint to Bifrost nodes. You will instead have to obtain private keys of addresses yourself before transactions can be created.
ByteListConverter
Credentials
Anything that can sign payloads with a private key.
CredentialsWithKnownAddress
Credentials where the address is known synchronously.
CustomTransactionSender
Interface for Credentials that don't sign transactions locally, for instance because the private key is not known to this library.
DateTimeConverter
Digest
Evidence
ExpensiveOperations
Wrapper around some potentially expensive operations so that they can optionally be executed in a background isolate. This is mainly needed for flutter apps where these would otherwise block the UI thread.
GenericBox<T>
HdWallet
BIP-0044 Multi-Account Hierarchy for Deterministic Wallets is a Bitcoin standard defining a structure and algorithm to build a hierarchy tree of keys from a single root private key. Note that this is the derivation scheme used by Icarus / Yoroi which are Cardano wallets.
JsonRPC
KeyStore
Represents a key store file. KeyStores are used to securely store credentials like a private key belonging to a Topl address. The private key in a keystore is encrypted with a secret password that needs to be known in order to obtain the private key.
Latin1Converter
Latin1Data
Byte data represented by Latin-1 encoded text. @param value the data bytes
Latin1NullableConverter
ModifierId
ModifierIdConverter
Network
NodeViewModifier
It is supposed that all the modifiers (offchain transactions, blocks, blockheaders etc) have identifiers of the some length fixed with the ModifierIdSize constant
Polling
PolyAmount
Utility class to easily convert amounts of Poly into different units of quantities.
PolyAmountConverter
PolyAmountNullableConverter
PolyBox
Box that contains polys which is owned by a particular address
PolyFormatter
POLY-specific currency formatter that expects all currency to be in nanopoly and converts it to poly (1 POLY = 1,000,000,000 nanopoly). Compact formatters replace groups of zeros with quantity abbreviation suffixes (i.e. K=thousond, M=million, B=billion & T=trillion). The simple formatters group zeros into threes. Decimal digits defaults to 6 places. The currency factory method allows complete customization.
PolyTransaction
Proposition
Propositions are challenges that must be satisfied by the prover. In most cases, propositions are used by transactions issuers (spenders) to prove the right to use a UTXO in a transaction.
PropositionConverter
PropositionType
RetryInterceptor
An interceptor that will try to send failed request again
RetryOptions
RPCResponse
Response from the server to an rpc request. Contains the id of the request and the corresponding result as sent by the server.
SecurityRoot
Seed
Seed used to generate the root private key of the HD.
Sender
SignatureContainer
SignatureConverter
SimpleRecipient
TokenBox
ToplAddress
The abstract class of a Topl Address that contains all of the components to generate a Topl Address see
ToplAddressConverter
ToplAddressNullableConverter
ToplSigningKey
Credentials that can sign payloads with a Topl private key.
Transaction
TransactionReceipt
Uint8ListConverter

Enums

AddressType
Address format
ArbitUnit
PolyUnit

Constants

addressLength → const int
blake2b256DigestSize → const int
bloomFilterBytes → const int
checksumLength → const int
The implicit Address encoder dictates how addresses are cast to and from strings. Since this is the primary method by which users will interact with the protocol, the Address encoder adds a 4 byte checksum to the Address as a quick check that may be used with external systems.
curve25519 → const String
curvePrefix → const int
curveThresholdPrefix → const int
defaultAccountIndex → const int
defaultAddressIndex → const int
defaultChange → const int
0=external/payments, 1=internal/change, 2=staking
defaultChangeIndex → const int
defaultCoinType → const int
defaultOptions → const Map<String, dynamic>
Default options for key generation as of 8.3.2021
defaultPropositionPrefix → const int
defaultPurpose → const int
digestLength → const int
The cryptographic hash functions (https://en.wikipedia.org/wiki/Cryptographic_hash_function) are a specific family of hash function
ed25519 → const String
extendedSecretKeySize → const int
hardenedOffset → const int
mainnetPrefix → const int
maxJS → const int
maxMnemonicValue → const int
modifierIdSize → const int
networkRegistry → const Map<String, int>
Container for information about topl networks
pollingDuration → const int
polyDateTime → const BifrostDateTime
private → const String
privatePrefix → const int
pubKeyHashByte → const int
retryValue → const int
shortNameLimit → const int
supportedAssetCodeVersion → const int
thresholdCurve25519 → const String
toplnet → const String
toplnetFee → const int
valhalla → const String
valhallaFee → const int
valhallaPrefix → const int
xprvSize → const int
default purpose. Reference: CIP-1852 Extended Private key size in bytes

Properties

formatter → DateFormat
final
hexRegex RegExp
final
log → Logger
final
networksDefault Map<String, Map<String, int>>
final
privateMap Map<String, int>
final
propositionMap Map<String, int>
final
toplNetMap Map<String, int>
final
valhallaMap Map<String, int>
final
validNetworks List<String>
final
validPropositionTypes List<String>
final

Functions

addressFromBytes({NetworkId networkPrefix = valhallaPrefix, required Uint8List bytes}) ToplAddress
addressTypeString(AddressType type) String
createHash(Uint8List buffer) Uint8List
Returns the Blake2b (https://en.wikipedia.org/wiki/BLAKE_(hash_function)) digest of the buffer
generatePubKeyHashAddress(Bip32PublicKey publicKey, NetworkId networkPrefix, String propositionType) ToplAddress
Generate Hash Address using the Public Key and Network Prefix First parameter is the Base-58 encoded byte list of the public key The second parameter is the prefix of the network where the address will be used Third is the type of proposition used Returns the address and whether or not the operation was successful
getAddressNetwork(String address) Map<String, dynamic>
Returns the networkPrefix for a valid address Returns {success: boolean, networkPrefix:
harden(int index) int
hex(int c) int
hmacSHA512(Uint8List key, Uint8List data) Uint8List
This is the method that we are using to generate the hmac used in deriving the mac
isHardened(int index) bool
isValidHex(String hex) bool
isValidMetadata(Latin1Data? metadata) bool
Takes in a Latin1Data and returns whether or not it is a valid data/metadata value Returns a bool about whether or not the argument is valid
isValidNetwork(String networkPrefix) bool
Validates whether the network passed in is valid
isValidPropositionType(String propositionType) bool
Validates whether the proposition passed in is valid
networkIdString(NetworkId id) String
parseValue(dynamic amount) num
toHex(Uint8List bArr) String
toUnitList(String str) Uint8List
validateAddressByNetwork(String networkPrefix, String address) Map<String, dynamic>
Checks if the address is valid by the following 4 steps:
validChecksum(List<int> payload) bool
Verify that the payload has not been corrupted by checking that the checksum is valid

Typedefs

BoxType = int
EvidenceTypePrefix = int
Evidence content serves as a fingerprint (or commitment) of a particular proposition that is used to lock a box. Boxes are locked with 'Evidence' which is the concatentation of a typePrefix ++ content. The type prefix denotes what type of proposition the content references and the content serves as the commitment that a proposition will be checked against when a box is being unlocked during a transaction.
M = NodeViewModifier
ModifierTypeId = int
NetworkId = int
Nonce = String
RetryEvaluator = FutureOr<bool> Function(DioError error)
TxType = int