Documentation
¶
Index ¶
- type Handler
- func (h *Handler) CallContract(ctx context.Context, contractAddress, params, blockNumber string) ([]byte, error)
- func (h *Handler) CheckTx(ctx context.Context, hash string) (*chainrpc.TxResult, error)
- func (h *Handler) GetBalance(ctx context.Context, address, contractAddress, blockNumber string) (string, error)
- func (h *Handler) GetHeight(ctx context.Context) (string, error)
- func (h *Handler) GetTransfersByHash(ctx context.Context, hash string, confirmation uint64, withInternal bool) (*chainrpc.TxTransfers, error)
- func (h *Handler) InquireChain(ctx context.Context, instruction, params string) (string, error)
- func (h *Handler) SendTx(ctx context.Context, signedHex string) (string, error)
- type RpcBlock
- type RpcScriptPubKey
- type RpcTx
- type RpcVin
- type RpcVout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) CallContract ¶
func (*Handler) GetBalance ¶
func (*Handler) GetTransfersByHash ¶
func (*Handler) InquireChain ¶
type RpcBlock ¶
type RpcBlock struct {
Hash string `json:"hash"`
Confirmations int64 `json:"confirmations"`
Height int64 `json:"height"`
Version int32 `json:"version"`
MerkleRoot string `json:"merkleroot"`
Time int64 `json:"time"`
Nonce uint32 `json:"nonce"`
Bits string `json:"bits"`
Difficulty float64 `json:"difficulty"`
PreviousHash string `json:"previousblockhash"`
NextHash string `json:"nextblockhash,omitempty"`
Tx []RpcTx `json:"tx"`
}
types
type RpcScriptPubKey ¶
type RpcScriptPubKey struct {
Asm string `json:"asm"`
Hex string `json:"hex"`
ReqSigs int `json:"reqSigs,omitempty"`
Type string `json:"type"`
Address string `json:"address,omitempty"` // for BTC new version
Addresses []string `json:"addresses,omitempty"` // for BTC old version and DOGE
}
types
type RpcTx ¶
type RpcTx struct {
Txid string `json:"txid"`
Version int32 `json:"version"`
Locktime uint32 `json:"locktime"`
Vin []RpcVin `json:"vin"`
Vout []RpcVout `json:"vout"`
}
types
type RpcVin ¶
type RpcVin struct {
Coinbase string `json:"coinbase,omitempty"`
Txid string `json:"txid"`
Vout uint32 `json:"vout"`
ScriptSig struct {
Asm string `json:"asm"`
Hex string `json:"hex"`
} `json:"scriptSig"`
TxinWitness []string `json:"txinwitness,omitempty"` //only for btc
Sequence uint32 `json:"sequence"`
}
types
type RpcVout ¶
type RpcVout struct {
Value float64 `json:"value"`
N int `json:"n"`
ScriptPubKey RpcScriptPubKey `json:"scriptPubKey"`
}
types
Click to show internal directories.
Click to hide internal directories.