Creates a wallet from mnemonic and symbol with optional account index.
const walletObj = await createWallet(
'open jelly jeans corn ketchup supreme brief element armed lens vault weather original scissors rug priority vicious lesson raven spot gossip powder person volcano',
'ICP'
);
// => {
publicKey:
'0x7806e3f1de6b8690b8eb57fded933c66f059993ba1d675f49ba3f94fac1f8425',
address: 'FHhJyt9RgGin3yfYgdzaAu9MXBodkAuULpao6rGcEyHTscN',
type: 'sr25519',
}
const walletObj = await createWallet(
'open jelly jeans corn ketchup supreme brief element armed lens vault weather original scissors rug priority vicious lesson raven spot gossip powder person volcano',
'ICP'
);
// => {
publicKey:
'0x7806e3f1de6b8690b8eb57fded933c66f059993ba1d675f49ba3f94fac1f8425',
address: 'FHhJyt9RgGin3yfYgdzaAu9MXBodkAuULpao6rGcEyHTscN',
type: 'sr25519',
}
Comment describing the value
parameter.
Comment describing the value
parameter.
Comment describing the value
parameter.
Comment describing the return type.
Get slip44 object for a symbol
import { getSlipFromSymbol } from '@earthwallet/keyring'
getSlipFromSymbol("ICP");
// => {
index: '223',
hex: '0x800000df',
symbol: 'ICP',
name: 'Internet Computer (DFINITY)',
link: 'https://dfinity.org/',
}
slipObject
Generate a new random Mnemonic
import { newMnemonic } from '@earthwallet/keyring'
await newMnemonic();
// => open jelly jeans corn ketchup supreme brief element armed lens vault weather original scissors rug priority vicious lesson raven spot gossip powder person volcano
mnemonic.
hex of derived child private key of character length 64 and buffer size 32 bytes
e.g 07b1b5f1f023eaa457a6d63fe00cea8cae5c943461350de455cb2d1f3dec8992
Specifies the number of ICP tokens to transfer. Can be specified as a number with up to eight (8) decimal places.
Validate Mnemonic
import { validateMnemonic } from '@earthwallet/keyring'
validateMnemonic('open jelly jeans corn ketchup supreme brief element armed lens vault weather original scissors rug priority vicious lesson raven spot gossip powder person volcano');
// => true
boolean.
Generated using TypeDoc
If you import a dependency which does not include its own type definitions, TypeScript will try to find a definition for it by following the
typeRoots
compiler option in tsconfig.json. For this project, we've configured it to fall back to this folder if nothing is found in node_modules/@types.Often, you can install the DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped) type definition for the dependency in question. However, if no one has yet contributed definitions for the package, you may want to declare your own. (If you're using the
noImplicitAny
compiler options, you'll be required to declare it.)This is an example type definition which allows import from
module-name
, e.g.:import something from 'module-name'; something();