diff --git a/package-lock.json b/package-lock.json index 379170d..92a3533 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sats-connect/core", - "version": "0.17.5", + "version": "0.17.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@sats-connect/core", - "version": "0.17.5", + "version": "0.17.6", "license": "ISC", "dependencies": { "axios": "1.13.5", diff --git a/package.json b/package.json index e639c1a..28431d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sats-connect/core", - "version": "0.17.5", + "version": "0.17.6", "main": "dist/index.mjs", "module": "dist/index.mjs", "types": "dist/index.d.mts", diff --git a/src/request/rpc/objects/namespaces/wallet/methods/requestPermissions/request.ts b/src/request/rpc/objects/namespaces/wallet/methods/requestPermissions/request.ts index 05a152b..299bac7 100644 --- a/src/request/rpc/objects/namespaces/wallet/methods/requestPermissions/request.ts +++ b/src/request/rpc/objects/namespaces/wallet/methods/requestPermissions/request.ts @@ -3,7 +3,16 @@ import { walletMethods } from 'src/request/methods'; import * as v from 'valibot'; import { permissionRequestParamsSchema } from '../../shared/permissions'; -export const walletRequestPermissionsParamsSchema = v.array(permissionRequestParamsSchema); +/** + * This method was previously used to connect to the wallet similarly to how + * `wallet_connect` is used now: when no permissions are explicitly requested, + * account read permissions are implied. The `nullish` schema allows maintaining + * backwards compatibility with this behavior while still allowing for explicit + * permission requests. + */ +export const walletRequestPermissionsParamsSchema = v.nullish( + v.array(permissionRequestParamsSchema) +); export type WalletRequestPermissionsParams = v.InferOutput< typeof walletRequestPermissionsParamsSchema