Documentation
¶
Index ¶
- func Load(cfg interface{}, optFuncs ...OptionFunc) error
- func MergeInReaders(v *viper.Viper, cfgType string, readers []io.Reader) error
- type Client
- func (c *Client) GetBlock(blockHeight string) (transaction.Block, error)
- func (c *Client) GetTransaction(transactionID string) (transaction.Transaction, error)
- func (c *Client) ListBlocks(transactionID string) ([]transaction.Block, error)
- func (c *Client) ListOutputs(pubKey string, spent bool) ([]transaction.OutputLocation, error)
- func (c *Client) ListTransactions(assetID, operation string) ([]transaction.Transaction, error)
- func (c *Client) PostTransaction(txn *transaction.Transaction) error
- func (c *Client) PostTransactionCommit(txn *transaction.Transaction) error
- func (c *Client) PostTransactionSync(txn *transaction.Transaction) error
- func (c *Client) SearchAsset(search string, limit int) ([]transaction.Asset, error)
- func (c *Client) SearchMetadata(search string, limit int) ([]transaction.Metadata, error)
- type ClientConfig
- type OptionFunc
- type Options
- type TxrOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load(cfg interface{}, optFuncs ...OptionFunc) error
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(config ClientConfig) (*Client, error)
load config example in unchainio/pkg/xconfig
func (*Client) GetTransaction ¶
func (c *Client) GetTransaction(transactionID string) (transaction.Transaction, error)
func (*Client) ListBlocks ¶
func (c *Client) ListBlocks(transactionID string) ([]transaction.Block, error)
func (*Client) ListOutputs ¶
func (c *Client) ListOutputs(pubKey string, spent bool) ([]transaction.OutputLocation, error)
func (*Client) ListTransactions ¶
func (c *Client) ListTransactions(assetID, operation string) ([]transaction.Transaction, error)
func (*Client) PostTransaction ¶
func (c *Client) PostTransaction(txn *transaction.Transaction) error
Default transaction mode is async: client immediately receives response from server transaction validity is not checked
func (*Client) PostTransactionCommit ¶
func (c *Client) PostTransactionCommit(txn *transaction.Transaction) error
Client receives a response when transaction is committed to block
func (*Client) PostTransactionSync ¶
func (c *Client) PostTransactionSync(txn *transaction.Transaction) error
Client receives a response when the transaction is valid
func (*Client) SearchAsset ¶
TODO add search string to request
func (*Client) SearchMetadata ¶
TODO add search string to request
type ClientConfig ¶
type OptionFunc ¶
func FromReaders ¶
func FromReaders(cfgType string, readers ...io.Reader) OptionFunc
type TxrOptions ¶
type TxrOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.