Documentation ¶
Index ¶
- Constants
- type AccountInfo
- type AccountType
- type AssetInfo
- type AssetType
- type Balance
- type BlockInfo
- type BlockRange
- type BuildAdjustAccountPayload
- type BuildSudtIssueTransactionPayload
- type BurnInfo
- type DBDriver
- type DBInfo
- type DaoClaimPayload
- type DaoDepositPayload
- type DaoInfo
- type DaoState
- type DaoStateType
- type DaoWithdrawPayload
- type Extension
- type ExtraFilter
- type ExtraFilterType
- type GetAccountInfoPayload
- type GetBalancePayload
- type GetBalanceResponse
- type GetBlockInfoPayload
- type GetSpentTransactionPayload
- type GetTransactionInfoResponse
- type IoType
- type Item
- func NewAddressItem(addr string) (*Item, error)
- func NewIdentityItemByAddress(address string) (*Item, error)
- func NewIdentityItemByCkb(publicKeyHash string) (*Item, error)
- func NewIdentityItemByPublicKeyHash(publicKeyHash string) (*Item, error)
- func NewOutPointItem(txHash types.Hash, index uint) *Item
- type ItemType
- type MercuryInfo
- type MercurySyncState
- type NetworkType
- type Order
- type OutputCapacityProvider
- type PaginationRequest
- type PaginationResponseTransactionInfo
- type PaginationResponseTransactionWithRichStatus
- type PayFee
- type QueryTransactionsPayload
- type Record
- type SimpleTransferPayload
- type SinceConfig
- type SinceFlag
- type SinceType
- type StructureType
- type SyncState
- type ToInfo
- type TransactionInfo
- type TransactionInfoWrapper
- type TransactionWithRichStatus
- type TransactionWithRichStatusWrapper
- type TransferPayload
- type TxRichStatus
- type TxViewType
Constants ¶
View Source
const ( ItemTypeAddress ItemType = "Address" ItemTypeIdentity = "Identity" ItemTypeOutPoint = "OutPoint" )
View Source
const ( ExtraFilterTypeDao ExtraFilterType = "Dao" ExtraFilterTypeCellbase ExtraFilterType = "Cellbase" ExtraFilterTypeFrozen ExtraFilterType = "Frozen" OrderAsc Order = "Asc" OrderDesc Order = "Desc" PayFeeFrom PayFee = "From" PayFeeTo PayFee = "To" OutputCapacityProviderFrom OutputCapacityProvider = "From" OutputCapacityProviderTo OutputCapacityProvider = "To" StructureTypeNative StructureType = "Native" StructureTypeDoubleEntry StructureType = "DoubleEntry" SinceTypeBlockNumber SinceType = "BlockNumber" SinceTypeEpochNumber SinceType = "EpochNumber" SinceTypeTimestamp SinceType = "Timestamp" SinceFlagRelative SinceFlag = "Relative" SinceFlagAbsolute SinceFlag = "Absolute" )
View Source
const ( IoTypeInput IoType = "Input" IoTypeOutput IoType = "Output" DaoStateTypeDeposit DaoStateType = "Deposit" DaoStateTypeWithdraw DaoStateType = "Withdraw" AccountTypeAcp AccountType = "Acp" AccountTypePwLock AccountType = "PwLock" DBDriverPostgreSQL DBDriver = "PostgreSQL" DBDriverMySQL DBDriver = "MySQL" DBDriverSQLite DBDriver = "SQLite" NetworkTypeMainnet NetworkType = "Mainnet" NetworkTypeTestnet NetworkType = "Testnet" NetworkTypeStaging NetworkType = "Staging" NetworkTypeDev NetworkType = "Dev" SyncStateReadOnly SyncState = "ReadOnly" SyncStateSerial SyncState = "Serial" SyncStateParallelFirstStage SyncState = "ParallelFirstStage" SyncStateParallelSecondStage SyncState = "ParallelSecondStage" TxViewTypeTransactionWithRichStatus TxViewType = "TransactionWithRichStatus" TxViewTypeTransactionInfo TxViewType = "TransactionInfo" )
View Source
const (
IdentityFlagsCkb byte = 0x00
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountInfo ¶
type AccountInfo struct { AccountNumber uint32 `json:"account_number"` AccountAddress string `json:"account_address"` AccountType AccountType `json:"account_type"` }
func (*AccountInfo) UnmarshalJSON ¶
func (r *AccountInfo) UnmarshalJSON(input []byte) error
type AccountType ¶
type AccountType string
type AssetInfo ¶
type AssetInfo struct { AssetType AssetType `json:"asset_type"` UdtHash types.Hash `json:"udt_hash"` }
func NewCkbAsset ¶
func NewCkbAsset() *AssetInfo
func NewUdtAsset ¶
type Balance ¶
type Balance struct { Ownership string `json:"ownership"` AssetInfo *AssetInfo `json:"asset_info"` Free *big.Int `json:"free"` Occupied *big.Int `json:"occupied"` Frozen *big.Int `json:"frozen"` }
func (*Balance) UnmarshalJSON ¶
type BlockInfo ¶
type BlockInfo struct { BlockNumber uint64 `json:"block_number"` BlockHash types.Hash `json:"block_hash"` ParentHash types.Hash `json:"parent_hash"` Timestamp uint64 `json:"timestamp"` Transactions []*TransactionInfo `json:"transactions"` }
func (*BlockInfo) UnmarshalJSON ¶
type BlockRange ¶
func (BlockRange) MarshalJSON ¶
func (r BlockRange) MarshalJSON() ([]byte, error)
type BuildAdjustAccountPayload ¶
type BuildAdjustAccountPayload struct { Item *Item `json:"item"` From []*Item `json:"from"` AssetInfo *AssetInfo `json:"asset_info"` AccountNumber uint32 `json:"account_number,omitempty"` ExtraCKB uint64 `json:"extra_ckb,omitempty"` FeeRate uint64 `json:"fee_rate,omitempty"` }
func (BuildAdjustAccountPayload) MarshalJSON ¶
func (r BuildAdjustAccountPayload) MarshalJSON() ([]byte, error)
type BuildSudtIssueTransactionPayload ¶
type BuildSudtIssueTransactionPayload struct { Owner string `json:"owner"` From []*Item `json:"from"` To []*ToInfo `json:"to"` OutputCapacityProvider OutputCapacityProvider `json:"output_capacity_provider,omitempty"` FeeRate uint64 `json:"fee_rate,omitempty"` Since *SinceConfig `json:"since,omitempty"` }
func (BuildSudtIssueTransactionPayload) MarshalJSON ¶
func (r BuildSudtIssueTransactionPayload) MarshalJSON() ([]byte, error)
type BurnInfo ¶
func (*BurnInfo) UnmarshalJSON ¶
type DaoClaimPayload ¶
type DaoClaimPayload struct { From []*Item `json:"from"` To string `json:"to,omitempty"` FeeRate uint64 `json:"fee_rate,omitempty"` }
func (DaoClaimPayload) MarshalJSON ¶
func (r DaoClaimPayload) MarshalJSON() ([]byte, error)
type DaoDepositPayload ¶
type DaoDepositPayload struct { From []*Item `json:"from"` To string `json:"to,omitempty"` Amount uint64 `json:"amount"` FeeRate uint64 `json:"fee_rate,omitempty"` }
func (DaoDepositPayload) MarshalJSON ¶
func (r DaoDepositPayload) MarshalJSON() ([]byte, error)
type DaoInfo ¶
func (*DaoInfo) UnmarshalJSON ¶
type DaoState ¶
type DaoState struct { Type DaoStateType `json:"type"` Value []uint64 `json:"value"` }
func (*DaoState) UnmarshalJSON ¶
type DaoStateType ¶
type DaoStateType = string
type DaoWithdrawPayload ¶
type DaoWithdrawPayload struct { From []*Item `json:"from"` FeeRate uint64 `json:"fee_rate,omitempty"` }
func (DaoWithdrawPayload) MarshalJSON ¶
func (r DaoWithdrawPayload) MarshalJSON() ([]byte, error)
type ExtraFilter ¶
type ExtraFilter struct { Type ExtraFilterType `json:"type"` Value *DaoInfo `json:"value,omitempty"` }
type ExtraFilterType ¶
type ExtraFilterType string
type GetAccountInfoPayload ¶
type GetBalancePayload ¶
type GetBalancePayload struct { AssetInfos []*AssetInfo `json:"asset_infos"` TipBlockNumber uint64 `json:"tip_block_number,omitempty"` Item *Item `json:"item"` Extra *ExtraFilterType `json:"extra,omitempty"` }
func (GetBalancePayload) MarshalJSON ¶
func (r GetBalancePayload) MarshalJSON() ([]byte, error)
type GetBalanceResponse ¶
type GetBalanceResponse struct { Balances []*Balance `json:"balances"` TipBlockNumber uint64 `json:"tip_block_number"` }
func (*GetBalanceResponse) UnmarshalJSON ¶
func (r *GetBalanceResponse) UnmarshalJSON(input []byte) error
type GetBlockInfoPayload ¶
type GetBlockInfoPayload struct { BlockNumber uint64 `json:"block_number,omitempty"` BlockHash types.Hash `json:"block_hash,omitempty"` }
func (GetBlockInfoPayload) MarshalJSON ¶
func (r GetBlockInfoPayload) MarshalJSON() ([]byte, error)
type GetSpentTransactionPayload ¶
type GetSpentTransactionPayload struct { OutPoint types.OutPoint `json:"outpoint"` StructureType StructureType `json:"structure_type"` }
type GetTransactionInfoResponse ¶
type GetTransactionInfoResponse struct { Transaction *TransactionInfo `json:"transaction,omitempty"` Status types.TransactionStatus `json:"status"` }
type Item ¶
type Item struct { Type ItemType `json:"type"` Value interface{} `json:"value"` }
func NewAddressItem ¶
func NewIdentityItemByCkb ¶
type MercuryInfo ¶
type MercuryInfo struct { MercuryVersion string `json:"mercury_version"` CkbNodeVersion string `json:"ckb_node_version"` NetworkType NetworkType `json:"network_type"` EnabledExtensions []Extension `json:"enabled_extensions"` }
type MercurySyncState ¶
type NetworkType ¶
type NetworkType string
type OutputCapacityProvider ¶
type OutputCapacityProvider string
type PaginationRequest ¶
type PaginationRequest struct { Cursor uint64 `json:"cursor,omitempty"` Order Order `json:"order"` Limit uint64 `json:"limit,omitempty"` ReturnCount bool `json:"return_count"` }
func (PaginationRequest) MarshalJSON ¶
func (r PaginationRequest) MarshalJSON() ([]byte, error)
type PaginationResponseTransactionInfo ¶
type PaginationResponseTransactionInfo struct { Response []*TransactionInfoWrapper `json:"response"` Count *uint64 `json:"count,omitempty"` NextCursor *uint64 `json:"next_cursor,omitempty"` }
func (*PaginationResponseTransactionInfo) UnmarshalJSON ¶
func (r *PaginationResponseTransactionInfo) UnmarshalJSON(input []byte) error
type PaginationResponseTransactionWithRichStatus ¶
type PaginationResponseTransactionWithRichStatus struct { Response []*TransactionWithRichStatusWrapper `json:"response"` Count *uint64 `json:"count,omitempty"` NextCursor *uint64 `json:"next_cursor,omitempty"` }
func (*PaginationResponseTransactionWithRichStatus) UnmarshalJSON ¶
func (r *PaginationResponseTransactionWithRichStatus) UnmarshalJSON(input []byte) error
type QueryTransactionsPayload ¶
type QueryTransactionsPayload struct { Item *Item `json:"item"` AssetInfos []*AssetInfo `json:"asset_infos"` Extra *ExtraFilterType `json:"extra,omitempty"` BlockRange *BlockRange `json:"block_range,omitempty"` Pagination *PaginationRequest `json:"pagination"` StructureType StructureType `json:"structure_type"` }
type Record ¶
type Record struct { OutPoint *types.OutPoint `json:"out_point"` Ownership string `json:"ownership"` IoType IoType `json:"io_type"` Amount *big.Int `json:"amount"` Occupied *big.Int `json:"occupied"` AssetInfo *AssetInfo `json:"asset_info"` Extra *ExtraFilter `json:"extra,omitempty"` BlockNumber uint64 `json:"block_number"` EpochNumber uint64 `json:"epoch_number"` }
func (*Record) UnmarshalJSON ¶
type SimpleTransferPayload ¶
type SimpleTransferPayload struct { AssetInfo *AssetInfo `json:"asset_info"` From []string `json:"from"` To []*ToInfo `json:"to"` FeeRate uint64 `json:"fee_rate,omitempty"` Since *SinceConfig `json:"since,omitempty"` }
func (SimpleTransferPayload) MarshalJSON ¶
func (r SimpleTransferPayload) MarshalJSON() ([]byte, error)
type SinceConfig ¶
type SinceConfig struct { Flag SinceFlag `json:"flag"` Type SinceType `json:"type_"` Value uint64 `json:"value"` }
func (SinceConfig) MarshalJSON ¶
func (r SinceConfig) MarshalJSON() ([]byte, error)
type StructureType ¶
type StructureType string
type ToInfo ¶
func (ToInfo) MarshalJSON ¶
type TransactionInfo ¶
type TransactionInfo struct { TxHash types.Hash `json:"tx_hash"` Records []*Record `json:"records"` Fee uint64 `json:"fee"` Burn []*BurnInfo `json:"burn"` Timestamp uint64 `json:"timestamp"` }
func (*TransactionInfo) UnmarshalJSON ¶
func (r *TransactionInfo) UnmarshalJSON(input []byte) error
type TransactionInfoWrapper ¶
type TransactionInfoWrapper struct { Type TxViewType `json:"type"` Value *TransactionInfo `json:"value"` }
type TransactionWithRichStatus ¶
type TransactionWithRichStatus struct { Transaction *types.Transaction `json:"transaction,omitempty"` TxStatus TxRichStatus `json:"tx_status"` }
type TransactionWithRichStatusWrapper ¶
type TransactionWithRichStatusWrapper struct { Type TxViewType `json:"type"` Value *TransactionWithRichStatus `json:"value"` }
type TransferPayload ¶
type TransferPayload struct { AssetInfo *AssetInfo `json:"asset_info,omitempty"` From []*Item `json:"from"` To []*ToInfo `json:"to"` OutputCapacityProvider OutputCapacityProvider `json:"output_capacity_provider,omitempty"` PayFee PayFee `json:"pay_fee,omitempty"` FeeRate uint64 `json:"fee_rate,omitempty"` Since *SinceConfig `json:"since,omitempty"` }
func (TransferPayload) MarshalJSON ¶
func (r TransferPayload) MarshalJSON() ([]byte, error)
type TxRichStatus ¶
type TxRichStatus struct { Status types.TransactionStatus `json:"status"` BlockHash *types.Hash `json:"block_hash,omitempty"` Reason *string `json:"reason,omitempty"` Timestamp *uint64 `json:"timestamp,omitempty"` }
func (*TxRichStatus) UnmarshalJSON ¶
func (r *TxRichStatus) UnmarshalJSON(input []byte) error
type TxViewType ¶
type TxViewType string
Click to show internal directories.
Click to hide internal directories.