diff --git a/bindings/nodejs/lib/types/wallet/bridge/account.ts b/bindings/nodejs/lib/types/wallet/bridge/account.ts index 408216fcc9..b661582704 100644 --- a/bindings/nodejs/lib/types/wallet/bridge/account.ts +++ b/bindings/nodejs/lib/types/wallet/bridge/account.ts @@ -149,6 +149,10 @@ export type __ImplicitAccountCreationAddressMethod__ = { name: 'implicitAccountCreationAddress'; }; +export type __AccountsMethod__ = { + name: 'accounts'; +}; + export type __ImplicitAccountsMethod__ = { name: 'implicitAccounts'; }; diff --git a/bindings/nodejs/lib/types/wallet/bridge/index.ts b/bindings/nodejs/lib/types/wallet/bridge/index.ts index ae459e428c..348fa3c54a 100644 --- a/bindings/nodejs/lib/types/wallet/bridge/index.ts +++ b/bindings/nodejs/lib/types/wallet/bridge/index.ts @@ -16,6 +16,7 @@ import type { __OutputsMethod__, __PendingTransactionsMethod__, __ImplicitAccountCreationAddressMethod__, + __AccountsMethod__, __ImplicitAccountsMethod__, __IncomingTransactionsMethod__, __TransactionsMethod__, @@ -99,6 +100,7 @@ export type __AccountMethod__ = | __OutputsMethod__ | __PendingTransactionsMethod__ | __ImplicitAccountCreationAddressMethod__ + | __AccountsMethod__ | __ImplicitAccountsMethod__ | __IncomingTransactionsMethod__ | __TransactionsMethod__ diff --git a/bindings/nodejs/lib/wallet/account.ts b/bindings/nodejs/lib/wallet/account.ts index 117975e1d7..d9e67a4510 100644 --- a/bindings/nodejs/lib/wallet/account.ts +++ b/bindings/nodejs/lib/wallet/account.ts @@ -774,6 +774,23 @@ export class Account { return JSON.parse(response).payload; } + /** + * Returns the accounts of the wallet. + * + * @returns The accounts of the wallet. + */ + async accounts(): Promise { + const response = await this.methodHandler.callAccountMethod( + this.meta.index, + { + name: 'accounts', + }, + ); + + const parsed = JSON.parse(response) as Response; + return plainToInstance(OutputData, parsed.payload); + } + /** * Returns the implicit accounts of the wallet. *