diff --git a/package-lock.json b/package-lock.json index ad22ece..bb06925 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sats-connect/core", - "version": "0.2.2", + "version": "0.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@sats-connect/core", - "version": "0.2.2", + "version": "0.3.0", "license": "ISC", "dependencies": { "axios": "1.7.4", diff --git a/package.json b/package.json index 5074b33..cd8a554 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sats-connect/core", - "version": "0.2.2", + "version": "0.3.0", "main": "dist/index.mjs", "module": "dist/index.mjs", "types": "dist/index.d.mts", diff --git a/src/provider/types.ts b/src/provider/types.ts index 20aa457..cfcf3ef 100644 --- a/src/provider/types.ts +++ b/src/provider/types.ts @@ -32,7 +32,19 @@ export const networkChangeSchema = v.object({ }); export type NetworkChangeEvent = v.InferOutput; -export const walletEventSchema = v.variant('type', [accountChangeSchema, networkChangeSchema]); +// disconnect +export const disconnectEventName = 'disconnect'; +export const disconnectSchema = v.object({ + type: v.literal(disconnectEventName), +}); +export type DisconnectEvent = v.InferOutput; + +export const walletEventSchema = v.variant('type', [ + accountChangeSchema, + networkChangeSchema, + disconnectSchema, +]); + export type WalletEvent = v.InferOutput; export type AddListener = (