# Functions

ApplyHtlcView serves as the state transition function for the custom channel's blob.
AssignOutputCommitments assigns the output commitments keyed by the output index to the corresponding allocations.
ComputeView processes all update entries in both HTLC update logs, producing a final view which is the result of properly applying all adds, settles, timeouts and fee updates found in both logs.
CreateAllocations creates the allocations for the channel state.
CreateSecondLevelHtlcPackets creates the virtual packets for the second level HTLC transaction.
CreateSecondLevelHtlcTx creates the auxiliary leaf for a successful or timed out second level HTLC transaction.
DisableLog disables all library log output.
DistributeCoins allocates a set of inputs (extracted from the given input proofs) to virtual outputs as specified by the allocations given.
FakeCommitTx creates a fake commitment on-chain transaction from the given funding outpoint and allocations.
FetchLeavesFromCommit attempts to fetch the auxiliary leaves that correspond to the passed aux blob, and an existing channel commitment.
FetchLeavesFromRevocation attempts to fetch the auxiliary leaves from a channel revocation that stores balance + blob information.
FetchLeavesFromView attempts to fetch the auxiliary leaves that correspond to the passed aux blob, and pending fully evaluated HTLC view.
FilterByType returns a filter function that can be used to filter a list of allocations by the given allocation type.
FilterByTypeExclude returns a filter function that can be used to filter a list of allocations by excluding the given allocation type.
GenerateCommitmentAllocations generates allocations for a channel commitment.
InPlaceAllocationSort performs an in-place sort of output allocations.
InPlaceCustomCommitSort performs an in-place sort of a transaction, given a list of allocations.
LeavesFromTapscriptScriptTree creates a tapscript sibling from a commit script tree.
NewAuxChanCloser creates a new instance of the auxiliary channel closer.
NewAuxInvoiceManager creates a new Taproot Asset auxiliary invoice manager based on the passed config.
NewAuxLeafSigner creates a new Taproot Asset auxiliary leaf signer based on the passed config.
NewAuxSweeper creates a new instance of the AuxSweeper from the specified config.
NewAuxTrafficShaper creates a new Taproot Asset auxiliary traffic shaper based on the passed config.
NewFundingController creates a new instance of the FundingController.
NewFundingScriptTree creates a new funding script tree for a custom channel asset-level script key.
NonAssetExclusionProofs returns an exclusion proof generator that creates exclusion proofs for non-asset P2TR outputs in the given allocations.
PackSigs takes a series of aux signatures and packs them into a single blob that can be sent alongside the CommitSig messages.
SanityCheckAmounts makes sure that any output that carries an asset has a non-dust satoshi balance.
ToCommitment converts the allocations to a Commitment struct.
UnpackSigs takes a packed blob of signatures and returns the original signatures for each HTLC, keyed by HTLC index.
UseLogger uses a specified Logger to output package logging info.
VerifySecondLevelSigs attempts to synchronously verify a batch of aux sig jobs.

# Constants

AllocationTypeNoAssets is the default allocation type that is used when the allocation type is not important or the allocation does not carry any assets.
CommitAllocationHtlcIncoming is an allocation type that is used for allocating assets to an incoming HTLC output.
CommitAllocationHtlcOutgoing is an allocation type that is used for allocating assets to an outgoing HTLC output.
CommitAllocationToLocal is an allocation type that is used for allocating assets to the local party.
CommitAllocationToRemote is an allocation type that is used for allocating assets to the remote party.
DefaultTimeout is the default timeout we use for RPC and database operations.
MsgEndpointName is the name of the endpoint that we'll use to register the funding controller with the peer message handler.
SecondLevelHtlcAllocation is an allocation type that is used for allocating assets to a second level HTLC output (HTLC-success for HTLCs accepted by the local node, HTLC-timeout for HTLCs offered by the local node).
TCHN as in Taproot Assets Channels.

# Variables

DefaultOnChainHtlcAmount is the default amount that we consider as the smallest HTLC amount that can be sent on-chain.
ErrCommitmentNotSet is an error that is returned if the output commitment is not set for an allocation.
ErrInputOutputSumMismatch is an error that is returned if the sum of the input asset proofs does not match the sum of the output allocations.
ErrMissingAllocations is an error that is returned if no allocations were provided.
ErrMissingInputs is an error that is returned if no inputs were provided.
ErrNormalAssetsOnly is an error that is returned if an allocation contains an asset that is not a normal asset (e.g.

# Structs

Allocation is a struct that tracks how many units of assets should be allocated to a specific output of an on-chain transaction.
AuxChanCloser is used to implement asset-aware co-op close for channels.
AuxChanCloserCfg houses the configuration for the auxiliary channel closer.
AuxInvoiceManager is a Taproot Asset auxiliary invoice manager that can be used to make invoices to receive Taproot Assets.
AuxLeafSigner is a Taproot Asset auxiliary leaf signer that can be used to sign auxiliary leaves for Taproot Asset channels.
AuxSweeper is used to sweep funds from a commitment transaction that has been broadcast on chain (a force close).
AuxSweeperCfg holds the configuration for the AuxSweeper.
AuxTrafficShaper is a Taproot Asset auxiliary traffic shaper that can be used to make routing decisions for Taproot Asset channels.
DecodedDescriptor is a wrapper around a PaymentDescriptor that also includes the decoded asset balances of the HTLC to avoid multiple decoding round trips.
DecodedView is a copy of the original HTLC view, but with the asset balances of the HTLCs decoded.
FundingController is used to drive TAP aware channel funding using a backing lnd node and an active connection to a tapd instance.
FundingControllerCfg is a configuration struct that houses the necessary abstractions needed to drive funding.
FundingScriptTree is a struct that contains the funding script tree for a custom channel.
FundReq is a message that's sent to the funding controller to request a new asset channel funding.
InvoiceManagerConfig defines the configuration for the auxiliary invoice manager.
LeafSignerConfig defines the configuration for the auxiliary leaf signer.
OpenChanReq is a request to open a new asset channel with a remote peer.
TrafficShaperConfig defines the configuration for the auxiliary traffic shaper.

# Interfaces

AssetChanIntent is a handle returned by the PsbtChannelFunder that can be used to drive the new asset channel to completion.
AssetSyncer is used to ensure that we know of the set of assets that'll be used as funding input to an accepted channel.
ErrorReporter is used to report an error back to the caller and/or peer that we're communicating with.
InvoiceHtlcModifier is an interface that abstracts the invoice HTLC modification functionality required by the auxiliary invoice manager.
PeerMessenger is an interface that allows us to send messages to a remote LN peer.
PsbtChannelFunder is an interface that abstracts the necessary steps needed fund a PSBT channel on using lnd.
TxPublisher is an interface used to publish transactions.
VirtualPacketSigner is an interface that can be used to sign virtual packets.

# Type aliases

AllocationType is an enum that defines the different types of asset allocations that can be created.