@oraichain/private-keys v2.0.2-beta.0
tKey Private Key Module
The oKey Private Key Module helps you add or remove the and password as a share for tkey. This module is the part of the tKey SDK.
Installation
npm install --save @oraichain/private-keys
Initialization
Import the PrivateKeyModule
class from @oraichain/private-keys
import PrivateKeyModule from "@oraichain/private-keys";
Assign the PrivateKeyModule
class to a variable
const privateKeyModule = new PrivateKeyModule();
Returns
The PrivateKeyModule
class returns an object with the following properties:
declare class PrivateKeyModule implements IModule {
moduleName: string;
tbSDK: ITKeyApi;
privateKeyFormats: IPrivateKeyFormat[];
constructor(formats: IPrivateKeyFormat[]);
setModuleReferences(tbSDK: ITKeyApi): void;
initialize(): Promise<void>;
setPrivateKey(privateKeyType: string, privateKey?: BN): Promise<void>;
getPrivateKeys(): Promise<IPrivateKeyStore[]>;
getAccounts(): Promise<BN[]>;
}
Usage
With the PrivateKeyModule
, you've access to the following functions:
Set Private Key
setPrivateKey(privateKeyType: string, privateKey?: BN)
privateKeyType
: The type of private key to set.privateKey
: The private key to set.
Get Private Keys
getPrivateKeys()
Return
Promise<IPrivateKeyStore[]>
- The private keys stored.
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
11 months ago
12 months ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago