Documentation ¶
Index ¶
- Constants
- type Asset
- type AssetsBalance
- type AssetsBalanceResponse
- type BalanceResponse
- type BaseClient
- type Block
- type BlockHeightResponse
- type BlockResponse
- type Client
- type ErrorResponse
- type Header
- type Transaction
- type Tx
- type TxPublishResponse
- type TxResponse
- type TxsResponse
- type UiaTransfer
- type Wallet
Constants ¶
View Source
const ( TxType_NSG = 0 // NSG Transactions TxType_SetSecureCode = 1 //Set secure code TxType_Delegate = 2 //Register as a delegator TxType_Vote = 3 //Submit a vote TxType_MultiSig = 4 //multisignature TxType_PublishDAPP = 5 //Publish a dapp in mainnet TxType_DeopsitDAPP = 6 //deposit to a Dapp TxType_WithdrawalDAPP = 7 //withdrawal from a dapp TxType_RegPublisher = 9 //register as a asset publisher TxType_RegAsset = 10 //register an asset in mainnet TxType_IssueAsset = 13 //issue an asset TxType_Asset = 14 //asset transactions )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct {
UiaTransfer *UiaTransfer `json:"uiaTransfer,omitempty"`
}
type AssetsBalance ¶
type AssetsBalanceResponse ¶
type AssetsBalanceResponse struct {
Balance *AssetsBalance `json:"balance"`
}
type BalanceResponse ¶
type BalanceResponse struct {
Balance uint64 `json:"balance"`
}
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) GetBlockHeight ¶
GetBlockHeight get height
type BlockHeightResponse ¶
type BlockResponse ¶
type ErrorResponse ¶
type Header ¶
type Header struct { ID string `json:"id"` // Hash Version uint32 `json:"version"` // Block version information (note, this is signed) Timestamp int64 `json:"timestamp"` // A timestamp recording when this block was created (Will overflow in 2106[2]) Height uint64 `json:"height"` // Height PrevBlock string `json:"previousBlock"` // The hash value of the previous block this particular block references NumberOfTransactions uint32 `json:"numberOfTransactions"` // Number Of Transactions }
type Transaction ¶
type Transaction struct { ID string `json:"id"` Height string `json:"height,omitempty"` BlockID string `json:"blockId,omitempty"` // block id Type uint32 `json:"type"` Timestamp int64 `json:"timestamp"` // A timestamp recording when this block was created (Will overflow in 2106[2]) SenderID string `json:"senderId"` RecipientId string `json:"recipientId"` Amount uint64 `json:"amount"` Fee uint64 `json:"fee"` Signature string `json:"signature"` Signatures []string `json:"signatures,omitempty"` SignSignature string `json:"signSignature,omitempty"` Confirmations string `json:"confirmations,omitempty"` Message string `json:"message"` Asset *Asset `json:"asset,omitempty"` }
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
func (*Tx) BroadcastTx ¶
func (*Tx) GetTransaction ¶
func (tx *Tx) GetTransaction(id string) (*Transaction, error)
func (*Tx) GetTransactionsByBlock ¶
func (tx *Tx) GetTransactionsByBlock(blockId string) ([]*Transaction, error)
type TxPublishResponse ¶
type TxResponse ¶
type TxResponse struct { Success bool `json:"success"` Transaction *Transaction `json:"transaction"` }
type TxsResponse ¶
type TxsResponse struct { Success bool `json:"success"` Transactions []*Transaction `json:"transactions"` }
type UiaTransfer ¶
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func (*Wallet) GetAssetsBalance ¶
func (w *Wallet) GetAssetsBalance(address, currency string) (*AssetsBalance, error)
Click to show internal directories.
Click to hide internal directories.