package
0.4.4
Repository: https://github.com/dipdup-net/go-lib.git
Documentation: pkg.go.dev

# README

Tezos RPC client

The library realize almost all RPC methods of Tezos node.

Usage

Simple example

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

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

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

rpc := node.NewMainRPC("https://rpc.tzkt.io/mainnet")

Usage certain API part

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

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

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

Interfaces

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

Interfaces list:

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

# Functions

IsManager -.
NewChain -.
NewChain -.
NewConfig -.
NewContext -.
NewGeneral -.
NewInject -.
NewMainBlockRPC -.
NewMainChain -.
NewMainContext -.
NewMainRPC -.
NewMonitor -.
NewNetwork -.
NewProtocols -.
NewRPC -.
NewTypedOperation -.

# Constants

delegate types.
delegate types.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
delegate types.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

# Structs

AccountActivation -.
ActivatedProtocol -.
ActivatedUpgrades -.
Applied -.
BalanceUpdate -.
Ballot -.
BigMapDiff is an element of BigMapDiffs.
Block -.
BlockBallot -.
BlockBallots -.
BlockMetadata -.
BlockProtocols -.
BlockRPC -.
BlocksArgs -.
Bootstrapped -.
Caboose -.
Chain -.
Checkpoint -.
CommitmentsAndCiphertexts-.
Config -.
Connection -.
ConnectionMetadata -.
ConnectionVersion -.
Constants -.
Contents -.
Context -.
ContractInfo -.
DalPublishCommitment -.
Delegate -.
Delegation -.
DoubleBakingEvidence -.
DoubleEndorsementEvidence -.
DoublePreendorsementEvidence -.
DrainDelegate -.
Endorsement -.
EndorsementMetadata -.
EndorsementOperation -.
EndorsementWithDal -.
EndorsementWithSlot -.
EndorsementWithSlotEntity -.
Entrypoints -.
Event -.
Failed -.
FailedMonitor -.
FrozenBalanceByCycle -.
General -.
Header -.
HeaderShell -.
HistoryMode -.
ImplicitOperationsResult -.
No description provided by the author
InjectOperationRequest -.
InlinedEndorsement -.
InlinedEndorsementOperations -.
InlinedPreendorsement -.
InlinedPreendorsementOperations -.
InvalidBlock -.
LastRemovedCommitmentHashes -.
LazyStorageDiff -.
LazyStorageDiffBigMapEntity -.
LazyStorageDiffSaplingEntity -.
LazyStorageDiffUpdate -.
LazyStorageDiffUpdatesSaplingState -.
LevelInfo -.
ManagerOperationMetadata -.
MempoolResponse -.
Monitor -.
Network -.
NetworkPoint -.
NetworkPointWithURI -.
OnlyBalanceUpdatesMetadata -.
Operation -.
OperationGroup -.
OperationResult -.
Origination -.
Parameters -.
Point -.
Preendorsement -.
Proposal -.
ProtocolComponent -.
ProtocolData -.
ProtocolInfo -.
Protocols -.
Refutation -.
RegisterGlobalConstant -.
RequestError -.
ResultError -.
Reveal -.
Rolls -.
RollupCommitment -.
RollupCommitmentForBlock -.
RollupCommitmentMessages -.
RollupStateCommitment -.
RPC -.
SaplingTransactionCiphertext -.
Savepoint -.
Script -.
SeedNonceRevelation -.
SetDepositsLimit -.
No description provided by the author
SmartRollupAddMessage -.
SmartRollupCement -.
SmartRollupExecute -.
SmartRollupOriginate -.
SmartRollupPublish -.
SmartRollupRecoverBond -.
SmartRollupRefute -.
SmartRollupTimeout -.
SrCommitmentInfo -.
Stakers -.
StatsGC -.
StatsMemory -.
TicketsInfo -.
Transaction -.
TxRollupCommit -.
TxRollupCommitment -.
TxRollupDispatchTickets -.
TxRollupFinalizeCommitment -.
TxRollupInbox -.
TxRollupOrigination -.
TxRollupRejection -.
TxRollupRemoveCommitment -.
TxRollupState -.
TxRollupSubmitBatch -.
UpdateConsensusKey -.
VdfRevelation -.
Version -.
VotingPeriod -.

# Interfaces

API -.
BlockAPI -.
ChainAPI -.
ConfigAPI -.
ContextAPI -.
GeneralAPI -.
InjectAPI -.
NetworkAPI -.
OperationConstraint -.
ProtocolsAPI -.

# Type aliases

DelegateType -.
Int64StringSlice -.