Polymesh SDK API Reference
beta
beta
  • Globals
  • Classes
    • Account
    • AccountManagement
    • Asset
    • AssetHolders
    • AssetPermissions
    • Assets
    • AuthorizationRequest
    • Authorizations
    • Checkpoint
    • CheckpointSchedule
    • Checkpoints
    • Claims
    • Compliance
    • CorporateAction
    • CorporateActionBase
    • CorporateActions
    • Count
    • CustomPermissionGroup
    • DefaultPortfolio
    • DefaultTrustedClaimIssuer
    • Distributions
    • DividendDistribution
    • Documents
    • Entity
    • Identities
    • Identity
    • IdentityAuthorizations
    • Instruction
    • Issuance
    • KnownPermissionGroup
    • Network
    • NumberedPortfolio
    • Offering
    • Offerings
    • Percentage
    • PermissionGroup
    • Permissions
    • Polymesh
    • PolymeshError
    • PolymeshTransaction
    • PolymeshTransactionBase
    • PolymeshTransactionBatch
    • Portfolio
    • Portfolios
    • Requirements
    • Schedules
    • Settlements
    • Subsidy
    • TickerReservation
    • TransactionQueue
    • TransferRestrictionBase
    • TransferRestrictions
    • TrustedClaimIssuers
    • Venue
  • Enums
  • Interfaces
Powered by GitBook
On this page
  • Hierarchy
  • Index
  • Methods
  • Methods
  • getEventByIndexedArgs
  • getEventByIndexedArgsV2
  • getEventsByIndexedArgs
  • getEventsByIndexedArgsV2
  • getLatestBlock
  • getNetworkProperties
  • getProtocolFees
  • getSs58Format
  • getTransactionByHash
  • getTransactionByHashV2
  • getTreasuryAccount
  • getTreasuryBalance
  • getVersion
  • transferPolyx

Was this helpful?

  1. Classes

Network

PreviousKnownPermissionGroupNextNumberedPortfolio

Last updated 2 years ago

Was this helpful?

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

Hierarchy

  • Network

Index

Methods

Methods

getEventByIndexedArgs

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

note uses the middleware

Parameters:

â–ª opts: object

Name
Type
Description

eventArg0?

undefined | string

event parameter value to filter by in position 0

eventArg1?

undefined | string

event parameter value to filter by in position 1

eventArg2?

undefined | string

event parameter value to filter by in position 2

eventId

EventId

type of the event to fetch

moduleId

ModuleId

type of the module to fetch


getEventByIndexedArgsV2

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

note uses the middlewareV2

Parameters:

â–ª opts: object

Name
Type
Description

eventArg0?

undefined | string

event parameter value to filter by in position 0

eventArg1?

undefined | string

event parameter value to filter by in position 1

eventArg2?

undefined | string

event parameter value to filter by in position 2

eventId

EventId

type of the event to fetch

moduleId

ModuleId

type of the module to fetch


getEventsByIndexedArgs

Retrieve a list of events. Can be filtered using parameters

note uses the middleware

Parameters:

â–ª opts: object

Name
Type
Description

eventArg0?

undefined | string

event parameter value to filter by in position 0

eventArg1?

undefined | string

event parameter value to filter by in position 1

eventArg2?

undefined | string

event parameter value to filter by in position 2

eventId

EventId

type of the event to fetch

moduleId

ModuleId

type of the module to fetch

size?

BigNumber

page size

start?

BigNumber

page offset


getEventsByIndexedArgsV2

Retrieve a list of events. Can be filtered using parameters

note uses the middlewareV2

Parameters:

â–ª opts: object

Name
Type
Description

eventArg0?

undefined | string

event parameter value to filter by in position 0

eventArg1?

undefined | string

event parameter value to filter by in position 1

eventArg2?

undefined | string

event parameter value to filter by in position 2

eventId

EventId

type of the event to fetch

moduleId

ModuleId

type of the module to fetch

size?

BigNumber

page size

start?

BigNumber

page offset


getLatestBlock

▸ getLatestBlock(): Promise‹BigNumber›

Retrieve the number of the latest block in the chain

Returns: Promise‹BigNumber›


getNetworkProperties

Retrieve information for the current network


getProtocolFees

Retrieve the protocol fees associated with running specific transactions

Parameters:

â–ª args: object

Name
Type
Description

tags

TxTag[]

list of transaction tags (i.e. [TxTags.asset.CreateAsset, TxTags.asset.RegisterTicker] or ["asset.createAsset", "asset.registerTicker"])


getSs58Format

â–¸ getSs58Format(): BigNumber

Retrieve the chain's SS58 format

Returns: BigNumber


getTransactionByHash

Retrieve a transaction by hash

note uses the middleware

Parameters:

â–ª opts: object

Name
Type
Description

txHash

string

hash of the transaction


getTransactionByHashV2

Retrieve a transaction by hash

note uses the middlewareV2

Parameters:

â–ª opts: object

Name
Type
Description

txHash

string

hash of the transaction


getTreasuryAccount

Get the treasury wallet address


getTreasuryBalance

▸ getTreasuryBalance(): Promise‹BigNumber›

Get the Treasury POLYX balance

note can be subscribed to

Returns: Promise‹BigNumber›

Parameters:

Name
Type

callback


getVersion

▸ getVersion(): Promise‹string›

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

Returns: Promise‹string›


transferPolyx

Transfer an amount of POLYX to a specified Account

Parameters:

Name
Type

args

opts?

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

Defined in

Returns: Promise‹ | null›

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

Defined in

Returns: Promise‹ | null›

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

Defined in

Returns: Promise‹[] | null›

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

Defined in

Returns: Promise‹[] | null›

Defined in

▸ getNetworkProperties(): Promise‹›

Defined in

Returns: Promise‹›

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

Defined in

Returns: Promise‹[]›

Defined in

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

Defined in

Returns: Promise‹ | null›

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

Defined in

Returns: Promise‹ | null›

â–¸ getTreasuryAccount():

Defined in

Returns:

Defined in

▸ getTreasuryBalance(callback: ‹BigNumber›): Promise‹›

Defined in

‹BigNumber›

Returns: Promise‹›

Defined in

▸ transferPolyx(args: , opts?: ): Promise‹‹void››

Defined in

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

Returns: Promise‹‹void››

EventIdentifier
src/Network.ts:167
EventIdentifier
EventIdentifier
src/Network.ts:204
EventIdentifier
EventIdentifier
src/Network.ts:250
EventIdentifier
EventIdentifier
src/Network.ts:300
EventIdentifier
src/Network.ts:61
NetworkProperties
src/Network.ts:82
NetworkProperties
ProtocolFees
src/Network.ts:106
ProtocolFees
src/Network.ts:75
ExtrinsicDataWithFees
src/Network.ts:348
ExtrinsicDataWithFees
ExtrinsicDataWithFees
src/Network.ts:435
ExtrinsicDataWithFees
Account
src/Network.ts:113
Account
src/Network.ts:126
src/Network.ts:127
src/Network.ts:68
TransferPolyxParams
ProcedureOpts
TransactionQueue
src/Network.ts:152
ProcedureMethod
transferPolyx.checkAuthorization
TransactionQueue
getEventByIndexedArgs
getEventByIndexedArgsV2
getEventsByIndexedArgs
getEventsByIndexedArgsV2
getLatestBlock
getNetworkProperties
getProtocolFees
getSs58Format
getTransactionByHash
getTransactionByHashV2
getTreasuryAccount
getTreasuryBalance
getVersion
transferPolyx
TransferPolyxParams
ProcedureOpts
SubCallback
UnsubCallback
UnsubCallback
SubCallback