node

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 15 Imported by: 5

README

Tezos RPC client

The library realize almost all RPC methods of Tezos node.

Usage

Simple example
rpc := node.NewRPC("https://rpc.tzkt.io/mainnet", "main")
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
defer cancel()

block, err := rpc.Block(ctx, "head")
if err != nil {
	panic(err)
}
log.Printf("%##v", block)

You can use main RPC constructor where chain id set by default to main

rpc := node.NewMainRPC("https://rpc.tzkt.io/mainnet")
Usage certain API part

RPC struct contains some internal parts: Chain, Block, Context, Config, General, Protocols, Inject and Network. You can use it without creation of full RPC client.

rpc := node.NewMainBlockRPC("https://rpc.tzkt.io/mainnet")
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
defer cancel()

block, err := rpc.Block(ctx, "head")
if err != nil {
	panic(err)
}
log.Printf("%##v", block)
Interfaces

For testing purpose RPC was wrapped by interfaces. Also each part of RPC has interface. You can mock it with code generation tools.

Interfaces list:

  • BlockAPI
  • ChainAPI
  • ContextAPI
  • ConfigAPI
  • GeneralAPI
  • ProtocolsAPI
  • NetworkAPI
  • InjectAPI

Documentation

Index

Constants

View Source
const (
	LazyStorageDiffKindBigMap  = "big_map"
	LazyStorageDiffKindSapling = "sapling_state"
)
View Source
const (
	KindActivation                 = "activate_account"
	KindBallot                     = "ballot"
	KindDelegation                 = "delegation"
	KindDoubleBaking               = "double_baking_evidence"
	KindDoubleEndorsing            = "double_endorsement_evidence"
	KindEndorsement                = "endorsement"
	KindEndorsementWithSlot        = "endorsement_with_slot"
	KindOrigination                = "origination"
	KindProposal                   = "proposals"
	KindReveal                     = "reveal"
	KindNonceRevelation            = "seed_nonce_revelation"
	KindTransaction                = "transaction"
	KindRegisterGlobalConstant     = "register_global_constant"
	KindPreendorsement             = "preendorsement"
	KindSetDepositsLimit           = "set_deposits_limit"
	KindDoublePreendorsement       = "double_preendorsement_evidence"
	KindTxRollupOrigination        = "tx_rollup_origination"
	KindTxRollupSubmitBatch        = "tx_rollup_submit_batch"
	KindTxRollupCommit             = "tx_rollup_commit"
	KindTxRollupReturnBond         = "tx_rollup_return_bond"
	KindTxRollupFinalizeCommitment = "tx_rollup_finalize_commitment"
	KindTxRollupRemoveCommitment   = "tx_rollup_remove_commitment"
	KindTxRollupRejection          = "tx_rollup_rejection"
	KindTxRollupDispatchTickets    = "tx_rollup_dispatch_tickets"
	KindTransferTicket             = "transfer_ticket"
	KindEvent                      = "event"
	KindVdfRevelation              = "vdf_revelation"
	KindIncreasePaidStorage        = "Increase_paid_storage"
	KindUpdateConsensusKey         = "update_consensus_key"
	KindDrainDelegate              = "drain_delegate"
	KindSrAddMessages              = "smart_rollup_add_messages"
	KindSrOriginate                = "smart_rollup_originate"
	KindSrExecute                  = "smart_rollup_execute_outbox_message"
	KindSrRefute                   = "smart_rollup_refute"
	KindSrPublish                  = "smart_rollup_publish"
	KindSrRecoverBond              = "smart_rollup_recover_bond"
	KindSrTimeout                  = "smart_rollup_timeout"
	KindSrCement                   = "smart_rollup_cement"
)
View Source
const (
	BigMapActionUpdate = "update"
	BigMapActionRemove = "remove"
	BigMapActionAlloc  = "alloc"
	BigMapActionCopy   = "copy"
)
View Source
const (
	BalanceUpdatesKindContract = "contract"
	BalanceUpdatesKindFreezer  = "freezer"
)
View Source
const (
	BalanceUpdatesCategoryReward   = "rewards"
	BalanceUpdatesCategoryFees     = "fees"
	BalanceUpdatesCategoryDeposits = "deposits"
)
View Source
const (
	BalanceUpdatesOriginBlock     = "block"
	BalanceUpdatesOriginMigration = "migration"
	BalanceUpdatesOriginSubsidy   = "subsidy"
)
View Source
const (
	HeadBlock = "head"
)

Variables

View Source
var (
	ErrUnknownKind = errors.New("unknown operation kind")
)

Errors

Functions

func IsManager added in v0.1.12

func IsManager(kind string) bool

IsManager -

func NewTypedOperation added in v0.2.20

func NewTypedOperation[M OperationConstraint](operation Operation) (M, error)

NewTypedOperation -

Types

type API added in v0.2.0

API -

type AccountActivation added in v0.1.33

type AccountActivation struct {
	Pkh      string                      `json:"pkh"`
	Secret   string                      `json:"secret"`
	Metadata *OnlyBalanceUpdatesMetadata `json:"metadata,omitempty"`
}

AccountActivation -

type ActivatedProtocol added in v0.2.0

type ActivatedProtocol struct {
	ReplacedProtocol    string `json:"replaced_protocol"`
	ReplacementProtocol string `json:"replacement_protocol"`
}

ActivatedProtocol -

type ActivatedUpgrades added in v0.2.0

type ActivatedUpgrades struct {
	Level               int    `json:"level"`
	ReplacementProtocol string `json:"replacement_protocol"`
}

ActivatedUpgrades -

type Applied

type Applied struct {
	Hash      string             `json:"hash"`
	Branch    string             `json:"branch"`
	Signature string             `json:"signature"`
	Contents  []Content          `json:"contents"`
	Raw       stdJSON.RawMessage `json:"raw"`
}

Applied -

func (*Applied) UnmarshalJSON added in v0.1.26

func (a *Applied) UnmarshalJSON(data []byte) error

UnmarshalJSON -

type BalanceUpdate added in v0.1.33

type BalanceUpdate struct {
	Kind     string `json:"kind"`
	Contract string `json:"contract,omitempty"`
	Change   string `json:"change"`
	Category string `json:"category,omitempty"`
	Origin   string `json:"origin,omitempty"`
	Delegate string `json:"delegate,omitempty"`
	Cycle    uint64 `json:"cycle,omitempty"`
	Level    uint64 `json:"level,omitempty"`
	BondID   struct {
		TxRollup string `json:"tx_rollup"`
	} `json:"bond_id,omitempty"`
}

BalanceUpdate -

type Ballot added in v0.1.33

type Ballot struct {
	Source   string `json:"source"`
	Period   uint64 `json:"period"`
	Proposal string `json:"proposal"`
	Ballot   string `json:"ballot"`
}

Ballot -

type BigMapDiff added in v0.1.33

type BigMapDiff struct {
	Action            string              `json:"action,omitempty"`
	BigMap            string              `json:"big_map,omitempty"`
	KeyHash           string              `json:"key_hash,omitempty"`
	Key               *stdJSON.RawMessage `json:"key,omitempty"`
	Value             *stdJSON.RawMessage `json:"value,omitempty"`
	SourceBigMap      string              `json:"source_big_map,omitempty"`
	DestinationBigMap string              `json:"destination_big_map,omitempty"`
	KeyType           *stdJSON.RawMessage `json:"key_type,omitempty"`
	ValueType         *stdJSON.RawMessage `json:"value_type,omitempty"`
}

BigMapDiff is an element of BigMapDiffs

type Block added in v0.2.0

type Block struct {
	Protocol   string        `json:"protocol"`
	ChainID    string        `json:"chain_id"`
	Hash       string        `json:"hash"`
	Header     Header        `json:"header"`
	Metadata   BlockMetadata `json:"metadata"`
	Operations [][]OperationGroup
}

Block -

type BlockAPI added in v0.2.0

type BlockAPI interface {
	Blocks(ctx context.Context, args BlocksArgs) ([][]string, error)
	Block(ctx context.Context, blockID string) (Block, error)
	Head(ctx context.Context) (Block, error)
	Header(ctx context.Context, blockID string) (Header, error)
	HeaderRaw(ctx context.Context, blockID string) (string, error)
	HeaderShell(ctx context.Context, blockID string) (HeaderShell, error)
	Metadata(ctx context.Context, blockID string) (BlockMetadata, error)
	MetadataHash(ctx context.Context, blockID string) (string, error)
	Hash(ctx context.Context, blockID string) (string, error)
	ProtocolData(ctx context.Context, blockID string) (ProtocolData, error)
	ProtocolDataRaw(ctx context.Context, blockID string) (string, error)
	OperationHashes(ctx context.Context, blockID string) ([][]string, error)
	OperationMetadataHash(ctx context.Context, blockID string) (string, error)
	OperationMetadataHashes(ctx context.Context, blockID string) ([][]string, error)
	Operations(ctx context.Context, blockID string) ([][]OperationGroup, error)
	OperationsOffset(ctx context.Context, blockID string, listOffset int) ([]OperationGroup, error)
	Operation(ctx context.Context, blockID string, listOffset, operationOffset int) (OperationGroup, error)
	BlockProtocols(ctx context.Context, blockID string) (BlockProtocols, error)
	VotesBallotList(ctx context.Context, blockID string) ([]BlockBallot, error)
	VotesBallots(ctx context.Context, blockID string) (BlockBallots, error)
	VotesCurrentPeriod(ctx context.Context, blockID string) (VotingPeriod, error)
	VotesCurrentProposal(ctx context.Context, blockID string) (string, error)
	VotesQuorum(ctx context.Context, blockID string) (int, error)
	VotesListing(ctx context.Context, blockID string) ([]Rolls, error)
	VotesProposals(ctx context.Context, blockID string) ([]string, error)
	VotesSuccessorPeriod(ctx context.Context, blockID string) (VotingPeriod, error)
	VotesTotalVotingPower(ctx context.Context, blockID string) (int, error)
}

BlockAPI -

type BlockBallot added in v0.2.0

type BlockBallot struct {
	Pkh    string `json:"pkh"`
	Ballot string `json:"ballot"`
}

BlockBallot -

type BlockBallots added in v0.2.0

type BlockBallots struct {
	Yay  int `json:"yay"`
	Nay  int `json:"nay"`
	Pass int `json:"pass"`
}

BlockBallots -

type BlockMetadata added in v0.2.0

type BlockMetadata struct {
	Protocol        string `json:"protocol"`
	NextProtocol    string `json:"next_protocol"`
	TestChainStatus struct {
		Status string `json:"status"`
	} `json:"test_chain_status"`
	MaxOperationsTTL       uint64 `json:"max_operations_ttl"`
	MaxOperationDataLength uint64 `json:"max_operation_data_length"`
	MaxBlockHeaderLength   uint64 `json:"max_block_header_length"`
	MaxOperationListLength []struct {
		MaxSize uint64 `json:"max_size"`
		MaxOp   uint64 `json:"max_op,omitempty"`
	} `json:"max_operation_list_length"`
	Baker            string    `json:"baker"`
	LevelInfo        LevelInfo `json:"level_info"`
	VotingPeriodInfo struct {
		VotingPeriod struct {
			Index         uint64 `json:"index"`
			Kind          string `json:"kind"`
			StartPosition uint64 `json:"start_position"`
		} `json:"voting_period"`
		Position  uint64 `json:"position"`
		Remaining uint64 `json:"remaining"`
	} `json:"voting_period_info"`
	NonceHash                 string                     `json:"nonce_hash"`
	ConsumedGas               string                     `json:"consumed_gas"`
	Deactivated               []interface{}              `json:"deactivated"`
	BalanceUpdates            []BalanceUpdate            `json:"balance_updates"`
	LiquidityBakingEscapeEma  uint64                     `json:"liquidity_baking_escape_ema"`
	ImplicitOperationsResults []ImplicitOperationsResult `json:"implicit_operations_results"`
}

BlockMetadata -

type BlockProtocols added in v0.2.0

type BlockProtocols struct {
	Protocol     string `json:"protocol"`
	NextProtocol string `json:"next_protocol"`
}

BlockProtocols -

type BlockRPC added in v0.2.0

type BlockRPC struct {
	// contains filtered or unexported fields
}

BlockRPC -

func NewBlockRPC added in v0.2.0

func NewBlockRPC(baseURL, chainID string) *BlockRPC

NewChain -

func NewMainBlockRPC added in v0.2.0

func NewMainBlockRPC(baseURL string) *BlockRPC

NewMainBlockRPC -

func (*BlockRPC) Block added in v0.2.0

func (api *BlockRPC) Block(ctx context.Context, blockID string) (Block, error)

Block -

func (*BlockRPC) BlockProtocols added in v0.2.0

func (api *BlockRPC) BlockProtocols(ctx context.Context, blockID string) (BlockProtocols, error)

BlockProtocols -

func (*BlockRPC) Blocks added in v0.2.0

func (api *BlockRPC) Blocks(ctx context.Context, args BlocksArgs) ([][]string, error)

Blocks -

func (*BlockRPC) Hash added in v0.2.0

func (api *BlockRPC) Hash(ctx context.Context, blockID string) (string, error)

Hash -

func (*BlockRPC) Head added in v0.2.0

func (api *BlockRPC) Head(ctx context.Context) (Block, error)

Head -

func (*BlockRPC) Header added in v0.2.0

func (api *BlockRPC) Header(ctx context.Context, blockID string) (Header, error)

Header -

func (*BlockRPC) HeaderRaw added in v0.2.0

func (api *BlockRPC) HeaderRaw(ctx context.Context, blockID string) (string, error)

HeaderRaw -

func (*BlockRPC) HeaderShell added in v0.2.0

func (api *BlockRPC) HeaderShell(ctx context.Context, blockID string) (HeaderShell, error)

HeaderShell -

func (*BlockRPC) Metadata added in v0.2.0

func (api *BlockRPC) Metadata(ctx context.Context, blockID string) (BlockMetadata, error)

Metadata -

func (*BlockRPC) MetadataHash added in v0.2.0

func (api *BlockRPC) MetadataHash(ctx context.Context, blockID string) (string, error)

MetadataHash -

func (*BlockRPC) Operation added in v0.2.0

func (api *BlockRPC) Operation(ctx context.Context, blockID string, listOffset, operationOffset int) (OperationGroup, error)

Operation -

func (*BlockRPC) OperationHashes added in v0.2.0

func (api *BlockRPC) OperationHashes(ctx context.Context, blockID string) ([][]string, error)

OperationHashes -

func (*BlockRPC) OperationMetadataHash added in v0.2.0

func (api *BlockRPC) OperationMetadataHash(ctx context.Context, blockID string) (string, error)

OperationMetadataHash -

func (*BlockRPC) OperationMetadataHashes added in v0.2.0

func (api *BlockRPC) OperationMetadataHashes(ctx context.Context, blockID string) ([][]string, error)

OperationMetadataHashes -

func (*BlockRPC) Operations added in v0.2.0

func (api *BlockRPC) Operations(ctx context.Context, blockID string) ([][]OperationGroup, error)

Operations -

func (*BlockRPC) OperationsOffset added in v0.2.0

func (api *BlockRPC) OperationsOffset(ctx context.Context, blockID string, listOffset int) ([]OperationGroup, error)

OperationsOffset -

func (*BlockRPC) ProtocolData added in v0.2.0

func (api *BlockRPC) ProtocolData(ctx context.Context, blockID string) (ProtocolData, error)

ProtocolData -

func (*BlockRPC) ProtocolDataRaw added in v0.2.0

func (api *BlockRPC) ProtocolDataRaw(ctx context.Context, blockID string) (string, error)

ProtocolDataRaw -

func (*BlockRPC) VotesBallotList added in v0.2.0

func (api *BlockRPC) VotesBallotList(ctx context.Context, blockID string) ([]BlockBallot, error)

func (*BlockRPC) VotesBallots added in v0.2.0

func (api *BlockRPC) VotesBallots(ctx context.Context, blockID string) (BlockBallots, error)

VotesBallots -

func (*BlockRPC) VotesCurrentPeriod added in v0.2.0

func (api *BlockRPC) VotesCurrentPeriod(ctx context.Context, blockID string) (VotingPeriod, error)

VotesCurrentPeriod -

func (*BlockRPC) VotesCurrentProposal added in v0.2.0

func (api *BlockRPC) VotesCurrentProposal(ctx context.Context, blockID string) (string, error)

VotesCurrentProposal -

func (*BlockRPC) VotesListing added in v0.2.0

func (api *BlockRPC) VotesListing(ctx context.Context, blockID string) ([]Rolls, error)

VotesListing

func (*BlockRPC) VotesProposals added in v0.2.0

func (api *BlockRPC) VotesProposals(ctx context.Context, blockID string) ([]string, error)

VotesProposals -

func (*BlockRPC) VotesQuorum added in v0.2.0

func (api *BlockRPC) VotesQuorum(ctx context.Context, blockID string) (int, error)

VotesQuorum -

func (*BlockRPC) VotesSuccessorPeriod added in v0.2.0

func (api *BlockRPC) VotesSuccessorPeriod(ctx context.Context, blockID string) (VotingPeriod, error)

VotesSuccessorPeriod -

func (*BlockRPC) VotesTotalVotingPower added in v0.2.0

func (api *BlockRPC) VotesTotalVotingPower(ctx context.Context, blockID string) (int, error)

VotesTotalVotingPower -

type BlocksArgs added in v0.2.0

type BlocksArgs struct {
	Length   uint
	HeadHash string
}

BlocksArgs -

type Bootstrapped added in v0.2.0

type Bootstrapped struct {
	Bootstrapped bool   `json:"bootstrapped"`
	SyncState    string `json:"sync_state"`
}

Bootstrapped -

type Caboose added in v0.2.0

type Caboose struct {
	Hash  string `json:"block_hash"`
	Level uint64 `json:"level"`
}

Caboose -

type Chain added in v0.2.0

type Chain struct {
	// contains filtered or unexported fields
}

Chain -

func NewChain added in v0.2.0

func NewChain(baseURL, chainID string) *Chain

NewChain -

func NewMainChain added in v0.2.0

func NewMainChain(baseURL string) *Chain

NewMainChain -

func (*Chain) ChainID added in v0.2.0

func (api *Chain) ChainID(ctx context.Context) (string, error)

ChainID -

func (*Chain) InvalidBlock added in v0.2.0

func (api *Chain) InvalidBlock(ctx context.Context, blockHash string) (InvalidBlock, error)

InvalidBlock -

func (*Chain) InvalidBlocks added in v0.2.0

func (api *Chain) InvalidBlocks(ctx context.Context) ([]InvalidBlock, error)

InvalidBlocks -

func (*Chain) IsBootstrapped added in v0.2.0

func (api *Chain) IsBootstrapped(ctx context.Context) (Bootstrapped, error)

IsBootstrapped -

func (*Chain) LevelsCaboose added in v0.2.0

func (api *Chain) LevelsCaboose(ctx context.Context) (Caboose, error)

LevelsCaboose -

func (*Chain) LevelsCheckpoint added in v0.2.0

func (api *Chain) LevelsCheckpoint(ctx context.Context) (Checkpoint, error)

LevelsCheckpoint -

func (*Chain) LevelsSavepoint added in v0.2.0

func (api *Chain) LevelsSavepoint(ctx context.Context) (Savepoint, error)

LevelsSavepoint -

func (*Chain) PendingOperations added in v0.2.0

func (api *Chain) PendingOperations(ctx context.Context) (MempoolResponse, error)

PendingOperations -

type ChainAPI added in v0.2.0

type ChainAPI interface {
	ChainID(ctx context.Context) (string, error)
	InvalidBlocks(ctx context.Context) ([]InvalidBlock, error)
	InvalidBlock(ctx context.Context, blockHash string) (InvalidBlock, error)
	IsBootstrapped(ctx context.Context) (Bootstrapped, error)
	LevelsCaboose(ctx context.Context) (Caboose, error)
	LevelsCheckpoint(ctx context.Context) (Checkpoint, error)
	LevelsSavepoint(ctx context.Context) (Savepoint, error)
	PendingOperations(ctx context.Context) (MempoolResponse, error)
}

ChainAPI -

type Checkpoint added in v0.2.0

type Checkpoint struct {
	Hash  string `json:"block_hash"`
	Level uint64 `json:"level"`
}

Checkpoint -

type CommitmentsAndCiphertexts added in v0.1.33

type CommitmentsAndCiphertexts struct {
	Commitments string
	Ciphertexts SaplingTransactionCiphertext
}

CommitmentsAndCiphertexts-

func (CommitmentsAndCiphertexts) MarshalJSON added in v0.1.33

func (cc CommitmentsAndCiphertexts) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*CommitmentsAndCiphertexts) UnmarshalJSON added in v0.1.33

func (cc *CommitmentsAndCiphertexts) UnmarshalJSON(data []byte) error

UnmarshalJSON -

type Config added in v0.2.0

type Config struct {
	// contains filtered or unexported fields
}

Config -

func NewConfig added in v0.2.0

func NewConfig(baseURL string) *Config

NewConfig -

func (*Config) HistoryMode added in v0.2.0

func (api *Config) HistoryMode(ctx context.Context) (HistoryMode, error)

HistoryMode -

func (*Config) UserActivatedProtocols added in v0.2.0

func (api *Config) UserActivatedProtocols(ctx context.Context) ([]ActivatedProtocol, error)

UserActivatedProtocols -

func (*Config) UserActivatedUpgrades added in v0.2.0

func (api *Config) UserActivatedUpgrades(ctx context.Context) ([]ActivatedUpgrades, error)

UserActivatedUpgrades -

type ConfigAPI added in v0.2.0

type ConfigAPI interface {
	HistoryMode(ctx context.Context) (HistoryMode, error)
	UserActivatedProtocols(ctx context.Context) ([]ActivatedProtocol, error)
	UserActivatedUpgrades(ctx context.Context) ([]ActivatedUpgrades, error)
}

ConfigAPI -

type Connection added in v0.2.0

type Connection struct {
	PeerID           string             `json:"peer_id"`
	Point            Point              `json:"id_point"`
	RemoteSocketPort int                `json:"remote_socket_port"`
	AnnouncedVersion ConnectionVersion  `json:"announced_version"`
	LocalMetadata    ConnectionMetadata `json:"local_metadata"`
	RemoteMetadata   ConnectionMetadata `json:"remote_metadata"`
	Incoming         bool               `json:"incoming"`
	Private          bool               `json:"private"`
}

Connection -

type ConnectionMetadata added in v0.2.0

type ConnectionMetadata struct {
	DisableMempool bool `json:"disable_mempool"`
	PrivateNode    bool `json:"private_node"`
}

ConnectionMetadata -

type ConnectionVersion added in v0.2.0

type ConnectionVersion struct {
	ChainName            string `json:"chain_name"`
	DistributedDbVersion int    `json:"distributed_db_version"`
	P2PVersion           int    `json:"p2p_version"`
}

ConnectionVersion -

type Constants

type Constants struct {
	ProofOfWorkNonceSize         int64            `json:"proof_of_work_nonce_size"`
	NonceLength                  int64            `json:"nonce_length"`
	MaxAnonOpsPerBlock           int64            `json:"max_anon_ops_per_block"`
	MaxOperationDataLength       int64            `json:"max_operation_data_length"`
	MaxProposalsPerDelegate      int64            `json:"max_proposals_per_delegate"`
	PreservedCycles              uint64           `json:"preserved_cycles"`
	BlocksPerCycle               uint64           `json:"blocks_per_cycle"`
	BlocksPerCommitment          int64            `json:"blocks_per_commitment"`
	BlocksPerRollSnapshot        int64            `json:"blocks_per_roll_snapshot"`
	BlocksPerVotingPeriod        int64            `json:"blocks_per_voting_period"`
	TimeBetweenBlocks            Int64StringSlice `json:"time_between_blocks"`
	EndorsersPerBlock            int64            `json:"endorsers_per_block"`
	HardGasLimitPerOperation     int64            `json:"hard_gas_limit_per_operation,string"`
	HardGasLimitPerBlock         int64            `json:"hard_gas_limit_per_block,string"`
	ProofOfWorkThreshold         int64            `json:"proof_of_work_threshold,string"`
	TokensPerRoll                int64            `json:"tokens_per_roll,string"`
	MichelsonMaximumTypeSize     int64            `json:"michelson_maximum_type_size"`
	SeedNonceRevelationTip       int64            `json:"seed_nonce_revelation_tip,string"`
	OriginationSize              int64            `json:"origination_size"`
	BlockSecurityDeposit         int64            `json:"block_security_deposit,string"`
	EndorsementSecurityDeposit   int64            `json:"endorsement_security_deposit,string"`
	BakingRewardPerEndorsement   Int64StringSlice `json:"baking_reward_per_endorsement"`
	EndorsementReward            Int64StringSlice `json:"endorsement_reward"`
	CostPerByte                  int64            `json:"cost_per_byte,string"`
	HardStorageLimitPerOperation int64            `json:"hard_storage_limit_per_operation,string"`
	TestChainDuration            int64            `json:"test_chain_duration,string"`
	QuorumMin                    int64            `json:"quorum_min"`
	QuorumMax                    int64            `json:"quorum_max"`
	MinProposalQuorum            int64            `json:"min_proposal_quorum"`
	InitialEndorsers             int64            `json:"initial_endorsers"`
	DelayPerMissingEndorsement   int64            `json:"delay_per_missing_endorsement,string"`
	MinimalBlockDelay            int64            `json:"minimal_block_delay,string,omitempty"`
}

Constants -

type Content

type Content struct {
	Kind string             `json:"kind"`
	Body stdJSON.RawMessage `json:"-"`
}

Contents -

func (*Content) UnmarshalJSON

func (c *Content) UnmarshalJSON(data []byte) error

UnmarshalJSON -

type Context added in v0.2.0

type Context struct {
	// contains filtered or unexported fields
}

Context -

func NewContext added in v0.2.0

func NewContext(baseURL, chainID string) *Context

NewContext -

func NewMainContext added in v0.2.0

func NewMainContext(baseURL string) *Context

NewMainContext -

func (*Context) ActiveDelegatesWithRolls added in v0.2.0

func (api *Context) ActiveDelegatesWithRolls(ctx context.Context, blockID string) ([]string, error)

ActiveDelegatesWithRolls -

func (*Context) BigMap added in v0.2.0

func (api *Context) BigMap(ctx context.Context, blockID string, bigMapID uint64) ([]byte, error)

BigMap -

func (*Context) BigMapKey added in v0.2.0

func (api *Context) BigMapKey(ctx context.Context, blockID string, bigMapID uint64, key string) (interface{}, error)

BigMapKey -

func (*Context) CacheContracts added in v0.2.0

func (api *Context) CacheContracts(ctx context.Context, blockID string) (interface{}, error)

CacheContracts -

func (*Context) CacheContractsSize added in v0.2.0

func (api *Context) CacheContractsSize(ctx context.Context, blockID string) (uint64, error)

CacheContractsSize -

func (*Context) CacheContractsSizeLimit added in v0.2.0

func (api *Context) CacheContractsSizeLimit(ctx context.Context, blockID string) (uint64, error)

CacheContractsSizeLimit -

func (*Context) Constants added in v0.2.0

func (api *Context) Constants(ctx context.Context, blockID string) (Constants, error)

Constants -

func (*Context) Contract added in v0.2.0

func (api *Context) Contract(ctx context.Context, blockID, contract string) (ContractInfo, error)

Contract -

func (*Context) ContractBalance added in v0.2.0

func (api *Context) ContractBalance(ctx context.Context, blockID, contract string) (string, error)

ContractBalance -

func (*Context) ContractCounter added in v0.2.0

func (api *Context) ContractCounter(ctx context.Context, blockID, contract string) (string, error)

ContractCounter -

func (*Context) ContractDelegate added in v0.2.0

func (api *Context) ContractDelegate(ctx context.Context, blockID, contract string) (string, error)

ContractDelegate -

func (*Context) ContractEntrypoint added in v0.2.0

func (api *Context) ContractEntrypoint(ctx context.Context, blockID, contract, entrypoint string) (stdJSON.RawMessage, error)

ContractEntrypoint -

func (*Context) ContractEntrypoints added in v0.2.0

func (api *Context) ContractEntrypoints(ctx context.Context, blockID, contract string) (Entrypoints, error)

ContractEntrypoints -

func (*Context) ContractScript added in v0.2.0

func (api *Context) ContractScript(ctx context.Context, blockID, contract string) (Script, error)

ContractScript -

func (*Context) ContractStorage added in v0.2.0

func (api *Context) ContractStorage(ctx context.Context, blockID, contract string) (stdJSON.RawMessage, error)

ContractStorage -

func (*Context) Contracts added in v0.2.0

func (api *Context) Contracts(ctx context.Context, blockID string) ([]string, error)

Contracts -

func (*Context) Delegate added in v0.2.0

func (api *Context) Delegate(ctx context.Context, blockID, pkh string) (Delegate, error)

Delegate -

func (*Context) DelegateBalance added in v0.2.0

func (api *Context) DelegateBalance(ctx context.Context, blockID, pkh string) (string, error)

DelegateBalance -

func (*Context) DelegateContracts added in v0.2.0

func (api *Context) DelegateContracts(ctx context.Context, blockID, pkh string) ([]string, error)

DelegateContracts -

func (*Context) DelegateDeactivated added in v0.2.0

func (api *Context) DelegateDeactivated(ctx context.Context, blockID, pkh string) (bool, error)

DelegateDeactivated -

func (*Context) DelegateGracePeriod added in v0.2.0

func (api *Context) DelegateGracePeriod(ctx context.Context, blockID, pkh string) (int, error)

DelegateGracePeriod -

func (*Context) DelegateStakingBalance added in v0.2.0

func (api *Context) DelegateStakingBalance(ctx context.Context, blockID, pkh string) (string, error)

DelegateStakingBalance -

func (*Context) DelegateVotingPower added in v0.2.0

func (api *Context) DelegateVotingPower(ctx context.Context, blockID, pkh string) (int, error)

DelegateVotingPower -

func (*Context) Delegates added in v0.2.0

func (api *Context) Delegates(ctx context.Context, blockID string, active DelegateType) ([]string, error)

Delegates - Lists all registered delegates. `active` can get `active` or `inactive` values, othewise it skip.

func (*Context) LiquidityBakingCPMMAddress added in v0.2.0

func (api *Context) LiquidityBakingCPMMAddress(ctx context.Context, blockID string) (string, error)

LiquidityBakingCPMMAddress -

func (*Context) TxRollupCommitment added in v0.2.14

func (api *Context) TxRollupCommitment(ctx context.Context, blockID, txRollupID, blockLevel string) (*RollupCommitmentForBlock, error)

TxRollupCommitment -

func (*Context) TxRollupInbox added in v0.2.14

func (api *Context) TxRollupInbox(ctx context.Context, blockID, txRollupID, blockLevel string) (*TxRollupInbox, error)

TxRollupInbox -

func (*Context) TxRollupPendingBondedCommitments added in v0.2.14

func (api *Context) TxRollupPendingBondedCommitments(ctx context.Context, blockID, txRollupID, pkh string) (uint64, error)

TxRollupPendingBondedCommitments -

func (*Context) TxRollupState added in v0.2.14

func (api *Context) TxRollupState(ctx context.Context, blockID, txRollupID string) (TxRollupState, error)

TxRollupState -

type ContextAPI added in v0.2.0

type ContextAPI interface {
	BigMap(ctx context.Context, blockID string, bigMapID uint64) ([]byte, error)
	BigMapKey(ctx context.Context, blockID string, bigMapID uint64, key string) (interface{}, error)
	CacheContracts(ctx context.Context, blockID string) (interface{}, error)
	CacheContractsSize(ctx context.Context, blockID string) (uint64, error)
	CacheContractsSizeLimit(ctx context.Context, blockID string) (uint64, error)
	Constants(ctx context.Context, blockID string) (Constants, error)
	Contracts(ctx context.Context, blockID string) ([]string, error)
	Contract(ctx context.Context, blockID, contract string) (ContractInfo, error)
	ContractBalance(ctx context.Context, blockID, contract string) (string, error)
	ContractCounter(ctx context.Context, blockID, contract string) (string, error)
	ContractDelegate(ctx context.Context, blockID, contract string) (string, error)
	ContractEntrypoints(ctx context.Context, blockID, contract string) (Entrypoints, error)
	ContractEntrypoint(ctx context.Context, blockID, contract, entrypoint string) (stdJSON.RawMessage, error)
	ContractScript(ctx context.Context, blockID, contract string) (Script, error)
	ContractStorage(ctx context.Context, blockID, contract string) (stdJSON.RawMessage, error)
	Delegates(ctx context.Context, blockID string, active DelegateType) ([]string, error)
	Delegate(ctx context.Context, blockID, pkh string) (Delegate, error)
	DelegateDeactivated(ctx context.Context, blockID, pkh string) (bool, error)
	DelegateBalance(ctx context.Context, blockID, pkh string) (string, error)
	DelegateContracts(ctx context.Context, blockID, pkh string) ([]string, error)
	DelegateGracePeriod(ctx context.Context, blockID, pkh string) (int, error)
	DelegateStakingBalance(ctx context.Context, blockID, pkh string) (string, error)
	DelegateVotingPower(ctx context.Context, blockID, pkh string) (int, error)
	ActiveDelegatesWithRolls(ctx context.Context, blockID string) ([]string, error)
	LiquidityBakingCPMMAddress(ctx context.Context, blockID string) (string, error)
	TxRollupState(ctx context.Context, blockID, txRollupID string) (TxRollupState, error)
	TxRollupCommitment(ctx context.Context, blockID, txRollupID, blockLevel string) (*RollupCommitmentForBlock, error)
	TxRollupInbox(ctx context.Context, blockID, txRollupID, blockLevel string) (*TxRollupInbox, error)
	TxRollupPendingBondedCommitments(ctx context.Context, blockID, txRollupID, pkh string) (uint64, error)
}

ContextAPI -

type ContractInfo added in v0.2.0

type ContractInfo struct {
	Balance   string             `json:"balance"`
	Delegate  string             `json:"delegate,omitempty"`
	Script    stdJSON.RawMessage `json:"script,omitempty"`
	Counter   string             `json:"counter,omitempty"`
	Spendable bool               `json:"spendable,omitempty"`
	Manager   string             `json:"manager,omitempty"`
}

ContractInfo -

type Delegate added in v0.2.0

type Delegate struct {
	Balance              string               `json:"balance"`
	FrozenBalance        string               `json:"frozen_balance"`
	FrozenBalanceByCycle FrozenBalanceByCycle `json:"frozen_balance_by_cycle"`
	StakingBalance       string               `json:"staking_balance"`
	DelegatedContracts   []string             `json:"delegated_contracts"`
	DelegatedBalance     string               `json:"delegated_balance"`
	Deactivated          bool                 `json:"deactivated"`
	GracePeriod          int                  `json:"grace_period"`
	VotingPower          int                  `json:"voting_power"`
}

Delegate -

type DelegateType added in v0.2.0

type DelegateType string

DelegateType -

const (
	ActiveDelegateType   DelegateType = "active"
	InactiveDelegateType DelegateType = "inactive"
	AllDelegateType      DelegateType = "all"
)

delegate types

type Delegation added in v0.1.33

type Delegation struct {
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Delegate     string                    `json:"delegate,omitempty"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

Delegation -

type DoubleBakingEvidence added in v0.1.33

type DoubleBakingEvidence struct {
	Bh1      *Header                     `json:"bh1,omitempty"`
	Bh2      *Header                     `json:"bh2,omitempty"`
	Metadata *OnlyBalanceUpdatesMetadata `json:"metadata,omitempty"`
}

DoubleBakingEvidence -

type DoubleEndorsementEvidence added in v0.1.33

type DoubleEndorsementEvidence struct {
	Op1      *InlinedEndorsement         `json:"op1"`
	Op2      *InlinedEndorsement         `json:"op2"`
	Metadata *OnlyBalanceUpdatesMetadata `json:"metadata,omitempty"`
}

DoubleEndorsementEvidence -

type DoublePreendorsementEvidence added in v0.2.0

type DoublePreendorsementEvidence struct {
	Op1      *InlinedEndorsement         `json:"op1"`
	Op2      *InlinedEndorsement         `json:"op2"`
	Metadata *OnlyBalanceUpdatesMetadata `json:"metadata,omitempty"`
}

DoublePreendorsementEvidence -

type DrainDelegate added in v0.2.25

type DrainDelegate struct {
	Kind         string                    `json:"kind"`
	ConsensusKey string                    `json:"consensus_key"`
	Delegate     string                    `json:"delegate"`
	Destination  string                    `json:"destination"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

DrainDelegate -

type Endorsement added in v0.1.1

type Endorsement struct {
	Level    uint64               `json:"level"`
	Metadata *EndorsementMetadata `json:"metadata,omitempty"`
}

Endorsement -

type EndorsementMetadata added in v0.1.33

type EndorsementMetadata struct {
	BalanceUpdates []BalanceUpdate `json:"balance_updates"`
	Delegate       string          `json:"delegate"`
	Slots          []int           `json:"slots"`
}

EndorsementMetadata -

type EndorsementOperation added in v0.1.1

type EndorsementOperation struct {
	Level uint64 `json:"level"`
}

EndorsementOperation -

type EndorsementWithSlot added in v0.1.1

type EndorsementWithSlot struct {
	Endorsement EndorsementWithSlotEntity `json:"endorsement"`
	Slot        uint64                    `json:"slot"`
	Metadata    *EndorsementMetadata      `json:"metadata,omitempty"`
}

EndorsementWithSlot -

type EndorsementWithSlotEntity added in v0.1.33

type EndorsementWithSlotEntity struct {
	Branch    string               `json:"branch"`
	Operation EndorsementOperation `json:"operations"`
	Signature string               `json:"signature"`
}

EndorsementWithSlotEntity -

type Entrypoints added in v0.2.0

type Entrypoints struct {
	Entrypoints map[string]stdJSON.RawMessage `json:"entrypoints"`
}

Entrypoints -

type Event added in v0.2.20

type Event struct {
	Kind    string             `json:"kind"`
	Source  string             `json:"source"`
	Nonce   int                `json:"nonce"`
	Type    stdJSON.RawMessage `json:"type"`
	Tag     string             `json:"tag"`
	Payload stdJSON.RawMessage `json:"payload"`
	Result  OperationResult    `json:"result"`
}

Event -

type Failed

type Failed struct {
	Hash      string             `json:"-"`
	Protocol  string             `json:"protocol"`
	Branch    string             `json:"branch"`
	Contents  []Content          `json:"contents"`
	Signature string             `json:"signature,omitempty"`
	Error     stdJSON.RawMessage `json:"error,omitempty"`
	Raw       stdJSON.RawMessage `json:"raw"`
}

Failed -

func (*Failed) UnmarshalJSON

func (f *Failed) UnmarshalJSON(data []byte) error

UnmarshalJSON -

type FailedMonitor added in v0.1.38

type FailedMonitor struct {
	Hash      string             `json:"hash"`
	Protocol  string             `json:"protocol"`
	Branch    string             `json:"branch"`
	Contents  []Content          `json:"contents"`
	Signature string             `json:"signature,omitempty"`
	Error     stdJSON.RawMessage `json:"error,omitempty"`
	Raw       stdJSON.RawMessage `json:"raw"`
}

FailedMonitor -

func (*FailedMonitor) UnmarshalJSON added in v0.1.38

func (f *FailedMonitor) UnmarshalJSON(data []byte) error

UnmarshalJSON -

type FrozenBalanceByCycle added in v0.2.0

type FrozenBalanceByCycle struct {
	Cycle    int    `json:"cycle"`
	Deposits string `json:"deposits"`
	Fees     string `json:"fees"`
	Rewards  string `json:"rewards"`
}

FrozenBalanceByCycle -

type General added in v0.2.0

type General struct {
	// contains filtered or unexported fields
}

General -

func NewGeneral added in v0.2.0

func NewGeneral(baseURL string) *General

NewGeneral -

func (*General) StatsGC added in v0.2.0

func (api *General) StatsGC(ctx context.Context) (StatsGC, error)

StatsGC -

func (*General) StatsMemory added in v0.2.0

func (api *General) StatsMemory(ctx context.Context) (StatsMemory, error)

StatsMemory -

func (*General) URL added in v0.2.0

func (api *General) URL() string

URL -

func (*General) Version added in v0.2.0

func (api *General) Version(ctx context.Context) (Version, error)

Version -

type GeneralAPI added in v0.2.0

type GeneralAPI interface {
	Version(ctx context.Context) (Version, error)
	StatsGC(ctx context.Context) (StatsGC, error)
	StatsMemory(ctx context.Context) (StatsMemory, error)

	URL() string
}

GeneralAPI -

type Header struct {
	Protocol         string    `json:"protocol"`
	ChainID          string    `json:"chain_id"`
	Hash             string    `json:"hash"`
	Level            uint64    `json:"level"`
	Proto            int       `json:"proto"`
	Predecessor      string    `json:"predecessor"`
	Timestamp        time.Time `json:"timestamp"`
	ValidationPass   int       `json:"validation_pass"`
	OperationsHash   string    `json:"operations_hash"`
	Fitness          []string  `json:"fitness"`
	Context          string    `json:"context"`
	Priority         int       `json:"priority"`
	ProofOfWorkNonce string    `json:"proof_of_work_nonce"`
	Signature        string    `json:"signature"`
}

Header -

type HeaderShell added in v0.2.0

type HeaderShell struct {
	Level          int64     `json:"level"`
	Proto          int       `json:"proto"`
	Predecessor    string    `json:"predecessor"`
	Timestamp      time.Time `json:"timestamp"`
	ValidationPass int       `json:"validation_pass"`
	OperationsHash string    `json:"operations_hash"`
	Fitness        []string  `json:"fitness"`
	Context        string    `json:"context"`
}

HeaderShell -

type HistoryMode added in v0.2.0

type HistoryMode struct {
	Mode string `json:"history_mode"`
}

HistoryMode -

type ImplicitOperationsResult added in v0.2.0

type ImplicitOperationsResult struct {
	Kind                string             `json:"kind"`
	BalanceUpdates      []BalanceUpdate    `json:"balance_updates"`
	OriginatedContracts []string           `json:"originated_contracts,omitempty"`
	StorageSize         int64              `json:"storage_size,string"`
	PaidStorageSizeDiff int64              `json:"paid_storage_size_diff,string"`
	Storage             stdJSON.RawMessage `json:"storage,omitempty"`
	ConsumedGas         int64              `json:"consumed_gas,string,omitempty"`
	ConsumedMilligas    int64              `json:"consumed_milligas,string,omitempty"`
}

ImplicitOperationsResult -

type Inject added in v0.2.0

type Inject struct {
	// contains filtered or unexported fields
}

func NewInject added in v0.2.0

func NewInject(baseURL string) *Inject

NewInject -

func (*Inject) InjectOperation added in v0.2.0

func (api *Inject) InjectOperation(ctx context.Context, request InjectOperationRequest) (string, error)

InjectOperation -

type InjectAPI added in v0.2.0

type InjectAPI interface {
	InjectOperation(ctx context.Context, request InjectOperationRequest) (string, error)
}

InjectAPI -

type InjectOperationRequest added in v0.1.33

type InjectOperationRequest struct {
	Operation string
	ChainID   string
	Async     bool
}

InjectOperationRequest -

type InlinedEndorsement added in v0.1.33

type InlinedEndorsement struct {
	Branch     string                        `json:"branch"`
	Operations *InlinedEndorsementOperations `json:"operations,omitempty"`
	Signature  string                        `json:"signature"`
}

InlinedEndorsement -

type InlinedEndorsementOperations added in v0.1.33

type InlinedEndorsementOperations struct {
	Kind  string `json:"kind"`
	Level int    `json:"level"`
}

InlinedEndorsementOperations -

type InlinedPreendorsement added in v0.2.0

type InlinedPreendorsement struct {
	Branch     string                           `json:"branch"`
	Operations *InlinedPreendorsementOperations `json:"operations,omitempty"`
	Signature  string                           `json:"signature"`
}

InlinedPreendorsement -

type InlinedPreendorsementOperations added in v0.2.0

type InlinedPreendorsementOperations struct {
	Kind             string `json:"kind"`
	Slot             uint64 `json:"slot"`
	Level            uint64 `json:"level"`
	Round            int64  `json:"round"`
	BlockPayloadHash string `json:"block_payload_hash"`
}

InlinedPreendorsementOperations -

type Int64StringSlice

type Int64StringSlice []int64

Int64StringSlice -

func (*Int64StringSlice) UnmarshalJSON

func (slice *Int64StringSlice) UnmarshalJSON(data []byte) error

UnmarshalJSON -

type InvalidBlock added in v0.2.0

type InvalidBlock struct {
	Hash   string        `json:"block"`
	Level  uint64        `json:"level"`
	Errors []interface{} `json:"errors"`
}

InvalidBlock -

type LastRemovedCommitmentHashes added in v0.2.14

type LastRemovedCommitmentHashes struct {
	LastMessageHash string `json:"last_message_hash"`
	CommitmentHash  string `json:"commitment_hash"`
}

LastRemovedCommitmentHashes -

type LazyStorageDiff added in v0.1.33

type LazyStorageDiff struct {
	Kind string                      `json:"kind"`
	ID   string                      `json:"id"`
	Diff LazyStorageDiffBigMapEntity `json:"diff"`
}

LazyStorageDiff -

type LazyStorageDiffBigMapEntity added in v0.1.33

type LazyStorageDiffBigMapEntity struct {
	Action    string                  `json:"action"`
	Updates   []LazyStorageDiffUpdate `json:"updates,omitempty"`
	Source    string                  `json:"source,omitempty"`
	KeyType   *stdJSON.RawMessage     `json:"key_type,omitempty"`
	ValueType *stdJSON.RawMessage     `json:"value_type,omitempty"`
}

LazyStorageDiffBigMapEntity -

type LazyStorageDiffSaplingEntity added in v0.1.33

type LazyStorageDiffSaplingEntity struct {
	Action   string                  `json:"action"`
	Updates  []LazyStorageDiffUpdate `json:"updates,omitempty"`
	Source   string                  `json:"source,omitempty"`
	MemoSize uint64                  `json:"memo_size,omitempty"`
}

LazyStorageDiffSaplingEntity -

type LazyStorageDiffUpdate added in v0.1.33

type LazyStorageDiffUpdate struct {
	Action string              `json:"action,omitempty"`
	Key    *stdJSON.RawMessage `json:"key,omitempty"`
	Value  *stdJSON.RawMessage `json:"value,omitempty"`
}

LazyStorageDiffUpdate -

type LazyStorageDiffUpdatesSaplingState added in v0.1.33

type LazyStorageDiffUpdatesSaplingState struct {
	CommitmentsAndCiphertexts CommitmentsAndCiphertexts `json:"commitments_and_ciphertexts,omitempty"`
	Nullifiers                []string                  `json:"nullifiers,omitempty"`
}

LazyStorageDiffUpdatesSaplingState -

type LevelInfo added in v0.2.0

type LevelInfo struct {
	Level              int64 `json:"level"`
	LevelPosition      int64 `json:"level_position"`
	Cycle              int64 `json:"cycle"`
	CyclePosition      int64 `json:"cycle_position"`
	ExpectedCommitment bool  `json:"expected_commitment"`
}

LevelInfo -

type ManagerOperationMetadata added in v0.1.33

type ManagerOperationMetadata struct {
	BalanceUpdates           []BalanceUpdate `json:"balance_updates"`
	OperationResult          OperationResult `json:"operation_result"`
	InternalOperationResults []Operation     `json:"internal_operation_results,omitempty"`
}

ManagerOperationMetadata -

type MempoolResponse

type MempoolResponse struct {
	Applied       []Applied `json:"applied"`
	Refused       []Failed  `json:"refused"`
	BranchRefused []Failed  `json:"branch_refused"`
	BranchDelayed []Failed  `json:"branch_delayed"`
	Outdated      []Failed  `json:"outdated"`
}

MempoolResponse -

type Monitor added in v0.1.36

type Monitor struct {
	// contains filtered or unexported fields
}

Monitor -

func NewMonitor added in v0.1.36

func NewMonitor(url string) *Monitor

NewMonitor -

func (*Monitor) Applied added in v0.1.36

func (monitor *Monitor) Applied() <-chan []*Applied

Applied -

func (*Monitor) BranchDelayed added in v0.1.36

func (monitor *Monitor) BranchDelayed() <-chan []*FailedMonitor

BranchDelayed -

func (*Monitor) BranchRefused added in v0.1.36

func (monitor *Monitor) BranchRefused() <-chan []*FailedMonitor

BranchRefused -

func (*Monitor) Close added in v0.1.36

func (monitor *Monitor) Close() error

func (*Monitor) Outdated added in v0.2.11

func (monitor *Monitor) Outdated() <-chan []*FailedMonitor

Outdated -

func (*Monitor) Refused added in v0.1.36

func (monitor *Monitor) Refused() <-chan []*FailedMonitor

Refused -

func (*Monitor) SubscribeOnMempoolApplied added in v0.1.36

func (monitor *Monitor) SubscribeOnMempoolApplied(ctx context.Context)

SubscribeOnMempoolApplied -

func (*Monitor) SubscribeOnMempoolBranchDelayed added in v0.1.36

func (monitor *Monitor) SubscribeOnMempoolBranchDelayed(ctx context.Context)

SubscribeOnMempoolBranchDelayed -

func (*Monitor) SubscribeOnMempoolBranchRefused added in v0.1.36

func (monitor *Monitor) SubscribeOnMempoolBranchRefused(ctx context.Context)

SubscribeOnMempoolBranchRefused -

func (*Monitor) SubscribeOnMempoolOutdated added in v0.2.11

func (monitor *Monitor) SubscribeOnMempoolOutdated(ctx context.Context)

SubscribeOnMempoolOutdated -

func (*Monitor) SubscribeOnMempoolRefused added in v0.1.36

func (monitor *Monitor) SubscribeOnMempoolRefused(ctx context.Context)

SubscribeOnMempoolRefused -

type Network added in v0.2.0

type Network struct {
	// contains filtered or unexported fields
}

Network -

func NewNetwork added in v0.2.0

func NewNetwork(baseURL string) *Network

NewNetwork -

func (*Network) Connection added in v0.2.0

func (api *Network) Connection(ctx context.Context, peerID string) (Connection, error)

Connection -

func (*Network) ConnectionVersion added in v0.2.0

func (api *Network) ConnectionVersion(ctx context.Context) (ConnectionVersion, error)

ConnectionVersion -

func (*Network) Connections added in v0.2.0

func (api *Network) Connections(ctx context.Context) ([]Connection, error)

Connections -

func (*Network) Points added in v0.2.0

func (api *Network) Points(ctx context.Context) ([]NetworkPointWithURI, error)

Points -

type NetworkAPI added in v0.2.0

type NetworkAPI interface {
	Connections(ctx context.Context) ([]Connection, error)
	Connection(ctx context.Context, peerID string) (Connection, error)
	Points(ctx context.Context) ([]NetworkPointWithURI, error)
	ConnectionVersion(ctx context.Context) (ConnectionVersion, error)
}

NetworkAPI -

type NetworkPoint added in v0.1.57

type NetworkPoint struct {
	Trusted         bool   `json:"trusted"`
	GreylistedUntil string `json:"greylisted_until"`
	State           struct {
		EventKind string `json:"event_kind"`
		P2PPeerID string `json:"p2p_peer_id"`
	} `json:"state"`
	P2PPeerID                 string   `json:"p2p_peer_id"`
	LastFailedConnection      string   `json:"last_failed_connection"`
	LastRejectedConnection    []string `json:"last_rejected_connection"`
	LastEstablishedConnection []string `json:"last_established_connection"`
	LastDisconnection         []string `json:"last_disconnection"`
	LastSeen                  []string `json:"last_seen"`
	LastMiss                  string   `json:"last_miss"`
}

NetworkPoint -

type NetworkPointWithURI added in v0.1.57

type NetworkPointWithURI struct {
	URI string
	NetworkPoint
}

NetworkPointWithURI -

func (*NetworkPointWithURI) UnmarshalJSON added in v0.1.57

func (n *NetworkPointWithURI) UnmarshalJSON(buf []byte) error

UnmarshalJSON -

type OnlyBalanceUpdatesMetadata added in v0.1.33

type OnlyBalanceUpdatesMetadata struct {
	BalanceUpdates []BalanceUpdate `json:"balance_updates"`
}

OnlyBalanceUpdatesMetadata -

type Operation added in v0.1.33

type Operation struct {
	Kind string      `json:"kind"`
	Body interface{} `json:"-"`
}

Operation -

func (*Operation) UnmarshalJSON added in v0.1.33

func (op *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON -

type OperationGroup added in v0.1.33

type OperationGroup struct {
	Protocol  string      `json:"protocol"`
	ChainID   string      `json:"chain_id"`
	Hash      string      `json:"hash"`
	Branch    string      `json:"branch"`
	Signature string      `json:"signature"`
	Contents  []Operation `json:"contents"`
}

OperationGroup -

type OperationResult added in v0.1.33

type OperationResult struct {
	Status                       string              `json:"status"`
	Storage                      *stdJSON.RawMessage `json:"storage,omitempty"`
	BigMapDiff                   []BigMapDiff        `json:"big_map_diff,omitempty"`
	LazyStorageDiff              []LazyStorageDiff   `json:"lazy_storage_diff,omitempty"`
	BalanceUpdates               []BalanceUpdate     `json:"balance_updates,omitempty"`
	OriginatedContracts          []string            `json:"originated_contracts,omitempty"`
	ConsumedGas                  string              `json:"consumed_gas,omitempty"`
	ConsumedMilligas             string              `json:"consumed_milligas,omitempty"`
	StorageSize                  string              `json:"storage_size,omitempty"`
	OriginatedRollup             string              `json:"originated_rollup"`
	PaidStorageSizeDiff          string              `json:"paid_storage_size_diff,omitempty"`
	AllocatedDestinationContract bool                `json:"allocated_destination_contract,omitempty"`
	Level                        *uint64             `json:"level,omitempty"`
	Errors                       []ResultError       `json:"errors,omitempty"`
}

OperationResult -

type Origination added in v0.1.33

type Origination struct {
	Source        string                    `json:"source"`
	Fee           string                    `json:"fee"`
	Counter       string                    `json:"counter"`
	GasLimit      string                    `json:"gas_limit"`
	StorageLimit  string                    `json:"storage_limit"`
	Balance       string                    `json:"balance"`
	Delegate      string                    `json:"delegate,omitempty"`
	Script        stdJSON.RawMessage        `json:"script"`
	ManagerPubkey string                    `json:"managerPubkey,omitempty"`
	Metadata      *ManagerOperationMetadata `json:"metadata,omitempty"`
}

Origination -

type Parameters added in v0.1.33

type Parameters struct {
	Entrypoint string              `json:"entrypoint"`
	Value      *stdJSON.RawMessage `json:"value"`
}

Parameters -

type Point added in v0.2.0

type Point struct {
	Addr string `json:"addr"`
	Port int    `json:"port"`
}

Point -

type Preendorsement added in v0.2.0

type Preendorsement struct {
	Slot             uint64 `json:"slot"`
	Level            uint64 `json:"level"`
	Round            int64  `json:"round"`
	BlockPayloadHash string `json:"block_payload_hash"`
	Metadata         struct {
		BalanceUpdates      []interface{} `json:"balance_updates"`
		Delegate            string        `json:"delegate"`
		PreendorsementPower int           `json:"preendorsement_power"`
	} `json:"metadata"`
}

Preendorsement -

type Proposal added in v0.1.33

type Proposal struct {
	Source    string   `json:"source"`
	Period    uint64   `json:"period"`
	Proposals []string `json:"proposals"`
}

Proposal -

type ProtocolComponent added in v0.2.0

type ProtocolComponent struct {
	Name           string `json:"name"`
	Interface      string `json:"interface,omitempty"`
	Implementation string `json:"implementation"`
}

ProtocolComponent -

type ProtocolData added in v0.2.0

type ProtocolData struct {
	Protocol                  string `json:"protocol"`
	Priority                  int    `json:"priority"`
	ProofOfWorkNonce          string `json:"proof_of_work_nonce"`
	LiquidityBakingEscapeVote bool   `json:"liquidity_baking_escape_vote"`
	Signature                 string `json:"signature"`
}

ProtocolData -

type ProtocolInfo added in v0.2.0

type ProtocolInfo struct {
	ExpectedEnvVersion int                 `json:"expected_env_version"`
	Components         []ProtocolComponent `json:"components"`
}

ProtocolInfo -

type Protocols added in v0.2.0

type Protocols struct {
	// contains filtered or unexported fields
}

Protocols -

func NewProtocols added in v0.2.0

func NewProtocols(baseURL string) *Protocols

NewProtocols -

func (*Protocols) Environment added in v0.2.0

func (api *Protocols) Environment(ctx context.Context, hash string) (int, error)

Environment -

func (*Protocols) GetProtocols added in v0.2.0

func (api *Protocols) GetProtocols(ctx context.Context) ([]string, error)

GetProtocols -

func (*Protocols) Protocol added in v0.2.0

func (api *Protocols) Protocol(ctx context.Context, hash string) (ProtocolInfo, error)

Protocol -

type ProtocolsAPI added in v0.2.0

type ProtocolsAPI interface {
	GetProtocols(ctx context.Context) ([]string, error)
	Protocol(ctx context.Context, hash string) (ProtocolInfo, error)
	Environment(ctx context.Context, hash string) (int, error)
}

ProtocolsAPI -

type RPC added in v0.2.0

type RPC struct {
	*BlockRPC
	*Chain
	*Context
	*Config
	*General
	*Protocols
	*Network
	*Inject
}

RPC -

func NewMainRPC added in v0.2.0

func NewMainRPC(baseURL string) *RPC

NewMainRPC -

func NewRPC added in v0.2.0

func NewRPC(baseURL, chainID string) *RPC

NewRPC -

type Refutation added in v0.2.28

type Refutation struct {
	RefutationKind         string `json:"refutation_kind"`
	PlayerCommitmentHash   string `json:"player_commitment_hash"`
	OpponentCommitmentHash string `json:"opponent_commitment_hash"`
}

Refutation -

type RegisterGlobalConstant added in v0.1.33

type RegisterGlobalConstant struct {
	Source       string             `json:"source"`
	Fee          string             `json:"fee"`
	Counter      string             `json:"counter"`
	GasLimit     string             `json:"gas_limit"`
	StorageLimit string             `json:"storage_limit"`
	Value        stdJSON.RawMessage `json:"value"`
}

RegisterGlobalConstant -

type RequestError added in v0.1.36

type RequestError struct {
	Code int
	Body string
	Err  error
}

RequestError -

func (RequestError) Error added in v0.1.36

func (e RequestError) Error() string

Error -

type ResultError added in v0.1.33

type ResultError struct {
	Kind           string              `json:"kind"`
	ID             string              `json:"id,omitempty"`
	With           *stdJSON.RawMessage `json:"with,omitempty"`
	Msg            string              `json:"msg,omitempty"`
	Location       int64               `json:"location,omitempty"`
	ContractHandle string              `json:"contract_handle,omitempty"`
	ContractCode   *stdJSON.RawMessage `json:"contract_code,omitempty"`
}

ResultError -

type Reveal added in v0.1.33

type Reveal struct {
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	PublicKey    string                    `json:"public_key"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

Reveal -

type Rolls added in v0.2.0

type Rolls struct {
	Pkh   string `json:"pkh"`
	Rolls int    `json:"rolls"`
}

Rolls -

type RollupCommitment added in v0.2.14

type RollupCommitment struct {
	Level           uint64                   `json:"level"`
	Messages        RollupCommitmentMessages `json:"messages"`
	Predecessor     *string                  `json:"predecessor,omitempty"`
	InboxMerkleRoot string                   `json:"inbox_merkle_root"`
}

RollupCommitment -

type RollupCommitmentForBlock added in v0.2.14

type RollupCommitmentForBlock struct {
	Commitment     RollupCommitment `json:"commitment"`
	CommitmentHash string           `json:"commitment_hash"`
	Committer      string           `json:"committer"`
	SubmittedAt    uint64           `json:"submitted_at"`
	FinalizedAt    uint64           `json:"finalized_at"`
}

RollupCommitmentForBlock -

type RollupCommitmentMessages added in v0.2.14

type RollupCommitmentMessages struct {
	Count                 uint64 `json:"count"`
	Root                  string `json:"root"`
	LastMessageResultHash string `json:"last_message_result_hash"`
}

RollupCommitmentMessages -

type RollupStateCommitment added in v0.2.14

type RollupStateCommitment struct {
	Next   *uint64 `json:"next,omitempty"`
	Newest *uint64 `json:"newest,omitempty"`
	Oldest *uint64 `json:"oldest,omitempty"`
}

RollupStateCommitment -

type SaplingTransactionCiphertext added in v0.1.33

type SaplingTransactionCiphertext struct {
	CV         string `json:"cv"`
	EPK        string `json:"epk"`
	PayloadEnc string `json:"payload_enc"`
	NonceEnc   string `json:"nonce_enc"`
	PayloadOut string `json:"payload_out"`
	NonceOut   string `json:"nonce_out"`
}

SaplingTransactionCiphertext -

type Savepoint added in v0.2.0

type Savepoint struct {
	Hash  string `json:"block_hash"`
	Level uint64 `json:"level"`
}

Savepoint -

type Script added in v0.2.0

type Script struct {
	Code   stdJSON.RawMessage `json:"code"`
	Strage stdJSON.RawMessage `json:"storage"`
}

Script -

type SeedNonceRevelation added in v0.1.33

type SeedNonceRevelation struct {
	Level    uint64                      `json:"level"`
	Nonce    string                      `json:"nonce"`
	Metadata *OnlyBalanceUpdatesMetadata `json:"metadata,omitempty"`
}

SeedNonceRevelation -

type SetDepositsLimit added in v0.2.0

type SetDepositsLimit struct {
	Kind         string                    `json:"kind"`
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Limit        *string                   `json:"limit,omitempty"`
	Metadata     *ManagerOperationMetadata `json:"metadata"`
}

SetDepositsLimit -

type SmartRollupAddMessage added in v0.2.28

type SmartRollupAddMessage struct {
	Kind         string                    `json:"kind"`
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Message      []string                  `json:"message"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

SmartRollupAddMessage -

type SmartRollupCement added in v0.2.28

type SmartRollupCement struct {
	Kind         string                    `json:"kind"`
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Rollup       string                    `json:"rollup"`
	Commitment   string                    `json:"commitment"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

SmartRollupCement -

type SmartRollupExecute added in v0.2.28

type SmartRollupExecute struct {
	Kind               string                    `json:"kind"`
	Source             string                    `json:"source"`
	Fee                string                    `json:"fee"`
	Counter            string                    `json:"counter"`
	GasLimit           string                    `json:"gas_limit"`
	StorageLimit       string                    `json:"storage_limit"`
	Rollup             string                    `json:"rollup"`
	CementedCommitment string                    `json:"cemented_commitment"`
	OutputProof        string                    `json:"output_proof"`
	Metadata           *ManagerOperationMetadata `json:"metadata,omitempty"`
}

SmartRollupExecute -

type SmartRollupOriginate added in v0.2.28

type SmartRollupOriginate struct {
	Kind             string                    `json:"kind"`
	Source           string                    `json:"source"`
	Fee              string                    `json:"fee"`
	Counter          string                    `json:"counter"`
	GasLimit         string                    `json:"gas_limit"`
	StorageLimit     string                    `json:"storage_limit"`
	PvmKind          string                    `json:"pvm_kind"`
	Kernel           string                    `json:"kernel"`
	OriginationProof string                    `json:"origination_proof"`
	ParametersTy     string                    `json:"parameters_ty"`
	Metadata         *ManagerOperationMetadata `json:"metadata,omitempty"`
}

SmartRollupOriginate -

type SmartRollupPublish added in v0.2.28

type SmartRollupPublish struct {
	Kind         string                    `json:"kind"`
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Rollup       string                    `json:"rollup"`
	Commitment   SrCommitmentInfo          `json:"commitment"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

SmartRollupPublish -

type SmartRollupRecoverBond added in v0.2.28

type SmartRollupRecoverBond struct {
	Kind         string                    `json:"kind"`
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Rollup       string                    `json:"rollup"`
	Staker       string                    `json:"staker"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

SmartRollupRecoverBond -

type SmartRollupRefute added in v0.2.28

type SmartRollupRefute struct {
	Kind         string                    `json:"kind"`
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Rollup       string                    `json:"rollup"`
	Opponent     string                    `json:"opponent"`
	Refutation   Refutation                `json:"refutation"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

SmartRollupRefute -

type SmartRollupTimeout added in v0.2.28

type SmartRollupTimeout struct {
	Kind         string                    `json:"kind"`
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Rollup       string                    `json:"rollup"`
	Stakers      Stakers                   `json:"stakers"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

SmartRollupTimeout -

type SrCommitmentInfo added in v0.2.28

type SrCommitmentInfo struct {
	CompressedState string `json:"compressed_state"`
	InboxLevel      uint64 `json:"inbox_level"`
	Predecessor     string `json:"predecessor"`
	NumberOfTicks   string `json:"number_of_ticks"`
}

SrCommitmentInfo -

type Stakers added in v0.2.28

type Stakers struct {
	Alice string `json:"alice"`
	Bob   string `json:"bob"`
}

Stakers -

type StatsGC added in v0.2.0

type StatsGC struct {
	MinorWords             int64 `json:"minor_words"`
	PromotedWords          int64 `json:"promoted_words"`
	MajorWords             int64 `json:"major_words"`
	MinorCollections       int64 `json:"minor_collections"`
	MajorCollections       int64 `json:"major_collections"`
	ForcedMajorCollections int64 `json:"forced_major_collections"`
	HeapWords              int64 `json:"heap_words"`
	HeapChunks             int64 `json:"heap_chunks"`
	LiveWords              int64 `json:"live_words"`
	LiveBlocks             int64 `json:"live_blocks"`
	FreeWords              int64 `json:"free_words"`
	FreeBlocks             int64 `json:"free_blocks"`
	LargestFree            int64 `json:"largest_free"`
	Fragments              int64 `json:"fragments"`
	Compactions            int64 `json:"compactions"`
	TopHeapWords           int64 `json:"top_heap_words"`
	StackSize              int64 `json:"stack_size"`
}

StatsGC -

type StatsMemory added in v0.2.0

type StatsMemory struct {
	PageSize int64  `json:"page_size"`
	Size     string `json:"size"`
	Resident string `json:"resident"`
	Shared   string `json:"shared"`
	Text     string `json:"text"`
	Lib      string `json:"lib"`
	Data     string `json:"data"`
	Dt       string `json:"dt"`
}

StatsMemory -

type TicketsInfo added in v0.2.20

type TicketsInfo struct {
	Contents stdJSON.RawMessage `json:"contents"`
	Ty       stdJSON.RawMessage `json:"ty"`
	Ticketer string             `json:"ticketer"`
	Amount   string             `json:"amount"`
	Claimer  string             `json:"claimer"`
}

TicketsInfo -

type Transaction added in v0.1.33

type Transaction struct {
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Amount       string                    `json:"amount"`
	Destination  string                    `json:"destination"`
	Parameters   *Parameters               `json:"parameters,omitempty"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

Transaction -

type TxRollupCommit added in v0.2.20

type TxRollupCommit struct {
	Kind         string                    `json:"kind"`
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Rollup       string                    `json:"rollup"`
	Commitment   TxRollupCommitment        `json:"commitment"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

TxRollupCommit -

type TxRollupCommitment added in v0.2.20

type TxRollupCommitment struct {
	Level           uint64   `json:"level"`
	Messages        []string `json:"messages"`
	Predecessor     string   `json:"predecessor"`
	InboxMerkleRoot string   `json:"inbox_merkle_root"`
}

TxRollupCommitment -

type TxRollupDispatchTickets added in v0.2.20

type TxRollupDispatchTickets struct {
	Kind              string                    `json:"kind"`
	Source            string                    `json:"source"`
	Fee               string                    `json:"fee"`
	Counter           string                    `json:"counter"`
	GasLimit          string                    `json:"gas_limit"`
	StorageLimit      string                    `json:"storage_limit"`
	TxRollup          string                    `json:"tx_rollup"`
	Level             int                       `json:"level"`
	ContextHash       string                    `json:"context_hash"`
	MessageIndex      int                       `json:"message_index"`
	MessageResultPath []string                  `json:"message_result_path"`
	TicketsInfo       []TicketsInfo             `json:"tickets_info"`
	Metadata          *ManagerOperationMetadata `json:"metadata,omitempty"`
}

TxRollupDispatchTickets -

type TxRollupFinalizeCommitment added in v0.2.20

type TxRollupFinalizeCommitment struct {
	Kind         string                    `json:"kind"`
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Rollup       string                    `json:"rollup"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

TxRollupFinalizeCommitment -

type TxRollupInbox added in v0.2.14

type TxRollupInbox struct {
	InboxLength   uint64 `json:"inbox_length"`
	CumulatedSize uint64 `json:"cumulated_size"`
	MerkleRoot    string `json:"merkle_root"`
}

TxRollupInbox -

type TxRollupOrigination added in v0.2.20

type TxRollupOrigination struct {
	Kind                string                    `json:"kind"`
	Source              string                    `json:"source"`
	Fee                 string                    `json:"fee"`
	Counter             string                    `json:"counter"`
	GasLimit            string                    `json:"gas_limit"`
	StorageLimit        string                    `json:"storage_limit"`
	TxRollupOrigination any                       `json:"tx_rollup_origination"`
	Metadata            *ManagerOperationMetadata `json:"metadata,omitempty"`
}

TxRollupOrigination -

type TxRollupRejection added in v0.2.20

type TxRollupRejection struct {
	Kind         string `json:"kind"`
	Source       string `json:"source"`
	Fee          string `json:"fee"`
	Counter      string `json:"counter"`
	GasLimit     string `json:"gas_limit"`
	StorageLimit string `json:"storage_limit"`
	Rollup       string `json:"rollup"`
	Level        int    `json:"level"`
	Message      struct {
		Batch string `json:"batch"`
	} `json:"message"`
	MessagePosition       string   `json:"message_position"`
	MessagePath           []string `json:"message_path"`
	MessageResultHash     string   `json:"message_result_hash"`
	MessageResultPath     []string `json:"message_result_path"`
	PreviousMessageResult struct {
		ContextHash      string `json:"context_hash"`
		WithdrawListHash string `json:"withdraw_list_hash"`
	} `json:"previous_message_result"`
	PreviousMessageResultPath []string `json:"previous_message_result_path"`
	Proof                     struct {
		Version uint64             `json:"version"`
		Before  stdJSON.RawMessage `json:"before"`
		After   stdJSON.RawMessage `json:"after"`
		State   stdJSON.RawMessage `json:"proof"`
	} `json:"proof"`
	Metadata struct {
		BalanceUpdates []struct {
			Kind     string `json:"kind"`
			Contract string `json:"contract,omitempty"`
			Change   string `json:"change"`
			Origin   string `json:"origin"`
			Category string `json:"category,omitempty"`
		} `json:"balance_updates"`
		OperationResult struct {
			Status         string `json:"status"`
			BalanceUpdates []struct {
				Kind     string `json:"kind"`
				Category string `json:"category,omitempty"`
				Contract string `json:"contract,omitempty"`
				BondID   struct {
					TxRollup string `json:"tx_rollup"`
				} `json:"bond_id,omitempty"`
				Change string `json:"change"`
				Origin string `json:"origin"`
			} `json:"balance_updates"`
			ConsumedGas      string `json:"consumed_gas"`
			ConsumedMilligas string `json:"consumed_milligas"`
		} `json:"operation_result"`
	} `json:"metadata"`
}

TxRollupRejection -

type TxRollupRemoveCommitment added in v0.2.20

type TxRollupRemoveCommitment struct {
	Kind         string                    `json:"kind"`
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Rollup       string                    `json:"rollup"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

TxRollupRemoveCommitment -

type TxRollupState added in v0.2.14

type TxRollupState struct {
	LastRemovedCommitmentHashes *LastRemovedCommitmentHashes `json:"last_removed_commitment_hashes,omitempty"`
	FinalizedCommitments        RollupStateCommitment        `json:"finalized_commitments"`
	UnfinalizedCommitments      RollupStateCommitment        `json:"unfinalized_commitments"`
	UncommittedInboxes          RollupStateCommitment        `json:"uncommitted_inboxes"`
	CommitmentNewestHash        *string                      `json:"commitment_newest_hash,omitempty"`
	TezosHeadLevel              *uint64                      `json:"tezos_head_level,omitempty"`
	BurnPerByte                 stdJSON.Number               `json:"burn_per_byte,omitempty"`
	AllocatedStorage            stdJSON.Number               `json:"allocated_storage"`
	OccupiedStorage             stdJSON.Number               `json:"occupied_storage"`
	InboxEma                    uint64                       `json:"inbox_ema"`
	CommitmentsWatermark        *uint64                      `json:"commitments_watermark,omitempty"`
}

TxRollupState -

type TxRollupSubmitBatch added in v0.2.20

type TxRollupSubmitBatch struct {
	Kind         string                    `json:"kind"`
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Rollup       string                    `json:"rollup"`
	Content      string                    `json:"content"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

TxRollupSubmitBatch -

type UpdateConsensusKey added in v0.2.25

type UpdateConsensusKey struct {
	Kind         string                    `json:"kind"`
	Source       string                    `json:"source"`
	Fee          string                    `json:"fee"`
	Counter      string                    `json:"counter"`
	GasLimit     string                    `json:"gas_limit"`
	StorageLimit string                    `json:"storage_limit"`
	Pk           string                    `json:"pk"`
	Metadata     *ManagerOperationMetadata `json:"metadata,omitempty"`
}

UpdateConsensusKey -

type VdfRevelation added in v0.2.20

type VdfRevelation struct {
	Kind     string                    `json:"kind"`
	Solution []string                  `json:"solution"`
	Metadata *ManagerOperationMetadata `json:"metadata,omitempty"`
}

VdfRevelation -

type Version added in v0.2.0

type Version struct {
	Version struct {
		Major          int    `json:"major"`
		Minor          int    `json:"minor"`
		AdditionalInfo string `json:"additional_info"`
	} `json:"version"`
	NetworkVersion struct {
		ChainName            string `json:"chain_name"`
		DistributedDbVersion int    `json:"distributed_db_version"`
		P2PVersion           int    `json:"p2p_version"`
	} `json:"network_version"`
	CommitInfo struct {
		CommitHash string `json:"commit_hash"`
		CommitDate string `json:"commit_date"`
	} `json:"commit_info"`
}

Version -

type VotingPeriod added in v0.2.0

type VotingPeriod struct {
	VotingPeriod struct {
		Index         int    `json:"index"`
		Kind          string `json:"kind"`
		StartPosition int    `json:"start_position"`
	} `json:"voting_period"`
	Position  int `json:"position"`
	Remaining int `json:"remaining"`
}

VotingPeriod -

Jump to

Keyboard shortcuts

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