Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RpcClient

description

RpcClient allows interaction with Tezos network through an rpc node

Hierarchy

  • RpcClient

Implements

Index

Constructors

constructor

  • new RpcClient(url: string, chain?: string, httpBackend?: HttpBackend): RpcClient

Properties

Protected chain

chain: string = ...

Protected httpBackend

httpBackend: HttpBackend = ...

Protected url

url: string

Methods

Protected createURL

  • createURL(path: string): string

forgeOperations

getAllTicketBalances

  • getAllTicketBalances(contract: string, __namedParameters?: { block: string }): Promise<AllTicketBalances>

getBakingRights

getBalance

  • getBalance(address: string, __namedParameters?: RPCOptions): Promise<BigNumber>

getBallotList

getBallots

getBigMapExpr

  • getBigMapExpr(id: string, expr: string, __namedParameters?: { block: string }): Promise<BigMapResponse>

getBigMapKey

getBlock

getBlockHash

  • getBlockHash(__namedParameters?: RPCOptions): Promise<string>

getBlockHeader

getBlockMetadata

getChainId

  • getChainId(): Promise<string>

getConstants

getContract

  • getContract(address: string, __namedParameters?: { block: string }): Promise<ContractResponse>

getCurrentPeriod

getCurrentProposal

getCurrentQuorum

  • getCurrentQuorum(__namedParameters?: RPCOptions): Promise<number>

getDelegate

  • getDelegate(address: string, __namedParameters?: { block: string }): Promise<DelegateResponse>

getDelegates

  • getDelegates(address: string, __namedParameters?: { block: string }): Promise<DelegatesResponse>

getEndorsingRights

getEntrypoints

getLiveBlocks

  • getLiveBlocks(__namedParameters?: RPCOptions): Promise<string[]>

getManagerKey

  • getManagerKey(address: string, __namedParameters?: { block: string }): Promise<ManagerKeyResponse>

getNormalizedScript

getOriginationProof

getPendingOperations

getProposals

getProtocols

getRpcUrl

  • getRpcUrl(): string

getSaplingDiffByContract

  • getSaplingDiffByContract(contract: string, __namedParameters?: { block: string }): Promise<SaplingDiffResponse>

getSaplingDiffById

  • getSaplingDiffById(id: string, __namedParameters?: { block: string }): Promise<SaplingDiffResponse>

getScript

  • getScript(address: string, __namedParameters?: { block: string }): Promise<ScriptedContracts>

getStorage

getStoragePaidSpace

  • getStoragePaidSpace(contract: string, __namedParameters?: { block: string }): Promise<string>

getStorageUsedSpace

  • getStorageUsedSpace(contract: string, __namedParameters?: { block: string }): Promise<string>

getSuccessorPeriod

getTicketBalance

  • getTicketBalance(contract: string, ticket: TicketTokenParams, __namedParameters?: { block: string }): Promise<string>

getTxRollupInbox

  • getTxRollupInbox(txRollupId: string, blockLevel: string, __namedParameters?: { block: string }): Promise<null | TxRollupInboxResponse>

getTxRollupState

  • getTxRollupState(txRollupId: string, __namedParameters?: { block: string }): Promise<TxRollupStateResponse>

getVotesListings

getVotingInfo

  • getVotingInfo(address: string, __namedParameters?: { block: string }): Promise<VotingInfoResponse>

injectOperation

  • injectOperation(signedOpBytes: string): Promise<string>

packData

  • packData(data: PackDataParams, __namedParameters?: RPCOptions): Promise<{ gas: undefined | BigNumber | "unaccounted"; packed: string }>
  • description

    Computes the serialized version of a data expression using the same algorithm as script instruction PACK Note: You should always verify the packed bytes before signing or requesting that they be signed when using the the RPC to pack. This precaution helps protect you and your applications users from RPC nodes that have been compromised. A node that is operated by a bad actor, or compromised by a bad actor could return a fully formed operation that does not correspond to the input provided to the RPC endpoint. A safer solution to pack and sign data would be to use the packDataBytes function available in the @taquito/michel-codec package.

    example

    packData({ data: { string: "test" }, type: { prim: "string" } })

    see

    https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-pack-data

    Parameters

    Returns Promise<{ gas: undefined | BigNumber | "unaccounted"; packed: string }>

preapplyOperations

runCode

runOperation

runScriptView

runView

simulateOperation

Generated using TypeDoc