Protected
constructorProtected
_principalProtected
_privateReturn the public key.
Serialize this key to JSON-serializable object.
Transform a request into a signed version of the request. This is done last after the transforms on the body of a request. The returned object can be anything, but must be serializable to CBOR.
internet computer request to transform
Static
fromJSONStatic
fromgenerates an identity from a public and private key. Please ensure that you are generating these keys securely and protect the user's private key
Static
fromStatic
fromgenerates an identity from an existing secret key, and is the correct method to generate an identity from a seed phrase. Please ensure you protect the user's private key.
Static
fromGenerates an identity from a seed phrase. Use carefully - seed phrases should only be used in secure contexts, and you should avoid having users copying and pasting seed phrases as much as possible.
either an array of words or a string of words separated by spaces.
Optional
password: stringoptional password to be used by bip39
Secp256k1KeyIdentity
Static
generateGenerates an identity. If a seed is provided, the keys are generated from the seed according to BIP 0032. Otherwise, the key pair is randomly generated. This method throws an error in case the seed is not 32 bytes long or invalid for use as a private key.
Optional
seed: Uint8Arraythe optional seed
Generated using TypeDoc
Return a copy of the key pair.