Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Ed25519KeyIdentity

Hierarchy

  • SignIdentity
    • Ed25519KeyIdentity

Index

Constructors

  • new Ed25519KeyIdentity(publicKey: PublicKey, _privateKey: ArrayBuffer): Ed25519KeyIdentity

Properties

_principal: undefined | Principal
_privateKey: ArrayBuffer
_publicKey: Ed25519PublicKey

Methods

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

    Returns Principal

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

    Parameters

    • challenge: ArrayBuffer

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

    Returns Promise<Signature>

  • toJSON(): JsonnableEd25519KeyIdentity
  • 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>

Generated using TypeDoc