api_client_Assets.Assets

@polymeshassociation/polymesh-sdk / Modules / api/client/Assets / Assets

Class: Assets

api/client/Assets.Assets

Handles all Asset related functionality

Table of contents

Methods

Methods

claimClassicTicker

claimClassicTicker(args, opts?): Promise<TransactionQueue<TickerReservation, TickerReservation, unknown[][]>>

Claim a ticker symbol that was reserved in Polymath Classic (Ethereum). The Ethereum Account that owns the ticker must sign a special message that contains the DID of the Identity that will own the ticker in Polymesh, and provide the signed data to this call

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

Parameters

Returns

Promise<TransactionQueue<TickerReservation, TickerReservation, unknown[][]>>

Defined in

api/client/Assets.ts:79


createAsset

createAsset(args, opts?): Promise<TransactionQueue<Asset, Asset, unknown[][]>>

Create an Asset

note if ticker is already reserved, then required role:

  • Ticker Owner

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

Parameters

Returns

Promise<TransactionQueue<Asset, Asset, unknown[][]>>

Defined in

api/client/Assets.ts:92


getAsset

getAsset(args): Promise<Asset>

Retrieve an Asset

Parameters

NameTypeDescription

args

Object

-

args.ticker

string

Asset ticker

Returns

Promise<Asset>

Defined in

api/client/Assets.ts:213


getAssets

getAssets(args?): Promise<Asset[]>

Retrieve all of the Assets owned by an Identity

note Assets with unreadable characters in their tickers will be left out

Parameters

NameTypeDescription

args?

Object

-

args.owner

string | Identity

Identity representation or Identity ID as stored in the blockchain

Returns

Promise<Asset[]>

Defined in

api/client/Assets.ts:181


getTickerReservation

getTickerReservation(args): TickerReservation

Retrieve a Ticker Reservation

Parameters

NameTypeDescription

args

Object

-

args.ticker

string

Asset ticker

Returns

TickerReservation

Defined in

api/client/Assets.ts:167


getTickerReservations

getTickerReservations(args?): Promise<TickerReservation[]>

Retrieve all the ticker reservations currently owned by an Identity. This doesn't include Assets that have already been launched

note reservations with unreadable characters in their tickers will be left out

Parameters

NameTypeDescription

args?

Object

-

args.owner

string | Identity

defaults to the signing Identity

Returns

Promise<TickerReservation[]>

Defined in

api/client/Assets.ts:133


isTickerAvailable

isTickerAvailable(args): Promise<boolean>

Check if a ticker hasn't been reserved

note can be subscribed to

Parameters

NameType

args

Object

args.ticker

string

Returns

Promise<boolean>

Defined in

api/client/Assets.ts:101

isTickerAvailable(args, callback): Promise<UnsubCallback>

Parameters

NameType

args

Object

args.ticker

string

callback

SubCallback<boolean>

Returns

Promise<UnsubCallback>

Defined in

api/client/Assets.ts:102


reserveTicker

reserveTicker(args, opts?): Promise<TransactionQueue<TickerReservation, TickerReservation, unknown[][]>>

Reserve a ticker symbol under the ownership of the signing Identity to later use in the creation of an Asset. The ticker will expire after a set amount of time, after which other users can reserve it

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

Parameters

Returns

Promise<TransactionQueue<TickerReservation, TickerReservation, unknown[][]>>

Defined in

api/client/Assets.ts:67

Last updated