Class: Secp256k1Wallet
@shareledgerjs/client.Secp256k1Wallet
A wallet that holds a single secp256k1 keypair.
If you want to work with BIP39 mnemonics and multiple accounts, use Secp256k1HdWallet.
Implements
OfflineDirectSigner
Constructors
constructor
• Private
new Secp256k1Wallet()
Properties
prefix
• Private
Readonly
prefix: any
privkey
• Private
Readonly
privkey: any
pubkey
• Private
Readonly
pubkey: any
Accessors
address
• Private
get
address(): any
Returns
any
Methods
getAccounts
▸ getAccounts(): Promise
<readonly AccountData
[]>
Returns
Promise
<readonly AccountData
[]>
Implementation of
OfflineDirectSigner.getAccounts
signDirect
▸ signDirect(address
, signDoc
): Promise
<DirectSignResponse
>
Parameters
Name | Type |
---|---|
address | string |
signDoc | SignDoc |
Returns
Promise
<DirectSignResponse
>
Implementation of
OfflineDirectSigner.signDirect
fromKey
▸ Static
fromKey(privkey
, prefix?
): Promise
<Secp256k1Wallet
>
Creates a Secp256k1Wallet from the given private key
Parameters
Name | Type | Description |
---|---|---|
privkey | Uint8Array | The private key. |
prefix? | string | The bech32 address prefix (human readable part). Defaults to "shareledger". |
Returns
Promise
<Secp256k1Wallet
>