cardano_dart_types library
Classes
- Address
- AddressInfo
- Anchor
- Asset
- an single asset name and value under a MultiAsset policyId
- AssetName
- BinaryReader
- Not part of public API
- BinaryWriter
- Not part of public API
- Bip32KeyPair
- Private/signing and public/varification key pair.
- Blake2bHash256
- CardanoAddress
- CardanoAddressKit
- Everything you need to add a spend (or change) address to a UTxO transaction.
- CardanoDerivation
- CardanoPubAccount
- CardanoPubAccountFactory
- CardanoSigningPath
- CardanoTransaction
- outer wrapper of a Cardano blockchain transaction.
- CardanoTransactionBody
- Core of the cardano transaction that is signed.
- CardanoTransactionInput
- Points to an UTXO unspent change entry using a transactionId and index.
- CardanoTransactionInputs
- CardanoTransactionOutput
- Address to send to and amount to send.
- CardanoUtils
- CardanoWallet
- CborAdditionalInfo
- Additional Info
- CborBase64
- A CBOR string containing a base 64 value.
- CborBase64Url
- A CBOR string containing a base 64 url safe value.
- CborBigFloat
- A CBOR fraction (m * (2 ** e)).
- CborBigInt
- A CBOR big int.
- CborBool
- A CBOR boolean value.
- CborBytes
- A CBOR byte array.
- CborBytesImpl
- CborCodec
- A CBOR encoder and decoder.
- CborDateTime
- A CBOR datetime.
- CborDateTimeFloat
- A CBOR date time encoded as seconds since epoch in a float.
- CborDateTimeInt
- A CBOR datetieme encoded as seconds since epoch.
- CborDateTimeString
- A CBOR string which encodes a datetime.
- CborDecimalFraction
- A CBOR fraction (m * (10 ** e)).
- CborDecoder
- A CBOR decoder.
- CborEncodeDefiniteLengthBytes
- Use this to force the CborEncoder to encode an definite length byte string.
- CborEncodeDefiniteLengthList
- Use this to force the CborEncoder to encode an definite length list.
- CborEncodeDefiniteLengthMap
- Use this to force the CborEncoder to encode an definite length dictionary.
- CborEncodeDefiniteLengthString
- Use this to force the CborEncoder to encode an definite length string.
- CborEncodeIndefiniteLengthBytes
- Use this to force the CborEncoder to encode an indefinite length byte string.
- CborEncodeIndefiniteLengthList
- Use this to force the CborEncoder to encode an indefinite length list.
- CborEncodeIndefiniteLengthMap
- Use this to force the CborEncoder to encode an indefinite length dictionary.
- CborEncodeIndefiniteLengthString
- Use this to force the CborEncoder to encode an indefinite length string.
- CborEncoder
- A CBOR encoder.
- CborFloat
- A CBOR float.
- CborFloat128BigEndianArray
- float128 big endian
- CborFloat128LittleEndianArray
- float128 little endian
- CborFloat16BigEndianArray
- float16 big endian
- CborFloat16LittleEndianArray
- float16 little endian
- CborFloat32BigEndianArray
- float32 big endian
- CborFloat32LittleEndianArray
- float32 little endian
- CborFloat64BigEndianArray
- float64 big endian
- CborFloat64LittleEndianArray
- float64 little endian
- CborInt
- A CBOR integer or big number.
- CborInt16BigEndianArray
- sint16 big endian
- CborInt16LittleEndianArray
- sint16 little endian
- CborInt32BigEndianArray
- sint32 big endian
- CborInt32LittleEndianArray
- sint32 little endian
- CborInt64BigEndianArray
- sint64 big endian
- CborInt64LittleEndianArray
- sint64 little endian
- CborInt8Array
- sint8
- CborJsonEncoder
- Encodes CBOR into JSON.
- CborList
- A CBOR array.
- CborMajorType
- Jump table for initial byte values can be found here. Maybe useful for code maintainers. Major types
- CborMap
- A CBOR map.
- CBORMetadata
- CborMime
- A CBOR string containing a regular expression.
- CborMultiDimensionalArray
- A CBOR Multi-dimensional Array (RFC 8746).
- CborNull
- A CBOR null value.
- CborRationalNumber
- A CBOR rational number (m / n). https://peteroupc.github.io/CBOR/rational.html
- CborRegex
- A CBOR string containing a regular expression.
- CborSimpleCodec
- A simple codec for CBOR, using CborSimpleEncoder and CborSimpleDecoder.
- CborSimpleDecoder
- A simple decoder for CBOR.
- CborSimpleEncoder
- A simple encoder for CBOR.
- CborSimpleValue
- A CBOR simple value without any additional content.
- CborSmallInt
- A CBOR integer which can be represented losslessly as int.
- CborString
- A CBOR string encoded in UTF-8.
- CborTag
- Hint for the content of something.
- CborTypedArray
- Base class for all Typed Arrays
- CborUint16BigEndianArray
- uint16 big endian
- CborUint16LittleEndianArray
- uint16 little endian
- CborUint32BigEndianArray
- uint32 big endian
- CborUint32LittleEndianArray
- uint32 little endian
- CborUint64BigEndianArray
- uint64 big endian
- CborUint64LittleEndianArray
- uint64 little endian
- CborUint8Array
- uint8
- CborUint8ClampedArray
- uint8 clamped
- CborUndefined
- A CBOR undefined value.
- CborUri
- A CBOR string containing URI.
- CborValue
- A CBOR value.
- Certificate
- Certificates
- Constitution
- ConstitutionalCommitee
- CoseHeaderMap
- CoseHeaders
- CoseKey
- CoseProtectedHeaderMap
- CoseSign1
- CoseSigStructure
- Credential
- DataSignature
- Drep
- DRepDerivation
- DRepDiffInfo
- ExUnits
- GovAction
- GovActionId
-
Lazy<
T> -
ListWithCborType<
T> - MultiAsset
- Native Token multi-asset container.
- NativeScript
- OutputDatum
- PlutusData
- PlutusScriptV1
- PlutusScriptV2
- PolicyId
- ProposalDiffInfo
- ProposalProcedure
- ProtocolParamUpdate
- ProtocolVersion
- Redeemer
- RequiredSigners
- StakeAddressInfo
- StakePoolId
- TransactionHash
- Transformations
- TxAndSignature
- TxDiff
- TxPreparedForSigning
- TxSignedBundle
- TxSigningBundle
- Utxo
- Value
- Can be a simple ADA amount using coin or a combination of ADA and Native Tokens and their amounts.
- VoteInfo
- Voter
- VotingProcedure
- VotingProcedures
- Withdraw
- WitnessBootstrap
- WitnessSet
- this can be transaction signatures or a full blown smart contract
- WitnessVKey
- A witness is a public key and a signature (a signed hash of the body) used for on-chain validation.
Enums
- AddressType
- Bip32KeyRole
- CborFloatPrecision
- Enumeration to allow the user to select which level of precision to use encoding a CBOR float. Defaults to 'automatic'
- CborLengthType
- CredentialType
- CredType
- GovCredType
- GovKeyType
- MnemonicsWordsCount
- NetworkId
- Operation
- RedeemerTag
- SigContext
- Vote
- VoterType
Extensions
-
AssetListOperations
on List<
Asset> - BigIntX on BigInt
- CborEncodableExtension on CborEncodable
- CborExtensions on CborValue
-
CertificateIterableExtension
on Iterable<
Certificate> -
IntListExtensions
on Iterable<
int> -
IntListListExtensions
on Iterable<
List< int> > - IntX on int
-
ListIntX
on List<
int> - Not part of public API
-
MultiAssetIterableX
on Iterable<
MultiAsset> -
MultiAssetListOperations
on List<
MultiAsset> - RandomX on Random
- Not part of public API
-
SetExtensions
on Set<
T> - StringTransformations on String
- StringX on String
- Not part of public API
-
TransactionOutputIterableExtension
on Iterable<
CardanoTransactionOutput> - Uint8ListX on Uint8List
- Not part of public API
-
VotingProcedureMapX
on Map<
GovActionId, VotingProcedure> -
WithdrawIterableExtension
on Iterable<
Withdraw>
Constants
- ADDRESS_KEY → const String
- ALG_EdDSA → const int
- baseDiscrim → const int
- cbor → const CborCodec
- A constant instance of a CBOR codec, using default parameters.
- CRV_Ed25519 → const int
- CRV_KEY → const int
- defaultAccountIndex → const int
- Is zero. This returns the base account address.
- defaultAddrHrp → const ({String addr, String keyCred, String scriptCred})
- defaultCoinType → const int
- Coin-type for Cardano ADA. Ada Lovelace's year of birth.
- defaultPurpose → const int
- Default purpose. The year Ada Lovelace passed away. Reference: CIP-1852
- defaultRewardHrp → const ({String addr, String keyCred, String scriptCred})
- drepHrp → const String
- enterpriseDiscrim → const int
- govActionBech32Hrp → const String
- hardenedOffset → const int
- Hardended chain values should not have public keys. They are denoted by a single quote in chain values.
- kCborDefiniteLengthThreshold → const int
- OKP → const int
- pointerDiscrim → const int
- rewardDiscrim → const int
- testnetHrpSuffix → const String
- X_KEY → const int
Properties
- byronAddressRegex → RegExp
-
final
- coinZero → Coin
-
placeholder for future BigInt.zero
final
- debugAssertEnabled ↔ bool
-
getter/setter pair
- shelleyAddressRegex → RegExp
-
final
- stakeAddressRegex → RegExp
-
final
-
utf8HexCodec
↔ Codec<
String, String> -
getter/setter pair
Functions
-
cborDecode(
List< int> value) → CborValue -
Alias for
cbor.decode. -
cborEncode(
CborValue value) → List< int> -
Alias for
cbor.encode. -
cborPrettyPrint(
List< int> input, {int indent = CborConstants.prettyPrintIndent}) → String - Pretty print a CBOR input.
-
conditionalAssert(
bool fct(), [String? message]) → void -
getGovKeyPrefix(
{required GovKeyType keyType, required GovCredType credType}) → int -
useBinaryReader<
T> (Uint8List bytes, T callback(BinaryReader reader)) → T -
useBinaryWriter(
void callback(BinaryWriter writer)) → Uint8List
Typedefs
- AssetId = String
- Native Token policyId appended to hex encoded coin name. ADA has no policyId so its assetId is just 'lovelace' in hex: '6c6f76656c616365'. Simalur to 'unit' but 'lovelace' is not hex encoded.
- Bech32Address = String
- String representation of bech32 address
-
Bip32PublicKeyDerivator
= FutureOr<
Bip32PublicKey> Function(Bip32PublicKey, int) - Blake2bHash256Computed = _Blake2bHash256Computed
- BlockHashHex = String
- Hex encoded block hash ID
- Coin = BigInt
- Represents ADA amount in lovelace.
- TxIdHex = String
- Hex encoded transaction hash ID
- UnusedAddressFunction = bool Function(CardanoAddress address)
- Function used to test address usage. Returns true if it has not been used in a transaction.
- WalletId = String
- Wallet ID - stakingPublicKey for Shelley wallets
Exceptions / Errors
- AddressParseException
- AssetNameParseException
- CardanoValueParseException
- CborCyclicError
- Raised when object could not be codified due to cyclic references.
- CborMalformedException
- An exception raised when decoding.
- CoseHeaderMapParseException
- CoseHeadersParseException
- CoseKeyParseException
- CoseParseException
- CoseProtectedHeaderMapParseException
- CoseSign1ParseException
- CoseSignatureParseException
- CoseSignParseException
- CoseSigStructureParseException
- ExUnitsParseException
- InvalidAddressTypeError
- InvalidWalletNetworkForSigningException
- InvalidWalletUsedForSigningException
- NativeScriptParseException
- PlutusDataParseException
- PolicyIdParseException
- RedeemerParseException
- SigningAddressNotFoundException
- SigningAddressNotValidException
- TransactionBodyParseException
- TransactionHashParseException
- TransactionOutputParseException
- TransactionParseException
- UnexpectedSigningAddressTypeException
- WitnessBootstrapParseException
- WitnessParseException
- WitnessPlutusScriptV1ParseException
- WitnessPlutusScriptV2ParseException
- WitnessPlutusScriptV3ParseException