@crossmint/wallets-sdk 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -18
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.d.cts +3 -3
- package/dist/api/client.d.ts +3 -3
- package/dist/api/client.js +1 -1
- package/dist/api/gen/index.cjs +1 -1
- package/dist/api/gen/index.js +1 -1
- package/dist/api/gen/sdk.gen.cjs +1 -1
- package/dist/api/gen/sdk.gen.d.cts +1 -1
- package/dist/api/gen/sdk.gen.d.ts +1 -1
- package/dist/api/gen/sdk.gen.js +1 -1
- package/dist/api/gen/types.gen.d.cts +84 -37
- package/dist/api/gen/types.gen.d.ts +84 -37
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/types.d.cts +5 -3
- package/dist/api/types.d.ts +5 -3
- package/dist/chains/chains.cjs +1 -0
- package/dist/{evm/chains/index.d.cts → chains/chains.d.cts} +6 -6
- package/dist/{evm/chains/index.d.ts → chains/chains.d.ts} +6 -6
- package/dist/chains/chains.js +1 -0
- package/dist/chains/definitions/story.cjs +1 -0
- package/dist/chains/definitions/story.js +1 -0
- package/dist/chains/definitions/storyTestnet.cjs +1 -0
- package/dist/chains/definitions/storyTestnet.js +1 -0
- package/dist/chunk-2WI3SDNA.cjs +1 -0
- package/dist/chunk-3J7G6OXZ.cjs +1 -0
- package/dist/chunk-3V3TVDQL.cjs +1 -0
- package/dist/chunk-5HYE5LK5.cjs +1 -0
- package/dist/chunk-6BN4ICHP.cjs +1 -0
- package/dist/chunk-6EFZZZFC.js +1 -0
- package/dist/chunk-6VJEBYPN.cjs +1 -0
- package/dist/chunk-7DPGK746.cjs +1 -0
- package/dist/chunk-AN25LSQB.js +1 -0
- package/dist/chunk-BJDS5BJG.js +1 -0
- package/dist/chunk-BQJLKREV.cjs +1 -0
- package/dist/chunk-E5GSFWJV.js +1 -0
- package/dist/chunk-EBPF52SZ.cjs +1 -0
- package/dist/{chunk-MV7LJCAB.cjs → chunk-EHGCJCNZ.cjs} +1 -1
- package/dist/chunk-EOCGMBYW.js +1 -0
- package/dist/chunk-FHE35PRI.js +1 -0
- package/dist/chunk-FI42UB34.js +1 -0
- package/dist/chunk-FO5JCAOP.js +1 -0
- package/dist/chunk-ICJBF526.cjs +1 -0
- package/dist/chunk-ICWGBL27.js +1 -0
- package/dist/chunk-IVDTXN3O.js +1 -0
- package/dist/chunk-LBJIX2VH.cjs +1 -0
- package/dist/chunk-LG7WZW3Q.js +1 -0
- package/dist/chunk-M4ELAV7U.js +1 -0
- package/dist/chunk-N3Q3MSAS.cjs +1 -0
- package/dist/chunk-NFQHDB4C.cjs +1 -0
- package/dist/chunk-NSZEPQXP.cjs +1 -0
- package/dist/chunk-O4X74PTP.cjs +1 -0
- package/dist/chunk-Q3ZJOXAP.js +1 -0
- package/dist/chunk-Q4WJ7QNP.js +1 -0
- package/dist/chunk-QIHAACUW.js +1 -0
- package/dist/chunk-QPG5RPLB.js +1 -0
- package/dist/chunk-RCGA5LLF.cjs +1 -0
- package/dist/{chunk-3J4NDFR5.js → chunk-SCSTKTGR.js} +1 -1
- package/dist/chunk-VNNOPP7M.cjs +1 -0
- package/dist/chunk-WO3S2YII.js +1 -0
- package/dist/chunk-YE5N5ADW.js +1 -0
- package/dist/chunk-ZSWIQU3U.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +16 -12
- package/dist/index.d.ts +16 -12
- package/dist/index.js +1 -1
- package/dist/sdk.cjs +1 -1
- package/dist/sdk.d.cts +21 -21
- package/dist/sdk.d.ts +21 -21
- package/dist/sdk.js +1 -1
- package/dist/signers/email-iframe-manager.cjs +1 -0
- package/dist/signers/email-iframe-manager.d.cts +15 -0
- package/dist/signers/email-iframe-manager.d.ts +15 -0
- package/dist/signers/email-iframe-manager.js +1 -0
- package/dist/signers/email-signer-api-client.cjs +1 -0
- package/dist/signers/email-signer-api-client.d.cts +13 -0
- package/dist/signers/email-signer-api-client.d.ts +13 -0
- package/dist/signers/email-signer-api-client.js +1 -0
- package/dist/signers/email.cjs +1 -0
- package/dist/signers/email.d.cts +29 -0
- package/dist/signers/email.d.ts +29 -0
- package/dist/signers/email.js +1 -0
- package/dist/signers/evm-api-key.cjs +1 -0
- package/dist/signers/evm-api-key.d.cts +19 -0
- package/dist/signers/evm-api-key.d.ts +19 -0
- package/dist/signers/evm-api-key.js +1 -0
- package/dist/signers/evm-external-wallet.cjs +1 -0
- package/dist/signers/evm-external-wallet.d.cts +25 -0
- package/dist/signers/evm-external-wallet.d.ts +25 -0
- package/dist/signers/evm-external-wallet.js +1 -0
- package/dist/signers/index.cjs +1 -0
- package/dist/signers/index.d.cts +12 -0
- package/dist/signers/index.d.ts +12 -0
- package/dist/signers/index.js +1 -0
- package/dist/signers/passkey.cjs +1 -0
- package/dist/signers/passkey.d.cts +20 -0
- package/dist/signers/passkey.d.ts +20 -0
- package/dist/signers/passkey.js +1 -0
- package/dist/signers/solana-api-key.cjs +1 -0
- package/dist/signers/solana-api-key.d.cts +19 -0
- package/dist/signers/solana-api-key.d.ts +19 -0
- package/dist/signers/solana-api-key.js +1 -0
- package/dist/{solana/utils.cjs → signers/solana-external-wallet.cjs} +1 -1
- package/dist/signers/solana-external-wallet.d.cts +22 -0
- package/dist/signers/solana-external-wallet.d.ts +22 -0
- package/dist/signers/solana-external-wallet.js +1 -0
- package/dist/signers/types.cjs +1 -0
- package/dist/signers/types.d.cts +91 -0
- package/dist/signers/types.d.ts +91 -0
- package/dist/signers/types.js +1 -0
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.d.cts +2 -3
- package/dist/utils/constants.d.ts +2 -3
- package/dist/utils/constants.js +1 -1
- package/dist/wallets/evm.cjs +1 -0
- package/dist/wallets/evm.d.cts +134 -0
- package/dist/wallets/evm.d.ts +134 -0
- package/dist/wallets/evm.js +1 -0
- package/dist/wallets/solana.cjs +1 -0
- package/dist/wallets/solana.d.cts +21 -0
- package/dist/wallets/solana.d.ts +21 -0
- package/dist/wallets/solana.js +1 -0
- package/dist/wallets/types.cjs +1 -0
- package/dist/wallets/types.d.cts +30 -0
- package/dist/wallets/types.d.ts +30 -0
- package/dist/wallets/types.js +1 -0
- package/dist/wallets/wallet-factory.cjs +1 -0
- package/dist/wallets/wallet-factory.d.cts +32 -0
- package/dist/wallets/wallet-factory.d.ts +32 -0
- package/dist/wallets/wallet-factory.js +1 -0
- package/dist/wallets/wallet.cjs +1 -0
- package/dist/wallets/wallet.d.cts +98 -0
- package/dist/wallets/wallet.d.ts +98 -0
- package/dist/wallets/wallet.js +1 -0
- package/package.json +6 -4
- package/dist/chunk-3YDBLQ73.cjs +0 -1
- package/dist/chunk-53ZDAWYY.js +0 -1
- package/dist/chunk-5CX3CGJS.cjs +0 -1
- package/dist/chunk-6ARPMYUZ.js +0 -1
- package/dist/chunk-6DTBGTSS.cjs +0 -1
- package/dist/chunk-6W35AARC.js +0 -1
- package/dist/chunk-6XOH62PV.cjs +0 -1
- package/dist/chunk-7WRWCJJ6.js +0 -1
- package/dist/chunk-DANM4IBF.cjs +0 -1
- package/dist/chunk-DLYUSTHS.js +0 -1
- package/dist/chunk-DNWDTJR6.cjs +0 -1
- package/dist/chunk-EFRCLQXM.js +0 -1
- package/dist/chunk-ER6A2LAJ.cjs +0 -1
- package/dist/chunk-EZ7PEO5P.cjs +0 -1
- package/dist/chunk-F7GTDFYC.cjs +0 -1
- package/dist/chunk-HKY6CBZC.js +0 -1
- package/dist/chunk-LWGUOI5G.js +0 -1
- package/dist/chunk-LX6WD7J6.js +0 -1
- package/dist/chunk-MCMCLRNB.js +0 -1
- package/dist/chunk-MTWDHWDY.js +0 -1
- package/dist/chunk-OKXV3IAA.js +0 -1
- package/dist/chunk-PBD5HUCH.cjs +0 -1
- package/dist/chunk-PQH5C2OM.cjs +0 -1
- package/dist/chunk-QYX3J3RZ.js +0 -1
- package/dist/chunk-SDH5CVH7.js +0 -0
- package/dist/chunk-TCIZIST7.js +0 -1
- package/dist/chunk-UWWXOC7Y.cjs +0 -1
- package/dist/chunk-V445PZHL.cjs +0 -1
- package/dist/chunk-VDYYOSPR.cjs +0 -1
- package/dist/chunk-VEJMHFK7.cjs +0 -1
- package/dist/chunk-WNXCWDJQ.cjs +0 -1
- package/dist/chunk-WZAT3LML.js +0 -0
- package/dist/chunk-XKXW2FNY.cjs +0 -1
- package/dist/chunk-XP4DDN2K.cjs +0 -1
- package/dist/chunk-YLMKJ56K.js +0 -1
- package/dist/chunk-ZXV5SOXM.js +0 -1
- package/dist/evm/abi/entryPoint.cjs +0 -1
- package/dist/evm/abi/entryPoint.d.cts +0 -777
- package/dist/evm/abi/entryPoint.d.ts +0 -777
- package/dist/evm/abi/entryPoint.js +0 -1
- package/dist/evm/chains/definitions/story.cjs +0 -1
- package/dist/evm/chains/definitions/story.js +0 -1
- package/dist/evm/chains/definitions/storyTestnet.cjs +0 -1
- package/dist/evm/chains/definitions/storyTestnet.js +0 -1
- package/dist/evm/chains/index.cjs +0 -1
- package/dist/evm/chains/index.js +0 -1
- package/dist/evm/index.cjs +0 -1
- package/dist/evm/index.d.cts +0 -16
- package/dist/evm/index.d.ts +0 -16
- package/dist/evm/index.js +0 -1
- package/dist/evm/services/delegated-signers-service.cjs +0 -1
- package/dist/evm/services/delegated-signers-service.d.cts +0 -154
- package/dist/evm/services/delegated-signers-service.d.ts +0 -154
- package/dist/evm/services/delegated-signers-service.js +0 -1
- package/dist/evm/types/signers.cjs +0 -1
- package/dist/evm/types/signers.d.cts +0 -40
- package/dist/evm/types/signers.d.ts +0 -40
- package/dist/evm/types/signers.js +0 -0
- package/dist/evm/types/wallet.cjs +0 -1
- package/dist/evm/types/wallet.d.cts +0 -48
- package/dist/evm/types/wallet.d.ts +0 -48
- package/dist/evm/types/wallet.js +0 -0
- package/dist/evm/utils.cjs +0 -1
- package/dist/evm/utils.d.cts +0 -20
- package/dist/evm/utils.d.ts +0 -20
- package/dist/evm/utils.js +0 -1
- package/dist/evm/wallet.cjs +0 -1
- package/dist/evm/wallet.d.cts +0 -16
- package/dist/evm/wallet.d.ts +0 -16
- package/dist/evm/wallet.js +0 -1
- package/dist/options-DQUNKXxn.d.ts +0 -109
- package/dist/options-IchphkHW.d.cts +0 -109
- package/dist/services/types.cjs +0 -1
- package/dist/services/types.d.cts +0 -35
- package/dist/services/types.d.ts +0 -35
- package/dist/services/types.js +0 -0
- package/dist/services/wallet-factory.cjs +0 -1
- package/dist/services/wallet-factory.d.cts +0 -37
- package/dist/services/wallet-factory.d.ts +0 -37
- package/dist/services/wallet-factory.js +0 -1
- package/dist/solana/index.cjs +0 -1
- package/dist/solana/index.d.cts +0 -13
- package/dist/solana/index.d.ts +0 -13
- package/dist/solana/index.js +0 -1
- package/dist/solana/services/approvals-service.cjs +0 -1
- package/dist/solana/services/approvals-service.d.cts +0 -18
- package/dist/solana/services/approvals-service.d.ts +0 -18
- package/dist/solana/services/approvals-service.js +0 -1
- package/dist/solana/services/delegated-signers-service.cjs +0 -1
- package/dist/solana/services/delegated-signers-service.d.cts +0 -13
- package/dist/solana/services/delegated-signers-service.d.ts +0 -13
- package/dist/solana/services/delegated-signers-service.js +0 -1
- package/dist/solana/services/transactions-service.cjs +0 -1
- package/dist/solana/services/transactions-service.d.cts +0 -13
- package/dist/solana/services/transactions-service.d.ts +0 -13
- package/dist/solana/services/transactions-service.js +0 -1
- package/dist/solana/tokens.cjs +0 -1
- package/dist/solana/tokens.d.cts +0 -3
- package/dist/solana/tokens.d.ts +0 -3
- package/dist/solana/tokens.js +0 -1
- package/dist/solana/types/signers.cjs +0 -1
- package/dist/solana/types/signers.d.cts +0 -38
- package/dist/solana/types/signers.d.ts +0 -38
- package/dist/solana/types/signers.js +0 -1
- package/dist/solana/types/wallet.cjs +0 -1
- package/dist/solana/types/wallet.d.cts +0 -62
- package/dist/solana/types/wallet.d.ts +0 -62
- package/dist/solana/types/wallet.js +0 -0
- package/dist/solana/utils.d.cts +0 -6
- package/dist/solana/utils.d.ts +0 -6
- package/dist/solana/utils.js +0 -1
- package/dist/solana/wallet.cjs +0 -1
- package/dist/solana/wallet.d.cts +0 -13
- package/dist/solana/wallet.d.ts +0 -13
- package/dist/solana/wallet.js +0 -1
- package/dist/utils/index.cjs +0 -1
- package/dist/utils/index.d.cts +0 -3
- package/dist/utils/index.d.ts +0 -3
- package/dist/utils/index.js +0 -1
- package/dist/utils/options.cjs +0 -1
- package/dist/utils/options.d.cts +0 -13
- package/dist/utils/options.d.ts +0 -13
- package/dist/utils/options.js +0 -0
- /package/dist/{evm/chains → chains}/definitions/story.d.cts +0 -0
- /package/dist/{evm/chains → chains}/definitions/story.d.ts +0 -0
- /package/dist/{evm/chains → chains}/definitions/storyTestnet.d.cts +0 -0
- /package/dist/{evm/chains → chains}/definitions/storyTestnet.d.ts +0 -0
- /package/dist/{chunk-F2XDGZCB.cjs → chunk-GEY574TH.cjs} +0 -0
- /package/dist/{chunk-MFUN74KH.cjs → chunk-IR5WN6FQ.cjs} +0 -0
- /package/dist/{chunk-KVFFSUF4.js → chunk-KKQBZXFE.js} +0 -0
- /package/dist/{chunk-3TTYXSH3.cjs → chunk-MHKWLGN5.cjs} +0 -0
- /package/dist/{chunk-ITCP6W2T.js → chunk-PJUVPRKB.js} +0 -0
- /package/dist/{chunk-SILEK5O4.js → chunk-S3DYQVRD.js} +0 -0
package/dist/sdk.d.ts
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
2
2
|
export { Crossmint, createCrossmint } from '@crossmint/common-sdk-base';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import './
|
|
6
|
-
import '
|
|
7
|
-
import 'viem';
|
|
8
|
-
import './evm/types/wallet.js';
|
|
3
|
+
import { WalletArgsFor } from './wallets/wallet-factory.js';
|
|
4
|
+
import { Wallet } from './wallets/wallet.js';
|
|
5
|
+
import { Chain } from './chains/chains.js';
|
|
6
|
+
import './api/client.js';
|
|
9
7
|
import './api/types.js';
|
|
8
|
+
import 'viem';
|
|
10
9
|
import './api/gen/types.gen.js';
|
|
11
|
-
import './
|
|
12
|
-
import '
|
|
10
|
+
import './signers/types.js';
|
|
11
|
+
import 'ox';
|
|
13
12
|
import '@solana/web3.js';
|
|
14
|
-
import '
|
|
15
|
-
import '
|
|
16
|
-
import './
|
|
17
|
-
import './solana/services/approvals-service.js';
|
|
13
|
+
import '@crossmint/client-sdk-window';
|
|
14
|
+
import '@crossmint/client-signers';
|
|
15
|
+
import './wallets/types.js';
|
|
18
16
|
|
|
19
|
-
type WalletType = keyof WalletTypeToArgs;
|
|
20
17
|
declare class CrossmintWallets {
|
|
21
18
|
private readonly walletFactory;
|
|
22
19
|
private constructor();
|
|
@@ -27,22 +24,25 @@ declare class CrossmintWallets {
|
|
|
27
24
|
*/
|
|
28
25
|
static from(crossmint: Crossmint): CrossmintWallets;
|
|
29
26
|
/**
|
|
30
|
-
* Get or create a wallet
|
|
31
|
-
* @param type - Wallet type
|
|
27
|
+
* Get or create a wallet, can only be called on the client side
|
|
32
28
|
* @param args - Wallet data
|
|
33
29
|
* @param options - Wallet options
|
|
34
30
|
* @returns A new wallet
|
|
35
31
|
*/
|
|
36
|
-
getOrCreateWallet<
|
|
32
|
+
getOrCreateWallet<C extends Chain>(options: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
37
33
|
/**
|
|
38
|
-
* Get an existing wallet by
|
|
39
|
-
* @param
|
|
40
|
-
* @param type - Wallet type
|
|
41
|
-
* @param args - Wallet data
|
|
34
|
+
* Get an existing wallet by its locator, can only be called on the server side
|
|
35
|
+
* @param walletLocator - Wallet locator
|
|
42
36
|
* @param options - Wallet options
|
|
43
37
|
* @returns A wallet
|
|
44
38
|
*/
|
|
45
|
-
getWallet<
|
|
39
|
+
getWallet<C extends Chain>(walletLocator: string, options: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
40
|
+
/**
|
|
41
|
+
* Create a new wallet, can only be called on the server side
|
|
42
|
+
* @param options - Wallet options
|
|
43
|
+
* @returns A new wallet
|
|
44
|
+
*/
|
|
45
|
+
createWallet<C extends Chain>(options: WalletArgsFor<C>): Promise<Wallet<C>>;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export { CrossmintWallets };
|
package/dist/sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-QIHAACUW.js";import"./chunk-FHE35PRI.js";import"./chunk-IVDTXN3O.js";import"./chunk-QPG5RPLB.js";import"./chunk-LG7WZW3Q.js";import"./chunk-FI42UB34.js";import"./chunk-ICWGBL27.js";import"./chunk-YE5N5ADW.js";import"./chunk-FO5JCAOP.js";import"./chunk-AN25LSQB.js";import"./chunk-M4ELAV7U.js";import"./chunk-5IFDVB4Y.js";import"./chunk-6EFZZZFC.js";import"./chunk-KBJA7JDT.js";import"./chunk-Q4WJ7QNP.js";import"./chunk-Q3ZJOXAP.js";import"./chunk-EOCGMBYW.js";import"./chunk-7ENJXL4H.js";import"./chunk-22GIA4MK.js";export{b as CrossmintWallets,a as createCrossmint};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkO4X74PTPcjs = require('../chunk-O4X74PTP.cjs');require('../chunk-CK4JCQY6.cjs');exports.EmailIframeManager = _chunkO4X74PTPcjs.a;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HandshakeParent } from '@crossmint/client-sdk-window';
|
|
2
|
+
import { signerOutboundEvents, signerInboundEvents } from '@crossmint/client-signers';
|
|
3
|
+
|
|
4
|
+
type IframeConfig = {
|
|
5
|
+
environment: string;
|
|
6
|
+
};
|
|
7
|
+
declare class EmailIframeManager {
|
|
8
|
+
private config;
|
|
9
|
+
private handshakeParent;
|
|
10
|
+
constructor(config: IframeConfig);
|
|
11
|
+
initialize(): Promise<HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>>;
|
|
12
|
+
private createInvisibleIFrame;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { EmailIframeManager, type IframeConfig };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HandshakeParent } from '@crossmint/client-sdk-window';
|
|
2
|
+
import { signerOutboundEvents, signerInboundEvents } from '@crossmint/client-signers';
|
|
3
|
+
|
|
4
|
+
type IframeConfig = {
|
|
5
|
+
environment: string;
|
|
6
|
+
};
|
|
7
|
+
declare class EmailIframeManager {
|
|
8
|
+
private config;
|
|
9
|
+
private handshakeParent;
|
|
10
|
+
constructor(config: IframeConfig);
|
|
11
|
+
initialize(): Promise<HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>>;
|
|
12
|
+
private createInvisibleIFrame;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { EmailIframeManager, type IframeConfig };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-Q4WJ7QNP.js";import"../chunk-22GIA4MK.js";export{a as EmailIframeManager};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLBJIX2VHcjs = require('../chunk-LBJIX2VH.cjs');require('../chunk-NFQHDB4C.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-CK4JCQY6.cjs');exports.EmailSignerApiClient = _chunkLBJIX2VHcjs.a;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as _crossmint_common_sdk_base from '@crossmint/common-sdk-base';
|
|
2
|
+
import { CrossmintApiClient, Crossmint } from '@crossmint/common-sdk-base';
|
|
3
|
+
|
|
4
|
+
declare class EmailSignerApiClient extends CrossmintApiClient {
|
|
5
|
+
private apiPrefix;
|
|
6
|
+
constructor(crossmint: Crossmint);
|
|
7
|
+
pregenerateSigner(email: string): Promise<any>;
|
|
8
|
+
get isServerSide(): boolean;
|
|
9
|
+
get environment(): _crossmint_common_sdk_base.APIKeyEnvironmentPrefix;
|
|
10
|
+
private get headers();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { EmailSignerApiClient };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as _crossmint_common_sdk_base from '@crossmint/common-sdk-base';
|
|
2
|
+
import { CrossmintApiClient, Crossmint } from '@crossmint/common-sdk-base';
|
|
3
|
+
|
|
4
|
+
declare class EmailSignerApiClient extends CrossmintApiClient {
|
|
5
|
+
private apiPrefix;
|
|
6
|
+
constructor(crossmint: Crossmint);
|
|
7
|
+
pregenerateSigner(email: string): Promise<any>;
|
|
8
|
+
get isServerSide(): boolean;
|
|
9
|
+
get environment(): _crossmint_common_sdk_base.APIKeyEnvironmentPrefix;
|
|
10
|
+
private get headers();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { EmailSignerApiClient };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-Q3ZJOXAP.js";import"../chunk-EOCGMBYW.js";import"../chunk-7ENJXL4H.js";import"../chunk-22GIA4MK.js";export{a as EmailSignerApiClient};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkICJBF526cjs = require('../chunk-ICJBF526.cjs');require('../chunk-ZSWIQU3U.cjs');require('../chunk-O4X74PTP.cjs');require('../chunk-LBJIX2VH.cjs');require('../chunk-NFQHDB4C.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-CK4JCQY6.cjs');exports.EmailSigner = _chunkICJBF526cjs.a;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Signer, EmailInternalSignerConfig } from './types.cjs';
|
|
2
|
+
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
3
|
+
import 'ox';
|
|
4
|
+
import '@solana/web3.js';
|
|
5
|
+
import 'viem';
|
|
6
|
+
import '@crossmint/client-sdk-window';
|
|
7
|
+
import '@crossmint/client-signers';
|
|
8
|
+
import '../chains/chains.cjs';
|
|
9
|
+
|
|
10
|
+
declare class EmailSigner implements Signer {
|
|
11
|
+
private config;
|
|
12
|
+
type: "email";
|
|
13
|
+
private _needsAuth;
|
|
14
|
+
private _authPromise;
|
|
15
|
+
constructor(config: EmailInternalSignerConfig);
|
|
16
|
+
locator(): string;
|
|
17
|
+
private initialize;
|
|
18
|
+
signMessage(): Promise<never>;
|
|
19
|
+
signTransaction(transaction: string): Promise<{
|
|
20
|
+
signature: string;
|
|
21
|
+
}>;
|
|
22
|
+
private handleAuthRequired;
|
|
23
|
+
private createAuthPromise;
|
|
24
|
+
private sendEmailWithOtp;
|
|
25
|
+
private verifyOtp;
|
|
26
|
+
static pregenerateSigner(email: string, crossmint: Crossmint): Promise<string>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { EmailSigner };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Signer, EmailInternalSignerConfig } from './types.js';
|
|
2
|
+
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
3
|
+
import 'ox';
|
|
4
|
+
import '@solana/web3.js';
|
|
5
|
+
import 'viem';
|
|
6
|
+
import '@crossmint/client-sdk-window';
|
|
7
|
+
import '@crossmint/client-signers';
|
|
8
|
+
import '../chains/chains.js';
|
|
9
|
+
|
|
10
|
+
declare class EmailSigner implements Signer {
|
|
11
|
+
private config;
|
|
12
|
+
type: "email";
|
|
13
|
+
private _needsAuth;
|
|
14
|
+
private _authPromise;
|
|
15
|
+
constructor(config: EmailInternalSignerConfig);
|
|
16
|
+
locator(): string;
|
|
17
|
+
private initialize;
|
|
18
|
+
signMessage(): Promise<never>;
|
|
19
|
+
signTransaction(transaction: string): Promise<{
|
|
20
|
+
signature: string;
|
|
21
|
+
}>;
|
|
22
|
+
private handleAuthRequired;
|
|
23
|
+
private createAuthPromise;
|
|
24
|
+
private sendEmailWithOtp;
|
|
25
|
+
private verifyOtp;
|
|
26
|
+
static pregenerateSigner(email: string, crossmint: Crossmint): Promise<string>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { EmailSigner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-LG7WZW3Q.js";import"../chunk-M4ELAV7U.js";import"../chunk-Q4WJ7QNP.js";import"../chunk-Q3ZJOXAP.js";import"../chunk-EOCGMBYW.js";import"../chunk-7ENJXL4H.js";import"../chunk-22GIA4MK.js";export{a as EmailSigner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBQJLKREVcjs = require('../chunk-BQJLKREV.cjs');require('../chunk-CK4JCQY6.cjs');exports.EVMApiKeySigner = _chunkBQJLKREVcjs.a;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Signer, ApiKeyInternalSignerConfig } from './types.cjs';
|
|
2
|
+
import 'ox';
|
|
3
|
+
import '@solana/web3.js';
|
|
4
|
+
import 'viem';
|
|
5
|
+
import '@crossmint/client-sdk-window';
|
|
6
|
+
import '@crossmint/client-signers';
|
|
7
|
+
import '@crossmint/common-sdk-base';
|
|
8
|
+
import '../chains/chains.cjs';
|
|
9
|
+
|
|
10
|
+
declare class EVMApiKeySigner implements Signer {
|
|
11
|
+
private readonly config;
|
|
12
|
+
type: "api-key";
|
|
13
|
+
constructor(config: ApiKeyInternalSignerConfig);
|
|
14
|
+
locator(): string;
|
|
15
|
+
signMessage(): Promise<never>;
|
|
16
|
+
signTransaction(): Promise<never>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { EVMApiKeySigner };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Signer, ApiKeyInternalSignerConfig } from './types.js';
|
|
2
|
+
import 'ox';
|
|
3
|
+
import '@solana/web3.js';
|
|
4
|
+
import 'viem';
|
|
5
|
+
import '@crossmint/client-sdk-window';
|
|
6
|
+
import '@crossmint/client-signers';
|
|
7
|
+
import '@crossmint/common-sdk-base';
|
|
8
|
+
import '../chains/chains.js';
|
|
9
|
+
|
|
10
|
+
declare class EVMApiKeySigner implements Signer {
|
|
11
|
+
private readonly config;
|
|
12
|
+
type: "api-key";
|
|
13
|
+
constructor(config: ApiKeyInternalSignerConfig);
|
|
14
|
+
locator(): string;
|
|
15
|
+
signMessage(): Promise<never>;
|
|
16
|
+
signTransaction(): Promise<never>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { EVMApiKeySigner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-FI42UB34.js";import"../chunk-22GIA4MK.js";export{a as EVMApiKeySigner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNSZEPQXPcjs = require('../chunk-NSZEPQXP.cjs');require('../chunk-CK4JCQY6.cjs');exports.EVMExternalWalletSigner = _chunkNSZEPQXPcjs.a;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EIP1193Provider, Account } from 'viem';
|
|
2
|
+
import { Signer, GenericEIP1193Provider, EvmExternalWalletSignerConfig } from './types.cjs';
|
|
3
|
+
import 'ox';
|
|
4
|
+
import '@solana/web3.js';
|
|
5
|
+
import '@crossmint/client-sdk-window';
|
|
6
|
+
import '@crossmint/client-signers';
|
|
7
|
+
import '@crossmint/common-sdk-base';
|
|
8
|
+
import '../chains/chains.cjs';
|
|
9
|
+
|
|
10
|
+
declare class EVMExternalWalletSigner implements Signer {
|
|
11
|
+
type: "external-wallet";
|
|
12
|
+
address: string;
|
|
13
|
+
provider?: GenericEIP1193Provider | EIP1193Provider;
|
|
14
|
+
viemAccount?: Account;
|
|
15
|
+
constructor(config: EvmExternalWalletSignerConfig);
|
|
16
|
+
locator(): string;
|
|
17
|
+
signMessage(message: string): Promise<{
|
|
18
|
+
signature: any;
|
|
19
|
+
}>;
|
|
20
|
+
signTransaction(transaction: string): Promise<{
|
|
21
|
+
signature: any;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { EVMExternalWalletSigner };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EIP1193Provider, Account } from 'viem';
|
|
2
|
+
import { Signer, GenericEIP1193Provider, EvmExternalWalletSignerConfig } from './types.js';
|
|
3
|
+
import 'ox';
|
|
4
|
+
import '@solana/web3.js';
|
|
5
|
+
import '@crossmint/client-sdk-window';
|
|
6
|
+
import '@crossmint/client-signers';
|
|
7
|
+
import '@crossmint/common-sdk-base';
|
|
8
|
+
import '../chains/chains.js';
|
|
9
|
+
|
|
10
|
+
declare class EVMExternalWalletSigner implements Signer {
|
|
11
|
+
type: "external-wallet";
|
|
12
|
+
address: string;
|
|
13
|
+
provider?: GenericEIP1193Provider | EIP1193Provider;
|
|
14
|
+
viemAccount?: Account;
|
|
15
|
+
constructor(config: EvmExternalWalletSignerConfig);
|
|
16
|
+
locator(): string;
|
|
17
|
+
signMessage(message: string): Promise<{
|
|
18
|
+
signature: any;
|
|
19
|
+
}>;
|
|
20
|
+
signTransaction(transaction: string): Promise<{
|
|
21
|
+
signature: any;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { EVMExternalWalletSigner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-ICWGBL27.js";import"../chunk-22GIA4MK.js";export{a as EVMExternalWalletSigner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVNNOPP7Mcjs = require('../chunk-VNNOPP7M.cjs');require('../chunk-ICJBF526.cjs');require('../chunk-BQJLKREV.cjs');require('../chunk-NSZEPQXP.cjs');require('../chunk-7DPGK746.cjs');require('../chunk-RCGA5LLF.cjs');require('../chunk-5HYE5LK5.cjs');require('../chunk-ZSWIQU3U.cjs');require('../chunk-O4X74PTP.cjs');require('../chunk-LBJIX2VH.cjs');require('../chunk-NFQHDB4C.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-CK4JCQY6.cjs');exports.assembleSigner = _chunkVNNOPP7Mcjs.a;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Chain } from '../chains/chains.cjs';
|
|
2
|
+
import { InternalSignerConfig, Signer } from './types.cjs';
|
|
3
|
+
import 'viem';
|
|
4
|
+
import 'ox';
|
|
5
|
+
import '@solana/web3.js';
|
|
6
|
+
import '@crossmint/client-sdk-window';
|
|
7
|
+
import '@crossmint/client-signers';
|
|
8
|
+
import '@crossmint/common-sdk-base';
|
|
9
|
+
|
|
10
|
+
declare function assembleSigner<C extends Chain>(chain: C, config: InternalSignerConfig<C>): Signer;
|
|
11
|
+
|
|
12
|
+
export { assembleSigner };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Chain } from '../chains/chains.js';
|
|
2
|
+
import { InternalSignerConfig, Signer } from './types.js';
|
|
3
|
+
import 'viem';
|
|
4
|
+
import 'ox';
|
|
5
|
+
import '@solana/web3.js';
|
|
6
|
+
import '@crossmint/client-sdk-window';
|
|
7
|
+
import '@crossmint/client-signers';
|
|
8
|
+
import '@crossmint/common-sdk-base';
|
|
9
|
+
|
|
10
|
+
declare function assembleSigner<C extends Chain>(chain: C, config: InternalSignerConfig<C>): Signer;
|
|
11
|
+
|
|
12
|
+
export { assembleSigner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-QPG5RPLB.js";import"../chunk-LG7WZW3Q.js";import"../chunk-FI42UB34.js";import"../chunk-ICWGBL27.js";import"../chunk-YE5N5ADW.js";import"../chunk-FO5JCAOP.js";import"../chunk-AN25LSQB.js";import"../chunk-M4ELAV7U.js";import"../chunk-Q4WJ7QNP.js";import"../chunk-Q3ZJOXAP.js";import"../chunk-EOCGMBYW.js";import"../chunk-7ENJXL4H.js";import"../chunk-22GIA4MK.js";export{a as assembleSigner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7DPGK746cjs = require('../chunk-7DPGK746.cjs');require('../chunk-CK4JCQY6.cjs');exports.PasskeySigner = _chunk7DPGK746cjs.a;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Signer, PasskeyInternalSignerConfig, PasskeySignResult } from './types.cjs';
|
|
2
|
+
import 'ox';
|
|
3
|
+
import '@solana/web3.js';
|
|
4
|
+
import 'viem';
|
|
5
|
+
import '@crossmint/client-sdk-window';
|
|
6
|
+
import '@crossmint/client-signers';
|
|
7
|
+
import '@crossmint/common-sdk-base';
|
|
8
|
+
import '../chains/chains.cjs';
|
|
9
|
+
|
|
10
|
+
declare class PasskeySigner implements Signer {
|
|
11
|
+
private config;
|
|
12
|
+
type: "passkey";
|
|
13
|
+
id: string;
|
|
14
|
+
constructor(config: PasskeyInternalSignerConfig);
|
|
15
|
+
locator(): string;
|
|
16
|
+
signMessage(message: string): Promise<PasskeySignResult>;
|
|
17
|
+
signTransaction(transaction: string): Promise<PasskeySignResult>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { PasskeySigner };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Signer, PasskeyInternalSignerConfig, PasskeySignResult } from './types.js';
|
|
2
|
+
import 'ox';
|
|
3
|
+
import '@solana/web3.js';
|
|
4
|
+
import 'viem';
|
|
5
|
+
import '@crossmint/client-sdk-window';
|
|
6
|
+
import '@crossmint/client-signers';
|
|
7
|
+
import '@crossmint/common-sdk-base';
|
|
8
|
+
import '../chains/chains.js';
|
|
9
|
+
|
|
10
|
+
declare class PasskeySigner implements Signer {
|
|
11
|
+
private config;
|
|
12
|
+
type: "passkey";
|
|
13
|
+
id: string;
|
|
14
|
+
constructor(config: PasskeyInternalSignerConfig);
|
|
15
|
+
locator(): string;
|
|
16
|
+
signMessage(message: string): Promise<PasskeySignResult>;
|
|
17
|
+
signTransaction(transaction: string): Promise<PasskeySignResult>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { PasskeySigner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-YE5N5ADW.js";import"../chunk-22GIA4MK.js";export{a as PasskeySigner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRCGA5LLFcjs = require('../chunk-RCGA5LLF.cjs');require('../chunk-CK4JCQY6.cjs');exports.SolanaApiKeySigner = _chunkRCGA5LLFcjs.a;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Signer, ApiKeyInternalSignerConfig } from './types.cjs';
|
|
2
|
+
import 'ox';
|
|
3
|
+
import '@solana/web3.js';
|
|
4
|
+
import 'viem';
|
|
5
|
+
import '@crossmint/client-sdk-window';
|
|
6
|
+
import '@crossmint/client-signers';
|
|
7
|
+
import '@crossmint/common-sdk-base';
|
|
8
|
+
import '../chains/chains.cjs';
|
|
9
|
+
|
|
10
|
+
declare class SolanaApiKeySigner implements Signer {
|
|
11
|
+
private readonly config;
|
|
12
|
+
type: "api-key";
|
|
13
|
+
constructor(config: ApiKeyInternalSignerConfig);
|
|
14
|
+
locator(): string;
|
|
15
|
+
signMessage(): Promise<never>;
|
|
16
|
+
signTransaction(): Promise<never>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { SolanaApiKeySigner };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Signer, ApiKeyInternalSignerConfig } from './types.js';
|
|
2
|
+
import 'ox';
|
|
3
|
+
import '@solana/web3.js';
|
|
4
|
+
import 'viem';
|
|
5
|
+
import '@crossmint/client-sdk-window';
|
|
6
|
+
import '@crossmint/client-signers';
|
|
7
|
+
import '@crossmint/common-sdk-base';
|
|
8
|
+
import '../chains/chains.js';
|
|
9
|
+
|
|
10
|
+
declare class SolanaApiKeySigner implements Signer {
|
|
11
|
+
private readonly config;
|
|
12
|
+
type: "api-key";
|
|
13
|
+
constructor(config: ApiKeyInternalSignerConfig);
|
|
14
|
+
locator(): string;
|
|
15
|
+
signMessage(): Promise<never>;
|
|
16
|
+
signTransaction(): Promise<never>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { SolanaApiKeySigner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-FO5JCAOP.js";import"../chunk-22GIA4MK.js";export{a as SolanaApiKeySigner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5HYE5LK5cjs = require('../chunk-5HYE5LK5.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-CK4JCQY6.cjs');exports.SolanaExternalWalletSigner = _chunk5HYE5LK5cjs.a;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { VersionedTransaction } from '@solana/web3.js';
|
|
2
|
+
import { Signer, SolanaExternalWalletSignerConfig } from './types.cjs';
|
|
3
|
+
import 'ox';
|
|
4
|
+
import 'viem';
|
|
5
|
+
import '@crossmint/client-sdk-window';
|
|
6
|
+
import '@crossmint/client-signers';
|
|
7
|
+
import '@crossmint/common-sdk-base';
|
|
8
|
+
import '../chains/chains.cjs';
|
|
9
|
+
|
|
10
|
+
declare class SolanaExternalWalletSigner implements Signer {
|
|
11
|
+
type: "external-wallet";
|
|
12
|
+
address: string;
|
|
13
|
+
onSignTransaction: (transaction: VersionedTransaction) => Promise<VersionedTransaction>;
|
|
14
|
+
constructor(config: SolanaExternalWalletSignerConfig);
|
|
15
|
+
locator(): string;
|
|
16
|
+
signMessage(): Promise<never>;
|
|
17
|
+
signTransaction(transaction: string): Promise<{
|
|
18
|
+
signature: string;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { SolanaExternalWalletSigner };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { VersionedTransaction } from '@solana/web3.js';
|
|
2
|
+
import { Signer, SolanaExternalWalletSignerConfig } from './types.js';
|
|
3
|
+
import 'ox';
|
|
4
|
+
import 'viem';
|
|
5
|
+
import '@crossmint/client-sdk-window';
|
|
6
|
+
import '@crossmint/client-signers';
|
|
7
|
+
import '@crossmint/common-sdk-base';
|
|
8
|
+
import '../chains/chains.js';
|
|
9
|
+
|
|
10
|
+
declare class SolanaExternalWalletSigner implements Signer {
|
|
11
|
+
type: "external-wallet";
|
|
12
|
+
address: string;
|
|
13
|
+
onSignTransaction: (transaction: VersionedTransaction) => Promise<VersionedTransaction>;
|
|
14
|
+
constructor(config: SolanaExternalWalletSignerConfig);
|
|
15
|
+
locator(): string;
|
|
16
|
+
signMessage(): Promise<never>;
|
|
17
|
+
signTransaction(transaction: string): Promise<{
|
|
18
|
+
signature: string;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { SolanaExternalWalletSigner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-AN25LSQB.js";import"../chunk-7ENJXL4H.js";import"../chunk-22GIA4MK.js";export{a as SolanaExternalWalletSigner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZSWIQU3Ucjs = require('../chunk-ZSWIQU3U.cjs');require('../chunk-CK4JCQY6.cjs');exports.AuthRejectedError = _chunkZSWIQU3Ucjs.a;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { WebAuthnP256 } from 'ox';
|
|
2
|
+
import { VersionedTransaction } from '@solana/web3.js';
|
|
3
|
+
import { EIP1193Provider, Account } from 'viem';
|
|
4
|
+
import { HandshakeParent } from '@crossmint/client-sdk-window';
|
|
5
|
+
import { signerOutboundEvents, signerInboundEvents } from '@crossmint/client-signers';
|
|
6
|
+
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
7
|
+
import { Chain, SolanaChain } from '../chains/chains.cjs';
|
|
8
|
+
|
|
9
|
+
declare class AuthRejectedError extends Error {
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
type EmailSignerConfig = {
|
|
13
|
+
type: "email";
|
|
14
|
+
email?: string;
|
|
15
|
+
onAuthRequired?: (needsAuth: boolean, sendEmailWithOtp: (email: string) => Promise<void>, verifyOtp: (otp: string) => Promise<void>, reject: () => void) => Promise<void>;
|
|
16
|
+
_handshakeParent?: HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>;
|
|
17
|
+
};
|
|
18
|
+
type BaseExternalWalletSignerConfig = {
|
|
19
|
+
type: "external-wallet";
|
|
20
|
+
address: string;
|
|
21
|
+
};
|
|
22
|
+
type EvmExternalWalletSignerConfig = BaseExternalWalletSignerConfig & {
|
|
23
|
+
provider?: GenericEIP1193Provider | EIP1193Provider;
|
|
24
|
+
viemAccount?: Account;
|
|
25
|
+
};
|
|
26
|
+
type SolanaExternalWalletSignerConfig = BaseExternalWalletSignerConfig & {
|
|
27
|
+
onSignTransaction: (transaction: VersionedTransaction) => Promise<VersionedTransaction>;
|
|
28
|
+
};
|
|
29
|
+
type ExternalWalletSignerConfigForChain<C extends Chain> = C extends SolanaChain ? SolanaExternalWalletSignerConfig : EvmExternalWalletSignerConfig;
|
|
30
|
+
interface GenericEIP1193Provider {
|
|
31
|
+
request(args: {
|
|
32
|
+
method: string;
|
|
33
|
+
params?: any[];
|
|
34
|
+
}): Promise<any>;
|
|
35
|
+
on(event: string, listener: (...args: any[]) => void): void;
|
|
36
|
+
removeListener(event: string, listener: (...args: any[]) => void): void;
|
|
37
|
+
}
|
|
38
|
+
type ApiKeySignerConfig = {
|
|
39
|
+
type: "api-key";
|
|
40
|
+
};
|
|
41
|
+
type BaseSignerConfig<C extends Chain> = ExternalWalletSignerConfigForChain<C> | ApiKeySignerConfig;
|
|
42
|
+
type PasskeySignerConfig = {
|
|
43
|
+
type: "passkey";
|
|
44
|
+
name?: string;
|
|
45
|
+
onCreatePasskey?: (name: string) => Promise<{
|
|
46
|
+
id: string;
|
|
47
|
+
publicKey: {
|
|
48
|
+
x: string;
|
|
49
|
+
y: string;
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
onSignWithPasskey?: (message: string) => Promise<PasskeySignResult>;
|
|
53
|
+
};
|
|
54
|
+
type EmailInternalSignerConfig = EmailSignerConfig & {
|
|
55
|
+
signerAddress: string;
|
|
56
|
+
crossmint: Crossmint;
|
|
57
|
+
_handshakeParent?: HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>;
|
|
58
|
+
};
|
|
59
|
+
type PasskeyInternalSignerConfig = PasskeySignerConfig & {
|
|
60
|
+
id: string;
|
|
61
|
+
};
|
|
62
|
+
type ApiKeyInternalSignerConfig = ApiKeySignerConfig & {
|
|
63
|
+
address: string;
|
|
64
|
+
};
|
|
65
|
+
type ExternalWalletInternalSignerConfig<C extends Chain> = ExternalWalletSignerConfigForChain<C>;
|
|
66
|
+
type InternalSignerConfig<C extends Chain> = EmailInternalSignerConfig | PasskeyInternalSignerConfig | ApiKeyInternalSignerConfig | ExternalWalletInternalSignerConfig<C>;
|
|
67
|
+
type BaseSignResult = {
|
|
68
|
+
signature: string;
|
|
69
|
+
};
|
|
70
|
+
type PasskeySignResult = {
|
|
71
|
+
signature: {
|
|
72
|
+
r: string;
|
|
73
|
+
s: string;
|
|
74
|
+
};
|
|
75
|
+
metadata: WebAuthnP256.SignMetadata;
|
|
76
|
+
};
|
|
77
|
+
type SignerConfigForChain<C extends Chain> = C extends SolanaChain ? EmailSignerConfig | BaseSignerConfig<C> : PasskeySignerConfig | BaseSignerConfig<C>;
|
|
78
|
+
type SignResultMap = {
|
|
79
|
+
email: BaseSignResult;
|
|
80
|
+
"api-key": BaseSignResult;
|
|
81
|
+
"external-wallet": BaseSignResult;
|
|
82
|
+
passkey: PasskeySignResult;
|
|
83
|
+
};
|
|
84
|
+
interface Signer<T extends keyof SignResultMap = keyof SignResultMap> {
|
|
85
|
+
type: T;
|
|
86
|
+
locator(): string;
|
|
87
|
+
signMessage(message: string): Promise<SignResultMap[T]>;
|
|
88
|
+
signTransaction(transaction: string): Promise<SignResultMap[T]>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { type ApiKeyInternalSignerConfig, type ApiKeySignerConfig, AuthRejectedError, type BaseExternalWalletSignerConfig, type BaseSignResult, type BaseSignerConfig, type EmailInternalSignerConfig, type EmailSignerConfig, type EvmExternalWalletSignerConfig, type ExternalWalletInternalSignerConfig, type ExternalWalletSignerConfigForChain, type GenericEIP1193Provider, type InternalSignerConfig, type PasskeyInternalSignerConfig, type PasskeySignResult, type PasskeySignerConfig, type Signer, type SignerConfigForChain, type SolanaExternalWalletSignerConfig };
|