common

package
v0.101.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetInfo

type AssetInfo struct {
	AssetType AssetType `json:"asset_type"`
	UdtHash   string    `json:"udt_hash"`
}

func NewCkbAsset

func NewCkbAsset() *AssetInfo

func NewUdtAsset

func NewUdtAsset(udtHash string) *AssetInfo

type AssetType

type AssetType string
const (
	CKB AssetType = "CKB"
	UDT           = "UDT"
)

type CellDep added in v0.101.1

type CellDep struct {
	OutPoint OutPoint      `json:"out_point"`
	DepType  types.DepType `json:"dep_type"`
}

type CellInput added in v0.101.1

type CellInput struct {
	Since          hexutil.Uint64 `json:"since"`
	PreviousOutput OutPoint       `json:"previous_output"`
}

type CellOutput added in v0.101.1

type CellOutput struct {
	Capacity hexutil.Uint64 `json:"capacity"`
	Lock     *Script        `json:"lock"`
	Type     *Script        `json:"type"`
}

type ExtraFilterType added in v0.101.1

type ExtraFilterType string
const (
	ExtraFilterDao      ExtraFilterType = "Dao"
	ExtraFilterCellBase                 = "CellBase"
)

type OutPoint added in v0.101.1

type OutPoint struct {
	TxHash types.Hash   `json:"tx_hash"`
	Index  hexutil.Uint `json:"index"`
}

type Ownership added in v0.101.1

type Ownership struct {
	Type  OwnershipType `json:"type"`
	Value string        `json:"value"`
}

type OwnershipType added in v0.101.1

type OwnershipType string
const (
	OwnershipAddress  OwnershipType = "Address"
	OwnershipLockhash               = "LockHash"
)

type Script added in v0.101.1

type Script struct {
	CodeHash types.Hash           `json:"code_hash"`
	HashType types.ScriptHashType `json:"hash_type"`
	Args     hexutil.Bytes        `json:"args"`
}

type Transaction added in v0.101.1

type Transaction struct {
	Version     hexutil.Uint    `json:"version"`
	Hash        types.Hash      `json:"hash"`
	CellDeps    []CellDep       `json:"cell_deps"`
	HeaderDeps  []types.Hash    `json:"header_deps"`
	Inputs      []CellInput     `json:"inputs"`
	Outputs     []CellOutput    `json:"outputs"`
	OutputsData []hexutil.Bytes `json:"outputs_data"`
	Witnesses   []hexutil.Bytes `json:"witnesses"`
}

type TransactionWithRichStatus added in v0.101.1

type TransactionWithRichStatus struct {
	Transaction Transaction  `json:"transaction"`
	TxStatus    TxRichStatus `json:"tx_status"`
}

type TxRichStatus added in v0.101.1

type TxRichStatus struct {
	Status    types.TransactionStatus `json:"status"`
	BlockHash string                  `json:"block_hash"`
	Reason    string                  `json:"reason"`
	Timestamp uint64                  `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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