@crossmint/wallets-sdk 1.0.3 → 1.0.4
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/__tests__/constants.d.cts +1 -1
- package/dist/api/__tests__/constants.d.ts +1 -1
- package/dist/api/__tests__/test-utils.cjs +1 -1
- package/dist/api/__tests__/test-utils.d.cts +1 -1
- package/dist/api/__tests__/test-utils.d.ts +1 -1
- package/dist/api/__tests__/test-utils.js +1 -1
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.d.cts +1 -1
- package/dist/api/client.d.ts +1 -1
- package/dist/api/client.js +1 -1
- 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 +1 -1
- package/dist/api/types.d.ts +1 -1
- package/dist/chains/chains.cjs +1 -1
- package/dist/chains/chains.js +1 -1
- package/dist/{chunk-LWTPWZZS.cjs → chunk-2CDTZNKV.cjs} +1 -1
- package/dist/{chunk-4SXMOTDH.cjs → chunk-2E4HUF2I.cjs} +1 -1
- package/dist/{chunk-PDNXECMW.js → chunk-2MTALLO2.js} +1 -1
- package/dist/{chunk-EHN3LSAJ.cjs → chunk-2OHUVDXX.cjs} +1 -1
- package/dist/chunk-43EGNJKN.js +1 -0
- package/dist/{chunk-NMZLDVBQ.js → chunk-5B2527NO.js} +1 -1
- package/dist/{chunk-XOEAILGF.js → chunk-5CNMKWSU.js} +1 -1
- package/dist/chunk-6OPFQZL6.js +1 -0
- package/dist/{chunk-PQZP5ZKI.js → chunk-7QSKVAZF.js} +1 -1
- package/dist/{chunk-Y3U34F7K.js → chunk-AQEVTPWR.js} +1 -1
- package/dist/{chunk-SJZXH2AI.js → chunk-CQIZ6KZS.js} +1 -1
- package/dist/{chunk-TMY52Z53.cjs → chunk-GDVKUQ2B.cjs} +1 -1
- package/dist/{chunk-EGGND7OJ.js → chunk-GV7RSDWU.js} +1 -1
- package/dist/{chunk-XHLLW7MX.js → chunk-IJJJMVUZ.js} +1 -1
- package/dist/{chunk-EFQFA33E.js → chunk-JO7VMMRU.js} +1 -1
- package/dist/{chunk-UJQJXFDS.cjs → chunk-JQR5QGTL.cjs} +1 -1
- package/dist/{chunk-5DAPKXB7.cjs → chunk-KCP7N5UO.cjs} +1 -1
- package/dist/{chunk-M7NL3LRE.cjs → chunk-KJJPND7T.cjs} +1 -1
- package/dist/{chunk-4PR5PN3Z.cjs → chunk-LMRRURLU.cjs} +2 -2
- package/dist/chunk-O4FUTA6J.js +1 -0
- package/dist/{chunk-3NMSHSGP.js → chunk-O737TVMB.js} +1 -1
- package/dist/{chunk-27J74EMS.cjs → chunk-ONZG66QH.cjs} +1 -1
- package/dist/{chunk-EMW6MVFF.js → chunk-OQS7BQBC.js} +1 -1
- package/dist/{chunk-QBXXVIRU.js → chunk-OYQ74Q5Z.js} +1 -1
- package/dist/{chunk-MFGW7RMO.cjs → chunk-PMKIHQOM.cjs} +1 -1
- package/dist/{chunk-GZP2JQ6P.cjs → chunk-RRFJMYA5.cjs} +1 -1
- package/dist/{chunk-WLC6H25S.cjs → chunk-S6CWIL3C.cjs} +1 -1
- package/dist/{chunk-5NWPCMOC.cjs → chunk-T7QKT6ND.cjs} +1 -1
- package/dist/chunk-TIPWO2WO.js +3 -0
- package/dist/{chunk-23KPZFOG.cjs → chunk-UD57J5V7.cjs} +1 -1
- package/dist/{chunk-4I3RUK4J.cjs → chunk-WY7MUXV3.cjs} +1 -1
- package/dist/{chunk-WQTRX7MN.cjs → chunk-XWGT54VP.cjs} +1 -1
- package/dist/{chunk-2EZHDAMN.cjs → chunk-Z6ESSYP6.cjs} +1 -1
- package/dist/{chunk-BQ5AOSHX.js → chunk-ZOTNX4UW.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/logger/index.cjs +1 -1
- package/dist/logger/index.js +1 -1
- package/dist/logger/init.cjs +1 -1
- package/dist/logger/init.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/device.d.cts +1 -1
- package/dist/signers/device.d.ts +1 -1
- package/dist/signers/evm-api-key.d.cts +1 -1
- package/dist/signers/evm-api-key.d.ts +1 -1
- package/dist/signers/evm-external-wallet.d.cts +1 -1
- package/dist/signers/evm-external-wallet.d.ts +1 -1
- package/dist/signers/external-wallet-signer.d.cts +1 -1
- package/dist/signers/external-wallet-signer.d.ts +1 -1
- package/dist/signers/index.cjs +1 -1
- package/dist/signers/index.d.cts +1 -1
- package/dist/signers/index.d.ts +1 -1
- package/dist/signers/index.js +1 -1
- package/dist/signers/non-custodial/index.cjs +1 -1
- package/dist/signers/non-custodial/index.d.cts +1 -1
- package/dist/signers/non-custodial/index.d.ts +1 -1
- package/dist/signers/non-custodial/index.js +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.d.cts +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.d.ts +1 -1
- package/dist/signers/non-custodial/ncs-evm-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-signer.d.cts +1 -1
- package/dist/signers/non-custodial/ncs-signer.d.ts +1 -1
- package/dist/signers/non-custodial/ncs-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.d.cts +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.d.ts +1 -1
- package/dist/signers/non-custodial/ncs-solana-signer.js +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +1 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.js +1 -1
- package/dist/signers/passkey.d.cts +1 -1
- package/dist/signers/passkey.d.ts +1 -1
- package/dist/signers/server/assemble-server-signer.cjs +1 -1
- package/dist/signers/server/assemble-server-signer.d.cts +1 -1
- package/dist/signers/server/assemble-server-signer.d.ts +1 -1
- package/dist/signers/server/assemble-server-signer.js +1 -1
- package/dist/signers/server/evm-server-signer.d.cts +1 -1
- package/dist/signers/server/evm-server-signer.d.ts +1 -1
- package/dist/signers/server/helpers/derive-server-signer.d.cts +1 -1
- package/dist/signers/server/helpers/derive-server-signer.d.ts +1 -1
- package/dist/signers/server/helpers/index.d.cts +1 -1
- package/dist/signers/server/helpers/index.d.ts +1 -1
- package/dist/signers/server/index.cjs +1 -1
- package/dist/signers/server/index.d.cts +1 -1
- package/dist/signers/server/index.d.ts +1 -1
- package/dist/signers/server/index.js +1 -1
- package/dist/signers/server/solana-server-signer.d.cts +1 -1
- package/dist/signers/server/solana-server-signer.d.ts +1 -1
- package/dist/signers/server/stellar-server-signer.d.cts +1 -1
- package/dist/signers/server/stellar-server-signer.d.ts +1 -1
- package/dist/signers/solana-api-key.d.cts +1 -1
- package/dist/signers/solana-api-key.d.ts +1 -1
- package/dist/signers/solana-external-wallet.d.cts +1 -1
- package/dist/signers/solana-external-wallet.d.ts +1 -1
- package/dist/signers/stellar-external-wallet.d.cts +1 -1
- package/dist/signers/stellar-external-wallet.d.ts +1 -1
- package/dist/signers/types.d.cts +1 -1
- package/dist/signers/types.d.ts +1 -1
- package/dist/{types-DfT-EHk3.d.cts → types-SHQAcrFF.d.cts} +1 -1
- package/dist/{types-vcGYTcL0.d.ts → types-guSZ0uln.d.ts} +1 -1
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.cjs +1 -1
- package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.js +1 -1
- package/dist/utils/device-signers/createDeviceSigner.d.cts +1 -1
- package/dist/utils/device-signers/createDeviceSigner.d.ts +1 -1
- package/dist/utils/device-signers/index.cjs +1 -1
- package/dist/utils/device-signers/index.d.cts +1 -1
- package/dist/utils/device-signers/index.d.ts +1 -1
- package/dist/utils/device-signers/index.js +1 -1
- package/dist/utils/signer-locator.d.cts +1 -1
- package/dist/utils/signer-locator.d.ts +1 -1
- package/dist/utils/signer-mapping.d.cts +1 -1
- package/dist/utils/signer-mapping.d.ts +1 -1
- package/dist/wallets/__tests__/test-helpers.cjs +1 -1
- package/dist/wallets/__tests__/test-helpers.d.cts +1 -1
- package/dist/wallets/__tests__/test-helpers.d.ts +1 -1
- package/dist/wallets/__tests__/test-helpers.js +1 -1
- package/dist/wallets/evm.cjs +1 -1
- package/dist/wallets/evm.d.cts +1 -1
- package/dist/wallets/evm.d.ts +1 -1
- package/dist/wallets/evm.js +1 -1
- package/dist/wallets/solana.cjs +1 -1
- package/dist/wallets/solana.d.cts +1 -1
- package/dist/wallets/solana.d.ts +1 -1
- package/dist/wallets/solana.js +1 -1
- package/dist/wallets/stellar.cjs +1 -1
- package/dist/wallets/stellar.d.cts +1 -1
- package/dist/wallets/stellar.d.ts +1 -1
- package/dist/wallets/stellar.js +1 -1
- package/dist/wallets/types.d.cts +1 -1
- package/dist/wallets/types.d.ts +1 -1
- package/dist/wallets/wallet-factory.cjs +1 -1
- package/dist/wallets/wallet-factory.d.cts +1 -1
- package/dist/wallets/wallet-factory.d.ts +1 -1
- package/dist/wallets/wallet-factory.js +1 -1
- package/dist/wallets/wallet.cjs +1 -1
- package/dist/wallets/wallet.d.cts +2 -1
- package/dist/wallets/wallet.d.ts +2 -1
- package/dist/wallets/wallet.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-6X5JEJD7.js +0 -1
- package/dist/chunk-JXULWUYO.js +0 -3
- package/dist/chunk-QZO3WO3R.js +0 -1
- package/dist/chunk-ZYB4O4OG.js +0 -1
|
@@ -78,7 +78,7 @@ type FormattedEVMTransaction = {
|
|
|
78
78
|
} | {
|
|
79
79
|
transaction: string;
|
|
80
80
|
};
|
|
81
|
-
type SignerStatus = "success" | "pending" | "awaiting-approval" | "failed";
|
|
81
|
+
type SignerStatus = "success" | "active" | "pending" | "awaiting-approval" | "failed";
|
|
82
82
|
type SignerInput = {
|
|
83
83
|
signer: string | ServerSignerConfig;
|
|
84
84
|
};
|
|
@@ -78,7 +78,7 @@ type FormattedEVMTransaction = {
|
|
|
78
78
|
} | {
|
|
79
79
|
transaction: string;
|
|
80
80
|
};
|
|
81
|
-
type SignerStatus = "success" | "pending" | "awaiting-approval" | "failed";
|
|
81
|
+
type SignerStatus = "success" | "active" | "pending" | "awaiting-approval" | "failed";
|
|
82
82
|
type SignerInput = {
|
|
83
83
|
signer: string | ServerSignerConfig;
|
|
84
84
|
};
|
package/dist/utils/constants.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2E4HUF2Icjs = require('../chunk-2E4HUF2I.cjs');require('../chunk-2GKPWQBQ.cjs');exports.SDK_NAME = _chunk2E4HUF2Icjs.c; exports.SDK_VERSION = _chunk2E4HUF2Icjs.b; exports.STATUS_POLLING_INTERVAL_MS = _chunk2E4HUF2Icjs.d; exports.WALLETS_SERVICE = _chunk2E4HUF2Icjs.a;
|
package/dist/utils/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-6OPFQZL6.js";import"../chunk-J3R36SGJ.js";export{c as SDK_NAME,b as SDK_VERSION,d as STATUS_POLLING_INTERVAL_MS,a as WALLETS_SERVICE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXWGT54VPcjs = require('../../chunk-XWGT54VP.cjs');require('../../chunk-3VYGTPRF.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-T7QKT6ND.cjs');require('../../chunk-2E4HUF2I.cjs');require('../../chunk-2GKPWQBQ.cjs');exports.IframeDeviceSignerKeyStorage = _chunkXWGT54VPcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-5B2527NO.js";import"../../chunk-IOSADDL5.js";import"../../chunk-455NK5LB.js";import"../../chunk-AQEVTPWR.js";import"../../chunk-6OPFQZL6.js";import"../../chunk-J3R36SGJ.js";export{a as IframeDeviceSignerKeyStorage};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeviceSignerKeyStorage } from './DeviceSignerKeyStorage.cjs';
|
|
2
|
-
import { w as DeviceSignerConfig } from '../../types-
|
|
2
|
+
import { w as DeviceSignerConfig } from '../../types-SHQAcrFF.cjs';
|
|
3
3
|
import 'viem';
|
|
4
4
|
import '../../api/gen/types.gen.cjs';
|
|
5
5
|
import 'ox';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeviceSignerKeyStorage } from './DeviceSignerKeyStorage.js';
|
|
2
|
-
import { w as DeviceSignerConfig } from '../../types-
|
|
2
|
+
import { w as DeviceSignerConfig } from '../../types-guSZ0uln.js';
|
|
3
3
|
import 'viem';
|
|
4
4
|
import '../../api/gen/types.gen.js';
|
|
5
5
|
import 'ox';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-CUHDOBKN.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-CUHDOBKN.cjs');var _chunkXWGT54VPcjs = require('../../chunk-XWGT54VP.cjs');var _chunk3VYGTPRFcjs = require('../../chunk-3VYGTPRF.cjs');var _chunkYHV3672Rcjs = require('../../chunk-YHV3672R.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-T7QKT6ND.cjs');require('../../chunk-2E4HUF2I.cjs');require('../../chunk-2GKPWQBQ.cjs');exports.DeviceSignerKeyStorage = _chunk3VYGTPRFcjs.a; exports.IframeDeviceSignerKeyStorage = _chunkXWGT54VPcjs.a; exports.createDeviceSigner = _chunkYHV3672Rcjs.a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { BiometricPolicy, DeviceSignerKeyStorage } from './DeviceSignerKeyStorage.cjs';
|
|
2
2
|
export { BiometricRequestHandler, IframeDeviceSignerKeyStorage } from './IframeDeviceSignerKeyStorage.cjs';
|
|
3
3
|
export { createDeviceSigner } from './createDeviceSigner.cjs';
|
|
4
|
-
import '../../types-
|
|
4
|
+
import '../../types-SHQAcrFF.cjs';
|
|
5
5
|
import 'viem';
|
|
6
6
|
import '../../api/gen/types.gen.cjs';
|
|
7
7
|
import 'ox';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { BiometricPolicy, DeviceSignerKeyStorage } from './DeviceSignerKeyStorage.js';
|
|
2
2
|
export { BiometricRequestHandler, IframeDeviceSignerKeyStorage } from './IframeDeviceSignerKeyStorage.js';
|
|
3
3
|
export { createDeviceSigner } from './createDeviceSigner.js';
|
|
4
|
-
import '../../types-
|
|
4
|
+
import '../../types-guSZ0uln.js';
|
|
5
5
|
import 'viem';
|
|
6
6
|
import '../../api/gen/types.gen.js';
|
|
7
7
|
import 'ox';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../chunk-TOAFCAVT.js";import{a as
|
|
1
|
+
import"../../chunk-TOAFCAVT.js";import{a as b}from"../../chunk-5B2527NO.js";import{a}from"../../chunk-IOSADDL5.js";import{a as c}from"../../chunk-N4IWDL6M.js";import"../../chunk-455NK5LB.js";import"../../chunk-AQEVTPWR.js";import"../../chunk-6OPFQZL6.js";import"../../chunk-J3R36SGJ.js";export{a as DeviceSignerKeyStorage,b as IframeDeviceSignerKeyStorage,c as createDeviceSigner};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Chain } from '../chains/chains.cjs';
|
|
2
|
-
import { r as SignerConfigForChain, R as RegisterSignerPasskeyParams, o as ExternalWalletRegistrationConfig, s as SignerLocator } from '../types-
|
|
2
|
+
import { r as SignerConfigForChain, R as RegisterSignerPasskeyParams, o as ExternalWalletRegistrationConfig, s as SignerLocator } from '../types-SHQAcrFF.cjs';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '../api/gen/types.gen.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Chain } from '../chains/chains.js';
|
|
2
|
-
import { r as SignerConfigForChain, R as RegisterSignerPasskeyParams, o as ExternalWalletRegistrationConfig, s as SignerLocator } from '../types-
|
|
2
|
+
import { r as SignerConfigForChain, R as RegisterSignerPasskeyParams, o as ExternalWalletRegistrationConfig, s as SignerLocator } from '../types-guSZ0uln.js';
|
|
3
3
|
import '@crossmint/common-sdk-base';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '../api/gen/types.gen.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as Signer, S as Signer$1, b as SignerStatus } from '../types-
|
|
1
|
+
import { N as Signer, S as Signer$1, b as SignerStatus } from '../types-SHQAcrFF.cjs';
|
|
2
2
|
import { Chain } from '../chains/chains.cjs';
|
|
3
3
|
import 'viem';
|
|
4
4
|
import '../api/gen/types.gen.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as Signer, S as Signer$1, b as SignerStatus } from '../types-
|
|
1
|
+
import { N as Signer, S as Signer$1, b as SignerStatus } from '../types-guSZ0uln.js';
|
|
2
2
|
import { Chain } from '../chains/chains.js';
|
|
3
3
|
import 'viem';
|
|
4
4
|
import '../api/gen/types.gen.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLMRRURLUcjs = require('../../chunk-LMRRURLU.cjs');require('../../chunk-CUHDOBKN.cjs');require('../../chunk-XWGT54VP.cjs');require('../../chunk-3VYGTPRF.cjs');require('../../chunk-YHV3672R.cjs');require('../../chunk-NX256LAH.cjs');require('../../chunk-D6SLJ5C2.cjs');require('../../chunk-KCP7N5UO.cjs');require('../../chunk-5IC7UWND.cjs');require('../../chunk-RRFJMYA5.cjs');require('../../chunk-4DJWSV7I.cjs');require('../../chunk-YF5G4U6L.cjs');require('../../chunk-IGRPHTXZ.cjs');require('../../chunk-3VSFHDFH.cjs');require('../../chunk-ENU3EKBG.cjs');require('../../chunk-3SVXPFSP.cjs');require('../../chunk-PO6S7UR3.cjs');require('../../chunk-GDVKUQ2B.cjs');require('../../chunk-UD57J5V7.cjs');require('../../chunk-S6CWIL3C.cjs');require('../../chunk-PMKIHQOM.cjs');require('../../chunk-JBP52JOH.cjs');require('../../chunk-5FH7WFWL.cjs');require('../../chunk-SPTXAOFR.cjs');require('../../chunk-5QIW67NU.cjs');require('../../chunk-YGL4ITFK.cjs');require('../../chunk-GEY3BU62.cjs');require('../../chunk-PHPBBEXU.cjs');require('../../chunk-A33BEWR7.cjs');require('../../chunk-OGP7B5O3.cjs');require('../../chunk-IJ632UXD.cjs');require('../../chunk-6EZCCLTK.cjs');require('../../chunk-SCEPJO4Q.cjs');require('../../chunk-WY7MUXV3.cjs');require('../../chunk-GEY574TH.cjs');require('../../chunk-UE3WVHTM.cjs');require('../../chunk-5X4EOJFG.cjs');require('../../chunk-HRUMWG2F.cjs');require('../../chunk-IR5WN6FQ.cjs');require('../../chunk-T3U46LK3.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-T7QKT6ND.cjs');require('../../chunk-2E4HUF2I.cjs');var _chunk2GKPWQBQcjs = require('../../chunk-2GKPWQBQ.cjs');var _vitest = require('vitest');var _commonsdkbase = require('@crossmint/common-sdk-base');var s=e=>{switch(e){case"solana":return"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM";case"stellar":return"GCKFBEIYTKP6RCZX6LRQW2JVAVLMGGVSNESWKN7L2YGQNI2DCOHVHJVY";default:return"0x1234567890123456789012345678901234567890"}},c=(e,t)=>{if(e==="api-key")return"api-key";switch(t){case"solana":return"external-wallet:ABC123";case"stellar":return"external-wallet:GABC123";default:return"external-wallet:0x123"}},g= exports.createMockSigner =(e="api-key",t="base-sepolia")=>e==="api-key"?{type:e}:{type:e,address:c(e,t).split(":")[1],onSign:_vitest.vi.fn().mockResolvedValue("0xsigned")},S= exports.createMockWallet =(e,t,i="api-key")=>_chunk2GKPWQBQcjs.g.call(void 0, void 0,null,function*(){let l=g(i,e),r=new (0, _chunkLMRRURLUcjs.a)({chain:e,address:s(e),recovery:{type:"api-key"}},t);return _vitest.vi.spyOn(r,"signers").mockImplementation(()=>Promise.resolve([{type:i==="api-key"?"api-key":"external-wallet",address:s(e),locator:c(i,e),status:"success"}])),yield r.useSigner(l),r}),f= exports.createMockApiClient =(e={})=>_chunk2GKPWQBQcjs.a.call(void 0, {isServerSide:!1,environment:_commonsdkbase.APIKeyEnvironmentPrefix.STAGING,createTransaction:_vitest.vi.fn(),createSignature:_vitest.vi.fn(),getTransaction:_vitest.vi.fn(),getSignature:_vitest.vi.fn(),approveTransaction:_vitest.vi.fn(),approveSignature:_vitest.vi.fn(),getBalance:_vitest.vi.fn(),send:_vitest.vi.fn(),getWallet:_vitest.vi.fn(),registerSigner:_vitest.vi.fn(),getSigner:_vitest.vi.fn()},e),M= exports.createMockSolanaSerializedTransaction =()=>"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgEDBQrKxEIIPWsDwcGCzLQ7FGIHQ38p0dZq6bG2v2wUAUqMx3jV1jZ0";exports.createMockApiClient = f; exports.createMockSigner = g; exports.createMockSolanaSerializedTransaction = M; exports.createMockWallet = S;
|
|
@@ -2,7 +2,7 @@ import { MockedFunction } from 'vitest';
|
|
|
2
2
|
import { APIKeyEnvironmentPrefix } from '@crossmint/common-sdk-base';
|
|
3
3
|
import { Wallet } from '../wallet.cjs';
|
|
4
4
|
import { ApiClient } from '../../api/client.cjs';
|
|
5
|
-
import { r as SignerConfigForChain } from '../../types-
|
|
5
|
+
import { r as SignerConfigForChain } from '../../types-SHQAcrFF.cjs';
|
|
6
6
|
import { Chain } from '../../chains/chains.cjs';
|
|
7
7
|
import '../../api/gen/types.gen.cjs';
|
|
8
8
|
import 'viem';
|
|
@@ -2,7 +2,7 @@ import { MockedFunction } from 'vitest';
|
|
|
2
2
|
import { APIKeyEnvironmentPrefix } from '@crossmint/common-sdk-base';
|
|
3
3
|
import { Wallet } from '../wallet.js';
|
|
4
4
|
import { ApiClient } from '../../api/client.js';
|
|
5
|
-
import { r as SignerConfigForChain } from '../../types-
|
|
5
|
+
import { r as SignerConfigForChain } from '../../types-guSZ0uln.js';
|
|
6
6
|
import { Chain } from '../../chains/chains.js';
|
|
7
7
|
import '../../api/gen/types.gen.js';
|
|
8
8
|
import 'viem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"../../chunk-
|
|
1
|
+
import{a as o}from"../../chunk-TIPWO2WO.js";import"../../chunk-TOAFCAVT.js";import"../../chunk-5B2527NO.js";import"../../chunk-IOSADDL5.js";import"../../chunk-N4IWDL6M.js";import"../../chunk-GOXB2RBF.js";import"../../chunk-VADIEIDS.js";import"../../chunk-7QSKVAZF.js";import"../../chunk-L52GDMSH.js";import"../../chunk-O4FUTA6J.js";import"../../chunk-3VRN3GKQ.js";import"../../chunk-BITOMWYZ.js";import"../../chunk-QM3BB4E2.js";import"../../chunk-RBSMBO4T.js";import"../../chunk-OQZTL6ZG.js";import"../../chunk-N355UETO.js";import"../../chunk-YDZRBHS3.js";import"../../chunk-OQS7BQBC.js";import"../../chunk-5CNMKWSU.js";import"../../chunk-CQIZ6KZS.js";import"../../chunk-2MTALLO2.js";import"../../chunk-O6VBO7KG.js";import"../../chunk-EM3D5Q3A.js";import"../../chunk-EE4ITUGS.js";import"../../chunk-WCGUGIGJ.js";import"../../chunk-XNZLCUTY.js";import"../../chunk-CKZYSQOK.js";import"../../chunk-QVTKTDED.js";import"../../chunk-XS5B3TUE.js";import"../../chunk-M335XCYO.js";import"../../chunk-YH7G2U6V.js";import"../../chunk-W7LJS32A.js";import"../../chunk-2YLRFJ66.js";import"../../chunk-JO7VMMRU.js";import"../../chunk-S3DYQVRD.js";import"../../chunk-KUP7H7X2.js";import"../../chunk-FT5EVMLB.js";import"../../chunk-SVIKBM3S.js";import"../../chunk-KKQBZXFE.js";import"../../chunk-EXC7TCGL.js";import"../../chunk-455NK5LB.js";import"../../chunk-AQEVTPWR.js";import"../../chunk-6OPFQZL6.js";import{a,g as A}from"../../chunk-J3R36SGJ.js";import{vi as n}from"vitest";import{APIKeyEnvironmentPrefix as p}from"@crossmint/common-sdk-base";var s=e=>{switch(e){case"solana":return"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM";case"stellar":return"GCKFBEIYTKP6RCZX6LRQW2JVAVLMGGVSNESWKN7L2YGQNI2DCOHVHJVY";default:return"0x1234567890123456789012345678901234567890"}},c=(e,t)=>{if(e==="api-key")return"api-key";switch(t){case"solana":return"external-wallet:ABC123";case"stellar":return"external-wallet:GABC123";default:return"external-wallet:0x123"}},g=(e="api-key",t="base-sepolia")=>e==="api-key"?{type:e}:{type:e,address:c(e,t).split(":")[1],onSign:n.fn().mockResolvedValue("0xsigned")},f=(e,t,i="api-key")=>A(void 0,null,function*(){let l=g(i,e),r=new o({chain:e,address:s(e),recovery:{type:"api-key"}},t);return n.spyOn(r,"signers").mockImplementation(()=>Promise.resolve([{type:i==="api-key"?"api-key":"external-wallet",address:s(e),locator:c(i,e),status:"success"}])),yield r.useSigner(l),r}),M=(e={})=>a({isServerSide:!1,environment:p.STAGING,createTransaction:n.fn(),createSignature:n.fn(),getTransaction:n.fn(),getSignature:n.fn(),approveTransaction:n.fn(),approveSignature:n.fn(),getBalance:n.fn(),send:n.fn(),getWallet:n.fn(),registerSigner:n.fn(),getSigner:n.fn()},e),m=()=>"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgEDBQrKxEIIPWsDwcGCzLQ7FGIHQ38p0dZq6bG2v2wUAUqMx3jV1jZ0";export{M as createMockApiClient,g as createMockSigner,m as createMockSolanaSerializedTransaction,f as createMockWallet};
|
package/dist/wallets/evm.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2OHUVDXXcjs = require('../chunk-2OHUVDXX.cjs');require('../chunk-LMRRURLU.cjs');require('../chunk-CUHDOBKN.cjs');require('../chunk-XWGT54VP.cjs');require('../chunk-3VYGTPRF.cjs');require('../chunk-YHV3672R.cjs');require('../chunk-NX256LAH.cjs');require('../chunk-D6SLJ5C2.cjs');require('../chunk-KCP7N5UO.cjs');require('../chunk-5IC7UWND.cjs');require('../chunk-RRFJMYA5.cjs');require('../chunk-4DJWSV7I.cjs');require('../chunk-YF5G4U6L.cjs');require('../chunk-IGRPHTXZ.cjs');require('../chunk-3VSFHDFH.cjs');require('../chunk-ENU3EKBG.cjs');require('../chunk-3SVXPFSP.cjs');require('../chunk-PO6S7UR3.cjs');require('../chunk-GDVKUQ2B.cjs');require('../chunk-UD57J5V7.cjs');require('../chunk-S6CWIL3C.cjs');require('../chunk-PMKIHQOM.cjs');require('../chunk-JBP52JOH.cjs');require('../chunk-5FH7WFWL.cjs');require('../chunk-SPTXAOFR.cjs');require('../chunk-5QIW67NU.cjs');require('../chunk-YGL4ITFK.cjs');require('../chunk-GEY3BU62.cjs');require('../chunk-PHPBBEXU.cjs');require('../chunk-A33BEWR7.cjs');require('../chunk-OGP7B5O3.cjs');require('../chunk-IJ632UXD.cjs');require('../chunk-6EZCCLTK.cjs');require('../chunk-SCEPJO4Q.cjs');require('../chunk-WY7MUXV3.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-T3U46LK3.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-T7QKT6ND.cjs');require('../chunk-2E4HUF2I.cjs');require('../chunk-2GKPWQBQ.cjs');exports.EVMWallet = _chunk2OHUVDXXcjs.a;
|
package/dist/wallets/evm.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as viem__types_actions_siwe_verifySiweMessage from 'viem/_types/actions/siwe/verifySiweMessage';
|
|
2
2
|
import * as viem from 'viem';
|
|
3
3
|
import { HttpTransport } from 'viem';
|
|
4
|
-
import { E as EVMTransactionInput, c as Transaction, O as PrepareOnly, Q as SignMessageInput, h as Signature, U as SignTypedDataInput } from '../types-
|
|
4
|
+
import { E as EVMTransactionInput, c as Transaction, O as PrepareOnly, Q as SignMessageInput, h as Signature, U as SignTypedDataInput } from '../types-SHQAcrFF.cjs';
|
|
5
5
|
import { Wallet } from './wallet.cjs';
|
|
6
6
|
import { EVMChain, Chain } from '../chains/chains.cjs';
|
|
7
7
|
import '../api/gen/types.gen.cjs';
|
package/dist/wallets/evm.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as viem__types_actions_siwe_verifySiweMessage from 'viem/_types/actions/siwe/verifySiweMessage';
|
|
2
2
|
import * as viem from 'viem';
|
|
3
3
|
import { HttpTransport } from 'viem';
|
|
4
|
-
import { E as EVMTransactionInput, c as Transaction, O as PrepareOnly, Q as SignMessageInput, h as Signature, U as SignTypedDataInput } from '../types-
|
|
4
|
+
import { E as EVMTransactionInput, c as Transaction, O as PrepareOnly, Q as SignMessageInput, h as Signature, U as SignTypedDataInput } from '../types-guSZ0uln.js';
|
|
5
5
|
import { Wallet } from './wallet.js';
|
|
6
6
|
import { EVMChain, Chain } from '../chains/chains.js';
|
|
7
7
|
import '../api/gen/types.gen.js';
|
package/dist/wallets/evm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-GV7RSDWU.js";import"../chunk-TIPWO2WO.js";import"../chunk-TOAFCAVT.js";import"../chunk-5B2527NO.js";import"../chunk-IOSADDL5.js";import"../chunk-N4IWDL6M.js";import"../chunk-GOXB2RBF.js";import"../chunk-VADIEIDS.js";import"../chunk-7QSKVAZF.js";import"../chunk-L52GDMSH.js";import"../chunk-O4FUTA6J.js";import"../chunk-3VRN3GKQ.js";import"../chunk-BITOMWYZ.js";import"../chunk-QM3BB4E2.js";import"../chunk-RBSMBO4T.js";import"../chunk-OQZTL6ZG.js";import"../chunk-N355UETO.js";import"../chunk-YDZRBHS3.js";import"../chunk-OQS7BQBC.js";import"../chunk-5CNMKWSU.js";import"../chunk-CQIZ6KZS.js";import"../chunk-2MTALLO2.js";import"../chunk-O6VBO7KG.js";import"../chunk-EM3D5Q3A.js";import"../chunk-EE4ITUGS.js";import"../chunk-WCGUGIGJ.js";import"../chunk-XNZLCUTY.js";import"../chunk-CKZYSQOK.js";import"../chunk-QVTKTDED.js";import"../chunk-XS5B3TUE.js";import"../chunk-M335XCYO.js";import"../chunk-YH7G2U6V.js";import"../chunk-W7LJS32A.js";import"../chunk-2YLRFJ66.js";import"../chunk-JO7VMMRU.js";import"../chunk-S3DYQVRD.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-EXC7TCGL.js";import"../chunk-455NK5LB.js";import"../chunk-AQEVTPWR.js";import"../chunk-6OPFQZL6.js";import"../chunk-J3R36SGJ.js";export{a as EVMWallet};
|
package/dist/wallets/solana.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJQR5QGTLcjs = require('../chunk-JQR5QGTL.cjs');require('../chunk-LMRRURLU.cjs');require('../chunk-CUHDOBKN.cjs');require('../chunk-XWGT54VP.cjs');require('../chunk-3VYGTPRF.cjs');require('../chunk-YHV3672R.cjs');require('../chunk-NX256LAH.cjs');require('../chunk-D6SLJ5C2.cjs');require('../chunk-KCP7N5UO.cjs');require('../chunk-5IC7UWND.cjs');require('../chunk-RRFJMYA5.cjs');require('../chunk-4DJWSV7I.cjs');require('../chunk-YF5G4U6L.cjs');require('../chunk-IGRPHTXZ.cjs');require('../chunk-3VSFHDFH.cjs');require('../chunk-ENU3EKBG.cjs');require('../chunk-3SVXPFSP.cjs');require('../chunk-PO6S7UR3.cjs');require('../chunk-GDVKUQ2B.cjs');require('../chunk-UD57J5V7.cjs');require('../chunk-S6CWIL3C.cjs');require('../chunk-PMKIHQOM.cjs');require('../chunk-JBP52JOH.cjs');require('../chunk-5FH7WFWL.cjs');require('../chunk-SPTXAOFR.cjs');require('../chunk-5QIW67NU.cjs');require('../chunk-YGL4ITFK.cjs');require('../chunk-GEY3BU62.cjs');require('../chunk-PHPBBEXU.cjs');require('../chunk-A33BEWR7.cjs');require('../chunk-OGP7B5O3.cjs');require('../chunk-IJ632UXD.cjs');require('../chunk-6EZCCLTK.cjs');require('../chunk-SCEPJO4Q.cjs');require('../chunk-WY7MUXV3.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-T3U46LK3.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-T7QKT6ND.cjs');require('../chunk-2E4HUF2I.cjs');require('../chunk-2GKPWQBQ.cjs');exports.SolanaWallet = _chunkJQR5QGTLcjs.a;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SolanaChain, Chain } from '../chains/chains.cjs';
|
|
2
|
-
import { V as TransactionInputOptions, i as SolanaTransactionInput, c as Transaction, O as PrepareOnly } from '../types-
|
|
2
|
+
import { V as TransactionInputOptions, i as SolanaTransactionInput, c as Transaction, O as PrepareOnly } from '../types-SHQAcrFF.cjs';
|
|
3
3
|
import { Wallet } from './wallet.cjs';
|
|
4
4
|
import '@crossmint/common-sdk-base';
|
|
5
5
|
import 'viem';
|
package/dist/wallets/solana.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SolanaChain, Chain } from '../chains/chains.js';
|
|
2
|
-
import { V as TransactionInputOptions, i as SolanaTransactionInput, c as Transaction, O as PrepareOnly } from '../types-
|
|
2
|
+
import { V as TransactionInputOptions, i as SolanaTransactionInput, c as Transaction, O as PrepareOnly } from '../types-guSZ0uln.js';
|
|
3
3
|
import { Wallet } from './wallet.js';
|
|
4
4
|
import '@crossmint/common-sdk-base';
|
|
5
5
|
import 'viem';
|
package/dist/wallets/solana.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-O737TVMB.js";import"../chunk-TIPWO2WO.js";import"../chunk-TOAFCAVT.js";import"../chunk-5B2527NO.js";import"../chunk-IOSADDL5.js";import"../chunk-N4IWDL6M.js";import"../chunk-GOXB2RBF.js";import"../chunk-VADIEIDS.js";import"../chunk-7QSKVAZF.js";import"../chunk-L52GDMSH.js";import"../chunk-O4FUTA6J.js";import"../chunk-3VRN3GKQ.js";import"../chunk-BITOMWYZ.js";import"../chunk-QM3BB4E2.js";import"../chunk-RBSMBO4T.js";import"../chunk-OQZTL6ZG.js";import"../chunk-N355UETO.js";import"../chunk-YDZRBHS3.js";import"../chunk-OQS7BQBC.js";import"../chunk-5CNMKWSU.js";import"../chunk-CQIZ6KZS.js";import"../chunk-2MTALLO2.js";import"../chunk-O6VBO7KG.js";import"../chunk-EM3D5Q3A.js";import"../chunk-EE4ITUGS.js";import"../chunk-WCGUGIGJ.js";import"../chunk-XNZLCUTY.js";import"../chunk-CKZYSQOK.js";import"../chunk-QVTKTDED.js";import"../chunk-XS5B3TUE.js";import"../chunk-M335XCYO.js";import"../chunk-YH7G2U6V.js";import"../chunk-W7LJS32A.js";import"../chunk-2YLRFJ66.js";import"../chunk-JO7VMMRU.js";import"../chunk-S3DYQVRD.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-EXC7TCGL.js";import"../chunk-455NK5LB.js";import"../chunk-AQEVTPWR.js";import"../chunk-6OPFQZL6.js";import"../chunk-J3R36SGJ.js";export{a as SolanaWallet};
|
package/dist/wallets/stellar.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKJJPND7Tcjs = require('../chunk-KJJPND7T.cjs');require('../chunk-LMRRURLU.cjs');require('../chunk-CUHDOBKN.cjs');require('../chunk-XWGT54VP.cjs');require('../chunk-3VYGTPRF.cjs');require('../chunk-YHV3672R.cjs');require('../chunk-NX256LAH.cjs');require('../chunk-D6SLJ5C2.cjs');require('../chunk-KCP7N5UO.cjs');require('../chunk-5IC7UWND.cjs');require('../chunk-RRFJMYA5.cjs');require('../chunk-4DJWSV7I.cjs');require('../chunk-YF5G4U6L.cjs');require('../chunk-IGRPHTXZ.cjs');require('../chunk-3VSFHDFH.cjs');require('../chunk-ENU3EKBG.cjs');require('../chunk-3SVXPFSP.cjs');require('../chunk-PO6S7UR3.cjs');require('../chunk-GDVKUQ2B.cjs');require('../chunk-UD57J5V7.cjs');require('../chunk-S6CWIL3C.cjs');require('../chunk-PMKIHQOM.cjs');require('../chunk-JBP52JOH.cjs');require('../chunk-5FH7WFWL.cjs');require('../chunk-SPTXAOFR.cjs');require('../chunk-5QIW67NU.cjs');require('../chunk-YGL4ITFK.cjs');require('../chunk-GEY3BU62.cjs');require('../chunk-PHPBBEXU.cjs');require('../chunk-A33BEWR7.cjs');require('../chunk-OGP7B5O3.cjs');require('../chunk-IJ632UXD.cjs');require('../chunk-6EZCCLTK.cjs');require('../chunk-SCEPJO4Q.cjs');require('../chunk-WY7MUXV3.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-T3U46LK3.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-T7QKT6ND.cjs');require('../chunk-2E4HUF2I.cjs');require('../chunk-2GKPWQBQ.cjs');exports.StellarWallet = _chunkKJJPND7Tcjs.a;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StellarChain, Chain } from '../chains/chains.cjs';
|
|
2
|
-
import { V as TransactionInputOptions, X as StellarTransactionInput, c as Transaction, O as PrepareOnly } from '../types-
|
|
2
|
+
import { V as TransactionInputOptions, X as StellarTransactionInput, c as Transaction, O as PrepareOnly } from '../types-SHQAcrFF.cjs';
|
|
3
3
|
import { Wallet } from './wallet.cjs';
|
|
4
4
|
import '@crossmint/common-sdk-base';
|
|
5
5
|
import 'viem';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StellarChain, Chain } from '../chains/chains.js';
|
|
2
|
-
import { V as TransactionInputOptions, X as StellarTransactionInput, c as Transaction, O as PrepareOnly } from '../types-
|
|
2
|
+
import { V as TransactionInputOptions, X as StellarTransactionInput, c as Transaction, O as PrepareOnly } from '../types-guSZ0uln.js';
|
|
3
3
|
import { Wallet } from './wallet.js';
|
|
4
4
|
import '@crossmint/common-sdk-base';
|
|
5
5
|
import 'viem';
|
package/dist/wallets/stellar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-IJJJMVUZ.js";import"../chunk-TIPWO2WO.js";import"../chunk-TOAFCAVT.js";import"../chunk-5B2527NO.js";import"../chunk-IOSADDL5.js";import"../chunk-N4IWDL6M.js";import"../chunk-GOXB2RBF.js";import"../chunk-VADIEIDS.js";import"../chunk-7QSKVAZF.js";import"../chunk-L52GDMSH.js";import"../chunk-O4FUTA6J.js";import"../chunk-3VRN3GKQ.js";import"../chunk-BITOMWYZ.js";import"../chunk-QM3BB4E2.js";import"../chunk-RBSMBO4T.js";import"../chunk-OQZTL6ZG.js";import"../chunk-N355UETO.js";import"../chunk-YDZRBHS3.js";import"../chunk-OQS7BQBC.js";import"../chunk-5CNMKWSU.js";import"../chunk-CQIZ6KZS.js";import"../chunk-2MTALLO2.js";import"../chunk-O6VBO7KG.js";import"../chunk-EM3D5Q3A.js";import"../chunk-EE4ITUGS.js";import"../chunk-WCGUGIGJ.js";import"../chunk-XNZLCUTY.js";import"../chunk-CKZYSQOK.js";import"../chunk-QVTKTDED.js";import"../chunk-XS5B3TUE.js";import"../chunk-M335XCYO.js";import"../chunk-YH7G2U6V.js";import"../chunk-W7LJS32A.js";import"../chunk-2YLRFJ66.js";import"../chunk-JO7VMMRU.js";import"../chunk-S3DYQVRD.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-EXC7TCGL.js";import"../chunk-455NK5LB.js";import"../chunk-AQEVTPWR.js";import"../chunk-6OPFQZL6.js";import"../chunk-J3R36SGJ.js";export{a as StellarWallet};
|
package/dist/wallets/types.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import '@crossmint/client-sdk-window';
|
|
|
3
3
|
import '@crossmint/client-signers';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import 'abitype';
|
|
6
|
-
export { k as AddSignerOptions, a2 as AddSignerReturnType, aH as Approval, j as ApproveOptions, A as ApproveParams, a1 as ApproveResult, B as Balances, e as Callbacks, C as ClientSideWalletArgsFor, a as ClientSideWalletCreateArgs, aF as DeviceSignerDescriptor, E as EVMTransactionInput, aB as FormattedEVMTransaction, aD as PendingApproval, O as PrepareOnly, $ as SendTokenTransactionOptions, az as SendTokenTransactionType, Q as SignMessageInput, U as SignTypedDataInput, h as Signature, aA as SignatureInputOptions, S as Signer, aC as SignerInput, b as SignerStatus, i as SolanaTransactionInput, X as StellarTransactionInput, aE as StellarWalletPlugin, aG as TokenBalance, c as Transaction, V as TransactionInputOptions, T as Transfers, a0 as UserLocator, W as WalletArgsFor, d as WalletCreateArgs, f as WalletOptions, g as WalletPlugin } from '../types-
|
|
6
|
+
export { k as AddSignerOptions, a2 as AddSignerReturnType, aH as Approval, j as ApproveOptions, A as ApproveParams, a1 as ApproveResult, B as Balances, e as Callbacks, C as ClientSideWalletArgsFor, a as ClientSideWalletCreateArgs, aF as DeviceSignerDescriptor, E as EVMTransactionInput, aB as FormattedEVMTransaction, aD as PendingApproval, O as PrepareOnly, $ as SendTokenTransactionOptions, az as SendTokenTransactionType, Q as SignMessageInput, U as SignTypedDataInput, h as Signature, aA as SignatureInputOptions, S as Signer, aC as SignerInput, b as SignerStatus, i as SolanaTransactionInput, X as StellarTransactionInput, aE as StellarWalletPlugin, aG as TokenBalance, c as Transaction, V as TransactionInputOptions, T as Transfers, a0 as UserLocator, W as WalletArgsFor, d as WalletCreateArgs, f as WalletOptions, g as WalletPlugin } from '../types-SHQAcrFF.cjs';
|
|
7
7
|
import '../chains/chains.cjs';
|
|
8
8
|
import '../utils/device-signers/DeviceSignerKeyStorage.cjs';
|
|
9
9
|
import '../api/gen/types.gen.cjs';
|
package/dist/wallets/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import '@crossmint/client-sdk-window';
|
|
|
3
3
|
import '@crossmint/client-signers';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import 'abitype';
|
|
6
|
-
export { k as AddSignerOptions, a2 as AddSignerReturnType, aH as Approval, j as ApproveOptions, A as ApproveParams, a1 as ApproveResult, B as Balances, e as Callbacks, C as ClientSideWalletArgsFor, a as ClientSideWalletCreateArgs, aF as DeviceSignerDescriptor, E as EVMTransactionInput, aB as FormattedEVMTransaction, aD as PendingApproval, O as PrepareOnly, $ as SendTokenTransactionOptions, az as SendTokenTransactionType, Q as SignMessageInput, U as SignTypedDataInput, h as Signature, aA as SignatureInputOptions, S as Signer, aC as SignerInput, b as SignerStatus, i as SolanaTransactionInput, X as StellarTransactionInput, aE as StellarWalletPlugin, aG as TokenBalance, c as Transaction, V as TransactionInputOptions, T as Transfers, a0 as UserLocator, W as WalletArgsFor, d as WalletCreateArgs, f as WalletOptions, g as WalletPlugin } from '../types-
|
|
6
|
+
export { k as AddSignerOptions, a2 as AddSignerReturnType, aH as Approval, j as ApproveOptions, A as ApproveParams, a1 as ApproveResult, B as Balances, e as Callbacks, C as ClientSideWalletArgsFor, a as ClientSideWalletCreateArgs, aF as DeviceSignerDescriptor, E as EVMTransactionInput, aB as FormattedEVMTransaction, aD as PendingApproval, O as PrepareOnly, $ as SendTokenTransactionOptions, az as SendTokenTransactionType, Q as SignMessageInput, U as SignTypedDataInput, h as Signature, aA as SignatureInputOptions, S as Signer, aC as SignerInput, b as SignerStatus, i as SolanaTransactionInput, X as StellarTransactionInput, aE as StellarWalletPlugin, aG as TokenBalance, c as Transaction, V as TransactionInputOptions, T as Transfers, a0 as UserLocator, W as WalletArgsFor, d as WalletCreateArgs, f as WalletOptions, g as WalletPlugin } from '../types-guSZ0uln.js';
|
|
7
7
|
import '../chains/chains.js';
|
|
8
8
|
import '../utils/device-signers/DeviceSignerKeyStorage.js';
|
|
9
9
|
import '../api/gen/types.gen.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2CDTZNKVcjs = require('../chunk-2CDTZNKV.cjs');require('../chunk-K5TQ4QU3.cjs');require('../chunk-LMRRURLU.cjs');require('../chunk-CUHDOBKN.cjs');require('../chunk-XWGT54VP.cjs');require('../chunk-3VYGTPRF.cjs');require('../chunk-YHV3672R.cjs');require('../chunk-NX256LAH.cjs');require('../chunk-D6SLJ5C2.cjs');require('../chunk-KCP7N5UO.cjs');require('../chunk-5IC7UWND.cjs');require('../chunk-RRFJMYA5.cjs');require('../chunk-4DJWSV7I.cjs');require('../chunk-YF5G4U6L.cjs');require('../chunk-IGRPHTXZ.cjs');require('../chunk-3VSFHDFH.cjs');require('../chunk-ENU3EKBG.cjs');require('../chunk-3SVXPFSP.cjs');require('../chunk-PO6S7UR3.cjs');require('../chunk-GDVKUQ2B.cjs');require('../chunk-UD57J5V7.cjs');require('../chunk-S6CWIL3C.cjs');require('../chunk-PMKIHQOM.cjs');require('../chunk-JBP52JOH.cjs');require('../chunk-5FH7WFWL.cjs');require('../chunk-SPTXAOFR.cjs');require('../chunk-5QIW67NU.cjs');require('../chunk-YGL4ITFK.cjs');require('../chunk-GEY3BU62.cjs');require('../chunk-PHPBBEXU.cjs');require('../chunk-A33BEWR7.cjs');require('../chunk-OGP7B5O3.cjs');require('../chunk-IJ632UXD.cjs');require('../chunk-6EZCCLTK.cjs');require('../chunk-SCEPJO4Q.cjs');require('../chunk-WY7MUXV3.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-T3U46LK3.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-T7QKT6ND.cjs');require('../chunk-2E4HUF2I.cjs');require('../chunk-2GKPWQBQ.cjs');exports.WalletFactory = _chunk2CDTZNKVcjs.a;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiClient } from '../api/client.cjs';
|
|
2
2
|
import { Chain } from '../chains/chains.cjs';
|
|
3
|
-
import { W as WalletArgsFor, d as WalletCreateArgs } from '../types-
|
|
3
|
+
import { W as WalletArgsFor, d as WalletCreateArgs } from '../types-SHQAcrFF.cjs';
|
|
4
4
|
import { Wallet } from './wallet.cjs';
|
|
5
5
|
import '@crossmint/common-sdk-base';
|
|
6
6
|
import 'viem';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiClient } from '../api/client.js';
|
|
2
2
|
import { Chain } from '../chains/chains.js';
|
|
3
|
-
import { W as WalletArgsFor, d as WalletCreateArgs } from '../types-
|
|
3
|
+
import { W as WalletArgsFor, d as WalletCreateArgs } from '../types-guSZ0uln.js';
|
|
4
4
|
import { Wallet } from './wallet.js';
|
|
5
5
|
import '@crossmint/common-sdk-base';
|
|
6
6
|
import 'viem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-ZOTNX4UW.js";import"../chunk-YIO5XXQ4.js";import"../chunk-TIPWO2WO.js";import"../chunk-TOAFCAVT.js";import"../chunk-5B2527NO.js";import"../chunk-IOSADDL5.js";import"../chunk-N4IWDL6M.js";import"../chunk-GOXB2RBF.js";import"../chunk-VADIEIDS.js";import"../chunk-7QSKVAZF.js";import"../chunk-L52GDMSH.js";import"../chunk-O4FUTA6J.js";import"../chunk-3VRN3GKQ.js";import"../chunk-BITOMWYZ.js";import"../chunk-QM3BB4E2.js";import"../chunk-RBSMBO4T.js";import"../chunk-OQZTL6ZG.js";import"../chunk-N355UETO.js";import"../chunk-YDZRBHS3.js";import"../chunk-OQS7BQBC.js";import"../chunk-5CNMKWSU.js";import"../chunk-CQIZ6KZS.js";import"../chunk-2MTALLO2.js";import"../chunk-O6VBO7KG.js";import"../chunk-EM3D5Q3A.js";import"../chunk-EE4ITUGS.js";import"../chunk-WCGUGIGJ.js";import"../chunk-XNZLCUTY.js";import"../chunk-CKZYSQOK.js";import"../chunk-QVTKTDED.js";import"../chunk-XS5B3TUE.js";import"../chunk-M335XCYO.js";import"../chunk-YH7G2U6V.js";import"../chunk-W7LJS32A.js";import"../chunk-2YLRFJ66.js";import"../chunk-JO7VMMRU.js";import"../chunk-S3DYQVRD.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-EXC7TCGL.js";import"../chunk-455NK5LB.js";import"../chunk-AQEVTPWR.js";import"../chunk-6OPFQZL6.js";import"../chunk-J3R36SGJ.js";export{a as WalletFactory};
|
package/dist/wallets/wallet.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLMRRURLUcjs = require('../chunk-LMRRURLU.cjs');require('../chunk-CUHDOBKN.cjs');require('../chunk-XWGT54VP.cjs');require('../chunk-3VYGTPRF.cjs');require('../chunk-YHV3672R.cjs');require('../chunk-NX256LAH.cjs');require('../chunk-D6SLJ5C2.cjs');require('../chunk-KCP7N5UO.cjs');require('../chunk-5IC7UWND.cjs');require('../chunk-RRFJMYA5.cjs');require('../chunk-4DJWSV7I.cjs');require('../chunk-YF5G4U6L.cjs');require('../chunk-IGRPHTXZ.cjs');require('../chunk-3VSFHDFH.cjs');require('../chunk-ENU3EKBG.cjs');require('../chunk-3SVXPFSP.cjs');require('../chunk-PO6S7UR3.cjs');require('../chunk-GDVKUQ2B.cjs');require('../chunk-UD57J5V7.cjs');require('../chunk-S6CWIL3C.cjs');require('../chunk-PMKIHQOM.cjs');require('../chunk-JBP52JOH.cjs');require('../chunk-5FH7WFWL.cjs');require('../chunk-SPTXAOFR.cjs');require('../chunk-5QIW67NU.cjs');require('../chunk-YGL4ITFK.cjs');require('../chunk-GEY3BU62.cjs');require('../chunk-PHPBBEXU.cjs');require('../chunk-A33BEWR7.cjs');require('../chunk-OGP7B5O3.cjs');require('../chunk-IJ632UXD.cjs');require('../chunk-6EZCCLTK.cjs');require('../chunk-SCEPJO4Q.cjs');require('../chunk-WY7MUXV3.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-T3U46LK3.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-T7QKT6ND.cjs');require('../chunk-2E4HUF2I.cjs');require('../chunk-2GKPWQBQ.cjs');exports.Wallet = _chunkLMRRURLUcjs.a;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.cjs';
|
|
2
2
|
import { ApiClient } from '../api/client.cjs';
|
|
3
|
-
import { f as WalletOptions, r as SignerConfigForChain, m as SignerAdapter, B as Balances, Y as FundWalletResponse, Z as GetTransactionsResponse, _ as GetTransactionSuccessResponse, T as Transfers, $ as SendTokenTransactionOptions, a0 as UserLocator, c as Transaction, O as PrepareOnly, A as ApproveParams, a1 as ApproveResult, k as AddSignerOptions, q as ServerSignerConfig, o as ExternalWalletRegistrationConfig, a2 as AddSignerReturnType, S as Signer, s as SignerLocator, a3 as WalletLocator, j as ApproveOptions, a4 as ApproveSignatureResponse, h as Signature } from '../types-
|
|
3
|
+
import { f as WalletOptions, r as SignerConfigForChain, m as SignerAdapter, B as Balances, Y as FundWalletResponse, Z as GetTransactionsResponse, _ as GetTransactionSuccessResponse, T as Transfers, $ as SendTokenTransactionOptions, a0 as UserLocator, c as Transaction, O as PrepareOnly, A as ApproveParams, a1 as ApproveResult, k as AddSignerOptions, q as ServerSignerConfig, o as ExternalWalletRegistrationConfig, a2 as AddSignerReturnType, S as Signer, s as SignerLocator, a3 as WalletLocator, j as ApproveOptions, a4 as ApproveSignatureResponse, h as Signature } from '../types-SHQAcrFF.cjs';
|
|
4
4
|
import { Chain } from '../chains/chains.cjs';
|
|
5
5
|
import '@crossmint/common-sdk-base';
|
|
6
6
|
import 'viem';
|
|
@@ -203,6 +203,7 @@ declare class Wallet<C extends Chain> {
|
|
|
203
203
|
* @returns true if the signer is approved for this chain
|
|
204
204
|
*/
|
|
205
205
|
isSignerApproved(signerLocator: SignerLocator | string): Promise<boolean>;
|
|
206
|
+
private isApprovedSignerStatus;
|
|
206
207
|
/**
|
|
207
208
|
* Whether the wallet needs recovery (signer registration) before the next transaction.
|
|
208
209
|
* @returns true if recovery is needed
|
package/dist/wallets/wallet.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.js';
|
|
2
2
|
import { ApiClient } from '../api/client.js';
|
|
3
|
-
import { f as WalletOptions, r as SignerConfigForChain, m as SignerAdapter, B as Balances, Y as FundWalletResponse, Z as GetTransactionsResponse, _ as GetTransactionSuccessResponse, T as Transfers, $ as SendTokenTransactionOptions, a0 as UserLocator, c as Transaction, O as PrepareOnly, A as ApproveParams, a1 as ApproveResult, k as AddSignerOptions, q as ServerSignerConfig, o as ExternalWalletRegistrationConfig, a2 as AddSignerReturnType, S as Signer, s as SignerLocator, a3 as WalletLocator, j as ApproveOptions, a4 as ApproveSignatureResponse, h as Signature } from '../types-
|
|
3
|
+
import { f as WalletOptions, r as SignerConfigForChain, m as SignerAdapter, B as Balances, Y as FundWalletResponse, Z as GetTransactionsResponse, _ as GetTransactionSuccessResponse, T as Transfers, $ as SendTokenTransactionOptions, a0 as UserLocator, c as Transaction, O as PrepareOnly, A as ApproveParams, a1 as ApproveResult, k as AddSignerOptions, q as ServerSignerConfig, o as ExternalWalletRegistrationConfig, a2 as AddSignerReturnType, S as Signer, s as SignerLocator, a3 as WalletLocator, j as ApproveOptions, a4 as ApproveSignatureResponse, h as Signature } from '../types-guSZ0uln.js';
|
|
4
4
|
import { Chain } from '../chains/chains.js';
|
|
5
5
|
import '@crossmint/common-sdk-base';
|
|
6
6
|
import 'viem';
|
|
@@ -203,6 +203,7 @@ declare class Wallet<C extends Chain> {
|
|
|
203
203
|
* @returns true if the signer is approved for this chain
|
|
204
204
|
*/
|
|
205
205
|
isSignerApproved(signerLocator: SignerLocator | string): Promise<boolean>;
|
|
206
|
+
private isApprovedSignerStatus;
|
|
206
207
|
/**
|
|
207
208
|
* Whether the wallet needs recovery (signer registration) before the next transaction.
|
|
208
209
|
* @returns true if recovery is needed
|
package/dist/wallets/wallet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-TIPWO2WO.js";import"../chunk-TOAFCAVT.js";import"../chunk-5B2527NO.js";import"../chunk-IOSADDL5.js";import"../chunk-N4IWDL6M.js";import"../chunk-GOXB2RBF.js";import"../chunk-VADIEIDS.js";import"../chunk-7QSKVAZF.js";import"../chunk-L52GDMSH.js";import"../chunk-O4FUTA6J.js";import"../chunk-3VRN3GKQ.js";import"../chunk-BITOMWYZ.js";import"../chunk-QM3BB4E2.js";import"../chunk-RBSMBO4T.js";import"../chunk-OQZTL6ZG.js";import"../chunk-N355UETO.js";import"../chunk-YDZRBHS3.js";import"../chunk-OQS7BQBC.js";import"../chunk-5CNMKWSU.js";import"../chunk-CQIZ6KZS.js";import"../chunk-2MTALLO2.js";import"../chunk-O6VBO7KG.js";import"../chunk-EM3D5Q3A.js";import"../chunk-EE4ITUGS.js";import"../chunk-WCGUGIGJ.js";import"../chunk-XNZLCUTY.js";import"../chunk-CKZYSQOK.js";import"../chunk-QVTKTDED.js";import"../chunk-XS5B3TUE.js";import"../chunk-M335XCYO.js";import"../chunk-YH7G2U6V.js";import"../chunk-W7LJS32A.js";import"../chunk-2YLRFJ66.js";import"../chunk-JO7VMMRU.js";import"../chunk-S3DYQVRD.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-EXC7TCGL.js";import"../chunk-455NK5LB.js";import"../chunk-AQEVTPWR.js";import"../chunk-6OPFQZL6.js";import"../chunk-J3R36SGJ.js";export{a as Wallet};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossmint/wallets-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"repository": "https://github.com/Crossmint/crossmint-sdk",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Paella Labs Inc",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@crossmint/client-sdk-window": "1.0.9",
|
|
33
33
|
"@crossmint/client-signers": "0.1.2",
|
|
34
34
|
"@crossmint/client-signers-cryptography": "0.0.4",
|
|
35
|
-
"@crossmint/common-sdk-auth": "1.1.
|
|
35
|
+
"@crossmint/common-sdk-auth": "1.1.2",
|
|
36
36
|
"@crossmint/common-sdk-base": "0.10.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
package/dist/chunk-6X5JEJD7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./chunk-OQZTL6ZG.js";import{a as n}from"./chunk-N355UETO.js";import{a as i}from"./chunk-3VRN3GKQ.js";import{a as t}from"./chunk-BITOMWYZ.js";function c(a,e){switch(r(a)){case"evm":return new n(e);case"solana":return new i(e);case"stellar":return new t(e)}}export{c as a};
|
package/dist/chunk-JXULWUYO.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as ae}from"./chunk-N4IWDL6M.js";import{a as W}from"./chunk-GOXB2RBF.js";import{b as G,c as M}from"./chunk-VADIEIDS.js";import{a as B}from"./chunk-PQZP5ZKI.js";import{b as L}from"./chunk-RBSMBO4T.js";import{a as ie}from"./chunk-PDNXECMW.js";import{f as ne}from"./chunk-EFQFA33E.js";import{B as te,d as j,e as _,j as K,n as U,q,r as V,s as z,t as Y,u as J,v as Q,w as X,x as Z,y as ee,z as re}from"./chunk-EXC7TCGL.js";import{a as s}from"./chunk-Y3U34F7K.js";import{d as H}from"./chunk-QZO3WO3R.js";import{a as C,b as I,c as x,d as n,e as E,f as S,g as d}from"./chunk-J3R36SGJ.js";import{isValidAddress as se,WithLoggerContext as P}from"@crossmint/common-sdk-base";var f,m,g,b,k,T,N,O,R,A=class{constructor(e,r){E(this,f);E(this,m);E(this,g);E(this,b);E(this,k);E(this,T,!1);E(this,N,!1);E(this,O);E(this,R,null);let{chain:t,address:i,owner:c,options:p,alias:h,recovery:l,signers:a,signer:o}=e;S(this,g,r),this.chain=t,this.address=i,this.owner=c,S(this,m,p),this.alias=h,S(this,b,l),S(this,k,a!=null?a:[]),S(this,f,o),S(this,O,this.initDefaultSigner())}get signer(){return n(this,f)}initDeviceSigner(){return d(this,null,function*(){var i;let e=(i=n(this,m))==null?void 0:i.deviceSignerKeyStorage;if(e==null||this.chain==="solana")return;let r={type:"device"};try{yield this.resolveDeviceSignerAvailability(r)}catch(c){s.error("wallet.initDeviceSigner.error",{error:c}),S(this,T,!0);return}let t=this.buildInternalSignerConfig(r);S(this,f,yield this.assembleFullSigner(t,e))})}initDefaultSigner(){return d(this,null,function*(){if(n(this,f)==null&&(yield this.initDeviceSigner(),!(n(this,f)!=null||n(this,T))))try{if(n(this,k).length===0){let e=this.buildInternalSignerConfig(n(this,b));S(this,f,yield this.assembleFullSigner(e))}else if(n(this,k).length===1){let e=this.buildInternalSignerConfig(n(this,k)[0]);S(this,f,yield this.assembleFullSigner(e))}}catch(e){s.warn("wallet.initDefaultSigner.autoAssemblyFailed",{recoveryType:n(this,b).type,signerCount:n(this,k).length,error:e})}})}static getApiClient(e){return e.apiClient}static getOptions(e){return e.options}static getRecovery(e){return n(e,b)}static getInitialSigners(e){return n(e,k)}get apiClient(){return n(this,g)}get options(){return n(this,m)}get recovery(){return n(this,b)}balances(e){return d(this,null,function*(){s.info("wallet.balances.start");let r=this.resolveChainForEnvironment(),t;switch(this.chain){case"solana":t="sol";break;case"stellar":t="xlm";break;default:t="eth";break}let i=[t,"usdc",...e!=null?e:[]],c=yield n(this,g).getBalance(this.address,{chains:[r],tokens:i});if("error"in c)throw s.error("wallet.balances.error",{error:c}),new Error(`Failed to get balances for wallet: ${JSON.stringify(c.message)}`);return s.info("wallet.balances.success"),this.transformBalanceResponse(c,t,e)})}stagingFund(e,r){return d(this,null,function*(){s.info("wallet.stagingFund.start",{amount:e,chain:r!=null?r:this.chain});let t=yield this.apiClient.fundWallet(this.address,{amount:e,token:"usdxm",chain:r!=null?r:this.chain});if("error"in t)throw s.error("wallet.stagingFund.error",{error:t}),new Error(`Failed to fund wallet: ${JSON.stringify(t.message)}`);return s.info("wallet.stagingFund.success"),t})}transformBalanceResponse(e,r,t){let i=a=>{var w,v,F,$,D;let o=(w=a.chains)==null?void 0:w[this.chain],u={};return this.chain==="solana"&&o!=null&&"mintHash"in o?u={mintHash:o.mintHash}:this.chain==="stellar"&&o!=null&&"contractId"in o?u={contractId:o.contractId}:o!=null&&"contractAddress"in o&&(u={contractAddress:o.contractAddress}),C({symbol:(v=a.symbol)!=null?v:"",name:(F=a.name)!=null?F:"",amount:($=a.amount)!=null?$:"0",decimals:a.decimals,rawAmount:(D=a.rawAmount)!=null?D:"0"},u)},c=e.find(a=>a.symbol===r),p=e.find(a=>a.symbol==="usdc"),h=e.filter(a=>{var o;return a.symbol!==r&&a.symbol!=="usdc"&&(t==null||t.includes((o=a.symbol)!=null?o:""))}),l=a=>{let o={symbol:a,name:a,amount:"0",decimals:0,rawAmount:"0"},u={};return this.chain==="solana"?u={mintHash:void 0}:this.chain==="stellar"?u={contractId:void 0}:u={contractAddress:void 0},C(C({},o),u)};return{nativeToken:c!=null?i(c):l(r),usdc:p!=null?i(p):l("usdc"),tokens:h.map(i)}}nfts(e){return d(this,null,function*(){return yield n(this,g).getNfts(I(C({},e),{chain:this.chain,address:this.address}))})}transactions(){return d(this,null,function*(){let e=yield n(this,g).getTransactions(this.walletLocator);if("error"in e)throw new Error(`Failed to get transactions: ${JSON.stringify(e.message)}`);return e})}transaction(e){return d(this,null,function*(){let r=yield n(this,g).getTransaction(this.walletLocator,e);if("error"in r)throw new Error(`Failed to get transaction: ${JSON.stringify(r.error)}`);return r})}transfers(e){return d(this,null,function*(){let r=this.resolveChainForEnvironment(),t=yield this.apiClient.getTransfers(this.walletLocator,{chain:r,tokens:e==null?void 0:e.tokens,status:e==null?void 0:e.status});if("error"in t)throw new Error(`Failed to get transfers: ${JSON.stringify(t.message)}`);return t})}send(e,r,t,i){return d(this,null,function*(){let c=this.resolveChainForEnvironment(),p=ce(e),h=de(r,c),l=Number(t);if(Number.isNaN(l)||!Number.isFinite(l)||l<=0)throw new z(`Invalid transfer amount: "${t}". Amount must be a positive number greater than zero.`);s.info("wallet.send.start",C({recipient:p,token:h,amount:t},(i==null?void 0:i.transactionType)!=null?{transactionType:i.transactionType}:{})),yield this.preAuthIfNeeded();let a=this.requireSigner(),o;(i==null?void 0:i.signer)==null?o=a.locator():typeof i.signer=="string"?o=i.signer:o=`server:${L(i.signer,this.chain,n(this,g).projectId,n(this,g).environment).derivedAddress}`;let u=C({recipient:p,amount:t,signer:o},(i==null?void 0:i.transactionType)!=null?{transactionType:i.transactionType}:{}),w=yield n(this,g).send(this.walletLocator,h,u);if("message"in w)throw s.error("wallet.send.error",{error:w}),new Y(`Failed to send token: ${JSON.stringify(w.message)}`);if((i==null?void 0:i.prepareOnly)===!0)return s.info("wallet.send.prepared",{transactionId:w.id}),{hash:void 0,explorerLink:void 0,transactionId:w.id};let v=yield this.approveTransactionAndWait(w.id);return s.info("wallet.send.success",{transactionId:w.id,hash:v.hash}),v})}approveTransaction(e){return d(this,null,function*(){return console.warn("approveTransaction is deprecated. Use approve instead. This method will be removed in the next major version."),yield this.approve(e)})}approve(e){return d(this,null,function*(){if(this.requireSigner(),s.info("wallet.approve.start",{transactionId:e.transactionId,signatureId:e.signatureId}),e.transactionId!=null){let r=yield this.approveTransactionAndWait(e.transactionId,e.options);return s.info("wallet.approve.success",{transactionId:e.transactionId}),r}if(e.signatureId!=null){let r=yield this.approveSignatureAndWait(e.signatureId,e.options);return s.info("wallet.approve.success",{signatureId:e.signatureId}),r}throw s.error("wallet.approve.error",{error:"Either transactionId or signatureId must be provided"}),new Error("Either transactionId or signatureId must be provided")})}addSigner(e,r){return d(this,null,function*(){var p,h;if(s.info("wallet.addSigner.start"),e.type==="device"&&this.chain==="solana")throw new K("Device signers are not currently supported for Solana wallets. Contact sales (https://www.crossmint.com/contact/sales) for access.");let t=typeof e=="object"&&"type"in e&&e.type==="server"?`server:${L(e,this.chain,n(this,g).projectId,n(this,g).environment).derivedAddress}`:e,i=this.signer,c=this.buildInternalSignerConfig(n(this,b));S(this,f,B(this.chain,c,(p=n(this,m))==null?void 0:p.deviceSignerKeyStorage));try{let l=typeof t=="string"||t.type==="passkey"?t:t.type==="device"&&"publicKey"in t&&t.publicKey!=null?{type:"device",publicKey:t.publicKey,name:t.name}:W(t),a=yield n(this,g).registerSigner(this.walletLocator,{signer:l,chain:this.chain==="solana"||this.chain==="stellar"?void 0:this.chain});if("error"in a)throw s.error("wallet.addSigner.error",{error:a}),new Error(`Failed to register signer: ${JSON.stringify(a.message)}`);let o=G(a,this.chain);if(this.chain==="solana"||this.chain==="stellar"){if(!("transaction"in a)||a.transaction==null)throw s.error("wallet.addSigner.error",{error:"Expected transaction in response for Solana/Stellar chain"}),new Error("Expected transaction in response for Solana/Stellar chain");let u=a.transaction.id;if(o==null)throw new Error(`No approval found for chain ${this.chain} in register signer response`);return r!=null&&r.prepareOnly?(s.info("wallet.addSigner.prepared",{transactionId:u}),I(C({},o),{transactionId:u})):(yield this.approveTransactionAndWait(u),s.info("wallet.addSigner.success",{transactionId:u}),I(C({},o),{status:"success"}))}else{if(!("chains"in a))throw s.error("wallet.addSigner.error",{error:"Expected chains in response for EVM chain"}),new Error("Expected chains in response for EVM chain");let u=(h=a.chains)==null?void 0:h[this.chain];if(o==null)throw new Error(`No approval found for chain ${this.chain} in register signer response`);let w=M(a,this.chain);if(r!=null&&r.prepareOnly){let v=(w==null?void 0:w.type)==="signature"?w.id:void 0;return s.info("wallet.addSigner.prepared",{signatureId:v}),I(C({},o),{signatureId:v})}if((w==null?void 0:w.type)==="signature")yield this.approveSignatureAndWait(w.id),s.info("wallet.addSigner.success",{signatureId:w.id});else{if((u==null?void 0:u.status)==="failed")throw new Error(`Signer registration failed for chain ${this.chain}`);s.info("wallet.addSigner.success")}return I(C({},o),{status:"success"})}}finally{S(this,f,i)}})}useSigner(e){return d(this,null,function*(){s.info("wallet.useSigner.start"),this.validateSignerInput(e),e.type==="device"?yield this.resolveDeviceSignerAvailability(e):yield this.resolveNonDeviceSigner(e);let r=this.buildInternalSignerConfig(e),t=W(e);S(this,f,yield this.assembleFullSigner(r)),s.info("wallet.useSigner.success",{signerLocator:t})})}resolveNonDeviceSigner(e){return d(this,null,function*(){if(e.type==="passkey"&&this.isPasskeyMissingId(e)&&!(yield this.tryAutoSelectPasskey(e))){if(this.isRecoverySigner(e)){S(this,T,!1);return}throw new Error("No passkey signer is registered on this wallet.")}let r=this.resolveSignerLocator(e);if(yield this.signerIsRegistered(r)){S(this,T,!1);return}if(this.isRecoverySigner(e)){S(this,T,!1);return}throw new Error(`Signer "${r}" is not registered in this wallet.`)})}tryAutoSelectPasskey(e){return d(this,null,function*(){let t=(yield this.signers()).filter(i=>i.type==="passkey");if(t.length===0)return!1;if(t.length>1)throw new Error('Multiple passkey signers are registered on this wallet. Please specify the credential id: wallet.useSigner({ type: "passkey", id: "<credential-id>" })');return e.id=t[0].locator.replace("passkey:",""),!0})}resolveSignerLocator(e){if(e.type==="server"){let{derivedAddress:r}=L(e,this.chain,n(this,g).projectId,n(this,g).environment);return`server:${r}`}return W(e)}isPasskeyMissingId(e){return e.id==null||e.id===""}signerIsRegistered(e){return d(this,null,function*(){return(yield this.signers()).some(t=>t.locator===e)})}isSignerApproved(e){return d(this,null,function*(){var t;return((t=(yield this.getSignerState(e)).signer)==null?void 0:t.status)==="success"})}needsRecovery(){return n(this,T)}recover(){return d(this,null,function*(){var p,h,l,a;if(s.info("wallet.recover.start"),n(this,f)==null&&(yield this.initDeviceSigner()),((p=n(this,f))==null?void 0:p.type)!=="device"){s.warn("wallet.recover.skipped",{reason:"Recovery is only supported for device signers"});return}if(n(this,N)){s.info("wallet.recover.skipped",{reason:"Device signer already approved (cached)"});return}let e=n(this,f),r=()=>{S(this,T,!1),S(this,N,!0)};if(e.status==="success"){s.info("wallet.recover.skipped",{reason:"Device signer already approved"}),r();return}let t=yield this.getSignerState(e.locator());if(e.status=(h=t.signer)==null?void 0:h.status,t.pendingOperation!=null){let o=n(this,f),u=this.buildInternalSignerConfig(n(this,b));S(this,f,B(this.chain,u,(l=n(this,m))==null?void 0:l.deviceSignerKeyStorage));try{t.pendingOperation.type==="signature"?yield this.approveSignatureAndWait(t.pendingOperation.id):yield this.approveTransactionAndWait(t.pendingOperation.id)}finally{S(this,f,o)}e.status="success",s.info("wallet.recover.device.success",{signerLocator:e.locator(),resumed:!0}),r();return}if(e.status==="success"){s.info("wallet.recover.skipped",{reason:"Device signer already approved"}),r();return}let i=(a=n(this,m))==null?void 0:a.deviceSignerKeyStorage;if(i==null)throw new Error("Device signer key storage is required to recover a device signer");let c=yield ae(i,this.address);try{yield this.addSigner(c)}catch(o){throw s.error("wallet.recover.device.error",{error:o}),yield i.deleteKey(this.address),o}S(this,f,yield this.assembleFullSigner({type:"device",locator:c.locator,address:this.address},i)),s.info("wallet.recover.device.success",{signerLocator:c.locator}),r()})}signers(){return d(this,null,function*(){var c,p;s.info("wallet.signers.start");let e=yield n(this,g).getWallet(this.walletLocator);if("error"in e)throw s.error("wallet.signers.error",{error:e}),new _(JSON.stringify(e));if(e.type!=="smart"||e.chainType!=="evm"&&e.chainType!=="solana"&&e.chainType!=="stellar")throw s.error("wallet.signers.error",{error:`Wallet type ${e.type} not supported`}),new j(`Wallet type ${e.type} not supported`);let r=(p=(c=e==null?void 0:e.config)==null?void 0:c.delegatedSigners)!=null?p:[],i=(yield Promise.all(r.map(h=>d(this,null,function*(){try{return(yield this.getSignerState(h.locator)).signer}catch(l){return null}})))).filter(h=>h!=null);return s.info("wallet.signers.success",{count:i.length}),i})}get walletLocator(){if(n(this,g).isServerSide)return this.address;{let e;switch(this.chain){case"stellar":e="me:stellar:smart";break;case"solana":e="me:solana:smart";break;default:e="me:evm:smart";break}let r=this.alias!=null?`:alias:${this.alias}`:"";return e+r}}requireSigner(){if(n(this,f)==null)throw n(this,k).length>1?new Error("No signer is set. This wallet has multiple signers configured. Call wallet.useSigner() to select which signer to use before signing operations."):n(this,b).type==="server"?new Error(`No signer is set. Server wallets require calling wallet.useSigner() with the server secret before signing operations.
|
|
2
|
-
Example: wallet.useSigner({ type: "server", secret: process.env.YOUR_SERVER_SECRET })`):n(this,b).type==="external-wallet"?new Error(`No signer is set. External wallet signers require calling wallet.useSigner() with the onSign callback before signing operations.
|
|
3
|
-
Example: wallet.useSigner({ type: "external-wallet", address: "0x...", onSign: async (tx) => ... })`):new Error("This wallet is read-only because no signer was provided. Operations that require signing (send, approve, addSigner, etc.) are not available.");return n(this,f)}preAuthIfNeeded(){return d(this,null,function*(){yield n(this,O),n(this,R)==null&&S(this,R,this.recover());try{yield n(this,R)}finally{S(this,R,null)}let e=this.requireSigner();e instanceof ie&&(yield e.ensureAuthenticated())})}isRecoverySigner(e){let r=n(this,b);if(r==null||r.type!==e.type||e.type==="device")return!1;if(e.type==="passkey")return!0;if(e.type==="server"&&r.type==="server"){let t=L(e,this.chain,n(this,g).projectId,n(this,g).environment).derivedAddress,i=L(r,this.chain,n(this,g).projectId,n(this,g).environment).derivedAddress;return t===i}return W(e)===W(r)}validateSignerInput(e){switch(e.type){case"email":if(!("email"in e)||e.email==null)throw new Error("Email signer requires an email address");break;case"phone":if(!("phone"in e)||e.phone==null)throw new Error("Phone signer requires a phone number");break;case"external-wallet":if(!("address"in e)||e.address==null)throw new Error("External wallet signer requires a wallet address");if(!("onSign"in e)||typeof e.onSign!="function")throw new Error("External wallet signer requires an onSign callback");break;case"passkey":case"device":case"api-key":break;default:break}}resolveDeviceSignerAvailability(e){return d(this,null,function*(){var p;let r=(p=n(this,m))==null?void 0:p.deviceSignerKeyStorage;if(r==null)throw new Error("Device signer key storage is required for device signers");let t=yield r.getKey(this.address);if(t!=null){e.locator=`device:${t}`;return}let c=(yield this.signers()).filter(h=>h.locator.startsWith("device:"));for(let h of c){let l=h.locator.replace("device:","");if(yield r.hasKey(l)){yield r.mapAddressToKey(this.address,l),e.locator=h.locator;return}}S(this,T,!0),S(this,N,!1)})}assembleFullSigner(i){return d(this,arguments,function*(e,r=(t=>(t=n(this,m))==null?void 0:t.deviceSignerKeyStorage)()){var h;let c=B(this.chain,e,r),p=yield this.getSignerState(c.locator());return c.status=(h=p.signer)==null?void 0:h.status,c})}getSignerState(e){return d(this,null,function*(){let r=null;try{r=yield n(this,g).getSigner(this.walletLocator,e)}catch(i){return{response:null,signer:null,pendingOperation:null}}if(r==null||typeof r!="object"||"error"in r)return{response:null,signer:null,pendingOperation:null};let t=G(r,this.chain);return{response:r,signer:t,pendingOperation:M(r,this.chain)}})}buildInternalSignerConfig(e){var r,t,i,c,p,h;switch(e.type){case"email":return{type:"email",email:e.email,locator:`email:${e.email}`,address:this.address,crossmint:n(this,g).crossmint,clientTEEConnection:(r=n(this,m))==null?void 0:r.clientTEEConnection,onAuthRequired:(i=(t=n(this,m))==null?void 0:t.callbacks)==null?void 0:i.onAuthRequired};case"phone":return{type:"phone",phone:e.phone,locator:`phone:${e.phone}`,address:this.address,crossmint:n(this,g).crossmint,clientTEEConnection:(c=n(this,m))==null?void 0:c.clientTEEConnection,onAuthRequired:(h=(p=n(this,m))==null?void 0:p.callbacks)==null?void 0:h.onAuthRequired};case"passkey":{let l="id"in e&&e.id?e.id:"";return{type:"passkey",id:l,locator:`passkey:${l}`,name:"name"in e?e.name:void 0,publicKey:"publicKey"in e?e.publicKey:void 0,onCreatePasskey:e.onCreatePasskey,onSignWithPasskey:e.onSignWithPasskey}}case"device":return{type:"device",locator:"locator"in e&&e.locator?e.locator:void 0,address:this.address};case"external-wallet":return I(C({},e),{locator:`external-wallet:${e.address}`});case"api-key":return{type:"api-key",locator:"api-key",address:this.address};case"server":{let{derivedKeyBytes:l,derivedAddress:a}=L(e,this.chain,n(this,g).projectId,n(this,g).environment);return{type:"server",derivedKeyBytes:l,locator:`server:${a}`,address:a}}default:throw new Error(`Unknown signer type: ${e==null?void 0:e.type}`)}}get isSolanaWallet(){return this.chain==="solana"}resolveChainForEnvironment(){let e=ne(this.chain,n(this,g).environment);return e!==this.chain&&(this.chain=e),this.chain}approveTransactionAndWait(e,r){return d(this,null,function*(){return yield this.approveTransactionInternal(e,r),yield this.sleep(1e3),yield this.waitForTransaction(e)})}approveSignatureAndWait(e,r){return d(this,null,function*(){let t=yield this.approveSignatureInternal(e,r);return!("error"in t)&&t.status==="success"&&t.outputSignature!=null?{signature:t.outputSignature,signatureId:e}:(yield this.sleep(1e3),yield this.waitForSignature(e))})}approveSignatureInternal(e,r){return d(this,null,function*(){var l,a;if(this.isSolanaWallet)throw new Error("Approving signatures is only supported for EVM smart wallets");let t=this.requireSigner(),i=yield n(this,g).getSignature(this.walletLocator,e);if("error"in i)throw new q(JSON.stringify(i));if(t.type==="api-key")return i;if((r==null?void 0:r.approval)!=null){let o=[r.approval];return yield this.executeApproveSignatureWithErrorHandling(e,o)}let c=(l=i.approvals)==null?void 0:l.pending;if(c==null)return i;let p=[...(a=r==null?void 0:r.additionalSigners)!=null?a:[],t],h=yield Promise.all(c.map(o=>d(this,null,function*(){let u=p.find(v=>v.locator()===o.signer.locator);if(u==null)throw new K(`Signer ${o.signer.locator} not found in pending approvals`);let w=yield u.signMessage(o.message);return I(C({},w),{signer:u.locator()})})));return yield this.executeApproveSignatureWithErrorHandling(e,h)})}approveTransactionInternal(e,r){return d(this,null,function*(){var l,a,o,u,w;let t=yield n(this,g).getTransaction(this.walletLocator,e);if("error"in t)throw new J(JSON.stringify(t));yield(o=(a=(l=n(this,m))==null?void 0:l.callbacks)==null?void 0:a.onTransactionStart)==null?void 0:o.call(a);let i=this.requireSigner();if(i.type==="api-key")return t;if((r==null?void 0:r.approval)!=null){let v=[r.approval];return yield this.executeApproveTransactionWithErrorHandling(e,v)}let c=(u=t.approvals)==null?void 0:u.pending;if(c==null)return t;let p=[...(w=r==null?void 0:r.additionalSigners)!=null?w:[],i],h=yield Promise.all(c.map(v=>d(this,null,function*(){let F=p.find(le=>le.locator()===v.signer.locator);if(F==null)throw new K(`Signer ${v.signer.locator} not found in pending approvals`);let $=F.type==="device",D=t.chainType==="solana"&&"transaction"in t.onChain&&!$?t.onChain.transaction:v.message,oe=yield F.signTransaction(D);return I(C({},oe),{signer:F.locator()})})));return yield this.executeApproveTransactionWithErrorHandling(e,h)})}executeApproveTransactionWithErrorHandling(e,r){return d(this,null,function*(){s.info("wallet.approve: submitting approval to API",{transactionId:e});let t=yield n(this,g).approveTransaction(this.walletLocator,e,{approvals:r});if(t.error)throw new re(JSON.stringify(t));return t})}executeApproveSignatureWithErrorHandling(e,r){return d(this,null,function*(){let t=yield n(this,g).approveSignature(this.walletLocator,e,{approvals:r});if(t.error)throw new V(JSON.stringify(t));return t})}waitForSignature(e){return d(this,null,function*(){let r=null;do if(yield new Promise(t=>setTimeout(t,H)),r=yield n(this,g).getSignature(this.walletLocator,e),"error"in r)throw new q(JSON.stringify(r));while(r===null||r.status==="pending");if(r.status==="failed")throw new U("Signature signing failed");if(!r.outputSignature)throw new q("Signature not available");return{signature:r.outputSignature,signatureId:e}})}waitForTransaction(p){return d(this,arguments,function*(e,r=6e4,{backoffMultiplier:t=1.1,maxBackoffMs:i=2e3,initialBackoffMs:c=H}={}){var u,w;s.info("wallet.approve: waiting for transaction confirmation",{transactionId:e,timeoutMs:r});let h=Date.now(),l;do{if(Date.now()-h>r)throw new Q("Transaction confirmation timeout");if(l=yield n(this,g).getTransaction(this.walletLocator,e),l.error)throw new J(JSON.stringify(l));yield this.sleep(c),c=Math.min(c*t,i)}while(l.status==="pending");if(l.status==="failed")throw new X(`Transaction sending failed: ${JSON.stringify(l.error)}`);if(l.status==="awaiting-approval")throw new Z("Transaction is awaiting approval. Please submit required approvals before waiting for completion.");let a="txHash"in l.onChain&&typeof l.onChain.txHash=="string"?l.onChain.txHash:void 0,o=(u=l.onChain.txId)!=null?u:a;if(o==null)throw new ee("Transaction hash not found on transaction response");return{hash:o,explorerLink:(w=l.onChain.explorerLink)!=null?w:"",transactionId:l.id}})}sleep(e){return d(this,null,function*(){return new Promise(r=>setTimeout(r,e))})}};f=new WeakMap,m=new WeakMap,g=new WeakMap,b=new WeakMap,k=new WeakMap,T=new WeakMap,N=new WeakMap,O=new WeakMap,R=new WeakMap,x([P({logger:s,methodName:"wallet.balances",buildContext(e){return{chain:e.chain,address:e.address}}})],A.prototype,"balances",1),x([P({logger:s,methodName:"wallet.stagingFund",buildContext(e){return{chain:e.chain,address:e.address}}})],A.prototype,"stagingFund",1),x([P({logger:s,methodName:"wallet.send",buildContext(e){return{chain:e.chain,address:e.address}}})],A.prototype,"send",1),x([P({logger:s,methodName:"wallet.approve",buildContext(e){return{chain:e.chain,address:e.address}}})],A.prototype,"approve",1),x([P({logger:s,methodName:"wallet.addSigner",buildContext(e){return{chain:e.chain,address:e.address}}})],A.prototype,"addSigner",1),x([P({logger:s,methodName:"wallet.useSigner",buildContext(e){return{chain:e.chain,address:e.address}}})],A.prototype,"useSigner",1),x([P({logger:s,methodName:"wallet.recover",buildContext(e){return{chain:e.chain,address:e.address}}})],A.prototype,"recover",1),x([P({logger:s,methodName:"wallet.signers",buildContext(e){return{chain:e.chain,address:e.address}}})],A.prototype,"signers",1);function ce(y){if(typeof y=="string"){if(!se(y))throw new te(`Invalid recipient address: "${y}". Expected a valid EVM (0x...), Solana (base58), or Stellar (G.../C...) address.`);return y}if("email"in y)return`email:${y.email}`;if("x"in y)return`x:${y.x}`;if("twitter"in y)return`twitter:${y.twitter}`;if("phone"in y)return`phoneNumber:${y.phone}`;if("userId"in y)return`userId:${y.userId}`;throw new Error("Invalid recipient locator")}function de(y,e){return se(y)?`${e}:${y}`:`${e}:${y.toLowerCase()}`}export{A as a};
|
package/dist/chunk-QZO3WO3R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s="@crossmint/wallets-sdk",t="1.0.3";var c="WALLETS_SDK",r=t,a=s,d=500;export{c as a,r as b,a as c,d};
|
package/dist/chunk-ZYB4O4OG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-EXC7TCGL.js";import{a as n}from"./chunk-Y3U34F7K.js";import{b as p,c as l}from"./chunk-QZO3WO3R.js";import{g as t}from"./chunk-J3R36SGJ.js";import{APIKeyEnvironmentPrefix as h,APIKeyUsageOrigin as d,CrossmintApiClient as g}from"@crossmint/common-sdk-base";var c=class extends g{constructor(e){super(e,{internalConfig:{sdkMetadata:{name:l,version:p}}});this.apiPrefix="api/2025-06-09/wallets";this.unstableApiPrefix="api/unstable/wallets"}createWallet(e){return t(this,null,function*(){let s=this.isServerSide?`${this.apiPrefix}`:`${this.apiPrefix}/me`;n.info("wallets.api.createWallet",{chainType:e.chainType,walletType:e.type});let a=yield(yield this.post(s,{body:JSON.stringify(e),headers:this.headers})).json();return"error"in a?n.error("wallets.api.createWallet.error",{error:a.error,chainType:e.chainType}):"address"in a&&n.info("wallets.api.createWallet.success",{address:a.address,chainType:e.chainType}),a})}getWallet(e){return t(this,null,function*(){n.info("wallets.api.getWallet",{locator:e});let r=yield(yield this.get(`${this.apiPrefix}/${e}`,{headers:this.headers})).json();return"error"in r?n.warn("wallets.api.getWallet.error",{locator:e,error:r.error}):"address"in r&&n.info("wallets.api.getWallet.success",{address:r.address,locator:e}),r})}createTransaction(e,s){return t(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveTransaction(e,s,r){return t(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/transactions/${s}/approvals`,{body:JSON.stringify(r),headers:this.headers})).json()})}getTransaction(e,s){return t(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions/${s}`,{headers:this.headers})).json()})}createSignature(e,s){return t(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures`,{body:JSON.stringify(s),headers:this.headers})).json()})}approveSignature(e,s,r){return t(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signatures/${s}/approvals`,{body:JSON.stringify(r),headers:this.headers})).json()})}getSignature(e,s){return t(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signatures/${s}`,{headers:this.headers})).json()})}getTransactions(e){return t(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/transactions`,{headers:this.headers})).json()})}getNfts(e){return t(this,null,function*(){let s=new URLSearchParams;s.append("page",e.page.toString()),s.append("perPage",e.perPage.toString());let r=`${e.chain}:${e.address}`;return(yield this.get(`${this.apiPrefix}/${r}/nfts?${s.toString()}`,{headers:this.headers})).json()})}getTransfers(e,s){return t(this,null,function*(){let r=new URLSearchParams;return r.append("chain",s.chain.toString()),s.tokens!=null&&r.append("tokens",s.tokens),s.status!=null&&r.append("status",s.status),(yield this.get(`${this.unstableApiPrefix}/${e}/transfers?${r.toString()}`,{headers:this.headers})).json()})}getBalance(e,s){return t(this,null,function*(){let r=new URLSearchParams;return r.append("tokens",s.tokens.join(",")),r.append("chains",s.chains.join(",")),(yield this.get(`${this.apiPrefix}/${e}/balances?${r.toString()}`,{headers:this.headers})).json()})}fundWallet(e,s){return t(this,null,function*(){if(this.environment===h.PRODUCTION)throw new Error("Funding wallets is only supported in staging environment");return(yield this.post(`api/v1-alpha2/wallets/${e}/balances`,{body:JSON.stringify(s),headers:this.headers})).json()})}registerSigner(e,s){return t(this,null,function*(){return(yield this.post(`${this.apiPrefix}/${e}/signers`,{body:JSON.stringify(s),headers:this.headers})).json()})}getSigner(e,s){return t(this,null,function*(){return(yield this.get(`${this.apiPrefix}/${e}/signers/${s}`,{headers:this.headers})).json()})}send(e,s,r){return t(this,null,function*(){n.info("wallets.api.send",{walletLocator:e,tokenLocator:s,recipient:r.recipient});let i=yield(yield this.post(`${this.apiPrefix}/${e}/tokens/${s}/transfers`,{body:JSON.stringify(r),headers:this.headers})).json();return"error"in i?n.error("wallets.api.send.error",{walletLocator:e,tokenLocator:s,error:i.error}):"id"in i&&n.info("wallets.api.send.success",{walletLocator:e,transactionId:i.id}),i})}get isServerSide(){return this.parsedAPIKey.usageOrigin===d.SERVER}get environment(){if(!this.parsedAPIKey.isValid)throw new o("Invalid API key");return this.parsedAPIKey.environment}get projectId(){if(!this.parsedAPIKey.isValid)throw new o("Invalid API key");return this.parsedAPIKey.projectId}get headers(){return{"Content-Type":"application/json"}}};export{c as a};
|