@pooflabs/core 0.0.17 → 0.0.19
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/index.js +7 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -15
- package/dist/index.mjs.map +1 -1
- package/dist/utils/sol/sol-utils.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2867,24 +2867,15 @@ async function genSolanaMessage(address, nonce) {
|
|
|
2867
2867
|
const statement = "Sign this message to authenticate with our application.";
|
|
2868
2868
|
const currentDate = new Date();
|
|
2869
2869
|
const issuedAt = currentDate.toISOString();
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
const expirationDate = new Date(currentDate.getTime() + 5 * 60 * 1000);
|
|
2873
|
-
const expirationTime = expirationDate.toISOString();
|
|
2874
|
-
return `${statement}\n\n` +
|
|
2875
|
-
`Wallet address:\n${address}\n\n` +
|
|
2876
|
-
`Domain: ${domain}\n` +
|
|
2877
|
-
`Origin: ${origin}\n` +
|
|
2878
|
-
`Nonce: ${nonce}\n` +
|
|
2879
|
-
`Issued At: ${issuedAt}\n` +
|
|
2880
|
-
`Expiration Time: ${expirationTime}`;
|
|
2881
|
-
}
|
|
2882
|
-
// Backward compatible: without nonce (for server-side usage)
|
|
2870
|
+
const expirationDate = new Date(currentDate.getTime() + 5 * 60 * 1000);
|
|
2871
|
+
const expirationTime = expirationDate.toISOString();
|
|
2883
2872
|
return `${statement}\n\n` +
|
|
2884
2873
|
`Wallet address:\n${address}\n\n` +
|
|
2885
2874
|
`Domain: ${domain}\n` +
|
|
2886
2875
|
`Origin: ${origin}\n` +
|
|
2887
|
-
`
|
|
2876
|
+
`Nonce: ${nonce}\n` +
|
|
2877
|
+
`Issued At: ${issuedAt}\n` +
|
|
2878
|
+
`Expiration Time: ${expirationTime}`;
|
|
2888
2879
|
}
|
|
2889
2880
|
// ─────────────────────────────────────────────────────────────
|
|
2890
2881
|
// Serialization Helpers
|
|
@@ -3052,6 +3043,7 @@ function loadKeypairFromEnv() {
|
|
|
3052
3043
|
async function createSession() {
|
|
3053
3044
|
const kp = loadKeypairFromEnv();
|
|
3054
3045
|
const address = kp.publicKey.toBase58();
|
|
3046
|
+
/* fetch nonce from auth API */
|
|
3055
3047
|
const nonce = await genAuthNonce();
|
|
3056
3048
|
const message = await genSolanaMessage(address, nonce);
|
|
3057
3049
|
/* sign the message */
|
|
@@ -3215,7 +3207,7 @@ let clientConfig = {
|
|
|
3215
3207
|
name: '',
|
|
3216
3208
|
logoUrl: '',
|
|
3217
3209
|
apiKey: '',
|
|
3218
|
-
wsApiUrl: 'wss://
|
|
3210
|
+
wsApiUrl: 'wss://api.tarobase.com',
|
|
3219
3211
|
apiUrl: 'https://api.tarobase.com',
|
|
3220
3212
|
authApiUrl: 'https://auth.tarobase.com',
|
|
3221
3213
|
appId: '',
|