Documentation ¶
Index ¶
- Constants
- func CreateAtomicSwapCmd(client *rivinecli.CommandLineClient) *cobra.Command
- func CreateMintingWalletCmds(ccli *client.CommandLineClient)
- func CreateWalletCmd(cli *clientpkg.CommandLineClient) *clientpkg.WalletCommand
- type AtomicSwapOutputAudit
- type AtomicSwapOutputCreation
- type AtomicSwapOutputExtractSecret
- type AtomicSwapOutputSpendContract
- type WalletClient
- func (wallet *WalletClient) FundCoins(amount types.Currency, refundAddress *types.UnlockHash, newRefundAddress bool) ([]types.CoinInput, types.CoinOutput, *types.CoinOutput, error)
- func (wallet *WalletClient) GreedySignTx(t *types.Transaction) error
- func (wallet *WalletClient) NewPublicKey() (types.PublicKey, error)
Constants ¶
const ( // AuditContractExitCodeInvalidContract is returned as exit code, // in case the contract was found, but failed to validate against the given validation flags. AuditContractExitCodeInvalidContract = 128 )
Variables ¶
This section is empty.
Functions ¶
func CreateAtomicSwapCmd ¶ added in v0.4.4
func CreateAtomicSwapCmd(client *rivinecli.CommandLineClient) *cobra.Command
func CreateMintingWalletCmds ¶
func CreateMintingWalletCmds(ccli *client.CommandLineClient)
CreateMintingWalletCmds adds the wallet cli subcommands for the minting plugin
func CreateWalletCmd ¶
func CreateWalletCmd(cli *clientpkg.CommandLineClient) *clientpkg.WalletCommand
Types ¶
type AtomicSwapOutputAudit ¶ added in v0.4.4
type AtomicSwapOutputAudit struct { Coins types.Currency `json:"coins"` SpendableCoins types.Currency `json:"spendablecoins"` CustodyFeeDebt types.Currency `json:"custodyfeedebt"` Contract types.AtomicSwapCondition `json:"contract"` }
AtomicSwapOutputAudit represents the formatted output of the atomic swap audit command
type AtomicSwapOutputCreation ¶ added in v0.4.4
type AtomicSwapOutputCreation struct { Coins types.Currency `json:"coins"` Contract types.AtomicSwapCondition `json:"contract"` ContractID types.UnlockHash `json:"contractid"` Secret *types.AtomicSwapSecret `json:"secret,omitempty"` OutputID types.CoinOutputID `json:"outputid"` TransactionID types.TransactionID `json:"transactionid"` }
AtomicSwapOutputCreation represents the formatted output of the atomic swap creation commands (initiate and participate).
type AtomicSwapOutputExtractSecret ¶ added in v0.4.4
type AtomicSwapOutputExtractSecret struct {
Secret types.AtomicSwapSecret `json:"secret"`
}
AtomicSwapOutputExtractSecret represents the formatted output of the atomic swap extract secret command
type AtomicSwapOutputSpendContract ¶ added in v0.4.4
type AtomicSwapOutputSpendContract struct {
TransactionID types.TransactionID `json:"transactionid"`
}
AtomicSwapOutputSpendContract represents the formatted output of the atomic swap spend commands (redeem and refund)
type WalletClient ¶
type WalletClient struct {
// contains filtered or unexported fields
}
WalletClient is used to easily interact with the wallet through the HTTP REST API.
func NewWalletClient ¶
func NewWalletClient(bc *client.BaseClient) *WalletClient
NewWalletClient creates a new WalletClient, that can be used for easy interaction with the Wallet API exposed via the HTTP REST API.
func (*WalletClient) FundCoins ¶
func (wallet *WalletClient) FundCoins(amount types.Currency, refundAddress *types.UnlockHash, newRefundAddress bool) ([]types.CoinInput, types.CoinOutput, *types.CoinOutput, error)
FundCoins collects coin inputs owned by this daemon's wallet, that are sufficient to fund the given amount, optionally returning a refund coin output as well.
func (*WalletClient) GreedySignTx ¶
func (wallet *WalletClient) GreedySignTx(t *types.Transaction) error
GreedySignTx signs the given transactions greedy, meaning that all fulfillments that can be signed, will be signed.
func (*WalletClient) NewPublicKey ¶
func (wallet *WalletClient) NewPublicKey() (types.PublicKey, error)
NewPublicKey creates a new public key (from an index and the wallet's primary seed), and returns it.