example

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelTx

func CancelTx(txID *uint32, txSlateID *uuid.UUID) error

CancelTx cancels a transaction.

func FinalizeTx

func FinalizeTx(slateIn libwallet.Slate) (*libwallet.Slate, error)

FinalizeTx finalizes a transaction, after all parties have filled in both rounds of Slate generation.

func InitSendTx

func InitSendTx(initTxArgs libwallet.InitTxArgs) (*libwallet.Slate, error)

InitSendTx initiates a new transaction as the sender, creating a new Slate object containing the sender's inputs, change outputs, and public signature data.

func NodeHeight

func NodeHeight() (*libwallet.NodeHeightResult, error)

NodeHeight retrieves the last known height known by the node.

func PostTx

func PostTx(tx core.Transaction, fluff bool) error

PostTx posts a completed transaction to the listening node for validation and inclusion in a block for mining.

func RetrieveOutputs

func RetrieveOutputs(includeSpent, refreshFromNode bool, txID *uint32) (bool, *[]libwallet.OutputCommitMapping, error)

RetrieveOutputs returns a list of outputs from the active account in the

func RetrieveSummaryInfo

func RetrieveSummaryInfo(refreshFromNode bool, minimumConfirmations uint64) (bool, *libwallet.WalletInfo, error)

RetrieveSummaryInfo returns summary information from the active account in the

func RetrieveTxs

func RetrieveTxs(refreshFromNode bool, txID *uint32, txSlateID *uuid.UUID) (bool, *[]libwallet.TxLogEntry, error)

RetrieveTxs returns a list of Transaction Log Entries from the active account in the

func TxLockOutputs

func TxLockOutputs(slate *libwallet.Slate, participantID uint) error

TxLockOutputs locks the outputs associated with the inputs to the transaction in the given Slate, making them unavailable for use in further transactions.

Types

type Envelope

type Envelope struct {
	ID      JSONRPCID        `json:"id"`
	Version JSONRPCV2Version `json:"jsonrpc"`
	Method  string           `json:"method"`
	Params  json.RawMessage  `json:"params,omitempty"`
	Result  json.RawMessage  `json:"result,omitempty"`
	Error   *rpcError        `json:"error,omitempty"`
}

Envelope is the JSON-RPC envelope

type JSONRPCID

type JSONRPCID string

JSONRPCID represents the JSON-RPC V2 id will automatically be serialized

func (JSONRPCID) MarshalJSON

func (e JSONRPCID) MarshalJSON() ([]byte, error)

MarshalJSON implement the Marshaler interface on JSONRPCVersion

type JSONRPCV2Version

type JSONRPCV2Version string

JSONRPCV2Version represents the JSON-RPC V2 version string will always be serialized to "2.0"

func (JSONRPCV2Version) MarshalJSON

func (e JSONRPCV2Version) MarshalJSON() ([]byte, error)

MarshalJSON implement the Marshaler interface on JSONRPCVersion

type RPCHTTPClient

type RPCHTTPClient struct {
	URL string
}

RPCHTTPClient is a JSON-RPC over HTTP Client

func (*RPCHTTPClient) Request

func (c *RPCHTTPClient) Request(method string, params json.RawMessage) (*Envelope, error)

Request do a RPC POST request with the server

type Result

type Result struct {
	Ok  json.RawMessage
	Err json.RawMessage
}

Result is golang equivalent of Rust result

Jump to

Keyboard shortcuts

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