import "github.com/ecadlabs/go-tezos"
block.go client.go errors.go operations.go service.go utils.go votes.go
const ( // ErrorKindPermanent Tezos RPC error kind. ErrorKindPermanent = "permanent" // ErrorKindTemporary Tezos RPC error kind. ErrorKindTemporary = "temporary" // ErrorKindBranch Tezos RPC error kind. ErrorKindBranch = "branch" )
type ActivateAccountOperationElem struct { GenericOperationElem `yaml:",inline"` PKH string `json:"pkh" yaml:"pkh"` Secret string `json:"secret" yaml:"secret"` Metadata BalanceUpdatesOperationMetadata `json:"metadata" yaml:"metadata"` }
ActivateAccountOperationElem represents activate_account operation
func (el *ActivateAccountOperationElem) BalanceUpdates() BalanceUpdates
BalanceUpdates implements BalanceUpdateOperation
BalanceUpdate is a variable structure depending on the Kind field
type BalanceUpdates []BalanceUpdate
BalanceUpdates is a list of balance update operations
func (b *BalanceUpdates) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler
type BalanceUpdatesOperation interface { BalanceUpdates() BalanceUpdates }
BalanceUpdatesOperation is implemented by operations providing balance updates
type BalanceUpdatesOperationMetadata struct { BalanceUpdates BalanceUpdates `json:"balance_updates" yaml:"balance_updates"` }
BalanceUpdatesOperationMetadata contains balance updates only
type Ballot struct { PKH string `json:"pkh" yaml:"pkh"` Ballot string `json:"ballot" yaml:"ballot"` }
Ballot holds information about a Tezos ballot
type BallotListing struct { PKH string `json:"pkh" yaml:"pkh"` Rolls int64 `json:"rolls" yaml:"rolls"` }
BallotListing holds information about a Tezos delegate and his voting weight in rolls
type BallotOperationElem struct { GenericOperationElem `yaml:",inline"` Source string `json:"source" yaml:"source"` Period int `json:"period" yaml:"period"` Proposal string `json:"proposal" yaml:"proposal"` Ballot string `json:"ballot" yaml:"ballot"` Metadata map[string]interface{} `json:"metadata" yaml:"metadata"` }
BallotOperationElem represents a ballot operation
type Ballots struct { Yay int64 `json:"yay" yaml:"yay"` Nay int64 `json:"nay" yaml:"nay"` Pass int64 `json:"pass" yaml:"pass"` }
Ballots holds summary data about a voting period
BigInt overrides UnmarshalJSON for big.Int
MarshalYAML implements yaml.Marshaler
UnmarshalJSON implements json.Unmarshaler
type Block struct { Protocol string `json:"protocol" yaml:"protocol"` ChainID string `json:"chain_id" yaml:"chain_id"` Hash string `json:"hash" yaml:"hash"` Header RawBlockHeader `json:"header" yaml:"header"` Metadata BlockHeaderMetadata `json:"metadata" yaml:"metadata"` Operations [][]*Operation `json:"operations" yaml:"operations"` }
Block holds information about a Tezos block
type BlockHeaderMetadata struct { Protocol string `json:"protocol" yaml:"protocol"` NextProtocol string `json:"next_protocol" yaml:"next_protocol"` TestChainStatus TestChainStatus `json:"-" yaml:"-"` MaxOperationsTTL int `json:"max_operations_ttl" yaml:"max_operations_ttl"` MaxOperationDataLength int `json:"max_operation_data_length" yaml:"max_operation_data_length"` MaxBlockHeaderLength int `json:"max_block_header_length" yaml:"max_block_header_length"` MaxOperationListLength []*MaxOperationListLength `json:"max_operation_list_length" yaml:"max_operation_list_length"` Baker string `json:"baker" yaml:"baker"` Level BlockHeaderMetadataLevel `json:"level" yaml:"level"` VotingPeriodKind string `json:"voting_period_kind" yaml:"voting_period_kind"` NonceHash string `json:"nonce_hash" yaml:"nonce_hash"` ConsumedGas *BigInt `json:"consumed_gas" yaml:"consumed_gas"` Deactivated []string `json:"deactivated" yaml:"deactivated"` BalanceUpdates BalanceUpdates `json:"balance_updates" yaml:"balance_updates"` }
BlockHeaderMetadata is a part of the Tezos block data
func (bhm *BlockHeaderMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals the BlockHeaderMetadata JSON
type BlockHeaderMetadataLevel struct { Level int `json:"level" yaml:"level"` LevelPosition int `json:"level_position" yaml:"level_position"` Cycle int `json:"cycle" yaml:"cycle"` CyclePosition int `json:"cycle_position" yaml:"cycle_position"` VotingPeriod int `json:"voting_period" yaml:"voting_period"` VotingPeriodPosition int `json:"voting_period_position" yaml:"voting_period_position"` ExpectedCommitment bool `json:"expected_commitment" yaml:"expected_commitment"` }
BlockHeaderMetadataLevel is a part of BlockHeaderMetadata
type BlockInfo struct { Hash string `json:"hash" yaml:"hash"` Level int `json:"level" yaml:"level"` Proto int `json:"proto" yaml:"proto"` Predecessor string `json:"predecessor" yaml:"predecessor"` Timestamp time.Time `json:"timestamp" yaml:"timestamp"` ValidationPass int `json:"validation_pass" yaml:"validation_pass"` OperationsHash string `json:"operations_hash" yaml:"operations_hash"` Fitness []HexBytes `json:"fitness" yaml:"fitness,flow"` Context string `json:"context" yaml:"context"` ProtocolData string `json:"protocol_data" yaml:"protocol_data"` }
BlockInfo holds information about block returned by monitor heads endpoint
type BootstrappedBlock struct { Block string `json:"block"` Timestamp time.Time `json:"timestamp"` }
BootstrappedBlock represents bootstrapped block stream message
type ContractBalanceUpdate struct { GenericBalanceUpdate `yaml:",inline"` Contract string `json:"contract" yaml:"contract"` }
ContractBalanceUpdate is a BalanceUpdatesType variant for Kind=contract
type DelegationOperationElem struct { GenericOperationElem `yaml:",inline"` Source string `json:"source" yaml:"source"` Fee *BigInt `json:"fee" yaml:"fee"` Counter *BigInt `json:"counter" yaml:"counter"` GasLimit *BigInt `json:"gas_limit" yaml:"gas_limit"` StorageLimit *BigInt `json:"storage_limit" yaml:"storage_limit"` ManagerPubKey string `json:"managerPubkey" yaml:"managerPubkey"` Balance *BigInt `json:"balance" yaml:"balance"` Spendable *bool `json:"spendable,omitempty" yaml:"spendable,omitempty"` Delegatable *bool `json:"delegatable,omitempty" yaml:"delegatable,omitempty"` Delegate string `json:"delegate,omitempty" yaml:"delegate,omitempty"` Script *ScriptedContracts `json:"script,omitempty" yaml:"script,omitempty"` Metadata DelegationOperationMetadata `json:"metadata" yaml:"metadata"` }
DelegationOperationElem represents a delegation operation
func (el *DelegationOperationElem) BalanceUpdates() BalanceUpdates
BalanceUpdates implements BalanceUpdateOperation
func (el *DelegationOperationElem) OperationFee() *big.Int
OperationFee implements OperationWithFee
type DelegationOperationMetadata struct { BalanceUpdates BalanceUpdates `json:"balance_updates" yaml:"balance_updates"` OperationResult DelegationOperationResult `json:"operation_result" yaml:"operation_result"` }
DelegationOperationMetadata represents a delegation operation metadata
type DelegationOperationResult struct { Status string `json:"status" yaml:"status"` Errors Errors `json:"errors" yaml:"errors"` }
DelegationOperationResult represents a delegation operation result
type DoubleBakingEvidenceOperationElem struct { GenericOperationElem `yaml:",inline"` BlockHeader1 RawBlockHeader `json:"bh1" yaml:"bh1"` BlockHeader2 RawBlockHeader `json:"bh2" yaml:"bh2"` Metadata BalanceUpdatesOperationMetadata `json:"metadata" yaml:"metadata"` }
DoubleBakingEvidenceOperationElem represents double_baking_evidence operation
func (el *DoubleBakingEvidenceOperationElem) BalanceUpdates() BalanceUpdates
BalanceUpdates implements BalanceUpdateOperation
type DoubleEndorsementEvidenceOperationElem struct { GenericOperationElem `yaml:",inline"` Operation1 InlinedEndorsement `json:"op1" yaml:"op1"` Operation2 InlinedEndorsement `json:"op2" yaml:"op2"` Metadata BalanceUpdatesOperationMetadata `json:"metadata" yaml:"metadata"` }
DoubleEndorsementEvidenceOperationElem represents double_endorsement_evidence operation
func (el *DoubleEndorsementEvidenceOperationElem) BalanceUpdates() BalanceUpdates
BalanceUpdates implements BalanceUpdateOperation
type EndorsementOperationElem struct { GenericOperationElem `yaml:",inline"` Level int `json:"level" yaml:"level"` Metadata EndorsementOperationMetadata `json:"metadata" yaml:"metadata"` }
EndorsementOperationElem represents an endorsement operation
func (el *EndorsementOperationElem) BalanceUpdates() BalanceUpdates
BalanceUpdates implements BalanceUpdateOperation
type EndorsementOperationMetadata struct { BalanceUpdates BalanceUpdates `json:"balance_updates" yaml:"balance_updates"` Delegate string `json:"delegate" yaml:"delegate"` Slots []int `json:"slots" yaml:"slots,flow"` }
EndorsementOperationMetadata represents an endorsement operation metadata
Error is a Tezos error as documented on http://tezos.gitlab.io/mainnet/api/errors.html.
Errors is a slice of Error with custom JSON unmarshaller
ErrorID returns Tezos error id
ErrorKind returns Tezos error kind
UnmarshalJSON implements json.Unmarshaler
type ForkingTestChainStatus struct { GenericTestChainStatus Protocol string `json:"protocol" yaml:"protocol"` Expiration string `json:"expiration" yaml:"expiration"` }
ForkingTestChainStatus is a TestChainStatus variant for Status=forking
type FreezerBalanceUpdate struct { GenericBalanceUpdate `yaml:",inline"` Category string `json:"category" yaml:"category"` Delegate string `json:"delegate" yaml:"delegate"` Level int `json:"level" yaml:"level"` }
FreezerBalanceUpdate is a BalanceUpdatesType variant for Kind=freezer
type GenericBalanceUpdate struct { Kind string `json:"kind" yaml:"kind"` Change int64 `json:"change,string" yaml:"change"` }
GenericBalanceUpdate holds the common values among all BalanceUpdatesType variants
func (g *GenericBalanceUpdate) BalanceUpdateKind() string
BalanceUpdateKind returns the BalanceUpdateType's Kind field
GenericError is a basic error type
func (e *GenericError) Error() string
func (e *GenericError) ErrorID() string
ErrorID returns Tezos error id
func (e *GenericError) ErrorKind() string
ErrorKind returns Tezos error kind
GenericOperationElem is a most generic element type
func (e *GenericOperationElem) OperationElemKind() string
OperationElemKind implements OperationElem
GenericTestChainStatus holds the common values among all TestChainStatus variants
func (t *GenericTestChainStatus) TestChainStatus() string
TestChainStatus gets the TestChainStatus's Status field
type HTTPError interface { error HTTPStatus }
HTTPError retains HTTP status
type HTTPStatus interface { Status() string // e.g. "200 OK" StatusCode() int // e.g. 200 Body() []byte }
HTTPStatus interface represents an unprocessed HTTP reply
HexBytes represents bytes as a JSON string of hexadecimal digits
UnmarshalText umarshalls a hex string to bytes
IDTimestamp represents peer id with timestamp
func (i *IDTimestamp) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler
type InlinedEndorsement struct { Branch string `json:"branch" yaml:"branch"` Operations InlinedEndorsementContents `json:"operations" yaml:"operations"` Signature string `json:"signature" yaml:"signature"` }
InlinedEndorsement corresponds to $inlined.endorsement
type InlinedEndorsementContents struct { Kind string `json:"endorsement" yaml:"endorsement"` Level int `json:"level" yaml:"level"` }
InlinedEndorsementContents corresponds to $inlined.endorsement.contents
type InvalidBlock struct { Block string `json:"block"` Level int `json:"level"` Error Errors `json:"error"` }
InvalidBlock represents invalid block hash along with the errors that led to it being declared invalid
type Logger interface { log.FieldLogger Writer() *io.PipeWriter WriterLevel(level log.Level) *io.PipeWriter }
Logger is an extension to logrus.FieldLogger
type MaxOperationListLength struct { MaxSize int `json:"max_size" yaml:"max_size"` MaxOp int `json:"max_op" yaml:"max_op"` }
MaxOperationListLength is a part of the BlockHeaderMetadata
type MempoolOperations struct { Applied []*Operation `json:"applied"` Refused []*OperationWithErrorAlt `json:"refused"` BranchRefused []*OperationWithErrorAlt `json:"branch_refused"` BranchDelayed []*OperationWithErrorAlt `json:"branch_delayed"` Unprocessed []*OperationAlt `json:"unprocessed"` }
MempoolOperations represents mempool operations
NetworkAddress models a point's address and port.
type NetworkConnection struct { Incoming bool `json:"incoming"` PeerID string `json:"peer_id"` IDPoint NetworkAddress `json:"id_point"` RemoteSocketPort uint16 `json:"remote_socket_port"` Versions []*NetworkVersion `json:"versions"` Private bool `json:"private"` LocalMetadata NetworkMetadata `json:"local_metadata"` RemoteMetadata NetworkMetadata `json:"remote_metadata"` }
NetworkConnection models detailed information for one network connection.
type NetworkConnectionTimestamp struct { NetworkAddress Timestamp time.Time }
NetworkConnectionTimestamp represents peer address with timestamp added
func (n *NetworkConnectionTimestamp) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler
type NetworkMetadata struct { DisableMempool bool `json:"disable_mempool"` PrivateNode bool `json:"private_node"` }
NetworkMetadata models metadata of a node.
type NetworkPeer struct { PeerID string `json:"-"` Score int64 `json:"score"` Trusted bool `json:"trusted"` ConnMetadata *NetworkMetadata `json:"conn_metadata"` State string `json:"state"` ReachableAt *NetworkAddress `json:"reachable_at"` Stat NetworkStats `json:"stat"` LastEstablishedConnection *NetworkConnectionTimestamp `json:"last_established_connection"` LastSeen *NetworkConnectionTimestamp `json:"last_seen"` LastFailedConnection *NetworkConnectionTimestamp `json:"last_failed_connection"` LastRejectedConnection *NetworkConnectionTimestamp `json:"last_rejected_connection"` LastDisconnection *NetworkConnectionTimestamp `json:"last_disconnection"` LastMiss *NetworkConnectionTimestamp `json:"last_miss"` }
NetworkPeer represents peer info
type NetworkPeerLogEntry struct { NetworkAddress Kind string `json:"kind"` Timestamp time.Time `json:"timestamp"` }
NetworkPeerLogEntry represents peer log entry
type NetworkPoint struct { Address string `json:"-"` Trusted bool `json:"trusted"` GreylistedUntil time.Time `json:"greylisted_until"` State NetworkPointState `json:"state"` P2PPeerID string `json:"p2p_peer_id"` LastFailedConnection time.Time `json:"last_failed_connection"` LastRejectedConnection *IDTimestamp `json:"last_rejected_connection"` LastEstablishedConnection *IDTimestamp `json:"last_established_connection"` LastDisconnection *IDTimestamp `json:"last_disconnection"` LastSeen *IDTimestamp `json:"last_seen"` LastMiss time.Time `json:"last_miss"` }
NetworkPoint represents network point info
type NetworkPointLogEntry struct { Kind NetworkPointState `json:"kind"` Timestamp time.Time `json:"timestamp"` }
NetworkPointLogEntry represents point's log entry
type NetworkPointState struct { EventKind string `json:"event_kind"` P2PPeerID string `json:"p2p_peer_id"` }
NetworkPointState represents point state
type NetworkStats struct { TotalBytesSent int64 `json:"total_sent,string"` TotalBytesRecv int64 `json:"total_recv,string"` CurrentInflow int64 `json:"current_inflow"` CurrentOutflow int64 `json:"current_outflow"` }
NetworkStats models global network bandwidth totals and usage in B/s.
type NetworkVersion struct { Name string `json:"name"` Major uint16 `json:"major"` Minor uint16 `json:"minor"` }
NetworkVersion models a network-layer version of a node.
type NotRunningTestChainStatus struct { GenericTestChainStatus }
NotRunningTestChainStatus is a TestChainStatus variant for Status=not_running
type Operation struct { Protocol string `json:"protocol" yaml:"protocol"` ChainID string `json:"chain_id" yaml:"chain_id"` Hash string `json:"hash" yaml:"hash"` Branch string `json:"branch" yaml:"branch"` Contents OperationElements `json:"contents" yaml:"contents"` Signature string `json:"signature" yaml:"signature"` }
Operation represents an operation included into block
OperationAlt is a heterogeneously encoded Operation with hash as a first array member, i.e.
[ "...", // hash { "protocol": "...", ... } ]
instead of
{ "protocol": "...", "hash": "...", ... }
func (o *OperationAlt) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler
OperationElem must be implemented by all operation elements
type OperationElements []OperationElem
OperationElements is a slice of OperationElem with custom JSON unmarshaller
func (e *OperationElements) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler
OperationWithError represents unsuccessful operation
type OperationWithErrorAlt OperationWithError
OperationWithErrorAlt is a heterogeneously encoded OperationWithError with hash as a first array member. See OperationAlt for details
func (o *OperationWithErrorAlt) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler
OperationWithFee is implemented by operations with fees
type OriginationOperationElem struct { GenericOperationElem `yaml:",inline"` Source string `json:"source" yaml:"source"` Fee *BigInt `json:"fee" yaml:"fee"` Counter *BigInt `json:"counter" yaml:"counter"` GasLimit *BigInt `json:"gas_limit" yaml:"gas_limit"` StorageLimit *BigInt `json:"storage_limit" yaml:"storage_limit"` ManagerPubKey string `json:"managerPubkey" yaml:"managerPubkey"` Balance *BigInt `json:"balance" yaml:"balance"` Spendable *bool `json:"spendable,omitempty" yaml:"spendable,omitempty"` Delegatable *bool `json:"delegatable,omitempty" yaml:"delegatable,omitempty"` Delegate string `json:"delegate,omitempty" yaml:"delegate,omitempty"` Script *ScriptedContracts `json:"script,omitempty" yaml:"script,omitempty"` Metadata OriginationOperationMetadata `json:"metadata" yaml:"metadata"` }
OriginationOperationElem represents a origination operation
func (el *OriginationOperationElem) BalanceUpdates() BalanceUpdates
BalanceUpdates implements BalanceUpdateOperation
func (el *OriginationOperationElem) OperationFee() *big.Int
OperationFee implements OperationWithFee
type OriginationOperationMetadata struct { BalanceUpdates BalanceUpdates `json:"balance_updates" yaml:"balance_updates"` OperationResult OriginationOperationResult `json:"operation_result" yaml:"operation_result"` }
OriginationOperationMetadata represents a origination operation metadata
type OriginationOperationResult struct { Status string `json:"status" yaml:"status"` BalanceUpdates BalanceUpdates `json:"balance_updates,omitempty" yaml:"balance_updates,omitempty"` OriginatedContracts []string `json:"originated_contracts,omitempty" yaml:"originated_contracts,omitempty"` ConsumedGas *BigInt `json:"consumed_gas,omitempty" yaml:"consumed_gas,omitempty"` StorageSize *BigInt `json:"storage_size,omitempty" yaml:"storage_size,omitempty"` PaidStorageSizeDiff *BigInt `json:"paid_storage_size_diff,omitempty" yaml:"paid_storage_size_diff,omitempty"` Errors Errors `json:"errors,omitempty" yaml:"errors,omitempty"` }
OriginationOperationResult represents a origination operation result
PeriodKind contains information about tezos voting period kind
func (p PeriodKind) IsPromotionVote() bool
IsPromotionVote true if period kind is promotion vote
func (p PeriodKind) IsProposal() bool
IsProposal return true if period kind is proposal
func (p PeriodKind) IsTesting() bool
IsTesting return true if period kind is testing
func (p PeriodKind) IsTestingVote() bool
IsTestingVote return true if period kind is testing vote
Proposal holds summary data about a proposal and his number of supporter
type ProposalOperationElem struct { GenericOperationElem `yaml:",inline"` Source string `json:"source" yaml:"source"` Period int `json:"period" yaml:"period"` Proposals []string `json:"proposals" yaml:"proposals"` Metadata map[string]interface{} `json:"metadata" yaml:"metadata"` }
ProposalOperationElem represents a proposal operation
type RPCClient struct { // Logger Logger Logger // HTTP client used to communicate with the Tezos node API. Client *http.Client // Base URL for API requests. BaseURL *url.URL // User agent name for client. UserAgent string // Optional callback for metrics. RPCStatusCallback func(req *http.Request, status int, duration time.Duration, err error) // Optional callback for metrics. RPCHeaderCallback func(req *http.Request, resp *http.Response, duration time.Duration) }
RPCClient manages communication with a Tezos RPC server.
NewRPCClient returns a new Tezos RPC client.
Do retrieves values from the API and marshals them into the provided interface.
func (c *RPCClient) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)
NewRequest creates a Tezos RPC request.
type RPCError interface { Error HTTPStatus Errors() []Error // returns all errors as a slice }
RPCError is a Tezos RPC error as documented on http://tezos.gitlab.io/mainnet/api/errors.html.
type RawBlockHeader struct { Level int `json:"level" yaml:"level"` Proto int `json:"proto" yaml:"proto"` Predecessor string `json:"predecessor" yaml:"predecessor"` Timestamp time.Time `json:"timestamp" yaml:"timestamp"` ValidationPass int `json:"validation_pass" yaml:"validation_pass"` OperationsHash string `json:"operations_hash" yaml:"operations_hash"` Fitness []HexBytes `json:"fitness" yaml:"fitness,flow"` Context string `json:"context" yaml:"context"` Priority int `json:"priority" yaml:"priority"` ProofOfWorkNonce HexBytes `json:"proof_of_work_nonce" yaml:"proof_of_work_nonce,flow"` SeedNonceHash string `json:"seed_nonce_hash" yaml:"seed_nonce_hash"` Signature string `json:"signature" yaml:"signature"` }
RawBlockHeader is a part of the Tezos block data
type RevealOperationElem struct { GenericOperationElem `yaml:",inline"` Source string `json:"source" yaml:"source"` Fee *BigInt `json:"fee" yaml:"fee"` Counter *BigInt `json:"counter" yaml:"counter"` GasLimit *BigInt `json:"gas_limit" yaml:"gas_limit"` StorageLimit *BigInt `json:"storage_limit" yaml:"storage_limit"` PublicKey string `json:"public_key" yaml:"public_key"` Metadata RevealOperationMetadata `json:"metadata" yaml:"metadata"` }
RevealOperationElem represents a reveal operation
func (el *RevealOperationElem) BalanceUpdates() BalanceUpdates
BalanceUpdates implements BalanceUpdateOperation
func (el *RevealOperationElem) OperationFee() *big.Int
OperationFee implements OperationWithFee
type RevealOperationMetadata DelegationOperationMetadata
RevealOperationMetadata represents a reveal operation metadata
type RunningTestChainStatus struct { GenericTestChainStatus ChainID string `json:"chain_id" yaml:"chain_id"` Genesis string `json:"genesis" yaml:"genesis"` Protocol string `json:"protocol" yaml:"protocol"` Expiration string `json:"expiration" yaml:"expiration"` }
RunningTestChainStatus is a TestChainStatus variant for Status=running
type ScriptedContracts struct { Code map[string]interface{} `json:"code" yaml:"code"` Storage map[string]interface{} `json:"storage" yaml:"storage"` }
ScriptedContracts corresponds to $scripted.contracts
type SeedNonceRevelationOperationElem struct { GenericOperationElem `yaml:",inline"` Level int32 `json:"level" yaml:"level"` Nonce string `json:"nonce" yaml:"nonce"` Metadata BalanceUpdatesOperationMetadata `json:"metadata" yaml:"metadata"` }
SeedNonceRevelationOperationElem represents seed_nonce_revelation operation
func (el *SeedNonceRevelationOperationElem) BalanceUpdates() BalanceUpdates
BalanceUpdates implements BalanceUpdateOperation
Service implements fetching of information from Tezos nodes via JSON.
BanNetworkPeer blacklists the given peer. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-peers-peer-id-ban
BanNetworkPoint blacklists the given address. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-points-point-ban
func (s *Service) ConnectToNetworkPoint(ctx context.Context, address string, timeout time.Duration) error
ConnectToNetworkPoint used to connect to a peer. https://tezos.gitlab.io/mainnet/api/rpc.html#put-network-points-point
GetBallotList returns ballots casted so far during a voting period. https://tezos.gitlab.io/alphanet/api/rpc.html#get-block-id-votes-ballot-list
func (s *Service) GetBallotListings(ctx context.Context, chainID, blockID string) ([]*BallotListing, error)
GetBallotListings returns a list of delegates with their voting weight, in number of rolls. https://tezos.gitlab.io/alphanet/api/rpc.html#get-block-id-votes-listings
GetBallots returns sum of ballots casted so far during a voting period. https://tezos.gitlab.io/alphanet/api/rpc.html#get-block-id-votes-ballots
GetBlock returns information about a Tezos block https://tezos.gitlab.io/alphanet/api/rpc.html#get-block-id
func (s *Service) GetContractBalance(ctx context.Context, chainID string, blockID string, contractID string) (*big.Int, error)
GetContractBalance returns a contract's balance http://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-context-contracts-contract-id-balance
func (s *Service) GetCurrentPeriodKind(ctx context.Context, chainID, blockID string) (PeriodKind, error)
GetCurrentPeriodKind returns the current period kind https://tezos.gitlab.io/alphanet/api/rpc.html#get-block-id-votes-current-period-kind
func (s *Service) GetCurrentProposals(ctx context.Context, chainID, blockID string) (string, error)
GetCurrentProposals returns the current proposal under evaluation. https://tezos.gitlab.io/alphanet/api/rpc.html#get-block-id-votes-current-proposal
GetCurrentQuorum returns the current expected quorum. https://tezos.gitlab.io/alphanet/api/rpc.html#get-block-id-votes-current-quorum
func (s *Service) GetDelegateBalance(ctx context.Context, chainID string, blockID string, pkh string) (*big.Int, error)
GetDelegateBalance returns a delegate's balance http://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-context-delegates-pkh-balance
GetInvalidBlocks lists blocks that have been declared invalid along with the errors that led to them being declared invalid. https://tezos.gitlab.io/alphanet/api/rpc.html#get-chains-chain-id-invalid-blocks
func (s *Service) GetMempoolPendingOperations(ctx context.Context, chainID string) (*MempoolOperations, error)
GetMempoolPendingOperations returns mempool pending operations
GetNetworkConnections returns all network connections http://tezos.gitlab.io/mainnet/api/rpc.html#get-network-connections
GetNetworkPeer returns details about a given peer. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-peers-peer-id
GetNetworkPeerBanned checks if a given peer is blacklisted or greylisted. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-peers-peer-id-banned
func (s *Service) GetNetworkPeerLog(ctx context.Context, peerID string) ([]*NetworkPeerLogEntry, error)
GetNetworkPeerLog monitors network events related to a given peer. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-peers-peer-id-log
GetNetworkPeers returns the list the peers the node ever met. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-peers
GetNetworkPoint returns details about a given `IP:addr`. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-points-point
GetNetworkPointBanned check is a given address is blacklisted or greylisted. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-points-point-banned
func (s *Service) GetNetworkPointLog(ctx context.Context, address string) ([]*NetworkPointLogEntry, error)
GetNetworkPointLog monitors network events related to an `IP:addr`. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-peers-peer-id-log
GetNetworkPoints returns list the pool of known `IP:port` used for establishing P2P connections. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-points
GetNetworkStats returns current network stats https://tezos.gitlab.io/betanet/api/rpc.html#get-network-stat
GetProposals returns a list of proposals with number of supporters. https://tezos.gitlab.io/alphanet/api/rpc.html#get-block-id-votes-proposals
func (s *Service) MonitorBootstrapped(ctx context.Context, results chan<- *BootstrappedBlock) error
MonitorBootstrapped reads from the bootstrapped blocks stream http://tezos.gitlab.io/mainnet/api/rpc.html#get-monitor-bootstrapped
func (s *Service) MonitorHeads(ctx context.Context, chainID string, results chan<- *BlockInfo) error
MonitorHeads reads from the heads blocks stream https://tezos.gitlab.io/mainnet/api/rpc.html#get-monitor-heads-chain-id
func (s *Service) MonitorMempoolOperations(ctx context.Context, chainID, filter string, results chan<- []*Operation) error
MonitorMempoolOperations monitors mempool pending operations. The connection is closed after every new block.
func (s *Service) MonitorNetworkPeerLog(ctx context.Context, peerID string, results chan<- []*NetworkPeerLogEntry) error
MonitorNetworkPeerLog monitors network events related to a given peer. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-peers-peer-id-log
func (s *Service) MonitorNetworkPointLog(ctx context.Context, address string, results chan<- []*NetworkPointLogEntry) error
MonitorNetworkPointLog monitors network events related to an `IP:addr`. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-peers-peer-id-log
TrustNetworkPeer used to trust a given peer permanently: the peer cannot be blocked (but its host IP still can). https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-peers-peer-id-trust
TrustNetworkPoint used to trust a given address permanently. Connections from this address can still be closed on authentication if the peer is blacklisted or greylisted. https://tezos.gitlab.io/mainnet/api/rpc.html#get-network-points-point-trust
TestChainStatus is a variable structure depending on the Status field
type TransactionOperationElem struct { GenericOperationElem `yaml:",inline"` Source string `json:"source" yaml:"source"` Fee *BigInt `json:"fee" yaml:"fee"` Counter *BigInt `json:"counter" yaml:"counter"` GasLimit *BigInt `json:"gas_limit" yaml:"gas_limit"` StorageLimit *BigInt `json:"storage_limit" yaml:"storage_limit"` Amount *BigInt `json:"amount" yaml:"amount"` Destination string `json:"destination" yaml:"destination"` Parameters map[string]interface{} `json:"parameters,omitempty" yaml:"parameters,omitempty"` Metadata TransactionOperationMetadata `json:"metadata" yaml:"metadata"` }
TransactionOperationElem represents a transaction operation
func (el *TransactionOperationElem) BalanceUpdates() BalanceUpdates
BalanceUpdates implements BalanceUpdateOperation
func (el *TransactionOperationElem) OperationFee() *big.Int
OperationFee implements OperationWithFee
type TransactionOperationMetadata struct { BalanceUpdates BalanceUpdates `json:"balance_updates" yaml:"balance_updates"` OperationResult TransactionOperationResult `json:"operation_result" yaml:"operation_result"` }
TransactionOperationMetadata represents a transaction operation metadata
type TransactionOperationResult struct { Status string `json:"status" yaml:"status"` Storage map[string]interface{} `json:"storage,omitempty" yaml:"storage,omitempty"` BalanceUpdates BalanceUpdates `json:"balance_updates,omitempty" yaml:"balance_updates,omitempty"` OriginatedContracts []string `json:"originated_contracts,omitempty" yaml:"originated_contracts,omitempty"` ConsumedGas *BigInt `json:"consumed_gas,omitempty" yaml:"consumed_gas,omitempty"` StorageSize *BigInt `json:"storage_size,omitempty" yaml:"storage_size,omitempty"` PaidStorageSizeDiff *BigInt `json:"paid_storage_size_diff,omitempty" yaml:"paid_storage_size_diff,omitempty"` Errors Errors `json:"errors,omitempty" yaml:"errors,omitempty"` }
TransactionOperationResult represents a transaction operation result
Package tezos imports 17 packages (graph). Updated 2019-09-11. Refresh now. Tools for package owners.