@crossmint/wallets-sdk 0.20.2 → 0.20.5
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/package.json +1 -1
- package/LICENSE +0 -201
- package/README.md +0 -96
- package/dist/api/__tests__/constants.cjs +0 -31
- package/dist/api/__tests__/constants.d.cts +0 -96
- package/dist/api/__tests__/constants.d.ts +0 -96
- package/dist/api/__tests__/constants.js +0 -31
- package/dist/api/__tests__/test-utils.cjs +0 -372
- package/dist/api/__tests__/test-utils.d.cts +0 -99
- package/dist/api/__tests__/test-utils.d.ts +0 -99
- package/dist/api/__tests__/test-utils.js +0 -372
- package/dist/api/client.cjs +0 -10
- package/dist/api/client.d.cts +0 -42
- package/dist/api/client.d.ts +0 -42
- package/dist/api/client.js +0 -10
- package/dist/api/gen/client.gen.cjs +0 -7
- package/dist/api/gen/client.gen.d.cts +0 -16
- package/dist/api/gen/client.gen.d.ts +0 -16
- package/dist/api/gen/client.gen.js +0 -7
- package/dist/api/gen/index.cjs +0 -179
- package/dist/api/gen/index.d.cts +0 -3
- package/dist/api/gen/index.d.ts +0 -3
- package/dist/api/gen/index.js +0 -179
- package/dist/api/gen/sdk.gen.cjs +0 -178
- package/dist/api/gen/sdk.gen.d.cts +0 -611
- package/dist/api/gen/sdk.gen.d.ts +0 -611
- package/dist/api/gen/sdk.gen.js +0 -178
- package/dist/api/gen/types.gen.cjs +0 -1
- package/dist/api/gen/types.gen.d.cts +0 -13865
- package/dist/api/gen/types.gen.d.ts +0 -13865
- package/dist/api/gen/types.gen.js +0 -1
- package/dist/api/index.cjs +0 -12
- package/dist/api/index.d.cts +0 -6
- package/dist/api/index.d.ts +0 -6
- package/dist/api/index.js +0 -12
- package/dist/api/types.cjs +0 -1
- package/dist/api/types.d.cts +0 -55
- package/dist/api/types.d.ts +0 -55
- package/dist/api/types.js +0 -1
- package/dist/chains/chains.cjs +0 -24
- package/dist/chains/chains.d.cts +0 -28
- package/dist/chains/chains.d.ts +0 -28
- package/dist/chains/chains.js +0 -24
- package/dist/chains/definitions/arcTestnet.cjs +0 -7
- package/dist/chains/definitions/arcTestnet.d.cts +0 -43
- package/dist/chains/definitions/arcTestnet.d.ts +0 -43
- package/dist/chains/definitions/arcTestnet.js +0 -7
- package/dist/chains/definitions/story.cjs +0 -7
- package/dist/chains/definitions/story.d.cts +0 -49
- package/dist/chains/definitions/story.d.ts +0 -49
- package/dist/chains/definitions/story.js +0 -7
- package/dist/chains/definitions/storyTestnet.cjs +0 -7
- package/dist/chains/definitions/storyTestnet.d.cts +0 -43
- package/dist/chains/definitions/storyTestnet.d.ts +0 -43
- package/dist/chains/definitions/storyTestnet.js +0 -7
- package/dist/chains/definitions/tempo.cjs +0 -7
- package/dist/chains/definitions/tempo.d.cts +0 -39
- package/dist/chains/definitions/tempo.d.ts +0 -39
- package/dist/chains/definitions/tempo.js +0 -7
- package/dist/chains/definitions/tempoTestnet.cjs +0 -7
- package/dist/chains/definitions/tempoTestnet.d.cts +0 -39
- package/dist/chains/definitions/tempoTestnet.d.ts +0 -39
- package/dist/chains/definitions/tempoTestnet.js +0 -7
- package/dist/chunk-2I2OFGNL.js +0 -36
- package/dist/chunk-2T5HHKUI.js +0 -19
- package/dist/chunk-2WBSPOWU.js +0 -223
- package/dist/chunk-3U6UAYOV.js +0 -25
- package/dist/chunk-455NK5LB.js +0 -0
- package/dist/chunk-47R3UV3J.cjs +0 -58
- package/dist/chunk-47WKYTRN.js +0 -63
- package/dist/chunk-4GFSUI2I.cjs +0 -66
- package/dist/chunk-55V4VMTX.cjs +0 -25
- package/dist/chunk-5IFDVB4Y.js +0 -0
- package/dist/chunk-66UY53KP.cjs +0 -336
- package/dist/chunk-6FG5QXII.cjs +0 -110
- package/dist/chunk-6HXIZLEQ.cjs +0 -1
- package/dist/chunk-6UMJYMAY.js +0 -82
- package/dist/chunk-7GOUUPS4.js +0 -36
- package/dist/chunk-7TT3VUDF.cjs +0 -84
- package/dist/chunk-7USEVMTW.cjs +0 -21
- package/dist/chunk-A6E67ZZP.js +0 -237
- package/dist/chunk-ABMZ3ZVN.js +0 -52
- package/dist/chunk-ASE2FXWP.js +0 -65
- package/dist/chunk-BMMZIPXT.js +0 -778
- package/dist/chunk-CCIGWTAO.cjs +0 -1
- package/dist/chunk-CMBFV325.js +0 -69
- package/dist/chunk-COR3CNRW.cjs +0 -778
- package/dist/chunk-ECAM5KTH.cjs +0 -1
- package/dist/chunk-F7L2TZ3I.cjs +0 -21
- package/dist/chunk-FHMKNG62.js +0 -741
- package/dist/chunk-FICVKSXZ.js +0 -84
- package/dist/chunk-FOOISYCJ.js +0 -66
- package/dist/chunk-G6QJHFSY.cjs +0 -74
- package/dist/chunk-HTSQPZHW.cjs +0 -25
- package/dist/chunk-HXJ3YPAN.js +0 -110
- package/dist/chunk-IDKGJO2G.cjs +0 -115
- package/dist/chunk-IOMKHF6R.cjs +0 -44
- package/dist/chunk-IPO25BCU.js +0 -43
- package/dist/chunk-JREZWZ2S.cjs +0 -52
- package/dist/chunk-JSWTGW46.cjs +0 -36
- package/dist/chunk-JWMQALLN.js +0 -21
- package/dist/chunk-KBJA7JDT.js +0 -0
- package/dist/chunk-KQH5ZXJ4.js +0 -336
- package/dist/chunk-KT3CVXFG.js +0 -9
- package/dist/chunk-MMISP35W.js +0 -21
- package/dist/chunk-MRZXYVQO.cjs +0 -82
- package/dist/chunk-NIBKCMQ2.cjs +0 -19
- package/dist/chunk-PIFD6KNH.js +0 -59
- package/dist/chunk-PJOJIRTY.js +0 -74
- package/dist/chunk-PK7J3Y3L.js +0 -44
- package/dist/chunk-PM7BGATN.cjs +0 -237
- package/dist/chunk-PO6S7UR3.cjs +0 -1
- package/dist/chunk-POG76HDD.cjs +0 -741
- package/dist/chunk-PUO4QNXH.js +0 -89
- package/dist/chunk-Q5KNPVYI.cjs +0 -59
- package/dist/chunk-R4AW5ADG.cjs +0 -16
- package/dist/chunk-R6DH4V7S.cjs +0 -69
- package/dist/chunk-RBHGZDDX.cjs +0 -58
- package/dist/chunk-RHR6P2KP.cjs +0 -15
- package/dist/chunk-RYQI3RXL.cjs +0 -247
- package/dist/chunk-SGINWAB6.js +0 -155
- package/dist/chunk-T2XUADHW.js +0 -58
- package/dist/chunk-TYQ4YIP7.js +0 -16
- package/dist/chunk-U3NV7UY7.js +0 -323
- package/dist/chunk-UO2J2ZB2.cjs +0 -65
- package/dist/chunk-W7K5E64Q.js +0 -247
- package/dist/chunk-WDZY4PP4.cjs +0 -223
- package/dist/chunk-WHTECI7J.cjs +0 -89
- package/dist/chunk-WJUPOCKJ.js +0 -15
- package/dist/chunk-WWW6IGZ7.js +0 -115
- package/dist/chunk-XC2V34TS.cjs +0 -155
- package/dist/chunk-XOCC3MPK.cjs +0 -36
- package/dist/chunk-XPMCPXI3.cjs +0 -1
- package/dist/chunk-YDZRBHS3.js +0 -0
- package/dist/chunk-YMRXMNME.js +0 -0
- package/dist/chunk-ZAX22GSI.cjs +0 -323
- package/dist/chunk-ZBLW42YE.js +0 -25
- package/dist/chunk-ZNAGDENG.cjs +0 -43
- package/dist/chunk-ZP4ZZCIE.js +0 -58
- package/dist/chunk-ZT7EGOCI.cjs +0 -9
- package/dist/chunk-ZTEMOYS2.cjs +0 -63
- package/dist/index.cjs +0 -60
- package/dist/index.d.cts +0 -19
- package/dist/index.d.ts +0 -19
- package/dist/index.js +0 -60
- package/dist/logger/index.cjs +0 -11
- package/dist/logger/index.d.cts +0 -2
- package/dist/logger/index.d.ts +0 -2
- package/dist/logger/index.js +0 -11
- package/dist/logger/init.cjs +0 -10
- package/dist/logger/init.d.cts +0 -15
- package/dist/logger/init.d.ts +0 -15
- package/dist/logger/init.js +0 -10
- package/dist/sdk.cjs +0 -39
- package/dist/sdk.d.cts +0 -48
- package/dist/sdk.d.ts +0 -48
- package/dist/sdk.js +0 -39
- package/dist/signers/evm-api-key.cjs +0 -7
- package/dist/signers/evm-api-key.d.cts +0 -18
- package/dist/signers/evm-api-key.d.ts +0 -18
- package/dist/signers/evm-api-key.js +0 -7
- package/dist/signers/evm-external-wallet.cjs +0 -7
- package/dist/signers/evm-external-wallet.d.cts +0 -26
- package/dist/signers/evm-external-wallet.d.ts +0 -26
- package/dist/signers/evm-external-wallet.js +0 -7
- package/dist/signers/index.cjs +0 -24
- package/dist/signers/index.d.cts +0 -11
- package/dist/signers/index.d.ts +0 -11
- package/dist/signers/index.js +0 -24
- package/dist/signers/non-custodial/index.cjs +0 -27
- package/dist/signers/non-custodial/index.d.cts +0 -11
- package/dist/signers/non-custodial/index.d.ts +0 -11
- package/dist/signers/non-custodial/index.js +0 -27
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +0 -13
- package/dist/signers/non-custodial/ncs-evm-signer.d.cts +0 -30
- package/dist/signers/non-custodial/ncs-evm-signer.d.ts +0 -30
- package/dist/signers/non-custodial/ncs-evm-signer.js +0 -13
- package/dist/signers/non-custodial/ncs-iframe-manager.cjs +0 -7
- package/dist/signers/non-custodial/ncs-iframe-manager.d.cts +0 -16
- package/dist/signers/non-custodial/ncs-iframe-manager.d.ts +0 -16
- package/dist/signers/non-custodial/ncs-iframe-manager.js +0 -7
- package/dist/signers/non-custodial/ncs-signer.cjs +0 -14
- package/dist/signers/non-custodial/ncs-signer.d.cts +0 -50
- package/dist/signers/non-custodial/ncs-signer.d.ts +0 -50
- package/dist/signers/non-custodial/ncs-signer.js +0 -14
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +0 -13
- package/dist/signers/non-custodial/ncs-solana-signer.d.cts +0 -27
- package/dist/signers/non-custodial/ncs-solana-signer.d.ts +0 -27
- package/dist/signers/non-custodial/ncs-solana-signer.js +0 -13
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +0 -13
- package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +0 -27
- package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +0 -27
- package/dist/signers/non-custodial/ncs-stellar-signer.js +0 -13
- package/dist/signers/passkey.cjs +0 -7
- package/dist/signers/passkey.d.cts +0 -19
- package/dist/signers/passkey.d.ts +0 -19
- package/dist/signers/passkey.js +0 -7
- package/dist/signers/solana-api-key.cjs +0 -7
- package/dist/signers/solana-api-key.d.cts +0 -18
- package/dist/signers/solana-api-key.d.ts +0 -18
- package/dist/signers/solana-api-key.js +0 -7
- package/dist/signers/solana-external-wallet.cjs +0 -8
- package/dist/signers/solana-external-wallet.d.cts +0 -24
- package/dist/signers/solana-external-wallet.d.ts +0 -24
- package/dist/signers/solana-external-wallet.js +0 -8
- package/dist/signers/stellar-external-wallet.cjs +0 -7
- package/dist/signers/stellar-external-wallet.d.cts +0 -23
- package/dist/signers/stellar-external-wallet.d.ts +0 -23
- package/dist/signers/stellar-external-wallet.js +0 -7
- package/dist/signers/types.cjs +0 -9
- package/dist/signers/types.d.cts +0 -91
- package/dist/signers/types.d.ts +0 -91
- package/dist/signers/types.js +0 -9
- package/dist/utils/constants.cjs +0 -13
- package/dist/utils/constants.d.cts +0 -6
- package/dist/utils/constants.d.ts +0 -6
- package/dist/utils/constants.js +0 -13
- package/dist/utils/errors.cjs +0 -55
- package/dist/utils/errors.d.cts +0 -80
- package/dist/utils/errors.d.ts +0 -80
- package/dist/utils/errors.js +0 -55
- package/dist/utils/signer-validation.cjs +0 -10
- package/dist/utils/signer-validation.d.cts +0 -9
- package/dist/utils/signer-validation.d.ts +0 -9
- package/dist/utils/signer-validation.js +0 -10
- package/dist/wallets/__tests__/setup.cjs +0 -36
- package/dist/wallets/__tests__/setup.d.cts +0 -2
- package/dist/wallets/__tests__/setup.d.ts +0 -2
- package/dist/wallets/__tests__/setup.js +0 -36
- package/dist/wallets/__tests__/test-helpers.cjs +0 -93
- package/dist/wallets/__tests__/test-helpers.d.cts +0 -36
- package/dist/wallets/__tests__/test-helpers.d.ts +0 -36
- package/dist/wallets/__tests__/test-helpers.js +0 -93
- package/dist/wallets/evm.cjs +0 -25
- package/dist/wallets/evm.d.cts +0 -155
- package/dist/wallets/evm.d.ts +0 -155
- package/dist/wallets/evm.js +0 -25
- package/dist/wallets/solana.cjs +0 -26
- package/dist/wallets/solana.d.cts +0 -28
- package/dist/wallets/solana.d.ts +0 -28
- package/dist/wallets/solana.js +0 -26
- package/dist/wallets/stellar.cjs +0 -25
- package/dist/wallets/stellar.d.cts +0 -30
- package/dist/wallets/stellar.d.ts +0 -30
- package/dist/wallets/stellar.js +0 -25
- package/dist/wallets/types.cjs +0 -1
- package/dist/wallets/types.d.cts +0 -170
- package/dist/wallets/types.d.ts +0 -170
- package/dist/wallets/types.js +0 -0
- package/dist/wallets/wallet-factory.cjs +0 -33
- package/dist/wallets/wallet-factory.d.cts +0 -33
- package/dist/wallets/wallet-factory.d.ts +0 -33
- package/dist/wallets/wallet-factory.js +0 -33
- package/dist/wallets/wallet.cjs +0 -24
- package/dist/wallets/wallet.d.cts +0 -168
- package/dist/wallets/wallet.d.ts +0 -168
- package/dist/wallets/wallet.js +0 -24
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import * as viem from 'viem';
|
|
2
|
-
|
|
3
|
-
declare const tempo: {
|
|
4
|
-
blockExplorers: {
|
|
5
|
-
readonly default: {
|
|
6
|
-
readonly name: "Tempo Explorer";
|
|
7
|
-
readonly url: "https://explore.mainnet.tempo.xyz";
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
blockTime?: number | undefined;
|
|
11
|
-
contracts?: viem.Prettify<{
|
|
12
|
-
[key: string]: viem.ChainContract | {
|
|
13
|
-
[sourceId: number]: viem.ChainContract | undefined;
|
|
14
|
-
} | undefined;
|
|
15
|
-
} & {
|
|
16
|
-
ensRegistry?: viem.ChainContract | undefined;
|
|
17
|
-
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
18
|
-
multicall3?: viem.ChainContract | undefined;
|
|
19
|
-
universalSignatureVerifier?: viem.ChainContract | undefined;
|
|
20
|
-
}> | undefined;
|
|
21
|
-
ensTlds?: readonly string[] | undefined;
|
|
22
|
-
id: 4217;
|
|
23
|
-
name: "Tempo";
|
|
24
|
-
experimental_preconfirmationTime?: number | undefined;
|
|
25
|
-
rpcUrls: {
|
|
26
|
-
readonly default: {
|
|
27
|
-
readonly http: readonly ["https://rpc.tempo.xyz"];
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
sourceId?: number | undefined;
|
|
31
|
-
testnet: false;
|
|
32
|
-
custom?: Record<string, unknown> | undefined;
|
|
33
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
34
|
-
formatters?: undefined;
|
|
35
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
36
|
-
readonly nativeCurrency: never;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export { tempo };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import * as viem from 'viem';
|
|
2
|
-
|
|
3
|
-
declare const tempo: {
|
|
4
|
-
blockExplorers: {
|
|
5
|
-
readonly default: {
|
|
6
|
-
readonly name: "Tempo Explorer";
|
|
7
|
-
readonly url: "https://explore.mainnet.tempo.xyz";
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
blockTime?: number | undefined;
|
|
11
|
-
contracts?: viem.Prettify<{
|
|
12
|
-
[key: string]: viem.ChainContract | {
|
|
13
|
-
[sourceId: number]: viem.ChainContract | undefined;
|
|
14
|
-
} | undefined;
|
|
15
|
-
} & {
|
|
16
|
-
ensRegistry?: viem.ChainContract | undefined;
|
|
17
|
-
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
18
|
-
multicall3?: viem.ChainContract | undefined;
|
|
19
|
-
universalSignatureVerifier?: viem.ChainContract | undefined;
|
|
20
|
-
}> | undefined;
|
|
21
|
-
ensTlds?: readonly string[] | undefined;
|
|
22
|
-
id: 4217;
|
|
23
|
-
name: "Tempo";
|
|
24
|
-
experimental_preconfirmationTime?: number | undefined;
|
|
25
|
-
rpcUrls: {
|
|
26
|
-
readonly default: {
|
|
27
|
-
readonly http: readonly ["https://rpc.tempo.xyz"];
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
sourceId?: number | undefined;
|
|
31
|
-
testnet: false;
|
|
32
|
-
custom?: Record<string, unknown> | undefined;
|
|
33
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
34
|
-
formatters?: undefined;
|
|
35
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
36
|
-
readonly nativeCurrency: never;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export { tempo };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import * as viem from 'viem';
|
|
2
|
-
|
|
3
|
-
declare const tempoTestnet: {
|
|
4
|
-
blockExplorers: {
|
|
5
|
-
readonly default: {
|
|
6
|
-
readonly name: "Tempo Explorer";
|
|
7
|
-
readonly url: "https://explore.tempo.xyz";
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
blockTime?: number | undefined;
|
|
11
|
-
contracts?: viem.Prettify<{
|
|
12
|
-
[key: string]: viem.ChainContract | {
|
|
13
|
-
[sourceId: number]: viem.ChainContract | undefined;
|
|
14
|
-
} | undefined;
|
|
15
|
-
} & {
|
|
16
|
-
ensRegistry?: viem.ChainContract | undefined;
|
|
17
|
-
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
18
|
-
multicall3?: viem.ChainContract | undefined;
|
|
19
|
-
universalSignatureVerifier?: viem.ChainContract | undefined;
|
|
20
|
-
}> | undefined;
|
|
21
|
-
ensTlds?: readonly string[] | undefined;
|
|
22
|
-
id: 42431;
|
|
23
|
-
name: "Tempo Testnet";
|
|
24
|
-
experimental_preconfirmationTime?: number | undefined;
|
|
25
|
-
rpcUrls: {
|
|
26
|
-
readonly default: {
|
|
27
|
-
readonly http: readonly ["https://rpc.moderato.tempo.xyz"];
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
sourceId?: number | undefined;
|
|
31
|
-
testnet: true;
|
|
32
|
-
custom?: Record<string, unknown> | undefined;
|
|
33
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
34
|
-
formatters?: undefined;
|
|
35
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
36
|
-
readonly nativeCurrency: never;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export { tempoTestnet };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import * as viem from 'viem';
|
|
2
|
-
|
|
3
|
-
declare const tempoTestnet: {
|
|
4
|
-
blockExplorers: {
|
|
5
|
-
readonly default: {
|
|
6
|
-
readonly name: "Tempo Explorer";
|
|
7
|
-
readonly url: "https://explore.tempo.xyz";
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
blockTime?: number | undefined;
|
|
11
|
-
contracts?: viem.Prettify<{
|
|
12
|
-
[key: string]: viem.ChainContract | {
|
|
13
|
-
[sourceId: number]: viem.ChainContract | undefined;
|
|
14
|
-
} | undefined;
|
|
15
|
-
} & {
|
|
16
|
-
ensRegistry?: viem.ChainContract | undefined;
|
|
17
|
-
ensUniversalResolver?: viem.ChainContract | undefined;
|
|
18
|
-
multicall3?: viem.ChainContract | undefined;
|
|
19
|
-
universalSignatureVerifier?: viem.ChainContract | undefined;
|
|
20
|
-
}> | undefined;
|
|
21
|
-
ensTlds?: readonly string[] | undefined;
|
|
22
|
-
id: 42431;
|
|
23
|
-
name: "Tempo Testnet";
|
|
24
|
-
experimental_preconfirmationTime?: number | undefined;
|
|
25
|
-
rpcUrls: {
|
|
26
|
-
readonly default: {
|
|
27
|
-
readonly http: readonly ["https://rpc.moderato.tempo.xyz"];
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
sourceId?: number | undefined;
|
|
31
|
-
testnet: true;
|
|
32
|
-
custom?: Record<string, unknown> | undefined;
|
|
33
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
34
|
-
formatters?: undefined;
|
|
35
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
36
|
-
readonly nativeCurrency: never;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export { tempoTestnet };
|
package/dist/chunk-2I2OFGNL.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__async
|
|
3
|
-
} from "./chunk-ASE2FXWP.js";
|
|
4
|
-
|
|
5
|
-
// src/signers/solana-api-key.ts
|
|
6
|
-
var SolanaApiKeySigner = class {
|
|
7
|
-
constructor(config) {
|
|
8
|
-
this.config = config;
|
|
9
|
-
this.type = "api-key";
|
|
10
|
-
}
|
|
11
|
-
locator() {
|
|
12
|
-
return this.config.locator;
|
|
13
|
-
}
|
|
14
|
-
signMessage() {
|
|
15
|
-
return __async(this, null, function* () {
|
|
16
|
-
return yield Promise.reject(
|
|
17
|
-
new Error(
|
|
18
|
-
"API key signers do not support direct message signing - signatures are handled automatically by the backend"
|
|
19
|
-
)
|
|
20
|
-
);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
signTransaction() {
|
|
24
|
-
return __async(this, null, function* () {
|
|
25
|
-
return yield Promise.reject(
|
|
26
|
-
new Error(
|
|
27
|
-
"API key signers do not support direct transaction signing - transaction are handled automatically by the backend"
|
|
28
|
-
)
|
|
29
|
-
);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
SolanaApiKeySigner
|
|
36
|
-
};
|
package/dist/chunk-2T5HHKUI.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// src/chains/definitions/story.ts
|
|
2
|
-
import { defineChain } from "viem";
|
|
3
|
-
var story = defineChain({
|
|
4
|
-
id: 1514,
|
|
5
|
-
name: "Story",
|
|
6
|
-
nativeCurrency: {
|
|
7
|
-
decimals: 18,
|
|
8
|
-
name: "IP Token",
|
|
9
|
-
symbol: "IP"
|
|
10
|
-
},
|
|
11
|
-
rpcUrls: {
|
|
12
|
-
default: { http: ["https://mainnet.storyrpc.io"] }
|
|
13
|
-
},
|
|
14
|
-
testnet: false
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
story
|
|
19
|
-
};
|
package/dist/chunk-2WBSPOWU.js
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
story
|
|
3
|
-
} from "./chunk-2T5HHKUI.js";
|
|
4
|
-
import {
|
|
5
|
-
storyTestnet
|
|
6
|
-
} from "./chunk-3U6UAYOV.js";
|
|
7
|
-
import {
|
|
8
|
-
tempo
|
|
9
|
-
} from "./chunk-MMISP35W.js";
|
|
10
|
-
import {
|
|
11
|
-
tempoTestnet
|
|
12
|
-
} from "./chunk-JWMQALLN.js";
|
|
13
|
-
import {
|
|
14
|
-
arcTestnet
|
|
15
|
-
} from "./chunk-ZBLW42YE.js";
|
|
16
|
-
import {
|
|
17
|
-
InvalidEnvironmentError
|
|
18
|
-
} from "./chunk-SGINWAB6.js";
|
|
19
|
-
import {
|
|
20
|
-
walletsLogger
|
|
21
|
-
} from "./chunk-ABMZ3ZVN.js";
|
|
22
|
-
|
|
23
|
-
// src/chains/chains.ts
|
|
24
|
-
import { APIKeyEnvironmentPrefix, BlockchainIncludingTestnet as Blockchain } from "@crossmint/common-sdk-base";
|
|
25
|
-
import {
|
|
26
|
-
baseSepolia,
|
|
27
|
-
base,
|
|
28
|
-
polygonAmoy,
|
|
29
|
-
polygon,
|
|
30
|
-
optimismSepolia,
|
|
31
|
-
optimism,
|
|
32
|
-
arbitrumSepolia,
|
|
33
|
-
arbitrum,
|
|
34
|
-
arbitrumNova,
|
|
35
|
-
modeTestnet,
|
|
36
|
-
mode,
|
|
37
|
-
bsc,
|
|
38
|
-
shape,
|
|
39
|
-
zora,
|
|
40
|
-
zoraSepolia,
|
|
41
|
-
sepolia,
|
|
42
|
-
flowMainnet,
|
|
43
|
-
flowTestnet,
|
|
44
|
-
plume,
|
|
45
|
-
plumeTestnet
|
|
46
|
-
} from "viem/chains";
|
|
47
|
-
var TESTNET_AA_CHAINS = [
|
|
48
|
-
Blockchain.ABSTRACT_TESTNET,
|
|
49
|
-
Blockchain.ARBITRUM_SEPOLIA,
|
|
50
|
-
Blockchain.BASE_SEPOLIA,
|
|
51
|
-
Blockchain.CURTIS,
|
|
52
|
-
Blockchain.ETHEREUM_SEPOLIA,
|
|
53
|
-
Blockchain.FLOW_TESTNET,
|
|
54
|
-
Blockchain.MANTLE_SEPOLIA,
|
|
55
|
-
Blockchain.MODE_SEPOLIA,
|
|
56
|
-
Blockchain.OPTIMISM_SEPOLIA,
|
|
57
|
-
Blockchain.PLUME_TESTNET,
|
|
58
|
-
Blockchain.POLYGON_AMOY,
|
|
59
|
-
Blockchain.SCROLL_SEPOLIA,
|
|
60
|
-
Blockchain.SEI_ATLANTIC_2_TESTNET,
|
|
61
|
-
Blockchain.STORY_TESTNET,
|
|
62
|
-
Blockchain.WORLD_CHAIN_SEPOLIA,
|
|
63
|
-
Blockchain.ZORA_SEPOLIA,
|
|
64
|
-
Blockchain.ARC_TESTNET,
|
|
65
|
-
Blockchain.TEMPO_TESTNET
|
|
66
|
-
];
|
|
67
|
-
var PRODUCTION_AA_CHAINS = [
|
|
68
|
-
Blockchain.ABSTRACT,
|
|
69
|
-
Blockchain.APECHAIN,
|
|
70
|
-
Blockchain.ARBITRUM,
|
|
71
|
-
Blockchain.ARBITRUMNOVA,
|
|
72
|
-
Blockchain.BASE,
|
|
73
|
-
Blockchain.BSC,
|
|
74
|
-
Blockchain.FLOW,
|
|
75
|
-
Blockchain.MANTLE,
|
|
76
|
-
Blockchain.MODE,
|
|
77
|
-
Blockchain.OPTIMISM,
|
|
78
|
-
Blockchain.PLUME,
|
|
79
|
-
Blockchain.POLYGON,
|
|
80
|
-
Blockchain.SCROLL,
|
|
81
|
-
Blockchain.SEI_PACIFIC_1,
|
|
82
|
-
Blockchain.SHAPE,
|
|
83
|
-
Blockchain.STORY,
|
|
84
|
-
Blockchain.TEMPO,
|
|
85
|
-
Blockchain.WORLDCHAIN,
|
|
86
|
-
Blockchain.ZORA
|
|
87
|
-
];
|
|
88
|
-
function toViemChain(chain) {
|
|
89
|
-
switch (chain) {
|
|
90
|
-
case Blockchain.BASE_SEPOLIA:
|
|
91
|
-
return baseSepolia;
|
|
92
|
-
case Blockchain.BASE:
|
|
93
|
-
return base;
|
|
94
|
-
case Blockchain.POLYGON_AMOY:
|
|
95
|
-
return polygonAmoy;
|
|
96
|
-
case Blockchain.POLYGON:
|
|
97
|
-
return polygon;
|
|
98
|
-
case Blockchain.OPTIMISM_SEPOLIA:
|
|
99
|
-
return optimismSepolia;
|
|
100
|
-
case Blockchain.OPTIMISM:
|
|
101
|
-
return optimism;
|
|
102
|
-
case Blockchain.ARBITRUM_SEPOLIA:
|
|
103
|
-
return arbitrumSepolia;
|
|
104
|
-
case Blockchain.ARBITRUM:
|
|
105
|
-
return arbitrum;
|
|
106
|
-
case Blockchain.ARBITRUMNOVA:
|
|
107
|
-
return arbitrumNova;
|
|
108
|
-
case Blockchain.STORY_TESTNET:
|
|
109
|
-
return storyTestnet;
|
|
110
|
-
case Blockchain.STORY:
|
|
111
|
-
return story;
|
|
112
|
-
case Blockchain.MODE_SEPOLIA:
|
|
113
|
-
return modeTestnet;
|
|
114
|
-
case Blockchain.MODE:
|
|
115
|
-
return mode;
|
|
116
|
-
case Blockchain.BSC:
|
|
117
|
-
return bsc;
|
|
118
|
-
case Blockchain.SHAPE:
|
|
119
|
-
return shape;
|
|
120
|
-
case Blockchain.ZORA:
|
|
121
|
-
return zora;
|
|
122
|
-
case Blockchain.ZORA_SEPOLIA:
|
|
123
|
-
return zoraSepolia;
|
|
124
|
-
case Blockchain.ETHEREUM_SEPOLIA:
|
|
125
|
-
return sepolia;
|
|
126
|
-
case Blockchain.FLOW:
|
|
127
|
-
return flowMainnet;
|
|
128
|
-
case Blockchain.FLOW_TESTNET:
|
|
129
|
-
return flowTestnet;
|
|
130
|
-
case Blockchain.PLUME_TESTNET:
|
|
131
|
-
return plumeTestnet;
|
|
132
|
-
case Blockchain.PLUME:
|
|
133
|
-
return plume;
|
|
134
|
-
case Blockchain.ARC_TESTNET:
|
|
135
|
-
return arcTestnet;
|
|
136
|
-
case Blockchain.TEMPO:
|
|
137
|
-
return tempo;
|
|
138
|
-
case Blockchain.TEMPO_TESTNET:
|
|
139
|
-
return tempoTestnet;
|
|
140
|
-
case Blockchain.ABSTRACT:
|
|
141
|
-
case Blockchain.ABSTRACT_TESTNET:
|
|
142
|
-
case Blockchain.APECHAIN:
|
|
143
|
-
case Blockchain.MANTLE:
|
|
144
|
-
case Blockchain.MANTLE_SEPOLIA:
|
|
145
|
-
case Blockchain.SCROLL:
|
|
146
|
-
case Blockchain.SCROLL_SEPOLIA:
|
|
147
|
-
case Blockchain.SEI_PACIFIC_1:
|
|
148
|
-
case Blockchain.SEI_ATLANTIC_2_TESTNET:
|
|
149
|
-
case Blockchain.CURTIS:
|
|
150
|
-
case Blockchain.WORLDCHAIN:
|
|
151
|
-
case Blockchain.WORLD_CHAIN_SEPOLIA:
|
|
152
|
-
throw new Error(
|
|
153
|
-
`Chain ${chain} is not yet supported in toViemChain function. Please add the appropriate viem chain definition.`
|
|
154
|
-
);
|
|
155
|
-
default:
|
|
156
|
-
throw new Error(`Unknown chain: ${chain}`);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
function isTestnetChain(chain) {
|
|
160
|
-
return TESTNET_AA_CHAINS.includes(chain);
|
|
161
|
-
}
|
|
162
|
-
function isMainnetChain(chain) {
|
|
163
|
-
return PRODUCTION_AA_CHAINS.includes(chain);
|
|
164
|
-
}
|
|
165
|
-
var MAINNET_TO_TESTNET_MAP = {
|
|
166
|
-
[Blockchain.ABSTRACT]: Blockchain.ABSTRACT_TESTNET,
|
|
167
|
-
[Blockchain.APECHAIN]: Blockchain.CURTIS,
|
|
168
|
-
[Blockchain.ARBITRUM]: Blockchain.ARBITRUM_SEPOLIA,
|
|
169
|
-
[Blockchain.BASE]: Blockchain.BASE_SEPOLIA,
|
|
170
|
-
[Blockchain.FLOW]: Blockchain.FLOW_TESTNET,
|
|
171
|
-
[Blockchain.MANTLE]: Blockchain.MANTLE_SEPOLIA,
|
|
172
|
-
[Blockchain.MODE]: Blockchain.MODE_SEPOLIA,
|
|
173
|
-
[Blockchain.OPTIMISM]: Blockchain.OPTIMISM_SEPOLIA,
|
|
174
|
-
[Blockchain.PLUME]: Blockchain.PLUME_TESTNET,
|
|
175
|
-
[Blockchain.POLYGON]: Blockchain.POLYGON_AMOY,
|
|
176
|
-
[Blockchain.SCROLL]: Blockchain.SCROLL_SEPOLIA,
|
|
177
|
-
[Blockchain.SEI_PACIFIC_1]: Blockchain.SEI_ATLANTIC_2_TESTNET,
|
|
178
|
-
[Blockchain.STORY]: Blockchain.STORY_TESTNET,
|
|
179
|
-
[Blockchain.WORLDCHAIN]: Blockchain.WORLD_CHAIN_SEPOLIA,
|
|
180
|
-
[Blockchain.ZORA]: Blockchain.ZORA_SEPOLIA,
|
|
181
|
-
[Blockchain.TEMPO]: Blockchain.TEMPO_TESTNET
|
|
182
|
-
};
|
|
183
|
-
function mainnetToTestnet(chain) {
|
|
184
|
-
return MAINNET_TO_TESTNET_MAP[chain];
|
|
185
|
-
}
|
|
186
|
-
function validateChainForEnvironment(chain, environment) {
|
|
187
|
-
if (chain === "solana" || chain === "stellar") {
|
|
188
|
-
return chain;
|
|
189
|
-
}
|
|
190
|
-
const evmChain = chain;
|
|
191
|
-
const isProductionEnv = environment === APIKeyEnvironmentPrefix.PRODUCTION;
|
|
192
|
-
if (isProductionEnv && isTestnetChain(evmChain)) {
|
|
193
|
-
throw new InvalidEnvironmentError(
|
|
194
|
-
`Chain "${chain}" is a testnet chain and cannot be used in production. Please use a mainnet chain instead.`
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
if (!isProductionEnv && isMainnetChain(evmChain)) {
|
|
198
|
-
const testnetEquivalent = mainnetToTestnet(evmChain);
|
|
199
|
-
if (testnetEquivalent != null) {
|
|
200
|
-
walletsLogger.debug("validateChainForEnvironment.autoConverted", {
|
|
201
|
-
chain,
|
|
202
|
-
convertedTo: testnetEquivalent,
|
|
203
|
-
environment,
|
|
204
|
-
message: `Chain "${chain}" is a mainnet chain and cannot be used in ${environment} environment. Automatically converted to "${testnetEquivalent}".`
|
|
205
|
-
});
|
|
206
|
-
return testnetEquivalent;
|
|
207
|
-
}
|
|
208
|
-
walletsLogger.debug("validateChainForEnvironment.mismatch", {
|
|
209
|
-
chain,
|
|
210
|
-
environment,
|
|
211
|
-
message: `Chain "${chain}" is a mainnet chain and should not be used in ${environment} environment. No testnet equivalent is available. Please use a testnet chain instead.`
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
return chain;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export {
|
|
218
|
-
toViemChain,
|
|
219
|
-
isTestnetChain,
|
|
220
|
-
isMainnetChain,
|
|
221
|
-
mainnetToTestnet,
|
|
222
|
-
validateChainForEnvironment
|
|
223
|
-
};
|
package/dist/chunk-3U6UAYOV.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// src/chains/definitions/storyTestnet.ts
|
|
2
|
-
import { defineChain } from "viem";
|
|
3
|
-
var storyTestnet = defineChain({
|
|
4
|
-
id: 1513,
|
|
5
|
-
name: "Story Testnet",
|
|
6
|
-
nativeCurrency: {
|
|
7
|
-
decimals: 18,
|
|
8
|
-
name: "IP",
|
|
9
|
-
symbol: "IP"
|
|
10
|
-
},
|
|
11
|
-
rpcUrls: {
|
|
12
|
-
default: { http: ["https://testnet.storyrpc.io"] }
|
|
13
|
-
},
|
|
14
|
-
blockExplorers: {
|
|
15
|
-
default: {
|
|
16
|
-
name: "Story Testnet Explorer",
|
|
17
|
-
url: "https://testnet.storyscan.xyz"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
testnet: true
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export {
|
|
24
|
-
storyTestnet
|
|
25
|
-
};
|
package/dist/chunk-455NK5LB.js
DELETED
|
File without changes
|
package/dist/chunk-47R3UV3J.cjs
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunk7TT3VUDFcjs = require('./chunk-7TT3VUDF.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkMRZXYVQOcjs = require('./chunk-MRZXYVQO.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkWHTECI7Jcjs = require('./chunk-WHTECI7J.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunkJSWTGW46cjs = require('./chunk-JSWTGW46.cjs');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _chunkZTEMOYS2cjs = require('./chunk-ZTEMOYS2.cjs');
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var _chunkZNAGDENGcjs = require('./chunk-ZNAGDENG.cjs');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var _chunkXOCC3MPKcjs = require('./chunk-XOCC3MPK.cjs');
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var _chunkQ5KNPVYIcjs = require('./chunk-Q5KNPVYI.cjs');
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var _chunkIOMKHF6Rcjs = require('./chunk-IOMKHF6R.cjs');
|
|
28
|
-
|
|
29
|
-
// src/signers/index.ts
|
|
30
|
-
function assembleSigner(chain, config) {
|
|
31
|
-
switch (config.type) {
|
|
32
|
-
case "email":
|
|
33
|
-
case "phone":
|
|
34
|
-
if (chain === "solana") {
|
|
35
|
-
return new (0, _chunk7TT3VUDFcjs.SolanaNonCustodialSigner)(config);
|
|
36
|
-
}
|
|
37
|
-
if (chain === "stellar") {
|
|
38
|
-
return new (0, _chunkMRZXYVQOcjs.StellarNonCustodialSigner)(config);
|
|
39
|
-
}
|
|
40
|
-
return new (0, _chunkWHTECI7Jcjs.EVMNonCustodialSigner)(config);
|
|
41
|
-
case "api-key":
|
|
42
|
-
return chain === "solana" ? new (0, _chunkXOCC3MPKcjs.SolanaApiKeySigner)(config) : new (0, _chunkJSWTGW46cjs.EVMApiKeySigner)(config);
|
|
43
|
-
case "external-wallet":
|
|
44
|
-
if (chain === "solana") {
|
|
45
|
-
return new (0, _chunkQ5KNPVYIcjs.SolanaExternalWalletSigner)(config);
|
|
46
|
-
}
|
|
47
|
-
if (chain === "stellar") {
|
|
48
|
-
return new (0, _chunkIOMKHF6Rcjs.StellarExternalWalletSigner)(config);
|
|
49
|
-
}
|
|
50
|
-
return new (0, _chunkZTEMOYS2cjs.EVMExternalWalletSigner)(config);
|
|
51
|
-
case "passkey":
|
|
52
|
-
return new (0, _chunkZNAGDENGcjs.PasskeySigner)(config);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
exports.assembleSigner = assembleSigner;
|
package/dist/chunk-47WKYTRN.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__async
|
|
3
|
-
} from "./chunk-ASE2FXWP.js";
|
|
4
|
-
|
|
5
|
-
// src/signers/evm-external-wallet.ts
|
|
6
|
-
var EVMExternalWalletSigner = class {
|
|
7
|
-
constructor(config) {
|
|
8
|
-
this.config = config;
|
|
9
|
-
this.type = "external-wallet";
|
|
10
|
-
if (config.address == null) {
|
|
11
|
-
throw new Error("Please provide an address for the External Wallet Signer");
|
|
12
|
-
}
|
|
13
|
-
this._address = config.address;
|
|
14
|
-
this.provider = config.provider;
|
|
15
|
-
this.viemAccount = config.viemAccount;
|
|
16
|
-
}
|
|
17
|
-
address() {
|
|
18
|
-
return this._address;
|
|
19
|
-
}
|
|
20
|
-
locator() {
|
|
21
|
-
return this.config.locator;
|
|
22
|
-
}
|
|
23
|
-
signMessage(message) {
|
|
24
|
-
return __async(this, null, function* () {
|
|
25
|
-
var _a;
|
|
26
|
-
if (this.provider != null) {
|
|
27
|
-
const signature = yield this.provider.request({
|
|
28
|
-
method: "personal_sign",
|
|
29
|
-
params: [message, this._address]
|
|
30
|
-
});
|
|
31
|
-
if (signature == null) {
|
|
32
|
-
throw new Error(
|
|
33
|
-
"[EVMExternalWalletSigner] Failed to sign message: EIP1193 provider signMessage returned null"
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
return { signature };
|
|
37
|
-
}
|
|
38
|
-
if (((_a = this.viemAccount) == null ? void 0 : _a.signMessage) != null) {
|
|
39
|
-
const signature = yield this.viemAccount.signMessage({
|
|
40
|
-
message: {
|
|
41
|
-
raw: message
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
if (signature == null) {
|
|
45
|
-
throw new Error(
|
|
46
|
-
"[EVMExternalWalletSigner] Failed to sign message: Viem account signMessage returned null"
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
return { signature };
|
|
50
|
-
}
|
|
51
|
-
throw new Error("No signer provider or viem account provided");
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
signTransaction(transaction) {
|
|
55
|
-
return __async(this, null, function* () {
|
|
56
|
-
return yield this.signMessage(transaction);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export {
|
|
62
|
-
EVMExternalWalletSigner
|
|
63
|
-
};
|
package/dist/chunk-4GFSUI2I.cjs
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
4
|
-
|
|
5
|
-
// src/signers/non-custodial/ncs-iframe-manager.ts
|
|
6
|
-
var _clientsdkwindow = require('@crossmint/client-sdk-window');
|
|
7
|
-
var _clientsigners = require('@crossmint/client-signers');
|
|
8
|
-
var NcsIframeManager = class {
|
|
9
|
-
constructor(config) {
|
|
10
|
-
this.config = config;
|
|
11
|
-
this.handshakeParent = null;
|
|
12
|
-
}
|
|
13
|
-
initialize() {
|
|
14
|
-
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
15
|
-
if (this.handshakeParent) {
|
|
16
|
-
return this.handshakeParent;
|
|
17
|
-
}
|
|
18
|
-
console.info("Initializing signers frame for the first time");
|
|
19
|
-
const t0 = Date.now();
|
|
20
|
-
const iframeUrl = new URL(_clientsigners.environmentUrlConfig[this.config.environment]);
|
|
21
|
-
iframeUrl.searchParams.set("targetOrigin", window.location.origin);
|
|
22
|
-
const iframeElement = yield this.createInvisibleIFrame(iframeUrl.toString());
|
|
23
|
-
this.handshakeParent = yield _clientsdkwindow.IFrameWindow.init(
|
|
24
|
-
iframeElement,
|
|
25
|
-
{
|
|
26
|
-
targetOrigin: iframeUrl.origin,
|
|
27
|
-
incomingEvents: _clientsigners.signerOutboundEvents,
|
|
28
|
-
outgoingEvents: _clientsigners.signerInboundEvents,
|
|
29
|
-
handshakeOptions: {
|
|
30
|
-
timeoutMs: 3e4,
|
|
31
|
-
intervalMs: 100
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
_clientsdkwindow.SignersWindowTransport
|
|
35
|
-
);
|
|
36
|
-
yield this.handshakeParent.handshakeWithChild();
|
|
37
|
-
console.info(`Signers frame initialized in ${Date.now() - t0}ms`);
|
|
38
|
-
return this.handshakeParent;
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
createInvisibleIFrame(url) {
|
|
42
|
-
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
43
|
-
const iframe = document.createElement("iframe");
|
|
44
|
-
iframe.src = url;
|
|
45
|
-
Object.assign(iframe.style, {
|
|
46
|
-
position: "absolute",
|
|
47
|
-
opacity: "0",
|
|
48
|
-
pointerEvents: "none",
|
|
49
|
-
width: "0",
|
|
50
|
-
height: "0",
|
|
51
|
-
border: "none",
|
|
52
|
-
top: "-9999px",
|
|
53
|
-
left: "-9999px"
|
|
54
|
-
});
|
|
55
|
-
return new Promise((resolve, reject) => {
|
|
56
|
-
iframe.onload = () => resolve(iframe);
|
|
57
|
-
iframe.onerror = () => reject(new Error("Failed to load iframe content"));
|
|
58
|
-
document.body.appendChild(iframe);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
exports.NcsIframeManager = NcsIframeManager;
|