Network

Handles all Network related functionality, including querying for historical events from middleware

Hierarchy

  • Network

Index

Methods

Methods

getEventByIndexedArgs

getEventByIndexedArgs(opts: object): Promise‹EventIdentifier | null›

Defined in src/Network.ts:167

Retrieve a single event by any of its indexed arguments. Can be filtered using parameters

note uses the middleware

Parameters:

opts: object

Returns: Promise‹EventIdentifier | null›


getEventByIndexedArgsV2

getEventByIndexedArgsV2(opts: object): Promise‹EventIdentifier | null›

Defined in src/Network.ts:204

Retrieve a single event by any of its indexed arguments. Can be filtered using parameters

note uses the middlewareV2

Parameters:

opts: object

Returns: Promise‹EventIdentifier | null›


getEventsByIndexedArgs

getEventsByIndexedArgs(opts: object): Promise‹EventIdentifier[] | null›

Defined in src/Network.ts:250

Retrieve a list of events. Can be filtered using parameters

note uses the middleware

Parameters:

opts: object

Returns: Promise‹EventIdentifier[] | null›


getEventsByIndexedArgsV2

getEventsByIndexedArgsV2(opts: object): Promise‹EventIdentifier[] | null›

Defined in src/Network.ts:300

Retrieve a list of events. Can be filtered using parameters

note uses the middlewareV2

Parameters:

opts: object

Returns: Promise‹EventIdentifier[] | null›


getLatestBlock

getLatestBlock(): Promise‹BigNumber›

Defined in src/Network.ts:61

Retrieve the number of the latest block in the chain

Returns: Promise‹BigNumber›


getNetworkProperties

getNetworkProperties(): Promise‹NetworkProperties

Defined in src/Network.ts:82

Retrieve information for the current network

Returns: Promise‹NetworkProperties


getProtocolFees

getProtocolFees(args: object): Promise‹ProtocolFees[]›

Defined in src/Network.ts:106

Retrieve the protocol fees associated with running specific transactions

Parameters:

args: object

Returns: Promise‹ProtocolFees[]›


getSs58Format

getSs58Format(): BigNumber

Defined in src/Network.ts:75

Retrieve the chain's SS58 format

Returns: BigNumber


getTransactionByHash

getTransactionByHash(opts: object): Promise‹ExtrinsicDataWithFees | null›

Defined in src/Network.ts:348

Retrieve a transaction by hash

note uses the middleware

Parameters:

opts: object

Returns: Promise‹ExtrinsicDataWithFees | null›


getTransactionByHashV2

getTransactionByHashV2(opts: object): Promise‹ExtrinsicDataWithFees | null›

Defined in src/Network.ts:435

Retrieve a transaction by hash

note uses the middlewareV2

Parameters:

opts: object

Returns: Promise‹ExtrinsicDataWithFees | null›


getTreasuryAccount

getTreasuryAccount(): Account

Defined in src/Network.ts:113

Get the treasury wallet address

Returns: Account


getTreasuryBalance

getTreasuryBalance(): Promise‹BigNumber›

Defined in src/Network.ts:126

Get the Treasury POLYX balance

note can be subscribed to

Returns: Promise‹BigNumber›

getTreasuryBalance(callback: SubCallback‹BigNumber›): Promise‹UnsubCallback

Defined in src/Network.ts:127

Parameters:

Returns: Promise‹UnsubCallback


getVersion

getVersion(): Promise‹string›

Defined in src/Network.ts:68

Fetch the current network version (i.e. 3.1.0)

Returns: Promise‹string›


transferPolyx

transferPolyx(args: TransferPolyxParams, opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/Network.ts:152

Transfer an amount of POLYX to a specified Account

note this method is of type ProcedureMethod, which means you can call transferPolyx.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

Returns: Promise‹TransactionQueue‹void››

Last updated