apinode

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: AGPL-3.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlAddressAction

type ControlAddressAction struct {
	Address string `json:"address"`
	*bc.AssetAmount
}

func (*ControlAddressAction) MarshalJSON

func (c *ControlAddressAction) MarshalJSON() ([]byte, error)

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node can invoke the api which provide by the full node server

func NewNode

func NewNode(hostPort string) *Node

NewNode create a api client with target server

func (*Node) BatchSendBTM

func (n *Node) BatchSendBTM(accountID, password string, outputs map[string]uint64, memo []byte) (string, error)

func (*Node) BuildChainTxs

func (n *Node) BuildChainTxs(actions []interface{}) ([]*txbuilder.Template, error)

func (*Node) ConnectPeer added in v1.0.2

func (n *Node) ConnectPeer(ip string, port uint16) (*peers.Peer, error)

func (*Node) CreateAccount added in v1.0.2

func (n *Node) CreateAccount(keyAlias, accountAlias string) (*query.AnnotatedAccount, error)

默认创建单签账户

func (*Node) CreateAccountReceiver added in v1.0.2

func (n *Node) CreateAccountReceiver(alias string) (*txbuilder.Receiver, error)

func (*Node) CreateKey added in v1.0.2

func (n *Node) CreateKey(alias, password string) (*api.CreateKeyResp, error)

func (*Node) CreateMultiSignAccount added in v1.0.2

func (n *Node) CreateMultiSignAccount(alias string, quorum int, rootXPubs []chainkd.XPub) (*query.AnnotatedAccount, error)

多签账户

func (*Node) DisconnectPeer added in v1.0.2

func (n *Node) DisconnectPeer(peerID string) error

func (*Node) GetBlockByHash

func (n *Node) GetBlockByHash(hash string) (*types.Block, error)

func (*Node) GetBlockByHeight

func (n *Node) GetBlockByHeight(height uint64) (*types.Block, error)

func (*Node) GetVoteByHash

func (n *Node) GetVoteByHash(hash string) ([]*api.VoteInfo, error)

func (*Node) GetVoteByHeight

func (n *Node) GetVoteByHeight(height uint64) ([]*api.VoteInfo, error)

func (*Node) ListAccounts added in v1.0.2

func (n *Node) ListAccounts() (*[]query.AnnotatedAccount, error)

func (*Node) ListAddresses added in v1.0.2

func (n *Node) ListAddresses(accountAlias string, from, count uint) (*[]api.AddressResp, error)

func (*Node) ListBalances added in v1.0.2

func (n *Node) ListBalances(accountAlias string) (*[]wallet.AccountBalance, error)

func (*Node) ListKeys added in v1.0.2

func (n *Node) ListKeys() (*[]pseudohsm.XPub, error)

func (*Node) ListPeers added in v1.0.2

func (n *Node) ListPeers() (*[]*peers.PeerInfo, error)

func (*Node) ListUtxos added in v1.0.2

func (n *Node) ListUtxos(accountAlias string, from, count uint) (*[]query.AnnotatedUTXO, error)

func (*Node) NetInfo added in v1.0.2

func (n *Node) NetInfo() (*api.NetInfo, error)

func (*Node) SignTxs

func (n *Node) SignTxs(tpls []*txbuilder.Template, password string) ([]*txbuilder.Template, error)

func (*Node) SubmitTx

func (n *Node) SubmitTx(tx *types.Tx) (string, error)

func (*Node) SubmitTxs

func (n *Node) SubmitTxs(txs []*types.Tx) ([]string, error)

func (*Node) WalletInfo added in v1.0.2

func (n *Node) WalletInfo() (*api.WalletInfo, error)

type RetireAction

type RetireAction struct {
	*bc.AssetAmount
	Arbitrary []byte
}

func (*RetireAction) MarshalJSON

func (r *RetireAction) MarshalJSON() ([]byte, error)

type SpendAccountAction

type SpendAccountAction struct {
	AccountID string `json:"account_id"`
	*bc.AssetAmount
}

func (*SpendAccountAction) MarshalJSON

func (s *SpendAccountAction) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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