# Functions
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
DisableLog disables all library log output.
FromAssets creates a new Taproot Asset commitment for the given assets, creating the appropriate asset commitments internally.
No description provided by the author
IsSimilarTapCommitmentVersion returns true if both TapCommitmentVersions are nil, equal, or would map to the same TapCommitmentVersion.
IsTaprootAssetCommitmentScript returns true if the passed script is a valid Taproot Asset commitment script.
MaybeDecodeTapscriptPreimage returns the decoded preimage and hash of the Tapscript sibling or nil if the encoded content is empty.
MaybeEncodeTapscriptPreimage returns the encoded preimage and hash of the Tapscript sibling or nil if the preimage is nil.
Mint mints a series of assets within a new Taproot Asset commitment.
NewAssetCommitment constructs a new commitment for the given assets capable of computing merkle proofs.
NewLeafFromPreimage sanity checks a TapscriptPreimage and decodes it into a TapLeaf.
NewPreimageFromBranch creates a new TapscriptPreimage from a tap branch.
NewPreimageFromLeaf creates a new TapscriptPreimage from a single tap leaf.
NewPreimageFromTapscriptTreeNodes constructs a taproot sibling hash from Tapscript tree nodes, to be used with a TapCommitment tree root to derive a tapscript root.
NewSplitCommitment computes a new SplitCommitment based on the given input assets.
NewTapCommitment creates a new Taproot Asset commitment for the given asset commitments capable of computing merkle proofs.
NewTapCommitmentWithRoot creates a new Taproot Asset commitment backed by the root node.
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
RandSplitCommit creates a random split commitment for testing.
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
TrimSplitWitnesses returns a copy of the commitment in which all assets with a split commitment witness have their SplitCommitment field set to nil.
UseLogger uses a specified Logger to output package logging info.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
BranchPreimage is a pre-image that's a branch, so it's actually 64-bytes of two child pre-images.
LeafPreimage is a pre-image that's a leaf script.
No description provided by the author
No description provided by the author
Subsystem defines the logging code for this subsystem.
TapCommitmentV0 is the initial Taproot Asset Commitment version.
TapCommitmentV1 is used by Taproot Asset Commitments that commit to V0 or V1 assets.
TapCommitmentV2 is used by Taproot Asset Commitments that commit to V0 or V1 assets.
No description provided by the author
No description provided by the author
# Variables
ErrAssetDuplicateScriptKey is an error returned when we attempt to create a new asset commitment that would include two assets with the same script key.
ErrAssetGenesisMismatch is an error returned when we attempt to create a new asset commitment and two assets disagree on their genesis.
ErrAssetGroupKeyMismatch is an error returned when we attempt to create a new asset commitment and two assets disagree on their group key.
ErrAssetTypeMismatch is an error returned when we attempt to insert an asset into an asset commitment and the asset type does not match the assets stored in the commitment.
ErrDuplicateSplitOutputIndex is an error returned when duplicate split output indices are detected.
ErrInvalidEmptyTapscriptPreimage is an error returned upon attempting to generate the tap hash of an empty preimage.
ErrInvalidScriptKey is an error returned when a root locator has zero value but does not use the correct un-spendable script key.
ErrInvalidSplitAmount is an error returned when a split amount is invalid (e.g.
ErrInvalidSplitLocator is returned if a new split is attempted to be created w/o a valid external split locator.
ErrInvalidSplitLocatorCount is returned if a collectible split is attempted with a count of external split locators not equal to one.
ErrInvalidTapCommitmentVersion is an error returned when we attempt to create a TapCommitment with an invalid TapCommitmentVersion.
ErrInvalidTaprootProof is an error returned upon verifying an invalid Taproot proof.
ErrInvalidTapscriptPreimageLen is an error returned upon attempting to generate the tap hash of a branch preimage with invalid length.
ErrInvalidTapscriptPreimageType is an error returned when a tapscript preimage has an unknown type that is not leaf nor branch.
ErrInvalidTapscriptProof is an error returned upon attempting to prove a malformed TapscriptProof.
ErrMissingAssetCommitment is an error returned when we attempt to update or delete a Taproot Asset commitment without an asset commitment.
ErrMissingAssetProof is an error returned when attempting to derive a TapCommitment and an AssetProof is required but missing.
ErrNoAssets is an error returned when we attempt to instantiate a new AssetCommitment without any assets.
ErrNonZeroSplitAmount is an error returned when a root locator uses an un-spendable script key but has a non-zero amount.
ErrPreimageIsTapCommitment is an error returned when a tapscript preimage is a valid Taproot Asset commitment.
ErrZeroSplitAmount is an error returned when a non-root split locator has zero amount.
TaprootAssetCommitmentScriptSize is the size of the Taproot Asset commitment script:
- 1 byte for the version - 32 bytes for the TaprootAssetsMarker - 32 bytes for the root hash - 8 bytes for the root sum.
TaprootAssetsMarker is a static identifier included in the leaf script of a Taproot Asset commitment to uniquely identify from any other leaves in the tapscript tree.
# Structs
AssetCommitment represents the inner MS-SMT within the Taproot Asset protocol committing to a set of assets under the same ID/group.
AssetDetails contains all of the configurable parameters of an Asset to specify upon mint.
AssetProof is the proof used along with an asset leaf to arrive at the root of the AssetCommitment MS-SMT.
Proof represents a full commitment proof for a particular `Asset`.
SplitAsset is an asset resulting from a split.
SplitCommitment encodes all of the data necessary to generate and validate a set of asset splits from its root.
SplitCommitmentInput holds input asset specific data used in constructing a new split commitment.
SplitLocator encodes the data that uniquely identifies an asset split within a split commitment tree.
TapCommitment represents the outer MS-SMT within the Taproot Asset protocol committing to a set of asset commitments.
TaprootAssetProof is the proof used along with an asset commitment leaf to arrive at the root of the TapCommitment MS-SMT.
TapscriptPreimage wraps a pre-image byte slice with a type byte that self identifies what type of pre-image it is.
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
# Type aliases
AssetCommitments is the set of assetCommitments backing a TapCommitment.
CommittedAssets is the set of Assets backing an AssetCommitment.
InputSet represents the set of inputs for a given asset indexed by their `PrevID`.
SplitSet is a type to represent a set of asset splits.
TapCommitmentVersion denotes the structure of the Taproot Asset commitment MS-SMT and the procedure for building a TapLeaf from a Taproot Asset commitment.
TapscriptPreimageType denotes the type of tapscript sibling preimage.
No description provided by the author
No description provided by the author