better-near-auth 1.4.2 → 1.5.0

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/README.md CHANGED
@@ -159,6 +159,10 @@ const aliceProfile = await authClient.near.getProfile("alice.near");
159
159
 
160
160
  ```ts
161
161
  const accountId = authClient.near.getAccountId();
162
+ const { data } = await authClient.near.listAccounts();
163
+ const activeAccount = data?.activeAccount;
164
+ const availableAccounts = data?.availableAccounts ?? [];
165
+ await authClient.near.setPrimaryAccount({ accountId: "alice.near", network: "mainnet" });
162
166
  await authClient.near.disconnect();
163
167
  ```
164
168
 
@@ -248,7 +252,8 @@ When `accountId` and `privateKey` are omitted, the relayer starts in **ephemeral
248
252
  - `disconnect()` — Disconnect wallet and clear cached data
249
253
  - `link(callbacks?)` — Link a NEAR account to the current session
250
254
  - `unlink(params)` — Unlink a NEAR account
251
- - `listAccounts()` — List all linked NEAR accounts
255
+ - `listAccounts()` — List linked NEAR accounts with `activeAccount` and `availableAccounts`
256
+ - `setPrimaryAccount(params)` — Select the active NEAR account for the session user
252
257
 
253
258
  **Relay**
254
259
  - `buildSignedDelegateAction(receiverId, buildActions)` — Build + sign a delegate action via wallet FAK