Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/api-derive/accounts/index.ts>idAndIndex

Package publishing for deno.land/x/polkadot
Go to Latest
function idAndIndex
import { idAndIndex } from "https://deno.land/x/polkadot@0.2.16/api-derive/accounts/index.ts";

Examples

api.derive.accounts.idAndIndex('F7Hs', ([id, ix]) => {
  console.log(`AccountId #${id} with corresponding AccountIndex ${ix}`);
});

Parameters

instanceId: string
  • An accounts address in various formats.
api: DeriveApi

Returns

(address?:
| Address
| AccountId
| AccountIndex
| Uint8Array
| string
| null
) => Observable<AccountIdAndIndex>