Skip to content

Commit

Permalink
release/v2.1.0 (#82)
Browse files Browse the repository at this point in the history
* update package version

* specify a message when requesting accounts

* fix type conflict

* added a required purposes param for getAccounts
  • Loading branch information
m-aboelenein authored Mar 27, 2024
1 parent 5d3fa14 commit 97c61be
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sats-connect",
"version": "2.0.0",
"version": "2.1.0",
"main": "dist/index.js",
"files": [
"dist"
Expand Down
17 changes: 16 additions & 1 deletion src/request/types/btcMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,21 @@ export type SignPsbtResult = {

export type SignPsbt = MethodParamsAndResult<SignPsbtParams, SignPsbtResult>;

export type GetAccountsParams = {
/**
* The purposes for which to generate addresses.
* possible values are "payment", "ordinals", ...
*/
purposes: Array<AddressPurpose>;
/**
* a message to be displayed to the user in the request prompt.
*/
/**
* a message to be displayed to the user in the request prompt.
*/
message?: string;
};

export type GetAccountResult = Address[];

export type GetAccounts = MethodParamsAndResult<null, GetAccountResult>;
export type GetAccounts = MethodParamsAndResult<GetAccountsParams, GetAccountResult>;
3 changes: 1 addition & 2 deletions src/request/types/stxMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,10 @@ export type DeployContractResult = TxId & Transaction;
export type StxDeployContract = MethodParamsAndResult<DeployContractParams, DeployContractResult>;

// Types for `stx_getAccounts` request
export type GetAccountsParams = {};
export type GetAccountsResult = {
addresses: Array<Address & PublicKey & { gaiaHubUrl: string; gaiaAppKey: string }>;
};
export type StxGetAccounts = MethodParamsAndResult<GetAccountsParams, GetAccountsResult>;
export type StxGetAccounts = MethodParamsAndResult<{}, GetAccountsResult>;

// Types for `stx_getAddresses` request
export type GetAddressesParams = undefined | null;
Expand Down

0 comments on commit 97c61be

Please sign in to comment.