Documentation ¶
Index ¶
- Constants
- func SignTransaction(transaction *types.Transaction, scriptGroup *ScriptGroup, ...) error
- type AssetStatus
- type Balance
- type BlockInfo
- type BurnInfo
- type DBDriver
- type DBInfo
- type DaoInfo
- type DaoState
- type DaoStateType
- type Extension
- type ExtraFilter
- type ExtraFilterType
- type GetBalanceResponse
- type GetTransactionInfoResponse
- type HashAlgorithm
- type MercuryInfo
- type NetworkType
- type PaginationResponseTransactionInfo
- type PaginationResponseTransactionView
- type QueryGenericTransactionsResponse
- type Record
- type RecordStatus
- type RecordStatusType
- type ScriptGroup
- type SignAlgorithm
- type SignatureAction
- type SignatureInfo
- type SignatureLocation
- type TransactionInfo
- type TransactionInfoWrapper
- type TransactionType
- type TransactionViewWrapper
- type TransferCompletionResponse
Constants ¶
View Source
const ( ExtraFilterDao ExtraFilterType = "Dao" ExtraFilterCellBase = "CellBase" ExtraFilterFreeze = "Freeze" )
Variables ¶
This section is empty.
Functions ¶
func SignTransaction ¶ added in v0.101.1
func SignTransaction(transaction *types.Transaction, scriptGroup *ScriptGroup, privateKey crypto.Key) error
Types ¶
type AssetStatus ¶ added in v0.43.2
type AssetStatus string
const ( Claimable AssetStatus = "Claimable" Fixed AssetStatus = "Fixed" )
type BlockInfo ¶ added in v0.101.1
type BlockInfo struct { BlockNumber uint64 `json:"block_number"` BlockHash string `json:"block_hash"` ParentHash string `json:"parent_hash"` Timestamp uint64 `json:"timestamp"` Transactions []*TransactionInfo `json:"transactions"` }
type DaoState ¶ added in v0.101.1
type DaoState struct { Type DaoStateType `json:"type"` Value []uint64 `json:"value"` }
func (*DaoState) UnmarshalJSON ¶ added in v0.101.1
type DaoStateType ¶ added in v0.101.1
type DaoStateType = string
const ( DaoStateDeposit DaoStateType = "Deposit" DaoStateWithdraw DaoStateType = "Withdraw" )
type ExtraFilter ¶ added in v0.101.1
type ExtraFilter struct { Type ExtraFilterType `json:"type"` Value *DaoInfo `json:"value"` }
type ExtraFilterType ¶ added in v0.101.1
type ExtraFilterType string
type GetBalanceResponse ¶ added in v0.43.0
type GetTransactionInfoResponse ¶ added in v0.101.1
type GetTransactionInfoResponse struct { Transaction *TransactionInfo `json:"transaction"` Status types.TransactionStatus `json:"status"` RejectReason uint8 `json:"reject_reason"` }
type HashAlgorithm ¶ added in v0.101.1
type HashAlgorithm string
const (
Blake2b HashAlgorithm = "Blake2b"
)
type MercuryInfo ¶ added in v0.101.1
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 NetworkType ¶ added in v0.101.1
type NetworkType string
const ( Mainnet NetworkType = "Mainnet" Testnet NetworkType = "Testnet" Staging NetworkType = "Staging" Dev NetworkType = "Dev" )
type PaginationResponseTransactionInfo ¶ added in v0.101.1
type PaginationResponseTransactionInfo struct { Response []TransactionInfoWrapper `json:"response"` Count big.Int `json:"count"` NextCursor []int `json:"next_cursor"` }
type PaginationResponseTransactionView ¶ added in v0.101.1
type PaginationResponseTransactionView struct { Response []TransactionViewWrapper `json:"response"` Count big.Int `json:"count"` NextCursor []int `json:"next_cursor"` }
type QueryGenericTransactionsResponse ¶ added in v0.43.0
type QueryGenericTransactionsResponse struct { Txs []*TransactionInfo `json:"txs"` TotalCount uint64 `json:"total_count"` NextOffset uint64 `json:"next_offset"` }
type Record ¶ added in v0.101.1
type Record struct { Id string `json:"id"` Ownership *common.Ownership `json:"ownership"` Amount *model.U128 `json:"amount"` Occupied *model.U128 `json:"occupied"` AssetInfo *common.AssetInfo `json:"asset_info"` Status RecordStatus `json:"status"` Extra ExtraFilter `json:"extra"` BlockNumber uint64 `json:"block_number"` EpochNumber uint64 `json:"epoch_number"` }
type RecordStatus ¶ added in v0.101.1
type RecordStatus struct { Type RecordStatusType `json:"type"` Value uint64 `json:"value"` }
type RecordStatusType ¶ added in v0.101.1
type RecordStatusType string
const ( RecordStatusFixed RecordStatusType = "Fixed" RecordStatusClaimable = "Claimable" )
type ScriptGroup ¶
type ScriptGroup struct { Action *SignatureAction Transaction *transactionResp OriginalWitness []byte }
func NewScriptGroup ¶ added in v0.101.1
func NewScriptGroup(action *SignatureAction, transaction *transactionResp) *ScriptGroup
func (*ScriptGroup) GetAddress ¶ added in v0.101.1
func (g *ScriptGroup) GetAddress() string
func (*ScriptGroup) GetGroupWitnesses ¶ added in v0.101.1
func (g *ScriptGroup) GetGroupWitnesses() [][]byte
func (*ScriptGroup) GetOffSet ¶ added in v0.101.1
func (g *ScriptGroup) GetOffSet() int
func (*ScriptGroup) GetWitness ¶ added in v0.101.1
func (g *ScriptGroup) GetWitness() []byte
func (*ScriptGroup) GetWitnessIndex ¶ added in v0.101.1
func (g *ScriptGroup) GetWitnessIndex() int
type SignAlgorithm ¶ added in v0.101.1
type SignAlgorithm string
const (
Secp256k1 SignAlgorithm = "Secp256k1"
)
type SignatureAction ¶ added in v0.101.1
type SignatureAction struct { SignatureLocation *SignatureLocation `json:"signature_location"` SignatureInfo *SignatureInfo `json:"signature_info"` HashAlgorithm *HashAlgorithm `json:"hash_algorithm"` OtherIndexesInGroup []int `json:"other_indexes_in_group"` }
type SignatureInfo ¶ added in v0.101.1
type SignatureInfo struct { Algorithm SignAlgorithm `json:"algorithm"` Address string `json:"address"` }
type SignatureLocation ¶ added in v0.101.1
type TransactionInfo ¶ added in v0.101.1
type TransactionInfoWrapper ¶ added in v0.101.1
type TransactionInfoWrapper struct { Type TransactionType `json:"type"` Value TransactionInfo `json:"value"` }
type TransactionType ¶ added in v0.101.1
type TransactionType string
const ( TransactionTransactionView TransactionType = "TransactionView" TransactionTransactionInfo = "TransactionInfo" )
type TransactionViewWrapper ¶ added in v0.101.1
type TransactionViewWrapper struct { Type TransactionType `json:"type"` Value common.TransactionWithRichStatus `json:"value` }
type TransferCompletionResponse ¶
type TransferCompletionResponse struct { TxView *transactionResp `json:"tx_view"` SignatureActions []*SignatureAction `json:"signature_actions"` }
func (*TransferCompletionResponse) GetScriptGroup ¶
func (self *TransferCompletionResponse) GetScriptGroup() []*ScriptGroup
func (*TransferCompletionResponse) GetTransaction ¶
func (self *TransferCompletionResponse) GetTransaction() *types.Transaction
Click to show internal directories.
Click to hide internal directories.