Skip to main content

configuration/createSdk

Type Aliases

GenerateWalletChallengeRequest

GenerateWalletChallengeRequest: {additionalInformation: AdditionalCustomerInformationParams;address: BlockchainAddress;blockchainId: BlockchainId;externalCustomerId: ExternalCustomerId;namespace: BlockchainNamespace;origin: string;workflowId: WorkflowId; }

Wallet challenge parameters

Type declaration

additionalInformation?

optional additionalInformation: AdditionalCustomerInformationParams

Additional information to attach to the customer on login.

address

address: BlockchainAddress

The blockchain address to challenge

blockchainId?

optional blockchainId: BlockchainId

The blockchain id, mostly required, but some namespaces don't support it

externalCustomerId?

optional externalCustomerId: ExternalCustomerId

The external customer id of the user, if provided it's used to de-duplicate users

namespace

namespace: BlockchainNamespace

The blockchain namespace

origin

origin: string

The origin of the request

workflowId

workflowId: WorkflowId

The workflow id to bind the user session to


VerifyWalletChallengeRequest

VerifyWalletChallengeRequest: WalletSignatureResponse & {address: BlockchainAddress;blockchainId: BlockchainId;namespace: BlockchainNamespace; }

Type declaration

address

address: BlockchainAddress

blockchainId?

optional blockchainId: BlockchainId

namespace

namespace: BlockchainNamespace

Variables

GenerateWalletChallengeRequest

GenerateWalletChallengeRequest: ZodObject\<{additionalInformation: ZodOptional\<ZodType\<AdditionalCustomerInformationParams, ZodTypeDef, AdditionalCustomerInformationParams>>;address: BlockchainAddress;blockchainId: ZodOptional\<ZodUnion\<[ZodEffects\<ZodEnum\<[ETHEREUM, POLYGON, POLYGON_AMOY, AVALANCHE, AVALANCHE_FUJI, ARBITRUM, ARBITRUM_SEPOLIA]>, ETHEREUM | ARBITRUM | ARBITRUM_SEPOLIA | OPTIMISM | OPTIMISM_SEPOLIA | AVALANCHE | AVALANCHE_FUJI | POLYGON | POLYGON_AMOY | SEPOLIA | BASE | BASE_SEPOLIA | MOONBEAM | MOONRIVER | BNB | BNB_TESTNET | SWISSTRONIK_TESTNET, unknown>, ZodEffects\<ZodEnum\<[TEZOS, TEZOS_GHOSTNET]>, NEXERA_TEZOS_CHAINS, unknown>, ZodEffects\<ZodEnum\<[COSMOS, COSMOS_TESTNET]>, NEXERA_COSMOS_CHAINS, unknown>, ZodEffects\<ZodEnum\<["0x534e5f4d41494e", "0x534e5f5345504f4c4941"]>, "0x534e5f4d41494e" | "0x534e5f5345504f4c4941", unknown>]>>;externalCustomerId: ZodOptional\<ZodString>;namespace: BlockchainNamespace;origin: ZodString;workflowId: WorkflowId; }, "strip", ZodTypeAny, {additionalInformation: AdditionalCustomerInformationParams;address: BlockchainAddress;blockchainId: "0x534e5f4d41494e" | "0x534e5f5345504f4c4941" | ETHEREUM | ARBITRUM | ARBITRUM_SEPOLIA | OPTIMISM | OPTIMISM_SEPOLIA | AVALANCHE | AVALANCHE_FUJI | POLYGON | POLYGON_AMOY | SEPOLIA | BASE | BASE_SEPOLIA | MOONBEAM | MOONRIVER | BNB | BNB_TESTNET | SWISSTRONIK_TESTNET | TEZOS | TEZOS_GHOSTNET | COSMOS | COSMOS_TESTNET;externalCustomerId: string;namespace: BlockchainNamespace;origin: string;workflowId: WorkflowId; }, {additionalInformation: AdditionalCustomerInformationParams;address: BlockchainAddress;blockchainId: unknown;externalCustomerId: string;namespace: BlockchainNamespace;origin: string;workflowId: WorkflowId; }>

Type declaration

additionalInformation

additionalInformation: ZodOptional\<ZodType\<AdditionalCustomerInformationParams, ZodTypeDef, AdditionalCustomerInformationParams>>

address

address: ZodUnion\<[ZodEffects\<ZodEffects\<ZodString, string, string>, `0x${string}`, string>, ZodUnion\<[ZodEffects\<ZodString, `tz${string}`, string>, ZodEffects\<ZodString, `KT1${string}`, string>]>, ZodEffects\<ZodString, string, string>, ZodString]> = BlockchainAddress

blockchainId

blockchainId: ZodOptional\<ZodUnion\<[ZodEffects\<ZodEnum\<[ETHEREUM, POLYGON, POLYGON_AMOY, AVALANCHE, AVALANCHE_FUJI, ARBITRUM, ARBITRUM_SEPOLIA]>, ETHEREUM | ARBITRUM | ARBITRUM_SEPOLIA | OPTIMISM | OPTIMISM_SEPOLIA | AVALANCHE | AVALANCHE_FUJI | POLYGON | POLYGON_AMOY | SEPOLIA | BASE | BASE_SEPOLIA | MOONBEAM | MOONRIVER | BNB | BNB_TESTNET | SWISSTRONIK_TESTNET, unknown>, ZodEffects\<ZodEnum\<[TEZOS, TEZOS_GHOSTNET]>, NEXERA_TEZOS_CHAINS, unknown>, ZodEffects\<ZodEnum\<[COSMOS, COSMOS_TESTNET]>, NEXERA_COSMOS_CHAINS, unknown>, ZodEffects\<ZodEnum\<["0x534e5f4d41494e", "0x534e5f5345504f4c4941"]>, "0x534e5f4d41494e" | "0x534e5f5345504f4c4941", unknown>]>>

externalCustomerId

externalCustomerId: ZodOptional\<ZodString>

namespace

namespace: ZodEnum\<["tezos", "eip155", "aptos", "polkadot", "starknet", "cosmos", "solana", "cardano"]> = BlockchainNamespace

origin

origin: ZodString

workflowId

workflowId: ZodString = WorkflowId


VerifyWalletChallengeRequest

VerifyWalletChallengeRequest: ZodType\<VerifyWalletChallengeRequest, ZodTypeDef, VerifyWalletChallengeRequest>

Functions

createSdk()

createSdk(__namedParameters): {attachCustomerInformation: AttachCustomerInformationFn;createSession: CreateWeb2SessionFn;createWeb3Challenge: CreateWeb3ChallengeFn;getCustomerStatusByCustomerId: GetCustomerStatusByCustomerIdFn;getCustomerStatusByExternalCustomerId: GetCustomerStatusByExternalCustomerIdFn;getCustomerStatusByWallet: GetCustomerStatusByWalletFn;getCustomerWallets: GetCustomerWalletsFn;getTxAuthDataSignature: GetTxAuthDataSignatureFn;validateWebhookEvent: ValidateWebhookEventFn;verifyWeb3Challenge: VerifyWeb3ChallengeFn; }

Create an API client for the ComPilot API

Parameters

__namedParameters

__namedParameters.apiKey: string

__namedParameters.webhookSecret?: string

Returns

{attachCustomerInformation: AttachCustomerInformationFn;createSession: CreateWeb2SessionFn;createWeb3Challenge: CreateWeb3ChallengeFn;getCustomerStatusByCustomerId: GetCustomerStatusByCustomerIdFn;getCustomerStatusByExternalCustomerId: GetCustomerStatusByExternalCustomerIdFn;getCustomerStatusByWallet: GetCustomerStatusByWalletFn;getCustomerWallets: GetCustomerWalletsFn;getTxAuthDataSignature: GetTxAuthDataSignatureFn;validateWebhookEvent: ValidateWebhookEventFn;verifyWeb3Challenge: VerifyWeb3ChallengeFn; }

The API client

attachCustomerInformation

attachCustomerInformation: AttachCustomerInformationFn

createSession

createSession: CreateWeb2SessionFn

createWeb3Challenge

createWeb3Challenge: CreateWeb3ChallengeFn

getCustomerStatusByCustomerId

getCustomerStatusByCustomerId: GetCustomerStatusByCustomerIdFn

getCustomerStatusByExternalCustomerId

getCustomerStatusByExternalCustomerId: GetCustomerStatusByExternalCustomerIdFn

getCustomerStatusByWallet

getCustomerStatusByWallet: GetCustomerStatusByWalletFn

getCustomerWallets

getCustomerWallets: GetCustomerWalletsFn

getTxAuthDataSignature

getTxAuthDataSignature: GetTxAuthDataSignatureFn

validateWebhookEvent

validateWebhookEvent: ValidateWebhookEventFn

verifyWeb3Challenge

verifyWeb3Challenge: VerifyWeb3ChallengeFn