resp

package
v0.101.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 7 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 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"`
	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       uint64                    `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 {
	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 SignatureLocation struct {
	Index  int `json:"index"`
	Offset int `json:"offset"`
}

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"`
	SignatureActions []*SignatureAction `json:"signature_actions"`
}

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