types

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	SignerId            string             `json:"signer_id"`
	SignerPublicKey     string             `json:"signer_public_key"`
	GasPrice            *BigInt            `json:"gas_price"`
	OutputDataReceivers []DataReceiverView `json:"output_data_receivers"`
	InputDataIds        []string           `json:"input_data_ids"`
	Actions             []ActionView       `json:"actions"`
}

type ActionView

type ActionView map[string]interface{}

func (*ActionView) GetFunctionCall

func (actionView *ActionView) GetFunctionCall() *FunctionCall

func (*ActionView) IsDeployContract

func (actionView *ActionView) IsDeployContract() bool

func (*ActionView) IsFunctionCall

func (actionView *ActionView) IsFunctionCall() bool

func (*ActionView) IsStake

func (actionView *ActionView) IsStake() bool

func (*ActionView) IsTransfer

func (actionView *ActionView) IsTransfer() bool

type BigInt

type BigInt struct {
	big.Int
}

func (BigInt) MarshalJSON

func (b BigInt) MarshalJSON() (string, error)

func (*BigInt) UnmarshalJSON

func (b *BigInt) UnmarshalJSON(p string) error

type BlockHeaderView

type BlockHeaderView struct {
	Height            uint64  `json:"height"`
	PrevHeight        *uint64 `json:"prev_height"`
	EpochId           string  `json:"epoch_id"`
	NextEpochId       string  `json:"next_epoch_id"`
	Hash              string  `json:"hash"`
	PrevHash          string  `json:"prev_hash"`
	PrevStateRoot     string  `json:"prev_state_root"`
	ChunkReceiptsRoot string  `json:"chunk_receipts_root"`
	ChunkHeadersRoot  string  `json:"chunk_headers_root"`
	ChunkTxRoot       string  `json:"chunk_tx_root"`
	OutcomeRoot       string  `json:"outcome_root"`
	ChunksIncluded    uint64  `json:"chunks_included"`
	ChallengesRoot    string  `json:"challenges_root"`
	Timestamp         uint64  `json:"timestamp"`
	TimestampNanosec  uint64  `json:"timestamp_nanosec,string"`
	RandomValue       string  `json:"random_value"`
	ChunkMask         []bool  `json:"chunk_mask"`
	GasPrice          *BigInt `json:"gas_price"`
	BlockOrdinal      *uint64 `json:"block_ordinal"`
	RentPaid          *BigInt `json:"rent_paid"`
	ValidatorReward   *BigInt `json:"validator_reward"`
	TotalSupply       *BigInt `json:"total_supply"`
	LastFinalBlock    string  `json:"last_final_block"`
	LastDsFinalBlock  string  `json:"last_ds_final_block"`
	NextBpHash        string  `json:"next_bp_hash"`
	BlockMerkleRoot   string  `json:"block_merkle_root"`
}

type BlockView

type BlockView struct {
	Author string            `json:"author"`
	Header BlockHeaderView   `json:"header"`
	Chunks []ChunkHeaderView `json:"chunks"`
}

type ChunkHeaderView

type ChunkHeaderView struct {
	ChunkHash            string  `json:"chunk_hash"`
	PrevBlockHash        string  `json:"prev_block_hash"`
	OutcomeRoot          string  `json:"outcome_root"`
	PrevStateRoot        string  `json:"prev_state_root"`
	EncodedMerkleRoot    string  `json:"encoded_merkle_root"`
	EncodedLength        uint64  `json:"encoded_length"`
	HeightCreated        uint64  `json:"height_created"`
	HeightIncluded       uint64  `json:"height_included"`
	ShardId              uint64  `json:"shard_id"`
	GasUsed              uint64  `json:"gas_used"`
	GasLimit             uint64  `json:"gas_limit"`
	RentPaid             *BigInt `json:"rent_paid"`
	ValidatorReward      *BigInt `json:"validator_reward"`
	BalanceBurnt         *BigInt `json:"balance_burnt"`
	OutgoingReceiptsRoot string  `json:"outgoing_receipts_root"`
	TxRoot               string  `json:"tx_root"`
	Signature            string  `json:"signature"`
}

type CostGasUsed

type CostGasUsed struct {
	CostCategory string  `json:"cost_category"`
	Cost         string  `json:"cost"`
	GasUsed      *BigInt `json:"gas_used"`
}

type Data

type Data struct {
	DataId string
	Data   []uint8
}

type DataReceiverView

type DataReceiverView struct {
	DataId     string `json:"data_id"`
	ReceiverId string `json:"receiver_id"`
}

type DeployContract

type DeployContract struct {
	Code string `json:"code"`
}

type ExecutionMetadataView

type ExecutionMetadataView struct {
	Version    uint32        `json:"version"`
	GasProfile []CostGasUsed `json:"gas_profile"`
}

type ExecutionOutcomeView

type ExecutionOutcomeView struct {
	Logs        []string              `json:"logs"`
	ReceiptIds  []string              `json:"receipt_ids"`
	GasBurnt    uint64                `json:"gas_burnt"`
	TokensBurnt *BigInt               `json:"tokens_burnt"`
	ExecutorId  string                `json:"executor_id"`
	Status      Status                `json:"status"`
	Metadata    ExecutionMetadataView `json:"metadata"`
}

type ExecutionOutcomeWithIdView

type ExecutionOutcomeWithIdView struct {
	Proof     []interface{}        `json:"proof"`
	BlockHash string               `json:"block_hash"`
	Id        string               `json:"id"`
	Outcome   ExecutionOutcomeView `json:"outcome"`
}

type FunctionCall

type FunctionCall struct {
	MethodName string  `json:"method_name"`
	Args       string  `json:"args"`
	Gas        *BigInt `json:"gas"`
	Deposit    *BigInt `json:"deposit"`
}

type IndexerChunkView

type IndexerChunkView struct {
	Author       string                          `json:"author"`
	Header       ChunkHeaderView                 `json:"header"`
	Transactions []IndexerTransactionWithOutcome `json:"transactions"`
	Receipts     []ReceiptView                   `json:"receipts"`
}

type IndexerExecutionOutcomeWithOptionalReceipt

type IndexerExecutionOutcomeWithOptionalReceipt struct {
	ExecutionOutcome ExecutionOutcomeWithIdView `json:"execution_outcome"`
	Receipt          ReceiptView                `json:"receipt"`
}

type IndexerExecutionOutcomeWithReceipt

type IndexerExecutionOutcomeWithReceipt struct {
	ExecutionOutcome ExecutionOutcomeWithIdView `json:"execution_outcome"`
	Receipt          ReceiptView                `json:"receipt"`
}

type IndexerShard

type IndexerShard struct {
	ShardId                  uint64                               `json:"shard_id"`
	Chunk                    *IndexerChunkView                    `json:"chunk"`
	ReceiptExecutionOutcomes []IndexerExecutionOutcomeWithReceipt `json:"receipt_execution_outcomes"`
	StateChanges             []StateChangeView                    `json:"state_changes"`
}

type IndexerTransactionWithOutcome

type IndexerTransactionWithOutcome struct {
	Transaction SignedTransactionView                      `json:"transaction"`
	Outcome     IndexerExecutionOutcomeWithOptionalReceipt `json:"outcome"`
}

type Receipt

type Receipt map[string]interface{}

func (Receipt) GetAction

func (receipt Receipt) GetAction() *Action

func (Receipt) GetData

func (receipt Receipt) GetData() *Data

func (Receipt) IsAction

func (receipt Receipt) IsAction() bool

func (Receipt) IsData

func (receipt Receipt) IsData() bool

type ReceiptEnumView

type ReceiptEnumView struct {
	SignerId            string             `json:"signer_id"`
	SignerPublicKey     string             `json:"signer_public_key"`
	GasPrice            *BigInt            `json:"gas_price"`
	OutputDataReceivers []DataReceiverView `json:"output_data_receivers"`
	InputDataIds        []string           `json:"input_data_ids"`
	Actions             []ActionView       `json:"actions"`
	DataId              string             `json:"data_id"`
	Data                []byte             `json:"data"`
}

type ReceiptView

type ReceiptView struct {
	PredecessorId string  `json:"predecessor_id"`
	ReceiverId    string  `json:"receiver_id"`
	ReceiptId     string  `json:"receipt_id"`
	Receipt       Receipt `json:"receipt"`
}

type SignedTransactionView

type SignedTransactionView struct {
	SignerId   string        `json:"signer_id"`
	PublicKey  string        `json:"public_key"`
	Nonce      uint64        `json:"nonce"`
	ReceiverId string        `json:"receiver_id"`
	Actions    []interface{} `json:"actions"`
	Signature  string        `json:"signature"`
	Hash       string        `json:"hash"`
}

type Stake

type Stake struct {
	Stake     *BigInt `json:"stake"`
	PublicKey string  `json:"public_key"`
}

type StateChangeView

type StateChangeView struct {
	Cause map[string]interface{} `json:"cause"`
	Value map[string]interface{} `json:"value"`
}

type Status

type Status map[string]interface{}

func (Status) IsFailure

func (status Status) IsFailure() bool

func (Status) IsSuccess

func (status Status) IsSuccess() bool

func (Status) IsUnknown

func (status Status) IsUnknown() bool

func (Status) SuccessReceiptId

func (status Status) SuccessReceiptId() *string

func (Status) SuccessValue

func (status Status) SuccessValue() *string

type StreamMessage

type StreamMessage struct {
	Block  BlockView      `json:"block"`
	Shards []IndexerShard `json:"shards"`
}

type Transfer

type Transfer struct {
	Deposit *BigInt `json:"deposit"`
}

Jump to

Keyboard shortcuts

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