Documentation ¶
Index ¶
- Constants
- type AccountActivation
- type AccountActivationMetadata
- type ActiveChains
- type BakingRights
- type BakingRightsInput
- type BalanceUpdates
- type Ballot
- type BallotList
- type Ballots
- type BigMapDiff
- type BigMapDiffAction
- type BigMapDiffAlloc
- type BigMapDiffCopy
- type BigMapDiffRemove
- type BigMapDiffUpdate
- type BigMapDiffs
- type BigMapInput
- type Block
- type BlockHeader
- type BlockHeaderSignedContents
- type BlockID
- type BlockIDHash
- type BlockIDHead
- type BlockIDHeadPredecessor
- type BlockIDLevel
- type BlockIDPredecessor
- type Client
- func (c *Client) ActiveChains() (*resty.Response, ActiveChains, error)
- func (c *Client) BakingRights(input BakingRightsInput) (*resty.Response, []BakingRights, error)
- func (c *Client) BallotList(blockID BlockID) (*resty.Response, BallotList, error)
- func (c *Client) Ballots(blockID BlockID) (*resty.Response, Ballots, error)
- func (c *Client) BigMap(input BigMapInput) (*resty.Response, error)
- func (c *Client) Block(blockID BlockID) (*resty.Response, *Block, error)
- func (c *Client) CompletePrefix(input CompletePrefixInput) (*resty.Response, []string, error)
- func (c *Client) Connections() (*resty.Response, Connections, error)
- func (c *Client) Constants(input ConstantsInput) (*resty.Response, Constants, error)
- func (c *Client) Contract(input ContractInput) (*resty.Response, Contract, error)
- func (c *Client) ContractBalance(input ContractBalanceInput) (*resty.Response, string, error)
- func (c *Client) ContractCounter(input ContractCounterInput) (*resty.Response, int, error)
- func (c *Client) ContractDelegate(input ContractDelegateInput) (*resty.Response, string, error)
- func (c *Client) ContractEntrypoint(input ContractEntrypointInput) (*resty.Response, *json.RawMessage, error)
- func (c *Client) ContractEntrypoints(input ContractEntrypointsInput) (*resty.Response, map[string]*json.RawMessage, error)
- func (c *Client) ContractManagerKey(input ContractManagerKeyInput) (*resty.Response, string, error)
- func (c *Client) ContractSaplingDiff(input ContractSaplingDiffInput) (*resty.Response, error)
- func (c *Client) ContractScript(input ContractScriptInput) (*resty.Response, error)
- func (c *Client) ContractStorage(input ContractStorageInput) (*resty.Response, error)
- func (c *Client) Contracts(input ContractsInput) (*resty.Response, []string, error)
- func (c *Client) CurrentContstants() Constants
- func (c *Client) CurrentLevel(input CurrentLevelInput) (*resty.Response, CurrentLevel, error)
- func (c *Client) CurrentPeriod(blockID BlockID) (*resty.Response, VotingPeriod, error)
- func (c *Client) CurrentPeriodKind(blockID BlockID) (*resty.Response, string, error)
- func (c *Client) CurrentProposal(blockID BlockID) (*resty.Response, string, error)
- func (c *Client) CurrentQuorum(blockID BlockID) (*resty.Response, int, error)
- func (c *Client) Cycle(cycle int) (*resty.Response, Cycle, error)
- func (c *Client) Delegate(input DelegateInput) (*resty.Response, Delegate, error)
- func (c *Client) DelegateBalance(input DelegateBalanceInput) (*resty.Response, string, error)
- func (c *Client) DelegateDeactivated(input DelegateDeactivatedInput) (*resty.Response, bool, error)
- func (c *Client) DelegateDelegatedBalance(input DelegateDelegatedBalanceInput) (*resty.Response, string, error)
- func (c *Client) DelegateDelegatedContracts(input DelegateDelegatedContractsInput) (*resty.Response, []string, error)
- func (c *Client) DelegateFrozenBalance(input DelegateFrozenBalanceInput) (*resty.Response, string, error)
- func (c *Client) DelegateFrozenBalanceByCycle(input DelegateFrozenBalanceByCycleInput) (*resty.Response, []FrozenBalanceByCycle, error)
- func (c *Client) DelegateGracePeriod(input DelegateGracePeriodInput) (*resty.Response, int, error)
- func (c *Client) DelegateStakingBalance(input DelegateStakingBalanceInput) (*resty.Response, string, error)
- func (c *Client) DelegateVotingPower(input DelegateVotingPowerInput) (*resty.Response, int, error)
- func (c *Client) Delegates(input DelegatesInput) (*resty.Response, []string, error)
- func (c *Client) EndorsingPower(input EndorsingPowerInput) (*resty.Response, int, error)
- func (c *Client) EndorsingRights(input EndorsingRightsInput) (*resty.Response, []EndorsingRights, error)
- func (c *Client) Entrypoint(input EntrypointInput) (*resty.Response, Entrypoint, error)
- func (c *Client) Entrypoints(input EntrypointsInput) (*resty.Response, Entrypoints, error)
- func (c *Client) ForgeBlockHeader(input ForgeBlockHeaderInput) (*resty.Response, ForgeBlockHeader, error)
- func (c *Client) ForgeOperations(input ForgeOperationsInput) (*resty.Response, string, error)
- func (c *Client) Get(path string, opts ...rpcOptions) (*resty.Response, error)
- func (c *Client) GetFA12Allowance(input GetFA12AllowanceInput) (*resty.Response, string, error)
- func (c *Client) GetFA12Balance(input GetFA12BalanceInput) (*resty.Response, string, error)
- func (c *Client) GetFA12Supply(input GetFA12SupplyInput) (*resty.Response, string, error)
- func (c *Client) Hash(blockID BlockID) (*resty.Response, string, error)
- func (c *Client) Header(blockID BlockID) (*resty.Response, Header, error)
- func (c *Client) HeaderProtocolData(blockID BlockID) (*resty.Response, ProtocolData, error)
- func (c *Client) HeaderProtocolDataRaw(blockID BlockID) (*resty.Response, string, error)
- func (c *Client) HeaderRaw(blockID BlockID) (*resty.Response, string, error)
- func (c *Client) HeaderShell(blockID BlockID) (*resty.Response, HeaderShell, error)
- func (c *Client) InjectionBlock(input InjectionBlockInput) (*resty.Response, error)
- func (c *Client) InjectionOperation(input InjectionOperationInput) (*resty.Response, string, error)
- func (c *Client) LevelsInCurrentCycle(input LevelsInCurrentCycleInput) (*resty.Response, LevelsInCurrentCycle, error)
- func (c *Client) Listings(blockID BlockID) (*resty.Response, Listings, error)
- func (c *Client) LiveBlocks(blockID BlockID) (*resty.Response, []string, error)
- func (c *Client) Metadata(blockID BlockID) (*resty.Response, Metadata, error)
- func (c *Client) MetadataHash(blockID BlockID) (*resty.Response, string, error)
- func (c *Client) MinimalValidTime(input MinimalValidTimeInput) (*resty.Response, time.Time, error)
- func (c *Client) Nonces(input NoncesInput) (*resty.Response, Nonces, error)
- func (c *Client) OperationHashes(input OperationHashesInput) (*resty.Response, OperationHashes, error)
- func (c *Client) OperationMetadataHashes(input OperationMetadataHashesInput) (*resty.Response, OperationMetadataHashes, error)
- func (c *Client) Operations(input OperationsInput) (*resty.Response, FlattenedOperations, error)
- func (c *Client) OperationsMetadataHash(blockID BlockID) (*resty.Response, string, error)
- func (c *Client) OverrideClient(client *resty.Client)
- func (c *Client) PackData(input PackDataInput) (*resty.Response, PackedData, error)
- func (c *Client) ParseBlock(input ParseBlockInput) (*resty.Response, BlockHeaderSignedContents, error)
- func (c *Client) ParseOperations(input ParseOperationsInput) (*resty.Response, []Operations, error)
- func (c *Client) Post(path string, body interface{}, opts ...rpcOptions) (*resty.Response, error)
- func (c *Client) PreapplyBlock(input PreapplyBlockInput) (*resty.Response, PreappliedBlock, error)
- func (c *Client) PreapplyOperations(input PreapplyOperationsInput) (*resty.Response, []Operations, error)
- func (c *Client) Proposals(blockID BlockID) (*resty.Response, Proposals, error)
- func (c *Client) Protocols(blockID BlockID) (*resty.Response, Protocols, error)
- func (c *Client) RawBytes(input RawBytesInput) (*resty.Response, error)
- func (c *Client) RequiredEndorsements(input RequiredEndorsementsInput) (*resty.Response, int, error)
- func (c *Client) RunCode(input RunCodeInput) (*resty.Response, RanCode, error)
- func (c *Client) RunOperation(input RunOperationInput) (*resty.Response, Operations, error)
- func (c *Client) SaplingDiff(input SaplingDiffInput) (*resty.Response, error)
- func (c *Client) Seed(input SeedInput) (*resty.Response, string, error)
- func (c *Client) SetChain(chain string)
- func (c *Client) SetConstants(constants Constants)
- func (c *Client) SimulationOperation(input InjectionOperationInput) (*resty.Response, string, error)
- func (c *Client) SuccessorPeriod(blockID BlockID) (*resty.Response, VotingPeriod, error)
- func (c *Client) TotalVotingPower(blockID BlockID) (*resty.Response, int, error)
- func (c *Client) TraceCode(input TraceCodeInput) (*resty.Response, TracedCode, error)
- func (c *Client) TypecheckCode(input TypeCheckcodeInput) (*resty.Response, TypecheckedCode, error)
- func (c *Client) TypecheckData(input TypecheckDataInput) (*resty.Response, TypecheckedData, error)
- type CompletePrefixInput
- type Connections
- type Constants
- type ConstantsInput
- type Content
- func (c *Content) MarshalJSON() ([]byte, error)
- func (c *Content) ToAccountActivation() AccountActivation
- func (c *Content) ToBallot() Ballot
- func (c *Content) ToDelegation() Delegation
- func (c *Content) ToDoubleBakingEvidence() DoubleBakingEvidence
- func (c *Content) ToDoubleEndorsementEvidence() DoubleEndorsementEvidence
- func (c *Content) ToEndorsement() Endorsement
- func (c *Content) ToOrigination() Origination
- func (c *Content) ToProposal() Proposal
- func (c *Content) ToReveal() Reveal
- func (c *Content) ToSeedNonceRevelations() SeedNonceRevelation
- func (c *Content) ToTransaction() Transaction
- type Contents
- type ContentsMetadata
- type Contract
- type ContractBalanceInput
- type ContractCounterInput
- type ContractDelegateInput
- type ContractEntrypointInput
- type ContractEntrypointsInput
- type ContractInput
- type ContractManagerKeyInput
- type ContractSaplingDiffInput
- type ContractScriptInput
- type ContractStorageInput
- type ContractsInput
- type CurrentLevel
- type CurrentLevelInput
- type Cycle
- type Delegate
- type DelegateBalanceInput
- type DelegateDeactivatedInput
- type DelegateDelegatedBalanceInput
- type DelegateDelegatedContractsInput
- type DelegateFrozenBalanceByCycleInput
- type DelegateFrozenBalanceInput
- type DelegateGracePeriodInput
- type DelegateInput
- type DelegateStakingBalanceInput
- type DelegateVotingPowerInput
- type DelegatesInput
- type Delegation
- type DelegationMetadata
- type DoubleBakingEvidence
- type DoubleBakingEvidenceMetadata
- type DoubleEndorsementEvidence
- type DoubleEndorsementEvidenceMetadata
- type Endorsement
- type EndorsementMetadata
- type EndorsingOperation
- type EndorsingPower
- type EndorsingPowerInput
- type EndorsingRights
- type EndorsingRightsInput
- type Entrypoint
- type EntrypointBody
- type EntrypointInput
- type Entrypoints
- type EntrypointsBody
- type EntrypointsInput
- type Error
- type Errors
- type FlattenedOperations
- type ForgeBlockHeader
- type ForgeBlockHeaderBody
- type ForgeBlockHeaderInput
- type ForgeOperationsInput
- type FrozenBalanceByCycle
- type GetFA12AllowanceInput
- type GetFA12BalanceInput
- type GetFA12SupplyInput
- type Header
- type HeaderShell
- type IFace
- type InjectionBlockInput
- type InjectionOperationInput
- type InlinedEndorsement
- type InlinedEndorsementOperations
- type IntArray
- type InternalOperationResults
- type Kind
- type Level
- type LevelsInCurrentCycle
- type LevelsInCurrentCycleInput
- type Listings
- type MaxOperationListLength
- type Metadata
- type MinimalValidTimeInput
- type Nonces
- type NoncesInput
- type OperationHashes
- type OperationHashesInput
- type OperationMetadataHashes
- type OperationMetadataHashesInput
- type OperationResult
- type OperationResultDelegation
- type OperationResultOrigination
- type OperationResultReveal
- type OperationResultTransfer
- type OperationResults
- type Operations
- type OperationsInput
- type OrganizedBigMapDiff
- type OrganizedContents
- type Origination
- type OriginationMetadata
- type PackDataBody
- type PackDataInput
- type PackedData
- type Parameters
- type ParseBlockInput
- type ParseOperationsBody
- type ParseOperationsInput
- type PreappliedBlock
- type PreappliedBlockOperations
- type PreappliedBlockOperationsStatus
- type PreapplyBlockBody
- type PreapplyBlockInput
- type PreapplyBlockProtocolData
- type PreapplyOperationsInput
- type Proposal
- type Proposals
- type ProtocolData
- type Protocols
- type RanCode
- type RawBytesInput
- type RequiredEndorsementsInput
- type ResultError
- type Reveal
- type RevealMetadata
- type RunCodeBody
- type RunCodeInput
- type RunOperation
- type RunOperationInput
- type SaplingDiffInput
- type Script
- type ScriptedContracts
- type SeedInput
- type SeedNonceRevelation
- type SeedNonceRevelationMetadata
- type Stack
- type TestChainStatus
- type Trace
- type TraceCodeInput
- type TracedCode
- type Transaction
- type TransactionMetadata
- type TypeCheckcodeInput
- type TypecheckCodeBody
- type TypecheckDataBody
- type TypecheckDataInput
- type TypecheckedCode
- type TypecheckedData
- type UnreachableEntrypoints
- type VotingPeriod
Constants ¶
const MUTEZ = 1000000
MUTEZ is mutez on the tezos network
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountActivation ¶
type AccountActivation struct { Kind Kind `json:"kind"` Pkh string `json:"pkh"` Secret string `json:"secret"` Metadata *AccountActivationMetadata `json:"metadata,omitempty"` }
AccountActivation represents an Activate_account in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
func (*AccountActivation) ToContent ¶
func (a *AccountActivation) ToContent() Content
ToContent converts a AccountActivation to Content
type AccountActivationMetadata ¶
type AccountActivationMetadata struct {
BalanceUpdates []BalanceUpdates `json:"balance_updates"`
}
AccountActivationMetadata represents the metadata for Activate_account in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type ActiveChains ¶
type ActiveChains []struct { ChainID string `json:"chain_id"` TestProtocol string `json:"test_protocol"` ExpirationDate time.Time `json:"expiration_date"` Stopping string `json:"stopping"` }
ActiveChains is the active chains on the tezos network.
RPC:
https://tezos.gitlab.io/shell/rpc.html#get-monitor-active-chains
type BakingRights ¶
type BakingRights struct { Level int `json:"level"` Delegate string `json:"delegate"` Priority int `json:"priority"` EstimatedTime time.Time `json:"estimated_time"` }
BakingRights represents the baking rights RPC on the tezos network.
Path:
../<block_id>/helpers/baking_rights?(level=<block_level>)*&(cycle=<block_cycle>)*&(delegate=<pkh>)*&[max_priority=<int>]&[all]
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-baking-rights
type BakingRightsInput ¶
type BakingRightsInput struct { // The hash of block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The cycle of which you want to make the query. Cycle int // The block level of which you want to make the query. Level int // The delegate public key hash of which you want to make the query. Delegate string // The max priotity of which you want to make the query. MaxPriority int // All baking rights All bool }
BakingRightsInput is the input for the BakingRights function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-baking-rights
type BalanceUpdates ¶
type BalanceUpdates struct { Kind string `json:"kind"` Contract string `json:"contract,omitempty"` Change string `json:"change"` Category string `json:"category,omitempty"` Delegate string `json:"delegate,omitempty"` Cycle int `json:"cycle,omitempty"` Level int `json:"level,omitempty"` }
BalanceUpdates represents the balance updates in a Tezos block
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type Ballot ¶
type Ballot struct { Kind Kind `json:"kind"` Source string `json:"source"` Period int `json:"period"` Proposal string `json:"proposal"` Ballot string `json:"ballot"` }
Ballot represents a Ballot in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type BallotList ¶
BallotList represents a list of casted ballots in a block.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-ballot-list
type Ballots ¶
Ballots represents a ballot total.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-ballots
type BigMapDiff ¶
type BigMapDiff struct { Action BigMapDiffAction `json:"action,omitempty"` BigMap string `json:"big_map,omitempty"` KeyHash string `json:"key_hash,omitempty"` Key *json.RawMessage `json:"key,omitempty"` Value *json.RawMessage `json:"value,omitempty"` SourceBigMap string `json:"source_big_map,omitempty"` DestinationBigMap string `json:"destination_big_map,omitempty"` KeyType *json.RawMessage `json:"key_type,omitempty"` ValueType *json.RawMessage `json:"value_type,omitempty"` }
BigMapDiff is an element of BigMapDiffs
func (BigMapDiff) ToAlloc ¶
func (b BigMapDiff) ToAlloc() BigMapDiffAlloc
ToAlloc converts BigMapDiff to BigMapDiffAlloc
func (BigMapDiff) ToCopy ¶
func (b BigMapDiff) ToCopy() BigMapDiffCopy
ToCopy converts BigMapDiff to BigMapDiffCopy
func (BigMapDiff) ToRemove ¶
func (b BigMapDiff) ToRemove() BigMapDiffRemove
ToRemove converts BigMapDiff to BigMapDiffRemove
func (BigMapDiff) ToUpdate ¶
func (b BigMapDiff) ToUpdate() BigMapDiffUpdate
ToUpdate converts BigMapDiff to BigMapDiffUpdate
type BigMapDiffAction ¶
type BigMapDiffAction string
BigMapDiffAction is an Action in a BigMapDiff
const ( // UPDATE is a big_map_diff action UPDATE BigMapDiffAction = "update" // REMOVE is a big_map_diff action REMOVE BigMapDiffAction = "remove" // COPY is a big_map_diff action COPY BigMapDiffAction = "copy" // ALLOC is a big_map_diff action ALLOC BigMapDiffAction = "alloc" )
type BigMapDiffAlloc ¶
type BigMapDiffAlloc struct { Action BigMapDiffAction `json:"action"` BigMap string `json:"big_map"` KeyType *json.RawMessage `json:"key_type"` ValueType *json.RawMessage `json:"value_type"` }
BigMapDiffAlloc represents $contract.big_map_diff in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type BigMapDiffCopy ¶
type BigMapDiffCopy struct { Action BigMapDiffAction `json:"action"` SourceBigMap string `json:"source_big_map"` DestinationBigMap string `json:"destination_big_map"` }
BigMapDiffCopy represents $contract.big_map_diff in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type BigMapDiffRemove ¶
type BigMapDiffRemove struct { Action BigMapDiffAction `json:"action"` BigMap string `json:"big_map"` }
BigMapDiffRemove represents $contract.big_map_diff in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type BigMapDiffUpdate ¶
type BigMapDiffUpdate struct { Action BigMapDiffAction `json:"action"` BigMap string `json:"big_map,omitempty"` KeyHash string `json:"key_hash,omitempty"` Key *json.RawMessage `json:"key"` Value *json.RawMessage `json:"value,omitempty"` }
BigMapDiffUpdate represents $contract.big_map_diff in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type BigMapDiffs ¶
type BigMapDiffs []BigMapDiff
BigMapDiffs represents $contract.big_map_diff in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
func (BigMapDiffs) Organize ¶
func (b BigMapDiffs) Organize() OrganizedBigMapDiff
Organize converts BigMapDiffs into OrganizedBigMapDiff
type BigMapInput ¶
type BigMapInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The ID of the BigMap you wish to query. BigMapID int `validate:"required"` // The key. Look at the forge package for functions that end with Expression to forge this. ScriptExpression string `validate:"required"` }
BigMapInput is the input for the BigMap function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
type Block ¶
type Block struct { Protocol string `json:"protocol"` ChainID string `json:"chain_id"` Hash string `json:"hash"` Header Header `json:"header"` Metadata Metadata `json:"metadata"` Operations [][]Operations `json:"operations"` }
Block represents a Tezos block.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type BlockHeader ¶
type BlockHeader struct { Level int `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"` SeedNonceHash string `json:"seed_nonce_hash"` Signature string `json:"signature"` }
BlockHeader represents $block_header.alpha.full_header in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type BlockHeaderSignedContents ¶
type BlockHeaderSignedContents struct { Priority int `json:"priority"` ProofOfWorkNonce string `json:"proof_of_work_nonce"` SeedNonceHash string `json:"seed_nonce_hash"` Signature string `json:"signature"` }
BlockHeaderSignedContents is signed header contents returend from parsing a block
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-parse-block
type BlockIDHeadPredecessor ¶
type BlockIDHeadPredecessor int
BlockIDHeadPredecessor is a BlockID equivilent to head~<diff_level>
func (*BlockIDHeadPredecessor) ID ¶
func (b *BlockIDHeadPredecessor) ID() string
ID satisfies the BlockID interface
type BlockIDPredecessor ¶
BlockIDPredecessor is a BlockID equivilent to hash~<diff_level>
func (*BlockIDPredecessor) ID ¶
func (b *BlockIDPredecessor) ID() string
ID satisfies the BlockID interface
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains a client (http.Client), network contents, and the host of the node. Gives access to RPC related functions.
func New ¶
New returns a pointer to a Client and initializes the rpc configuration with the host's Tezos netowrk constants.
func (*Client) ActiveChains ¶
func (c *Client) ActiveChains() (*resty.Response, ActiveChains, error)
ActiveChains monitor every chain creation and destruction. Currently active chains will be given as first elements.
Path:
/monitor/active_chains (GET)
RPC:
https://tezos.gitlab.io/shell/rpc.html#get-monitor-active-chains
func (*Client) BakingRights ¶
func (c *Client) BakingRights(input BakingRightsInput) (*resty.Response, []BakingRights, error)
BakingRights retrieves the list of delegates allowed to bake a block. By default, it gives the best baking priorities for bakers that have at least one opportunity below the 64th priority for the next block. Parameters `level` and `cycle` can be used to specify the (valid) level(s) in the past or future at which the baking rights have to be returned. When asked for (a) whole cycle(s), baking opportunities are given by default up to the priority 8. Parameter `delegate` can be used to restrict the results to the given delegates. If parameter `all` is set, all the baking opportunities for each baker at each level are returned, instead of just the first one. Returns the list of baking slots. Also returns the minimal timestamps that correspond to these slots. The timestamps are omitted for levels in the past, and are only estimates for levels later that the next block, based on the hypothesis that all predecessor blocks were baked at the first priority.
Path:
../<block_id>/helpers/baking_rights?(level=<block_level>)*&(cycle=<block_cycle>)*&(delegate=<pkh>)*&[max_priority=<int>]&[all] (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-baking-rights
func (*Client) BallotList ¶
func (c *Client) BallotList(blockID BlockID) (*resty.Response, BallotList, error)
BallotList returns ballots casted so far during a voting period.
Path:
../<block_id>/votes/ballot_list (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-ballot-list
func (*Client) Ballots ¶
Ballots returns sum of ballots casted so far during a voting period.
Path:
../<block_id>/votes/ballots (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-ballots
func (*Client) BigMap ¶
func (c *Client) BigMap(input BigMapInput) (*resty.Response, error)
BigMap reads data from a big_map.
Path:
../<block_id>/context/big_maps/<big_map_id>/<script_expr> (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
func (*Client) Block ¶
Block gets all the information about a specific block
Path
/chains/<chain_id>/blocks/<block_id> (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id
func (*Client) CompletePrefix ¶
func (c *Client) CompletePrefix(input CompletePrefixInput) (*resty.Response, []string, error)
CompletePrefix tries to complete a prefix of a Base58Check-encoded data. This RPC is actually able to complete hashes of block, operations, public_keys and contracts.
Path:
../<block_id>/helpers/complete/<prefix>
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-complete-prefix
func (*Client) Connections ¶
func (c *Client) Connections() (*resty.Response, Connections, error)
Connections lists the running P2P connection.
Path:
/network/connections (GET)
RPC:
https://tezos.gitlab.io/shell/rpc.html#get-network-connections
func (*Client) Constants ¶
func (c *Client) Constants(input ConstantsInput) (*resty.Response, Constants, error)
Constants gets all constants.
Path:
../<block_id>/context/constants (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-constants
func (*Client) Contract ¶
func (c *Client) Contract(input ContractInput) (*resty.Response, Contract, error)
Contract accesses the complete status of a contract.
Path:
../<block_id>/context/contracts/<contract_id> (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id
func (*Client) ContractBalance ¶
func (c *Client) ContractBalance(input ContractBalanceInput) (*resty.Response, string, error)
ContractBalance accesses the balance of a contract.
Path:
../<block_id>/context/contracts/<contract_id>/balance (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-balance
func (*Client) ContractCounter ¶
func (c *Client) ContractCounter(input ContractCounterInput) (*resty.Response, int, error)
ContractCounter accesses the counter of a contract, if any.
Path:
../<block_id>/context/contracts/<contract_id>/counter (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-counter
func (*Client) ContractDelegate ¶
func (c *Client) ContractDelegate(input ContractDelegateInput) (*resty.Response, string, error)
ContractDelegate accesses the delegate of a contract, if any.
Path:
../<block_id>/context/contracts/<contract_id>/delegate (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-delegate
func (*Client) ContractEntrypoint ¶
func (c *Client) ContractEntrypoint(input ContractEntrypointInput) (*resty.Response, *json.RawMessage, error)
ContractEntrypoint returns the type of the given entrypoint of the contract.
Path:
../<block_id>/context/contracts/<contract_id>/entrypoints/<string> (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
func (*Client) ContractEntrypoints ¶
func (c *Client) ContractEntrypoints(input ContractEntrypointsInput) (*resty.Response, map[string]*json.RawMessage, error)
ContractEntrypoints return a map of entrypoints of the contract where the entrypoints are the keys and the micheline is the value.
Path:
../<block_id>/context/contracts/<contract_id>/entrypoints (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
func (*Client) ContractManagerKey ¶
func (c *Client) ContractManagerKey(input ContractManagerKeyInput) (*resty.Response, string, error)
ContractManagerKey accesses the manager of a contract.
Path:
../<block_id>/context/contracts/<contract_id>/manager_key (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
func (*Client) ContractSaplingDiff ¶
func (c *Client) ContractSaplingDiff(input ContractSaplingDiffInput) (*resty.Response, error)
ContractSaplingDiff returns the root and a diff of a state starting from an optional offset which is zero by default.
Path:
../<block_id>/context/contracts/<contract_id>/single_sapling_get_diff?[offset_commitment=<int64>]&[offset_nullifier=<int64>] (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-single-sapling-get-diff
func (*Client) ContractScript ¶
func (c *Client) ContractScript(input ContractScriptInput) (*resty.Response, error)
ContractScript accesses the code and data of the contract.
Path:
../<block_id>/context/contracts/<contract_id>/script (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-script
func (*Client) ContractStorage ¶
func (c *Client) ContractStorage(input ContractStorageInput) (*resty.Response, error)
ContractStorage accesses the data of the contract.
Path:
../<block_id>/context/contracts/<contract_id>/storage (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-storage
func (*Client) Contracts ¶
func (c *Client) Contracts(input ContractsInput) (*resty.Response, []string, error)
Contracts gets all constants.
Path:
../<block_id>/context/contracts (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts
func (*Client) CurrentContstants ¶
CurrentContstants returns the constants used on the client
func (*Client) CurrentLevel ¶
func (c *Client) CurrentLevel(input CurrentLevelInput) (*resty.Response, CurrentLevel, error)
CurrentLevel returns the level of the interrogated block, or the one of a block located `offset` blocks after in the chain (or before when negative). For instance, the next block if `offset` is 1.
Path:
../<block_id>/helpers/current_level?[offset=<int32>]
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-current-level
func (*Client) CurrentPeriod ¶
func (c *Client) CurrentPeriod(blockID BlockID) (*resty.Response, VotingPeriod, error)
CurrentPeriod returns the voting period (index, kind, starting position) and related information (position, remaining) of the interrogated block.
Path:
../<block_id>/votes/current_period (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-current-period
func (*Client) CurrentPeriodKind ¶
CurrentPeriodKind returns the current period kind.
Path:
../<block_id>/votes/current_period_kind (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-current-period-kind
func (*Client) CurrentProposal ¶
CurrentProposal returns the current proposal under evaluation.
Path:
../<block_id>/votes/current_proposal (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-current-proposal
func (*Client) CurrentQuorum ¶
CurrentQuorum returns the current expected quorum.
Path:
../<block_id>/votes/current_proposal (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-current-quorum
func (*Client) Cycle ¶
Cycle gets information about a tezos snapshot or cycle.
Path:
../context/raw/json/cycle/%d" (GET)
RPC:
Not documented.
func (*Client) Delegate ¶
func (c *Client) Delegate(input DelegateInput) (*resty.Response, Delegate, error)
Delegate returns everything about a delegate.
Path:
../<block_id>/context/contracts/<contract_id>/delegate (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-delegate
func (*Client) DelegateBalance ¶
func (c *Client) DelegateBalance(input DelegateBalanceInput) (*resty.Response, string, error)
DelegateBalance returns the full balance of a given delegate, including the frozen balances.
Path:
../<block_id>/context/delegates/<pkh>/balance (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-balance
func (*Client) DelegateDeactivated ¶
func (c *Client) DelegateDeactivated(input DelegateDeactivatedInput) (*resty.Response, bool, error)
DelegateDeactivated tells whether the delegate is currently tagged as deactivated or not.
Path:
../<block_id>/context/delegates/<pkh>/deactivated (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-deactivated
func (*Client) DelegateDelegatedBalance ¶
func (c *Client) DelegateDelegatedBalance(input DelegateDelegatedBalanceInput) (*resty.Response, string, error)
DelegateDelegatedBalance returns the balances of all the contracts that delegate to a given delegate. This excludes the delegate's own balance and its frozen balances.
Path:
../<block_id>/context/delegates/<pkh>/delegated_contracts (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-delegated-balance
func (*Client) DelegateDelegatedContracts ¶
func (c *Client) DelegateDelegatedContracts(input DelegateDelegatedContractsInput) (*resty.Response, []string, error)
DelegateDelegatedContracts returns the list of contracts that delegate to a given delegate.
Path:
../<block_id>/context/delegates/<pkh>/delegated_contracts (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-delegated-contracts
func (*Client) DelegateFrozenBalance ¶
func (c *Client) DelegateFrozenBalance(input DelegateFrozenBalanceInput) (*resty.Response, string, error)
DelegateFrozenBalance returns the total frozen balances of a given delegate, this includes the frozen deposits, rewards and fees.
Path:
../<block_id>/context/delegates/<pkh>/frozen_balance (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-frozen-balance
func (*Client) DelegateFrozenBalanceByCycle ¶
func (c *Client) DelegateFrozenBalanceByCycle(input DelegateFrozenBalanceByCycleInput) (*resty.Response, []FrozenBalanceByCycle, error)
DelegateFrozenBalanceByCycle returns the frozen balances of a given delegate, indexed by the cycle by which it will be unfrozen
Path:
../<block_id>/context/delegates/<pkh>/frozen_balance_by_cycle (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-frozen-balance-by-cycle
func (*Client) DelegateGracePeriod ¶
func (c *Client) DelegateGracePeriod(input DelegateGracePeriodInput) (*resty.Response, int, error)
DelegateGracePeriod returns the cycle by the end of which the delegate might be deactivated if she fails to execute any delegate action. A deactivated delegate might be reactivated (without loosing any rolls) by simply re-registering as a delegate. For deactivated delegates, this value contains the cycle by which they were deactivated.
Path:
../<block_id>/context/delegates/<pkh>/grace_period (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-grace-period
func (*Client) DelegateStakingBalance ¶
func (c *Client) DelegateStakingBalance(input DelegateStakingBalanceInput) (*resty.Response, string, error)
DelegateStakingBalance returns the total amount of tokens delegated to a given delegate. This includes the balances of all the contracts that delegate to it, but also the balance of the delegate itself and its frozen fees and deposits. The rewards do not count in the delegated balance until they are unfrozen.
Path:
../<block_id>/context/delegates/<pkh>/staking_balance (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-staking-balance
func (*Client) DelegateVotingPower ¶
func (c *Client) DelegateVotingPower(input DelegateVotingPowerInput) (*resty.Response, int, error)
DelegateVotingPower returns the number of rolls in the vote listings for a given delegate
Path:
../<block_id>/context/delegates/<pkh>/voting_power (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-voting-power
func (*Client) Delegates ¶
func (c *Client) Delegates(input DelegatesInput) (*resty.Response, []string, error)
Delegates lists all registered delegates.
Path:
../<block_id>/context/delegates (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates
func (*Client) EndorsingPower ¶
func (c *Client) EndorsingPower(input EndorsingPowerInput) (*resty.Response, int, error)
EndorsingPower gets the endorsing power of an endorsement, that is, the number of slots that the endorser has
Path
../<block_id>/endorsing_power (POST)
RPC
https://tezos.gitlab.io/008/rpc.html#post-block-id-endorsing-power
func (*Client) EndorsingRights ¶
func (c *Client) EndorsingRights(input EndorsingRightsInput) (*resty.Response, []EndorsingRights, error)
EndorsingRights retrieves the delegates allowed to endorse a block. By default, it gives the endorsement slots for delegates that have at least one in the next block. Parameters `level` and `cycle` can be used to specify the (valid) level(s) in the past or future at which the endorsement rights have to be returned. Parameter `delegate` can be used to restrict the results to the given delegates. Returns the list of endorsement slots. Also returns the minimal timestamps that correspond to these slots. The timestamps are omitted for levels in the past, and are only estimates for levels later that the next block, based on the hypothesis that all predecessor blocks were baked at the first priority.
Path:
../<block_id>/helpers/endorsing_rights?(level=<block_level>)*&(cycle=<block_cycle>)*&(delegate=<pkh>)* (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-endorsing-rights
func (*Client) Entrypoint ¶
func (c *Client) Entrypoint(input EntrypointInput) (*resty.Response, Entrypoint, error)
Entrypoint returns the type of the given entrypoint.
Path:
../<block_id>/helpers/scripts/entrypoint (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-entrypoint
func (*Client) Entrypoints ¶
func (c *Client) Entrypoints(input EntrypointsInput) (*resty.Response, Entrypoints, error)
Entrypoints returns the list of entrypoints of the given script
Path:
../<block_id>/helpers/scripts/entrypoints (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-entrypoints
func (*Client) ForgeBlockHeader ¶
func (c *Client) ForgeBlockHeader(input ForgeBlockHeaderInput) (*resty.Response, ForgeBlockHeader, error)
ForgeBlockHeader is the block header received from forging
Path:
../<block_id>/helpers/forge_block_header (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-forge-block-header
func (*Client) ForgeOperations ¶
func (c *Client) ForgeOperations(input ForgeOperationsInput) (*resty.Response, string, error)
ForgeOperations forges an operation.
Path:
../<block_id>/helpers/forge/operations (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-forge-operations
func (*Client) GetFA12Allowance ¶
func (c *Client) GetFA12Allowance(input GetFA12AllowanceInput) (*resty.Response, string, error)
GetFA12Allowance is a helper function to Get the allowance of an FA1.2 contract. There isn't really a good way to Get the allowance naturally because the FA1.2 contract entrypoints are meant to be called from another contract. As a result of this this function will run an operation that calls an intermediary contract which calls the FA1.2 contract and parses the result.
See: https://gitlab.com/camlcase-dev/dexter-integration/-/blob/master/call_fa1.2_view_entrypoints.md
func (*Client) GetFA12Balance ¶
func (c *Client) GetFA12Balance(input GetFA12BalanceInput) (*resty.Response, string, error)
GetFA12Balance is a helper function to Get the balance of a participant in an FA1.2 contracts. There isn't really a good way to Get the balance naturally because the FA1.2 contract entrypoints are meant to be called from another contract. As a result of this this function will run an operation that calls an intermediary contract which calls the FA1.2 contract and parses the result.
See: https://gitlab.com/camlcase-dev/dexter-integration/-/blob/master/call_fa1.2_view_entrypoints.md
func (*Client) GetFA12Supply ¶
func (c *Client) GetFA12Supply(input GetFA12SupplyInput) (*resty.Response, string, error)
GetFA12Supply is a helper function to Get the total supply of an FA1.2 contract. There isn't really a good way to Get the supply naturally because the FA1.2 contract entrypoints are meant to be called from another contract. As a result of this this function will run an operation that calls an intermediary contract which calls the FA1.2 contract and parses the result.
See: https://gitlab.com/camlcase-dev/dexter-integration/-/blob/master/call_fa1.2_view_entrypoints.md
func (*Client) Hash ¶
Hash gets the block's hash, its unique identifier.
Path
../<block_id>/hash (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-hash
func (*Client) Header ¶
Header gets the whole block header.
Path
../<block_id>/header (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-header
func (*Client) HeaderProtocolData ¶
func (c *Client) HeaderProtocolData(blockID BlockID) (*resty.Response, ProtocolData, error)
HeaderProtocolData gets the version-specific fragment of the block header.
Path
../<block_id>/header/protocol_data (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-header-protocol-data
func (*Client) HeaderProtocolDataRaw ¶
HeaderProtocolDataRaw gets the version-specific fragment of the block header (unparsed).
Path
../<block_id>/header/protocol_data/raw (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-header-protocol-data-raw
func (*Client) HeaderRaw ¶
HeaderRaw gets the whole block header (unparsed).
Path
../<block_id>/header/raw (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-header-raw
func (*Client) HeaderShell ¶
func (c *Client) HeaderShell(blockID BlockID) (*resty.Response, HeaderShell, error)
HeaderShell gets the shell-specific fragment of the block header.
Path
../<block_id>/header/shell (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-header-shell
func (*Client) InjectionBlock ¶
func (c *Client) InjectionBlock(input InjectionBlockInput) (*resty.Response, error)
InjectionBlock inject a block in the node and broadcast it. The `operations` embedded in `blockHeader` might be pre-validated using a contextual RPCs from the latest block (e.g. '/blocks/head/context/preapply'). Returns the ID of the block. By default, the RPC will wait for the block to be validated before answering. If ?async is true, the function returns immediately. Otherwise, the block will be validated before the result is returned. If ?force is true, it will be injected even on non strictly increasing fitness. An optional ?chain parameter can be used to specify whether to inject on the test chain or the main chain.
Path:
/injection/operation (POST)
RPC:
https://tezos.gitlab.io/shell/rpc.html#post-injection-block
func (*Client) InjectionOperation ¶
func (c *Client) InjectionOperation(input InjectionOperationInput) (*resty.Response, string, error)
InjectionOperation injects an operation in node and broadcast it. Returns the ID of the operation. The `signedOperationContents` should be constructed using a contextual RPCs from the latest block and signed by the client. By default, the RPC will wait for the operation to be (pre-)validated before answering. See RPCs under /blocks/prevalidation for more details on the prevalidation context. If ?async is true, the function returns immediately. Otherwise, the operation will be validated before the result is returned. An optional ?chain parameter can be used to specify whether to inject on the test chain or the main chain.
Path:
/injection/operation (POST)
RPC:
https://tezos.gitlab.io/shell/rpc.html#post-injection-operation
func (*Client) LevelsInCurrentCycle ¶
func (c *Client) LevelsInCurrentCycle(input LevelsInCurrentCycleInput) (*resty.Response, LevelsInCurrentCycle, error)
LevelsInCurrentCycle is the levels of a cycle
Path:
../<block_id>/helpers/levels_in_current_cycle?[offset=<int32>] (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-levels-in-current-cycle
func (*Client) Listings ¶
Listings returns a list of delegates with their voting weight, in number of rolls.
Path:
../<block_id>/votes/listings (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-listings
func (*Client) LiveBlocks ¶
LiveBlocks lists the ancestors of the given block which, if referred to as the branch in an operation header, are recent enough for that operation to be included in the current block.
Path
../<block_id>/live_blocks (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-live-blocks
func (*Client) Metadata ¶
Metadata returns all the metadata associated to the block.
Path
../<block_id>/metadata (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-metadata
func (*Client) MetadataHash ¶
MetadataHash returns the Hash of the metadata associated to the block. This is only set on blocks starting from environment V1.
Path
../<block_id>/metadata_hash (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-metadata-hash
func (*Client) MinimalValidTime ¶
func (c *Client) MinimalValidTime(input MinimalValidTimeInput) (*resty.Response, time.Time, error)
MinimalValidTime returns the minimal valid time for a block given a priority and an endorsing power.
Path
../<block_id>/minimal_valid_time?[priority=<int>]&[endorsing_power=<int>] (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-minimal-valid-time
func (*Client) Nonces ¶
func (c *Client) Nonces(input NoncesInput) (*resty.Response, Nonces, error)
Nonces returns the number of rolls in the vote listings for a given delegate
Path:
../<block_id>/context/nonces/<block_level> (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-voting-power
func (*Client) OperationHashes ¶
func (c *Client) OperationHashes(input OperationHashesInput) (*resty.Response, OperationHashes, error)
OperationHashes returns the hashes of operations included in a block
Path:
../<block_id>/operation_hashes (GET) ../<block_id>/operation_hashes/<list_offset> (GET) ../<block_id>/operation_hashes/<list_offset>/<operation_offset> (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes-list-offset https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes-list-offset-operation-offset
func (*Client) OperationMetadataHashes ¶
func (c *Client) OperationMetadataHashes(input OperationMetadataHashesInput) (*resty.Response, OperationMetadataHashes, error)
OperationMetadataHashes returns the hashes of all the operation metadata included in the block. This is only set on blocks starting from environment V1.
Path:
../<block_id>/operation_metadata_hashes (GET) ../<block_id>/operation_metadata_hashes/<list_offset> (GET) ../<block_id>/operation_metadata_hashes/<list_offset>/<operation_offset> (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-metadata-hashes https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-metadata-hashes-list-offset https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-metadata-hashes-list-offset-operation-offset
func (*Client) Operations ¶
func (c *Client) Operations(input OperationsInput) (*resty.Response, FlattenedOperations, error)
Operations gets the operations included in a block
Path:
../<block_id>/operations (GET) ../<block_id>/operations/<list_offset> (GET) ../<block_id>/operations/<list_offset>/<operation_offset> (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-operations https://tezos.gitlab.io/008/rpc.html#get-block-id-operations-list-offset https://tezos.gitlab.io/008/rpc.html#get-block-id-operations-list-offset-operation-offset
func (*Client) OperationsMetadataHash ¶
OperationsMetadataHash returns the root hash of the operations metadata from the block. This is only set on blocks starting from environment V1.
Path:
../<block_id>/operations_metadata_hash (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-operations-metadata-hash
func (*Client) OverrideClient ¶
func (c *Client) OverrideClient(client *resty.Client)
OverrideClient overrides underlying network client. Can allow you to create middleware as needed: https://github.com/go-resty/resty#request-and-response-middleware
func (*Client) PackData ¶
func (c *Client) PackData(input PackDataInput) (*resty.Response, PackedData, error)
PackData computes the serialized version of some data expression using the same algorithm as script instruction PACK
Path:
../<block_id>/helpers/scripts/pack_data (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-pack-data
func (*Client) ParseBlock ¶
func (c *Client) ParseBlock(input ParseBlockInput) (*resty.Response, BlockHeaderSignedContents, error)
ParseBlock is signed header contents returend from parsing a block
Path:
../<block_id>/helpers/parse/block (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-parse-block
func (*Client) ParseOperations ¶
func (c *Client) ParseOperations(input ParseOperationsInput) (*resty.Response, []Operations, error)
ParseOperations parses encoded operations to a slice of Operations
Path:
../<block_id>/helpers/parse/operations
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-parse-operations
func (*Client) PreapplyBlock ¶
func (c *Client) PreapplyBlock(input PreapplyBlockInput) (*resty.Response, PreappliedBlock, error)
PreapplyBlock simulates the validation of a block that would contain the given operations and return the resulting fitness and context hash.
Path:
../<block_id>/helpers/preapply/block?[sort]&[timestamp=<date>]
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-preapply-block
func (*Client) PreapplyOperations ¶
func (c *Client) PreapplyOperations(input PreapplyOperationsInput) (*resty.Response, []Operations, error)
PreapplyOperations simulates the validation of an operation.
Path:
../<block_id>/helpers/preapply/operations (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-preapply-operations
func (*Client) Proposals ¶
Proposals returns a list of proposals with number of supporters.
Path:
../<block_id>/votes/proposals (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-proposals
func (*Client) Protocols ¶
Protocols returns the current and next protocol.
Path:
../<block_id>/protocols (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-protocols
func (*Client) RawBytes ¶
func (c *Client) RawBytes(input RawBytesInput) (*resty.Response, error)
RawBytes returns the raw context.
Path:
../<block_id>/context/raw/bytes?[depth=<int>] (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-raw-bytes
func (*Client) RequiredEndorsements ¶
func (c *Client) RequiredEndorsements(input RequiredEndorsementsInput) (*resty.Response, int, error)
RequiredEndorsements returns the minimum number of endorsements for a block to be valid, given a delay of the block's timestamp with respect to the minimum time to bake at the block's priority
Path:
../<block_id>/required_endorsements?[block_delay=<int64>] (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-required-endorsements
func (*Client) RunCode ¶
func (c *Client) RunCode(input RunCodeInput) (*resty.Response, RanCode, error)
RunCode runs a piece of code in the current context
Path:
../<block_id>/helpers/scripts/run_code (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-run-code
func (*Client) RunOperation ¶
func (c *Client) RunOperation(input RunOperationInput) (*resty.Response, Operations, error)
RunOperation will run an operation without signature checks.
Path:
../<block_id>/helpers/scripts/run_operation (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-run-operation
func (*Client) SaplingDiff ¶
func (c *Client) SaplingDiff(input SaplingDiffInput) (*resty.Response, error)
SaplingDiff returns the root and a diff of a state starting from an optional offset which is zero by default.
Path:
../<block_id>/context/sapling/<sapling_state_id>/get_diff?[offset_commitment=<int64>]&[offset_nullifier=<int64>] (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-sapling-sapling-state-id-get-diff
func (*Client) Seed ¶
Seed returns the seed of the cycle to which the block belongs.
Path:
../<block_id>/context/seed (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-context-seed
func (*Client) SetConstants ¶
SetConstants overrides GoTezos's networkConstants.
func (*Client) SimulationOperation ¶ added in v5.0.1
func (c *Client) SimulationOperation(input InjectionOperationInput) (*resty.Response, string, error)
func (*Client) SuccessorPeriod ¶
func (c *Client) SuccessorPeriod(blockID BlockID) (*resty.Response, VotingPeriod, error)
SuccessorPeriod returns the voting period (index, kind, starting position) and related information (position, remaining) of the next block.
Path:
../<block_id>/votes/successor_period (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-successor-period
func (*Client) TotalVotingPower ¶
TotalVotingPower returns the total number of rolls for the delegates in the voting listings.
Path:
../<block_id>/votes/current_proposal (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-total-voting-power
func (*Client) TraceCode ¶
func (c *Client) TraceCode(input TraceCodeInput) (*resty.Response, TracedCode, error)
TraceCode runs a piece of code in the current context, keeping a trace
Path:
../<block_id>/helpers/scripts/trace_code (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-trace-code
func (*Client) TypecheckCode ¶
func (c *Client) TypecheckCode(input TypeCheckcodeInput) (*resty.Response, TypecheckedCode, error)
TypecheckCode typechecks a piece of code in the current context
Path:
../<block_id>/helpers/scripts/typecheck_code (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-typecheck-code
func (*Client) TypecheckData ¶
func (c *Client) TypecheckData(input TypecheckDataInput) (*resty.Response, TypecheckedData, error)
TypecheckData checks that some data expression is well formed and of a given type in the current context
Path:
../<block_id>/helpers/scripts/typecheck_data (POST)
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-typecheck-data
type CompletePrefixInput ¶
type CompletePrefixInput struct { // The hash of block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The prefix of you wish to complete Prefix string }
CompletePrefixInput is the input for the Prefix function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-complete-prefix
type Connections ¶
type Connections []struct { Incoming bool `json:"incoming"` PeerID string `json:"peer_id"` IDPoint struct { Addr string `json:"addr"` Port int `json:"port"` } `json:"id_point"` RemoteSocketPort int `json:"remote_socket_port"` Versions []struct { Name string `json:"name"` Major int `json:"major"` Minor int `json:"minor"` } `json:"versions"` Private bool `json:"private"` LocalMetadata struct { DisableMempool bool `json:"disable_mempool"` PrivateNode bool `json:"private_node"` } `json:"local_metadata"` RemoteMetadata struct { DisableMempool bool `json:"disable_mempool"` PrivateNode bool `json:"private_node"` } `json:"remote_metadata"` }
Connections is the network connections of a tezos node.
Path:
/network/connections (GET)
RPC:
https://tezos.gitlab.io/shell/rpc.html#get-network-connections
type Constants ¶
type Constants struct { ProofOfWorkNonceSize int `json:"proof_of_work_nonce_size"` NonceLength int `json:"nonce_length"` MaxRevelationsPerBlock int `json:"max_revelations_per_block"` MaxOperationDataLength int `json:"max_operation_data_length"` MaxProposalsPerDelegate int `json:"max_proposals_per_delegate"` PreservedCycles int `json:"preserved_cycles"` BlocksPerCycle int `json:"blocks_per_cycle"` BlocksPerCommitment int `json:"blocks_per_commitment"` BlocksPerRollSnapshot int `json:"blocks_per_roll_snapshot"` BlocksPerVotingPeriod int `json:"blocks_per_voting_period"` TimeBetweenBlocks []string `json:"time_between_blocks"` EndorsersPerBlock int `json:"endorsers_per_block"` HardGasLimitPerOperation int `json:"hard_gas_limit_per_operation,string"` HardGasLimitPerBlock int `json:"hard_gas_limit_per_block,string"` ProofOfWorkThreshold string `json:"proof_of_work_threshold"` TokensPerRoll string `json:"tokens_per_roll"` MichelsonMaximumTypeSize int `json:"michelson_maximum_type_size"` SeedNonceRevelationTip string `json:"seed_nonce_revelation_tip"` OriginationSize int `json:"origination_size"` BlockSecurityDeposit int `json:"block_security_deposit,string"` EndorsementSecurityDeposit int `json:"endorsement_security_deposit,string"` BlockReward IntArray `json:"block_reward"` EndorsementReward IntArray `json:"endorsement_reward"` CostPerByte int `json:"cost_per_byte,string"` HardStorageLimitPerOperation int `json:"hard_storage_limit_per_operation,string"` }
Constants represents the network constants.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-constants
type ConstantsInput ¶
type ConstantsInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int }
ConstantsInput is the input for the Constants function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-constants
type Content ¶
type Content struct { Kind Kind `json:"kind,omitempty"` Level int `json:"level,omitempty"` Nonce string `json:"nonce,omitempty"` Op1 *InlinedEndorsement `json:"Op1,omitempty"` Op2 *InlinedEndorsement `json:"Op2,omitempty"` Pkh string `json:"pkh,omitempty"` Secret string `json:"secret,omitempty"` Bh1 *BlockHeader `json:"bh1,omitempty"` Bh2 *BlockHeader `json:"bh2,omitempty"` Source string `json:"source,omitempty"` Period int `json:"period,omitempty"` Proposals []string `json:"proposals,omitempty"` Proposal string `json:"proposal,omitempty"` Ballot string `json:"ballot,omitempty"` Fee string `json:"fee,omitempty"` Counter string `json:"counter,omitempty"` GasLimit string `json:"gas_limit,omitempty"` StorageLimit string `json:"storage_limit,omitempty"` PublicKey string `json:"public_key,omitempty"` ManagerPubkey string `json:"managerPubKey,omitempty"` Amount string `json:"amount,omitempty"` Destination string `json:"destination,omitempty"` Balance string `json:"balance,omitempty"` Delegate string `json:"delegate,omitempty"` Script Script `json:"script,omitempty"` Parameters *Parameters `json:"parameters,omitempty"` Metadata *ContentsMetadata `json:"metadata,omitempty"` }
Content is an element of Contents
func (*Content) MarshalJSON ¶
MarshalJSON implements json.Marshaler in order to correctly marshal contents based of kind
func (*Content) ToAccountActivation ¶
func (c *Content) ToAccountActivation() AccountActivation
ToAccountActivation converts Content to AccountActivation.
func (*Content) ToDelegation ¶
func (c *Content) ToDelegation() Delegation
ToDelegation converts Content to Origination.
func (*Content) ToDoubleBakingEvidence ¶
func (c *Content) ToDoubleBakingEvidence() DoubleBakingEvidence
ToDoubleBakingEvidence converts Content to DoubleBakingEvidence.
func (*Content) ToDoubleEndorsementEvidence ¶
func (c *Content) ToDoubleEndorsementEvidence() DoubleEndorsementEvidence
ToDoubleEndorsementEvidence converts Content to DoubleEndorsementEvidence.
func (*Content) ToEndorsement ¶
func (c *Content) ToEndorsement() Endorsement
ToEndorsement converts Content to Endorsement.
func (*Content) ToOrigination ¶
func (c *Content) ToOrigination() Origination
ToOrigination converts Content to Origination.
func (*Content) ToProposal ¶
ToProposal converts Content to Proposal.
func (*Content) ToSeedNonceRevelations ¶
func (c *Content) ToSeedNonceRevelations() SeedNonceRevelation
ToSeedNonceRevelations converts Content to SeedNonceRevelations.
func (*Content) ToTransaction ¶
func (c *Content) ToTransaction() Transaction
ToTransaction converts Content to Transaction.
type Contents ¶
type Contents []Content
Contents represents the contents in Tezos operations.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
func (Contents) Organize ¶
func (c Contents) Organize() OrganizedContents
Organize converts contents into OrganizedContents where contents are organized by Kind
type ContentsMetadata ¶
type ContentsMetadata struct { BalanceUpdates []BalanceUpdates `json:"balance_updates,omitempty"` Delegate string `json:"delegate,omitempty"` Slots []int `json:"slots,omitempty"` OperationResults *OperationResults `json:"operation_result,omitempty"` InternalOperationResult []InternalOperationResults `json:"internal_operation_results,omitempty"` }
ContentsMetadata represents metadata in contents in Tezos operations.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type Contract ¶
type Contract struct { Balance string `json:"balance"` Delegate string `json:"delegate,omitempty"` Script struct { Code *json.RawMessage Stroage *json.RawMessage } `json:"script,omitempty"` Counter string `json:"counter,omitempty"` }
Contract represents a contract.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id
type ContractBalanceInput ¶
type ContractBalanceInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided Blockhash is required. Cycle int // The contract ID of the contract balance you wish to Get. ContractID string `validate:"required"` }
ContractBalanceInput is the input for the Balance function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-balance
type ContractCounterInput ¶
type ContractCounterInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided Blockhash is required. Cycle int // The contract ID of the contract counter you wish to Get. ContractID string `validate:"required"` }
ContractCounterInput is the input for the Counter function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-counter
type ContractDelegateInput ¶
type ContractDelegateInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The contract ID of the contract delegate you wish to Get. ContractID string `validate:"required"` }
ContractDelegateInput is the input for the ContractDelegate function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-delegate
type ContractEntrypointInput ¶
type ContractEntrypointInput struct { // The block of which you want to make the query. BlockID BlockID `validate:"required"` // The contract ID of the contract delegate you wish to Get. ContractID string `validate:"required"` // The entrypoint of the contract you wish to Get. Entrypoint string `validate:"required"` }
ContractEntrypointInput is the input for the ContractDelegate function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-entrypoints-string
type ContractEntrypointsInput ¶
type ContractEntrypointsInput struct { // The block of which you want to make the query. BlockID BlockID `validate:"required"` // The contract ID of the contract delegate you wish to Get. ContractID string `validate:"required"` }
ContractEntrypointsInput is the input for the ContractDelegate function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
type ContractInput ¶
type ContractInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The contract ID of the contract you wish to Get. ContractID string `validate:"required"` }
ContractInput is the input for the Contract function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id
type ContractManagerKeyInput ¶
type ContractManagerKeyInput struct { // The block of which you want to make the query. BlockID BlockID `validate:"required"` // The contract ID of the contract delegate you wish to Get. ContractID string `validate:"required"` }
ContractManagerKeyInput is the input for the ContractManagerKey function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-manager-key
type ContractSaplingDiffInput ¶
type ContractSaplingDiffInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The contract ID of the contract delegate you wish to Get. ContractID string `validate:"required"` // Commitments and ciphertexts are returned from the specified offset up to the most recent. OffsetCommitment int // Nullifiers are returned from the specified offset up to the most recent. OffsetNullifier int }
ContractSaplingDiffInput is the input for the ContractSaplingDiff function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-single-sapling-get-diff
type ContractScriptInput ¶
type ContractScriptInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The contract ID of the contract delegate you wish to Get. ContractID string `validate:"required"` }
ContractScriptInput is the input for the ContractScript function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-script
type ContractStorageInput ¶
type ContractStorageInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The contract ID of the contract delegate you wish to Get. ContractID string `validate:"required"` }
ContractStorageInput is the input for the ContractStorage function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-storage
type ContractsInput ¶
type ContractsInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int }
ContractsInput is the input for the Contracts function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts
type CurrentLevel ¶
type CurrentLevel struct { Level int `json:"level"` LevelPosition int `json:"level_position"` Cycle int `json:"cycle"` CyclePosition int `json:"cycle_position"` VotingPeriod int `json:"voting_period"` VotingPeriodPosition int `json:"voting_period_position"` ExpectedCommitment bool `json:"expected_commitment"` }
CurrentLevel is the the level of the interrogated block, or the one of a block located `offset` blocks after in the chain (or before when negative). For instance, the next block if `offset` is 1.
Path:
../<block_id>/helpers/current_level?[offset=<int32>]
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-current-level
type CurrentLevelInput ¶
type CurrentLevelInput struct { // The hash of block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The next block if `offset` is 1. Offset int32 }
CurrentLevelInput is the input to the CurrentLevel function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-current-level
type Cycle ¶
type Cycle struct { LastRoll []string `json:"last_roll,omitempty"` Nonces []string `json:"nonces,omitempty"` RandomSeed string `json:"random_seed"` RollSnapshot int `json:"roll_snapshot"` BlockHash string `json:"-"` }
Cycle gets information about a cycle.
RPC:
Not documented.
type Delegate ¶
type Delegate struct { Balance string `json:"balance"` FrozenBalance string `json:"frozen_balance"` FrozenBalanceByCycle []struct { Cycle int `json:"cycle"` Deposit int `json:"deposit,string"` Fees int `json:"fees,string"` Rewards int `json:"rewards,string"` } `json:"frozen_balance_by_cycle"` StakingBalance string `json:"staking_balance"` DelegateContracts []string `json:"delegated_contracts"` DelegatedBalance string `json:"delegated_balance"` Deactivated bool `json:"deactivated"` GracePeriod int `json:"grace_period"` }
Delegate represents the frozen delegate RPC on the tezos network.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh
type DelegateBalanceInput ¶
type DelegateBalanceInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The delegate that you want to make the query. Delegate string `validate:"required"` }
DelegateBalanceInput is the input for the DelegateBalance function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-balance
type DelegateDeactivatedInput ¶
type DelegateDeactivatedInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The delegate that you want to make the query. Delegate string `validate:"required"` }
DelegateDeactivatedInput is the input for the DelegateDeactivated function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-deactivated
type DelegateDelegatedBalanceInput ¶
type DelegateDelegatedBalanceInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The delegate that you want to make the query. Delegate string `validate:"required"` }
DelegateDelegatedBalanceInput is the input for the DelegateDelegatedBalance function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-delegated-balance
type DelegateDelegatedContractsInput ¶
type DelegateDelegatedContractsInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The delegate that you want to make the query. Delegate string `validate:"required"` }
DelegateDelegatedContractsInput is the input for the DelegateDelegatedContracts function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-delegated-contracts
type DelegateFrozenBalanceByCycleInput ¶
type DelegateFrozenBalanceByCycleInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The delegate that you want to make the query. Delegate string `validate:"required"` }
DelegateFrozenBalanceByCycleInput is the input for the DelegateFrozenBalanceByCycle function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-frozen-balance-by-cycle
type DelegateFrozenBalanceInput ¶
type DelegateFrozenBalanceInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The delegate that you want to make the query. Delegate string `validate:"required"` }
DelegateFrozenBalanceInput is the input for the DelegateFrozenBalance function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-frozen-balance
type DelegateGracePeriodInput ¶
type DelegateGracePeriodInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The delegate that you want to make the query. Delegate string `validate:"required"` }
DelegateGracePeriodInput is the input for the DelegateGracePeriod function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-grace-period
type DelegateInput ¶
type DelegateInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The delegate that you want to make the query. Delegate string `validate:"required"` }
DelegateInput is the input for the Delegate function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-contracts-contract-id-delegate
type DelegateStakingBalanceInput ¶
type DelegateStakingBalanceInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The delegate that you want to make the query. Delegate string `validate:"required"` }
DelegateStakingBalanceInput is the input for the DelegateStakingBalance function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-staking-balance
type DelegateVotingPowerInput ¶
type DelegateVotingPowerInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The delegate that you want to make the query. Delegate string `validate:"required"` }
DelegateVotingPowerInput is the input for the DelegateVotingPower function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-voting-power
type DelegatesInput ¶
type DelegatesInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // contains filtered or unexported fields }
DelegatesInput is the input for the Delegates function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates
type Delegation ¶
type Delegation struct { Kind Kind `json:"kind"` Source string `json:"source" validate:"required"` Fee string `json:"fee" validate:"required"` Counter string `json:"counter" validate:"required"` GasLimit string `json:"gas_limit" validate:"required"` StorageLimit string `json:"storage_limit" validate:"required"` Delegate string `json:"delegate,omitempty"` Metadata *DelegationMetadata `json:"metadata,omitempty"` }
Delegation represents a Delegation in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
func (*Delegation) ToContent ¶
func (d *Delegation) ToContent() Content
ToContent converts a Delegation to Content
type DelegationMetadata ¶
type DelegationMetadata struct { BalanceUpdates []BalanceUpdates `json:"balance_updates"` OperationResults OperationResultDelegation `json:"operation_result"` InternalOperationResults []InternalOperationResults `json:"internal_operation_results,omitempty"` }
DelegationMetadata represents the metadata Delegation in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type DoubleBakingEvidence ¶
type DoubleBakingEvidence struct { Kind Kind `json:"kind"` Bh1 *BlockHeader `json:"bh1"` Bh2 *BlockHeader `json:"bh2"` Metadata *DoubleBakingEvidenceMetadata `json:"metadata,omitempty"` }
DoubleBakingEvidence represents an Double_baking_evidence in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
func (*DoubleBakingEvidence) ToContent ¶
func (d *DoubleBakingEvidence) ToContent() Content
ToContent converts a DoubleBakingEvidence to Content
type DoubleBakingEvidenceMetadata ¶
type DoubleBakingEvidenceMetadata struct {
BalanceUpdates []BalanceUpdates `json:"balance_updates"`
}
DoubleBakingEvidenceMetadata represents the metadata of Double_baking_evidence in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type DoubleEndorsementEvidence ¶
type DoubleEndorsementEvidence struct { Kind Kind `json:"kind"` Op1 *InlinedEndorsement `json:"Op1"` Op2 *InlinedEndorsement `json:"Op2"` Metadata *DoubleEndorsementEvidenceMetadata `json:"metadata,omitempty"` }
DoubleEndorsementEvidence represents an Double_endorsement_evidence in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
func (*DoubleEndorsementEvidence) ToContent ¶
func (d *DoubleEndorsementEvidence) ToContent() Content
ToContent converts a DoubleEndorsementEvidence to Content
type DoubleEndorsementEvidenceMetadata ¶
type DoubleEndorsementEvidenceMetadata struct {
BalanceUpdates []BalanceUpdates `json:"balance_updates"`
}
DoubleEndorsementEvidenceMetadata represents the metadata for Double_endorsement_evidence in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type Endorsement ¶
type Endorsement struct { Kind Kind `json:"kind"` Level int `json:"level"` Metadata *EndorsementMetadata `json:"metadata,omitempty"` }
Endorsement represents an endorsement in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
func (*Endorsement) ToContent ¶
func (e *Endorsement) ToContent() Content
ToContent converts Endorsement to Content
type EndorsementMetadata ¶
type EndorsementMetadata struct { BalanceUpdates []BalanceUpdates `json:"balance_updates"` Delegate string `json:"delegate"` Slots []int `json:"slots"` }
EndorsementMetadata represents the metadata of an endorsement in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type EndorsingOperation ¶
type EndorsingOperation struct { Branch string `json:"branch"` Contents []Content `json:"contents"` Signature string `json:"signature"` }
EndorsingOperation the body of the operation for endorsing power
Path
../<block_id>/endorsing_power (POST)
RPC
https://tezos.gitlab.io/008/rpc.html#post-block-id-endorsing-power
type EndorsingPower ¶
type EndorsingPower struct { EndorsementOperation EndorsingOperation `json:"endorsement_operation"` ChainID string `json:"chain_id"` }
EndorsingPower the body of the operation for endorsing power
Path
../<block_id>/endorsing_power (POST)
RPC
https://tezos.gitlab.io/008/rpc.html#post-block-id-endorsing-power
type EndorsingPowerInput ¶
type EndorsingPowerInput struct { // The block of which you want to make the query. BlockID BlockID // The cycle to Get the balance at. If not provided Blockhash is required. Cycle int // The Operation you wish to Get the endorsing power for EndorsingPower EndorsingPower }
EndorsingPowerInput is the input for the EndorsingPower function
Path
../<block_id>/endorsing_power (POST)
RPC
https://tezos.gitlab.io/008/rpc.html#post-block-id-endorsing-power
type EndorsingRights ¶
type EndorsingRights struct { Level int `json:"level"` Delegate string `json:"delegate"` Slots []int `json:"slots"` EstimatedTime time.Time `json:"estimated_time"` }
EndorsingRights represents the endorsing rights RPC on the tezos network.
Path:
../<block_id>/helpers/endorsing_rights?(level=<block_level>)*&(cycle=<block_cycle>)*&(delegate=<pkh>)* (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-endorsing-rights
type EndorsingRightsInput ¶
type EndorsingRightsInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The block level of which you want to make the query. Level int // The cycle of which you want to make the query. Cycle int // The delegate public key hash of which you want to make the query. Delegate string }
EndorsingRightsInput is the input for the EndorsingRights function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-endorsing-rights
type Entrypoint ¶
type Entrypoint struct {
EntrypointType *json.RawMessage `json:"entrypoint_type"`
}
Entrypoint is the return value for the Entrypoint function and contains the entrypoint type
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-entrypoint
type EntrypointBody ¶
type EntrypointBody struct { Script *json.RawMessage `json:"script"` Entrypoint string `json:"entrypoint,omitempty"` }
EntrypointBody is the entrypoint body for the Entrypoint function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-entrypoint
type EntrypointInput ¶
type EntrypointInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The entrypoint to Get the type of Entrypoint EntrypointBody `validate:"required"` }
EntrypointInput is the input for the Entrypoint function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-entrypoint
type Entrypoints ¶
type Entrypoints struct { Unreachable []UnreachableEntrypoints `json:"unreachable,omitempty"` EntrypointsFromScript *json.RawMessage `json:"entrypoints"` }
Entrypoints is the return value for the Entrypoints function and contains the entrypoints for a script
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-entrypoints
type EntrypointsBody ¶
type EntrypointsBody struct {
Script *json.RawMessage `json:"script"`
}
EntrypointsBody is the entrypoints body for the Entrypoints function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-entrypoints
type EntrypointsInput ¶
type EntrypointsInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The script to Get the entrypoints for Entrypoints EntrypointsBody `validate:"required"` }
EntrypointsInput is the input for the Entrypoints function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-entrypoints
type FlattenedOperations ¶
type FlattenedOperations []Operations
FlattenedOperations is Opperations expressed in a single slice
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-operations https://tezos.gitlab.io/008/rpc.html#get-block-id-operations-list-offset https://tezos.gitlab.io/008/rpc.html#get-block-id-operations-list-offset-operation-offset
func (*FlattenedOperations) UnmarshalJSON ¶
func (f *FlattenedOperations) UnmarshalJSON(b []byte) error
UnmarshalJSON satisfies json.Marsheler
type ForgeBlockHeader ¶
type ForgeBlockHeader struct {
Block string `json:"block"`
}
ForgeBlockHeader is the block header received from forging
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-forge-block-header
type ForgeBlockHeaderBody ¶
type ForgeBlockHeaderBody struct { Level int `json:"level"` Proto string `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"` ProtocolData string `json:"protocol_data"` }
ForgeBlockHeaderBody is the block header to forge
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-forge-block-header
type ForgeBlockHeaderInput ¶
type ForgeBlockHeaderInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The block header you wish to forge BlockHeader ForgeBlockHeaderBody `validate:"required"` }
ForgeBlockHeaderInput is the input for the function ForgeBlockHeader
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-forge-block-header
type ForgeOperationsInput ¶
type ForgeOperationsInput struct { // The hash of block (height) of which you want to make the query. BlockIDHash BlockIDHash `validate:"required"` Branch string `validate:"required"` Contents Contents `validate:"required"` // Using the RPC to forge an operation is dangerous, you can mitigate this // danger by passing a different host to CheckRPCAddr which will unforge the // operation and compare the results to filter something malicious. // OR just use the go-tezos/forge package for forging locally. CheckRPCAddr string }
ForgeOperationsInput is the input for the function ForgeOperation
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-forge-operations
type FrozenBalanceByCycle ¶
FrozenBalanceByCycle represents the frozen balance of a delegate at a cycle.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-delegates-pkh-frozen-balance-by-cycle
type GetFA12AllowanceInput ¶
type GetFA12AllowanceInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided Blockhash is required. Cycle int // ChainID is the Chain ID of the chain you want to query ChainID string `validate:"required"` // Source to form the contents with. The operation is not forged or injected so it is possible for XTZ to be spent. Source string `validate:"required"` // FA12Contract address of the FA1.2 Contract you wish to query. FA12Contract string `validate:"required"` // OwnerAddress is the address to Get the balance for in the FA1.2 contract OwnerAddress string `validate:"required"` // SpenderAddress is the address to check an allowance for on behalf of an owner SpenderAddress string `validate:"required"` // If true the function will use an intermediate contract deployed on Carthagenet, default mainnet. Testnet bool // If provided this will be the contract view address used to query the FA1.2 contract ContractViewAddress string }
GetFA12AllowanceInput is the input for the goTezos.GetFA12Allowance function.
Function:
func (c *Client) GetFA12Allowance(input GetFA12AllowanceInput) (int, error) {}
type GetFA12BalanceInput ¶
type GetFA12BalanceInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided Blockhash is required. Cycle int // ChainID is the Chain ID of the chain you want to query ChainID string `validate:"required"` // Source to form the contents with. The operation is not forged or injected so it is possible for XTZ to be spent. Source string `validate:"required"` // FA12Contract address of the FA1.2 Contract you wish to query. FA12Contract string `validate:"required"` // OwnerAddress is the address to Get the balance for in the FA1.2 contract OwnerAddress string `validate:"required"` // If true the function will use an intermediate contract deployed on Carthagenet, default mainnet. Testnet bool // If provided this will be the contract view address used to query the FA1.2 contract ContractViewAddress string }
GetFA12BalanceInput is the input for the goTezos.GetFA12Balance function.
Function:
func (c *Client) GetFA12Balance(input GetFA12BalanceInput) (int, error) {}
type GetFA12SupplyInput ¶
type GetFA12SupplyInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided Blockhash is required. Cycle int // ChainID is the Chain ID of the chain you want to query ChainID string `validate:"required"` // Source to form the contents with. The operation is not forged or injected so it is possible for XTZ to be spent. Source string `validate:"required"` // FA12Contract address of the FA1.2 Contract you wish to query. FA12Contract string `validate:"required"` // If true the function will use an intermediate contract deployed on Carthagenet, default mainnet. Testnet bool // If provided this will be the contract view address used to query the FA1.2 contract ContractViewAddress string }
GetFA12SupplyInput is the input for the goTezos.GetFA12Supply function.
Function:
func (c *Client) GetFA12Supply(input GetFA12SupplyInput) (int, error) {}
type Header ¶
type Header struct { Level int `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"` SeedNonceHash string `json:"seed_nonce_hash"` Signature string `json:"signature"` }
Header represents the header in a Tezos block
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type HeaderShell ¶
type HeaderShell struct { Level int `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 is the shell-specific fragment of the block header.
Path
../<block_id>/header/shell (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-header-shell
type IFace ¶
type IFace interface { Block(blockID BlockID) (*resty.Response, *Block, error) EndorsingPower(input EndorsingPowerInput) (*resty.Response, int, error) Hash(blockID BlockID) (*resty.Response, string, error) Header(blockID BlockID) (*resty.Response, Header, error) HeaderRaw(blockID BlockID) (*resty.Response, string, error) HeaderShell(blockID BlockID) (*resty.Response, HeaderShell, error) HeaderProtocolData(blockID BlockID) (*resty.Response, ProtocolData, error) HeaderProtocolDataRaw(blockID BlockID) (*resty.Response, string, error) LiveBlocks(blockID BlockID) (*resty.Response, []string, error) Metadata(blockID BlockID) (*resty.Response, Metadata, error) MetadataHash(blockID BlockID) (*resty.Response, string, error) MinimalValidTime(input MinimalValidTimeInput) (*resty.Response, time.Time, error) OperationHashes(input OperationHashesInput) (*resty.Response, OperationHashes, error) OperationMetadataHashes(input OperationMetadataHashesInput) (*resty.Response, OperationMetadataHashes, error) Operations(input OperationsInput) (*resty.Response, FlattenedOperations, error) OperationsMetadataHash(blockID BlockID) (*resty.Response, string, error) Protocols(blockID BlockID) (*resty.Response, Protocols, error) RequiredEndorsements(input RequiredEndorsementsInput) (*resty.Response, int, error) BigMap(input BigMapInput) (*resty.Response, error) Constants(input ConstantsInput) (*resty.Response, Constants, error) Contracts(input ContractsInput) (*resty.Response, []string, error) Contract(input ContractInput) (*resty.Response, Contract, error) ContractBalance(input ContractBalanceInput) (*resty.Response, string, error) ContractCounter(input ContractCounterInput) (*resty.Response, int, error) ContractDelegate(input ContractDelegateInput) (*resty.Response, string, error) ContractEntrypoints(input ContractEntrypointsInput) (*resty.Response, map[string]*json.RawMessage, error) ContractEntrypoint(input ContractEntrypointInput) (*resty.Response, *json.RawMessage, error) ContractManagerKey(input ContractManagerKeyInput) (*resty.Response, string, error) ContractScript(input ContractScriptInput) (*resty.Response, error) ContractSaplingDiff(input ContractSaplingDiffInput) (*resty.Response, error) ContractStorage(input ContractStorageInput) (*resty.Response, error) Delegates(input DelegatesInput) (*resty.Response, []string, error) Delegate(input DelegateInput) (*resty.Response, Delegate, error) DelegateBalance(input DelegateBalanceInput) (*resty.Response, string, error) DelegateDeactivated(input DelegateDeactivatedInput) (*resty.Response, bool, error) DelegateDelegatedBalance(input DelegateDelegatedBalanceInput) (*resty.Response, string, error) DelegateDelegatedContracts(input DelegateDelegatedContractsInput) (*resty.Response, []string, error) DelegateFrozenBalance(input DelegateFrozenBalanceInput) (*resty.Response, string, error) DelegateFrozenBalanceByCycle(input DelegateFrozenBalanceByCycleInput) (*resty.Response, []FrozenBalanceByCycle, error) DelegateGracePeriod(input DelegateGracePeriodInput) (*resty.Response, int, error) DelegateStakingBalance(input DelegateStakingBalanceInput) (*resty.Response, string, error) DelegateVotingPower(input DelegateVotingPowerInput) (*resty.Response, int, error) Nonces(input NoncesInput) (*resty.Response, Nonces, error) RawBytes(input RawBytesInput) (*resty.Response, error) SaplingDiff(input SaplingDiffInput) (*resty.Response, error) Seed(input SeedInput) (*resty.Response, string, error) Cycle(cycle int) (*resty.Response, Cycle, error) BakingRights(input BakingRightsInput) (*resty.Response, []BakingRights, error) CompletePrefix(input CompletePrefixInput) (*resty.Response, []string, error) CurrentLevel(input CurrentLevelInput) (*resty.Response, CurrentLevel, error) EndorsingRights(input EndorsingRightsInput) (*resty.Response, []EndorsingRights, error) ForgeOperations(input ForgeOperationsInput) (*resty.Response, string, error) ForgeBlockHeader(input ForgeBlockHeaderInput) (*resty.Response, ForgeBlockHeader, error) LevelsInCurrentCycle(input LevelsInCurrentCycleInput) (*resty.Response, LevelsInCurrentCycle, error) ParseBlock(input ParseBlockInput) (*resty.Response, BlockHeaderSignedContents, error) ParseOperations(input ParseOperationsInput) (*resty.Response, []Operations, error) PreapplyBlock(input PreapplyBlockInput) (*resty.Response, PreappliedBlock, error) PreapplyOperations(input PreapplyOperationsInput) (*resty.Response, []Operations, error) Entrypoint(input EntrypointInput) (*resty.Response, Entrypoint, error) Entrypoints(input EntrypointsInput) (*resty.Response, Entrypoints, error) PackData(input PackDataInput) (*resty.Response, PackedData, error) RunCode(input RunCodeInput) (*resty.Response, RanCode, error) RunOperation(input RunOperationInput) (*resty.Response, Operations, error) TraceCode(input TraceCodeInput) (*resty.Response, TracedCode, error) TypecheckCode(input TypeCheckcodeInput) (*resty.Response, TypecheckedCode, error) TypecheckData(input TypecheckDataInput) (*resty.Response, TypecheckedData, error) BallotList(blockID BlockID) (*resty.Response, BallotList, error) Ballots(blockID BlockID) (*resty.Response, Ballots, error) CurrentPeriod(blockID BlockID) (*resty.Response, VotingPeriod, error) CurrentPeriodKind(blockID BlockID) (*resty.Response, string, error) CurrentProposal(blockID BlockID) (*resty.Response, string, error) CurrentQuorum(blockID BlockID) (*resty.Response, int, error) Listings(blockID BlockID) (*resty.Response, Listings, error) Proposals(blockID BlockID) (*resty.Response, Proposals, error) SuccessorPeriod(blockID BlockID) (*resty.Response, VotingPeriod, error) TotalVotingPower(blockID BlockID) (*resty.Response, int, error) GetFA12Balance(input GetFA12BalanceInput) (*resty.Response, string, error) GetFA12Supply(input GetFA12SupplyInput) (*resty.Response, string, error) GetFA12Allowance(input GetFA12AllowanceInput) (*resty.Response, string, error) InjectionOperation(input InjectionOperationInput) (*resty.Response, string, error) InjectionBlock(input InjectionBlockInput) (*resty.Response, error) Connections() (*resty.Response, Connections, error) ActiveChains() (*resty.Response, ActiveChains, error) }
IFace is an interface mocking a GoTezos object.
type InjectionBlockInput ¶
type InjectionBlockInput struct { // Block to inject Block *Block `validate:"required"` // If ?async is true, the function returns immediately. Async bool // If ?force is true, it will be injected even on non strictly increasing fitness. Force bool // Specify the ChainID. ChainID string }
InjectionBlockInput is the input for the InjectionBlock function.
RPC:
https://tezos.gitlab.io/shell/rpc.html#post-injection-block
type InjectionOperationInput ¶
type InjectionOperationInput struct { // The operation string. Operation string `validate:"required"` // If ?async is true, the function returns immediately. Async bool // Specify the ChainID. ChainID string }
InjectionOperationInput is the input for the InjectionOperation function.
RPC:
https://tezos.gitlab.io/shell/rpc.html#post-injection-operation
type InlinedEndorsement ¶
type InlinedEndorsement struct { Branch string `json:"branch"` Operations *InlinedEndorsementOperations `json:"operations"` Signature string `json:"signature"` }
InlinedEndorsement represents $inlined.endorsement in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type InlinedEndorsementOperations ¶
InlinedEndorsementOperations represents operations in $inlined.endorsement in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type IntArray ¶
type IntArray []int
IntArray implements json.Marshaler so that a slice of string-ints can be a slice of ints
func (*IntArray) MarshalJSON ¶
MarshalJSON satisfies json.Marshaler
func (*IntArray) UnmarshalJSON ¶
UnmarshalJSON satisfies json.Marshaler
type InternalOperationResults ¶
type InternalOperationResults struct { Kind string `json:"kind"` Source string `json:"source"` Nonce int `json:"nonce"` Amount string `json:"amount,omitempty"` PublicKey string `json:"public_key,omitempty"` Destination string `json:"destination,omitempty"` Balance string `json:"balance,omitempty"` Delegate string `json:"delegate,omitempty"` Script ScriptedContracts `json:"script,omitempty"` Parameters struct { Entrypoint string `json:"entrypoint"` Value *json.RawMessage `json:"value"` } `json:"paramaters,omitempty"` Result OperationResult `json:"result"` }
InternalOperationResults represents an InternalOperationResults in the $operation.alpha.internal_operation_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type Kind ¶
type Kind string
Kind is a contents kind
const ( // ENDORSEMENT kind ENDORSEMENT Kind = "endorsement" // SEEDNONCEREVELATION kind SEEDNONCEREVELATION Kind = "seed_nonce_revelation" // DOUBLEENDORSEMENTEVIDENCE kind DOUBLEENDORSEMENTEVIDENCE Kind = "double_endorsement_evidence" // DOUBLEBAKINGEVIDENCE kind DOUBLEBAKINGEVIDENCE Kind = "Double_baking_evidence" // ACTIVATEACCOUNT kind ACTIVATEACCOUNT Kind = "activate_account" // PROPOSALS kind PROPOSALS Kind = "proposals" // BALLOT kind BALLOT Kind = "ballot" // REVEAL kind REVEAL Kind = "reveal" // TRANSACTION kind TRANSACTION Kind = "transaction" // ORIGINATION kind ORIGINATION Kind = "origination" // DELEGATION kind DELEGATION Kind = "delegation" )
type Level ¶
type Level struct { Level int `json:"level"` LevelPosition int `json:"level_position"` Cycle int `json:"cycle"` CyclePosition int `json:"cycle_position"` VotingPeriod int `json:"voting_period"` VotingPeriodPosition int `json:"voting_period_position"` ExpectedCommitment bool `json:"expected_commitment"` }
Level represents the level in a Tezos block
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type LevelsInCurrentCycle ¶
LevelsInCurrentCycle is the levels of a cycle
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-levels-in-current-cycle
type LevelsInCurrentCycleInput ¶
type LevelsInCurrentCycleInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` Offset int32 }
LevelsInCurrentCycleInput is the input for the LevelsInCurrentCycle function
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-helpers-levels-in-current-cycle
type Listings ¶
Listings represents a list of delegates with their voting weight, in number of rolls.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-listings
type MaxOperationListLength ¶
type MaxOperationListLength struct { MaxSize int `json:"max_size"` MaxOp int `json:"max_op,omitempty"` }
MaxOperationListLength represents the maxoperationlistlength in a Tezos block
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type Metadata ¶
type Metadata struct { Protocol string `json:"protocol"` NextProtocol string `json:"next_protocol"` TestChainStatus TestChainStatus `json:"test_chain_status"` MaxOperationsTTL int `json:"max_operations_ttl"` MaxOperationDataLength int `json:"max_operation_data_length"` MaxBlockHeaderLength int `json:"max_block_header_length"` MaxOperationListLength []MaxOperationListLength `json:"max_operation_list_length"` Baker string `json:"baker"` Level Level `json:"level"` VotingPeriodKind string `json:"voting_period_kind"` NonceHash interface{} `json:"nonce_hash"` ConsumedGas string `json:"consumed_gas"` Deactivated []string `json:"deactivated"` BalanceUpdates []BalanceUpdates `json:"balance_updates"` }
Metadata represents the metadata in a Tezos block
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type MinimalValidTimeInput ¶
type MinimalValidTimeInput struct { // The block of which you want to make the query. BlockID BlockID Priority int EndorsingPower int }
MinimalValidTimeInput is the input for the MinimalValidTime function
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-minimal-valid-time
type Nonces ¶
Nonces represents nonces in the RPC
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-nonces-block-level
func (*Nonces) UnmarshalJSON ¶
UnmarshalJSON satisfies json.Marshaler
type NoncesInput ¶
type NoncesInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided BlockID is required. Cycle int // The level at which you want the nonces for Level int `validate:"required"` }
NoncesInput is the input for the Nonces function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-nonces-block-level
type OperationHashes ¶
type OperationHashes []string
OperationHashes is the operations hashes in the OperationHashes function
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes-list-offset https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes-list-offset-operation-offset
func (*OperationHashes) UnmarshalJSON ¶
func (o *OperationHashes) UnmarshalJSON(b []byte) error
UnmarshalJSON satisfies json.Marsheler
type OperationHashesInput ¶
type OperationHashesInput struct { // The block of which you want to make the query. BlockID BlockID ListOffset string OperationOffset string }
OperationHashesInput is the input to the OperationHashes function
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes-list-offset https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes-list-offset-operation-offset
type OperationMetadataHashes ¶
type OperationMetadataHashes []string
OperationMetadataHashes is the operations hashes in the OperationMetadataHashes function
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes-list-offset https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes-list-offset-operation-offset
func (*OperationMetadataHashes) UnmarshalJSON ¶
func (o *OperationMetadataHashes) UnmarshalJSON(b []byte) error
UnmarshalJSON satisfies json.Marsheler
type OperationMetadataHashesInput ¶
type OperationMetadataHashesInput struct { // The block of which you want to make the query. BlockID BlockID ListOffset string OperationOffset string }
OperationMetadataHashesInput is the operations metadata hashes in the OperationMetadataHashes function
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes-list-offset https://tezos.gitlab.io/008/rpc.html#get-block-id-operation-hashes-list-offset-operation-offset
type OperationResult ¶
type OperationResult struct { Status string `json:"status"` Storage *json.RawMessage `json:"storage"` BigMapDiff BigMapDiffs `json:"big_map_diff"` BalanceUpdates []BalanceUpdates `json:"balance_updates"` OriginatedContracts []string `json:"originated_contracts"` ConsumedGas string `json:"consumed_gas,omitempty"` StorageSize string `json:"storage_size,omitempty"` AllocatedDestinationContract bool `json:"allocated_destination_contract,omitempty"` Errors []ResultError `json:"errors,omitempty"` }
OperationResult represents the operation result in a Tezos block
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type OperationResultDelegation ¶
type OperationResultDelegation struct { Status string `json:"status"` ConsumedGas string `json:"consumed_gas,omitempty"` Errors []ResultError `json:"errors,omitempty"` }
OperationResultDelegation represents $operation.alpha.operation_result.delegation in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type OperationResultOrigination ¶
type OperationResultOrigination struct { Status string `json:"status"` BigMapDiff BigMapDiffs `json:"big_map_diff,omitempty"` BalanceUpdates []BalanceUpdates `json:"balance_updates,omitempty"` OriginatedContracts []string `json:"originated_contracts,omitempty"` ConsumedGas string `json:"consumed_gas,omitempty"` StorageSize string `json:"storage_size,omitempty"` PaidStorageSizeDiff string `json:"paid_storage_size_diff,omitempty"` Errors []ResultError `json:"errors,omitempty"` }
OperationResultOrigination represents $operation.alpha.operation_result.origination in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type OperationResultReveal ¶
type OperationResultReveal struct { Status string `json:"status"` ConsumedGas string `json:"consumed_gas,omitempty"` Errors []ResultError `json:"rpc_error,omitempty"` }
OperationResultReveal represents an OperationResultReveal in the $operation.alpha.operation_result.reveal in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type OperationResultTransfer ¶
type OperationResultTransfer struct { Status string `json:"status"` Storage *json.RawMessage `json:"storage,omitempty"` BigMapDiff BigMapDiffs `json:"big_map_diff,omitempty"` BalanceUpdates []BalanceUpdates `json:"balance_updates,omitempty"` OriginatedContracts []string `json:"originated_contracts,omitempty"` ConsumedGas string `json:"consumed_gas,omitempty"` StorageSize string `json:"storage_size,omitempty"` PaidStorageSizeDiff string `json:"paid_storage_size_diff,omitempty"` AllocatedDestinationContract bool `json:"allocated_destination_contract,omitempty"` Errors []ResultError `json:"errors,omitempty"` }
OperationResultTransfer represents $operation.alpha.operation_result.transaction in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type OperationResults ¶
type OperationResults struct { Status string `json:"status"` BigMapDiff BigMapDiffs `json:"big_map_diff,omitempty"` BalanceUpdates []BalanceUpdates `json:"balance_updates,omitempty"` OriginatedContracts []string `json:"originated_contracts,omitempty"` ConsumedGas string `json:"consumed_gas,omitempty"` StorageSize string `json:"storage_size,omitempty"` PaidStorageSizeDiff string `json:"paid_storage_size_diff,omitempty"` Errors []ResultError `json:"errors,omitempty"` Storage *json.RawMessage `json:"storage,omitempty"` AllocatedDestinationContract bool `json:"allocated_destination_contract,omitempty"` }
OperationResults represents the operation_results in Tezos operations.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type Operations ¶
type Operations struct { Protocol string `json:"protocol,omitempty"` ChainID string `json:"chain_id,omitempty"` Hash string `json:"hash,omitempty"` Branch string `json:"branch"` Contents Contents `json:"contents"` Signature string `json:"signature,omitempty"` }
Operations represents the operations in a Tezos block
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type OperationsInput ¶
type OperationsInput struct { // The block of which you want to make the query. BlockID BlockID ListOffset string OperationOffset string }
OperationsInput is the input for the Operations function
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-operations https://tezos.gitlab.io/008/rpc.html#get-block-id-operations-list-offset https://tezos.gitlab.io/008/rpc.html#get-block-id-operations-list-offset-operation-offset
type OrganizedBigMapDiff ¶
type OrganizedBigMapDiff struct { Updates []BigMapDiffUpdate Removals []BigMapDiffRemove Copies []BigMapDiffCopy Allocs []BigMapDiffAlloc }
OrganizedBigMapDiff represents a BigMapDiffs organized by kind.
func (*OrganizedBigMapDiff) ToBigMapDiffs ¶
func (o *OrganizedBigMapDiff) ToBigMapDiffs() BigMapDiffs
ToBigMapDiffs converts OrganizedBigMapDiff to BigMapDiffs
type OrganizedContents ¶
type OrganizedContents struct { Endorsements []Endorsement SeedNonceRevelations []SeedNonceRevelation DoubleEndorsementEvidence []DoubleEndorsementEvidence DoubleBakingEvidence []DoubleBakingEvidence AccountActivations []AccountActivation Proposals []Proposal Ballots []Ballot Reveals []Reveal Transactions []Transaction Originations []Origination Delegations []Delegation }
OrganizedContents represents the contents in Tezos operations orginized by kind.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
func (*OrganizedContents) MarshalJSON ¶
func (o *OrganizedContents) MarshalJSON() ([]byte, error)
MarshalJSON satisfies the json.MarshalJSON interface for contents
func (*OrganizedContents) ToContents ¶
func (o *OrganizedContents) ToContents() Contents
ToContents converts OrganizedContents into Contents
type Origination ¶
type Origination struct { Kind Kind `json:"kind"` Source string `json:"source" validate:"required"` Fee string `json:"fee" validate:"required"` Counter string `json:"counter" validate:"required"` GasLimit string `json:"gas_limit" validate:"required"` StorageLimit string `json:"storage_limit" validate:"required"` Balance string `json:"balance"` Delegate string `json:"delegate,omitempty"` Script Script `json:"script" validate:"required"` ManagerPubkey string `json:"managerPubkey,omitempty"` Metadata *OriginationMetadata `json:"metadata,omitempty"` }
Origination represents a Origination in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
func (*Origination) ToContent ¶
func (o *Origination) ToContent() Content
ToContent converts a Origination to Content
type OriginationMetadata ¶
type OriginationMetadata struct { BalanceUpdates []BalanceUpdates `json:"balance_updates"` OperationResults OperationResultOrigination `json:"operation_result"` InternalOperationResults []InternalOperationResults `json:"internal_operation_results,omitempty"` }
OriginationMetadata represents the metadata of Origination in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type PackDataBody ¶
type PackDataBody struct { Data *json.RawMessage `json:"data"` Type *json.RawMessage `json:"type"` Gas string `json:"gas"` }
PackDataBody is the data to pack for the PackData function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-pack-data
type PackDataInput ¶
type PackDataInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The data to pack Data PackDataBody `validate:"required"` }
PackDataInput is the input for the PackData function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-pack-data
type PackedData ¶
PackedData is the packed data for the PackData function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-pack-data
type Parameters ¶
type Parameters struct { Entrypoint string `json:"entrypoint"` Value *json.RawMessage `json:"value"` }
Parameters represents parameters in Tezos operations.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type ParseBlockInput ¶
type ParseBlockInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The block header you wish to forge BlockHeader ForgeBlockHeaderBody `validate:"required"` }
ParseBlockInput is the input for the function ParseBlock function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-parse-block
type ParseOperationsBody ¶
ParseOperationsBody is the operations you wish to parse
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-parse-operations
type ParseOperationsInput ¶
type ParseOperationsInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The operations to parse Operations []ParseOperationsBody `validate:"required"` // Whether to check the signature or not CheckSignature bool }
ParseOperationsInput is the input for the ParseOperations function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-parse-operations
type PreappliedBlock ¶
type PreappliedBlock struct { ShellHeader HeaderShell `json:"shell_header"` Operations []PreappliedBlockOperations `json:"oeprations"` }
PreappliedBlock is the preapplied block returned by the PreapplyBlock function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-preapply-block
type PreappliedBlockOperations ¶
type PreappliedBlockOperations struct { Applied []PreappliedBlockOperationsStatus `json:"applied"` Refused []PreappliedBlockOperationsStatus `json:"refused"` BranchRefused []PreappliedBlockOperationsStatus `json:"branch_refused"` BranchDelayed []PreappliedBlockOperationsStatus `json:"branch_delayed"` }
PreappliedBlockOperations is the preapplied block operations returned by the PreapplyBlock function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-preapply-block
type PreappliedBlockOperationsStatus ¶
type PreappliedBlockOperationsStatus struct { Hash string `json:"hash"` Branch string `json:"branch"` Data string `json:"data"` Error ResultError `json:"error,omitempty"` }
PreappliedBlockOperationsStatus is the preapplied block operation status returned by the PreapplyBlock function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-preapply-block
type PreapplyBlockBody ¶
type PreapplyBlockBody struct { ProtocolData PreapplyBlockProtocolData `json:"protocol_data"` Operations [][]Operations `json:"operations"` }
PreapplyBlockBody is the block to preapply in the PreapplyBlock function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-preapply-block
type PreapplyBlockInput ¶
type PreapplyBlockInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The block to preapply Block PreapplyBlockBody `validate:"required"` Sort bool Timestamp *time.Time }
PreapplyBlockInput is the input for the PreapplyBlock function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-preapply-block
type PreapplyBlockProtocolData ¶
type PreapplyBlockProtocolData struct { Protocol string `json:"protocol"` Priority int `json:"priority"` ProofOfWorkNonce string `json:"proof_of_work_nonce"` SeedNonceHash string `json:"seed_nonce_hash"` Signature string `json:"signature"` }
PreapplyBlockProtocolData is the protocol data of the block to preapply in the PreapplyBlock function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-preapply-block
type PreapplyOperationsInput ¶
type PreapplyOperationsInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The operations to parse Operations []Operations `validate:"required"` }
PreapplyOperationsInput is the input for the PreapplyOperations function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-preapply-operations
type Proposal ¶
type Proposal struct { Kind Kind `json:"kind"` Source string `json:"source"` Period int `json:"period"` Proposals []string `json:"proposals"` }
Proposal represents a Proposal in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type Proposals ¶
Proposals is the list of proposals with number of supporters.
RPC:
https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-proposals
func (*Proposals) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Marshaler
type ProtocolData ¶
type ProtocolData struct { Protocol string `json:"protocol"` Priority int `json:"priority"` ProofOfWorkNonce string `json:"proof_of_work_nonce"` Signature string `json:"signature"` }
ProtocolData is the version-specific fragment of the block header.
Path
../<block_id>/header/protocol_data (GET)
RPC
https://tezos.gitlab.io/008/rpc.html#get-block-id-header-protocol-data
type Protocols ¶
type Protocols struct { Protocol string `json:"protocol"` NextProtocol string `json:"next_protocol"` }
Protocols is the current and next protocol.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-protocols
type RanCode ¶
type RanCode struct { Storage *json.RawMessage `json:"storage"` Operations []Operations `json:"operations"` BigMapDiffs []BigMapDiff `json:"big_map_diff,omitempty"` }
RanCode is the response to running code with the RunCode function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-run-code
type RawBytesInput ¶
type RawBytesInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If empty Blockhash is required. Cycle int // The depth at which you want the raw bytes. Depth int }
RawBytesInput is the input for the RawBytes function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-raw-bytes
type RequiredEndorsementsInput ¶
type RequiredEndorsementsInput struct { // The block of which you want to make the query. BlockID BlockID BlockDelay int64 }
RequiredEndorsementsInput is the input for RequiredEndorsements functions.
Path:
../<block_id>/required_endorsements?[block_delay=<int64>] (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-required-endorsements
type ResultError ¶
type ResultError struct { Kind string `json:"kind"` ID string `json:"id,omitempty"` With *json.RawMessage `json:"with,omitempty"` Msg string `json:"msg,omitempty"` Location int `json:"location,omitempty"` ContractHandle string `json:"contract_handle,omitempty"` ContractCode *json.RawMessage `json:"contract_code,omitempty"` }
ResultError are errors reported by OperationResults
type Reveal ¶
type Reveal struct { Kind Kind `json:"kind"` Source string `json:"source" validate:"required"` Fee string `json:"fee" validate:"required"` Counter string `json:"counter" validate:"required"` GasLimit string `json:"gas_limit" validate:"required"` StorageLimit string `json:"storage_limit"` PublicKey string `json:"public_key" validate:"required"` Metadata *RevealMetadata `json:"metadata,omitempty"` }
Reveal represents a Reveal in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type RevealMetadata ¶
type RevealMetadata struct { BalanceUpdates []BalanceUpdates `json:"balance_updates"` OperationResult OperationResultReveal `json:"operation_result"` InternalOperationResults []InternalOperationResults `json:"internal_operation_result,omitempty"` }
RevealMetadata represents the metadata for Reveal in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type RunCodeBody ¶
type RunCodeBody struct { Script *json.RawMessage `json:"script"` Storage *json.RawMessage `json:"storage"` Input *json.RawMessage `json:"input"` Amount string `json:"amount"` Balance string `json:"balance"` ChainID string `json:"chain_id"` Source string `json:"source,omitempty"` Payer string `json:"payer,omitempty"` Gas string `json:"gas,omitempty"` Entrypoint string `json:"entrypoint,omitempty"` }
RunCodeBody is the body of the RunCode RPC
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-run-code
type RunCodeInput ¶
type RunCodeInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The code to run Code RunCodeBody `validate:"required"` }
RunCodeInput is the input for the RunCode function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-run-code
type RunOperation ¶
type RunOperation struct { Operation Operations `json:"operation" validate:"required"` ChainID string `json:"chain_id" validate:"required"` }
RunOperation is the operation to run in the RunOperation function.
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-run-operation
type RunOperationInput ¶
type RunOperationInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The operation to run Operation RunOperation `json:"operation" validate:"required"` }
RunOperationInput is the input for the RunOperation function.
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-run-operation
type SaplingDiffInput ¶
type SaplingDiffInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided Blockhash is required. Cycle int // The sapling state ID of the sapling you wish to Get. SaplingStateID string `validate:"required"` // Commitments and ciphertexts are returned from the specified offset up to the most recent. OffsetCommitment int // Nullifiers are returned from the specified offset up to the most recent. OffsetNullifier int }
SaplingDiffInput is the input for the SaplingDiff function.
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-context-sapling-sapling-state-id-get-diff
type Script ¶
type Script struct { Code *json.RawMessage `json:"code,omitempty"` Storage *json.RawMessage `json:"storage,omitempty"` }
Script represents the script in an Origination in the $operation.alpha.operation_contents_and_result -> $scripted.contracts in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type ScriptedContracts ¶
type ScriptedContracts struct { Code *json.RawMessage `json:"code"` Storage *json.RawMessage `json:"storage"` }
ScriptedContracts represents $scripted.contracts in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type SeedInput ¶
type SeedInput struct { // The block of which you want to make the query. If not provided Cycle is required. BlockID BlockID // The cycle to Get the balance at. If not provided Blockhash is required. Cycle int }
SeedInput is the input for the Seed function.
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-context-seed
type SeedNonceRevelation ¶
type SeedNonceRevelation struct { Kind Kind `json:"kind"` Level int `json:"level"` Nonce string `json:"nonce"` Metadata *SeedNonceRevelationMetadata `json:"metadata,omitempty"` }
SeedNonceRevelation represents an Seed_nonce_revelation in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
func (*SeedNonceRevelation) ToContent ¶
func (s *SeedNonceRevelation) ToContent() Content
ToContent converts a SeedNonceRevelation to Content
type SeedNonceRevelationMetadata ¶
type SeedNonceRevelationMetadata struct {
BalanceUpdates []BalanceUpdates `json:"balance_updates"`
}
SeedNonceRevelationMetadata represents the metadata for Seed_nonce_revelation in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type Stack ¶
type Stack struct { Item *json.RawMessage `json:"item"` Annot string `json:"annot,omitempty"` }
Stack is a stack in a trace in traced code returned from the TraceCode function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-trace-code
type TestChainStatus ¶
type TestChainStatus struct { Status string `json:"status"` Protocol string `json:"protocol"` ChainID string `json:"chain_id"` Genesis string `json:"genesis"` Expiration time.Time `json:"expiration"` }
TestChainStatus represents the testchainstatus in a Tezos block
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type Trace ¶
type Trace struct { Location int `json:"location"` Gas string `json:"gas"` Stack []Stack `json:"stack"` }
Trace is a trace in traced code returned from the TraceCode function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-trace-code
type TraceCodeInput ¶
type TraceCodeInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The code to trace Code RunCodeBody }
TraceCodeInput is the input for TraceCode function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-trace-code
type TracedCode ¶
TracedCode is traced code returned from the TraceCode function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-trace-code
type Transaction ¶
type Transaction struct { Kind Kind `json:"kind"` Source string `json:"source" validate:"required"` Fee string `json:"fee" validate:"required"` Counter string `json:"counter" validate:"required"` GasLimit string `json:"gas_limit" validate:"required"` StorageLimit string `json:"storage_limit"` Amount string `json:"amount"` Destination string `json:"destination" validate:"required"` Parameters *Parameters `json:"parameters,omitempty"` Metadata *TransactionMetadata `json:"metadata,omitempty"` }
Transaction represents a Transaction in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
func (*Transaction) ToContent ¶
func (t *Transaction) ToContent() Content
ToContent converts a Transaction to Content
type TransactionMetadata ¶
type TransactionMetadata struct { BalanceUpdates []BalanceUpdates `json:"balance_updates"` OperationResult OperationResultTransfer `json:"operation_result"` InternalOperationResults []InternalOperationResults `json:"internal_operation_results,omitempty"` }
TransactionMetadata represents the metadata of Transaction in the $operation.alpha.operation_contents_and_result in the tezos block schema
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id
type TypeCheckcodeInput ¶
type TypeCheckcodeInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The code to type check Code TypecheckCodeBody `validate:"required"` }
TypeCheckcodeInput is the input for the TypecheckCode functions
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-typecheck-code
type TypecheckCodeBody ¶
type TypecheckCodeBody struct { Program *json.RawMessage `json:"program"` Gas string `json:"gas"` Legacy bool `json:"legacy,omitempty"` }
TypecheckCodeBody is body for the input for the TypecheckCode functions
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-typecheck-code
type TypecheckDataBody ¶
type TypecheckDataBody struct { Data *json.RawMessage `json:"data"` Type *json.RawMessage `json:"type"` Gas string `json:"gas"` Legacy bool `json:"legacy,omitempty"` }
TypecheckDataBody is body for the input for the TypecheckData functions
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-typecheck-data
type TypecheckDataInput ¶
type TypecheckDataInput struct { // The block (height) of which you want to make the query. BlockID BlockID `validate:"required"` // The code to type check Data TypecheckDataBody `validate:"required"` }
TypecheckDataInput is the input for the TypecheckData functions
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-typecheck-data
type TypecheckedCode ¶
type TypecheckedCode struct { TypeMap []struct { Location int `json:"location"` StackBefore []*json.RawMessage `json:"stack_before"` StackAfter []*json.RawMessage `json:"stack_after"` } `json:"type_map"` Gas string `json:"gas"` }
TypecheckedCode is typechecked code returned by the TypecheckCode function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-typecheck-code
type TypecheckedData ¶
type TypecheckedData struct {
Gas string `json:"gas"`
}
TypecheckedData is body for the input for the TypecheckData functions
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-typecheck-data
type UnreachableEntrypoints ¶
type UnreachableEntrypoints struct {
Path []*json.RawMessage `json:"path"`
}
UnreachableEntrypoints is the unreachable entrypoints in theEntrypoints function
RPC:
https://tezos.gitlab.io/008/rpc.html#post-block-id-helpers-scripts-entrypoints
type VotingPeriod ¶
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 is the the voting period (index, kind, starting position) and related information (position, remaining) of the interrogated block.
Path:
../<block_id>/votes/current_period (GET)
RPC:
https://tezos.gitlab.io/008/rpc.html#get-block-id-votes-current-period