rpc_client

package
v0.0.0-...-20952ba Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

type Commit struct {
	Action string
	Key    string
	Value  string
}

type Daemon

type Daemon struct {
	Address  string
	Endpoint string
	Client   jsonrpc.RPCClient
}

func (*Daemon) GetBlock

func (d *Daemon) GetBlock(params *rpc.GetBlock_Params) (*rpc.GetBlock_Result, error)

func (*Daemon) GetBlockHeaderByTopoHeight

func (d *Daemon) GetBlockHeaderByTopoHeight(params *rpc.GetBlockHeaderByTopoHeight_Params) (*rpc.GetBlockHeaderByHeight_Result, error)

func (*Daemon) GetEncrypedBalance

func (d *Daemon) GetEncrypedBalance(params *rpc.GetEncryptedBalance_Params) (*rpc.GetEncryptedBalance_Result, error)

func (*Daemon) GetGasEstimate

func (d *Daemon) GetGasEstimate(params *rpc.GasEstimate_Params) (*rpc.GasEstimate_Result, error)

func (*Daemon) GetHeight

func (d *Daemon) GetHeight() (*rpc.Daemon_GetHeight_Result, error)

func (*Daemon) GetInfo

func (d *Daemon) GetInfo() (*rpc.GetInfo_Result, error)

func (*Daemon) GetRandomAddresses

func (d *Daemon) GetRandomAddresses(params *rpc.GetRandomAddress_Params) (*rpc.GetRandomAddress_Result, error)

func (*Daemon) GetSC

func (d *Daemon) GetSC(params *rpc.GetSC_Params) (*rpc.GetSC_Result, error)

func (*Daemon) GetSCCommitCount

func (d *Daemon) GetSCCommitCount(scid string) uint64

func (*Daemon) GetSCCommitCountV2

func (d *Daemon) GetSCCommitCountV2(scid string) (uint64, error)

func (*Daemon) GetSCCommits

func (d *Daemon) GetSCCommits(scid string, start uint64, end uint64) []Commit

func (*Daemon) GetSCCommitsV2

func (d *Daemon) GetSCCommitsV2(scid string, start uint64, end uint64) ([]map[string]interface{}, error)

func (*Daemon) GetSCItemCount

func (d *Daemon) GetSCItemCount(scid string, key string) uint64

func (*Daemon) GetSCKeyValues

func (d *Daemon) GetSCKeyValues(scid string, prefixKey string, start uint64, end uint64, columns []string) map[string]string

func (*Daemon) GetTransaction

func (d *Daemon) GetTransaction(params *rpc.GetTransaction_Params) (*rpc.GetTransaction_Result, error)

func (*Daemon) NameToAddress

func (d *Daemon) NameToAddress(params *rpc.NameToAddress_Params) (*rpc.NameToAddress_Result, error)

func (*Daemon) Ping

func (d *Daemon) Ping() (string, error)

func (*Daemon) SetClient

func (d *Daemon) SetClient(address string)

type Wallet

type Wallet struct {
	Address  string
	Endpoint string
	Auth     string
	Client   jsonrpc.RPCClient
}

func (*Wallet) Echo

func (c *Wallet) Echo() (string, error)

func (*Wallet) GetAddress

func (c *Wallet) GetAddress() (string, error)

func (*Wallet) GetBalance

func (c *Wallet) GetBalance(params *rpc.GetBalance_Params) (*rpc.GetBalance_Result, error)

func (*Wallet) GetHeight

func (c *Wallet) GetHeight() (*rpc.GetHeight_Result, error)

func (*Wallet) GetRegistered

func (c *Wallet) GetRegistered() (bool, error)

func (*Wallet) GetSeed

func (c *Wallet) GetSeed() (string, error)

func (*Wallet) GetTransfers

func (c *Wallet) GetTransfers(params *rpc.Get_Transfers_Params) (*rpc.Get_Transfers_Result, error)

func (*Wallet) InstallSC

func (c *Wallet) InstallSC(code string) (string, error)

Useless func since I use transfer - keep it for archive

func (*Wallet) NeedAuth

func (c *Wallet) NeedAuth() (bool, error)

func (*Wallet) SetClient

func (c *Wallet) SetClient(address string)

func (*Wallet) SetClientWithAuth

func (c *Wallet) SetClientWithAuth(address, username string, password string)

func (*Wallet) Transfer

func (c *Wallet) Transfer(params *rpc.Transfer_Params) (*rpc.Transfer_Result, error)

Jump to

Keyboard shortcuts

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