Hierarchy (view full)

Constructors

Properties

connectedNodes: Set<string> = ...
hdRootPubkeys: string[] = null
lastBlockHashRetrieved: number = null
latestBlockhash: string = null
networkPubKey: string = null
networkPubKeySet: string = null
ready: boolean = false
serverKeys: Record<string, JsonHandshakeResponse> = {}
subnetPubKey: string = null

Accessors

Methods

  • Calculates a Key Id for claiming a pkp based on a user identifier and an app identifier. The key Identifier is an Auth Method Id which scopes the key uniquely to a specific application context. These identifiers are specific to each auth method and will derive the public key portion of a pkp which will be persisted when a key is claimed.

    Auth Method User ID App ID
    Google OAuth token sub token aud
    Discord OAuth user id client app identifier
    Stytch OTP token sub token aud
    Lit Actions user defined ipfs cid
    Note Lit Action claiming uses a different schema than other auth methods

    Parameters

    • userId: string

      user identifier for the Key Identifier

    • appId: string

      app identifier for the Key Identifier

    • isForActionContext: boolean = false

      should be set for true if using claiming through actions

    Returns string

    public key of pkp when claimed

  • Calculates an HD public key from a given keyId The curve type or signature type is assumed to be k256 unless provided

    Parameters

    Returns Promise<string>

    public key

  • Stops internal listeners/polling that refresh network state and watch for epoch changes. Removes global objects created internally

    Returns Promise<void>

  • Get and gather node promises

    Parameters

    • callback: ((url: string) => Promise<any>)
        • (url): Promise<any>
        • Parameters

          • url: string

          Returns Promise<any>

    Returns Promise<any>[]

  • Parameters

    • callback: ((url: string) => Promise<any>)
        • (url): Promise<any>
        • Parameters

          • url: string

          Returns Promise<any>

    Returns Promise<any>[]

  • Retrieves the session signature for a given URL from the sessionSigs map. Throws an error if sessionSigs is not provided or if the session signature for the URL is not found.

    Parameters

    Returns AuthSig

    The session signature for the given URL.

    An error if sessionSigs is not provided or if the session signature for the URL is not found.