Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RpcClient

description

RpcClient allows interaction with Tezos network through an rpc node

Hierarchy

  • RpcClient

Index

Constructors

constructor

Properties

Protected chain

chain: string = ...

Protected httpBackend

httpBackend: HttpBackend = ...

Protected url

url: string

Methods

forgeOperations

getBakingRights

getBalance

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

getBallotList

getBallots

getBigMapExpr

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

getBigMapKey

getBlock

  • getBlock(__namedParameters?: RPCOptions): Promise<BlockResponse>
  • description

    All the information about a block

    see

    https://tezos.gitlab.io/api/rpc.html#get-block-id

    example

    getBlock() will default to /main/chains/block/head.

    example

    getBlock({ block: head~2 }) will return an offset of 2 blocks.

    example

    getBlock({ block: BL8fTiWcSxWCjiMVnDkbh6EuhqVPZzgWheJ2dqwrxYRm9AephXh~2 }) will return an offset of 2 blocks from given block hash..

    Parameters

    • __namedParameters: RPCOptions = ...

    Returns Promise<BlockResponse>

getBlockHash

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

getBlockHeader

getBlockMetadata

  • getBlockMetadata(__namedParameters?: RPCOptions): Promise<BlockMetadata>

getChainId

  • getChainId(): Promise<string>

getConstants

getContract

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

getCurrentPeriod

getCurrentPeriodKind

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

  • getEntrypoints(contract: string, __namedParameters?: RPCOptions): Promise<EntrypointsResponse>

getLiveBlocks

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

getManagerKey

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

getProposals

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

getSuccessorPeriod

getVotesListings

injectOperation

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

    Inject 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.

    see

    https://tezos.gitlab.io/api/rpc.html#post-injection-operation

    Parameters

    • signedOpBytes: string

      signed bytes to inject

    Returns Promise<string>

packData

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

preapplyOperations

runCode

runOperation

Generated using TypeDoc