PublicKey
types/public_key • Docs
near-sdk-js v2.0.0 / types/public_key / PublicKey
Class: PublicKey
A abstraction on top of the NEAR public key string. Public key in a binary format with base58 string serialization with human-readable curve. The key types currently supported are secp256k1
and ed25519
.
Constructors
new PublicKey()
new PublicKey(
data
):PublicKey
Parameters
• data: Uint8Array
The string you want to create a PublicKey from.
Returns
Defined in
packages/near-sdk-js/src/types/public_key.ts:93
Properties
data
data:
Uint8Array
The actual value of the public key.
Defined in
packages/near-sdk-js/src/types/public_key.ts:87
Methods
curveType()
curveType():
CurveType
The curve type of the public key.
Returns
Defined in
packages/near-sdk-js/src/types/public_key.ts:107
fromString()
static
fromString(publicKeyString
):PublicKey
Create a public key from a public key string.
Parameters
• publicKeyString: string
The public key string you want to create a PublicKey from.
Returns
Defined in
Last updated