Construct a Polkadot-js ApiPromise, and retrieve the specName of the chain.
import { constructApiPromise } from '@substrate/asset-transfer-api';const { api, specName, safeXcmVersion } = constructApiPromise('wss://some_ws_url'); Copy
import { constructApiPromise } from '@substrate/asset-transfer-api';const { api, specName, safeXcmVersion } = constructApiPromise('wss://some_ws_url');
WebSocket Url to connect to.
ApiOptions
Construct a Polkadot-js ApiPromise, and retrieve the specName of the chain.