model

package
v0.43.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildScript added in v0.43.0

func BuildScript(hash string, hashType types.ScriptHashType, args string) *types.Script

func NewAdjustAccountPayloadBuilder added in v0.43.2

func NewAdjustAccountPayloadBuilder() *adjustAccountPayloadBuilder

func NewCollectAssetPayloadBuilder added in v0.43.0

func NewCollectAssetPayloadBuilder() *collectAssetPayloadBuilder

func NewGetBalancePayloadBuilder added in v0.43.0

func NewGetBalancePayloadBuilder() *getBalancePayloadBuilder

func NewGetGenericBlockPayloadBuilder added in v0.43.0

func NewGetGenericBlockPayloadBuilder() *getBlockInfoPayloadBuilder

func NewQueryGenericTransactionsPayloadBuilder added in v0.43.0

func NewQueryGenericTransactionsPayloadBuilder() *queryGenericTransactionsPayloadBuilder

func NewSmartTransferPayloadBuilder added in v0.43.2

func NewSmartTransferPayloadBuilder() *smartTransferPayloadBuilder

func NewTransferBuilder added in v0.43.0

func NewTransferBuilder() *transferBuilder

Types

type AdjustAccountPayload added in v0.43.2

type AdjustAccountPayload struct {
	KeyAddress string   `json:"key_address"`
	UdtHashes  []string `json:"udt_hashes"`
	FeeRate    uint     `json:"fee_rate"`
}

type CollectAssetPayload added in v0.43.0

type CollectAssetPayload struct {
	UdtHash     string      `json:"udt_hash,omitempty"`
	FromAddress interface{} `json:"from_address,omitempty"`
	To          ToAddress   `json:"to,omitempty"`
	FeePaidBy   string      `json:"fee_paid_by,omitempty"`
	FeeRate     uint        `json:"fee_rate,omitempty"`
}

type FromKeyAddresses added in v0.43.0

type FromKeyAddresses struct {
	KeyAddresses *keyAddresses `json:"key_addresses"`
}

type FromNormalAddresses added in v0.43.0

type FromNormalAddresses struct {
	NormalAddresses []string `json:"normal_addresses"`
}

type GetBalancePayload added in v0.43.0

type GetBalancePayload struct {
	UdtHashes []interface{} `json:"udt_hashes"`
	BlockNum  uint          `json:"block_num,omitempty"`
	Address   QueryAddress  `json:"address"`
}

type GetBlockInfoPayload added in v0.43.2

type GetBlockInfoPayload struct {
	BlockNum  uint64 `json:"block_num,omitempty"`
	BlockHash string `json:"block_hash,omitempty"`
}

type KeyAddress added in v0.43.0

type KeyAddress struct {
	KeyAddress string
}

Only addresses in secp256k1 format are available, and the balance contains the balance of addresses in other formats.

func (*KeyAddress) GetAddress added in v0.43.0

func (addr *KeyAddress) GetAddress() string

type NormalAddress added in v0.43.0

type NormalAddress struct {
	NormalAddress string
}

Only the balance of the address in the corresponding format is available. For example, the secp256k1 address will only query the balance of the secp256k1 format, and will not contain the balance of the remaining formats.

func (*NormalAddress) GetAddress added in v0.43.0

func (addr *NormalAddress) GetAddress() string

type QueryAddress added in v0.43.0

type QueryAddress interface {
	GetAddress() string
}

type QueryGenericTransactionsPayload added in v0.43.0

type QueryGenericTransactionsPayload struct {
	Address   QueryAddress  `json:"address"`
	UdtHashes []interface{} `json:"udt_hashes"`
	FromBlock uint64        `json:"from_block,omitempty"`
	ToBlock   uint64        `json:"to_block,omitempty"`
	Limit     uint64        `json:"limit,omitempty"`
	Offset    uint64        `json:"offset,omitempty"`
	Order     string        `json:"order,omitempty"`
}

type SearchKeyBuilder added in v0.43.0

type SearchKeyBuilder struct {
	Script     *types.Script
	ScriptType indexer.ScriptType
	ArgsLen    uint
	Filter     *indexer.CellsFilter
}

func (*SearchKeyBuilder) AddArgsLen added in v0.43.0

func (builder *SearchKeyBuilder) AddArgsLen(argsLen uint)

func (*SearchKeyBuilder) AddFilterBlockRange added in v0.43.0

func (builder *SearchKeyBuilder) AddFilterBlockRange(inclusive, exclusive uint64)

func (*SearchKeyBuilder) AddFilterOutputCapacityRange added in v0.43.0

func (builder *SearchKeyBuilder) AddFilterOutputCapacityRange(inclusive, exclusive uint64)

func (*SearchKeyBuilder) AddFilterOutputDataLenRange added in v0.43.0

func (builder *SearchKeyBuilder) AddFilterOutputDataLenRange(inclusive, exclusive uint64)

func (*SearchKeyBuilder) AddFilterScript added in v0.43.0

func (builder *SearchKeyBuilder) AddFilterScript(script *types.Script)

func (*SearchKeyBuilder) AddScript added in v0.43.0

func (builder *SearchKeyBuilder) AddScript(script *types.Script)

func (*SearchKeyBuilder) AddScriptType added in v0.43.0

func (builder *SearchKeyBuilder) AddScriptType(scriptType indexer.ScriptType)

func (*SearchKeyBuilder) Build added in v0.43.0

func (builder *SearchKeyBuilder) Build() *indexer.SearchKey

type SmartTo added in v0.43.2

type SmartTo struct {
	Address string
	Amount  *big.Int
}

type SmartTransferPayload added in v0.43.2

type SmartTransferPayload struct {
	AssetInfo *common.AssetInfo
	From      []string
	To        []*SmartTo
	Change    string
	FeeRate   uint
}

type ToAddress added in v0.43.0

type ToAddress interface {
	IsPayBayFrom() bool
}

type ToKeyAddress added in v0.43.0

type ToKeyAddress struct {
	KeyAddress *keyAddress `json:"key_address"`
}

func (*ToKeyAddress) IsPayBayFrom added in v0.43.0

func (address *ToKeyAddress) IsPayBayFrom() bool

type ToNormalAddress added in v0.43.0

type ToNormalAddress struct {
	NormalAddress string `json:"normal_address"`
}

func (*ToNormalAddress) IsPayBayFrom added in v0.43.0

func (address *ToNormalAddress) IsPayBayFrom() bool

type TransferItem

type TransferItem struct {
	To     ToAddress `json:"to"`
	Amount *big.Int  `json:"amount"`
}

type TransferPayload

type TransferPayload struct {
	UdtHash string          `json:"udt_hash,omitempty"`
	From    interface{}     `json:"from"`
	Items   []*TransferItem `json:"items"`
	Change  string          `json:"change,omitempty"`
	FeeRate uint            `json:"fee_rate"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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