From eb4038480421490385b50a7eeaa6b044f30bb89c Mon Sep 17 00:00:00 2001 From: Mahmoud Aboelenein Date: Fri, 15 Mar 2024 11:28:37 +0200 Subject: [PATCH 1/4] update package version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 73c1d8c..70afe3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sats-connect", - "version": "2.0.0", + "version": "2.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sats-connect", - "version": "2.0.0", + "version": "2.1.0", "license": "ISC", "dependencies": { "jsontokens": "^4.0.1", diff --git a/package.json b/package.json index df3e555..848adfd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sats-connect", - "version": "2.0.0", + "version": "2.1.0", "main": "dist/index.js", "files": [ "dist" From 27e09336cfca6b782b26bfbc2f556db568e6e6d2 Mon Sep 17 00:00:00 2001 From: Mahmoud Aboelenein Date: Mon, 25 Mar 2024 14:13:05 +0200 Subject: [PATCH 2/4] specify a message when requesting accounts --- src/request/types/btcMethods.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/request/types/btcMethods.ts b/src/request/types/btcMethods.ts index 3aa7412..aa283eb 100644 --- a/src/request/types/btcMethods.ts +++ b/src/request/types/btcMethods.ts @@ -124,6 +124,13 @@ export type SignPsbtResult = { export type SignPsbt = MethodParamsAndResult; +export type GetAccountsParams = { + /** + * a message to be displayed to the user in the request prompt. + */ + message?: string; +}; + export type GetAccountResult = Address[]; -export type GetAccounts = MethodParamsAndResult; +export type GetAccounts = MethodParamsAndResult; From 7745f047f3d3321482beb6a1aaacd139d1b1b4e4 Mon Sep 17 00:00:00 2001 From: Mahmoud Aboelenein Date: Mon, 25 Mar 2024 14:19:18 +0200 Subject: [PATCH 3/4] fix type conflict --- src/request/types/stxMethods.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/request/types/stxMethods.ts b/src/request/types/stxMethods.ts index eb348cf..2f31186 100644 --- a/src/request/types/stxMethods.ts +++ b/src/request/types/stxMethods.ts @@ -247,11 +247,10 @@ export type DeployContractResult = TxId & Transaction; export type StxDeployContract = MethodParamsAndResult; // Types for `stx_getAccounts` request -export type GetAccountsParams = {}; export type GetAccountsResult = { addresses: Array
; }; -export type StxGetAccounts = MethodParamsAndResult; +export type StxGetAccounts = MethodParamsAndResult<{}, GetAccountsResult>; // Types for `stx_getAddresses` request export type GetAddressesParams = undefined | null; From 4e97f7efebbea4272315f01db8b29ce1f7a140b0 Mon Sep 17 00:00:00 2001 From: Mahmoud Aboelenein Date: Tue, 26 Mar 2024 11:30:44 +0200 Subject: [PATCH 4/4] added a required purposes param for getAccounts --- src/request/types/btcMethods.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/request/types/btcMethods.ts b/src/request/types/btcMethods.ts index aa283eb..5c24542 100644 --- a/src/request/types/btcMethods.ts +++ b/src/request/types/btcMethods.ts @@ -125,6 +125,14 @@ export type SignPsbtResult = { export type SignPsbt = MethodParamsAndResult; export type GetAccountsParams = { + /** + * The purposes for which to generate addresses. + * possible values are "payment", "ordinals", ... + */ + purposes: Array; + /** + * a message to be displayed to the user in the request prompt. + */ /** * a message to be displayed to the user in the request prompt. */