@turnkey/core 1.0.0-beta.2 → 1.0.0-beta.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/__clients__/core.d.ts +75 -2
- package/dist/__clients__/core.d.ts.map +1 -1
- package/dist/__clients__/core.js +637 -503
- package/dist/__clients__/core.js.map +1 -1
- package/dist/__clients__/core.mjs +640 -506
- package/dist/__clients__/core.mjs.map +1 -1
- package/dist/__generated__/sdk-client-base.d.ts +1 -1
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +156 -250
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +156 -250
- package/dist/__generated__/sdk-client-base.mjs.map +1 -1
- package/dist/__generated__/version.d.ts +1 -1
- package/dist/__generated__/version.js +1 -1
- package/dist/__generated__/version.mjs +1 -1
- package/dist/__types__/base.d.ts +1 -1
- package/dist/__wallet__/base.d.ts +11 -0
- package/dist/__wallet__/base.d.ts.map +1 -1
- package/dist/__wallet__/base.js +12 -1
- package/dist/__wallet__/base.js.map +1 -1
- package/dist/__wallet__/base.mjs +12 -1
- package/dist/__wallet__/base.mjs.map +1 -1
- package/dist/__wallet__/connector.d.ts +31 -4
- package/dist/__wallet__/connector.d.ts.map +1 -1
- package/dist/__wallet__/connector.js +35 -5
- package/dist/__wallet__/connector.js.map +1 -1
- package/dist/__wallet__/connector.mjs +35 -5
- package/dist/__wallet__/connector.mjs.map +1 -1
- package/dist/__wallet__/mobile/manager.d.ts +21 -5
- package/dist/__wallet__/mobile/manager.d.ts.map +1 -1
- package/dist/__wallet__/mobile/manager.js +28 -11
- package/dist/__wallet__/mobile/manager.js.map +1 -1
- package/dist/__wallet__/mobile/manager.mjs +28 -11
- package/dist/__wallet__/mobile/manager.mjs.map +1 -1
- package/dist/__wallet__/stamper.d.ts +73 -2
- package/dist/__wallet__/stamper.d.ts.map +1 -1
- package/dist/__wallet__/stamper.js +79 -13
- package/dist/__wallet__/stamper.js.map +1 -1
- package/dist/__wallet__/stamper.mjs +79 -13
- package/dist/__wallet__/stamper.mjs.map +1 -1
- package/dist/__wallet__/wallet-connect/base.d.ts +99 -19
- package/dist/__wallet__/wallet-connect/base.d.ts.map +1 -1
- package/dist/__wallet__/wallet-connect/base.js +172 -75
- package/dist/__wallet__/wallet-connect/base.js.map +1 -1
- package/dist/__wallet__/wallet-connect/base.mjs +172 -75
- package/dist/__wallet__/wallet-connect/base.mjs.map +1 -1
- package/dist/__wallet__/wallet-connect/client.d.ts +22 -14
- package/dist/__wallet__/wallet-connect/client.d.ts.map +1 -1
- package/dist/__wallet__/wallet-connect/client.js +22 -14
- package/dist/__wallet__/wallet-connect/client.js.map +1 -1
- package/dist/__wallet__/wallet-connect/client.mjs +22 -14
- package/dist/__wallet__/wallet-connect/client.mjs.map +1 -1
- package/dist/__wallet__/web/manager.d.ts +20 -12
- package/dist/__wallet__/web/manager.d.ts.map +1 -1
- package/dist/__wallet__/web/manager.js +29 -21
- package/dist/__wallet__/web/manager.js.map +1 -1
- package/dist/__wallet__/web/manager.mjs +29 -21
- package/dist/__wallet__/web/manager.mjs.map +1 -1
- package/dist/__wallet__/web/native/ethereum.d.ts +45 -11
- package/dist/__wallet__/web/native/ethereum.d.ts.map +1 -1
- package/dist/__wallet__/web/native/ethereum.js +58 -17
- package/dist/__wallet__/web/native/ethereum.js.map +1 -1
- package/dist/__wallet__/web/native/ethereum.mjs +58 -17
- package/dist/__wallet__/web/native/ethereum.mjs.map +1 -1
- package/dist/__wallet__/web/native/solana.d.ts +56 -3
- package/dist/__wallet__/web/native/solana.d.ts.map +1 -1
- package/dist/__wallet__/web/native/solana.js +95 -36
- package/dist/__wallet__/web/native/solana.js.map +1 -1
- package/dist/__wallet__/web/native/solana.mjs +95 -36
- package/dist/__wallet__/web/native/solana.mjs.map +1 -1
- package/dist/utils.d.ts +24 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +54 -0
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs +54 -1
- package/dist/utils.mjs.map +1 -1
- package/package.json +7 -7
|
@@ -8,21 +8,39 @@ const SIGNATURE_SCHEME_TK_API_SECP256K1_EIP191 = "SIGNATURE_SCHEME_TK_API_SECP25
|
|
|
8
8
|
const SIGNATURE_SCHEME_TK_API_ED25519 = "SIGNATURE_SCHEME_TK_API_ED25519";
|
|
9
9
|
const STAMP_HEADER_NAME = "X-Stamp";
|
|
10
10
|
class CrossPlatformWalletStamper {
|
|
11
|
+
/**
|
|
12
|
+
* Constructs a CrossPlatformWalletStamper.
|
|
13
|
+
*
|
|
14
|
+
* - Validates that at least one wallet interface is provided.
|
|
15
|
+
* - For each wallet interface, creates an internal `WalletStamper` bound to it.
|
|
16
|
+
* - Ensures the stamper instance is always initialized in a usable state.
|
|
17
|
+
*
|
|
18
|
+
* @param wallets - A partial mapping of wallet interfaces by type.
|
|
19
|
+
* @throws {Error} If no wallet interfaces are provided.
|
|
20
|
+
*/
|
|
11
21
|
constructor(wallets) {
|
|
12
22
|
this.ctx = {};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
wallet,
|
|
17
|
-
stamper: new WalletStamper(wallet),
|
|
18
|
-
};
|
|
23
|
+
const walletEntries = Object.entries(wallets).filter(([, w]) => Boolean(w));
|
|
24
|
+
if (walletEntries.length === 0) {
|
|
25
|
+
throw new Error("Cannot create WalletStamper: no wallet interfaces provided");
|
|
19
26
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
throw new Error("No interfaces initialized in WalletStamper");
|
|
27
|
+
for (const [interfaceType, wallet] of walletEntries) {
|
|
28
|
+
const typed = interfaceType;
|
|
29
|
+
this.ctx[typed] = { wallet, stamper: new WalletStamper(wallet) };
|
|
24
30
|
}
|
|
25
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Stamps a payload using the specified wallet interface and provider.
|
|
34
|
+
*
|
|
35
|
+
* - Uses the explicitly provided interface and provider if given.
|
|
36
|
+
* - Falls back to the default interface and stored provider otherwise.
|
|
37
|
+
*
|
|
38
|
+
* @param payload - The string payload to sign.
|
|
39
|
+
* @param interfaceType - Optional wallet interface type (defaults to the active or first available).
|
|
40
|
+
* @param provider - Optional provider (defaults to the one set via `setProvider`).
|
|
41
|
+
* @returns A `TStamp` object containing the stamp header name and encoded value.
|
|
42
|
+
* @throws {Error} If no provider is available for the selected interface.
|
|
43
|
+
*/
|
|
26
44
|
async stamp(payload, interfaceType = this.defaultInterface(), provider) {
|
|
27
45
|
const ctx = this.getCtx(interfaceType);
|
|
28
46
|
const selectedProvider = provider ?? ctx.provider;
|
|
@@ -31,16 +49,36 @@ class CrossPlatformWalletStamper {
|
|
|
31
49
|
}
|
|
32
50
|
return ctx.stamper.stamp(payload, selectedProvider);
|
|
33
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves the public key for the given provider.
|
|
54
|
+
*
|
|
55
|
+
* @param interfaceType - Optional wallet interface type (defaults to the active or first available).
|
|
56
|
+
* @param provider - Wallet provider for which to fetch the public key.
|
|
57
|
+
* @returns A promise resolving to the public key in hex format.
|
|
58
|
+
*/
|
|
34
59
|
async getPublicKey(interfaceType = this.defaultInterface(), provider) {
|
|
35
60
|
return this.getCtx(interfaceType).wallet.getPublicKey(provider);
|
|
36
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Sets the active provider for a given wallet interface.
|
|
64
|
+
*
|
|
65
|
+
* - The active provider is used as a fallback in `stamp` if none is passed explicitly.
|
|
66
|
+
*
|
|
67
|
+
* @param interfaceType - Wallet interface type.
|
|
68
|
+
* @param provider - Provider instance to associate with the interface.
|
|
69
|
+
*/
|
|
37
70
|
setProvider(interfaceType, provider) {
|
|
38
71
|
this.getCtx(interfaceType).provider = provider;
|
|
39
72
|
this.activeInterfaceType = interfaceType;
|
|
40
73
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Determines the default wallet interface to use when none is specified.
|
|
76
|
+
*
|
|
77
|
+
* - Preference order: Active provider > Ethereum > Solana > WalletConnect.
|
|
78
|
+
*
|
|
79
|
+
* @returns The default wallet interface type.
|
|
80
|
+
* @throws {Error} If no wallet interfaces are initialized.
|
|
81
|
+
*/
|
|
44
82
|
defaultInterface() {
|
|
45
83
|
if (this.activeInterfaceType) {
|
|
46
84
|
return this.activeInterfaceType;
|
|
@@ -57,6 +95,13 @@ class CrossPlatformWalletStamper {
|
|
|
57
95
|
}
|
|
58
96
|
throw new Error("No interfaces initialized");
|
|
59
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Retrieves the internal context for a given wallet interface.
|
|
100
|
+
*
|
|
101
|
+
* @param interfaceType - Wallet interface type.
|
|
102
|
+
* @returns The context including wallet, stamper, and optional provider.
|
|
103
|
+
* @throws {Error} If the interface is not initialized.
|
|
104
|
+
*/
|
|
60
105
|
getCtx(interfaceType) {
|
|
61
106
|
const ctx = this.ctx[interfaceType];
|
|
62
107
|
if (!ctx) {
|
|
@@ -66,9 +111,30 @@ class CrossPlatformWalletStamper {
|
|
|
66
111
|
}
|
|
67
112
|
}
|
|
68
113
|
class WalletStamper {
|
|
114
|
+
/**
|
|
115
|
+
* Constructs a WalletStamper bound to a single wallet interface.
|
|
116
|
+
*
|
|
117
|
+
* @param wallet - The wallet interface used for signing.
|
|
118
|
+
*/
|
|
69
119
|
constructor(wallet) {
|
|
70
120
|
this.wallet = wallet;
|
|
71
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Signs a payload and returns a standardized stamp header.
|
|
124
|
+
*
|
|
125
|
+
* - For Ethereum:
|
|
126
|
+
* - Signs using EIP-191.
|
|
127
|
+
* - Recovers and compresses the public key.
|
|
128
|
+
* - Converts the signature into DER format.
|
|
129
|
+
* - For Solana:
|
|
130
|
+
* - Signs using Ed25519.
|
|
131
|
+
* - Fetches the public key directly from the wallet.
|
|
132
|
+
*
|
|
133
|
+
* @param payload - The payload to sign.
|
|
134
|
+
* @param provider - The wallet provider used for signing.
|
|
135
|
+
* @returns A `TStamp` containing the header name and base64url-encoded JSON value.
|
|
136
|
+
* @throws {Error} If signing or public key recovery fails.
|
|
137
|
+
*/
|
|
72
138
|
async stamp(payload, provider) {
|
|
73
139
|
let signature;
|
|
74
140
|
let publicKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stamper.js","sources":["../../src/__wallet__/stamper.ts"],"sourcesContent":[null],"names":["WalletInterfaceType","SignIntent","isSolanaWallet","isEthereumWallet","uint8ArrayFromHexString","uint8ArrayToHexString","stringToBase64urlString"],"mappings":";;;;;;AAgBA,MAAM,wCAAwC,GAC5C,0CAA0C;AAC5C,MAAM,+BAA+B,GAAG,iCAAiC;AACzE,MAAM,iBAAiB,GAAG,SAAS;MAUtB,0BAA0B,CAAA;AAIrC,IAAA,WAAA,CAAY,OAA8D,EAAA;
|
|
1
|
+
{"version":3,"file":"stamper.js","sources":["../../src/__wallet__/stamper.ts"],"sourcesContent":[null],"names":["WalletInterfaceType","SignIntent","isSolanaWallet","isEthereumWallet","uint8ArrayFromHexString","uint8ArrayToHexString","stringToBase64urlString"],"mappings":";;;;;;AAgBA,MAAM,wCAAwC,GAC5C,0CAA0C;AAC5C,MAAM,+BAA+B,GAAG,iCAAiC;AACzE,MAAM,iBAAiB,GAAG,SAAS;MAUtB,0BAA0B,CAAA;AAIrC;;;;;;;;;AASG;AACH,IAAA,WAAA,CAAY,OAA8D,EAAA;QAbzD,IAAG,CAAA,GAAA,GAAe,EAAE;QAcnC,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KACzD,OAAO,CAAC,CAAC,CAAC,CACyB;AAErC,QAAA,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;AAC9B,YAAA,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D;;QAGH,KAAK,MAAM,CAAC,aAAa,EA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MP_HEADER_NAME = "X-Stamp";
|
|
8
8
|
class CrossPlatformWalletStamper {
|
|
9
|
+
/**
|
|
10
|
+
* Constructs a CrossPlatformWalletStamper.
|
|
11
|
+
*
|
|
12
|
+
* - Validates that at least one wallet interface is provided.
|
|
13
|
+
* - For each wallet interface, creates an internal `WalletStamper` bound to it.
|
|
14
|
+
* - Ensures the stamper instance is always initialized in a usable state.
|
|
15
|
+
*
|
|
16
|
+
* @param wallets - A partial mapping of wallet interfaces by type.
|
|
17
|
+
* @throws {Error} If no wallet interfaces are provided.
|
|
18
|
+
*/
|
|
9
19
|
constructor(wallets) {
|
|
10
20
|
this.ctx = {};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
wallet,
|
|
15
|
-
stamper: new WalletStamper(wallet),
|
|
16
|
-
};
|
|
21
|
+
const walletEntries = Object.entries(wallets).filter(([, w]) => Boolean(w));
|
|
22
|
+
if (walletEntries.length === 0) {
|
|
23
|
+
throw new Error("Cannot create WalletStamper: no wallet interfaces provided");
|
|
17
24
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
throw new Error("No interfaces initialized in WalletStamper");
|
|
25
|
+
for (const [interfaceType, wallet] of walletEntries) {
|
|
26
|
+
const typed = interfaceType;
|
|
27
|
+
this.ctx[typed] = { wallet, stamper: new WalletStamper(wallet) };
|
|
22
28
|
}
|
|
23
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Stamps a payload using the specified wallet interface and provider.
|
|
32
|
+
*
|
|
33
|
+
* - Uses the explicitly provided interface and provider if given.
|
|
34
|
+
* - Falls back to the default interface and stored provider otherwise.
|
|
35
|
+
*
|
|
36
|
+
* @param payload - The string payload to sign.
|
|
37
|
+
* @param interfaceType - Optional wallet interface type (defaults to the active or first available).
|
|
38
|
+
* @param provider - Optional provider (defaults to the one set via `setProvider`).
|
|
39
|
+
* @returns A `TStamp` object containing the stamp header name and encoded value.
|
|
40
|
+
* @throws {Error} If no provider is available for the selected interface.
|
|
41
|
+
*/
|
|
24
42
|
async stamp(payload, interfaceType = this.defaultInterface(), provider) {
|
|
25
43
|
const ctx = this.getCtx(interfaceType);
|
|
26
44
|
const selectedProvider = provider ?? ctx.provider;
|
|
@@ -29,16 +47,36 @@ class CrossPlatformWalletStamper {
|
|
|
29
47
|
}
|
|
30
48
|
return ctx.stamper.stamp(payload, selectedProvider);
|
|
31
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves the public key for the given provider.
|
|
52
|
+
*
|
|
53
|
+
* @param interfaceType - Optional wallet interface type (defaults to the active or first available).
|
|
54
|
+
* @param provider - Wallet provider for which to fetch the public key.
|
|
55
|
+
* @returns A promise resolving to the public key in hex format.
|
|
56
|
+
*/
|
|
32
57
|
async getPublicKey(interfaceType = this.defaultInterface(), provider) {
|
|
33
58
|
return this.getCtx(interfaceType).wallet.getPublicKey(provider);
|
|
34
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Sets the active provider for a given wallet interface.
|
|
62
|
+
*
|
|
63
|
+
* - The active provider is used as a fallback in `stamp` if none is passed explicitly.
|
|
64
|
+
*
|
|
65
|
+
* @param interfaceType - Wallet interface type.
|
|
66
|
+
* @param provider - Provider instance to associate with the interface.
|
|
67
|
+
*/
|
|
35
68
|
setProvider(interfaceType, provider) {
|
|
36
69
|
this.getCtx(interfaceType).provider = provider;
|
|
37
70
|
this.activeInterfaceType = interfaceType;
|
|
38
71
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Determines the default wallet interface to use when none is specified.
|
|
74
|
+
*
|
|
75
|
+
* - Preference order: Active provider > Ethereum > Solana > WalletConnect.
|
|
76
|
+
*
|
|
77
|
+
* @returns The default wallet interface type.
|
|
78
|
+
* @throws {Error} If no wallet interfaces are initialized.
|
|
79
|
+
*/
|
|
42
80
|
defaultInterface() {
|
|
43
81
|
if (this.activeInterfaceType) {
|
|
44
82
|
return this.activeInterfaceType;
|
|
@@ -55,6 +93,13 @@ class CrossPlatformWalletStamper {
|
|
|
55
93
|
}
|
|
56
94
|
throw new Error("No interfaces initialized");
|
|
57
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Retrieves the internal context for a given wallet interface.
|
|
98
|
+
*
|
|
99
|
+
* @param interfaceType - Wallet interface type.
|
|
100
|
+
* @returns The context including wallet, stamper, and optional provider.
|
|
101
|
+
* @throws {Error} If the interface is not initialized.
|
|
102
|
+
*/
|
|
58
103
|
getCtx(interfaceType) {
|
|
59
104
|
const ctx = this.ctx[interfaceType];
|
|
60
105
|
if (!ctx) {
|
|
@@ -64,9 +109,30 @@ class CrossPlatformWalletStamper {
|
|
|
64
109
|
}
|
|
65
110
|
}
|
|
66
111
|
class WalletStamper {
|
|
112
|
+
/**
|
|
113
|
+
* Constructs a WalletStamper bound to a single wallet interface.
|
|
114
|
+
*
|
|
115
|
+
* @param wallet - The wallet interface used for signing.
|
|
116
|
+
*/
|
|
67
117
|
constructor(wallet) {
|
|
68
118
|
this.wallet = wallet;
|
|
69
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Signs a payload and returns a standardized stamp header.
|
|
122
|
+
*
|
|
123
|
+
* - For Ethereum:
|
|
124
|
+
* - Signs using EIP-191.
|
|
125
|
+
* - Recovers and compresses the public key.
|
|
126
|
+
* - Converts the signature into DER format.
|
|
127
|
+
* - For Solana:
|
|
128
|
+
* - Signs using Ed25519.
|
|
129
|
+
* - Fetches the public key directly from the wallet.
|
|
130
|
+
*
|
|
131
|
+
* @param payload - The payload to sign.
|
|
132
|
+
* @param provider - The wallet provider used for signing.
|
|
133
|
+
* @returns A `TStamp` containing the header name and base64url-encoded JSON value.
|
|
134
|
+
* @throws {Error} If signing or public key recovery fails.
|
|
135
|
+
*/
|
|
70
136
|
async stamp(payload, provider) {
|
|
71
137
|
let signature;
|
|
72
138
|
let publicKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stamper.mjs","sources":["../../src/__wallet__/stamper.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAgBA,MAAM,wCAAwC,GAC5C,0CAA0C;AAC5C,MAAM,+BAA+B,GAAG,iCAAiC;AACzE,MAAM,iBAAiB,GAAG,SAAS;MAUtB,0BAA0B,CAAA;AAIrC,IAAA,WAAA,CAAY,OAA8D,EAAA;
|
|
1
|
+
{"version":3,"file":"stamper.mjs","sources":["../../src/__wallet__/stamper.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAgBA,MAAM,wCAAwC,GAC5C,0CAA0C;AAC5C,MAAM,+BAA+B,GAAG,iCAAiC;AACzE,MAAM,iBAAiB,GAAG,SAAS;MAUtB,0BAA0B,CAAA;AAIrC;;;;;;;;;AASG;AACH,IAAA,WAAA,CAAY,OAA8D,EAAA;QAbzD,IAAG,CAAA,GAAA,GAAe,EAAE;QAcnC,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KACzD,OAAO,CAAC,CAAC,CAAC,CACyB;AAErC,QAAA,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;AAC9B,YAAA,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D;;QAGH,KAAK,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,aAAa,EAAE;YACnD,MAAM,KAAK,GAAG,aAAoC;AAClD,YAAA,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE;;;AAIpE;;;;;;;;;;;AAWG;IACH,MAAM,KAAK,CACT,OAAe,EACf,aAAqC,GAAA,IAAI,CAAC,gBAAgB,EAAE,EAC5D,QAAyB,EAAA;QAEzB,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;AACtC,QAAA,MAAM,gBAAgB,GAAG,QAAQ,IAAI,GAAG,CAAC,QAAQ;QAEj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BAAuB,CAAC,YAAY,CAAC;AAC5D,gBAAA,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,cAAc,CAAC;AAErE,gBAAA,SAAS,GAAG,qBAAqB,CAAC,wBAAwB,CAAC;AAC3D,gBAAA,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;;iBAClD;gBACL,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC;;;QAEtD,OAAO,KAAK,EAAE;AACd,YAAA,MAAM,IAAI,KAAK,CAAC,iCAAiC,KAAK,CAAA,CAAE,CAAC;;QAG3D,OAAO;AACL,YAAA,eAAe,EAAE,iBAAiB;AAClC,YAAA,gBAAgB,EAAE,uBAAuB,CACvC,IAAI,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CACjD;SACF;;AAEJ;;;;"}
|
|
@@ -8,14 +8,25 @@ export declare class WalletConnectWallet implements WalletConnectInterface {
|
|
|
8
8
|
private ethChain;
|
|
9
9
|
private solChain;
|
|
10
10
|
private uri?;
|
|
11
|
+
/**
|
|
12
|
+
* Constructs a WalletConnectWallet bound to a WalletConnect client.
|
|
13
|
+
*
|
|
14
|
+
* - Subscribes to session deletions and automatically re-initiates pairing,
|
|
15
|
+
* updating `this.uri` so the UI can present a fresh QR/deeplink.
|
|
16
|
+
*
|
|
17
|
+
* @param client - The low-level WalletConnect client used for session/RPC.
|
|
18
|
+
*/
|
|
11
19
|
constructor(client: WalletConnectClient);
|
|
12
20
|
/**
|
|
13
|
-
* Initializes WalletConnect pairing flow with the specified
|
|
14
|
-
*
|
|
21
|
+
* Initializes WalletConnect pairing flow with the specified namespaces.
|
|
22
|
+
*
|
|
23
|
+
* - Saves the requested chain namespaces (e.g., `["eip155:1", "eip155:137", "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]`).
|
|
24
|
+
* - If an active session already has connected accounts, pairing is skipped.
|
|
25
|
+
* - Otherwise initiates a pairing and stores the resulting URI.
|
|
15
26
|
*
|
|
16
|
-
* @param opts.
|
|
17
|
-
* @param opts.
|
|
18
|
-
* @throws {Error} If no
|
|
27
|
+
* @param opts.ethereumNamespaces - List of EVM CAIP IDs (e.g., "eip155:1").
|
|
28
|
+
* @param opts.solanaNamespaces - List of Solana CAIP IDs (e.g., "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp").
|
|
29
|
+
* @throws {Error} If no namespaces are provided for either chain.
|
|
19
30
|
*/
|
|
20
31
|
init(opts: {
|
|
21
32
|
ethereumNamespaces: string[];
|
|
@@ -23,61 +34,130 @@ export declare class WalletConnectWallet implements WalletConnectInterface {
|
|
|
23
34
|
}): Promise<void>;
|
|
24
35
|
/**
|
|
25
36
|
* Returns WalletConnect providers with associated chain/account metadata.
|
|
37
|
+
*
|
|
38
|
+
* - Builds an EVM provider (if Ethereum namespaces are enabled).
|
|
39
|
+
* - Builds a Solana provider (if Solana namespaces are enabled).
|
|
40
|
+
*
|
|
41
|
+
* @returns A promise resolving to an array of WalletProvider objects.
|
|
26
42
|
*/
|
|
27
43
|
getProviders(): Promise<WalletProvider[]>;
|
|
28
44
|
/**
|
|
29
45
|
* Approves the session if needed and ensures at least one account is available.
|
|
46
|
+
*
|
|
47
|
+
* - Calls `approve()` on the underlying client when pairing is pending.
|
|
48
|
+
* - Throws if the approved session contains no connected accounts.
|
|
49
|
+
*
|
|
50
|
+
* @param _provider - Unused (present for interface compatibility).
|
|
51
|
+
* @throws {Error} If the session contains no accounts.
|
|
30
52
|
*/
|
|
31
53
|
connectWalletAccount(_provider: WalletProvider): Promise<void>;
|
|
32
54
|
/**
|
|
33
|
-
*
|
|
55
|
+
* Switches the user’s WalletConnect session to a new EVM chain.
|
|
34
56
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
57
|
+
* - Ethereum-only: only supported for providers on the Ethereum namespace.
|
|
58
|
+
* - No add-then-switch: WalletConnect cannot add chains mid-session. The target chain
|
|
59
|
+
* must be present in `ethereumNamespaces` negotiated at pairing time. To support a new chain,
|
|
60
|
+
* you must include it in the walletConfig.
|
|
61
|
+
* - Accepts a hex chain ID (e.g., "0x1"). If a `SwitchableChain` is passed, only its `id`
|
|
62
|
+
* (hex chain ID) is used; metadata is ignored for WalletConnect.
|
|
63
|
+
*
|
|
64
|
+
* @param provider - The WalletProvider returned by `getProviders()`.
|
|
65
|
+
* @param chainOrId - Hex chain ID (e.g., "0x1") or a `SwitchableChain` (its `id` is used).
|
|
66
|
+
* @returns A promise that resolves when the switch completes.
|
|
67
|
+
* @throws {Error} If no active session, provider is non-EVM, the chain is not in `ethereumNamespaces`,
|
|
68
|
+
* or the switch RPC fails.
|
|
39
69
|
*/
|
|
40
70
|
switchChain(provider: WalletProvider, chainOrId: string | SwitchableChain): Promise<void>;
|
|
41
71
|
/**
|
|
42
|
-
* Signs a message or transaction using the specified provider and intent.
|
|
72
|
+
* Signs a message or transaction using the specified wallet provider and intent.
|
|
73
|
+
*
|
|
74
|
+
* - Ensures an active WalletConnect session:
|
|
75
|
+
* - If a pairing is in progress (URI shown but not yet approved), this call will
|
|
76
|
+
* wait for the user to approve the session and may appear stuck until they do.
|
|
77
|
+
* - If no pairing is in progress, this will throw (e.g., "call pair() before approve()").
|
|
78
|
+
* - Ethereum:
|
|
79
|
+
* - `SignMessage` → `personal_sign` (returns hex signature).
|
|
80
|
+
* - `SignAndSendTransaction` → `eth_sendTransaction` (returns tx hash).
|
|
81
|
+
* - Solana:
|
|
82
|
+
* - `SignMessage` → `solana_signMessage` (returns hex signature).
|
|
83
|
+
* - `SignTransaction` → `solana_signTransaction` (returns hex signature).
|
|
84
|
+
* - `SignAndSendTransaction` → `solana_sendTransaction` (returns hex signature of the submitted tx).
|
|
43
85
|
*
|
|
44
|
-
* @param
|
|
86
|
+
* @param payload - Payload or serialized transaction to sign.
|
|
45
87
|
* @param provider - The WalletProvider to use.
|
|
46
|
-
* @param intent - The
|
|
88
|
+
* @param intent - The signing intent.
|
|
89
|
+
* @returns A hex string (signature or transaction hash, depending on intent).
|
|
90
|
+
* @throws {Error} If no account is available, no pairing is in progress, or the intent is unsupported.
|
|
47
91
|
*/
|
|
48
|
-
sign(
|
|
92
|
+
sign(payload: string, provider: WalletProvider, intent: SignIntent): Promise<string>;
|
|
49
93
|
/**
|
|
50
94
|
* Retrieves the public key of the connected wallet.
|
|
51
95
|
*
|
|
96
|
+
* - Ethereum: signs a fixed challenge and recovers the compressed secp256k1 public key.
|
|
97
|
+
* - Solana: decodes the base58-encoded address to raw bytes.
|
|
98
|
+
*
|
|
52
99
|
* @param provider - The WalletProvider to fetch the key from.
|
|
53
|
-
* @returns
|
|
100
|
+
* @returns A compressed public key as a hex string.
|
|
101
|
+
* @throws {Error} If no account is available or the namespace is unsupported.
|
|
54
102
|
*/
|
|
55
103
|
getPublicKey(provider: WalletProvider): Promise<string>;
|
|
56
104
|
/**
|
|
57
105
|
* Disconnects the current session and re-initiates a fresh pairing URI.
|
|
106
|
+
*
|
|
107
|
+
* - Calls `disconnect()` on the client, then `pair()` with current namespaces.
|
|
108
|
+
* - Updates `this.uri` so the UI can present a new QR/deeplink.
|
|
58
109
|
*/
|
|
59
110
|
disconnectWalletAccount(_provider: WalletProvider): Promise<void>;
|
|
60
111
|
/**
|
|
61
112
|
* Builds a lightweight provider interface for the given chain.
|
|
62
113
|
*
|
|
63
|
-
* @param chainId -
|
|
64
|
-
* @returns A WalletConnect-compatible provider
|
|
114
|
+
* @param chainId - Namespace chain ID (e.g., "eip155:1" or "solana:101").
|
|
115
|
+
* @returns A WalletConnect-compatible provider that proxies JSON-RPC via WC.
|
|
65
116
|
*/
|
|
66
117
|
private makeProvider;
|
|
67
118
|
/**
|
|
68
119
|
* Ensures there is an active WalletConnect session, initiating approval if necessary.
|
|
69
120
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
121
|
+
* - If a session exists, returns it immediately.
|
|
122
|
+
* - If no session exists but a pairing is in progress, awaits `approve()` —
|
|
123
|
+
* this will block until the user approves (or rejects) in their wallet.
|
|
124
|
+
* - If no session exists and no pairing is in progress, throws; the caller
|
|
125
|
+
* must have initiated pairing via `pair()` elsewhere.
|
|
126
|
+
*
|
|
127
|
+
* @returns The active WalletConnect session.
|
|
128
|
+
* @throws {Error} If approval is rejected, completes without establishing a session,
|
|
129
|
+
* or no pairing is in progress.
|
|
72
130
|
*/
|
|
73
131
|
private ensureSession;
|
|
74
132
|
/**
|
|
75
133
|
* Builds a WalletProvider descriptor for an EVM chain.
|
|
134
|
+
*
|
|
135
|
+
* - Extracts the connected address (if any) and current chain ID.
|
|
136
|
+
* - Includes the pairing `uri` if available.
|
|
137
|
+
*
|
|
138
|
+
* @param session - Current WalletConnect session (or null).
|
|
139
|
+
* @param info - Provider branding info (name, icon).
|
|
140
|
+
* @returns A WalletProvider object for Ethereum.
|
|
76
141
|
*/
|
|
77
142
|
private buildEthProvider;
|
|
78
143
|
/**
|
|
79
144
|
* Builds a WalletProvider descriptor for Solana.
|
|
145
|
+
*
|
|
146
|
+
* - Extracts the connected address (if any).
|
|
147
|
+
* - Includes the fresh pairing `uri` if available.
|
|
148
|
+
*
|
|
149
|
+
* @param session - Current WalletConnect session (or null).
|
|
150
|
+
* @param info - Provider branding info (name, icon).
|
|
151
|
+
* @returns A WalletProvider object for Solana.
|
|
80
152
|
*/
|
|
81
153
|
private buildSolProvider;
|
|
154
|
+
/**
|
|
155
|
+
* Builds the requested WalletConnect namespaces from the current config.
|
|
156
|
+
*
|
|
157
|
+
* - Includes methods and events for Ethereum and/or Solana based on enabled namespaces.
|
|
158
|
+
*
|
|
159
|
+
* @returns A namespaces object suitable for `WalletConnectClient.pair()`.
|
|
160
|
+
*/
|
|
161
|
+
private buildNamespaces;
|
|
82
162
|
}
|
|
83
163
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/__wallet__/wallet-connect/base.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,mBAAmB,EACnB,cAAc,EAEd,UAAU,EAEV,sBAAsB,EACtB,eAAe,EAChB,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIpD,qBAAa,mBAAoB,YAAW,sBAAsB;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/__wallet__/wallet-connect/base.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,mBAAmB,EACnB,cAAc,EAEd,UAAU,EAEV,sBAAsB,EACtB,eAAe,EAChB,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIpD,qBAAa,mBAAoB,YAAW,sBAAsB;IAmBpD,OAAO,CAAC,MAAM;IAlB1B,QAAQ,CAAC,aAAa,qCAAqC;IAE3D,OAAO,CAAC,kBAAkB,CAAgB;IAC1C,OAAO,CAAC,gBAAgB,CAAgB;IAExC,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,QAAQ,CAAU;IAE1B,OAAO,CAAC,GAAG,CAAC,CAAS;IAErB;;;;;;;OAOG;gBACiB,MAAM,EAAE,mBAAmB;IAa/C;;;;;;;;;;OAUG;IACG,IAAI,CAAC,IAAI,EAAE;QACf,kBAAkB,EAAE,MAAM,EAAE,CAAC;QAC7B,gBAAgB,EAAE,MAAM,EAAE,CAAC;KAC5B,GAAG,OAAO,CAAC,IAAI,CAAC;IAiCjB;;;;;;;OAOG;IACG,YAAY,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;IAqB/C;;;;;;;;OAQG;IACG,oBAAoB,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAMpE;;;;;;;;;;;;;;;OAeG;IACG,WAAW,CACf,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,MA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