A base class that can be shared between Ethers and Cosmos signers.

Type Parameters




PREFIX: string = '[PKPBase]'
compressedPubKey: string
compressedPubKeyBuffer: Uint8Array
controllerAuthMethods?: AuthMethod[]
controllerAuthSig?: AuthSig
controllerSessionSigs?: SessionSigs
debug: boolean
litActionCode?: string
litActionIPFS?: string
litActionJsParams: T
litNodeClient: LitNodeClient
litNodeClientReady: boolean = false
orange: string = '\x1b[33m'
red: string = '\x1b[31m'
reset: string = '\x1b[0m'
rpcs?: RPCUrls
sessionSigsExpiration?: string
uncompressedPubKey: string
uncompressedPubKeyBuffer: Uint8Array
useAction: boolean


  • Ensures that the LitNode client is ready for use by waiting for initialization if necessary. If the client is already ready, this function does nothing.


    • A Promise that resolves when the LitNode client is ready for use.

    Returns Promise<void>

  • Base method to be overridden by subclasses.


    • Address associated with concrete type of PKPBase

    Returns Promise<string>

  • Logs the provided arguments to the console, but only if debugging is enabled.


    • This function does not return a value.


    • Rest ...args: any[]

      The values to be logged to the console.

    Returns void

  • Runs the specified Lit action with the given parameters.


    • A Promise that resolves with the signature returned by the Lit action.


    • Throws an error if pkpPubKey is not provided, if controllerAuthSig or controllerSessionSigs is not provided, if controllerSessionSigs is not an object, if executeJsArgs does not have either code or ipfsId, or if an error occurs during the execution of the Lit action.


    • toSign: Uint8Array

      The data to be signed by the Lit action.

    • sigName: string

      The name of the signature to be returned by the Lit action.

    Returns Promise<any>

  • Sets the Lit action to be executed by the LitNode client.


    • If both litActionCode and litActionIPFS are present, throws an Error. Otherwise, does not return a value.


    • prop: PKPBaseProp

      An object containing the parameters for the Lit action.

    Returns void

  • A function that sets the value of the litActionJsParams property to the given params object.


    Member Of


    Type Parameters

    • CustomType = T

      A generic type that extends T, where T is the type of the litActionJsParams property.


    • params: CustomType

      An object of type CustomType that contains the parameters to be set as litActionJsParams.

    Returns void

  • Logs an error message to the console and throws an Error with the same message.


    • This function does not return a value since it always throws an Error.


    • message: string

      The error message to be logged and thrown.

    Returns never

Generated using TypeDoc