@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.mjs CHANGED
@@ -2847,24 +2847,15 @@ async function genSolanaMessage(address, nonce) {
2847
2847
  const statement = "Sign this message to authenticate with our application.";
2848
2848
  const currentDate = new Date();
2849
2849
  const issuedAt = currentDate.toISOString();
2850
- // If nonce is provided, include it and expiration time (for secure authentication)
2851
- if (nonce) {
2852
- const expirationDate = new Date(currentDate.getTime() + 5 * 60 * 1000);
2853
- const expirationTime = expirationDate.toISOString();
2854
- return `${statement}\n\n` +
2855
- `Wallet address:\n${address}\n\n` +
2856
- `Domain: ${domain}\n` +
2857
- `Origin: ${origin}\n` +
2858
- `Nonce: ${nonce}\n` +
2859
- `Issued At: ${issuedAt}\n` +
2860
- `Expiration Time: ${expirationTime}`;
2861
- }
2862
- // Backward compatible: without nonce (for server-side usage)
2850
+ const expirationDate = new Date(currentDate.getTime() + 5 * 60 * 1000);
2851
+ const expirationTime = expirationDate.toISOString();
2863
2852
  return `${statement}\n\n` +
2864
2853
  `Wallet address:\n${address}\n\n` +
2865
2854
  `Domain: ${domain}\n` +
2866
2855
  `Origin: ${origin}\n` +
2867
- `Issued At: ${issuedAt}`;
2856
+ `Nonce: ${nonce}\n` +
2857
+ `Issued At: ${issuedAt}\n` +
2858
+ `Expiration Time: ${expirationTime}`;
2868
2859
  }
2869
2860
  // ─────────────────────────────────────────────────────────────
2870
2861
  // Serialization Helpers
@@ -3032,6 +3023,7 @@ function loadKeypairFromEnv() {
3032
3023
  async function createSession() {
3033
3024
  const kp = loadKeypairFromEnv();
3034
3025
  const address = kp.publicKey.toBase58();
3026
+ /* fetch nonce from auth API */
3035
3027
  const nonce = await genAuthNonce();
3036
3028
  const message = await genSolanaMessage(address, nonce);
3037
3029
  /* sign the message */
@@ -3195,7 +3187,7 @@ let clientConfig = {
3195
3187
  name: '',
3196
3188
  logoUrl: '',
3197
3189
  apiKey: '',
3198
- wsApiUrl: 'wss://ws.tarobase.com',
3190
+ wsApiUrl: 'wss://api.tarobase.com',
3199
3191
  apiUrl: 'https://api.tarobase.com',
3200
3192
  authApiUrl: 'https://auth.tarobase.com',
3201
3193
  appId: '',