@iamgame/wallet-sdk 0.1.2 → 0.1.3

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.cjs CHANGED
@@ -391,6 +391,7 @@ function useSolvenAuth() {
391
391
  return {
392
392
  user: session?.user ?? null,
393
393
  status,
394
+ accessToken: session?.accessToken ?? null,
394
395
  connectExternal,
395
396
  connectTelegram,
396
397
  requestEmailOtp,
package/dist/index.d.cts CHANGED
@@ -261,6 +261,13 @@ interface IUseIAMGameAuth {
261
261
  connectExternal: (adapter: IExternalWalletAdapter) => Promise<void>;
262
262
  /** Run the Telegram TMA flow. Reads `window.Telegram.WebApp.initData` and posts to IAMGame. */
263
263
  connectTelegram: () => Promise<void>;
264
+ /**
265
+ * The current session's access token, or null when anonymous. Hand this to YOUR
266
+ * backend, which verifies it server-to-server (POST /v1/sessions/verify with your
267
+ * secret key) and mints its own app session. Never trust it as proof of identity
268
+ * on its own — it must be verified server-side.
269
+ */
270
+ accessToken: string | null;
264
271
  /** Email + OTP step 1: email a one-time code to the address. */
265
272
  requestEmailOtp: (email: string) => Promise<{
266
273
  expiresAt: string;
package/dist/index.d.ts CHANGED
@@ -261,6 +261,13 @@ interface IUseIAMGameAuth {
261
261
  connectExternal: (adapter: IExternalWalletAdapter) => Promise<void>;
262
262
  /** Run the Telegram TMA flow. Reads `window.Telegram.WebApp.initData` and posts to IAMGame. */
263
263
  connectTelegram: () => Promise<void>;
264
+ /**
265
+ * The current session's access token, or null when anonymous. Hand this to YOUR
266
+ * backend, which verifies it server-to-server (POST /v1/sessions/verify with your
267
+ * secret key) and mints its own app session. Never trust it as proof of identity
268
+ * on its own — it must be verified server-side.
269
+ */
270
+ accessToken: string | null;
264
271
  /** Email + OTP step 1: email a one-time code to the address. */
265
272
  requestEmailOtp: (email: string) => Promise<{
266
273
  expiresAt: string;
package/dist/index.js CHANGED
@@ -389,6 +389,7 @@ function useSolvenAuth() {
389
389
  return {
390
390
  user: session?.user ?? null,
391
391
  status,
392
+ accessToken: session?.accessToken ?? null,
392
393
  connectExternal,
393
394
  connectTelegram,
394
395
  requestEmailOtp,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamgame/wallet-sdk",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "IAMGame Wallet browser SDK — Telegram & Solana wallet auth, balances, server-side signing, and key export. Drop-in React provider for game frontends.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://wallet.iamgame.com",