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

Type Parameters

Properties

authContext?: AuthenticationProps
compressedPubKey: string
compressedPubKeyBuffer: Uint8Array
controllerAuthMethods?: AuthMethod[]
controllerSessionSigs?: SessionSigsMap
debug: boolean
litActionCode?: string
litActionIPFS?: string
litActionJsParams: T
litNodeClient: LitNodeClient
rpcs?: RPCUrls
uncompressedPubKey: string
uncompressedPubKeyBuffer: Uint8Array
useAction: boolean

Accessors

Methods

  • 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.

    Returns Promise<void>

    • A Promise that resolves when the LitNode client is ready for use.
  • Logs the provided arguments to the console, but only if debugging is enabled.

    Parameters

    • Rest...args: any[]

      The values to be logged to the console.

    Returns void

    • This function does not return a value.
  • Runs the specified Lit action with the given parameters.

    Parameters

    • 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>

    • 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.
  • Sign the provided data with the PKP private key.

    Parameters

    • toSign: Uint8Array

      The data to be signed.

    Returns Promise<SigResponse>

    • A Promise that resolves with the signature of the provided data.
    • Throws an error if pkpPubKey is not provided, if controllerAuthSig or controllerSessionSigs is not provided, if controllerSessionSigs is not an object, or if an error occurs during the signing process.