# Functions
AddExclusionProofs adds exclusion proofs to the base proof for each P2TR output in the given PSBT that isn't an anchor output itself.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AppendTransition appends a new proof for a state transition to the given encoded proof file.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CheckMaxFileSize checks that the given blob is not larger than the maximum file size.
No description provided by the author
No description provided by the author
No description provided by the author
CreateOwnershipProofAsset creates a virtual asset that can be used to prove ownership of an asset.
CreateTapscriptProof creates a TapscriptProof from a list of tapscript leaves proving that there is no asset commitment contained in the output the proof is for.
CreateTransitionProof creates a proof for an asset transition, based on the last proof of the last asset state and the new asset in the params.
Decode decodes a proof from a byte slice.
DecodeFile decodes a proof file from a byte slice.
DecodeMetaJSON decodes bytes as a JSON object, after checking that the bytes could be valid metadata.
Decoder decodes a proof from the given reader.
DefaultMerkleVerifier is a default implementation of the MerkleVerifier callback function.
DisableLog disables all library log output.
Encode encodes a proof into a byte slice.
EncodeAsProofFile encodes the passed proof into a blob.
EncodeFile encodes a proof file into a byte slice.
EncodeMetaJSON encodes a JSON object as bytes and checks that the resulting bytes are below the maximum metadata size.
Encoder encodes a proof to the given writer.
No description provided by the author
ExtractTaprootKey attempts to extract a Taproot tweaked key from the output found at `outputIndex`.
ExtractTaprootKeyFromScript attempts to extract a Taproot tweaked key from the given output script.
FetchProofProvenance iterates backwards through the main chain of proofs until it reaches the genesis point (the asset is the genesis asset) and then returns the full proof file with the full provenance for the asset.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IsProofFile returns true if the given blob is an encoded proof file.
IsSingleProof returns true if the given blob is an encoded individual mint/transition proof.
IsValidDecDisplay checks if the decimal display value is below the maximum.
IsValidMetaSize checks if the passed data is non-empty and below the maximum size.
IsValidMetaType checks if the passed value is a valid meta type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MockGroupAnchorVerifier is a mock verifier which approves of all group anchor geneses.
MockGroupVerifier is a mock verifier which approves of all group keys.
MockHeaderVerifier is a mock verifier which approves of all block headers.
MockMerkleVerifier is a mock verifier which approves of all merkle proofs.
NewBackoffHandler creates a new backoff procedure handle.
NewBackoffWaitEvent creates a new BackoffWaitEvent.
NewCourierDispatch creates a new proof courier dispatch.
NewEmptyFile returns a new empty file with the given version.
NewFile returns a new proof file given a version and a series of state transition proofs.
NewFileArchiver creates a new file archive rooted at the passed specified directory.
NewHashMailBox makes a new mailbox by dialing to the server specified by the address above.
NewMintingBlobs takes a set of minting parameters, and produces a series of serialized proof files, which proves the creation/existence of each of the assets within the batch.
NewMockProofArchive creates a new mock proof archive.
NewMockProofCourier returns a new mock proof courier.
No description provided by the author
NewMultiArchiveNotifier creates a new MultiArchiveNotifier based on the set of specified backends.
NewMultiArchiver creates a new MultiArchiver based on the set of specified backends.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewTxMerkleProof computes the merkle proof for a specific transaction found within a block's set of transactions.
ParseCourierAddress attempts to parse the given string as a proof courier address, validates that all required fields are present and ensures the protocol is one of the supported protocols.
No description provided by the author
No description provided by the author
ReplaceProofInBlob attempts to replace a proof in all proof files we have for assets of the same ID.
SparseDecode can be used to decode a proof from a reader without decoding and parsing the entire thing.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UseLogger uses a specified Logger to output package logging info.
ValidateCourierAddress validates that all required fields are present and ensures the protocol is one of the supported protocols.
No description provided by the author
No description provided by the author
No description provided by the author
WithAssetMetaReveals is a MintingBlobOption that allows the caller to attach meta reveal information to the initial minting blob created.
WithSiblingPreimage is a MintingBlobOption that allows the caller to provide a tapscript sibling preimage to be used when building the initial minting blob.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CommitmentProofTapSiblingPreimageType is the type of the TLV record for the CommitmentProof's SiblingPreimage field.
DisabledCourier is the default courier type that is used when no courier is specified.
No description provided by the author
FileMaxNumProofs is the maximum number of proofs we expect/allow to be encoded within a single proof file.
FileMaxProofSizeBytes is the maximum size of a single proof in a proof file.
FileMaxSizeBytes is the maximum size of a single proof file.
No description provided by the author
No description provided by the author
HashmailCourierType is a courier that uses the hashmail protocol to deliver proofs.
No description provided by the author
maxDecDisplay is the maximum value of decimal display that a user can define when minting assets.
MaxNumTaprootProofs is the maximum number of Taproot proofs there can be in a proof.
MaxTaprootProofSizeBytes is the maximum size of a single Taproot proof.
MerkleProofMaxNodes is the maximum number of nodes a merkle proof can contain.
MetadataDecDisplayKey is the JSON key used in the metadata field of a minted asset to express the decimal display of the minted asset.
MetaDataMaxSizeBytes is the maximum length of the meta data.
MetaJson signals that the meta data is a JSON object.
MetaOpaque signals that the meta data is simply a set of opaque bytes without any specific interpretation.
No description provided by the author
No description provided by the author
No description provided by the author
PrefixMagicBytesLength is the length of the magic bytes that are prefixed to individual proofs or proof files.
No description provided by the author
ProofDirName is the name of the directory we'll use to store our proofs.
ReceiveTransferType signifies that a proof was received from the proof transfer counterparty.
SendTransferType signifies that a proof was sent to the transfer counterparty.
No description provided by the author
Subsystem defines the logging code for this subsystem.
TaprootAssetsFileEnding is the main file suffix for the Taproot Asset proof files stored on disk, without the dot.
TaprootAssetsFileSuffix is the main file suffix for the Taproot Asset proof files stored on disk, including the dot.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TransitionV0 is the first version of the state transition proof.
No description provided by the author
UniverseRpcCourierType is a courier that uses the daemon universe RPC endpoints to deliver proofs.
V0 is the first version of the proof file.
No description provided by the author
# Variables
ErrDecDisplayInvalid is returned if the decimal display value is invalid.
ErrDecDisplayInvalidType is returned if the value in a JSON object assigned to the decimal display key is not a uint32.
ErrDecDisplayMissing is returned if the decimal display key is not present in a JSON object.
ErrDecDisplayTooLarge is returned if the decimal display value exceeds the current limit.
ErrGenesisRevealAssetIDMismatch is an error returned if an asset proof for a genesis asset has a genesis reveal that is inconsistent with the asset ID.
ErrGenesisRevealMetaHashMismatch is an error returned if an asset proof for a genesis asset has a genesis reveal where the meta hash doesn't match the proof TLV field.
ErrGenesisRevealMetaRevealRequired is an error returned if an asset proof for a genesis asset has a non-zero meta hash, but doesn't have a meta reveal.
ErrGenesisRevealOutputIndexMismatch is an error returned if an asset proof for a genesis asset has a genesis reveal where the output index doesn't match the proof TLV field.
ErrGenesisRevealPrevOutMismatch is an error returned if an asset proof for a genesis asset has a genesis reveal where the prev out doesn't match the proof TLV field.
ErrGenesisRevealRequired is an error returned if an asset proof for a genesis asset is missing a genesis reveal.
ErrGroupKeyRequired is an error returned if an asset proof for a genesis asset is missing a group key when it should have one.
ErrGroupKeyRevealMismatch is an error returned if an asset proof for a genesis asset has a group key reveal that doesn't match the group key.
ErrGroupKeyRevealRequired is an error returned if an asset proof for a genesis asset with a group key is missing a group key reveal.
ErrGroupKeyUnknown is an error returned if an asset proof for a group asset references an asset group that has not been previously verified.
ErrInvalidChecksum is an error returned when an invalid proof file checksum is detected while deserializing it.
ErrInvalidCommitmentProof is an error returned upon attempting to prove a malformed CommitmentProof.
ErrInvalidJSON signals that the meta data is not a valid JSON.
ErrInvalidLocatorID is returned when a specified has an invalid asset ID.
ErrInvalidLocatorKey is returned when a specified locator script key is invalid.
ErrInvalidTxMerkleProof is an error returned upon verifying an invalid on-chain transaction merkle proof.
ErrMetaDataMissing signals that the meta data is missing.
ErrMetaDataTooLarge signals that the meta data is too large.
ErrMetaTypeNegative signals that the given value is an invalid meta type because it is negative.
ErrMetaTypeTooLarge signals that the given value is an invalid meta type because it is too large.
ErrMissingExclusionProofs is an error returned upon noticing an exclusion proof for a P2TR output is missing.
ErrMissingSplitRootProof is an error returned upon noticing an inclusion proof for a split root asset is missing.
ErrMultipleProofs is returned if looking up a proof with only the asset ID and script key results in multiple proofs being found.
ErrNonGenesisAssetWithGenesisReveal is an error returned if an asset proof for a non-genesis asset contains a genesis reveal.
ErrNonGenesisAssetWithGroupKeyReveal is an error returned if an asset proof for a non-genesis asset contains a group key reveal.
ErrNonGenesisAssetWithMetaReveal is an error returned if an asset proof has a meta reveal but isn't itself a genesis asset.
ErrNoProofAvailable is the error that's returned when a proof is attempted to be fetched from an empty file.
ErrNotJSON is returned if the metadata is expected to be JSON but is another meta type.
ErrOutPointMissing is returned when a specified locator does not contain an outpoint.
ErrProofFileInvalid is the error that's returned when a proof file is invalid.
ErrProofInvalid is the error that's returned when a proof file is invalid.
ErrProofNotFound is returned when a user attempts to look up a proof based on a Locator, but we can't find it on disk.
ErrUnknownVersion is returned when a proof with an unknown proof version is being used.
FilePrefixMagicBytes are the magic bytes that are prefixed to a proof file when encoding it.
MockChainLookup is a mock for the ChainLookup interface.
OutPointFileNamePattern is the regular expression we use to find out if a proof file on disk already has the new naming scheme.
PrefixMagicBytes are the magic bytes that are prefixed to an individual transition or mint proof when encoding it.
RegtestOwnershipProofName is the name of the ownership proof that is generated/updated by an actual integration test run on regtest.
RegtestProofFileName is the name of the file that is generated/ updated by an actual integration test run on regtest.
RegtestProofName is the name of the file that is generated/updated by an actual integration test run on regtest.
RegtestTestVectorName is the name of the test vector file that is generated/updated by an actual integration test run on regtest.
# Structs
AnnotatedProof an annotated proof contains the raw proof blob along with a locator that may convey additional information related to the proof.
AssetSnapshot commits to the result of a valid proof within a proof file.
BackoffCfg configures the behaviour of the proof delivery backoff procedure.
BackoffExecError is an error returned when the backoff execution fails.
BackoffHandler is a handler for the backoff procedure.
BackoffWaitEvent is an event that is sent to a subscriber each time we wait via the Backoff procedure before retrying to deliver a proof to the receiver.
BaseProofParams holds the set of chain level information needed to create a proof.
BaseVerifier implements a simple verifier that loads the entire proof file into memory and then verifies it all at once.
CommitmentProof represents a full commitment proof for an asset.
CourierCfg contains general config parameters applicable to all proof couriers.
No description provided by the author
File represents a proof file comprised of proofs for all of an asset's state transitions back to its genesis state.
FileArchiver implements proof Archiver backed by an on-disk file system.
HashMailBox is an implementation of the ProofMailbox interface backed by the hashmailrpc.HashMailClient.
HashMailCourier is a hashmail proof courier service handle.
HashMailCourierCfg is the config for the hashmail proof courier.
Locator is able to uniquely identify a proof in the extended Taproot Asset Universe by a combination of the: top-level asset ID, the group key, and also the script key.
MetaReveal is an optional TLV type that can be added to the proof of a genesis asset to reveal pre-image to the metadata hash.
MintParams holds the set of chain level information needed to make a proof file for the set of assets minted in a batch.
MockProofArchive is a map that implements the Archiver interface.
MockProofCourier is a mock proof courier which stores the last proof it received.
MockProofCourierDispatcher is a mock proof courier dispatcher which returns the same courier for all requests.
No description provided by the author
MultiArchiveNotifier is a NotifyArchiver that wraps several other archives and notifies subscribers about new proofs that are added to any of the archives.
MultiArchiver is an archive of archives.
Proof encodes all of the data necessary to prove a valid state transition for an asset has occurred within an on-chain transaction.
Recipient describes the recipient of a proof.
TaprootProof represents a proof that reveals the partial contents to a tapscript tree within a taproot output.
TapscriptProof represents a proof of a Taproot output not including a Taproot Asset commitment.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TransitionParams holds the set of chain level information needed to append a proof to an existing file for the given asset state transition.
TxMerkleProof represents a simplified version of BIP-0037 transaction merkle proofs for a single transaction.
UniverseRpcCourier is a universe RPC proof courier service handle.
UniverseRpcCourierCfg is the config for the universe RPC proof courier.
URLDispatch is a proof courier dispatch that uses the courier address URL scheme to determine which courier service to use.
No description provided by the author
# Interfaces
Archiver is the main storage backend the ProofArchiver uses to store and query for proof files.
ChainLookupGenerator is an interface that allows the creation of a chain lookup interface for a given proof file or single proof.
Courier abstracts away from the final proof retrieval/delivery process as part of the non-interactive send flow.
CourierDispatch is an interface that abstracts away the different proof courier services that are supported.
CourierHarness interface is an integration testing harness for a proof courier service.
NotifyArchiver is an Archiver that also allows callers to subscribe to notifications about new proofs being added to the archiver.
ProofMailbox represents an abstract store-and-forward mailbox that can be used to send/receive proofs.
A subset of Integer that excludes int8, since we never use it in practice.
TransferLog is an interface that allows the courier to log the attempted delivery/receive of a proof.
Verifier abstracts away from the task of verifying a proof file blob.
Watcher is used to watch new proofs for their anchor transaction to be confirmed safely with a minimum number of confirmations.
# Type aliases
AssetBlobs is a data structure used to pass around the proof files for a set of assets which may have been created in the same batched transaction.
AssetProofs is a data structure used to pass around the native proof suffix structures for a set of assets which may have been created in the same batch transaction.
Blob either represents a serialized proof file, including the checksum or a single serialized issuance/transition proof.
CourierType is an enum that represents the different proof courier services protocols that are supported.
GroupAnchorVerifier is a callback function which returns an error if the given genesis is not the asset genesis of the group anchor.
GroupVerifier is a callback function which returns an error if the given group key has not been imported by the tapd daemon.
HeaderVerifier is a callback function which returns an error if the given block header is invalid (usually: not present on chain).
MerkleVerifier is a callback function which returns an error if the given merkle proof is invalid.
MetaType is the type of the meta data being revealed.
MintingBlobOption allows the caller to modify how the final set of minting blobs is created.
ProofCommitmentKeys stores the Taproot Asset commitments and taproot output keys derived from a TaprootProof.
TransferType is the type of proof transfer attempt.
TransitionVersion denotes the versioning scheme for an individual state transition proof.
UpdateCallback is a callback that is called when proofs are updated because of a re-org.
Version denotes the versioning scheme for proof files.