client

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2019 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL