resp

package
v0.100.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 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 AssetStatus added in v0.43.2

type AssetStatus string
const (
	Claimable AssetStatus = "Claimable"
	Fixed     AssetStatus = "Fixed"
)

type Balance

type Balance struct {
	AddressOrLockHash *common.AddressOrLockHash `json:"address_or_lock_hash"`
	AssetInfo         *common.AssetInfo         `json:"asset_info"`
	Free              *model.U128               `json:"free"`
	Occupied          *model.U128               `json:"occupied"`
	Freezed           *model.U128               `json:"freezed"`
	Claimable         *model.U128               `json:"claimable"`
}

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 BurnInfo added in v0.101.1

type BurnInfo struct {
	UdtHash string      `json:"udt_hash"`
	Amount  *model.U128 `json:"amount"`
}

type DBDriver added in v0.101.1

type DBDriver string
const (
	PostgreSQL DBDriver = "PostgreSQL"
	MySQL      DBDriver = "MySQL"
	SQLite     DBDriver = "SQLite"
)

type DBInfo added in v0.101.1

type DBInfo struct {
	Version   string   `json:"version"`
	DB        DBDriver `json:"db"`
	ConnSize  uint32   `json:"conn_size"`
	CenterId  int64    `json:"center_id"`
	MachineId int64    `json:"machine_id"`
}

type DaoInfo added in v0.101.1

type DaoInfo struct {
	DepositBlockNumber  uint64
	WithdrawBlockNumber uint64
	DaoState            DaoState
	Reward              uint64
}

type DaoState added in v0.101.1

type DaoState = string
const (
	Deposit  DaoState = "Deposit"
	Withdraw DaoState = "Withdraw"
)

type Extension added in v0.101.1

type Extension struct {
	Name     string          `json:"name"`
	Scripts  []types.Script  `json:"scripts"`
	CellDeps []types.CellDep `json:"cell_deps"`
}

type ExtraFilter added in v0.101.1

type ExtraFilter struct {
	DaoInfo   *DaoInfo
	ExtraType common.ExtraType
}

func (*ExtraFilter) UnmarshalJSON

func (e *ExtraFilter) UnmarshalJSON(bytes []byte) error

type GetBalanceResponse added in v0.43.0

type GetBalanceResponse struct {
	Balances       []*Balance `json:"balances"`
	TipBlockNumber uint64     `json:"tip_block_number"`
}

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 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"`
	AddressOrLockHash *common.AddressOrLockHash `json:"address_or_lock_hash"`
	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       []byte                    `json:"epoch_number"`
}

type RecordStatus added in v0.101.1

type RecordStatus struct {
	Status      AssetStatus
	BlockNumber uint64
}

func (*RecordStatus) UnmarshalJSON

func (r *RecordStatus) UnmarshalJSON(bytes []byte) error

type ScriptGroup

type ScriptGroup struct {
	Group       []int
	WitnessArgs *types.WitnessArgs
	PubKey      string
}

type SignatureEntry

type SignatureEntry struct {
	Type     string `json:"type"`
	Index    int    `json:"index"`
	PubKey   string `json:"pub_key"`
	GroupLen int    `json:"group_len"`
}

type TransactionInfo added in v0.101.1

type TransactionInfo struct {
	TxHash  string      `json:"tx_hash"`
	Records []Record    `json:"records"`
	Fee     int64       `json:"fee"`
	Burn    []*BurnInfo `json:"burn"`
}

type TransactionInfoWrapper added in v0.101.1

type TransactionInfoWrapper struct {
	TransactionInfo TransactionInfo `json:"TransactionInfo"`
}

type TransactionViewWrapper added in v0.101.1

type TransactionViewWrapper struct {
	TransactionView common.TransactionWithStatus `json:"TransactionView"`
}

type TransferCompletionResponse

type TransferCompletionResponse struct {
	TxView    *transactionResp  `json:"tx_view"`
	SigsEntry []*SignatureEntry `json:"signature_entries"`
}

func (*TransferCompletionResponse) GetScriptGroup

func (self *TransferCompletionResponse) GetScriptGroup() []*ScriptGroup

func (*TransferCompletionResponse) GetTransaction

func (self *TransferCompletionResponse) GetTransaction() *types.Transaction

Jump to

Keyboard shortcuts

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