Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Secp256k1KeyIdentity

Hierarchy

  • SignIdentity
    • Secp256k1KeyIdentity

Implements

  • Identity

Index

Constructors

Protected constructor

Properties

Protected _principal

_principal: Principal | undefined

Protected _privateKey

_privateKey: BinaryBlob

Protected _publicKey

_publicKey: Secp256k1PublicKey

Methods

getKeyPair

getPrincipal

  • getPrincipal(): Principal
  • Get the principal represented by this identity. Normally should be a Principal.selfAuthenticating().

    Returns Principal

getPublicKey

  • getPublicKey(): PublicKey

sign

  • sign(challenge: BinaryBlob): Promise<BinaryBlob>
  • Signs a blob of data, with this identity's private key.

    Parameters

    • challenge: BinaryBlob

      challenge to sign with this identity's secretKey, producing a signature

    Returns Promise<BinaryBlob>

toJSON

transformRequest

  • transformRequest(request: HttpAgentRequest): Promise<unknown>
  • 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.

    Parameters

    • request: HttpAgentRequest

      internet computer request to transform

    Returns Promise<unknown>

Static fromJSON

Static fromKeyPair

Static fromParsedJson

Static fromSecretKey

Generated using TypeDoc