@crossmint/wallets-sdk 0.10.9 → 0.10.10
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.d.cts +2 -2
- package/dist/api/client.d.ts +2 -2
- package/dist/api/client.js +1 -1
- package/dist/api/gen/index.cjs +1 -1
- package/dist/api/gen/index.d.cts +2 -2
- package/dist/api/gen/index.d.ts +2 -2
- 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 +201 -10
- package/dist/api/gen/sdk.gen.d.ts +201 -10
- package/dist/api/gen/sdk.gen.js +1 -1
- package/dist/api/gen/types.gen.d.cts +8130 -3074
- package/dist/api/gen/types.gen.d.ts +8130 -3074
- 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 +40 -28
- package/dist/api/types.d.ts +40 -28
- package/dist/chunk-2RYV526P.js +1 -0
- package/dist/chunk-3A5IGCCQ.js +1 -0
- package/dist/chunk-3VBHCOMA.cjs +1 -0
- package/dist/chunk-4KXOWU5E.cjs +1 -0
- package/dist/chunk-5S6YZJHE.js +1 -0
- package/dist/chunk-7F2XBOHW.js +1 -0
- package/dist/chunk-BM7YI7RZ.js +1 -0
- package/dist/chunk-BPUDXO56.js +1 -0
- package/dist/chunk-BULGM35W.cjs +1 -0
- package/dist/chunk-EXY25K62.cjs +1 -0
- package/dist/chunk-HTM5EELI.cjs +1 -0
- package/dist/chunk-IGBQEAD5.js +1 -0
- package/dist/chunk-IJMFCZIY.js +1 -0
- package/dist/chunk-IZPWMIWD.cjs +1 -0
- package/dist/chunk-JHLGQJW3.js +1 -0
- package/dist/chunk-KH5LXU3K.cjs +1 -0
- package/dist/chunk-KPWPRH6J.cjs +1 -0
- package/dist/chunk-LMDBWVPC.js +1 -0
- package/dist/chunk-LW6JSI4J.js +1 -0
- package/dist/{chunk-36Z3WOLW.js → chunk-NEEKQHR3.js} +1 -1
- package/dist/{chunk-FBNQVPXQ.cjs → chunk-NIO5D63W.cjs} +1 -1
- package/dist/chunk-RFK6N7LC.cjs +1 -0
- package/dist/chunk-RMIMNREY.js +1 -0
- package/dist/chunk-RSISNAJJ.cjs +1 -0
- package/dist/chunk-SCS4UDW7.js +1 -0
- package/dist/chunk-SHDM6MXU.js +1 -0
- package/dist/chunk-SLEKIJXX.cjs +1 -0
- package/dist/{chunk-5HBL6I5V.cjs → chunk-STUTWUOQ.cjs} +1 -1
- package/dist/chunk-TCTVRXRX.cjs +1 -0
- package/dist/chunk-UBOWSXW3.js +1 -0
- package/dist/{chunk-KBBVSGHP.js → chunk-XVQ5TWFN.js} +1 -1
- package/dist/chunk-YTAW674L.cjs +1 -0
- package/dist/chunk-YWPTI2QO.cjs +1 -0
- package/dist/chunk-YZ4HRYSL.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/sdk.cjs +1 -1
- package/dist/sdk.d.cts +1 -1
- package/dist/sdk.d.ts +1 -1
- package/dist/sdk.js +1 -1
- package/dist/signers/email/evm-email-signer.cjs +1 -1
- package/dist/signers/email/evm-email-signer.d.cts +1 -2
- package/dist/signers/email/evm-email-signer.d.ts +1 -2
- package/dist/signers/email/evm-email-signer.js +1 -1
- package/dist/signers/email/index.cjs +1 -1
- package/dist/signers/email/index.js +1 -1
- package/dist/signers/email/solana-email-signer.cjs +1 -1
- package/dist/signers/email/solana-email-signer.d.cts +1 -2
- package/dist/signers/email/solana-email-signer.d.ts +1 -2
- package/dist/signers/email/solana-email-signer.js +1 -1
- package/dist/signers/evm-api-key.cjs +1 -1
- package/dist/signers/evm-api-key.js +1 -1
- package/dist/signers/evm-external-wallet.cjs +1 -1
- package/dist/signers/evm-external-wallet.d.cts +5 -4
- package/dist/signers/evm-external-wallet.d.ts +5 -4
- package/dist/signers/evm-external-wallet.js +1 -1
- package/dist/signers/index.cjs +1 -1
- package/dist/signers/index.js +1 -1
- package/dist/signers/passkey.cjs +1 -1
- package/dist/signers/passkey.js +1 -1
- package/dist/signers/solana-api-key.cjs +1 -1
- package/dist/signers/solana-api-key.js +1 -1
- package/dist/signers/solana-external-wallet.cjs +1 -1
- package/dist/signers/solana-external-wallet.d.cts +5 -4
- package/dist/signers/solana-external-wallet.d.ts +5 -4
- package/dist/signers/solana-external-wallet.js +1 -1
- package/dist/signers/types.d.cts +6 -2
- package/dist/signers/types.d.ts +6 -2
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/signer-validation.cjs +1 -1
- package/dist/utils/signer-validation.d.cts +2 -2
- package/dist/utils/signer-validation.d.ts +2 -2
- package/dist/utils/signer-validation.js +1 -1
- package/dist/wallets/evm.cjs +1 -1
- package/dist/wallets/evm.js +1 -1
- package/dist/wallets/solana.cjs +1 -1
- package/dist/wallets/solana.js +1 -1
- package/dist/wallets/wallet-factory.cjs +1 -1
- package/dist/wallets/wallet-factory.d.cts +3 -3
- package/dist/wallets/wallet-factory.d.ts +3 -3
- package/dist/wallets/wallet-factory.js +1 -1
- package/dist/wallets/wallet.cjs +1 -1
- package/dist/wallets/wallet.d.cts +9 -9
- package/dist/wallets/wallet.d.ts +9 -9
- package/dist/wallets/wallet.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-2KK65AC6.js +0 -1
- package/dist/chunk-2LOGLK6Y.js +0 -1
- package/dist/chunk-3KB2VQVH.js +0 -1
- package/dist/chunk-5IM7I7EX.cjs +0 -1
- package/dist/chunk-5XUQSU22.js +0 -1
- package/dist/chunk-63KMVANB.cjs +0 -1
- package/dist/chunk-6DVCB4VI.cjs +0 -1
- package/dist/chunk-6YFK33UZ.js +0 -1
- package/dist/chunk-77QBSFHG.js +0 -1
- package/dist/chunk-AFYBD7FI.cjs +0 -1
- package/dist/chunk-AHG6IQT7.cjs +0 -1
- package/dist/chunk-C7GUSH3M.js +0 -1
- package/dist/chunk-CGAFBZHZ.cjs +0 -1
- package/dist/chunk-CTZE2MXB.js +0 -1
- package/dist/chunk-DIZVZP5P.cjs +0 -1
- package/dist/chunk-DYRSQN7X.cjs +0 -1
- package/dist/chunk-FUUYGB4K.js +0 -1
- package/dist/chunk-GEEQGXHO.cjs +0 -1
- package/dist/chunk-HTEW2JRC.cjs +0 -1
- package/dist/chunk-MHBF3VBC.js +0 -1
- package/dist/chunk-MPTRSUNX.cjs +0 -1
- package/dist/chunk-NGODR2AA.cjs +0 -1
- package/dist/chunk-NVJN7LPY.cjs +0 -1
- package/dist/chunk-OV4CFQ36.js +0 -1
- package/dist/chunk-PHIPQLW2.js +0 -1
- package/dist/chunk-Q3WOEBKN.js +0 -1
- package/dist/chunk-QTSZSHKK.js +0 -1
- package/dist/chunk-RD5PG4M6.cjs +0 -1
- package/dist/chunk-RSM6MX6W.js +0 -1
- package/dist/chunk-T3ICQDFS.js +0 -1
- package/dist/chunk-UMX5PW5P.cjs +0 -1
- package/dist/chunk-YO6BJ2DI.cjs +0 -1
- package/dist/signers/email/email-signer-api-client.cjs +0 -1
- package/dist/signers/email/email-signer-api-client.d.cts +0 -14
- package/dist/signers/email/email-signer-api-client.d.ts +0 -14
- package/dist/signers/email/email-signer-api-client.js +0 -1
package/dist/api/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');var _chunkSTUTWUOQcjs = require('../chunk-STUTWUOQ.cjs');require('../chunk-HTM5EELI.cjs');require('../chunk-CT2UGJEL.cjs');require('../chunk-ECAM5KTH.cjs');require('../chunk-XALFCQKD.cjs');exports.ApiClient = _chunkSTUTWUOQcjs.a;
|
package/dist/api/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ApiClient } from './client.cjs';
|
|
2
|
-
export { Activity, ApproveSignatureParams, ApproveSignatureResponse, ApproveTransactionParams, ApproveTransactionResponse, CreateSignatureParams, CreateSignatureResponse, CreateTransactionParams, CreateTransactionResponse, CreateTransactionSuccessResponse, CreateWalletParams, CreateWalletResponse, DelegatedSigner,
|
|
2
|
+
export { Activity, AdminSignerConfig, ApproveSignatureParams, ApproveSignatureResponse, ApproveTransactionParams, ApproveTransactionResponse, CreateSignatureParams, CreateSignatureResponse, CreateTransactionParams, CreateTransactionResponse, CreateTransactionSuccessResponse, CreateWalletParams, CreateWalletResponse, DelegatedSigner, GetActivityResponse, GetBalanceResponse, GetBalanceSuccessResponse, GetDelegatedSignersResponse, GetNftsResponse, GetSignatureResponse, GetSignerResponse, GetTransactionResponse, GetTransactionSuccessResponse, GetTransactionsResponse, GetWalletResponse, GetWalletSuccessResponse, RegisterSignerChain, RegisterSignerParams, RegisterSignerPasskeyParams, RegisterSignerResponse, SendParams, SendResponse, WalletLocator } from './types.cjs';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import '../chains/chains.cjs';
|
|
5
5
|
import 'viem';
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ApiClient } from './client.js';
|
|
2
|
-
export { Activity, ApproveSignatureParams, ApproveSignatureResponse, ApproveTransactionParams, ApproveTransactionResponse, CreateSignatureParams, CreateSignatureResponse, CreateTransactionParams, CreateTransactionResponse, CreateTransactionSuccessResponse, CreateWalletParams, CreateWalletResponse, DelegatedSigner,
|
|
2
|
+
export { Activity, AdminSignerConfig, ApproveSignatureParams, ApproveSignatureResponse, ApproveTransactionParams, ApproveTransactionResponse, CreateSignatureParams, CreateSignatureResponse, CreateTransactionParams, CreateTransactionResponse, CreateTransactionSuccessResponse, CreateWalletParams, CreateWalletResponse, DelegatedSigner, GetActivityResponse, GetBalanceResponse, GetBalanceSuccessResponse, GetDelegatedSignersResponse, GetNftsResponse, GetSignatureResponse, GetSignerResponse, GetTransactionResponse, GetTransactionSuccessResponse, GetTransactionsResponse, GetWalletResponse, GetWalletSuccessResponse, RegisterSignerChain, RegisterSignerParams, RegisterSignerPasskeyParams, RegisterSignerResponse, SendParams, SendResponse, WalletLocator } from './types.js';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import '../chains/chains.js';
|
|
5
5
|
import 'viem';
|
package/dist/api/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-5IFDVB4Y.js";import{a}from"../chunk-
|
|
1
|
+
import"../chunk-5IFDVB4Y.js";import{a}from"../chunk-NEEKQHR3.js";import"../chunk-7F2XBOHW.js";import"../chunk-7ENJXL4H.js";import"../chunk-KBJA7JDT.js";import"../chunk-BW7YYVZE.js";export{a as ApiClient};
|
package/dist/api/types.d.cts
CHANGED
|
@@ -1,39 +1,51 @@
|
|
|
1
1
|
import { Address } from 'viem';
|
|
2
|
-
import {
|
|
2
|
+
import { CreateWalletV2025Dto, WalletV2025ResponseDto, WalletV1Alpha2ErrorDto, CreateTransactionV2025Dto, WalletsTransactionV2025ResponseDto, WalletV1Alpha2TransactionErrorDto, SubmitApprovalV2025Dto, WalletsV1ControllerSubmitApprovals4Error, WalletsV1ControllerGetTransaction4Error, CreateSignatureV2025Dto, WalletsSignatureV2025ResponseDto, WalletsV1ControllerCreateSignatureRequest4Error, WalletsV1ControllerSubmitSignatureApprovals4Error, WalletsV1ControllerGetSignature4Error, WalletsMultipleTransactionV2025ResponseDto, WalletsV1ControllerGetTransactionsWithoutChain4Error, WalletNftsResponseDto, WalletsV1Alpha2ActivityResponseDto, WalletBalanceV20250609ResponseDto, BalanceControllerGetBalanceForLocator2Error, CreateSignerV2025InputDto, DelegatedSignerV2025Dto, WalletsV1ControllerCreateDelegatedSigner4Error, WalletsV1ControllerGetDelegatedSigner4Error, SendTokenDto, WalletsSendTokenControllerSendToken2Response } from './gen/types.gen.cjs';
|
|
3
3
|
|
|
4
|
-
type CreateWalletParams =
|
|
5
|
-
type GetWalletSuccessResponse =
|
|
4
|
+
type CreateWalletParams = CreateWalletV2025Dto;
|
|
5
|
+
type GetWalletSuccessResponse = WalletV2025ResponseDto;
|
|
6
6
|
type CreateWalletResponse = GetWalletSuccessResponse | WalletV1Alpha2ErrorDto;
|
|
7
7
|
type GetWalletResponse = GetWalletSuccessResponse | WalletV1Alpha2ErrorDto;
|
|
8
|
-
type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
type
|
|
12
|
-
type
|
|
13
|
-
type
|
|
14
|
-
type
|
|
15
|
-
type
|
|
16
|
-
type
|
|
17
|
-
type
|
|
18
|
-
type
|
|
19
|
-
type
|
|
20
|
-
type
|
|
21
|
-
type
|
|
22
|
-
type
|
|
23
|
-
type
|
|
8
|
+
type AdminSignerConfig = NonNullable<Extract<CreateWalletV2025Dto, {
|
|
9
|
+
chainType: "evm" | "solana";
|
|
10
|
+
}>["config"]>["adminSigner"];
|
|
11
|
+
type CreateTransactionParams = CreateTransactionV2025Dto;
|
|
12
|
+
type CreateTransactionSuccessResponse = WalletsTransactionV2025ResponseDto;
|
|
13
|
+
type CreateTransactionResponse = CreateTransactionSuccessResponse | WalletV1Alpha2TransactionErrorDto;
|
|
14
|
+
type ApproveTransactionParams = SubmitApprovalV2025Dto;
|
|
15
|
+
type ApproveTransactionResponse = WalletsTransactionV2025ResponseDto | WalletsV1ControllerSubmitApprovals4Error;
|
|
16
|
+
type GetTransactionResponse = WalletsTransactionV2025ResponseDto | WalletsV1ControllerGetTransaction4Error;
|
|
17
|
+
type GetTransactionSuccessResponse = WalletsTransactionV2025ResponseDto;
|
|
18
|
+
type CreateSignatureParams = CreateSignatureV2025Dto;
|
|
19
|
+
type CreateSignatureResponse = WalletsSignatureV2025ResponseDto | WalletsV1ControllerCreateSignatureRequest4Error;
|
|
20
|
+
type ApproveSignatureParams = SubmitApprovalV2025Dto;
|
|
21
|
+
type ApproveSignatureResponse = WalletsSignatureV2025ResponseDto | WalletsV1ControllerSubmitSignatureApprovals4Error;
|
|
22
|
+
type GetSignatureResponse = WalletsSignatureV2025ResponseDto | WalletsV1ControllerGetSignature4Error;
|
|
23
|
+
type GetTransactionsResponse = WalletsMultipleTransactionV2025ResponseDto | WalletsV1ControllerGetTransactionsWithoutChain4Error;
|
|
24
|
+
type GetNftsResponse = WalletNftsResponseDto;
|
|
25
|
+
type GetBalanceResponse = WalletBalanceV20250609ResponseDto | BalanceControllerGetBalanceForLocator2Error;
|
|
26
|
+
type GetBalanceSuccessResponse = WalletBalanceV20250609ResponseDto;
|
|
24
27
|
type GetActivityResponse = WalletsV1Alpha2ActivityResponseDto | WalletV1Alpha2ErrorDto;
|
|
25
28
|
type Activity = WalletsV1Alpha2ActivityResponseDto;
|
|
26
|
-
type
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
type
|
|
30
|
-
type
|
|
29
|
+
type RegisterSignerChain = Extract<CreateSignerV2025InputDto, {
|
|
30
|
+
chain: any;
|
|
31
|
+
}>["chain"];
|
|
32
|
+
type RegisterSignerPasskeyParams = Extract<CreateSignerV2025InputDto["signer"], {
|
|
33
|
+
type: "passkey";
|
|
34
|
+
}>;
|
|
35
|
+
type RegisterSignerParams = {
|
|
36
|
+
signer: string | RegisterSignerPasskeyParams;
|
|
37
|
+
chain?: RegisterSignerChain;
|
|
38
|
+
};
|
|
39
|
+
type RegisterSignerResponse = DelegatedSignerV2025Dto | WalletsV1ControllerCreateDelegatedSigner4Error;
|
|
40
|
+
type GetSignerResponse = DelegatedSignerV2025Dto | WalletsV1ControllerGetDelegatedSigner4Error;
|
|
41
|
+
type GetDelegatedSignersResponse = Array<DelegatedSignerV2025Dto> | WalletsV1ControllerGetDelegatedSigner4Error;
|
|
42
|
+
type DelegatedSigner = DelegatedSignerV2025Dto;
|
|
31
43
|
type SendParams = SendTokenDto;
|
|
32
44
|
type SendResponse = WalletsSendTokenControllerSendToken2Response;
|
|
33
|
-
type WalletType =
|
|
34
|
-
type EvmWalletLocator = `me:${WalletType}` | Address;
|
|
45
|
+
type WalletType = "smart" | "mpc";
|
|
35
46
|
type SolanaAddress = string;
|
|
36
|
-
type
|
|
47
|
+
type EvmWalletLocator = `me:evm:${WalletType}` | Address;
|
|
48
|
+
type SolanaWalletLocator = `me:solana:${WalletType}` | SolanaAddress;
|
|
37
49
|
type WalletLocator = EvmWalletLocator | SolanaWalletLocator;
|
|
38
50
|
|
|
39
|
-
export type { Activity, ApproveSignatureParams, ApproveSignatureResponse, ApproveTransactionParams, ApproveTransactionResponse, CreateSignatureParams, CreateSignatureResponse, CreateTransactionParams, CreateTransactionResponse, CreateTransactionSuccessResponse, CreateWalletParams, CreateWalletResponse, DelegatedSigner,
|
|
51
|
+
export type { Activity, AdminSignerConfig, ApproveSignatureParams, ApproveSignatureResponse, ApproveTransactionParams, ApproveTransactionResponse, CreateSignatureParams, CreateSignatureResponse, CreateTransactionParams, CreateTransactionResponse, CreateTransactionSuccessResponse, CreateWalletParams, CreateWalletResponse, DelegatedSigner, GetActivityResponse, GetBalanceResponse, GetBalanceSuccessResponse, GetDelegatedSignersResponse, GetNftsResponse, GetSignatureResponse, GetSignerResponse, GetTransactionResponse, GetTransactionSuccessResponse, GetTransactionsResponse, GetWalletResponse, GetWalletSuccessResponse, RegisterSignerChain, RegisterSignerParams, RegisterSignerPasskeyParams, RegisterSignerResponse, SendParams, SendResponse, WalletLocator };
|
package/dist/api/types.d.ts
CHANGED
|
@@ -1,39 +1,51 @@
|
|
|
1
1
|
import { Address } from 'viem';
|
|
2
|
-
import {
|
|
2
|
+
import { CreateWalletV2025Dto, WalletV2025ResponseDto, WalletV1Alpha2ErrorDto, CreateTransactionV2025Dto, WalletsTransactionV2025ResponseDto, WalletV1Alpha2TransactionErrorDto, SubmitApprovalV2025Dto, WalletsV1ControllerSubmitApprovals4Error, WalletsV1ControllerGetTransaction4Error, CreateSignatureV2025Dto, WalletsSignatureV2025ResponseDto, WalletsV1ControllerCreateSignatureRequest4Error, WalletsV1ControllerSubmitSignatureApprovals4Error, WalletsV1ControllerGetSignature4Error, WalletsMultipleTransactionV2025ResponseDto, WalletsV1ControllerGetTransactionsWithoutChain4Error, WalletNftsResponseDto, WalletsV1Alpha2ActivityResponseDto, WalletBalanceV20250609ResponseDto, BalanceControllerGetBalanceForLocator2Error, CreateSignerV2025InputDto, DelegatedSignerV2025Dto, WalletsV1ControllerCreateDelegatedSigner4Error, WalletsV1ControllerGetDelegatedSigner4Error, SendTokenDto, WalletsSendTokenControllerSendToken2Response } from './gen/types.gen.js';
|
|
3
3
|
|
|
4
|
-
type CreateWalletParams =
|
|
5
|
-
type GetWalletSuccessResponse =
|
|
4
|
+
type CreateWalletParams = CreateWalletV2025Dto;
|
|
5
|
+
type GetWalletSuccessResponse = WalletV2025ResponseDto;
|
|
6
6
|
type CreateWalletResponse = GetWalletSuccessResponse | WalletV1Alpha2ErrorDto;
|
|
7
7
|
type GetWalletResponse = GetWalletSuccessResponse | WalletV1Alpha2ErrorDto;
|
|
8
|
-
type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
type
|
|
12
|
-
type
|
|
13
|
-
type
|
|
14
|
-
type
|
|
15
|
-
type
|
|
16
|
-
type
|
|
17
|
-
type
|
|
18
|
-
type
|
|
19
|
-
type
|
|
20
|
-
type
|
|
21
|
-
type
|
|
22
|
-
type
|
|
23
|
-
type
|
|
8
|
+
type AdminSignerConfig = NonNullable<Extract<CreateWalletV2025Dto, {
|
|
9
|
+
chainType: "evm" | "solana";
|
|
10
|
+
}>["config"]>["adminSigner"];
|
|
11
|
+
type CreateTransactionParams = CreateTransactionV2025Dto;
|
|
12
|
+
type CreateTransactionSuccessResponse = WalletsTransactionV2025ResponseDto;
|
|
13
|
+
type CreateTransactionResponse = CreateTransactionSuccessResponse | WalletV1Alpha2TransactionErrorDto;
|
|
14
|
+
type ApproveTransactionParams = SubmitApprovalV2025Dto;
|
|
15
|
+
type ApproveTransactionResponse = WalletsTransactionV2025ResponseDto | WalletsV1ControllerSubmitApprovals4Error;
|
|
16
|
+
type GetTransactionResponse = WalletsTransactionV2025ResponseDto | WalletsV1ControllerGetTransaction4Error;
|
|
17
|
+
type GetTransactionSuccessResponse = WalletsTransactionV2025ResponseDto;
|
|
18
|
+
type CreateSignatureParams = CreateSignatureV2025Dto;
|
|
19
|
+
type CreateSignatureResponse = WalletsSignatureV2025ResponseDto | WalletsV1ControllerCreateSignatureRequest4Error;
|
|
20
|
+
type ApproveSignatureParams = SubmitApprovalV2025Dto;
|
|
21
|
+
type ApproveSignatureResponse = WalletsSignatureV2025ResponseDto | WalletsV1ControllerSubmitSignatureApprovals4Error;
|
|
22
|
+
type GetSignatureResponse = WalletsSignatureV2025ResponseDto | WalletsV1ControllerGetSignature4Error;
|
|
23
|
+
type GetTransactionsResponse = WalletsMultipleTransactionV2025ResponseDto | WalletsV1ControllerGetTransactionsWithoutChain4Error;
|
|
24
|
+
type GetNftsResponse = WalletNftsResponseDto;
|
|
25
|
+
type GetBalanceResponse = WalletBalanceV20250609ResponseDto | BalanceControllerGetBalanceForLocator2Error;
|
|
26
|
+
type GetBalanceSuccessResponse = WalletBalanceV20250609ResponseDto;
|
|
24
27
|
type GetActivityResponse = WalletsV1Alpha2ActivityResponseDto | WalletV1Alpha2ErrorDto;
|
|
25
28
|
type Activity = WalletsV1Alpha2ActivityResponseDto;
|
|
26
|
-
type
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
type
|
|
30
|
-
type
|
|
29
|
+
type RegisterSignerChain = Extract<CreateSignerV2025InputDto, {
|
|
30
|
+
chain: any;
|
|
31
|
+
}>["chain"];
|
|
32
|
+
type RegisterSignerPasskeyParams = Extract<CreateSignerV2025InputDto["signer"], {
|
|
33
|
+
type: "passkey";
|
|
34
|
+
}>;
|
|
35
|
+
type RegisterSignerParams = {
|
|
36
|
+
signer: string | RegisterSignerPasskeyParams;
|
|
37
|
+
chain?: RegisterSignerChain;
|
|
38
|
+
};
|
|
39
|
+
type RegisterSignerResponse = DelegatedSignerV2025Dto | WalletsV1ControllerCreateDelegatedSigner4Error;
|
|
40
|
+
type GetSignerResponse = DelegatedSignerV2025Dto | WalletsV1ControllerGetDelegatedSigner4Error;
|
|
41
|
+
type GetDelegatedSignersResponse = Array<DelegatedSignerV2025Dto> | WalletsV1ControllerGetDelegatedSigner4Error;
|
|
42
|
+
type DelegatedSigner = DelegatedSignerV2025Dto;
|
|
31
43
|
type SendParams = SendTokenDto;
|
|
32
44
|
type SendResponse = WalletsSendTokenControllerSendToken2Response;
|
|
33
|
-
type WalletType =
|
|
34
|
-
type EvmWalletLocator = `me:${WalletType}` | Address;
|
|
45
|
+
type WalletType = "smart" | "mpc";
|
|
35
46
|
type SolanaAddress = string;
|
|
36
|
-
type
|
|
47
|
+
type EvmWalletLocator = `me:evm:${WalletType}` | Address;
|
|
48
|
+
type SolanaWalletLocator = `me:solana:${WalletType}` | SolanaAddress;
|
|
37
49
|
type WalletLocator = EvmWalletLocator | SolanaWalletLocator;
|
|
38
50
|
|
|
39
|
-
export type { Activity, ApproveSignatureParams, ApproveSignatureResponse, ApproveTransactionParams, ApproveTransactionResponse, CreateSignatureParams, CreateSignatureResponse, CreateTransactionParams, CreateTransactionResponse, CreateTransactionSuccessResponse, CreateWalletParams, CreateWalletResponse, DelegatedSigner,
|
|
51
|
+
export type { Activity, AdminSignerConfig, ApproveSignatureParams, ApproveSignatureResponse, ApproveTransactionParams, ApproveTransactionResponse, CreateSignatureParams, CreateSignatureResponse, CreateTransactionParams, CreateTransactionResponse, CreateTransactionSuccessResponse, CreateWalletParams, CreateWalletResponse, DelegatedSigner, GetActivityResponse, GetBalanceResponse, GetBalanceSuccessResponse, GetDelegatedSignersResponse, GetNftsResponse, GetSignatureResponse, GetSignerResponse, GetTransactionResponse, GetTransactionSuccessResponse, GetTransactionsResponse, GetWalletResponse, GetWalletSuccessResponse, RegisterSignerChain, RegisterSignerParams, RegisterSignerPasskeyParams, RegisterSignerResponse, SendParams, SendResponse, WalletLocator };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as p}from"./chunk-BM7YI7RZ.js";import{k as c,o as d,q as T}from"./chunk-7ENJXL4H.js";import{a as f}from"./chunk-BJDS5BJG.js";import{f as o}from"./chunk-BW7YYVZE.js";import{createPublicClient as E,encodeFunctionData as S,http as V}from"viem";import{isValidEvmAddress as M}from"@crossmint/common-sdk-base";var w=class C extends p{constructor(t){super({chain:t.chain,address:t.address,owner:t.owner,signer:t.signer,options:p.getOptions(t)},p.getApiClient(t))}static from(t){if(!M(t.address))throw new Error("Wallet is not an EVM wallet");return new C(t)}sendTransaction(t){return o(this,null,function*(){var e;let n=this.buildTransaction(t),a=yield this.createTransaction(n);return(e=t.options)!=null&&e.experimental_prepareOnly?{hash:void 0,explorerLink:void 0,transactionId:a.id}:yield this.approveAndWait(a.id)})}signMessage(t){return o(this,null,function*(){var i;let n=yield this.apiClient.createSignature(this.walletLocator,{type:"message",params:{message:t,signer:this.signer.locator(),chain:this.chain}});if("error"in n)throw new d(JSON.stringify(n));let a=n.id,e=((i=n.approvals)==null?void 0:i.pending)||[];return yield this.approveSignature(e,a),yield this.waitForSignature(a)})}signTypedData(t){return o(this,null,function*(){var m;let{domain:n,message:a,primaryType:e,types:i,chain:r}=t;if(!n||!a||!i||!r)throw new c("Invalid typed data");let{name:u,version:l,chainId:h,verifyingContract:y,salt:v}=n;if(!u||!l||!h||!y)throw new c("Invalid typed data domain");let s=yield this.apiClient.createSignature(this.walletLocator,{type:"typed-data",params:{typedData:{domain:{name:u,version:l,chainId:Number(h),verifyingContract:y,salt:v},message:a,primaryType:e,types:i},signer:this.signer.locator(),chain:r,isSmartWalletSignature:!1}});if("error"in s)throw new d(JSON.stringify(s));let g=s.id,D=((m=s.approvals)==null?void 0:m.pending)||[];return yield this.approveSignature(D,g),yield this.waitForSignature(g)})}getViemClient(t){var n;return E({transport:(n=t==null?void 0:t.transport)!=null?n:V(),chain:f(this.chain)})}createTransaction(t){return o(this,null,function*(){let n=yield this.apiClient.createTransaction(this.walletLocator,{params:{signer:this.signer.locator(),chain:this.chain,calls:[t]}});if("error"in n)throw new T(JSON.stringify(n));return n})}buildTransaction(t){var n,a,e,i,r;if("transaction"in t)return{transaction:t.transaction};if(t.abi==null)return{to:t.to,value:(a=(n=t.value)==null?void 0:n.toString())!=null?a:"0",data:(e=t.data)!=null?e:"0x"};if(!t.functionName)throw new Error("Function name is required");return{to:t.to,value:(r=(i=t.value)==null?void 0:i.toString())!=null?r:"0",data:S({abi:t.abi,functionName:t.functionName,args:t.args})}}};export{w as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-BM7YI7RZ.js";import{a as l}from"./chunk-SCS4UDW7.js";import{q as p}from"./chunk-7ENJXL4H.js";import{f as r}from"./chunk-BW7YYVZE.js";import m from"bs58";import{isValidSolanaAddress as T}from"@crossmint/common-sdk-base";var d=class u extends t{constructor(n){super({chain:n.chain,address:n.address,owner:n.owner,signer:n.signer},t.getApiClient(n))}static from(n){if(!T(n.address))throw new Error("Wallet is not a Solana wallet");return new u(n)}sendTransaction(n){return r(this,null,function*(){var o,s;let i=yield this.createTransaction(n);if((o=n.options)!=null&&o.experimental_prepareOnly)return{hash:void 0,explorerLink:void 0,transactionId:i.id};let a=(s=n.additionalSigners)==null?void 0:s.map(e=>new l({type:"external-wallet",address:e.publicKey.toString(),locator:`external-wallet:${e.publicKey.toString()}`,onSignTransaction:c=>(c.sign([e]),Promise.resolve(c))}));return yield this.approveAndWait(i.id,a)})}createTransaction(i){return r(this,arguments,function*({transaction:n}){let a=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:m.encode(n.serialize())}});if("error"in a)throw new p(JSON.stringify(a));return a})}};export{d as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkRSISNAJJcjs = require('./chunk-RSISNAJJ.cjs');var _chunkYTAW674Lcjs = require('./chunk-YTAW674L.cjs');var _chunkCT2UGJELcjs = require('./chunk-CT2UGJEL.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var _commonsdkbase = require('@crossmint/common-sdk-base');var d=class u extends _chunkRSISNAJJcjs.a{constructor(n){super({chain:n.chain,address:n.address,owner:n.owner,signer:n.signer},_chunkRSISNAJJcjs.a.getApiClient(n))}static from(n){if(!_commonsdkbase.isValidSolanaAddress.call(void 0, n.address))throw new Error("Wallet is not a Solana wallet");return new u(n)}sendTransaction(n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var o,s;let i=yield this.createTransaction(n);if((o=n.options)!=null&&o.experimental_prepareOnly)return{hash:void 0,explorerLink:void 0,transactionId:i.id};let a=(s=n.additionalSigners)==null?void 0:s.map(e=>new (0, _chunkYTAW674Lcjs.a)({type:"external-wallet",address:e.publicKey.toString(),locator:`external-wallet:${e.publicKey.toString()}`,onSignTransaction:c=>(c.sign([e]),Promise.resolve(c))}));return yield this.approveAndWait(i.id,a)})}createTransaction(i){return _chunkXALFCQKDcjs.f.call(void 0, this,arguments,function*({transaction:n}){let a=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:_bs582.default.encode(n.serialize())}});if("error"in a)throw new (0, _chunkCT2UGJELcjs.q)(JSON.stringify(a));return a})}};exports.a = d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var n=class{constructor(t){this.config=t;this.type="api-key"}locator(){return this.config.locator}signMessage(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield Promise.reject(new Error("API key signers do not support direct message signing - signatures are handled automatically by the backend"))})}signTransaction(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield Promise.reject(new Error("API key signers do not support direct transaction signing - transaction are handled automatically by the backend"))})}};exports.a = n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as i}from"./chunk-BW7YYVZE.js";var s=class{constructor(e){this.config=e;this.type="external-wallet";if(e.address==null)throw new Error("Please provide an address for the External Wallet Signer");this.address=e.address,this.provider=e.provider,this.viemAccount=e.viemAccount}locator(){return this.config.locator}signMessage(e){return i(this,null,function*(){var n;if(this.provider!=null){let r=yield this.provider.request({method:"personal_sign",params:[e,this.address]});if(r==null)throw new Error("[EVMExternalWalletSigner] Failed to sign message: EIP1193 provider signMessage returned null");return{signature:r}}if(((n=this.viemAccount)==null?void 0:n.signMessage)!=null){let r=yield this.viemAccount.signMessage({message:{raw:e}});if(r==null)throw new Error("[EVMExternalWalletSigner] Failed to sign message: Viem account signMessage returned null");return{signature:r}}throw new Error("No signer provider or viem account provided")})}signTransaction(e){return i(this,null,function*(){return yield this.signMessage(e)})}};export{s as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s="@crossmint/wallets-sdk",t="0.10.10";var c="WALLETS_SDK",r=t,d=s,a=500;export{c as a,r as b,d as c,a as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as b}from"./chunk-7F2XBOHW.js";import{c as E,d as P,i as A,m as W,p as x,q as $,r as L,s as B,t as _,u as F,v as I,w as J}from"./chunk-7ENJXL4H.js";import{a as S,b as N,c as l,d as v,e as C,f as g}from"./chunk-BW7YYVZE.js";import{isValidAddress as G}from"@crossmint/common-sdk-base";var m,c,R=class{constructor(t,n){v(this,m);v(this,c);let{chain:e,address:i,owner:r,signer:p,options:d}=t;C(this,c,n),this.chain=e,this.address=i,this.owner=r,this.signer=p,C(this,m,d)}static getApiClient(t){return t.apiClient}static getOptions(t){return t.options}get apiClient(){return l(this,c)}get options(){return l(this,m)}balances(t,n){return g(this,null,function*(){let e=this.chain==="solana"?"sol":"eth",i=[e,"usdc",...t!=null?t:[]],r=yield l(this,c).getBalance(this.address,{chains:n!=null?n:[this.chain],tokens:i.map(p=>p.toLowerCase())});if("error"in r)throw new Error(`Failed to get balances for wallet: ${JSON.stringify(r.message)}`);return this.transformBalanceResponse(r,e,t)})}transformBalanceResponse(t,n,e){let i=a=>{var w,f,y,T,O;let u=(w=a.chains)==null?void 0:w[this.chain],h="contractAddress"in u?u.contractAddress:void 0;return{symbol:(f=a.symbol)!=null?f:"",name:(y=a.symbol)!=null?y:"",amount:(T=a.amount)!=null?T:"0",contractAddress:h,decimals:a.decimals,rawAmount:(O=a.rawAmount)!=null?O:"0"}},r=t.find(a=>a.symbol===n),p=t.find(a=>a.symbol==="usdc"),d=t.filter(a=>{var u;return a.symbol!==n&&a.symbol!=="usdc"&&(e==null?void 0:e.includes((u=a.symbol)!=null?u:""))}),s=a=>({symbol:a,name:a,amount:"0",contractAddress:void 0,decimals:0,rawAmount:"0"});return{nativeToken:r!=null?i(r):s(n),usdc:p!=null?i(p):s("usdc"),tokens:d.map(i)}}experimental_nfts(t){return g(this,null,function*(){return yield l(this,c).experimental_getNfts(N(S({},t),{chain:this.chain,address:this.address}))})}experimental_transactions(){return g(this,null,function*(){return yield l(this,c).getTransactions(this.walletLocator)})}experimental_activity(){return g(this,null,function*(){let t=yield this.apiClient.experimental_activity(this.walletLocator,{chain:this.chain});if("error"in t)throw new Error(`Failed to get activity: ${JSON.stringify(t.message)}`);return t})}send(t,n,e,i){return g(this,null,function*(){let r=k(t),p=M(n,this.chain),d={recipient:r,amount:e},s=yield l(this,c).send(this.walletLocator,p,d);if("message"in s)throw new $(`Failed to send token: ${JSON.stringify(s.message)}`);return i!=null&&i.experimental_prepareOnly?{hash:void 0,explorerLink:void 0,transactionId:s.id}:yield this.approveAndWait(s.id)})}addDelegatedSigner(t){return g(this,null,function*(){var e,i;let n=yield l(this,c).registerSigner(this.walletLocator,{signer:t.signer,chain:this.chain==="solana"?void 0:this.chain});if("error"in n)throw new Error(`Failed to register signer: ${JSON.stringify(n.message)}`);if("transaction"in n){let r=n.transaction.id;yield this.approveAndWait(r)}else{let r=(e=n.chains)==null?void 0:e[this.chain];if((r==null?void 0:r.status)==="awaiting-approval"){let p=((i=r.approvals)==null?void 0:i.pending)||[];yield this.approveSignature(p,r.id),yield this.waitForSignature(r.id);return}if((r==null?void 0:r.status)==="pending"){yield this.waitForSignature(r.id);return}}})}delegatedSigners(){return g(this,null,function*(){var n,e,i;let t=yield l(this,c).getWallet(this.walletLocator);if("error"in t)throw new P(JSON.stringify(t));if(t.type!=="smart"||t.chainType!=="evm"&&t.chainType!=="solana")throw new E(`Wallet type ${t.type} not supported`);return(i=(e=(n=t==null?void 0:t.config)==null?void 0:n.delegatedSigners)==null?void 0:e.map(r=>{let p=r.locator.indexOf(":");return{signer:`external-wallet:${p>=0?r.locator.slice(p+1):r.locator}`}}))!=null?i:[]})}get walletLocator(){return l(this,c).isServerSide?this.address:`me:${this.chain==="solana"?"solana":"evm"}:smart`}get isSolanaWallet(){return this.chain==="solana"}approveAndWait(t,n){return g(this,null,function*(){return yield this.approveTransaction(t,n),yield this.sleep(1e3),yield this.waitForTransaction(t)})}approveTransaction(t,n){return g(this,null,function*(){var s,a,u,h;let e=yield l(this,c).getTransaction(this.walletLocator,t);if("error"in e)throw new L(JSON.stringify(e));if(yield(u=(a=(s=l(this,m))==null?void 0:s.experimental_callbacks)==null?void 0:a.onTransactionStart)==null?void 0:u.call(a),this.signer.type==="api-key")return e;let i=(h=e.approvals)==null?void 0:h.pending;if(i==null)return e;let r=[...n!=null?n:[],this.signer],p=yield Promise.all(i.map(w=>{let f=r.find(T=>T.locator()===w.signer.locator);if(f==null)throw new A(`Signer ${w.signer} not found in pending approvals`);let y=e.chainType==="solana"&&"transaction"in e.onChain?e.onChain.transaction:w.message;return f.signTransaction(y)})),d=yield l(this,c).approveTransaction(this.walletLocator,e.id,{approvals:p.map(w=>S({signer:this.signer.locator()},w))});if(d.error)throw new J(JSON.stringify(d));return d})}approveSignature(t,n){return g(this,null,function*(){if(this.isSolanaWallet)throw new Error("Approving signatures is only supported for EVM smart wallets");let e=t.find(r=>r.signer.locator===this.signer.locator());if(!e)throw new A(`Signer ${this.signer.locator()} not found in pending approvals`);let i=yield this.signer.signMessage(e.message);return yield l(this,c).approveSignature(this.walletLocator,n,{approvals:[S({signer:this.signer.locator()},i)]}),i})}waitForSignature(t){return g(this,null,function*(){let n=null;do if(yield new Promise(e=>setTimeout(e,b)),n=yield l(this,c).getSignature(this.walletLocator,t),"error"in n)throw new x(JSON.stringify(n));while(n===null||n.status==="pending");if(n.status==="failed")throw new W("Signature signing failed");if(!n.outputSignature)throw new x("Signature not available");return n.outputSignature})}waitForTransaction(p){return g(this,arguments,function*(t,n=6e4,{backoffMultiplier:e=1.1,maxBackoffMs:i=2e3,initialBackoffMs:r=b}={}){var u;let d=Date.now(),s;do{if(Date.now()-d>n)throw new B("Transaction confirmation timeout");if(s=yield l(this,c).getTransaction(this.walletLocator,t),s.error)throw new L(JSON.stringify(s));yield this.sleep(r),r=Math.min(r*e,i)}while(s.status==="pending");if(s.status==="failed")throw new _(`Transaction sending failed: ${JSON.stringify(s.error)}`);if(s.status==="awaiting-approval")throw new F("Transaction is awaiting approval. Please submit required approvals before waiting for completion.");let a=s.onChain.txId;if(a==null)throw new I("Transaction hash not found on transaction response");return{hash:a,explorerLink:(u=s.onChain.explorerLink)!=null?u:"",transactionId:s.id}})}sleep(t){return g(this,null,function*(){return new Promise(n=>setTimeout(n,t))})}};m=new WeakMap,c=new WeakMap;function k(o){if(typeof o=="string")return o;if("email"in o)return`email:${o.email}`;if("x"in o)return`x:${o.x}`;if("twitter"in o)return`twitter:${o.twitter}`;if("phone"in o)return`phoneNumber:${o.phone}`;if("userId"in o)return`userId:${o.userId}`;throw new Error("Invalid recipient locator")}function M(o,t){return G(o)?`${t}:${o}`:`${t}:${o.toLowerCase()}`}export{R as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,b as s}from"./chunk-7KHMZPZO.js";import{f as n}from"./chunk-BW7YYVZE.js";import{VersionedTransaction as y}from"@solana/web3.js";import o from"bs58";var a=class c extends i{constructor(e){super(e)}locator(){return this.config.locator}signMessage(){return n(this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for email signer"))})}signTransaction(e){return n(this,null,function*(){var r;yield this.handleAuthRequired();let g=this.getJwtOrThrow(),d=o.decode(e),l=y.deserialize(d).message.serialize(),t=yield(r=this.config.clientTEEConnection)==null?void 0:r.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:g,apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:o.encode(l),encoding:"base58"}},options:s});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 c.verifyPublicKeyFormat(t.publicKey),{signature:t.signature.bytes}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="base58"||e.keyType!=="ed25519"||e.bytes==null)throw new Error("Not supported. Expected public key to be in base58 encoding and ed25519 key type. Got: "+JSON.stringify(e))}};export{a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var s=class{constructor(e){this.config=e;this.type="external-wallet";if(e.address==null)throw new Error("Please provide an address for the External Wallet Signer");this.address=e.address,this.provider=e.provider,this.viemAccount=e.viemAccount}locator(){return this.config.locator}signMessage(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var n;if(this.provider!=null){let r=yield this.provider.request({method:"personal_sign",params:[e,this.address]});if(r==null)throw new Error("[EVMExternalWalletSigner] Failed to sign message: EIP1193 provider signMessage returned null");return{signature:r}}if(((n=this.viemAccount)==null?void 0:n.signMessage)!=null){let r=yield this.viemAccount.signMessage({message:{raw:e}});if(r==null)throw new Error("[EVMExternalWalletSigner] Failed to sign message: Viem account signMessage returned null");return{signature:r}}throw new Error("No signer provider or viem account provided")})}signTransaction(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.signMessage(e)})}};exports.a = s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkNWOKSI3Vcjs = require('./chunk-NWOKSI3V.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _web3js = require('@solana/web3.js');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var a=class c extends _chunkNWOKSI3Vcjs.a{constructor(e){super(e)}locator(){return this.config.locator}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 r;yield this.handleAuthRequired();let g=this.getJwtOrThrow(),d=_bs582.default.decode(e),l=_web3js.VersionedTransaction.deserialize(d).message.serialize(),t=yield(r=this.config.clientTEEConnection)==null?void 0:r.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:g,apiKey:this.config.crossmint.apiKey},data:{keyType:"ed25519",bytes:_bs582.default.encode(l),encoding:"base58"}},options:_chunkNWOKSI3Vcjs.b});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 c.verifyPublicKeyFormat(t.publicKey),{signature:t.signature.bytes}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="base58"||e.keyType!=="ed25519"||e.bytes==null)throw new Error("Not supported. Expected public key to be in base58 encoding and ed25519 key type. Got: "+JSON.stringify(e))}};exports.a = a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="@crossmint/wallets-sdk",t="0.10.10";var p="WALLETS_SDK",c= exports.b =t,r= exports.c =s,d= exports.d =500;exports.a = p; exports.b = c; exports.c = r; exports.d = d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as e}from"./chunk-BW7YYVZE.js";var n=class{constructor(t){this.config=t;this.type="api-key"}locator(){return this.config.locator}signMessage(){return e(this,null,function*(){return yield Promise.reject(new Error("API key signers do not support direct message signing - signatures are handled automatically by the backend"))})}signTransaction(){return e(this,null,function*(){return yield Promise.reject(new Error("API key signers do not support direct transaction signing - transaction are handled automatically by the backend"))})}};export{n as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as l}from"./chunk-7ENJXL4H.js";var u=(n,o,t)=>`Wallet signer configuration mismatch at "${n}" - expected "${t}" from existing wallet but found "${o}"`;function a(n,o,t=""){if(n!==o){if(n==null||o==null)throw new Error(`Cannot compare null or undefined signer configs at path: ${t}`);for(let r of Object.keys(n)){if(!(r in o))continue;let c=t?`${t}.${r}`:r,e=n[r],s=o[r];if(typeof e=="object"&&e!==null&&typeof s=="object"&&s!==null)a(e,s,c);else if(e!==s)throw new l(u(c,e,s))}}}export{a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRSISNAJJcjs = require('./chunk-RSISNAJJ.cjs');var _chunkSLEKIJXXcjs = require('./chunk-SLEKIJXX.cjs');var _chunkRFK6N7LCcjs = require('./chunk-RFK6N7LC.cjs');var _chunkCT2UGJELcjs = require('./chunk-CT2UGJEL.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _ox = require('ox');var d=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 n=yield this.apiClient.getWallet(`me:${e.chain==="solana"?"solana":"evm"}:smart`);return n!=null&&!("error"in n)?this.createWalletInstance(n,e):this.createWallet(e)})}getWallet(e,n){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,n)})}createWallet(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var t,r,o,s;yield(o=(r=(t=e.options)==null?void 0:t.experimental_callbacks)==null?void 0:r.onWalletCreationStart)==null?void 0:o.call(r),this.mutateSignerFromCustomAuth(e,!0);let n=e.signer.type==="passkey"?yield this.createPasskeyAdminSigner(e.signer):e.signer,i=yield this.apiClient.createWallet({type:"smart",chainType:e.chain==="solana"?"solana":"evm",config:{adminSigner:n},owner:(s=e.owner)!=null?s:void 0});if("error"in i)throw new (0, _chunkCT2UGJELcjs.f)(JSON.stringify(i));return this.createWalletInstance(i,e)})}createWalletInstance(e,n){this.validateExistingWalletConfig(e,n);let i=this.toInternalSignerConfig(e,n.signer,n.options);return new (0, _chunkRSISNAJJcjs.a)({chain:n.chain,address:e.address,owner:e.owner,signer:_chunkSLEKIJXXcjs.a.call(void 0, n.chain,i),options:n.options},this.apiClient)}toInternalSignerConfig(e,n,i){var t,r,o,s,m;if(!(e.chainType==="evm"||e.chainType==="solana"))throw new (0, _chunkCT2UGJELcjs.f)(`Wallet type ${e.chainType} is not supported`);if(n==null&&((t=e.config)==null?void 0:t.adminSigner)==null)throw new (0, _chunkCT2UGJELcjs.f)("Signer is required to create a wallet");switch(n.type){case"api-key":{if(((r=e.config)==null?void 0:r.adminSigner.type)!=="api-key")throw new (0, _chunkCT2UGJELcjs.f)("API key signer does not match the wallet's signer type");return{type:"api-key",address:e.config.adminSigner.address,locator:e.config.adminSigner.locator}}case"external-wallet":if(((o=e.config)==null?void 0:o.adminSigner.type)!=="external-wallet")throw new (0, _chunkCT2UGJELcjs.f)("External wallet signer does not match the wallet's signer type");return _chunkXALFCQKDcjs.a.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},e.config.adminSigner),n);case"passkey":if(((s=e.config)==null?void 0:s.adminSigner.type)!=="passkey")throw new (0, _chunkCT2UGJELcjs.f)("Passkey signer does not match the wallet's signer type");return{type:"passkey",id:e.config.adminSigner.id,name:e.config.adminSigner.name,locator:e.config.adminSigner.locator,onCreatePasskey:n.onCreatePasskey,onSignWithPasskey:n.onSignWithPasskey};case"email":{if(((m=e.config)==null?void 0:m.adminSigner.type)!=="email")throw new (0, _chunkCT2UGJELcjs.f)("Email signer does not match the wallet's signer type");let{locator:y,email:f}=e.config.adminSigner;return{type:"email",email:f,locator:y,crossmint:this.apiClient.crossmint,onAuthRequired:n.onAuthRequired,clientTEEConnection:i==null?void 0:i.clientTEEConnection}}default:throw new Error("Invalid signer type")}}createPasskeyAdminSigner(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var t;if(e.type!=="passkey")throw new Error("Signer is not a passkey");let n=(t=e.name)!=null?t:`Crossmint Wallet ${Date.now()}`,i=e.onCreatePasskey?yield e.onCreatePasskey(n):yield _ox.WebAuthnP256.createCredential({name:n});return{type:"passkey",id:i.id,name:n,publicKey:{x:i.publicKey.x.toString(),y:i.publicKey.y.toString()}}})}mutateSignerFromCustomAuth(e,n=!1){var t;let{experimental_customAuth:i}=this.apiClient.crossmint;e.signer.type==="email"&&(i==null?void 0:i.email)!=null&&(e.signer.email=(t=e.signer.email)!=null?t:i.email),e.signer.type==="external-wallet"&&(i==null?void 0:i.externalWalletSigner)!=null&&(e.signer=n?{type:"external-wallet",address:i.externalWalletSigner.address}:i.externalWalletSigner)}validateExistingWalletConfig(e,n){var r;if(this.mutateSignerFromCustomAuth(n),n.owner!=null&&e.owner!=null&&n.owner!==e.owner)throw new (0, _chunkCT2UGJELcjs.f)("Wallet owner does not match existing wallet's linked user");if(n.chain==="solana"&&e.chainType!=="solana"||n.chain!=="solana"&&e.chainType==="solana")throw new (0, _chunkCT2UGJELcjs.f)(`Wallet chain does not match existing wallet's chain. You must use chain: ${e.chainType}.`);if(e.type!=="smart")return;let i=n.signer,t=(r=e==null?void 0:e.config)==null?void 0:r.adminSigner;if(i!=null&&t!=null){if(i.type!==t.type)throw new (0, _chunkCT2UGJELcjs.f)("The wallet signer type provided in the wallet config does not match the existing wallet's adminSigner type");_chunkRFK6N7LCcjs.a.call(void 0, i,t)}}};exports.a = d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as C}from"./chunk-BM7YI7RZ.js";import{a as g}from"./chunk-SHDM6MXU.js";import{a as p}from"./chunk-IJMFCZIY.js";import{d as h,f as a}from"./chunk-7ENJXL4H.js";import{a as c,f as l}from"./chunk-BW7YYVZE.js";import{WebAuthnP256 as S}from"ox";var d=class{constructor(e){this.apiClient=e}getOrCreateWallet(e){return l(this,null,function*(){if(this.apiClient.isServerSide)throw new a("getOrCreateWallet is not supported on server side");let n=yield this.apiClient.getWallet(`me:${e.chain==="solana"?"solana":"evm"}:smart`);return n!=null&&!("error"in n)?this.createWalletInstance(n,e):this.createWallet(e)})}getWallet(e,n){return l(this,null,function*(){if(!this.apiClient.isServerSide)throw new a("getWallet is not supported on client side, use getOrCreateWallet instead");let i=yield this.apiClient.getWallet(e);if("error"in i)throw new h(JSON.stringify(i));return this.createWalletInstance(i,n)})}createWallet(e){return l(this,null,function*(){var t,r,o,s;yield(o=(r=(t=e.options)==null?void 0:t.experimental_callbacks)==null?void 0:r.onWalletCreationStart)==null?void 0:o.call(r),this.mutateSignerFromCustomAuth(e,!0);let n=e.signer.type==="passkey"?yield this.createPasskeyAdminSigner(e.signer):e.signer,i=yield this.apiClient.createWallet({type:"smart",chainType:e.chain==="solana"?"solana":"evm",config:{adminSigner:n},owner:(s=e.owner)!=null?s:void 0});if("error"in i)throw new a(JSON.stringify(i));return this.createWalletInstance(i,e)})}createWalletInstance(e,n){this.validateExistingWalletConfig(e,n);let i=this.toInternalSignerConfig(e,n.signer,n.options);return new C({chain:n.chain,address:e.address,owner:e.owner,signer:g(n.chain,i),options:n.options},this.apiClient)}toInternalSignerConfig(e,n,i){var t,r,o,s,m;if(!(e.chainType==="evm"||e.chainType==="solana"))throw new a(`Wallet type ${e.chainType} is not supported`);if(n==null&&((t=e.config)==null?void 0:t.adminSigner)==null)throw new a("Signer is required to create a wallet");switch(n.type){case"api-key":{if(((r=e.config)==null?void 0:r.adminSigner.type)!=="api-key")throw new a("API key signer does not match the wallet's signer type");return{type:"api-key",address:e.config.adminSigner.address,locator:e.config.adminSigner.locator}}case"external-wallet":if(((o=e.config)==null?void 0:o.adminSigner.type)!=="external-wallet")throw new a("External wallet signer does not match the wallet's signer type");return c(c({},e.config.adminSigner),n);case"passkey":if(((s=e.config)==null?void 0:s.adminSigner.type)!=="passkey")throw new a("Passkey signer does not match the wallet's signer type");return{type:"passkey",id:e.config.adminSigner.id,name:e.config.adminSigner.name,locator:e.config.adminSigner.locator,onCreatePasskey:n.onCreatePasskey,onSignWithPasskey:n.onSignWithPasskey};case"email":{if(((m=e.config)==null?void 0:m.adminSigner.type)!=="email")throw new a("Email signer does not match the wallet's signer type");let{locator:y,email:f}=e.config.adminSigner;return{type:"email",email:f,locator:y,crossmint:this.apiClient.crossmint,onAuthRequired:n.onAuthRequired,clientTEEConnection:i==null?void 0:i.clientTEEConnection}}default:throw new Error("Invalid signer type")}}createPasskeyAdminSigner(e){return l(this,null,function*(){var t;if(e.type!=="passkey")throw new Error("Signer is not a passkey");let n=(t=e.name)!=null?t:`Crossmint Wallet ${Date.now()}`,i=e.onCreatePasskey?yield e.onCreatePasskey(n):yield S.createCredential({name:n});return{type:"passkey",id:i.id,name:n,publicKey:{x:i.publicKey.x.toString(),y:i.publicKey.y.toString()}}})}mutateSignerFromCustomAuth(e,n=!1){var t;let{experimental_customAuth:i}=this.apiClient.crossmint;e.signer.type==="email"&&(i==null?void 0:i.email)!=null&&(e.signer.email=(t=e.signer.email)!=null?t:i.email),e.signer.type==="external-wallet"&&(i==null?void 0:i.externalWalletSigner)!=null&&(e.signer=n?{type:"external-wallet",address:i.externalWalletSigner.address}:i.externalWalletSigner)}validateExistingWalletConfig(e,n){var r;if(this.mutateSignerFromCustomAuth(n),n.owner!=null&&e.owner!=null&&n.owner!==e.owner)throw new a("Wallet owner does not match existing wallet's linked user");if(n.chain==="solana"&&e.chainType!=="solana"||n.chain!=="solana"&&e.chainType==="solana")throw new a(`Wallet chain does not match existing wallet's chain. You must use chain: ${e.chainType}.`);if(e.type!=="smart")return;let i=n.signer,t=(r=e==null?void 0:e.config)==null?void 0:r.adminSigner;if(i!=null&&t!=null){if(i.type!==t.type)throw new a("The wallet signer type provided in the wallet config does not match the existing wallet's adminSigner type");p(i,t)}}};export{d as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNWOKSI3Vcjs = require('./chunk-NWOKSI3V.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _ox = require('ox');var _viem = require('viem');var g=class c extends _chunkNWOKSI3Vcjs.a{constructor(t){super(t)}locator(){return this.config.locator}signMessage(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let n=_viem.isHex.call(void 0, t)?t:_viem.toHex.call(void 0, t),i=_ox.PersonalMessage.getSignPayload(n);return yield this.sign(i)})}signTransaction(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.sign(t)})}sign(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var s;yield this.handleAuthRequired();let n=this.getJwtOrThrow(),i=t.replace("0x",""),e=yield(s=this.config.clientTEEConnection)==null?void 0:s.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:n,apiKey:this.config.crossmint.apiKey},data:{keyType:"secp256k1",bytes:i,encoding:"hex"}},options:_chunkNWOKSI3Vcjs.b});if((e==null?void 0:e.status)==="error")throw new Error(e.error);if((e==null?void 0:e.signature)==null)throw new Error("Failed to sign transaction");return c.verifyPublicKeyFormat(e.publicKey),{signature:e.signature.bytes}})}static verifyPublicKeyFormat(t){if(t==null)throw new Error("No public key found");if(t.encoding!=="hex"||t.keyType!=="secp256k1"||t.bytes==null)throw new Error("Not supported. Expected public key to be in hex encoding and secp256k1 key type. Got: "+JSON.stringify(t))}static publicKeyToEvmAddress(t){let n=_ox.PublicKey.from(`0x${t}`);return _ox.Address.fromPublicKey(n,{checksum:!0})}};exports.a = g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRSISNAJJcjs = require('./chunk-RSISNAJJ.cjs');var _chunkCT2UGJELcjs = require('./chunk-CT2UGJEL.cjs');var _chunk6VJEBYPNcjs = require('./chunk-6VJEBYPN.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _viem = require('viem');var _commonsdkbase = require('@crossmint/common-sdk-base');var w=class C extends _chunkRSISNAJJcjs.a{constructor(t){super({chain:t.chain,address:t.address,owner:t.owner,signer:t.signer,options:_chunkRSISNAJJcjs.a.getOptions(t)},_chunkRSISNAJJcjs.a.getApiClient(t))}static from(t){if(!_commonsdkbase.isValidEvmAddress.call(void 0, t.address))throw new Error("Wallet is not an EVM wallet");return new C(t)}sendTransaction(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var e;let n=this.buildTransaction(t),a=yield this.createTransaction(n);return(e=t.options)!=null&&e.experimental_prepareOnly?{hash:void 0,explorerLink:void 0,transactionId:a.id}:yield this.approveAndWait(a.id)})}signMessage(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var i;let n=yield this.apiClient.createSignature(this.walletLocator,{type:"message",params:{message:t,signer:this.signer.locator(),chain:this.chain}});if("error"in n)throw new (0, _chunkCT2UGJELcjs.o)(JSON.stringify(n));let a=n.id,e=((i=n.approvals)==null?void 0:i.pending)||[];return yield this.approveSignature(e,a),yield this.waitForSignature(a)})}signTypedData(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var m;let{domain:n,message:a,primaryType:e,types:i,chain:r}=t;if(!n||!a||!i||!r)throw new (0, _chunkCT2UGJELcjs.k)("Invalid typed data");let{name:u,version:l,chainId:h,verifyingContract:y,salt:v}=n;if(!u||!l||!h||!y)throw new (0, _chunkCT2UGJELcjs.k)("Invalid typed data domain");let s=yield this.apiClient.createSignature(this.walletLocator,{type:"typed-data",params:{typedData:{domain:{name:u,version:l,chainId:Number(h),verifyingContract:y,salt:v},message:a,primaryType:e,types:i},signer:this.signer.locator(),chain:r,isSmartWalletSignature:!1}});if("error"in s)throw new (0, _chunkCT2UGJELcjs.o)(JSON.stringify(s));let g=s.id,D=((m=s.approvals)==null?void 0:m.pending)||[];return yield this.approveSignature(D,g),yield this.waitForSignature(g)})}getViemClient(t){var n;return _viem.createPublicClient.call(void 0, {transport:(n=t==null?void 0:t.transport)!=null?n:_viem.http.call(void 0, ),chain:_chunk6VJEBYPNcjs.a.call(void 0, this.chain)})}createTransaction(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let n=yield this.apiClient.createTransaction(this.walletLocator,{params:{signer:this.signer.locator(),chain:this.chain,calls:[t]}});if("error"in n)throw new (0, _chunkCT2UGJELcjs.q)(JSON.stringify(n));return n})}buildTransaction(t){var n,a,e,i,r;if("transaction"in t)return{transaction:t.transaction};if(t.abi==null)return{to:t.to,value:(a=(n=t.value)==null?void 0:n.toString())!=null?a:"0",data:(e=t.data)!=null?e:"0x"};if(!t.functionName)throw new Error("Function name is required");return{to:t.to,value:(r=(i=t.value)==null?void 0:i.toString())!=null?r:"0",data:_viem.encodeFunctionData.call(void 0, {abi:t.abi,functionName:t.functionName,args:t.args})}}};exports.a = w;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,b as a}from"./chunk-7KHMZPZO.js";import{f as r}from"./chunk-BW7YYVZE.js";import{Address as u,PublicKey as y,PersonalMessage as p}from"ox";import{isHex as l,toHex as d}from"viem";var g=class c extends o{constructor(t){super(t)}locator(){return this.config.locator}signMessage(t){return r(this,null,function*(){let n=l(t)?t:d(t),i=p.getSignPayload(n);return yield this.sign(i)})}signTransaction(t){return r(this,null,function*(){return yield this.sign(t)})}sign(t){return r(this,null,function*(){var s;yield this.handleAuthRequired();let n=this.getJwtOrThrow(),i=t.replace("0x",""),e=yield(s=this.config.clientTEEConnection)==null?void 0:s.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:n,apiKey:this.config.crossmint.apiKey},data:{keyType:"secp256k1",bytes:i,encoding:"hex"}},options:a});if((e==null?void 0:e.status)==="error")throw new Error(e.error);if((e==null?void 0:e.signature)==null)throw new Error("Failed to sign transaction");return c.verifyPublicKeyFormat(e.publicKey),{signature:e.signature.bytes}})}static verifyPublicKeyFormat(t){if(t==null)throw new Error("No public key found");if(t.encoding!=="hex"||t.keyType!=="secp256k1"||t.bytes==null)throw new Error("Not supported. Expected public key to be in hex encoding and secp256k1 key type. Got: "+JSON.stringify(t))}static publicKeyToEvmAddress(t){let n=y.from(`0x${t}`);return u.fromPublicKey(n,{checksum:!0})}};export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as e}from"./chunk-BW7YYVZE.js";var n=class{constructor(t){this.config=t;this.type="api-key"}locator(){return this.config.locator}signMessage(){return e(this,null,function*(){return yield Promise.reject(new Error("API key signers do not support direct message signing - signatures are handled automatically by the backend"))})}signTransaction(){return e(this,null,function*(){return yield Promise.reject(new Error("API key signers do not support direct transaction signing - transaction are handled automatically by the backend"))})}};export{n as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n,c as i}from"./chunk-
|
|
1
|
+
import{b as n,c as i}from"./chunk-7F2XBOHW.js";import{a as o}from"./chunk-7ENJXL4H.js";import{f as r}from"./chunk-BW7YYVZE.js";import{APIKeyUsageOrigin as c,CrossmintApiClient as h}from"@crossmint/common-sdk-base";var p=class extends h{constructor(e){super(e,{internalConfig:{sdkMetadata:{name:i,version:n}}});this.apiPrefix="api/2025-06-09/wallets"}createWallet(e){return r(this,null,function*(){let s=this.isServerSide?`${this.apiPrefix}`:`${this.apiPrefix}/me`;return(yield this.post(s,{body:JSON.stringify(e),headers:this.headers})).json()})}getWallet(e){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}`,{headers:this.headers})).json()})}createTransaction(e,s){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveTransaction(e,s,t){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions/${s}/approvals`,{body:JSON.stringify(t),headers:this.headers})).json()})}getTransaction(e,s){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions/${s}`,{headers:this.headers})).json()})}createSignature(e,s){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveSignature(e,s,t){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures/${s}/approvals`,{body:JSON.stringify(t),headers:this.headers})).json()})}getSignature(e,s){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signatures/${s}`,{headers:this.headers})).json()})}getTransactions(e){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions`,{headers:this.headers})).json()})}experimental_getNfts(e){return r(this,null,function*(){let s=new URLSearchParams;s.append("page",e.page.toString()),s.append("perPage",e.perPage.toString());let t=`${e.chain}:${e.address}`;return(yield this.get(`${this.apiPrefix}/${t}/nfts?${s.toString()}`,{headers:this.headers})).json()})}experimental_activity(e,s){return r(this,null,function*(){let t=new URLSearchParams;return t.append("chain",s.chain.toString()),(yield this.get(`${this.apiPrefix}/${e}/activity?${t.toString()}`,{headers:this.headers})).json()})}getBalance(e,s){return r(this,null,function*(){let t=new URLSearchParams;return t.append("tokens",s.tokens.join(",")),t.append("chains",s.chains.join(",")),(yield this.get(`${this.apiPrefix}/${e}/balances?${t.toString()}`,{headers:this.headers})).json()})}registerSigner(e,s){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signers`,{body:JSON.stringify(s),headers:this.headers})).json()})}getSigner(e,s){return r(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signers/${s}`,{headers:this.headers})).json()})}send(e,s,t){return r(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/tokens/${s}/transfers`,{body:JSON.stringify(t),headers:this.headers})).json()})}get isServerSide(){return this.parsedAPIKey.usageOrigin===c.SERVER}get environment(){if(!this.parsedAPIKey.isValid)throw new o("Invalid API key");return this.parsedAPIKey.environment}get headers(){return{"Content-Type":"application/json"}}};export{p as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIZPWMIWDcjs = require('./chunk-IZPWMIWD.cjs');var _chunkSTUTWUOQcjs = require('./chunk-STUTWUOQ.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var i=class o{constructor(t){let r=new (0, _chunkSTUTWUOQcjs.a)(t);this.walletFactory=new (0, _chunkIZPWMIWDcjs.a)(r)}static from(t){return new o(t)}getOrCreateWallet(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.walletFactory.getOrCreateWallet(t)})}getWallet(t,r){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.walletFactory.getWallet(t,r)})}createWallet(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.walletFactory.createWallet(t)})}};exports.a = _commonsdkbase.createCrossmint; exports.b = i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCT2UGJELcjs = require('./chunk-CT2UGJEL.cjs');var u=(n,o,t)=>`Wallet signer configuration mismatch at "${n}" - expected "${t}" from existing wallet but found "${o}"`;function a(n,o,t=""){if(n!==o){if(n==null||o==null)throw new Error(`Cannot compare null or undefined signer configs at path: ${t}`);for(let r of Object.keys(n)){if(!(r in o))continue;let c=t?`${t}.${r}`:r,e=n[r],s=o[r];if(typeof e=="object"&&e!==null&&typeof s=="object"&&s!==null)a(e,s,c);else if(e!==s)throw new (0, _chunkCT2UGJELcjs.f)(u(c,e,s))}}}exports.a = a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l}from"./chunk-5M7IRODB.js";import{a as t,b as o}from"./chunk-BW7YYVZE.js";var i=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/me{walletType}/transactions/{transactionId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},C=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/me{walletType}/transactions/{transactionId}"},e))},p=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/me{walletType}/transactions"},e))},W=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/me{walletType}/transactions"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},c=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/me{walletType}/signers/{signer}"},e))},u=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/me{walletType}/signers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},V=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/me{walletType}/signatures/{signatureId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},w=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/me{walletType}/signatures/{signatureId}"},e))},T=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/me{walletType}/signatures"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},h=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/me{walletType}/activity"},e))},g=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/me{walletType}"},e))},E=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/me"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},S=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},O=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/transactions/{transactionId}"},e))},d=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/transactions"},e))},G=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/{walletLocator}/transactions"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},D=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/signers/{signer}"},e))},M=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/{walletLocator}/signers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},R=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},b=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/signatures/{signatureId}"},e))},x=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/signatures"},e))},v=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/{walletLocator}/signatures"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},A=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/balances"},e))},m=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets/{walletLocator}/balances"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},y=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}/activity"},e))},f=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/v1-alpha2/wallets/{walletLocator}"},e))},L=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/v1-alpha2/wallets"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},B=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/unstable/wallets/me{walletType}/tokens/{tokenLocator}/transfers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},k=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/unstable/wallets/{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},q=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/unstable/wallets/{walletLocator}/balances"},e))},j=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},F=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/me{walletLocator}/transactions/{transactionId}"},e))},I=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/me{walletLocator}/transactions"},e))},N=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me{walletLocator}/transactions"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},U=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},_=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/me{walletLocator}/signers/{signer}"},e))},z=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me{walletLocator}/signers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},H=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},J=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/me{walletLocator}/signatures/{signatureId}"},e))},K=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/me{walletLocator}/signatures"},e))},P=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me{walletLocator}/signatures"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Q=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/balances"},e))},X=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/me{walletLocator}"},e))},Y=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/me"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Z=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},$=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/transactions/{transactionId}"},e))},ee=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/transactions"},e))},re=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/{walletLocator}/transactions"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},te=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},le=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/signers/{signer}"},e))},oe=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/{walletLocator}/signers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},ae=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},ne=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/signatures/{signatureId}"},e))},se=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/signatures"},e))},ie=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets/{walletLocator}/signatures"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Ce=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}/activity"},e))},pe=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2025-06-09/wallets/{walletLocator}"},e))},We=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2025-06-09/wallets"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},ce=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/me{walletType}/transactions/{transactionId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},ue=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/me{walletType}/transactions/{transactionId}"},e))},Ve=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/me{walletType}/transactions"},e))},we=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/me{walletType}/transactions"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Te=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/me{walletType}/signers/{signer}"},e))},he=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/me{walletType}/signers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},ge=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/me{walletType}/signatures/{signatureId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Ee=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/me{walletType}/signatures/{signatureId}"},e))},Se=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/me{walletType}/signatures"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Oe=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/me{walletType}/activity"},e))},de=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/me{walletType}"},e))},Ge=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/me"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},De=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Me=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}/transactions/{transactionId}"},e))},Re=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}/transactions"},e))},be=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/{walletLocator}/transactions"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},xe=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}/signers/{signer}"},e))},ve=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/{walletLocator}/signers"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Ae=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},me=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}/signatures/{signatureId}"},e))},ye=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}/signatures"},e))},fe=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets/{walletLocator}/signatures"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))},Le=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}/activity"},e))},Be=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{walletLocator}"},e))},ke=e=>{var r;return((r=e.client)!=null?r:l).get(t({url:"/2022-06-09/wallets/{locator}/nfts"},e))},qe=e=>{var r;return((r=e.client)!=null?r:l).post(o(t({url:"/2022-06-09/wallets"},e),{headers:t({"Content-Type":"application/json"},e.headers)}))};export{i as a,C as b,p as c,W as d,c as e,u as f,V as g,w as h,T as i,h as j,g as k,E as l,S as m,O as n,d as o,G as p,D as q,M as r,R as s,b as t,x as u,v,A as w,m as x,y,f as z,L as A,B,k as C,q as D,j as E,F,I as G,N as H,U as I,_ as J,z as K,H as L,J as M,K as N,P as O,Q as P,X as Q,Y as R,Z as S,$ as T,ee as U,re as V,te as W,le as X,oe as Y,ae as Z,ne as _,se as $,ie as aa,Ce as ba,pe as ca,We as da,ce as ea,ue as fa,Ve as ga,we as ha,Te as ia,he as ja,ge as ka,Ee as la,Se as ma,Oe as na,de as oa,Ge as pa,De as qa,Me as ra,Re as sa,be as ta,xe as ua,ve as va,Ae as wa,me as xa,ye as ya,fe as za,Le as Aa,Be as Ba,ke as Ca,qe as Da};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHTM5EELIcjs = require('./chunk-HTM5EELI.cjs');var _chunkCT2UGJELcjs = require('./chunk-CT2UGJEL.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var m,c,R= exports.a =class{constructor(t,n){_chunkXALFCQKDcjs.d.call(void 0, this,m);_chunkXALFCQKDcjs.d.call(void 0, this,c);let{chain:e,address:i,owner:r,signer:p,options:d}=t;_chunkXALFCQKDcjs.e.call(void 0, this,c,n),this.chain=e,this.address=i,this.owner=r,this.signer=p,_chunkXALFCQKDcjs.e.call(void 0, this,m,d)}static getApiClient(t){return t.apiClient}static getOptions(t){return t.options}get apiClient(){return _chunkXALFCQKDcjs.c.call(void 0, this,c)}get options(){return _chunkXALFCQKDcjs.c.call(void 0, this,m)}balances(t,n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let e=this.chain==="solana"?"sol":"eth",i=[e,"usdc",...t!=null?t:[]],r=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getBalance(this.address,{chains:n!=null?n:[this.chain],tokens:i.map(p=>p.toLowerCase())});if("error"in r)throw new Error(`Failed to get balances for wallet: ${JSON.stringify(r.message)}`);return this.transformBalanceResponse(r,e,t)})}transformBalanceResponse(t,n,e){let i=a=>{var w,f,y,T,O;let u=(w=a.chains)==null?void 0:w[this.chain],h="contractAddress"in u?u.contractAddress:void 0;return{symbol:(f=a.symbol)!=null?f:"",name:(y=a.symbol)!=null?y:"",amount:(T=a.amount)!=null?T:"0",contractAddress:h,decimals:a.decimals,rawAmount:(O=a.rawAmount)!=null?O:"0"}},r=t.find(a=>a.symbol===n),p=t.find(a=>a.symbol==="usdc"),d=t.filter(a=>{var u;return a.symbol!==n&&a.symbol!=="usdc"&&(e==null?void 0:e.includes((u=a.symbol)!=null?u:""))}),s=a=>({symbol:a,name:a,amount:"0",contractAddress:void 0,decimals:0,rawAmount:"0"});return{nativeToken:r!=null?i(r):s(n),usdc:p!=null?i(p):s("usdc"),tokens:d.map(i)}}experimental_nfts(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield _chunkXALFCQKDcjs.c.call(void 0, this,c).experimental_getNfts(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {},t),{chain:this.chain,address:this.address}))})}experimental_transactions(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getTransactions(this.walletLocator)})}experimental_activity(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let t=yield this.apiClient.experimental_activity(this.walletLocator,{chain:this.chain});if("error"in t)throw new Error(`Failed to get activity: ${JSON.stringify(t.message)}`);return t})}send(t,n,e,i){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let r=k(t),p=M(n,this.chain),d={recipient:r,amount:e},s=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).send(this.walletLocator,p,d);if("message"in s)throw new (0, _chunkCT2UGJELcjs.q)(`Failed to send token: ${JSON.stringify(s.message)}`);return i!=null&&i.experimental_prepareOnly?{hash:void 0,explorerLink:void 0,transactionId:s.id}:yield this.approveAndWait(s.id)})}addDelegatedSigner(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var e,i;let n=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).registerSigner(this.walletLocator,{signer:t.signer,chain:this.chain==="solana"?void 0:this.chain});if("error"in n)throw new Error(`Failed to register signer: ${JSON.stringify(n.message)}`);if("transaction"in n){let r=n.transaction.id;yield this.approveAndWait(r)}else{let r=(e=n.chains)==null?void 0:e[this.chain];if((r==null?void 0:r.status)==="awaiting-approval"){let p=((i=r.approvals)==null?void 0:i.pending)||[];yield this.approveSignature(p,r.id),yield this.waitForSignature(r.id);return}if((r==null?void 0:r.status)==="pending"){yield this.waitForSignature(r.id);return}}})}delegatedSigners(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var n,e,i;let t=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getWallet(this.walletLocator);if("error"in t)throw new (0, _chunkCT2UGJELcjs.d)(JSON.stringify(t));if(t.type!=="smart"||t.chainType!=="evm"&&t.chainType!=="solana")throw new (0, _chunkCT2UGJELcjs.c)(`Wallet type ${t.type} not supported`);return(i=(e=(n=t==null?void 0:t.config)==null?void 0:n.delegatedSigners)==null?void 0:e.map(r=>{let p=r.locator.indexOf(":");return{signer:`external-wallet:${p>=0?r.locator.slice(p+1):r.locator}`}}))!=null?i:[]})}get walletLocator(){return _chunkXALFCQKDcjs.c.call(void 0, this,c).isServerSide?this.address:`me:${this.chain==="solana"?"solana":"evm"}:smart`}get isSolanaWallet(){return this.chain==="solana"}approveAndWait(t,n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.approveTransaction(t,n),yield this.sleep(1e3),yield this.waitForTransaction(t)})}approveTransaction(t,n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){var s,a,u,h;let e=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getTransaction(this.walletLocator,t);if("error"in e)throw new (0, _chunkCT2UGJELcjs.r)(JSON.stringify(e));if(yield(u=(a=(s=_chunkXALFCQKDcjs.c.call(void 0, this,m))==null?void 0:s.experimental_callbacks)==null?void 0:a.onTransactionStart)==null?void 0:u.call(a),this.signer.type==="api-key")return e;let i=(h=e.approvals)==null?void 0:h.pending;if(i==null)return e;let r=[...n!=null?n:[],this.signer],p=yield Promise.all(i.map(w=>{let f=r.find(T=>T.locator()===w.signer.locator);if(f==null)throw new (0, _chunkCT2UGJELcjs.i)(`Signer ${w.signer} not found in pending approvals`);let y=e.chainType==="solana"&&"transaction"in e.onChain?e.onChain.transaction:w.message;return f.signTransaction(y)})),d=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).approveTransaction(this.walletLocator,e.id,{approvals:p.map(w=>_chunkXALFCQKDcjs.a.call(void 0, {signer:this.signer.locator()},w))});if(d.error)throw new (0, _chunkCT2UGJELcjs.w)(JSON.stringify(d));return d})}approveSignature(t,n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(this.isSolanaWallet)throw new Error("Approving signatures is only supported for EVM smart wallets");let e=t.find(r=>r.signer.locator===this.signer.locator());if(!e)throw new (0, _chunkCT2UGJELcjs.i)(`Signer ${this.signer.locator()} not found in pending approvals`);let i=yield this.signer.signMessage(e.message);return yield _chunkXALFCQKDcjs.c.call(void 0, this,c).approveSignature(this.walletLocator,n,{approvals:[_chunkXALFCQKDcjs.a.call(void 0, {signer:this.signer.locator()},i)]}),i})}waitForSignature(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let n=null;do if(yield new Promise(e=>setTimeout(e,_chunkHTM5EELIcjs.d)),n=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getSignature(this.walletLocator,t),"error"in n)throw new (0, _chunkCT2UGJELcjs.p)(JSON.stringify(n));while(n===null||n.status==="pending");if(n.status==="failed")throw new (0, _chunkCT2UGJELcjs.m)("Signature signing failed");if(!n.outputSignature)throw new (0, _chunkCT2UGJELcjs.p)("Signature not available");return n.outputSignature})}waitForTransaction(p){return _chunkXALFCQKDcjs.f.call(void 0, this,arguments,function*(t,n=6e4,{backoffMultiplier:e=1.1,maxBackoffMs:i=2e3,initialBackoffMs:r=_chunkHTM5EELIcjs.d}={}){var u;let d=Date.now(),s;do{if(Date.now()-d>n)throw new (0, _chunkCT2UGJELcjs.s)("Transaction confirmation timeout");if(s=yield _chunkXALFCQKDcjs.c.call(void 0, this,c).getTransaction(this.walletLocator,t),s.error)throw new (0, _chunkCT2UGJELcjs.r)(JSON.stringify(s));yield this.sleep(r),r=Math.min(r*e,i)}while(s.status==="pending");if(s.status==="failed")throw new (0, _chunkCT2UGJELcjs.t)(`Transaction sending failed: ${JSON.stringify(s.error)}`);if(s.status==="awaiting-approval")throw new (0, _chunkCT2UGJELcjs.u)("Transaction is awaiting approval. Please submit required approvals before waiting for completion.");let a=s.onChain.txId;if(a==null)throw new (0, _chunkCT2UGJELcjs.v)("Transaction hash not found on transaction response");return{hash:a,explorerLink:(u=s.onChain.explorerLink)!=null?u:"",transactionId:s.id}})}sleep(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return new Promise(n=>setTimeout(n,t))})}};m=new WeakMap,c=new WeakMap;function k(o){if(typeof o=="string")return o;if("email"in o)return`email:${o.email}`;if("x"in o)return`x:${o.x}`;if("twitter"in o)return`twitter:${o.twitter}`;if("phone"in o)return`phoneNumber:${o.phone}`;if("userId"in o)return`userId:${o.userId}`;throw new Error("Invalid recipient locator")}function M(o,t){return _commonsdkbase.isValidAddress.call(void 0, o)?`${t}:${o}`:`${t}:${o.toLowerCase()}`}exports.a = R;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as t}from"./chunk-7ENJXL4H.js";import{f as e}from"./chunk-BW7YYVZE.js";import{PublicKey as m,VersionedTransaction as h}from"@solana/web3.js";import i from"bs58";var o=class{constructor(n){this.config=n;this.type="external-wallet";if(n.address==null)throw new Error("Please provide an address for the External Wallet Signer");this.address=n.address,this.onSignTransaction=n.onSignTransaction}locator(){return this.config.locator}signMessage(){return e(this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for solana external wallet signer"))})}signTransaction(n){return e(this,null,function*(){if(this.onSignTransaction==null)return yield Promise.reject(new Error("onSignTransaction method is required to sign transactions with a Solana external wallet"));let l=i.decode(n),c=h.deserialize(l),r=yield this.onSignTransaction(c),d=new m(this.address),a=r.message.staticAccountKeys.findIndex(u=>u.equals(d));if(a===-1)throw new t("Wallet public key not found in transaction signers");let s=r.signatures[a];if(s==null)throw new t("No valid signature found in the transaction");let g=new Uint8Array(Object.values(s));return{signature:i.encode(g)}})}};export{o as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-LMDBWVPC.js";import{a as n}from"./chunk-BPUDXO56.js";import{a as l}from"./chunk-UBOWSXW3.js";import{a as o}from"./chunk-IGBQEAD5.js";import{a as t}from"./chunk-SCS4UDW7.js";import{a as m}from"./chunk-LW6JSI4J.js";import{a as i}from"./chunk-5S6YZJHE.js";function u(r,e){switch(e.type){case"email":return r==="solana"?new n(e):new a(e);case"api-key":return r==="solana"?new o(e):new m(e);case"external-wallet":return r==="solana"?new t(e):new i(e);case"passkey":return new l(e)}}export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKH5LXU3Kcjs = require('./chunk-KH5LXU3K.cjs');var _chunkEXY25K62cjs = require('./chunk-EXY25K62.cjs');var _chunkYWPTI2QOcjs = require('./chunk-YWPTI2QO.cjs');var _chunk4KXOWU5Ecjs = require('./chunk-4KXOWU5E.cjs');var _chunkYTAW674Lcjs = require('./chunk-YTAW674L.cjs');var _chunkYZ4HRYSLcjs = require('./chunk-YZ4HRYSL.cjs');var _chunkBULGM35Wcjs = require('./chunk-BULGM35W.cjs');function E(r,e){switch(e.type){case"email":return r==="solana"?new (0, _chunkEXY25K62cjs.a)(e):new (0, _chunkKH5LXU3Kcjs.a)(e);case"api-key":return r==="solana"?new (0, _chunk4KXOWU5Ecjs.a)(e):new (0, _chunkYZ4HRYSLcjs.a)(e);case"external-wallet":return r==="solana"?new (0, _chunkYTAW674Lcjs.a)(e):new (0, _chunkBULGM35Wcjs.a)(e);case"passkey":return new (0, _chunkYWPTI2QOcjs.a)(e)}}exports.a = E;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHTM5EELIcjs = require('./chunk-HTM5EELI.cjs');var _chunkCT2UGJELcjs = require('./chunk-CT2UGJEL.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var p=class extends _commonsdkbase.CrossmintApiClient{constructor(e){super(e,{internalConfig:{sdkMetadata:{name:_chunkHTM5EELIcjs.c,version:_chunkHTM5EELIcjs.b}}});this.apiPrefix="api/2025-06-09/wallets"}createWallet(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let s=this.isServerSide?`${this.apiPrefix}`:`${this.apiPrefix}/me`;return(yield this.post(s,{body:JSON.stringify(e),headers:this.headers})).json()})}getWallet(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}`,{headers:this.headers})).json()})}createTransaction(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveTransaction(e,s,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions/${s}/approvals`,{body:JSON.stringify(t),headers:this.headers})).json()})}getTransaction(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions/${s}`,{headers:this.headers})).json()})}createSignature(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveSignature(e,s,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures/${s}/approvals`,{body:JSON.stringify(t),headers:this.headers})).json()})}getSignature(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signatures/${s}`,{headers:this.headers})).json()})}getTransactions(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions`,{headers:this.headers})).json()})}experimental_getNfts(e){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let s=new URLSearchParams;s.append("page",e.page.toString()),s.append("perPage",e.perPage.toString());let t=`${e.chain}:${e.address}`;return(yield this.get(`${this.apiPrefix}/${t}/nfts?${s.toString()}`,{headers:this.headers})).json()})}experimental_activity(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let t=new URLSearchParams;return t.append("chain",s.chain.toString()),(yield this.get(`${this.apiPrefix}/${e}/activity?${t.toString()}`,{headers:this.headers})).json()})}getBalance(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){let t=new URLSearchParams;return t.append("tokens",s.tokens.join(",")),t.append("chains",s.chains.join(",")),(yield this.get(`${this.apiPrefix}/${e}/balances?${t.toString()}`,{headers:this.headers})).json()})}registerSigner(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signers`,{body:JSON.stringify(s),headers:this.headers})).json()})}getSigner(e,s){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signers/${s}`,{headers:this.headers})).json()})}send(e,s,t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/tokens/${s}/transfers`,{body:JSON.stringify(t),headers:this.headers})).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 = p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSTYSP6KLcjs = require('./chunk-STYSP6KL.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var s=e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},i= exports.b =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/transactions/{transactionId}"},e))},C= exports.c =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/transactions"},e))},p= exports.d =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},W= exports.e =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signers/{signer}"},e))},c= exports.f =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},u= exports.g =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},V= exports.h =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signatures/{signatureId}"},e))},w= exports.i =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},T= exports.j =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}/activity"},e))},h= exports.k =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me{walletType}"},e))},g= exports.l =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/me"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},E= exports.m =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},S= exports.n =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/transactions/{transactionId}"},e))},O= exports.o =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/transactions"},e))},d= exports.p =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},G= exports.q =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signers/{signer}"},e))},D= exports.r =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},M= exports.s =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},R= exports.t =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signatures/{signatureId}"},e))},b= exports.u =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signatures"},e))},x= exports.v =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},v= exports.w =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/balances"},e))},A= exports.x =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/balances"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},m= exports.y =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}/activity"},e))},y= exports.z =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets/{walletLocator}"},e))},f= exports.A =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/v1-alpha2/wallets"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},L= exports.B =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/unstable/wallets/me{walletType}/tokens/{tokenLocator}/transfers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},B= exports.C =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/unstable/wallets/{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},k= exports.D =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/unstable/wallets/{walletLocator}/balances"},e))},q= exports.E =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},j= exports.F =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/transactions/{transactionId}"},e))},F= exports.G =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/transactions"},e))},I= exports.H =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},N= exports.I =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},U= exports.J =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signers/{signer}"},e))},_= exports.K =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},z= exports.L =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},H= exports.M =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signatures/{signatureId}"},e))},J= exports.N =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signatures"},e))},K= exports.O =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},P= exports.P =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/balances"},e))},Q= exports.Q =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me{walletLocator}"},e))},X= exports.R =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/me"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Y= exports.S =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Z= exports.T =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/transactions/{transactionId}"},e))},$= exports.U =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/transactions"},e))},ee= exports.V =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},re= exports.W =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/tokens/{tokenLocator}/transfers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},te= exports.X =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signers/{signer}"},e))},le= exports.Y =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},oe= exports.Z =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ae= exports._ =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signatures/{signatureId}"},e))},ne= exports.$ =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signatures"},e))},se= exports.aa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ie= exports.ba =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}/activity"},e))},Ce= exports.ca =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets/{walletLocator}"},e))},pe= exports.da =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2025-06-09/wallets"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},We= exports.ea =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ce= exports.fa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/transactions/{transactionId}"},e))},ue= exports.ga =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/transactions"},e))},Ve= exports.ha =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},we= exports.ia =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signers/{signer}"},e))},Te= exports.ja =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},he= exports.ka =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ge= exports.la =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signatures/{signatureId}"},e))},Ee= exports.ma =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Se= exports.na =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}/activity"},e))},Oe= exports.oa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me{walletType}"},e))},de= exports.pa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/me"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Ge= exports.qa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/transactions/{transactionId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},De= exports.ra =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/transactions/{transactionId}"},e))},Me= exports.sa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/transactions"},e))},Re= exports.ta =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/transactions"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},be= exports.ua =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signers/{signer}"},e))},xe= exports.va =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signers"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},ve= exports.wa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signatures/{signatureId}/approvals"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},Ae= exports.xa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signatures/{signatureId}"},e))},me= exports.ya =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signatures"},e))},ye= exports.za =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/signatures"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))},fe= exports.Aa =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}/activity"},e))},Le= exports.Ba =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{walletLocator}"},e))},Be= exports.Ca =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).get(_chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets/{locator}/nfts"},e))},ke= exports.Da =e=>{var r;return((r=e.client)!=null?r:_chunkSTYSP6KLcjs.a).post(_chunkXALFCQKDcjs.b.call(void 0, _chunkXALFCQKDcjs.a.call(void 0, {url:"/2022-06-09/wallets"},e),{headers:_chunkXALFCQKDcjs.a.call(void 0, {"Content-Type":"application/json"},e.headers)}))};exports.a = s; exports.b = i; exports.c = C; exports.d = p; exports.e = W; exports.f = c; exports.g = u; exports.h = V; exports.i = w; exports.j = T; exports.k = h; exports.l = g; exports.m = E; exports.n = S; exports.o = O; exports.p = d; exports.q = G; exports.r = D; exports.s = M; exports.t = R; exports.u = b; exports.v = x; exports.w = v; exports.x = A; exports.y = m; exports.z = y; exports.A = f; exports.B = L; exports.C = B; exports.D = k; exports.E = q; exports.F = j; exports.G = F; exports.H = I; exports.I = N; exports.J = U; exports.K = _; exports.L = z; exports.M = H; exports.N = J; exports.O = K; exports.P = P; exports.Q = Q; exports.R = X; exports.S = Y; exports.T = Z; exports.U = $; exports.V = ee; exports.W = re; exports.X = te; exports.Y = le; exports.Z = oe; exports._ = ae; exports.$ = ne; exports.aa = se; exports.ba = ie; exports.ca = Ce; exports.da = pe; exports.ea = We; exports.fa = ce; exports.ga = ue; exports.ha = Ve; exports.ia = we; exports.ja = Te; exports.ka = he; exports.la = ge; exports.ma = Ee; exports.na = Se; exports.oa = Oe; exports.pa = de; exports.qa = Ge; exports.ra = De; exports.sa = Me; exports.ta = Re; exports.ua = be; exports.va = xe; exports.wa = ve; exports.xa = Ae; exports.ya = me; exports.za = ye; exports.Aa = fe; exports.Ba = Le; exports.Ca = Be; exports.Da = ke;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as i}from"./chunk-BW7YYVZE.js";import{WebAuthnP256 as e}from"ox";var n=class{constructor(t){this.config=t;this.type="passkey";this.id=t.id}locator(){return this.config.locator}signMessage(t){return i(this,null,function*(){if(this.config.onSignWithPasskey)return yield this.config.onSignWithPasskey(t);let{signature:s,metadata:r}=yield e.sign({credentialId:this.id,challenge:t});return{signature:{r:`0x${s.r.toString(16)}`,s:`0x${s.s.toString(16)}`},metadata:r}})}signTransaction(t){return i(this,null,function*(){return yield this.signMessage(t)})}};export{n as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-JHLGQJW3.js";import{a}from"./chunk-NEEKQHR3.js";import{f as e}from"./chunk-BW7YYVZE.js";import{createCrossmint as p}from"@crossmint/common-sdk-base";var i=class o{constructor(t){let r=new a(t);this.walletFactory=new l(r)}static from(t){return new o(t)}getOrCreateWallet(t){return e(this,null,function*(){return yield this.walletFactory.getOrCreateWallet(t)})}getWallet(t,r){return e(this,null,function*(){return yield this.walletFactory.getWallet(t,r)})}createWallet(t){return e(this,null,function*(){return yield this.walletFactory.createWallet(t)})}};export{p as a,i as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkCT2UGJELcjs = require('./chunk-CT2UGJEL.cjs');var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _web3js = require('@solana/web3.js');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var o=class{constructor(n){this.config=n;this.type="external-wallet";if(n.address==null)throw new Error("Please provide an address for the External Wallet Signer");this.address=n.address,this.onSignTransaction=n.onSignTransaction}locator(){return this.config.locator}signMessage(){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield Promise.reject(new Error("signMessage method not implemented for solana external wallet signer"))})}signTransaction(n){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(this.onSignTransaction==null)return yield Promise.reject(new Error("onSignTransaction method is required to sign transactions with a Solana external wallet"));let l=_bs582.default.decode(n),c=_web3js.VersionedTransaction.deserialize(l),r=yield this.onSignTransaction(c),d=new (0, _web3js.PublicKey)(this.address),a=r.message.staticAccountKeys.findIndex(u=>u.equals(d));if(a===-1)throw new (0, _chunkCT2UGJELcjs.w)("Wallet public key not found in transaction signers");let s=r.signatures[a];if(s==null)throw new (0, _chunkCT2UGJELcjs.w)("No valid signature found in the transaction");let g=new Uint8Array(Object.values(s));return{signature:_bs582.default.encode(g)}})}};exports.a = o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXALFCQKDcjs = require('./chunk-XALFCQKD.cjs');var _ox = require('ox');var n=class{constructor(t){this.config=t;this.type="passkey";this.id=t.id}locator(){return this.config.locator}signMessage(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){if(this.config.onSignWithPasskey)return yield this.config.onSignWithPasskey(t);let{signature:s,metadata:r}=yield _ox.WebAuthnP256.sign({credentialId:this.id,challenge:t});return{signature:{r:`0x${s.r.toString(16)}`,s:`0x${s.s.toString(16)}`},metadata:r}})}signTransaction(t){return _chunkXALFCQKDcjs.f.call(void 0, this,null,function*(){return yield this.signMessage(t)})}};exports.a = n;
|