Files
common/docs/keyring/modules/_testing_.md
T
2018-10-22 18:34:54 +00:00

964 B

Functions

testKeyring

▸ testKeyring(): KeyringInstance

Defined in testing.ts:57

name: testKeyring

signature: testKeyring (): KeyringInstance

summary: Create an instance of Keyring pre-populated with locked test accounts

description: The test accounts (i.e. alice, bob, dave, eve, ferdie) are available on the dev chain and each test account is initialised with DOT funds.

example:

import testKeyring from '@polkadot/keyring/testing';

// Create an instance of Keyring that includes test accounts
const keyring = testingPairs();

// Retrieve the address of one of the test accounts
const addressAlice = keyring.alice.address();

// Retrieve the public key of one of the test accounts
const publicKeyAlice = keyring.alice.publicKey();

Returns: KeyringInstance