constructor
Usage
When initializing a new instance of LitSigner
you can choose to use an AuthMethod (LitAuthMethod)
or Session Signature (LitSessionSigsMap)
. If providing an LitAuthMethod
, the auth method will be authenticated, creating a Session Signature
.
A Session Signature
can be provided and will be used as the active session, and will be returned from Authenticate
and AuthDetails
.
ts
import { LitSigner, LitAuthMethod } from "@alchemy/aa-signers";
new LitSigner<LitAuthMethod>({
pkpPublicKey: "PKP_PUBLIC_KEY",
rpcUrl: "RPC_URL",
network: "cayenne",
debug: false,
});
or
ts
import { LitSigner, LitSessionSigsMap } from "@alchemy/aa-signers";
new LitSigner<LitSessionSigMap>({
pkpPublicKey: "PKP_PUBLIC_KEY",
rpcUrl: "RPC_URL",
network: "cayenne",
debug: false,
});
Returns
A new instance of LitSigner
Parameters
LitConfig
takes the following arguments:
pkpPublicKey: string
-- PKP public keyrpcUrl: string
-- RPC URL for the chain you wish to connect tonetwork: string
-- [optional] The desired Lit Protocol network to connect to. Defaults tocayenne
(pkps must be on the network specified)debug: boolean
-- [optional] Enable / disable debug logging. Defaults tofalse