base

package
v0.0.0-...-505baef Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseClient

type BaseClient struct {
	*rpcclient.Client
	// contains filtered or unexported fields
}

func NewBaseClient

func NewBaseClient(RpcUrl, RpcUser, RpcPass string) (*BaseClient, error)

type BaseDataClient

type BaseDataClient struct {
	ChainShortName string
	ExplorerName   string
	BaseDataCli    *oklink.ChainExplorerAdaptor
}

func NewBaseDataClient

func NewBaseDataClient(baseUrl, apiKey, chainShortName, explorerName string) (*BaseDataClient, error)

func (*BaseDataClient) GetAccountBalance

func (bdc *BaseDataClient) GetAccountBalance(address string) (*account.AccountBalanceResponse, error)

func (*BaseDataClient) GetAccountUtxoList

func (bdc *BaseDataClient) GetAccountUtxoList(address string) ([]account.AccountUtxoResponse, error)

func (*BaseDataClient) GetFee

func (*BaseDataClient) GetTxByHash

func (bdc *BaseDataClient) GetTxByHash(txId string) (*transaction.TxResponse, error)

func (*BaseDataClient) GetTxListByAddress

func (bdc *BaseDataClient) GetTxListByAddress(address string, page, pageSize uint64) (*account.TransactionResponse[account.AccountTxResponse], error)

type ResultRawData

type ResultRawData struct {
	TxId          string `json:"txid"`
	Hash          string `json:"hash"`
	Version       uint64 `json:"version"`
	Size          uint64 `json:"size"`
	VSize         uint64 `json:"vsize"`
	Weight        uint64 `json:"weight"`
	LockTime      uint64 `json:"locktime"`
	Vin           []Vin  `json:"vin"`
	Vout          []Vout `json:"vout"`
	Hex           string `json:"hex"`
	Blockhash     string `json:"blockhash"`
	Confirmations uint64 `json:"confirmations"`
	BlockTime     uint64 `json:"blocktime"`
	Time          uint64 `json:"time"`
}

type ScriptPubKey

type ScriptPubKey struct {
	Asm     string `json:"asm"`
	Hex     string `json:"hex"`
	Desc    string `json:"desc"`
	Address string `json:"addresses"`
	Type    string `json:"type"`
}

type ScriptSig

type ScriptSig struct {
	Asm string `json:"asm"`
	Hex string `json:"hex"`
}

type Vin

type Vin struct {
	TxId        string    `json:"txid"`
	Vout        uint64    `json:"vout"`
	ScriptSig   ScriptSig `json:"scriptSig"`
	Sequence    uint64    `json:"sequence"`
	TxInWitness []string  `json:"txinwitness"`
}

type Vout

type Vout struct {
	Value        interface{}  `json:"value"`
	N            uint64       `json:"n"`
	ScriptPubKey ScriptPubKey `json:"scriptpubkey"`
}

Jump to

Keyboard shortcuts

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