Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
txwrapper
Commits
b5b9c201
Commit
b5b9c201
authored
Dec 02, 2019
by
Amaury Martiny
Browse files
Use Kusama everywhere
parent
63abd36f
Changes
1
Show whitespace changes
Inline
Side-by-side
src/generateKeypair.ts
View file @
b5b9c201
...
...
@@ -2,6 +2,8 @@ import { Keyring } from '@polkadot/keyring';
import
{
KeyringPair
as
KeyringPairBase
}
from
'
@polkadot/keyring/types
'
;
import
{
mnemonicGenerate
}
from
'
@polkadot/util-crypto
'
;
import
{
KUSAMA_SS58_FORMAT
}
from
'
./util/constants
'
;
/**
* A keyring pair
*/
...
...
@@ -12,6 +14,7 @@ export interface KeyringPair extends KeyringPairBase {} // eslint-disable-line @
*/
export
function
generateKeypair
():
KeyringPair
{
const
keyring
=
new
Keyring
();
keyring
.
setSS58Format
(
KUSAMA_SS58_FORMAT
);
return
keyring
.
addFromMnemonic
(
mnemonicGenerate
());
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment