@crossmint/wallets-sdk 0.20.2 → 0.21.1
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__/test-utils.cjs +8 -8
- package/dist/api/__tests__/test-utils.d.cts +3 -3
- package/dist/api/__tests__/test-utils.d.ts +3 -3
- package/dist/api/__tests__/test-utils.js +6 -6
- package/dist/api/client.cjs +4 -4
- package/dist/api/client.d.cts +1 -0
- package/dist/api/client.d.ts +1 -0
- package/dist/api/client.js +3 -3
- package/dist/api/gen/index.cjs +3 -103
- package/dist/api/gen/index.d.cts +2 -2
- package/dist/api/gen/index.d.ts +2 -2
- package/dist/api/gen/index.js +6 -106
- package/dist/api/gen/sdk.gen.cjs +2 -102
- package/dist/api/gen/sdk.gen.d.cts +22 -370
- package/dist/api/gen/sdk.gen.d.ts +22 -370
- package/dist/api/gen/sdk.gen.js +5 -105
- package/dist/api/gen/types.gen.d.cts +2558 -5712
- package/dist/api/gen/types.gen.d.ts +2558 -5712
- package/dist/api/index.cjs +4 -4
- package/dist/api/index.js +3 -3
- package/dist/api/types.d.cts +12 -12
- package/dist/api/types.d.ts +12 -12
- package/dist/chains/chains.cjs +4 -4
- package/dist/chains/chains.js +3 -3
- package/dist/{chunk-6FG5QXII.cjs → chunk-2YGFMFQH.cjs} +20 -11
- package/dist/{chunk-47R3UV3J.cjs → chunk-357M7AYZ.cjs} +11 -6
- package/dist/chunk-4MEGQR3I.js +40 -0
- package/dist/chunk-5IC7UWND.cjs +1 -0
- package/dist/{chunk-ZAX22GSI.cjs → chunk-5NWGYER3.cjs} +18 -18
- package/dist/{chunk-RYQI3RXL.cjs → chunk-67C2QSRT.cjs} +18 -12
- package/dist/{chunk-CMBFV325.js → chunk-772Z6PBD.js} +3 -3
- package/dist/{chunk-JREZWZ2S.cjs → chunk-BJQHHI7K.cjs} +3 -3
- package/dist/chunk-BR4UVMIC.js +332 -0
- package/dist/chunk-BUBSPQ7U.cjs +332 -0
- package/dist/{chunk-FHMKNG62.js → chunk-CUE4X7Y4.js} +24 -8
- package/dist/chunk-DDNG224J.cjs +45 -0
- package/dist/{chunk-FICVKSXZ.js → chunk-FBUGIHIP.js} +2 -2
- package/dist/{chunk-HXJ3YPAN.js → chunk-GIHJEXL7.js} +13 -4
- package/dist/chunk-GJT2JD3E.js +45 -0
- package/dist/chunk-H6WV5NRT.js +10 -0
- package/dist/chunk-HWTWDQYT.cjs +42 -0
- package/dist/{chunk-66UY53KP.cjs → chunk-I3KIMQEV.cjs} +80 -37
- package/dist/chunk-IGRPHTXZ.cjs +1 -0
- package/dist/{chunk-IDKGJO2G.cjs → chunk-IL6J7SYU.cjs} +21 -11
- package/dist/chunk-IXDC5JR2.js +316 -0
- package/dist/{chunk-7TT3VUDF.cjs → chunk-IZQHJM2P.cjs} +6 -6
- package/dist/chunk-J65ILI3Y.cjs +44 -0
- package/dist/chunk-JD77GNRZ.cjs +40 -0
- package/dist/{chunk-PUO4QNXH.js → chunk-JO7QKDU4.js} +2 -2
- package/dist/{chunk-KQH5ZXJ4.js → chunk-JP6227LZ.js} +61 -18
- package/dist/{chunk-POG76HDD.cjs → chunk-JUS5BKF2.cjs} +64 -48
- package/dist/chunk-K6LSGLG6.js +42 -0
- package/dist/chunk-KEDMRERX.cjs +29 -0
- package/dist/{chunk-W7K5E64Q.js → chunk-KSN7G2DH.js} +8 -2
- package/dist/chunk-L52GDMSH.js +0 -0
- package/dist/{chunk-U3NV7UY7.js → chunk-LDVEJ2XZ.js} +1 -1
- package/dist/{chunk-PM7BGATN.cjs → chunk-LIUDLEBE.cjs} +34 -25
- package/dist/{chunk-6UMJYMAY.js → chunk-LQWOPRRW.js} +2 -2
- package/dist/chunk-M6E6A543.cjs +316 -0
- package/dist/chunk-MNHK6EQK.cjs +57 -0
- package/dist/{chunk-2WBSPOWU.js → chunk-NBBOYFQW.js} +1 -1
- package/dist/{chunk-A6E67ZZP.js → chunk-OBKOVQQJ.js} +14 -5
- package/dist/{chunk-TYQ4YIP7.js → chunk-PC3YMFJM.js} +1 -1
- package/dist/chunk-Q52MMQSC.js +57 -0
- package/dist/chunk-QM3BB4E2.js +0 -0
- package/dist/{chunk-R6DH4V7S.cjs → chunk-QMSFEJPD.cjs} +7 -7
- package/dist/{chunk-T2XUADHW.js → chunk-QPVKMB34.js} +10 -5
- package/dist/chunk-RUQYXEEG.cjs +10 -0
- package/dist/{chunk-WHTECI7J.cjs → chunk-RZYHYTWY.cjs} +6 -6
- package/dist/{chunk-ABMZ3ZVN.js → chunk-SIP7NNGL.js} +1 -1
- package/dist/{chunk-WDZY4PP4.cjs → chunk-UBWFRFQ6.cjs} +3 -3
- package/dist/{chunk-R4AW5ADG.cjs → chunk-WATHSVAQ.cjs} +1 -1
- package/dist/chunk-WQZLYIIG.js +44 -0
- package/dist/chunk-WXIYTJDM.js +29 -0
- package/dist/{chunk-WWW6IGZ7.js → chunk-Y2DLCE7H.js} +14 -4
- package/dist/{chunk-MRZXYVQO.cjs → chunk-ZXQHWKZN.cjs} +6 -6
- package/dist/index.cjs +26 -16
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +25 -15
- package/dist/logger/index.cjs +3 -3
- package/dist/logger/index.js +2 -2
- package/dist/logger/init.cjs +3 -3
- package/dist/logger/init.js +2 -2
- package/dist/sdk.cjs +23 -13
- package/dist/sdk.js +22 -12
- package/dist/signers/index.cjs +18 -8
- package/dist/signers/index.js +17 -7
- package/dist/signers/non-custodial/index.cjs +7 -7
- package/dist/signers/non-custodial/index.js +8 -8
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +5 -5
- package/dist/signers/non-custodial/ncs-evm-signer.js +4 -4
- package/dist/signers/non-custodial/ncs-signer.cjs +4 -4
- package/dist/signers/non-custodial/ncs-signer.js +3 -3
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +5 -5
- package/dist/signers/non-custodial/ncs-solana-signer.js +4 -4
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +5 -5
- package/dist/signers/non-custodial/ncs-stellar-signer.js +4 -4
- package/dist/signers/server/assemble-server-signer.cjs +15 -0
- package/dist/signers/server/assemble-server-signer.d.cts +11 -0
- package/dist/signers/server/assemble-server-signer.d.ts +11 -0
- package/dist/signers/server/assemble-server-signer.js +15 -0
- package/dist/signers/server/evm-server-signer.cjs +7 -0
- package/dist/signers/server/evm-server-signer.d.cts +25 -0
- package/dist/signers/server/evm-server-signer.d.ts +25 -0
- package/dist/signers/server/evm-server-signer.js +7 -0
- package/dist/signers/server/helpers/derive-server-signer.cjs +12 -0
- package/dist/signers/server/helpers/derive-server-signer.d.cts +15 -0
- package/dist/signers/server/helpers/derive-server-signer.d.ts +15 -0
- package/dist/signers/server/helpers/derive-server-signer.js +12 -0
- package/dist/signers/server/helpers/get-chain-type.cjs +7 -0
- package/dist/signers/server/helpers/get-chain-type.d.cts +7 -0
- package/dist/signers/server/helpers/get-chain-type.d.ts +7 -0
- package/dist/signers/server/helpers/get-chain-type.js +7 -0
- package/dist/signers/server/helpers/index.cjs +16 -0
- package/dist/signers/server/helpers/index.d.cts +9 -0
- package/dist/signers/server/helpers/index.d.ts +9 -0
- package/dist/signers/server/helpers/index.js +16 -0
- package/dist/signers/server/index.cjs +30 -0
- package/dist/signers/server/index.d.cts +12 -0
- package/dist/signers/server/index.d.ts +12 -0
- package/dist/signers/server/index.js +30 -0
- package/dist/signers/server/solana-server-signer.cjs +7 -0
- package/dist/signers/server/solana-server-signer.d.cts +25 -0
- package/dist/signers/server/solana-server-signer.d.ts +25 -0
- package/dist/signers/server/solana-server-signer.js +7 -0
- package/dist/signers/server/stellar-server-signer.cjs +8 -0
- package/dist/signers/server/stellar-server-signer.d.cts +25 -0
- package/dist/signers/server/stellar-server-signer.d.ts +25 -0
- package/dist/signers/server/stellar-server-signer.js +8 -0
- package/dist/signers/types.d.cts +15 -3
- package/dist/signers/types.d.ts +15 -3
- package/dist/utils/constants.cjs +2 -2
- package/dist/utils/constants.js +1 -1
- package/dist/utils/server-key-derivation.cjs +9 -0
- package/dist/utils/server-key-derivation.d.cts +20 -0
- package/dist/utils/server-key-derivation.d.ts +20 -0
- package/dist/utils/server-key-derivation.js +9 -0
- package/dist/utils/stellar.cjs +11 -0
- package/dist/utils/stellar.d.cts +18 -0
- package/dist/utils/stellar.d.ts +18 -0
- package/dist/utils/stellar.js +11 -0
- package/dist/wallets/__tests__/test-helpers.cjs +19 -9
- package/dist/wallets/__tests__/test-helpers.js +18 -8
- package/dist/wallets/evm.cjs +20 -10
- package/dist/wallets/evm.js +19 -9
- package/dist/wallets/solana.cjs +20 -10
- package/dist/wallets/solana.js +19 -9
- package/dist/wallets/stellar.cjs +20 -10
- package/dist/wallets/stellar.js +19 -9
- package/dist/wallets/types.d.cts +7 -4
- package/dist/wallets/types.d.ts +7 -4
- package/dist/wallets/wallet-factory.cjs +21 -11
- package/dist/wallets/wallet-factory.js +20 -10
- package/dist/wallets/wallet.cjs +19 -9
- package/dist/wallets/wallet.d.cts +2 -2
- package/dist/wallets/wallet.d.ts +2 -2
- package/dist/wallets/wallet.js +18 -8
- package/package.json +3 -3
- package/dist/chunk-BMMZIPXT.js +0 -778
- package/dist/chunk-COR3CNRW.cjs +0 -778
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-5IC7UWND.cjs');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkKEDMRERXcjs = require('../../chunk-KEDMRERX.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkJ65ILI3Ycjs = require('../../chunk-J65ILI3Y.cjs');
|
|
8
|
+
require('../../chunk-IGRPHTXZ.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkJD77GNRZcjs = require('../../chunk-JD77GNRZ.cjs');
|
|
13
|
+
require('../../chunk-RUQYXEEG.cjs');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunkDDNG224Jcjs = require('../../chunk-DDNG224J.cjs');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
var _chunkHWTWDQYTcjs = require('../../chunk-HWTWDQYT.cjs');
|
|
20
|
+
require('../../chunk-MNHK6EQK.cjs');
|
|
21
|
+
require('../../chunk-M6E6A543.cjs');
|
|
22
|
+
require('../../chunk-UO2J2ZB2.cjs');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
exports.EVMServerSigner = _chunkDDNG224Jcjs.EVMServerSigner; exports.SolanaServerSigner = _chunkHWTWDQYTcjs.SolanaServerSigner; exports.StellarServerSigner = _chunkJ65ILI3Ycjs.StellarServerSigner; exports.assembleServerSigner = _chunkKEDMRERXcjs.assembleServerSigner; exports.deriveServerSignerAddress = _chunkJD77GNRZcjs.deriveServerSignerAddress; exports.deriveServerSignerDetails = _chunkJD77GNRZcjs.deriveServerSignerDetails;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { assembleServerSigner } from './assemble-server-signer.cjs';
|
|
2
|
+
export { EVMServerSigner } from './evm-server-signer.cjs';
|
|
3
|
+
export { SolanaServerSigner } from './solana-server-signer.cjs';
|
|
4
|
+
export { StellarServerSigner } from './stellar-server-signer.cjs';
|
|
5
|
+
export { deriveServerSignerAddress, deriveServerSignerDetails } from './helpers/derive-server-signer.cjs';
|
|
6
|
+
import '../../chains/chains.cjs';
|
|
7
|
+
import '@crossmint/common-sdk-base';
|
|
8
|
+
import 'viem';
|
|
9
|
+
import '../types.cjs';
|
|
10
|
+
import 'ox';
|
|
11
|
+
import '@crossmint/client-sdk-window';
|
|
12
|
+
import '@crossmint/client-signers';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { assembleServerSigner } from './assemble-server-signer.js';
|
|
2
|
+
export { EVMServerSigner } from './evm-server-signer.js';
|
|
3
|
+
export { SolanaServerSigner } from './solana-server-signer.js';
|
|
4
|
+
export { StellarServerSigner } from './stellar-server-signer.js';
|
|
5
|
+
export { deriveServerSignerAddress, deriveServerSignerDetails } from './helpers/derive-server-signer.js';
|
|
6
|
+
import '../../chains/chains.js';
|
|
7
|
+
import '@crossmint/common-sdk-base';
|
|
8
|
+
import 'viem';
|
|
9
|
+
import '../types.js';
|
|
10
|
+
import 'ox';
|
|
11
|
+
import '@crossmint/client-sdk-window';
|
|
12
|
+
import '@crossmint/client-signers';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "../../chunk-L52GDMSH.js";
|
|
2
|
+
import {
|
|
3
|
+
assembleServerSigner
|
|
4
|
+
} from "../../chunk-WXIYTJDM.js";
|
|
5
|
+
import {
|
|
6
|
+
StellarServerSigner
|
|
7
|
+
} from "../../chunk-WQZLYIIG.js";
|
|
8
|
+
import "../../chunk-QM3BB4E2.js";
|
|
9
|
+
import {
|
|
10
|
+
deriveServerSignerAddress,
|
|
11
|
+
deriveServerSignerDetails
|
|
12
|
+
} from "../../chunk-4MEGQR3I.js";
|
|
13
|
+
import "../../chunk-H6WV5NRT.js";
|
|
14
|
+
import {
|
|
15
|
+
EVMServerSigner
|
|
16
|
+
} from "../../chunk-GJT2JD3E.js";
|
|
17
|
+
import {
|
|
18
|
+
SolanaServerSigner
|
|
19
|
+
} from "../../chunk-K6LSGLG6.js";
|
|
20
|
+
import "../../chunk-Q52MMQSC.js";
|
|
21
|
+
import "../../chunk-IXDC5JR2.js";
|
|
22
|
+
import "../../chunk-ASE2FXWP.js";
|
|
23
|
+
export {
|
|
24
|
+
EVMServerSigner,
|
|
25
|
+
SolanaServerSigner,
|
|
26
|
+
StellarServerSigner,
|
|
27
|
+
assembleServerSigner,
|
|
28
|
+
deriveServerSignerAddress,
|
|
29
|
+
deriveServerSignerDetails
|
|
30
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Signer, ServerInternalSignerConfig } from '../types.cjs';
|
|
2
|
+
import 'ox';
|
|
3
|
+
import '@crossmint/client-sdk-window';
|
|
4
|
+
import '@crossmint/client-signers';
|
|
5
|
+
import '@crossmint/common-sdk-base';
|
|
6
|
+
import '../../chains/chains.cjs';
|
|
7
|
+
import 'viem';
|
|
8
|
+
|
|
9
|
+
declare class SolanaServerSigner implements Signer<"server"> {
|
|
10
|
+
type: "server";
|
|
11
|
+
private _address;
|
|
12
|
+
private _locator;
|
|
13
|
+
private keypair;
|
|
14
|
+
constructor(config: ServerInternalSignerConfig);
|
|
15
|
+
address(): string;
|
|
16
|
+
locator(): string;
|
|
17
|
+
signMessage(message: string): Promise<{
|
|
18
|
+
signature: string;
|
|
19
|
+
}>;
|
|
20
|
+
signTransaction(transaction: string): Promise<{
|
|
21
|
+
signature: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { SolanaServerSigner };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Signer, ServerInternalSignerConfig } from '../types.js';
|
|
2
|
+
import 'ox';
|
|
3
|
+
import '@crossmint/client-sdk-window';
|
|
4
|
+
import '@crossmint/client-signers';
|
|
5
|
+
import '@crossmint/common-sdk-base';
|
|
6
|
+
import '../../chains/chains.js';
|
|
7
|
+
import 'viem';
|
|
8
|
+
|
|
9
|
+
declare class SolanaServerSigner implements Signer<"server"> {
|
|
10
|
+
type: "server";
|
|
11
|
+
private _address;
|
|
12
|
+
private _locator;
|
|
13
|
+
private keypair;
|
|
14
|
+
constructor(config: ServerInternalSignerConfig);
|
|
15
|
+
address(): string;
|
|
16
|
+
locator(): string;
|
|
17
|
+
signMessage(message: string): Promise<{
|
|
18
|
+
signature: string;
|
|
19
|
+
}>;
|
|
20
|
+
signTransaction(transaction: string): Promise<{
|
|
21
|
+
signature: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { SolanaServerSigner };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkJ65ILI3Ycjs = require('../../chunk-J65ILI3Y.cjs');
|
|
4
|
+
require('../../chunk-M6E6A543.cjs');
|
|
5
|
+
require('../../chunk-UO2J2ZB2.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.StellarServerSigner = _chunkJ65ILI3Ycjs.StellarServerSigner;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Signer, ServerInternalSignerConfig } from '../types.cjs';
|
|
2
|
+
import 'ox';
|
|
3
|
+
import '@crossmint/client-sdk-window';
|
|
4
|
+
import '@crossmint/client-signers';
|
|
5
|
+
import '@crossmint/common-sdk-base';
|
|
6
|
+
import '../../chains/chains.cjs';
|
|
7
|
+
import 'viem';
|
|
8
|
+
|
|
9
|
+
declare class StellarServerSigner implements Signer<"server"> {
|
|
10
|
+
type: "server";
|
|
11
|
+
private _address;
|
|
12
|
+
private _locator;
|
|
13
|
+
private secretKey;
|
|
14
|
+
constructor(config: ServerInternalSignerConfig);
|
|
15
|
+
address(): string;
|
|
16
|
+
locator(): string;
|
|
17
|
+
signMessage(message: string): Promise<{
|
|
18
|
+
signature: string;
|
|
19
|
+
}>;
|
|
20
|
+
signTransaction(transaction: string): Promise<{
|
|
21
|
+
signature: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { StellarServerSigner };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Signer, ServerInternalSignerConfig } from '../types.js';
|
|
2
|
+
import 'ox';
|
|
3
|
+
import '@crossmint/client-sdk-window';
|
|
4
|
+
import '@crossmint/client-signers';
|
|
5
|
+
import '@crossmint/common-sdk-base';
|
|
6
|
+
import '../../chains/chains.js';
|
|
7
|
+
import 'viem';
|
|
8
|
+
|
|
9
|
+
declare class StellarServerSigner implements Signer<"server"> {
|
|
10
|
+
type: "server";
|
|
11
|
+
private _address;
|
|
12
|
+
private _locator;
|
|
13
|
+
private secretKey;
|
|
14
|
+
constructor(config: ServerInternalSignerConfig);
|
|
15
|
+
address(): string;
|
|
16
|
+
locator(): string;
|
|
17
|
+
signMessage(message: string): Promise<{
|
|
18
|
+
signature: string;
|
|
19
|
+
}>;
|
|
20
|
+
signTransaction(transaction: string): Promise<{
|
|
21
|
+
signature: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { StellarServerSigner };
|
package/dist/signers/types.d.cts
CHANGED
|
@@ -24,7 +24,11 @@ type ExternalWalletSignerConfigForChain<C extends Chain> = C extends SolanaChain
|
|
|
24
24
|
type ApiKeySignerConfig = {
|
|
25
25
|
type: "api-key";
|
|
26
26
|
};
|
|
27
|
-
type
|
|
27
|
+
type ServerSignerConfig = {
|
|
28
|
+
type: "server";
|
|
29
|
+
secret: string;
|
|
30
|
+
};
|
|
31
|
+
type BaseSignerConfig<C extends Chain> = ExternalWalletSignerConfigForChain<C> | ApiKeySignerConfig | ServerSignerConfig;
|
|
28
32
|
type PasskeySignerConfig = {
|
|
29
33
|
type: "passkey";
|
|
30
34
|
name?: string;
|
|
@@ -56,7 +60,14 @@ type ApiKeyInternalSignerConfig = ApiKeySignerConfig & {
|
|
|
56
60
|
type ExternalWalletInternalSignerConfig<C extends Chain> = ExternalWalletSignerConfigForChain<C> & {
|
|
57
61
|
locator: string;
|
|
58
62
|
};
|
|
59
|
-
type
|
|
63
|
+
type ServerInternalSignerConfig = {
|
|
64
|
+
type: "server";
|
|
65
|
+
/** The derived chain-specific private key bytes */
|
|
66
|
+
derivedKeyBytes: Uint8Array;
|
|
67
|
+
locator: string;
|
|
68
|
+
address: string;
|
|
69
|
+
};
|
|
70
|
+
type InternalSignerConfig<C extends Chain> = EmailInternalSignerConfig | PhoneInternalSignerConfig | PasskeyInternalSignerConfig | ApiKeyInternalSignerConfig | ExternalWalletInternalSignerConfig<C> | ServerInternalSignerConfig;
|
|
60
71
|
type BaseSignResult = {
|
|
61
72
|
signature: string;
|
|
62
73
|
};
|
|
@@ -73,6 +84,7 @@ type SignResultMap = {
|
|
|
73
84
|
phone: BaseSignResult;
|
|
74
85
|
"api-key": BaseSignResult;
|
|
75
86
|
"external-wallet": BaseSignResult;
|
|
87
|
+
server: BaseSignResult;
|
|
76
88
|
passkey: PasskeySignResult;
|
|
77
89
|
};
|
|
78
90
|
interface Signer<T extends keyof SignResultMap = keyof SignResultMap> {
|
|
@@ -88,4 +100,4 @@ interface ExportableSigner extends Signer {
|
|
|
88
100
|
declare function isExportableSigner(signer: Signer): signer is ExportableSigner;
|
|
89
101
|
type ExportSignerTEEConnection = HandshakeParent<typeof exportSignerOutboundEvents, typeof exportSignerInboundEvents>;
|
|
90
102
|
|
|
91
|
-
export { type ApiKeyInternalSignerConfig, type ApiKeySignerConfig, AuthRejectedError, type BaseSignResult, type BaseSignerConfig, type EmailInternalSignerConfig, type EmailSignerConfig, type ExportSignerTEEConnection, type ExportableSigner, type ExternalWalletInternalSignerConfig, type ExternalWalletSignerConfigForChain, type InternalSignerConfig, type NonCustodialSignerType, type PasskeyInternalSignerConfig, type PasskeySignResult, type PasskeySignerConfig, type PhoneInternalSignerConfig, type PhoneSignerConfig, type Signer, type SignerConfigForChain, isExportableSigner };
|
|
103
|
+
export { type ApiKeyInternalSignerConfig, type ApiKeySignerConfig, AuthRejectedError, type BaseSignResult, type BaseSignerConfig, type EmailInternalSignerConfig, type EmailSignerConfig, type ExportSignerTEEConnection, type ExportableSigner, type ExternalWalletInternalSignerConfig, type ExternalWalletSignerConfigForChain, type InternalSignerConfig, type NonCustodialSignerType, type PasskeyInternalSignerConfig, type PasskeySignResult, type PasskeySignerConfig, type PhoneInternalSignerConfig, type PhoneSignerConfig, type ServerInternalSignerConfig, type ServerSignerConfig, type Signer, type SignerConfigForChain, isExportableSigner };
|
package/dist/signers/types.d.ts
CHANGED
|
@@ -24,7 +24,11 @@ type ExternalWalletSignerConfigForChain<C extends Chain> = C extends SolanaChain
|
|
|
24
24
|
type ApiKeySignerConfig = {
|
|
25
25
|
type: "api-key";
|
|
26
26
|
};
|
|
27
|
-
type
|
|
27
|
+
type ServerSignerConfig = {
|
|
28
|
+
type: "server";
|
|
29
|
+
secret: string;
|
|
30
|
+
};
|
|
31
|
+
type BaseSignerConfig<C extends Chain> = ExternalWalletSignerConfigForChain<C> | ApiKeySignerConfig | ServerSignerConfig;
|
|
28
32
|
type PasskeySignerConfig = {
|
|
29
33
|
type: "passkey";
|
|
30
34
|
name?: string;
|
|
@@ -56,7 +60,14 @@ type ApiKeyInternalSignerConfig = ApiKeySignerConfig & {
|
|
|
56
60
|
type ExternalWalletInternalSignerConfig<C extends Chain> = ExternalWalletSignerConfigForChain<C> & {
|
|
57
61
|
locator: string;
|
|
58
62
|
};
|
|
59
|
-
type
|
|
63
|
+
type ServerInternalSignerConfig = {
|
|
64
|
+
type: "server";
|
|
65
|
+
/** The derived chain-specific private key bytes */
|
|
66
|
+
derivedKeyBytes: Uint8Array;
|
|
67
|
+
locator: string;
|
|
68
|
+
address: string;
|
|
69
|
+
};
|
|
70
|
+
type InternalSignerConfig<C extends Chain> = EmailInternalSignerConfig | PhoneInternalSignerConfig | PasskeyInternalSignerConfig | ApiKeyInternalSignerConfig | ExternalWalletInternalSignerConfig<C> | ServerInternalSignerConfig;
|
|
60
71
|
type BaseSignResult = {
|
|
61
72
|
signature: string;
|
|
62
73
|
};
|
|
@@ -73,6 +84,7 @@ type SignResultMap = {
|
|
|
73
84
|
phone: BaseSignResult;
|
|
74
85
|
"api-key": BaseSignResult;
|
|
75
86
|
"external-wallet": BaseSignResult;
|
|
87
|
+
server: BaseSignResult;
|
|
76
88
|
passkey: PasskeySignResult;
|
|
77
89
|
};
|
|
78
90
|
interface Signer<T extends keyof SignResultMap = keyof SignResultMap> {
|
|
@@ -88,4 +100,4 @@ interface ExportableSigner extends Signer {
|
|
|
88
100
|
declare function isExportableSigner(signer: Signer): signer is ExportableSigner;
|
|
89
101
|
type ExportSignerTEEConnection = HandshakeParent<typeof exportSignerOutboundEvents, typeof exportSignerInboundEvents>;
|
|
90
102
|
|
|
91
|
-
export { type ApiKeyInternalSignerConfig, type ApiKeySignerConfig, AuthRejectedError, type BaseSignResult, type BaseSignerConfig, type EmailInternalSignerConfig, type EmailSignerConfig, type ExportSignerTEEConnection, type ExportableSigner, type ExternalWalletInternalSignerConfig, type ExternalWalletSignerConfigForChain, type InternalSignerConfig, type NonCustodialSignerType, type PasskeyInternalSignerConfig, type PasskeySignResult, type PasskeySignerConfig, type PhoneInternalSignerConfig, type PhoneSignerConfig, type Signer, type SignerConfigForChain, isExportableSigner };
|
|
103
|
+
export { type ApiKeyInternalSignerConfig, type ApiKeySignerConfig, AuthRejectedError, type BaseSignResult, type BaseSignerConfig, type EmailInternalSignerConfig, type EmailSignerConfig, type ExportSignerTEEConnection, type ExportableSigner, type ExternalWalletInternalSignerConfig, type ExternalWalletSignerConfigForChain, type InternalSignerConfig, type NonCustodialSignerType, type PasskeyInternalSignerConfig, type PasskeySignResult, type PasskeySignerConfig, type PhoneInternalSignerConfig, type PhoneSignerConfig, type ServerInternalSignerConfig, type ServerSignerConfig, type Signer, type SignerConfigForChain, isExportableSigner };
|
package/dist/utils/constants.cjs
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkWATHSVAQcjs = require('../chunk-WATHSVAQ.cjs');
|
|
7
7
|
require('../chunk-UO2J2ZB2.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.SDK_NAME =
|
|
13
|
+
exports.SDK_NAME = _chunkWATHSVAQcjs.SDK_NAME; exports.SDK_VERSION = _chunkWATHSVAQcjs.SDK_VERSION; exports.STATUS_POLLING_INTERVAL_MS = _chunkWATHSVAQcjs.STATUS_POLLING_INTERVAL_MS; exports.WALLETS_SERVICE = _chunkWATHSVAQcjs.WALLETS_SERVICE;
|
package/dist/utils/constants.js
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkMNHK6EQKcjs = require('../chunk-MNHK6EQK.cjs');
|
|
5
|
+
require('../chunk-UO2J2ZB2.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.deriveAlias = _chunkMNHK6EQKcjs.deriveAlias; exports.deriveKeyBytes = _chunkMNHK6EQKcjs.deriveKeyBytes;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derives a chain-specific private key from a master secret using HKDF-SHA256.
|
|
3
|
+
*
|
|
4
|
+
* The derivation is deterministic: same secret + same project + same environment + same chain
|
|
5
|
+
* always produces the same private key.
|
|
6
|
+
*
|
|
7
|
+
* @param secret - Master secret (with or without xmsk1_ prefix), 64-char hex
|
|
8
|
+
* @param projectId - Project ID from the API key
|
|
9
|
+
* @param environment - Environment from the API key (staging, production)
|
|
10
|
+
* @param chain - Chain identifier (e.g., "base-sepolia", "ethereum")
|
|
11
|
+
* @returns Raw 32-byte derived key
|
|
12
|
+
*/
|
|
13
|
+
declare function deriveKeyBytes(secret: string, projectId: string, environment: string, chain: string): Uint8Array;
|
|
14
|
+
/**
|
|
15
|
+
* Derives a deterministic wallet alias from a master secret.
|
|
16
|
+
* Uses the same derivation path so the alias is always recoverable.
|
|
17
|
+
*/
|
|
18
|
+
declare function deriveAlias(secret: string, projectId: string, environment: string, chain: string): string;
|
|
19
|
+
|
|
20
|
+
export { deriveAlias, deriveKeyBytes };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derives a chain-specific private key from a master secret using HKDF-SHA256.
|
|
3
|
+
*
|
|
4
|
+
* The derivation is deterministic: same secret + same project + same environment + same chain
|
|
5
|
+
* always produces the same private key.
|
|
6
|
+
*
|
|
7
|
+
* @param secret - Master secret (with or without xmsk1_ prefix), 64-char hex
|
|
8
|
+
* @param projectId - Project ID from the API key
|
|
9
|
+
* @param environment - Environment from the API key (staging, production)
|
|
10
|
+
* @param chain - Chain identifier (e.g., "base-sepolia", "ethereum")
|
|
11
|
+
* @returns Raw 32-byte derived key
|
|
12
|
+
*/
|
|
13
|
+
declare function deriveKeyBytes(secret: string, projectId: string, environment: string, chain: string): Uint8Array;
|
|
14
|
+
/**
|
|
15
|
+
* Derives a deterministic wallet alias from a master secret.
|
|
16
|
+
* Uses the same derivation path so the alias is always recoverable.
|
|
17
|
+
*/
|
|
18
|
+
declare function deriveAlias(secret: string, projectId: string, environment: string, chain: string): string;
|
|
19
|
+
|
|
20
|
+
export { deriveAlias, deriveKeyBytes };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkM6E6A543cjs = require('../chunk-M6E6A543.cjs');
|
|
6
|
+
require('../chunk-UO2J2ZB2.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.ed25519KeypairFromSeed = _chunkM6E6A543cjs.ed25519KeypairFromSeed; exports.ed25519Sign = _chunkM6E6A543cjs.ed25519Sign; exports.encodeStellarPublicKey = _chunkM6E6A543cjs.encodeStellarPublicKey;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encode a 32-byte ed25519 public key as a Stellar StrKey address (G... format).
|
|
3
|
+
*/
|
|
4
|
+
declare function encodeStellarPublicKey(publicKeyBytes: Uint8Array): string;
|
|
5
|
+
/**
|
|
6
|
+
* Derive an ed25519 keypair from a 32-byte seed and return the public key bytes
|
|
7
|
+
* and a signing function compatible with the Stellar server signer.
|
|
8
|
+
*/
|
|
9
|
+
declare function ed25519KeypairFromSeed(seed: Uint8Array): {
|
|
10
|
+
publicKey: Uint8Array;
|
|
11
|
+
secretKey: Uint8Array;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Sign a message using ed25519 (detached signature).
|
|
15
|
+
*/
|
|
16
|
+
declare function ed25519Sign(message: Uint8Array, secretKey: Uint8Array): Uint8Array;
|
|
17
|
+
|
|
18
|
+
export { ed25519KeypairFromSeed, ed25519Sign, encodeStellarPublicKey };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encode a 32-byte ed25519 public key as a Stellar StrKey address (G... format).
|
|
3
|
+
*/
|
|
4
|
+
declare function encodeStellarPublicKey(publicKeyBytes: Uint8Array): string;
|
|
5
|
+
/**
|
|
6
|
+
* Derive an ed25519 keypair from a 32-byte seed and return the public key bytes
|
|
7
|
+
* and a signing function compatible with the Stellar server signer.
|
|
8
|
+
*/
|
|
9
|
+
declare function ed25519KeypairFromSeed(seed: Uint8Array): {
|
|
10
|
+
publicKey: Uint8Array;
|
|
11
|
+
secretKey: Uint8Array;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Sign a message using ed25519 (detached signature).
|
|
15
|
+
*/
|
|
16
|
+
declare function ed25519Sign(message: Uint8Array, secretKey: Uint8Array): Uint8Array;
|
|
17
|
+
|
|
18
|
+
export { ed25519KeypairFromSeed, ed25519Sign, encodeStellarPublicKey };
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJUS5BKF2cjs = require('../../chunk-JUS5BKF2.cjs');
|
|
4
|
+
require('../../chunk-5IC7UWND.cjs');
|
|
5
|
+
require('../../chunk-KEDMRERX.cjs');
|
|
6
|
+
require('../../chunk-J65ILI3Y.cjs');
|
|
7
|
+
require('../../chunk-IGRPHTXZ.cjs');
|
|
8
|
+
require('../../chunk-JD77GNRZ.cjs');
|
|
9
|
+
require('../../chunk-RUQYXEEG.cjs');
|
|
10
|
+
require('../../chunk-DDNG224J.cjs');
|
|
11
|
+
require('../../chunk-HWTWDQYT.cjs');
|
|
4
12
|
require('../../chunk-PO6S7UR3.cjs');
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
8
|
-
require('../../chunk-
|
|
13
|
+
require('../../chunk-RZYHYTWY.cjs');
|
|
14
|
+
require('../../chunk-IZQHJM2P.cjs');
|
|
15
|
+
require('../../chunk-ZXQHWKZN.cjs');
|
|
16
|
+
require('../../chunk-5NWGYER3.cjs');
|
|
9
17
|
require('../../chunk-4GFSUI2I.cjs');
|
|
18
|
+
require('../../chunk-MNHK6EQK.cjs');
|
|
19
|
+
require('../../chunk-M6E6A543.cjs');
|
|
10
20
|
require('../../chunk-RHR6P2KP.cjs');
|
|
11
|
-
require('../../chunk-
|
|
21
|
+
require('../../chunk-UBWFRFQ6.cjs');
|
|
12
22
|
require('../../chunk-NIBKCMQ2.cjs');
|
|
13
23
|
require('../../chunk-55V4VMTX.cjs');
|
|
14
24
|
require('../../chunk-7USEVMTW.cjs');
|
|
@@ -16,8 +26,8 @@ require('../../chunk-F7L2TZ3I.cjs');
|
|
|
16
26
|
require('../../chunk-HTSQPZHW.cjs');
|
|
17
27
|
require('../../chunk-XC2V34TS.cjs');
|
|
18
28
|
require('../../chunk-CCIGWTAO.cjs');
|
|
19
|
-
require('../../chunk-
|
|
20
|
-
require('../../chunk-
|
|
29
|
+
require('../../chunk-BJQHHI7K.cjs');
|
|
30
|
+
require('../../chunk-WATHSVAQ.cjs');
|
|
21
31
|
|
|
22
32
|
|
|
23
33
|
var _chunkUO2J2ZB2cjs = require('../../chunk-UO2J2ZB2.cjs');
|
|
@@ -59,7 +69,7 @@ var createMockSigner = (type = "api-key", chain = "base-sepolia") => {
|
|
|
59
69
|
};
|
|
60
70
|
var createMockWallet = (chain, mockApiClient, signerType = "api-key") => {
|
|
61
71
|
const signer = createMockSigner(signerType, chain);
|
|
62
|
-
return new (0,
|
|
72
|
+
return new (0, _chunkJUS5BKF2cjs.Wallet)(
|
|
63
73
|
{
|
|
64
74
|
chain,
|
|
65
75
|
address: getChainAddress(chain),
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Wallet
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-CUE4X7Y4.js";
|
|
4
|
+
import "../../chunk-L52GDMSH.js";
|
|
5
|
+
import "../../chunk-WXIYTJDM.js";
|
|
6
|
+
import "../../chunk-WQZLYIIG.js";
|
|
7
|
+
import "../../chunk-QM3BB4E2.js";
|
|
8
|
+
import "../../chunk-4MEGQR3I.js";
|
|
9
|
+
import "../../chunk-H6WV5NRT.js";
|
|
10
|
+
import "../../chunk-GJT2JD3E.js";
|
|
11
|
+
import "../../chunk-K6LSGLG6.js";
|
|
4
12
|
import "../../chunk-YDZRBHS3.js";
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-JO7QKDU4.js";
|
|
14
|
+
import "../../chunk-FBUGIHIP.js";
|
|
15
|
+
import "../../chunk-LQWOPRRW.js";
|
|
16
|
+
import "../../chunk-LDVEJ2XZ.js";
|
|
9
17
|
import "../../chunk-FOOISYCJ.js";
|
|
18
|
+
import "../../chunk-Q52MMQSC.js";
|
|
19
|
+
import "../../chunk-IXDC5JR2.js";
|
|
10
20
|
import "../../chunk-WJUPOCKJ.js";
|
|
11
|
-
import "../../chunk-
|
|
21
|
+
import "../../chunk-NBBOYFQW.js";
|
|
12
22
|
import "../../chunk-2T5HHKUI.js";
|
|
13
23
|
import "../../chunk-3U6UAYOV.js";
|
|
14
24
|
import "../../chunk-MMISP35W.js";
|
|
@@ -16,8 +26,8 @@ import "../../chunk-JWMQALLN.js";
|
|
|
16
26
|
import "../../chunk-ZBLW42YE.js";
|
|
17
27
|
import "../../chunk-SGINWAB6.js";
|
|
18
28
|
import "../../chunk-455NK5LB.js";
|
|
19
|
-
import "../../chunk-
|
|
20
|
-
import "../../chunk-
|
|
29
|
+
import "../../chunk-SIP7NNGL.js";
|
|
30
|
+
import "../../chunk-PC3YMFJM.js";
|
|
21
31
|
import {
|
|
22
32
|
__spreadValues
|
|
23
33
|
} from "../../chunk-ASE2FXWP.js";
|
package/dist/wallets/evm.cjs
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkLIUDLEBEcjs = require('../chunk-LIUDLEBE.cjs');
|
|
4
|
+
require('../chunk-JUS5BKF2.cjs');
|
|
5
|
+
require('../chunk-5IC7UWND.cjs');
|
|
6
|
+
require('../chunk-KEDMRERX.cjs');
|
|
7
|
+
require('../chunk-J65ILI3Y.cjs');
|
|
8
|
+
require('../chunk-IGRPHTXZ.cjs');
|
|
9
|
+
require('../chunk-JD77GNRZ.cjs');
|
|
10
|
+
require('../chunk-RUQYXEEG.cjs');
|
|
11
|
+
require('../chunk-DDNG224J.cjs');
|
|
12
|
+
require('../chunk-HWTWDQYT.cjs');
|
|
5
13
|
require('../chunk-PO6S7UR3.cjs');
|
|
6
|
-
require('../chunk-
|
|
7
|
-
require('../chunk-
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
14
|
+
require('../chunk-RZYHYTWY.cjs');
|
|
15
|
+
require('../chunk-IZQHJM2P.cjs');
|
|
16
|
+
require('../chunk-ZXQHWKZN.cjs');
|
|
17
|
+
require('../chunk-5NWGYER3.cjs');
|
|
10
18
|
require('../chunk-4GFSUI2I.cjs');
|
|
19
|
+
require('../chunk-MNHK6EQK.cjs');
|
|
20
|
+
require('../chunk-M6E6A543.cjs');
|
|
11
21
|
require('../chunk-RHR6P2KP.cjs');
|
|
12
|
-
require('../chunk-
|
|
22
|
+
require('../chunk-UBWFRFQ6.cjs');
|
|
13
23
|
require('../chunk-NIBKCMQ2.cjs');
|
|
14
24
|
require('../chunk-55V4VMTX.cjs');
|
|
15
25
|
require('../chunk-7USEVMTW.cjs');
|
|
@@ -17,9 +27,9 @@ require('../chunk-F7L2TZ3I.cjs');
|
|
|
17
27
|
require('../chunk-HTSQPZHW.cjs');
|
|
18
28
|
require('../chunk-XC2V34TS.cjs');
|
|
19
29
|
require('../chunk-CCIGWTAO.cjs');
|
|
20
|
-
require('../chunk-
|
|
21
|
-
require('../chunk-
|
|
30
|
+
require('../chunk-BJQHHI7K.cjs');
|
|
31
|
+
require('../chunk-WATHSVAQ.cjs');
|
|
22
32
|
require('../chunk-UO2J2ZB2.cjs');
|
|
23
33
|
|
|
24
34
|
|
|
25
|
-
exports.EVMWallet =
|
|
35
|
+
exports.EVMWallet = _chunkLIUDLEBEcjs.EVMWallet;
|