Documentation ¶
Index ¶
- type Balance
- type BaseClient
- type Block
- type BlockResponse
- type Client
- type ErrorResponse
- type Header
- type Tx
- func (tx *Tx) GetByHashList(hashes ...string) ([]TxResponse, error)
- func (tx *Tx) GetHashListByAddress(address string) ([]string, error)
- func (tx *Tx) GetHashListByHeight(height int) ([]string, error)
- func (tx *Tx) Publish(txData crypto.Tx) (*TxPublishResponse, error)
- func (tx *Tx) Validate(txData crypto.Tx) error
- type TxPublishResponse
- type TxResponse
- type Wallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseClient ¶
type BaseClient struct {
// contains filtered or unexported fields
}
func (*BaseClient) ReadResponse ¶
func (bk *BaseClient) ReadResponse(resp *resty.Response) ([]byte, error)
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
func (*Block) GetByHeight ¶
func (blk *Block) GetByHeight(height uint32) (*BlockResponse, error)
type BlockResponse ¶
type ErrorResponse ¶
type Header ¶
type Header struct { Type uint32 `json:"type"` // Block type Hash string `json:"hash"` // Hash Height uint32 `json:"height"` // Height Size uint64 `json:"size"` // Size Version uint32 `json:"version"` // Block version information (note, this is signed) PrevBlock string `json:"prev_block"` // The hash value of the previous block this particular block references MerkleRoot string `json:"merkle_root"` // The reference to a Merkle tree collection which is a hash of all transactions related to this block Timestamp uint32 `json:"timestamp"` // A timestamp recording when this block was created (Will overflow in 2106[2]) Bits uint32 `json:"bits"` // Not used Nonce uint32 `json:"nonce"` // The nonce used to generate this block… to allow variations of the header and compute different hashes Seed string `json:"seed"` // The random seed, not used TxnCount uint32 `json:"txn_count"` // Transaction count AdviceCount uint32 `json:"advice_count"` // Advise list count Script string `json:"script"` // The node's (block owner) signature }
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
func (*Tx) GetByHashList ¶
func (tx *Tx) GetByHashList(hashes ...string) ([]TxResponse, error)
func (*Tx) GetHashListByAddress ¶
type TxPublishResponse ¶
type TxPublishResponse struct {
Result string `json:"result"`
}
type TxResponse ¶
type TxResponse struct { Size uint32 `json:"size"` Block string `json:"block"` // block hash Confirmed uint32 `json:"confirmed"` ConfirmedTimestamp uint32 `json:"confirmed_timestamp"` Total int `json:"total,omitempty"` *crypto.Tx }
func (*TxResponse) UnmarshalJSON ¶
func (txr *TxResponse) UnmarshalJSON(data []byte) error
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func (*Wallet) GetUnspent ¶
func (w *Wallet) GetUnspent(address string) ([]*crypto.TransactionInputOutpoint, error)
Click to show internal directories.
Click to hide internal directories.