• 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');

    Parameters

    • wsUrl: string

      WebSocket Url to connect to.

    • opts: ApiOptions = {}

      ApiOptions

    Returns Promise<ApiInfo>