Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrWaitingForConfirmation = fmt.Errorf("waiting for confirmation(s), please retry later")
Functions ¶
func CompleteUnroll ¶
func CompleteUnroll(ctx context.Context, args CompleteUnrollArgs) (string, error)
CompleteUnroll spends the user's matured onchain Ark UTXOs (those past their exit delay) to args.Receiver, signs the resulting transaction and broadcasts it. Returns the broadcast response from the explorer.
Types ¶
type CompleteUnrollArgs ¶
type CompleteUnrollArgs struct {
Explorer clientlib.Explorer
SignTx clientlib.SignFn
ServerParams clientlib.ServerParams
Utxos []clientlib.Utxo
Receiver string
}
CompleteUnrollArgs configures CompleteUnroll: spends the user's matured onchain Ark UTXOs (those past their exit delay) to Receiver and broadcasts the resulting transaction.
type ErrPendingConfirmation ¶
type ErrPendingConfirmation struct {
Txid string
}
ErrPendingConfirmation is returned when computing the offchain path of a redeem branch. Due to P2A relay policy, only 1C1P packages are accepted. This error is returned when the tx is found onchain but not confirmed yet, allowing the user to know when to wait for the tx to be confirmed or to continue with the redemption.
func (ErrPendingConfirmation) Error ¶
func (e ErrPendingConfirmation) Error() string
type RedeemBranch ¶
type RedeemBranch struct {
// contains filtered or unexported fields
}
func NewRedeemBranch ¶
func (*RedeemBranch) NextRedeemTx ¶
func (r *RedeemBranch) NextRedeemTx() (string, error)
RedeemPath returns the list of transactions to broadcast in order to access the vtxo output due to current P2A relay policy, we can't broadcast the branch tx until its parent tx is confirmed so we'll broadcast only the first tx of every branch
type UnrollArgs ¶
type UnrollArgs struct {
Explorer clientlib.Explorer
Indexer clientlib.Indexer
SignTx clientlib.SignFn
ServerParams clientlib.ServerParams
Vtxos []clientlib.Vtxo
BumpAddr string
BumpPubKey *btcec.PublicKey
}
UnrollArgs configures Unroll: builds 1C1P bump packages for each given vtxo's next branch tx and broadcasts each parent+child pair.