@crossmint/wallets-sdk 0.10.5 → 0.10.7
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/dist/api/client.cjs +1 -1
- package/dist/api/client.js +1 -1
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.js +1 -1
- package/dist/{chunk-SJBPKV23.cjs → chunk-3BJP6F4A.cjs} +1 -1
- package/dist/chunk-4SOUJYEZ.cjs +1 -0
- package/dist/chunk-4Y3GRDSC.js +1 -0
- package/dist/chunk-4ZGDFV6E.cjs +1 -0
- package/dist/{chunk-IBX6JQWW.js → chunk-6OI4IYFQ.js} +1 -1
- package/dist/chunk-7XGEKCEC.cjs +1 -0
- package/dist/{chunk-6HE5RGSO.js → chunk-DBRGHBUB.js} +1 -1
- package/dist/chunk-EFV6LYBX.cjs +1 -0
- package/dist/{chunk-3JTT2XLZ.js → chunk-EOBI2HWM.js} +1 -1
- package/dist/{chunk-7LREAZTG.js → chunk-GK2NFDT2.js} +1 -1
- package/dist/chunk-IWRAIG3I.js +1 -0
- package/dist/{chunk-O6MMAZY7.cjs → chunk-IWXXXIDH.cjs} +1 -1
- package/dist/{chunk-W4MKUPUF.cjs → chunk-KHTMC3YP.cjs} +1 -1
- package/dist/chunk-KT3YIMGI.js +1 -0
- package/dist/{chunk-M6T4HH77.cjs → chunk-MGEPGAO4.cjs} +1 -1
- package/dist/chunk-MIR5F4R2.js +1 -0
- package/dist/chunk-MWG57IBW.cjs +1 -0
- package/dist/chunk-PCATIT6D.js +1 -0
- package/dist/chunk-Q4AUF52K.js +1 -0
- package/dist/chunk-RQLYLJLG.js +1 -0
- package/dist/{chunk-RKX5UHAR.cjs → chunk-S4BVVCCI.cjs} +1 -1
- package/dist/{chunk-GVYMN7XQ.cjs → chunk-X3I2D4JM.cjs} +1 -1
- package/dist/{chunk-6P7BENHS.js → chunk-Y4JKM3NU.js} +1 -1
- package/dist/chunk-YRRIQQ37.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/sdk.cjs +1 -1
- package/dist/sdk.js +1 -1
- package/dist/signers/email/email-signer-api-client.cjs +1 -1
- package/dist/signers/email/email-signer-api-client.d.cts +2 -1
- package/dist/signers/email/email-signer-api-client.d.ts +2 -1
- package/dist/signers/email/email-signer-api-client.js +1 -1
- package/dist/signers/email/email-signer.cjs +1 -0
- package/dist/signers/email/email-signer.d.cts +32 -0
- package/dist/signers/email/email-signer.d.ts +32 -0
- package/dist/signers/email/email-signer.js +1 -0
- package/dist/signers/email/evm-email-signer.cjs +1 -0
- package/dist/signers/email/evm-email-signer.d.cts +29 -0
- package/dist/signers/email/evm-email-signer.d.ts +29 -0
- package/dist/signers/email/evm-email-signer.js +1 -0
- package/dist/signers/email/index.cjs +1 -1
- package/dist/signers/email/index.d.cts +3 -1
- package/dist/signers/email/index.d.ts +3 -1
- package/dist/signers/email/index.js +1 -1
- package/dist/signers/email/solana-email-signer.cjs +1 -0
- package/dist/signers/email/{email.d.cts → solana-email-signer.d.cts} +9 -12
- package/dist/signers/email/{email.d.ts → solana-email-signer.d.ts} +9 -12
- package/dist/signers/email/solana-email-signer.js +1 -0
- package/dist/signers/index.cjs +1 -1
- package/dist/signers/index.js +1 -1
- package/dist/signers/solana-external-wallet.d.cts +1 -1
- package/dist/signers/solana-external-wallet.d.ts +1 -1
- package/dist/signers/types.d.cts +2 -3
- package/dist/signers/types.d.ts +2 -3
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/wallets/evm.cjs +1 -1
- package/dist/wallets/evm.d.cts +2 -2
- package/dist/wallets/evm.d.ts +2 -2
- package/dist/wallets/evm.js +1 -1
- package/dist/wallets/solana.cjs +1 -1
- package/dist/wallets/solana.d.cts +2 -2
- package/dist/wallets/solana.d.ts +2 -2
- package/dist/wallets/solana.js +1 -1
- package/dist/wallets/types.d.cts +3 -0
- package/dist/wallets/types.d.ts +3 -0
- package/dist/wallets/wallet-factory.cjs +1 -1
- package/dist/wallets/wallet-factory.js +1 -1
- package/dist/wallets/wallet.cjs +1 -1
- package/dist/wallets/wallet.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-5PQGSQCD.js +0 -1
- package/dist/chunk-64EPPE7R.cjs +0 -1
- package/dist/chunk-FPSS2IYY.js +0 -1
- package/dist/chunk-HDAM24ZL.js +0 -1
- package/dist/chunk-NOOBYBKD.js +0 -1
- package/dist/chunk-ROO2DTKQ.cjs +0 -1
- package/dist/chunk-TVZORU22.cjs +0 -1
- package/dist/chunk-UO6UBZQ7.cjs +0 -1
- package/dist/chunk-YKPKNCFG.js +0 -1
- package/dist/signers/email/email.cjs +0 -1
- package/dist/signers/email/email.js +0 -1
- /package/dist/{chunk-3W44OI5M.js → chunk-TN6YXWPL.js} +0 -0
- /package/dist/{chunk-W5TFNIA7.cjs → chunk-VMEGMTOD.cjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-VMEGMTOD.cjs');var _chunkYRRIQQ37cjs = require('../../chunk-YRRIQQ37.cjs');var _chunkMWG57IBWcjs = require('../../chunk-MWG57IBW.cjs');require('../../chunk-4SOUJYEZ.cjs');var _chunkEFV6LYBXcjs = require('../../chunk-EFV6LYBX.cjs');require('../../chunk-ZWDS66FS.cjs');require('../../chunk-ZSWIQU3U.cjs');require('../../chunk-KHTMC3YP.cjs');require('../../chunk-CT2UGJEL.cjs');require('../../chunk-XALFCQKD.cjs');exports.DEFAULT_EVENT_OPTIONS = _chunkEFV6LYBXcjs.b; exports.EmailSigner = _chunkEFV6LYBXcjs.a; exports.EvmEmailSigner = _chunkMWG57IBWcjs.a; exports.SolanaEmailSigner = _chunkYRRIQQ37cjs.a;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export { EmailSigner } from './email.cjs';
|
|
1
|
+
export { DEFAULT_EVENT_OPTIONS, EmailSigner } from './email-signer.cjs';
|
|
2
|
+
export { SolanaEmailSigner } from './solana-email-signer.cjs';
|
|
3
|
+
export { EvmEmailSigner } from './evm-email-signer.cjs';
|
|
2
4
|
import '../types.cjs';
|
|
3
5
|
import 'ox';
|
|
4
6
|
import '@crossmint/client-sdk-window';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export { EmailSigner } from './email.js';
|
|
1
|
+
export { DEFAULT_EVENT_OPTIONS, EmailSigner } from './email-signer.js';
|
|
2
|
+
export { SolanaEmailSigner } from './solana-email-signer.js';
|
|
3
|
+
export { EvmEmailSigner } from './evm-email-signer.js';
|
|
2
4
|
import '../types.js';
|
|
3
5
|
import 'ox';
|
|
4
6
|
import '@crossmint/client-sdk-window';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../chunk-
|
|
1
|
+
import"../../chunk-TN6YXWPL.js";import{a as c}from"../../chunk-PCATIT6D.js";import{a as d}from"../../chunk-RQLYLJLG.js";import"../../chunk-KT3YIMGI.js";import{a,b}from"../../chunk-Q4AUF52K.js";import"../../chunk-PDL3XF5M.js";import"../../chunk-M4ELAV7U.js";import"../../chunk-IWRAIG3I.js";import"../../chunk-7ENJXL4H.js";import"../../chunk-BW7YYVZE.js";export{b as DEFAULT_EVENT_OPTIONS,a as EmailSigner,d as EvmEmailSigner,c as SolanaEmailSigner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYRRIQQ37cjs = require('../../chunk-YRRIQQ37.cjs');require('../../chunk-4SOUJYEZ.cjs');require('../../chunk-EFV6LYBX.cjs');require('../../chunk-ZWDS66FS.cjs');require('../../chunk-ZSWIQU3U.cjs');require('../../chunk-KHTMC3YP.cjs');require('../../chunk-CT2UGJEL.cjs');require('../../chunk-XALFCQKD.cjs');exports.SolanaEmailSigner = _chunkYRRIQQ37cjs.a;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EmailInternalSignerConfig } from '../types.cjs';
|
|
2
|
+
import { EmailSigner } from './email-signer.cjs';
|
|
2
3
|
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
3
4
|
import 'ox';
|
|
4
5
|
import '@crossmint/client-sdk-window';
|
|
@@ -6,23 +7,19 @@ import '@crossmint/client-signers';
|
|
|
6
7
|
import '../../chains/chains.cjs';
|
|
7
8
|
import 'viem';
|
|
8
9
|
|
|
9
|
-
declare class
|
|
10
|
-
private config;
|
|
11
|
-
type: "email";
|
|
12
|
-
private _needsAuth;
|
|
13
|
-
private _authPromise;
|
|
10
|
+
declare class SolanaEmailSigner extends EmailSigner {
|
|
14
11
|
constructor(config: EmailInternalSignerConfig);
|
|
15
12
|
locator(): string;
|
|
16
|
-
private initialize;
|
|
17
13
|
signMessage(): Promise<never>;
|
|
18
14
|
signTransaction(transaction: string): Promise<{
|
|
19
15
|
signature: string;
|
|
20
16
|
}>;
|
|
21
|
-
private handleAuthRequired;
|
|
22
|
-
private createAuthPromise;
|
|
23
|
-
private sendEmailWithOtp;
|
|
24
|
-
private verifyOtp;
|
|
25
17
|
static pregenerateSigner(email: string, crossmint: Crossmint): Promise<string>;
|
|
18
|
+
static verifyPublicKeyFormat(publicKey: {
|
|
19
|
+
encoding: string;
|
|
20
|
+
keyType: string;
|
|
21
|
+
bytes: string;
|
|
22
|
+
} | null): void;
|
|
26
23
|
}
|
|
27
24
|
|
|
28
|
-
export {
|
|
25
|
+
export { SolanaEmailSigner };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EmailInternalSignerConfig } from '../types.js';
|
|
2
|
+
import { EmailSigner } from './email-signer.js';
|
|
2
3
|
import { Crossmint } from '@crossmint/common-sdk-base';
|
|
3
4
|
import 'ox';
|
|
4
5
|
import '@crossmint/client-sdk-window';
|
|
@@ -6,23 +7,19 @@ import '@crossmint/client-signers';
|
|
|
6
7
|
import '../../chains/chains.js';
|
|
7
8
|
import 'viem';
|
|
8
9
|
|
|
9
|
-
declare class
|
|
10
|
-
private config;
|
|
11
|
-
type: "email";
|
|
12
|
-
private _needsAuth;
|
|
13
|
-
private _authPromise;
|
|
10
|
+
declare class SolanaEmailSigner extends EmailSigner {
|
|
14
11
|
constructor(config: EmailInternalSignerConfig);
|
|
15
12
|
locator(): string;
|
|
16
|
-
private initialize;
|
|
17
13
|
signMessage(): Promise<never>;
|
|
18
14
|
signTransaction(transaction: string): Promise<{
|
|
19
15
|
signature: string;
|
|
20
16
|
}>;
|
|
21
|
-
private handleAuthRequired;
|
|
22
|
-
private createAuthPromise;
|
|
23
|
-
private sendEmailWithOtp;
|
|
24
|
-
private verifyOtp;
|
|
25
17
|
static pregenerateSigner(email: string, crossmint: Crossmint): Promise<string>;
|
|
18
|
+
static verifyPublicKeyFormat(publicKey: {
|
|
19
|
+
encoding: string;
|
|
20
|
+
keyType: string;
|
|
21
|
+
bytes: string;
|
|
22
|
+
} | null): void;
|
|
26
23
|
}
|
|
27
24
|
|
|
28
|
-
export {
|
|
25
|
+
export { SolanaEmailSigner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../chunk-PCATIT6D.js";import"../../chunk-KT3YIMGI.js";import"../../chunk-Q4AUF52K.js";import"../../chunk-PDL3XF5M.js";import"../../chunk-M4ELAV7U.js";import"../../chunk-IWRAIG3I.js";import"../../chunk-7ENJXL4H.js";import"../../chunk-BW7YYVZE.js";export{a as SolanaEmailSigner};
|
package/dist/signers/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7XGEKCECcjs = require('../chunk-7XGEKCEC.cjs');require('../chunk-VMEGMTOD.cjs');require('../chunk-YRRIQQ37.cjs');require('../chunk-MWG57IBW.cjs');require('../chunk-4SOUJYEZ.cjs');require('../chunk-EFV6LYBX.cjs');require('../chunk-ZWDS66FS.cjs');require('../chunk-DYRSQN7X.cjs');require('../chunk-NVJN7LPY.cjs');require('../chunk-AFYBD7FI.cjs');require('../chunk-ZSWIQU3U.cjs');require('../chunk-KHTMC3YP.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-YO6BJ2DI.cjs');require('../chunk-DIZVZP5P.cjs');require('../chunk-XALFCQKD.cjs');exports.assembleSigner = _chunk7XGEKCECcjs.a;
|
package/dist/signers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-4Y3GRDSC.js";import"../chunk-TN6YXWPL.js";import"../chunk-PCATIT6D.js";import"../chunk-RQLYLJLG.js";import"../chunk-KT3YIMGI.js";import"../chunk-Q4AUF52K.js";import"../chunk-PDL3XF5M.js";import"../chunk-OV4CFQ36.js";import"../chunk-77QBSFHG.js";import"../chunk-T3ICQDFS.js";import"../chunk-M4ELAV7U.js";import"../chunk-IWRAIG3I.js";import"../chunk-7ENJXL4H.js";import"../chunk-2KK65AC6.js";import"../chunk-QTSZSHKK.js";import"../chunk-BW7YYVZE.js";export{a as assembleSigner};
|
|
@@ -10,7 +10,7 @@ import 'viem';
|
|
|
10
10
|
declare class SolanaExternalWalletSigner implements Signer {
|
|
11
11
|
type: "external-wallet";
|
|
12
12
|
address: string;
|
|
13
|
-
onSignTransaction
|
|
13
|
+
onSignTransaction?: (transaction: VersionedTransaction) => Promise<VersionedTransaction>;
|
|
14
14
|
constructor(config: SolanaExternalWalletSignerConfig);
|
|
15
15
|
locator(): string;
|
|
16
16
|
signMessage(): Promise<never>;
|
|
@@ -10,7 +10,7 @@ import 'viem';
|
|
|
10
10
|
declare class SolanaExternalWalletSigner implements Signer {
|
|
11
11
|
type: "external-wallet";
|
|
12
12
|
address: string;
|
|
13
|
-
onSignTransaction
|
|
13
|
+
onSignTransaction?: (transaction: VersionedTransaction) => Promise<VersionedTransaction>;
|
|
14
14
|
constructor(config: SolanaExternalWalletSignerConfig);
|
|
15
15
|
locator(): string;
|
|
16
16
|
signMessage(): Promise<never>;
|
package/dist/signers/types.d.cts
CHANGED
|
@@ -13,7 +13,6 @@ type EmailSignerConfig = {
|
|
|
13
13
|
type: "email";
|
|
14
14
|
email?: string;
|
|
15
15
|
onAuthRequired?: (needsAuth: boolean, sendEmailWithOtp: () => Promise<void>, verifyOtp: (otp: string) => Promise<void>, reject: () => void) => Promise<void>;
|
|
16
|
-
_handshakeParent?: HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>;
|
|
17
16
|
};
|
|
18
17
|
type ExternalWalletSignerConfigForChain<C extends Chain> = C extends SolanaChain ? SolanaExternalWalletSignerConfig : EvmExternalWalletSignerConfig;
|
|
19
18
|
type ApiKeySignerConfig = {
|
|
@@ -35,7 +34,7 @@ type PasskeySignerConfig = {
|
|
|
35
34
|
type EmailInternalSignerConfig = EmailSignerConfig & {
|
|
36
35
|
signerAddress: string;
|
|
37
36
|
crossmint: Crossmint;
|
|
38
|
-
|
|
37
|
+
clientTEEConnection?: HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>;
|
|
39
38
|
};
|
|
40
39
|
type PasskeyInternalSignerConfig = PasskeySignerConfig & {
|
|
41
40
|
id: string;
|
|
@@ -55,7 +54,7 @@ type PasskeySignResult = {
|
|
|
55
54
|
};
|
|
56
55
|
metadata: WebAuthnP256.SignMetadata;
|
|
57
56
|
};
|
|
58
|
-
type SignerConfigForChain<C extends Chain> = C extends SolanaChain ? EmailSignerConfig | BaseSignerConfig<C> : PasskeySignerConfig | BaseSignerConfig<C>;
|
|
57
|
+
type SignerConfigForChain<C extends Chain> = C extends SolanaChain ? EmailSignerConfig | BaseSignerConfig<C> : EmailSignerConfig | PasskeySignerConfig | BaseSignerConfig<C>;
|
|
59
58
|
type SignResultMap = {
|
|
60
59
|
email: BaseSignResult;
|
|
61
60
|
"api-key": BaseSignResult;
|
package/dist/signers/types.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ type EmailSignerConfig = {
|
|
|
13
13
|
type: "email";
|
|
14
14
|
email?: string;
|
|
15
15
|
onAuthRequired?: (needsAuth: boolean, sendEmailWithOtp: () => Promise<void>, verifyOtp: (otp: string) => Promise<void>, reject: () => void) => Promise<void>;
|
|
16
|
-
_handshakeParent?: HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>;
|
|
17
16
|
};
|
|
18
17
|
type ExternalWalletSignerConfigForChain<C extends Chain> = C extends SolanaChain ? SolanaExternalWalletSignerConfig : EvmExternalWalletSignerConfig;
|
|
19
18
|
type ApiKeySignerConfig = {
|
|
@@ -35,7 +34,7 @@ type PasskeySignerConfig = {
|
|
|
35
34
|
type EmailInternalSignerConfig = EmailSignerConfig & {
|
|
36
35
|
signerAddress: string;
|
|
37
36
|
crossmint: Crossmint;
|
|
38
|
-
|
|
37
|
+
clientTEEConnection?: HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>;
|
|
39
38
|
};
|
|
40
39
|
type PasskeyInternalSignerConfig = PasskeySignerConfig & {
|
|
41
40
|
id: string;
|
|
@@ -55,7 +54,7 @@ type PasskeySignResult = {
|
|
|
55
54
|
};
|
|
56
55
|
metadata: WebAuthnP256.SignMetadata;
|
|
57
56
|
};
|
|
58
|
-
type SignerConfigForChain<C extends Chain> = C extends SolanaChain ? EmailSignerConfig | BaseSignerConfig<C> : PasskeySignerConfig | BaseSignerConfig<C>;
|
|
57
|
+
type SignerConfigForChain<C extends Chain> = C extends SolanaChain ? EmailSignerConfig | BaseSignerConfig<C> : EmailSignerConfig | PasskeySignerConfig | BaseSignerConfig<C>;
|
|
59
58
|
type SignResultMap = {
|
|
60
59
|
email: BaseSignResult;
|
|
61
60
|
"api-key": BaseSignResult;
|
package/dist/utils/constants.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKHTMC3YPcjs = require('../chunk-KHTMC3YP.cjs');require('../chunk-XALFCQKD.cjs');exports.SDK_NAME = _chunkKHTMC3YPcjs.c; exports.SDK_VERSION = _chunkKHTMC3YPcjs.b; exports.STATUS_POLLING_INTERVAL_MS = _chunkKHTMC3YPcjs.d; exports.WALLETS_SERVICE = _chunkKHTMC3YPcjs.a;
|
package/dist/utils/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-IWRAIG3I.js";import"../chunk-BW7YYVZE.js";export{c as SDK_NAME,b as SDK_VERSION,d as STATUS_POLLING_INTERVAL_MS,a as WALLETS_SERVICE};
|
package/dist/wallets/evm.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMGEPGAO4cjs = require('../chunk-MGEPGAO4.cjs');require('../chunk-IWXXXIDH.cjs');require('../chunk-KHTMC3YP.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-6VJEBYPN.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-XALFCQKD.cjs');exports.EVMWallet = _chunkMGEPGAO4cjs.a;
|
package/dist/wallets/evm.d.cts
CHANGED
|
@@ -8,12 +8,12 @@ import { EVMTransactionInput, Transaction } from './types.cjs';
|
|
|
8
8
|
import { EVMChain, Chain, EVMSmartWalletChain } from '../chains/chains.cjs';
|
|
9
9
|
import { Wallet } from './wallet.cjs';
|
|
10
10
|
import '@solana/web3.js';
|
|
11
|
+
import '@crossmint/client-sdk-window';
|
|
12
|
+
import '@crossmint/client-signers';
|
|
11
13
|
import '../api/types.cjs';
|
|
12
14
|
import '../api/gen/types.gen.cjs';
|
|
13
15
|
import '../signers/types.cjs';
|
|
14
16
|
import 'ox';
|
|
15
|
-
import '@crossmint/client-sdk-window';
|
|
16
|
-
import '@crossmint/client-signers';
|
|
17
17
|
import '@crossmint/common-sdk-base';
|
|
18
18
|
import '../api/client.cjs';
|
|
19
19
|
|
package/dist/wallets/evm.d.ts
CHANGED
|
@@ -8,12 +8,12 @@ import { EVMTransactionInput, Transaction } from './types.js';
|
|
|
8
8
|
import { EVMChain, Chain, EVMSmartWalletChain } from '../chains/chains.js';
|
|
9
9
|
import { Wallet } from './wallet.js';
|
|
10
10
|
import '@solana/web3.js';
|
|
11
|
+
import '@crossmint/client-sdk-window';
|
|
12
|
+
import '@crossmint/client-signers';
|
|
11
13
|
import '../api/types.js';
|
|
12
14
|
import '../api/gen/types.gen.js';
|
|
13
15
|
import '../signers/types.js';
|
|
14
16
|
import 'ox';
|
|
15
|
-
import '@crossmint/client-sdk-window';
|
|
16
|
-
import '@crossmint/client-signers';
|
|
17
17
|
import '@crossmint/common-sdk-base';
|
|
18
18
|
import '../api/client.js';
|
|
19
19
|
|
package/dist/wallets/evm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-DBRGHBUB.js";import"../chunk-EOBI2HWM.js";import"../chunk-IWRAIG3I.js";import"../chunk-7ENJXL4H.js";import"../chunk-BJDS5BJG.js";import"../chunk-KKQBZXFE.js";import"../chunk-S3DYQVRD.js";import"../chunk-BW7YYVZE.js";export{a as EVMWallet};
|
package/dist/wallets/solana.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3BJP6F4Acjs = require('../chunk-3BJP6F4A.cjs');require('../chunk-IWXXXIDH.cjs');require('../chunk-AFYBD7FI.cjs');require('../chunk-KHTMC3YP.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-XALFCQKD.cjs');exports.SolanaWallet = _chunk3BJP6F4Acjs.a;
|
|
@@ -3,12 +3,12 @@ import { SolanaTransactionInput, Transaction } from './types.cjs';
|
|
|
3
3
|
import { Wallet } from './wallet.cjs';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '@solana/web3.js';
|
|
6
|
+
import '@crossmint/client-sdk-window';
|
|
7
|
+
import '@crossmint/client-signers';
|
|
6
8
|
import '../api/types.cjs';
|
|
7
9
|
import '../api/gen/types.gen.cjs';
|
|
8
10
|
import '../signers/types.cjs';
|
|
9
11
|
import 'ox';
|
|
10
|
-
import '@crossmint/client-sdk-window';
|
|
11
|
-
import '@crossmint/client-signers';
|
|
12
12
|
import '@crossmint/common-sdk-base';
|
|
13
13
|
import '../api/client.cjs';
|
|
14
14
|
|
package/dist/wallets/solana.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ import { SolanaTransactionInput, Transaction } from './types.js';
|
|
|
3
3
|
import { Wallet } from './wallet.js';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '@solana/web3.js';
|
|
6
|
+
import '@crossmint/client-sdk-window';
|
|
7
|
+
import '@crossmint/client-signers';
|
|
6
8
|
import '../api/types.js';
|
|
7
9
|
import '../api/gen/types.gen.js';
|
|
8
10
|
import '../signers/types.js';
|
|
9
11
|
import 'ox';
|
|
10
|
-
import '@crossmint/client-sdk-window';
|
|
11
|
-
import '@crossmint/client-signers';
|
|
12
12
|
import '@crossmint/common-sdk-base';
|
|
13
13
|
import '../api/client.js';
|
|
14
14
|
|
package/dist/wallets/solana.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-GK2NFDT2.js";import"../chunk-EOBI2HWM.js";import"../chunk-T3ICQDFS.js";import"../chunk-IWRAIG3I.js";import"../chunk-7ENJXL4H.js";import"../chunk-BW7YYVZE.js";export{a as SolanaWallet};
|
package/dist/wallets/types.d.cts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { VersionedTransaction, Keypair } from '@solana/web3.js';
|
|
2
|
+
import { HandshakeParent } from '@crossmint/client-sdk-window';
|
|
3
|
+
import { signerOutboundEvents, signerInboundEvents } from '@crossmint/client-signers';
|
|
2
4
|
import { CreateTransactionSuccessResponse } from '../api/types.cjs';
|
|
3
5
|
export { Activity } from '../api/types.cjs';
|
|
4
6
|
import { EVMSmartWalletChain } from '../chains/chains.cjs';
|
|
@@ -25,6 +27,7 @@ type Callbacks = {
|
|
|
25
27
|
};
|
|
26
28
|
type WalletOptions = {
|
|
27
29
|
experimental_callbacks?: Callbacks;
|
|
30
|
+
clientTEEConnection?: HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>;
|
|
28
31
|
};
|
|
29
32
|
type TokenBalance = {
|
|
30
33
|
symbol: "sol" | "eth" | "usdc" | string;
|
package/dist/wallets/types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { VersionedTransaction, Keypair } from '@solana/web3.js';
|
|
2
|
+
import { HandshakeParent } from '@crossmint/client-sdk-window';
|
|
3
|
+
import { signerOutboundEvents, signerInboundEvents } from '@crossmint/client-signers';
|
|
2
4
|
import { CreateTransactionSuccessResponse } from '../api/types.js';
|
|
3
5
|
export { Activity } from '../api/types.js';
|
|
4
6
|
import { EVMSmartWalletChain } from '../chains/chains.js';
|
|
@@ -25,6 +27,7 @@ type Callbacks = {
|
|
|
25
27
|
};
|
|
26
28
|
type WalletOptions = {
|
|
27
29
|
experimental_callbacks?: Callbacks;
|
|
30
|
+
clientTEEConnection?: HandshakeParent<typeof signerOutboundEvents, typeof signerInboundEvents>;
|
|
28
31
|
};
|
|
29
32
|
type TokenBalance = {
|
|
30
33
|
symbol: "sol" | "eth" | "usdc" | string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4ZGDFV6Ecjs = require('../chunk-4ZGDFV6E.cjs');require('../chunk-IWXXXIDH.cjs');require('../chunk-7XGEKCEC.cjs');require('../chunk-VMEGMTOD.cjs');require('../chunk-YRRIQQ37.cjs');require('../chunk-MWG57IBW.cjs');require('../chunk-4SOUJYEZ.cjs');require('../chunk-EFV6LYBX.cjs');require('../chunk-ZWDS66FS.cjs');require('../chunk-DYRSQN7X.cjs');require('../chunk-NVJN7LPY.cjs');require('../chunk-AFYBD7FI.cjs');require('../chunk-ZSWIQU3U.cjs');require('../chunk-RD5PG4M6.cjs');require('../chunk-KHTMC3YP.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-YO6BJ2DI.cjs');require('../chunk-DIZVZP5P.cjs');require('../chunk-XALFCQKD.cjs');exports.WalletFactory = _chunk4ZGDFV6Ecjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-MIR5F4R2.js";import"../chunk-EOBI2HWM.js";import"../chunk-4Y3GRDSC.js";import"../chunk-TN6YXWPL.js";import"../chunk-PCATIT6D.js";import"../chunk-RQLYLJLG.js";import"../chunk-KT3YIMGI.js";import"../chunk-Q4AUF52K.js";import"../chunk-PDL3XF5M.js";import"../chunk-OV4CFQ36.js";import"../chunk-77QBSFHG.js";import"../chunk-T3ICQDFS.js";import"../chunk-M4ELAV7U.js";import"../chunk-FUUYGB4K.js";import"../chunk-IWRAIG3I.js";import"../chunk-7ENJXL4H.js";import"../chunk-2KK65AC6.js";import"../chunk-QTSZSHKK.js";import"../chunk-BW7YYVZE.js";export{a as WalletFactory};
|
package/dist/wallets/wallet.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIWXXXIDHcjs = require('../chunk-IWXXXIDH.cjs');require('../chunk-KHTMC3YP.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-XALFCQKD.cjs');exports.Wallet = _chunkIWXXXIDHcjs.a;
|
package/dist/wallets/wallet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-EOBI2HWM.js";import"../chunk-IWRAIG3I.js";import"../chunk-7ENJXL4H.js";import"../chunk-BW7YYVZE.js";export{a as Wallet};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossmint/wallets-sdk",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.7",
|
|
4
4
|
"repository": "https://github.com/Crossmint/crossmint-sdk",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Paella Labs Inc",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"ox": "0.6.9",
|
|
25
25
|
"tweetnacl": "1.0.3",
|
|
26
26
|
"viem": "2.23.6",
|
|
27
|
-
"@crossmint/common-sdk-
|
|
28
|
-
"@crossmint/
|
|
27
|
+
"@crossmint/common-sdk-auth": "1.0.39",
|
|
28
|
+
"@crossmint/common-sdk-base": "0.8.2",
|
|
29
29
|
"@crossmint/client-sdk-window": "1.0.0",
|
|
30
|
-
"@crossmint/
|
|
30
|
+
"@crossmint/client-signers": "0.0.18"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@hey-api/openapi-ts": "0.69.2",
|
package/dist/chunk-5PQGSQCD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as i,c as s}from"./chunk-FPSS2IYY.js";import{a as n}from"./chunk-7ENJXL4H.js";import{f as t}from"./chunk-BW7YYVZE.js";import{APIKeyUsageOrigin as p,CrossmintApiClient as d}from"@crossmint/common-sdk-base";var a=class extends d{constructor(e){super(e,{internalConfig:{sdkMetadata:{name:s,version:i}}});this.apiPrefix="api/v1/signers"}pregenerateSigner(e){return t(this,null,function*(){let r=yield this.post(`${this.apiPrefix}/derive-public-key`,{body:JSON.stringify({authId:`email:${e}`,keyType:"ed25519"}),headers:this.headers});if(!r.ok){let o=yield r.text();throw new Error(`Failed to fetch public key: ${r.status} ${o}`)}return yield r.json()})}get isServerSide(){return this.parsedAPIKey.usageOrigin===p.SERVER}get environment(){if(!this.parsedAPIKey.isValid)throw new n("Invalid API key");return this.parsedAPIKey.environment}get headers(){return{"Content-Type":"application/json"}}};export{a};
|
package/dist/chunk-64EPPE7R.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkO6MMAZY7cjs = require('./chunk-O6MMAZY7.cjs');var _chunkTVZORU22cjs = require('./chunk-TVZORU22.cjs');var _chunkUO6UBZQ7cjs = require('./chunk-UO6UBZQ7.cjs');var _chunkRD5PG4M6cjs = require('./chunk-RD5PG4M6.cjs');var _chunkCT2UGJELcjs = require('./chunk-CT2UGJEL.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _ox = require('ox');var f=class{constructor(e){this.apiClient=e}getOrCreateWallet(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(this.apiClient.isServerSide)throw new (0, _chunkCT2UGJELcjs.f)("getOrCreateWallet is not supported on server side");let t=yield this.apiClient.getWallet(`me:${e.chain==="solana"?"solana-smart-wallet":"evm-smart-wallet"}`);return t&&!("error"in t)?(yield this.validateWalletConfig(t,e),this.createWalletInstance(t,e)):this.createWallet(e)})}getWallet(e,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(!this.apiClient.isServerSide)throw new (0, _chunkCT2UGJELcjs.f)("getWallet is not supported on client side, use getOrCreateWallet instead");let i=yield this.apiClient.getWallet(e);if("error"in i)throw new (0, _chunkCT2UGJELcjs.d)(JSON.stringify(i));return this.createWalletInstance(i,t)})}createWallet(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var a,n,o,l,p;yield(o=(n=(a=e.options)==null?void 0:a.experimental_callbacks)==null?void 0:n.onWalletCreationStart)==null?void 0:o.call(n);let t;e.chain==="solana"?t={type:"solana-smart-wallet",config:{adminSigner:yield this.configureSigner(e.chain,e.signer)},linkedUser:(l=e.owner)!=null?l:void 0}:t={type:"evm-smart-wallet",config:{adminSigner:yield this.configureSigner(e.chain,e.signer)},linkedUser:(p=e.owner)!=null?p:void 0};let i=yield this.apiClient.createWallet(t);if("error"in i)throw new (0, _chunkCT2UGJELcjs.f)(JSON.stringify(i));return this.createWalletInstance(i,e)})}createWalletInstance(e,t){let i=this.toInternalSignerConfig(e,t.signer);return new (0, _chunkO6MMAZY7cjs.a)({chain:t.chain,address:e.address,signer:_chunkTVZORU22cjs.a.call(void 0, t.chain,i),options:t.options},this.apiClient)}toInternalSignerConfig(e,t){var i,a;if(t==null)throw new (0, _chunkCT2UGJELcjs.f)("Signer is required to create a wallet");switch(t.type){case"api-key":{let n;switch(e.type){case"solana-smart-wallet":n=e.config.adminSigner.address;break;case"evm-smart-wallet":e.config.adminSigner.type==="evm-fireblocks-custodial"&&(n=e.config.adminSigner.address);break}if(n==null)throw new (0, _chunkCT2UGJELcjs.f)("Wallet signer 'api-key' has no address");return{type:"api-key",address:n}}case"external-wallet":return t;case"passkey":if(e.type==="evm-smart-wallet"&&e.config.adminSigner.type==="evm-passkey")return{type:"passkey",id:e.config.adminSigner.id,name:e.config.adminSigner.name,onCreatePasskey:t.onCreatePasskey,onSignWithPasskey:t.onSignWithPasskey};throw new (0, _chunkCT2UGJELcjs.f)("Passkey signer is not supported for this wallet type");case"email":{if(e.type!=="solana-smart-wallet"||e.config.adminSigner.type!=="solana-keypair")throw new (0, _chunkCT2UGJELcjs.f)("Wallet signer 'email' has no address");let n=e.config.adminSigner.address;return{type:"email",email:(a=t.email)!=null?a:(i=this.apiClient.crossmint.experimental_customAuth)==null?void 0:i.email,signerAddress:n,crossmint:this.apiClient.crossmint,onAuthRequired:t.onAuthRequired,_handshakeParent:t._handshakeParent}}default:throw new Error("Invalid signer type")}}configureSigner(e,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var i;if((t==null?void 0:t.type)==="passkey"){let a=(i=t.name)!=null?i:`Crossmint Wallet ${Date.now()}`,n=t.onCreatePasskey?yield t.onCreatePasskey(a):yield _ox.WebAuthnP256.createCredential({name:a});return{type:"evm-passkey",id:n.id,name:a,publicKey:{x:n.publicKey.x.toString(),y:n.publicKey.y.toString()}}}return yield this.toExternalSignerConfig(e,t)})}toExternalSignerConfig(e,t,i){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var a,n;if(!t||t.type==="api-key")return{type:e==="solana"?"solana-fireblocks-custodial":"evm-fireblocks-custodial"};if(t.type==="external-wallet")return{type:e==="solana"?"solana-keypair":"evm-keypair",address:t.address};if(t.type==="passkey"&&i!=null){if((i==null?void 0:i.type)!=="evm-smart-wallet"||i.config.adminSigner.type!=="evm-passkey")throw new (0, _chunkCT2UGJELcjs.f)("Passkey signer is not supported for this wallet type");return{type:"evm-passkey",id:i.config.adminSigner.id,name:i.config.adminSigner.name,publicKey:{x:i.config.adminSigner.publicKey.x,y:i.config.adminSigner.publicKey.y}}}if(t.type==="email"){let o=(n=t.email)!=null?n:(a=this.apiClient.crossmint.experimental_customAuth)==null?void 0:a.email;if(o==null)throw new Error("Email is required to create a wallet with email signer");if(e!=="solana")throw new Error("Email signer is only supported for Solana wallets");return{type:"solana-keypair",address:yield _chunkUO6UBZQ7cjs.a.pregenerateSigner(o,this.apiClient.crossmint)}}throw new Error("Invalid signer type")})}validateWalletConfig(e,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(t.owner!=null&&e.linkedUser!=null&&t.owner!==e.linkedUser)throw new (0, _chunkCT2UGJELcjs.f)("Wallet owner does not match existing wallet's linked user");if(e.type!=="solana-smart-wallet"&&e.type!=="evm-smart-wallet")return;let i=yield this.toExternalSignerConfig(t.chain,t.signer,e),a=e.config.adminSigner;if(i&&a){if(i.type!==a.type)throw new (0, _chunkCT2UGJELcjs.f)("The wallet signer type provided in the wallet config does not match the existing wallet's adminSigner type");_chunkRD5PG4M6cjs.a.call(void 0, i,a)}})}};exports.a = f;
|
package/dist/chunk-FPSS2IYY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s="@crossmint/wallets-sdk",t="0.10.5";var c="WALLETS_SDK",r=t,d=s,a=500;export{c as a,r as b,d as c,a as d};
|
package/dist/chunk-HDAM24ZL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as d}from"./chunk-3JTT2XLZ.js";import{a as y}from"./chunk-NOOBYBKD.js";import{a as m}from"./chunk-YKPKNCFG.js";import{a as C}from"./chunk-FUUYGB4K.js";import{d as c,f as r}from"./chunk-7ENJXL4H.js";import{f as s}from"./chunk-BW7YYVZE.js";import{WebAuthnP256 as h}from"ox";var f=class{constructor(e){this.apiClient=e}getOrCreateWallet(e){return s(this,null,function*(){if(this.apiClient.isServerSide)throw new r("getOrCreateWallet is not supported on server side");let t=yield this.apiClient.getWallet(`me:${e.chain==="solana"?"solana-smart-wallet":"evm-smart-wallet"}`);return t&&!("error"in t)?(yield this.validateWalletConfig(t,e),this.createWalletInstance(t,e)):this.createWallet(e)})}getWallet(e,t){return s(this,null,function*(){if(!this.apiClient.isServerSide)throw new r("getWallet is not supported on client side, use getOrCreateWallet instead");let i=yield this.apiClient.getWallet(e);if("error"in i)throw new c(JSON.stringify(i));return this.createWalletInstance(i,t)})}createWallet(e){return s(this,null,function*(){var a,n,o,l,p;yield(o=(n=(a=e.options)==null?void 0:a.experimental_callbacks)==null?void 0:n.onWalletCreationStart)==null?void 0:o.call(n);let t;e.chain==="solana"?t={type:"solana-smart-wallet",config:{adminSigner:yield this.configureSigner(e.chain,e.signer)},linkedUser:(l=e.owner)!=null?l:void 0}:t={type:"evm-smart-wallet",config:{adminSigner:yield this.configureSigner(e.chain,e.signer)},linkedUser:(p=e.owner)!=null?p:void 0};let i=yield this.apiClient.createWallet(t);if("error"in i)throw new r(JSON.stringify(i));return this.createWalletInstance(i,e)})}createWalletInstance(e,t){let i=this.toInternalSignerConfig(e,t.signer);return new d({chain:t.chain,address:e.address,signer:y(t.chain,i),options:t.options},this.apiClient)}toInternalSignerConfig(e,t){var i,a;if(t==null)throw new r("Signer is required to create a wallet");switch(t.type){case"api-key":{let n;switch(e.type){case"solana-smart-wallet":n=e.config.adminSigner.address;break;case"evm-smart-wallet":e.config.adminSigner.type==="evm-fireblocks-custodial"&&(n=e.config.adminSigner.address);break}if(n==null)throw new r("Wallet signer 'api-key' has no address");return{type:"api-key",address:n}}case"external-wallet":return t;case"passkey":if(e.type==="evm-smart-wallet"&&e.config.adminSigner.type==="evm-passkey")return{type:"passkey",id:e.config.adminSigner.id,name:e.config.adminSigner.name,onCreatePasskey:t.onCreatePasskey,onSignWithPasskey:t.onSignWithPasskey};throw new r("Passkey signer is not supported for this wallet type");case"email":{if(e.type!=="solana-smart-wallet"||e.config.adminSigner.type!=="solana-keypair")throw new r("Wallet signer 'email' has no address");let n=e.config.adminSigner.address;return{type:"email",email:(a=t.email)!=null?a:(i=this.apiClient.crossmint.experimental_customAuth)==null?void 0:i.email,signerAddress:n,crossmint:this.apiClient.crossmint,onAuthRequired:t.onAuthRequired,_handshakeParent:t._handshakeParent}}default:throw new Error("Invalid signer type")}}configureSigner(e,t){return s(this,null,function*(){var i;if((t==null?void 0:t.type)==="passkey"){let a=(i=t.name)!=null?i:`Crossmint Wallet ${Date.now()}`,n=t.onCreatePasskey?yield t.onCreatePasskey(a):yield h.createCredential({name:a});return{type:"evm-passkey",id:n.id,name:a,publicKey:{x:n.publicKey.x.toString(),y:n.publicKey.y.toString()}}}return yield this.toExternalSignerConfig(e,t)})}toExternalSignerConfig(e,t,i){return s(this,null,function*(){var a,n;if(!t||t.type==="api-key")return{type:e==="solana"?"solana-fireblocks-custodial":"evm-fireblocks-custodial"};if(t.type==="external-wallet")return{type:e==="solana"?"solana-keypair":"evm-keypair",address:t.address};if(t.type==="passkey"&&i!=null){if((i==null?void 0:i.type)!=="evm-smart-wallet"||i.config.adminSigner.type!=="evm-passkey")throw new r("Passkey signer is not supported for this wallet type");return{type:"evm-passkey",id:i.config.adminSigner.id,name:i.config.adminSigner.name,publicKey:{x:i.config.adminSigner.publicKey.x,y:i.config.adminSigner.publicKey.y}}}if(t.type==="email"){let o=(n=t.email)!=null?n:(a=this.apiClient.crossmint.experimental_customAuth)==null?void 0:a.email;if(o==null)throw new Error("Email is required to create a wallet with email signer");if(e!=="solana")throw new Error("Email signer is only supported for Solana wallets");return{type:"solana-keypair",address:yield m.pregenerateSigner(o,this.apiClient.crossmint)}}throw new Error("Invalid signer type")})}validateWalletConfig(e,t){return s(this,null,function*(){if(t.owner!=null&&e.linkedUser!=null&&t.owner!==e.linkedUser)throw new r("Wallet owner does not match existing wallet's linked user");if(e.type!=="solana-smart-wallet"&&e.type!=="evm-smart-wallet")return;let i=yield this.toExternalSignerConfig(t.chain,t.signer,e),a=e.config.adminSigner;if(i&&a){if(i.type!==a.type)throw new r("The wallet signer type provided in the wallet config does not match the existing wallet's adminSigner type");C(i,a)}})}};export{f as a};
|
package/dist/chunk-NOOBYBKD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./chunk-YKPKNCFG.js";import{a as i}from"./chunk-OV4CFQ36.js";import{a as o}from"./chunk-77QBSFHG.js";import{a}from"./chunk-T3ICQDFS.js";import{a as l}from"./chunk-2KK65AC6.js";import{a as t}from"./chunk-QTSZSHKK.js";function f(r,e){switch(e.type){case"email":return new n(e);case"api-key":return r==="solana"?new o(e):new l(e);case"external-wallet":return r==="solana"?new a(e):new t(e);case"passkey":return new i(e)}}export{f as a};
|
package/dist/chunk-ROO2DTKQ.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkW4MKUPUFcjs = require('./chunk-W4MKUPUF.cjs');var _chunkCT2UGJELcjs = require('./chunk-CT2UGJEL.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var a=class extends _commonsdkbase.CrossmintApiClient{constructor(e){super(e,{internalConfig:{sdkMetadata:{name:_chunkW4MKUPUFcjs.c,version:_chunkW4MKUPUFcjs.b}}});this.apiPrefix="api/v1/signers"}pregenerateSigner(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let r=yield this.post(`${this.apiPrefix}/derive-public-key`,{body:JSON.stringify({authId:`email:${e}`,keyType:"ed25519"}),headers:this.headers});if(!r.ok){let o=yield r.text();throw new Error(`Failed to fetch public key: ${r.status} ${o}`)}return yield r.json()})}get isServerSide(){return this.parsedAPIKey.usageOrigin===_commonsdkbase.APIKeyUsageOrigin.SERVER}get environment(){if(!this.parsedAPIKey.isValid)throw new (0, _chunkCT2UGJELcjs.a)("Invalid API key");return this.parsedAPIKey.environment}get headers(){return{"Content-Type":"application/json"}}};exports.a = a;
|
package/dist/chunk-TVZORU22.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUO6UBZQ7cjs = require('./chunk-UO6UBZQ7.cjs');var _chunkDYRSQN7Xcjs = require('./chunk-DYRSQN7X.cjs');var _chunkNVJN7LPYcjs = require('./chunk-NVJN7LPY.cjs');var _chunkAFYBD7FIcjs = require('./chunk-AFYBD7FI.cjs');var _chunkYO6BJ2DIcjs = require('./chunk-YO6BJ2DI.cjs');var _chunkDIZVZP5Pcjs = require('./chunk-DIZVZP5P.cjs');function w(r,e){switch(e.type){case"email":return new (0, _chunkUO6UBZQ7cjs.a)(e);case"api-key":return r==="solana"?new (0, _chunkNVJN7LPYcjs.a)(e):new (0, _chunkYO6BJ2DIcjs.a)(e);case"external-wallet":return r==="solana"?new (0, _chunkAFYBD7FIcjs.a)(e):new (0, _chunkDIZVZP5Pcjs.a)(e);case"passkey":return new (0, _chunkDYRSQN7Xcjs.a)(e)}}exports.a = w;
|
package/dist/chunk-UO6UBZQ7.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkZWDS66FScjs = require('./chunk-ZWDS66FS.cjs');var _chunkROO2DTKQcjs = require('./chunk-ROO2DTKQ.cjs');var _chunkZSWIQU3Ucjs = require('./chunk-ZSWIQU3U.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _web3js = require('@solana/web3.js');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var _commonsdkbase = require('@crossmint/common-sdk-base');var p=class{constructor(e){this.config=e;this.type="email";this._needsAuth=!0;this._authPromise=null;this.initialize()}locator(){return`solana-keypair:${this.config.signerAddress}`}initialize(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(this.config._handshakeParent==null){let e=_commonsdkbase.validateAPIKey.call(void 0, this.config.crossmint.apiKey);if(!e.isValid)throw new Error("Invalid API key");let s=new (0, _chunkZWDS66FScjs.a)({environment:e.environment});this.config._handshakeParent=yield s.initialize()}})}signMessage(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for email signer"))})}signTransaction(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var n,o,r;yield this.handleAuthRequired();let s=_bs582.default.decode(e),a=_web3js.VersionedTransaction.deserialize(s).message.serialize(),t=yield(r=this.config._handshakeParent)==null?void 0:r.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:(o=(n=this.config.crossmint.experimental_customAuth)==null?void 0:n.jwt)!=null?o:"",apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:_bs582.default.encode(a),encoding:"base58"}},options:h});if((t==null?void 0:t.status)==="error")throw new Error(t.error);if((t==null?void 0:t.signature)==null)throw new Error("Failed to sign transaction");return{signature:t.signature.bytes}})}handleAuthRequired(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var t,n,o;if(this.config._handshakeParent==null)throw new Error("Handshake parent not initialized");let e=yield(o=this.config._handshakeParent)==null?void 0:o.sendAction({event:"request:get-status",responseEvent:"response:get-status",data:{authData:{jwt:(n=(t=this.config.crossmint.experimental_customAuth)==null?void 0:t.jwt)!=null?n:"",apiKey:this.config.crossmint.apiKey}},options:h});if((e==null?void 0:e.status)!=="success")throw new Error(e==null?void 0:e.error);if(e.signerStatus==="ready"){this._needsAuth=!1;return}let{promise:s,resolve:i,reject:a}=this.createAuthPromise();if(this._authPromise={promise:s,resolve:i,reject:a},this.config.onAuthRequired)try{yield this.config.onAuthRequired(this._needsAuth,()=>this.sendEmailWithOtp(),r=>this.verifyOtp(r),()=>a(new _chunkZSWIQU3Ucjs.a))}catch(r){a(r)}try{yield s}catch(r){throw r}})}createAuthPromise(){let e,s;return{promise:new Promise((a,t)=>{e=a,s=t}),resolve:e,reject:s}}sendEmailWithOtp(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var a,t,n;if(this.config._handshakeParent==null)throw new Error("Handshake parent not initialized");let e=this.config._handshakeParent,s=`email:${this.config.email}`,i=yield e.sendAction({event:"request:start-onboarding",responseEvent:"response:start-onboarding",data:{authData:{jwt:(t=(a=this.config.crossmint.experimental_customAuth)==null?void 0:a.jwt)!=null?t:"",apiKey:this.config.crossmint.apiKey},data:{authId:s}},options:h});if((i==null?void 0:i.status)==="success"&&i.signerStatus==="ready"){this._needsAuth=!1;return}(i==null?void 0:i.status)==="error"&&(console.error("[sendEmailWithOtp] Failed to send OTP:",i),(n=this._authPromise)==null||n.reject(new Error(i.error||"Failed to initiate OTP process.")))})}verifyOtp(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var i,a,t,n,o;if(this.config._handshakeParent==null)throw new Error("Handshake parent not initialized");let s=this.config._handshakeParent;try{let r=yield s.sendAction({event:"request:complete-onboarding",responseEvent:"response:complete-onboarding",data:{authData:{jwt:(a=(i=this.config.crossmint.experimental_customAuth)==null?void 0:i.jwt)!=null?a:"",apiKey:this.config.crossmint.apiKey},data:{onboardingAuthentication:{encryptedOtp:e}}},options:h});if((r==null?void 0:r.status)==="success"){this._needsAuth=!1,(t=this._authPromise)==null||t.resolve();return}console.error("[verifyOtp] Failed to validate OTP:",r),this._needsAuth=!0;let g=(r==null?void 0:r.status)==="error"?r.error:"Failed to validate encrypted OTP";(n=this._authPromise)==null||n.reject(new Error(g))}catch(r){throw console.error("[verifyOtp] Error sending OTP validation request:",r),this._needsAuth=!0,(o=this._authPromise)==null||o.reject(r),r}})}static pregenerateSigner(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var a;let i=e!=null?e:(a=s.experimental_customAuth)==null?void 0:a.email;if(i==null)throw new Error("Email is required to pregenerate a signer");try{let n=(yield new (0, _chunkROO2DTKQcjs.a)(s).pregenerateSigner(i)).publicKey;if(n==null)throw new Error("No public key found");if(n.encoding!=="base58"||n.keyType!=="ed25519"||n.bytes==null)throw new Error("Not supported. Expected public key to be in base58 encoding and ed25519 key type. Got: "+JSON.stringify(n));return n.bytes}catch(t){throw console.error("[EmailSigner] Failed to pregenerate signer:",t),t}})}},h={timeoutMs:1e4,intervalMs:5e3};exports.a = p;
|
package/dist/chunk-YKPKNCFG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-PDL3XF5M.js";import{a as u}from"./chunk-5PQGSQCD.js";import{a as d}from"./chunk-M4ELAV7U.js";import{f as c}from"./chunk-BW7YYVZE.js";import{VersionedTransaction as f}from"@solana/web3.js";import m from"bs58";import{validateAPIKey as y}from"@crossmint/common-sdk-base";var p=class{constructor(e){this.config=e;this.type="email";this._needsAuth=!0;this._authPromise=null;this.initialize()}locator(){return`solana-keypair:${this.config.signerAddress}`}initialize(){return c(this,null,function*(){if(this.config._handshakeParent==null){let e=y(this.config.crossmint.apiKey);if(!e.isValid)throw new Error("Invalid API key");let s=new l({environment:e.environment});this.config._handshakeParent=yield s.initialize()}})}signMessage(){return c(this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for email signer"))})}signTransaction(e){return c(this,null,function*(){var n,o,r;yield this.handleAuthRequired();let s=m.decode(e),a=f.deserialize(s).message.serialize(),t=yield(r=this.config._handshakeParent)==null?void 0:r.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:(o=(n=this.config.crossmint.experimental_customAuth)==null?void 0:n.jwt)!=null?o:"",apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:m.encode(a),encoding:"base58"}},options:h});if((t==null?void 0:t.status)==="error")throw new Error(t.error);if((t==null?void 0:t.signature)==null)throw new Error("Failed to sign transaction");return{signature:t.signature.bytes}})}handleAuthRequired(){return c(this,null,function*(){var t,n,o;if(this.config._handshakeParent==null)throw new Error("Handshake parent not initialized");let e=yield(o=this.config._handshakeParent)==null?void 0:o.sendAction({event:"request:get-status",responseEvent:"response:get-status",data:{authData:{jwt:(n=(t=this.config.crossmint.experimental_customAuth)==null?void 0:t.jwt)!=null?n:"",apiKey:this.config.crossmint.apiKey}},options:h});if((e==null?void 0:e.status)!=="success")throw new Error(e==null?void 0:e.error);if(e.signerStatus==="ready"){this._needsAuth=!1;return}let{promise:s,resolve:i,reject:a}=this.createAuthPromise();if(this._authPromise={promise:s,resolve:i,reject:a},this.config.onAuthRequired)try{yield this.config.onAuthRequired(this._needsAuth,()=>this.sendEmailWithOtp(),r=>this.verifyOtp(r),()=>a(new d))}catch(r){a(r)}try{yield s}catch(r){throw r}})}createAuthPromise(){let e,s;return{promise:new Promise((a,t)=>{e=a,s=t}),resolve:e,reject:s}}sendEmailWithOtp(){return c(this,null,function*(){var a,t,n;if(this.config._handshakeParent==null)throw new Error("Handshake parent not initialized");let e=this.config._handshakeParent,s=`email:${this.config.email}`,i=yield e.sendAction({event:"request:start-onboarding",responseEvent:"response:start-onboarding",data:{authData:{jwt:(t=(a=this.config.crossmint.experimental_customAuth)==null?void 0:a.jwt)!=null?t:"",apiKey:this.config.crossmint.apiKey},data:{authId:s}},options:h});if((i==null?void 0:i.status)==="success"&&i.signerStatus==="ready"){this._needsAuth=!1;return}(i==null?void 0:i.status)==="error"&&(console.error("[sendEmailWithOtp] Failed to send OTP:",i),(n=this._authPromise)==null||n.reject(new Error(i.error||"Failed to initiate OTP process.")))})}verifyOtp(e){return c(this,null,function*(){var i,a,t,n,o;if(this.config._handshakeParent==null)throw new Error("Handshake parent not initialized");let s=this.config._handshakeParent;try{let r=yield s.sendAction({event:"request:complete-onboarding",responseEvent:"response:complete-onboarding",data:{authData:{jwt:(a=(i=this.config.crossmint.experimental_customAuth)==null?void 0:i.jwt)!=null?a:"",apiKey:this.config.crossmint.apiKey},data:{onboardingAuthentication:{encryptedOtp:e}}},options:h});if((r==null?void 0:r.status)==="success"){this._needsAuth=!1,(t=this._authPromise)==null||t.resolve();return}console.error("[verifyOtp] Failed to validate OTP:",r),this._needsAuth=!0;let g=(r==null?void 0:r.status)==="error"?r.error:"Failed to validate encrypted OTP";(n=this._authPromise)==null||n.reject(new Error(g))}catch(r){throw console.error("[verifyOtp] Error sending OTP validation request:",r),this._needsAuth=!0,(o=this._authPromise)==null||o.reject(r),r}})}static pregenerateSigner(e,s){return c(this,null,function*(){var a;let i=e!=null?e:(a=s.experimental_customAuth)==null?void 0:a.email;if(i==null)throw new Error("Email is required to pregenerate a signer");try{let n=(yield new u(s).pregenerateSigner(i)).publicKey;if(n==null)throw new Error("No public key found");if(n.encoding!=="base58"||n.keyType!=="ed25519"||n.bytes==null)throw new Error("Not supported. Expected public key to be in base58 encoding and ed25519 key type. Got: "+JSON.stringify(n));return n.bytes}catch(t){throw console.error("[EmailSigner] Failed to pregenerate signer:",t),t}})}},h={timeoutMs:1e4,intervalMs:5e3};export{p as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUO6UBZQ7cjs = require('../../chunk-UO6UBZQ7.cjs');require('../../chunk-ZWDS66FS.cjs');require('../../chunk-ROO2DTKQ.cjs');require('../../chunk-ZSWIQU3U.cjs');require('../../chunk-W4MKUPUF.cjs');require('../../chunk-CT2UGJEL.cjs');require('../../chunk-XALFCQKD.cjs');exports.EmailSigner = _chunkUO6UBZQ7cjs.a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../../chunk-YKPKNCFG.js";import"../../chunk-PDL3XF5M.js";import"../../chunk-5PQGSQCD.js";import"../../chunk-M4ELAV7U.js";import"../../chunk-FPSS2IYY.js";import"../../chunk-7ENJXL4H.js";import"../../chunk-BW7YYVZE.js";export{a as EmailSigner};
|
|
File without changes
|
|
File without changes
|