From 8492fe898be13407da7a07bbf8d8c4463912806f Mon Sep 17 00:00:00 2001 From: Stanley Yuen <102275989+stanleyyconsensys@users.noreply.github.com> Date: Tue, 25 Aug 2026 16:02:35 +0800 Subject: [PATCH 1/8] feat(stellar-wallet-snap): Add `exportAccount` keyring API --- packages/stellar-wallet-snap/CHANGELOG.md | 4 + .../docs/use-cases/keyring/keyring.md | 2 + .../stellar-wallet-snap/snap.manifest.json | 7 + .../src/api/address.test.ts | 20 ++ .../stellar-wallet-snap/src/api/address.ts | 23 +++ packages/stellar-wallet-snap/src/constants.ts | 8 + packages/stellar-wallet-snap/src/context.ts | 1 + .../src/handlers/keyring/api.test.ts | 61 +++++- .../src/handlers/keyring/api.ts | 30 +++ .../src/handlers/keyring/exceptions.ts | 5 + .../src/handlers/keyring/keyring.test.ts | 182 +++++++++++++++++- .../src/handlers/keyring/keyring.ts | 69 ++++++- .../stellar-wallet-snap/src/permissions.ts | 1 + .../src/services/wallet/Wallet.test.ts | 10 + .../src/services/wallet/Wallet.ts | 14 +- .../src/utils/requestResponse.test.ts | 1 + 16 files changed, 432 insertions(+), 6 deletions(-) diff --git a/packages/stellar-wallet-snap/CHANGELOG.md b/packages/stellar-wallet-snap/CHANGELOG.md index 23b877ba5..590a8349e 100644 --- a/packages/stellar-wallet-snap/CHANGELOG.md +++ b/packages/stellar-wallet-snap/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add `exportAccount` keyring method for base32 Stellar secret-seed export + ## [0.1.0] ### Added diff --git a/packages/stellar-wallet-snap/docs/use-cases/keyring/keyring.md b/packages/stellar-wallet-snap/docs/use-cases/keyring/keyring.md index a2bbd1abd..2e7ae74e8 100644 --- a/packages/stellar-wallet-snap/docs/use-cases/keyring/keyring.md +++ b/packages/stellar-wallet-snap/docs/use-cases/keyring/keyring.md @@ -15,6 +15,7 @@ Account management and SEP-43 signing entry points via `onKeyringRequest` → `K | `AccountService` | `services/account` | Persist / derive / select accounts (snap state) | | `OnChainAccountService` | `services/on-chain-account` | Snap-state snapshots for balances/assets; live activation for discovery | | `TransactionService` | `services/transaction` | Local pending keyring txs for `listAccountTransactions` | +| `WalletService` | `services/wallet` | HD derive signing material; used by `exportAccount` (never persisted) | | `SyncAccountsHandler` | `handlers/cronjob` | Scheduled after selection changes to refresh on-chain snapshots | ## Request / response @@ -45,6 +46,7 @@ Requests are origin-checked, then dispatched to the methods below. | `listAccountTransactions` | Paginated keyring transactions for the account | **Snap state** (pending / local txs via `TransactionService` — **not** Horizon history) | | `discoverAccounts` | Derive BIP-44 address for index; return it only if activated on any requested scope | Derive locally; activation check is **live on-chain** (`NetworkService.getAccount`) | | `resolveAccountAddress` | Given an address, return CAIP-10 if this snap owns it; else `null` (MetaMask may fall back) | **Snap state** (keyring account lookup by address) | +| `exportAccount` | Export the Stellar secret seed (`S…` strkey / base32). Only `encoding: "base32"` is supported | **Derived** via `WalletService` (never persisted) | | `filterAccountChains` | Not implemented | Throws `MethodNotSupportedError` | | `updateAccount` | Not implemented | Throws `MethodNotSupportedError` | | `submitRequest` | [signTransaction.md](./signTransaction.md) · [signMessage.md](./signMessage.md) · [signAuthEntry.md](./signAuthEntry.md) | | diff --git a/packages/stellar-wallet-snap/snap.manifest.json b/packages/stellar-wallet-snap/snap.manifest.json index 7e305f7f0..a04437fb3 100644 --- a/packages/stellar-wallet-snap/snap.manifest.json +++ b/packages/stellar-wallet-snap/snap.manifest.json @@ -26,6 +26,13 @@ "allowedOrigins": ["https://portfolio.metamask.io"], "capabilities": { "scopes": ["stellar:pubnet"], + "privateKey": { + "exportFormats": [ + { + "encoding": "base32" + } + ] + }, "bip44": { "deriveIndex": true, "deriveIndexRange": true, diff --git a/packages/stellar-wallet-snap/src/api/address.test.ts b/packages/stellar-wallet-snap/src/api/address.test.ts index 377a4b06b..c7987c738 100644 --- a/packages/stellar-wallet-snap/src/api/address.test.ts +++ b/packages/stellar-wallet-snap/src/api/address.test.ts @@ -3,6 +3,7 @@ import { assert, StructError } from '@metamask/superstruct'; import { StellarAddressOrContractStruct, StellarAddressStruct, + StellarSecretKeyStruct, } from './address'; describe('StellarAddressStruct', () => { @@ -21,6 +22,25 @@ describe('StellarAddressStruct', () => { }); }); +describe('StellarSecretKeyStruct', () => { + it('accepts a valid Stellar secret seed', () => { + expect(() => + assert( + 'SAKICEVQLYWGSOJS4WW7HZJWAHZVEEBS527LHK5V4MLJALYKICQCJXMW', + StellarSecretKeyStruct, + ), + ).not.toThrow(); + }); + + it.each([ + 'invalid-secret', + 'GA7UCNSASSOPQYTRGJ2NC7TDBSXHMWK6JHS7AO6X2ZQAIQSTB5ELNFSO', + '', + ])('rejects an invalid Stellar secret seed: "%s"', (secret) => { + expect(() => assert(secret, StellarSecretKeyStruct)).toThrow(StructError); + }); +}); + describe('StellarAddressOrContractStruct', () => { it('accepts a valid Stellar address', () => { expect(() => diff --git a/packages/stellar-wallet-snap/src/api/address.ts b/packages/stellar-wallet-snap/src/api/address.ts index 08199f085..509624ac8 100644 --- a/packages/stellar-wallet-snap/src/api/address.ts +++ b/packages/stellar-wallet-snap/src/api/address.ts @@ -21,6 +21,29 @@ export const StellarAddressStruct = refine( }, ); +/** + * Validation struct for a Stellar secret seed (`S…` strkey / base32). + */ +export const StellarSecretKeyStruct = refine( + nonempty(string()), + 'stellar_secret_key', + (value: string) => { + try { + if (!StrKey.isValidEd25519SecretSeed(value)) { + return 'Invalid Stellar secret key'; + } + return true; + } catch { + return 'Invalid Stellar secret key'; + } + }, +); + +/** + * Type for a Stellar secret seed. + */ +export type StellarSecretKey = Infer; + export const StellarAddressOrContractStruct = refine( nonempty(string()), 'stellar_contract_or_address', diff --git a/packages/stellar-wallet-snap/src/constants.ts b/packages/stellar-wallet-snap/src/constants.ts index 588dafa3e..d655873d5 100644 --- a/packages/stellar-wallet-snap/src/constants.ts +++ b/packages/stellar-wallet-snap/src/constants.ts @@ -9,6 +9,14 @@ import snapManifest from '../snap.manifest.json'; export const SUPPORTED_SCOPES = snapManifest.initialPermissions['endowment:keyring'].capabilities.scopes; +/** + * Private-key export encoding supported by this snap. + * + * Always `base32` (Stellar `S…` strkey). Not read from the snap manifest: + * this snap does not support any other encoding. + */ +export const PRIVATE_KEY_EXPORT_ENCODING = 'base32' as const; + /** * The base reserve for the Stellar network. * diff --git a/packages/stellar-wallet-snap/src/context.ts b/packages/stellar-wallet-snap/src/context.ts index 3d13f9d4f..319b62e98 100644 --- a/packages/stellar-wallet-snap/src/context.ts +++ b/packages/stellar-wallet-snap/src/context.ts @@ -174,6 +174,7 @@ const keyringHandler = new KeyringHandler({ accountService, onChainAccountService, transactionService, + walletService, handlers: keyringMethodHandlers, }); diff --git a/packages/stellar-wallet-snap/src/handlers/keyring/api.test.ts b/packages/stellar-wallet-snap/src/handlers/keyring/api.test.ts index 069ae1196..324e922a1 100644 --- a/packages/stellar-wallet-snap/src/handlers/keyring/api.test.ts +++ b/packages/stellar-wallet-snap/src/handlers/keyring/api.test.ts @@ -1,10 +1,11 @@ -import { assert, StructError } from '@metamask/superstruct'; +import { assert, create, StructError } from '@metamask/superstruct'; import { KnownCaip2ChainId } from '../../api'; import type { StellarKeyringAccount } from '../../services/account'; import { generateMockStellarKeyringAccounts } from '../../services/account/__mocks__/account.fixtures'; import { CreateAccountOptionsStruct, + ExportAccountRequestStruct, ResolveAccountAddressRequestStruct, ListAccountTransactionsRequestStruct, MultichainMethod, @@ -586,3 +587,61 @@ describe('ListAccountTransactionsRequestStruct', () => { ); }); }); + +describe('ExportAccountRequestStruct', () => { + it.each([ + { + request: { accountId: account.id }, + expected: { + accountId: account.id, + options: { type: 'private-key' as const, encoding: 'base32' as const }, + }, + }, + { + request: { + accountId: account.id, + options: { type: 'private-key' as const }, + }, + expected: { + accountId: account.id, + options: { type: 'private-key' as const, encoding: 'base32' as const }, + }, + }, + { + request: { + accountId: account.id, + options: { type: 'private-key' as const, encoding: 'base32' as const }, + }, + expected: { + accountId: account.id, + options: { type: 'private-key' as const, encoding: 'base32' as const }, + }, + }, + ])('accepts a valid exportAccount request', ({ request, expected }) => { + expect(create(request, ExportAccountRequestStruct)).toStrictEqual(expected); + }); + + it.each([ + { accountId: 'not-a-uuid' }, + { + accountId: account.id, + options: { type: 'mnemonic', encoding: 'base32' }, + }, + { + accountId: account.id, + options: { type: 'private-key', encoding: 'utf-8' }, + }, + { + accountId: account.id, + options: { type: 'private-key', encoding: 'hexadecimal' }, + }, + { + accountId: account.id, + options: { type: 'private-key', encoding: 'base58' }, + }, + ])('rejects an invalid exportAccount request', (request) => { + expect(() => assert(request, ExportAccountRequestStruct)).toThrow( + StructError, + ); + }); +}); diff --git a/packages/stellar-wallet-snap/src/handlers/keyring/api.ts b/packages/stellar-wallet-snap/src/handlers/keyring/api.ts index e0bd78183..044b94af1 100644 --- a/packages/stellar-wallet-snap/src/handlers/keyring/api.ts +++ b/packages/stellar-wallet-snap/src/handlers/keyring/api.ts @@ -15,6 +15,7 @@ import { nullable, enums, refine, + defaulted, } from '@metamask/superstruct'; import type { Infer } from '@metamask/superstruct'; import { base64 } from '@metamask/utils'; @@ -29,6 +30,7 @@ import { KnownCaip2ChainId, KnownCaip2ChainIdStruct } from '../../api/network'; import { Utf8StringStruct } from '../../api/string'; import { UuidStruct } from '../../api/uuid'; import { HashIdPreimageXdrStruct, XdrStruct } from '../../api/xdr'; +import { PRIVATE_KEY_EXPORT_ENCODING } from '../../constants'; import { networkToCaip2ChainId } from '../../services/network/utils'; /** JSON-RPC methods supported by this snap's multichain keyring. */ @@ -306,6 +308,29 @@ export const SignAuthEntryResponseStruct = union([ */ export const GetAccountRequestStruct = UuidStruct; +/** + * Validation struct for the exportAccount request. + * + * Only {@link PRIVATE_KEY_EXPORT_ENCODING} (`base32`) is accepted. Missing + * `options` or `encoding` default to that encoding. + */ +export const ExportAccountRequestStruct = object({ + accountId: UuidStruct, + options: defaulted( + object({ + type: literal('private-key'), + encoding: defaulted( + enums([PRIVATE_KEY_EXPORT_ENCODING]), + PRIVATE_KEY_EXPORT_ENCODING, + ), + }), + { + type: 'private-key' as const, + encoding: PRIVATE_KEY_EXPORT_ENCODING, + }, + ), +}); + /** * Validation struct for the deleteAccount request. */ @@ -349,6 +374,11 @@ export type ResolveAccountAddressJsonRpcRequest = Infer< */ export type GetAccountRequest = Infer; +/** + * Type for the exportAccount request. + */ +export type ExportAccountRequest = Infer; + /** * Type for the deleteAccount request. */ diff --git a/packages/stellar-wallet-snap/src/handlers/keyring/exceptions.ts b/packages/stellar-wallet-snap/src/handlers/keyring/exceptions.ts index 4fec7fdaf..b4e9d7bf3 100644 --- a/packages/stellar-wallet-snap/src/handlers/keyring/exceptions.ts +++ b/packages/stellar-wallet-snap/src/handlers/keyring/exceptions.ts @@ -18,6 +18,11 @@ import { StellarSnapException } from '../../utils/errors'; export class KeyringException extends StellarSnapException {} +/** + * Thrown when private-key export fails. Messages must not include the secret. + */ +export class ExportAccountException extends KeyringException {} + /** * SEP-43 error codes. * diff --git a/packages/stellar-wallet-snap/src/handlers/keyring/keyring.test.ts b/packages/stellar-wallet-snap/src/handlers/keyring/keyring.test.ts index 0753e83e4..b572178d4 100644 --- a/packages/stellar-wallet-snap/src/handlers/keyring/keyring.test.ts +++ b/packages/stellar-wallet-snap/src/handlers/keyring/keyring.test.ts @@ -27,7 +27,8 @@ import { createMockTransactionService, generateMockTransactions, } from '../../services/transaction/__mocks__/transaction.fixtures'; -import { getDerivationPath } from '../../services/wallet'; +import { getDerivationPath, WalletService } from '../../services/wallet'; +import { getTestWallet } from '../../services/wallet/__mocks__/wallet.fixtures'; import { getSlip44AssetId, getDefaultEntropySource, @@ -43,6 +44,7 @@ import { SignTransactionResponseStruct, } from './api'; import type { IKeyringRequestHandler } from './base'; +import { ExportAccountException } from './exceptions'; import { KeyringHandler } from './keyring'; jest.mock('../../utils/logger'); @@ -106,7 +108,7 @@ describe('KeyringHandler', () => { mockSignTransactionHandler = { handle: jest.fn() }; mockSignAuthEntryHandler = { handle: jest.fn() }; - const { accountService, onChainAccountService } = + const { accountService, onChainAccountService, walletService } = mockOnChainAccountService(); const { transactionService } = createMockTransactionService(); keyringHandler = new KeyringHandler({ @@ -114,6 +116,7 @@ describe('KeyringHandler', () => { accountService, onChainAccountService, transactionService, + walletService, handlers: { [MultichainMethod.SignMessage]: mockSignMessageHandler, [MultichainMethod.SignTransaction]: mockSignTransactionHandler, @@ -154,6 +157,26 @@ describe('KeyringHandler', () => { expect(result).toBeNull(); }); + + it('does not log the keyring result (exportAccount returns a secret seed)', async () => { + const privateKey = + 'SAKICEVQLYWGSOJS4WW7HZJWAHZVEEBS527LHK5V4MLJALYKICQCJXMW'; + jest.mocked(handleKeyringRequest).mockResolvedValue({ + type: 'private-key', + encoding: 'base32', + privateKey, + }); + + await keyringHandler.handle(METAMASK_ORIGIN, { + method: 'keyring_exportAccount', + id: '1', + jsonrpc: '2.0', + } as JsonRpcRequest); + + expect(JSON.stringify(jest.mocked(logger.debug).mock.calls)).not.toContain( + privateKey, + ); + }); }); describe('getAccount', () => { @@ -627,6 +650,161 @@ describe('KeyringHandler', () => { }); }); + describe('exportAccount', () => { + it('exports the account private key as base32', async () => { + const { resolveAccountSpy } = getAccountServiceSpies(); + resolveAccountSpy.mockResolvedValue({ account: mockAccount }); + const wallet = getTestWallet(); + jest + .spyOn(WalletService.prototype, 'resolveWallet') + .mockResolvedValue(wallet); + + const result = await keyringHandler.exportAccount(mockAccountId, { + type: 'private-key', + encoding: 'base32', + }); + + expect(result).toStrictEqual({ + type: 'private-key', + encoding: 'base32', + privateKey: wallet.secret, + }); + }); + + it('defaults encoding to base32 when options omit encoding', async () => { + const { resolveAccountSpy } = getAccountServiceSpies(); + resolveAccountSpy.mockResolvedValue({ account: mockAccount }); + const wallet = getTestWallet(); + jest + .spyOn(WalletService.prototype, 'resolveWallet') + .mockResolvedValue(wallet); + + const result = await keyringHandler.exportAccount(mockAccountId, { + type: 'private-key', + } as { type: 'private-key'; encoding: 'base32' }); + + expect(result.encoding).toBe('base32'); + }); + + it('defaults to base32 encoding when options are omitted', async () => { + const { resolveAccountSpy } = getAccountServiceSpies(); + resolveAccountSpy.mockResolvedValue({ account: mockAccount }); + const wallet = getTestWallet(); + jest + .spyOn(WalletService.prototype, 'resolveWallet') + .mockResolvedValue(wallet); + + const result = await keyringHandler.exportAccount(mockAccountId); + + expect(result).toStrictEqual({ + type: 'private-key', + encoding: 'base32', + privateKey: wallet.secret, + }); + }); + + it('throws if the account id is not a uuid', async () => { + await expect( + keyringHandler.exportAccount('not-a-uuid', { + type: 'private-key', + encoding: 'base32', + }), + ).rejects.toThrow(InvalidParamsError); + }); + + it('throws if the account is not found', async () => { + const { resolveAccountSpy } = getAccountServiceSpies(); + resolveAccountSpy.mockRejectedValue( + new AccountNotFoundException(NON_EXISTENT_ID), + ); + + await expect( + keyringHandler.exportAccount(NON_EXISTENT_ID, { + type: 'private-key', + encoding: 'base32', + }), + ).rejects.toThrow(AccountNotFoundException); + }); + + it('rejects an unsupported encoding', async () => { + await expect( + keyringHandler.exportAccount(mockAccountId, { + type: 'private-key', + encoding: 'utf-8' as unknown as 'base32', + }), + ).rejects.toThrow(/Expected/u); + }); + + it('rejects hexadecimal export encoding', async () => { + await expect( + keyringHandler.exportAccount(mockAccountId, { + type: 'private-key', + encoding: 'hexadecimal', + }), + ).rejects.toThrow(InvalidParamsError); + }); + + it('rejects base58 export encoding', async () => { + await expect( + keyringHandler.exportAccount(mockAccountId, { + type: 'private-key', + encoding: 'base58', + }), + ).rejects.toThrow(InvalidParamsError); + }); + + it('rejects an unsupported export type', async () => { + await expect( + keyringHandler.exportAccount(mockAccountId, { + type: 'mnemonic' as unknown as 'private-key', + encoding: 'base32', + }), + ).rejects.toThrow(/Expected/u); + }); + + it('propagates wallet resolution errors', async () => { + const { resolveAccountSpy } = getAccountServiceSpies(); + resolveAccountSpy.mockResolvedValue({ account: mockAccount }); + jest + .spyOn(WalletService.prototype, 'resolveWallet') + .mockRejectedValue(new Error('derivation failed')); + + await expect(keyringHandler.exportAccount(mockAccountId)).rejects.toThrow( + 'derivation failed', + ); + }); + + it('throws ExportAccountException when the derived secret fails validation', async () => { + const { resolveAccountSpy } = getAccountServiceSpies(); + resolveAccountSpy.mockResolvedValue({ account: mockAccount }); + const wallet = getTestWallet(); + jest.spyOn(wallet, 'secret', 'get').mockReturnValue('not-a-secret'); + jest + .spyOn(WalletService.prototype, 'resolveWallet') + .mockResolvedValue(wallet); + + await expect(keyringHandler.exportAccount(mockAccountId)).rejects.toThrow( + ExportAccountException, + ); + }); + + it('throws a generic ExportAccountException when reading the secret fails', async () => { + const { resolveAccountSpy } = getAccountServiceSpies(); + resolveAccountSpy.mockResolvedValue({ account: mockAccount }); + const wallet = getTestWallet(); + jest.spyOn(wallet, 'secret', 'get').mockImplementation(() => { + throw new Error('secret() exploded'); + }); + jest + .spyOn(WalletService.prototype, 'resolveWallet') + .mockResolvedValue(wallet); + + await expect(keyringHandler.exportAccount(mockAccountId)).rejects.toThrow( + 'Error exporting account', + ); + }); + }); + describe('deleteAccount', () => { it('deletes an account', async () => { const { deleteSpy } = getAccountServiceSpies(); diff --git a/packages/stellar-wallet-snap/src/handlers/keyring/keyring.ts b/packages/stellar-wallet-snap/src/handlers/keyring/keyring.ts index 874237acc..2affbf36c 100644 --- a/packages/stellar-wallet-snap/src/handlers/keyring/keyring.ts +++ b/packages/stellar-wallet-snap/src/handlers/keyring/keyring.ts @@ -11,10 +11,15 @@ import { AccountCreationType, assertCreateAccountOptionIsSupported, } from '@metamask/keyring-api'; -import type { KeyringSnapRpc } from '@metamask/keyring-api/v2'; +import type { + ExportAccountOptions, + ExportedAccount, + KeyringSnapRpc, +} from '@metamask/keyring-api/v2'; import { handleKeyringRequest } from '@metamask/keyring-snap-sdk/v2'; import { InvalidParamsError } from '@metamask/snaps-sdk'; import type { Json, JsonRpcRequest } from '@metamask/snaps-sdk'; +import { is } from '@metamask/superstruct'; import type { CaipAssetType, CaipAssetTypeOrId, @@ -25,6 +30,7 @@ import type { KnownCaip19AssetIdOrSlip44Id, KnownCaip2ChainId, } from '../../api'; +import { StellarSecretKeyStruct } from '../../api'; import { AppConfig } from '../../config'; import type { AccountService, @@ -42,6 +48,7 @@ import { toStandardBalanceEntry, } from '../../services/on-chain-account'; import type { TransactionService } from '../../services/transaction/TransactionService'; +import type { WalletService } from '../../services/wallet'; import type { ILogger } from '../../utils'; import { createPrefixedLogger, @@ -49,6 +56,7 @@ import { getSlip44AssetId, isClassicAssetId, isSlip44Id, + rethrowIfInstanceElseThrow, validateOrigin, validateRequest, withCatchAndThrowSnapError, @@ -58,6 +66,7 @@ import { SyncAccountsHandler } from '../cronjob/syncAccounts'; import type { GetAccountRequest, MultichainMethod } from './api'; import { DeleteAccountRequestStruct, + ExportAccountRequestStruct, GetAccountRequestStruct, ListAccountTransactionsRequestStruct, MultichainMethodStruct, @@ -67,6 +76,7 @@ import { GetAccountBalancesRequestStruct, } from './api'; import type { IKeyringRequestHandler } from './base'; +import { ExportAccountException } from './exceptions'; export class KeyringHandler implements KeyringSnapRpc { readonly #logger: ILogger; @@ -77,6 +87,8 @@ export class KeyringHandler implements KeyringSnapRpc { readonly #transactionService: TransactionService; + readonly #walletService: WalletService; + readonly #handlers: Record; constructor({ @@ -84,18 +96,21 @@ export class KeyringHandler implements KeyringSnapRpc { accountService, onChainAccountService, transactionService, + walletService, handlers, }: { logger: ILogger; accountService: AccountService; onChainAccountService: OnChainAccountService; transactionService: TransactionService; + walletService: WalletService; handlers: Record; }) { this.#logger = createPrefixedLogger(logger, '[🔑 KeyringHandler]'); this.#accountService = accountService; this.#onChainAccountService = onChainAccountService; this.#transactionService = transactionService; + this.#walletService = walletService; this.#handlers = handlers; } @@ -111,7 +126,6 @@ export class KeyringHandler implements KeyringSnapRpc { this.#logger.debug('Keyring request handled', { origin, method: request.method, - result: keyringRequestResult, }); return keyringRequestResult; }, this.#logger)) ?? null; @@ -369,6 +383,57 @@ export class KeyringHandler implements KeyringSnapRpc { } } + /** + * Exports the Stellar secret seed for an account (`S…` strkey / base32). + * Triggered by the client when the user requests a private-key export. + * + * @param accountId - The id of the account to export. + * @param options - Export options. Encoding must be `base32`; omitted + * `options` / `encoding` default to `base32`. + * @returns The exported private key (`type`, `encoding`, `privateKey`). + * @throws {ExportAccountException} If the derived seed fails validation, or + * another error occurs while reading it (the latter uses a generic message + * so the secret is not leaked). + */ + async exportAccount( + accountId: string, + options?: ExportAccountOptions, + ): Promise { + const { options: exportOptions } = validateRequest( + { accountId, options }, + ExportAccountRequestStruct, + ); + + const { account } = await this.#accountService.resolveAccount({ + accountId, + }); + const wallet = await this.#walletService.resolveWallet(account); + + // For security reasons, we wrap the export in a try-catch block to avoid leaking the private key in case of an error. + try { + const privateKey = wallet.secret; + // SECURITY: Use `is` rather than `assert`. A StructError would embed the + // private key in its message. + if (!is(privateKey, StellarSecretKeyStruct)) { + throw new ExportAccountException( + 'Derived private key failed encoding validation', + ); + } + + return { + type: exportOptions.type, + encoding: exportOptions.encoding, + privateKey, + }; + } catch (error: unknown) { + return rethrowIfInstanceElseThrow( + error, + [ExportAccountException], + new ExportAccountException('Error exporting account'), + ); + } + } + async deleteAccount(accountId: string): Promise { validateRequest(accountId, DeleteAccountRequestStruct); diff --git a/packages/stellar-wallet-snap/src/permissions.ts b/packages/stellar-wallet-snap/src/permissions.ts index 7106f893e..e9de1a142 100644 --- a/packages/stellar-wallet-snap/src/permissions.ts +++ b/packages/stellar-wallet-snap/src/permissions.ts @@ -23,6 +23,7 @@ const metamaskPermissions = new Set([ KeyringSnapRpcMethod.GetAccountAssets, KeyringSnapRpcMethod.ResolveAccountAddress, KeyringSnapRpcMethod.SetSelectedAccounts, + KeyringSnapRpcMethod.ExportAccount, /** * Keyring API v1 method names, kept because consumers still call them. * Dropping them makes the client fail with an access restriction error on diff --git a/packages/stellar-wallet-snap/src/services/wallet/Wallet.test.ts b/packages/stellar-wallet-snap/src/services/wallet/Wallet.test.ts index cb568cdd3..7d83cec91 100644 --- a/packages/stellar-wallet-snap/src/services/wallet/Wallet.test.ts +++ b/packages/stellar-wallet-snap/src/services/wallet/Wallet.test.ts @@ -26,6 +26,16 @@ describe('Wallet', () => { }); }); + describe('secret', () => { + it('returns the Stellar secret seed for a derived wallet', () => { + const wallet = getTestWallet({ seed }); + const expected = Keypair.fromRawEd25519Seed( + bufferToUint8Array(seed), + ).secret(); + expect(wallet.secret).toStrictEqual(expected); + }); + }); + describe('signMessage', () => { it('returns a base64-encoded signature for a string message', () => { const wallet = getTestWallet({ seed }); diff --git a/packages/stellar-wallet-snap/src/services/wallet/Wallet.ts b/packages/stellar-wallet-snap/src/services/wallet/Wallet.ts index e651efc11..d5ae93af3 100644 --- a/packages/stellar-wallet-snap/src/services/wallet/Wallet.ts +++ b/packages/stellar-wallet-snap/src/services/wallet/Wallet.ts @@ -11,7 +11,8 @@ import { } from './exceptions'; /** - * Signing-only handle: Stellar SDK keypair for transaction and SEP-53 message signing. + * Handle over a Stellar SDK keypair: transaction / SEP-53 / SEP-43 signing + * and secret-seed export. */ export class Wallet { readonly #signer: Keypair; @@ -29,6 +30,17 @@ export class Wallet { return this.#signer.publicKey(); } + /** + * The Stellar secret seed (`S…` strkey / base32). + * + * Used by keyring `exportAccount`. + * + * @returns Secret seed string (`S…`). + */ + get secret(): string { + return this.#signer.secret(); + } + /** * Signs the given transaction with this wallet's signer. * diff --git a/packages/stellar-wallet-snap/src/utils/requestResponse.test.ts b/packages/stellar-wallet-snap/src/utils/requestResponse.test.ts index b6d7ed325..cf725c005 100644 --- a/packages/stellar-wallet-snap/src/utils/requestResponse.test.ts +++ b/packages/stellar-wallet-snap/src/utils/requestResponse.test.ts @@ -82,6 +82,7 @@ describe('validateOrigin', () => { KeyringSnapRpcMethod.GetAccountAssets, KeyringSnapRpcMethod.ResolveAccountAddress, KeyringSnapRpcMethod.SetSelectedAccounts, + KeyringSnapRpcMethod.ExportAccount, ])('allows method %s for metamask', (method) => { const origin = METAMASK_ORIGIN; From 80a55e6666f4724fa57df480d8a2717b18182269 Mon Sep 17 00:00:00 2001 From: Stanley Yuen <102275989+stanleyyconsensys@users.noreply.github.com> Date: Tue, 25 Aug 2026 16:34:47 +0800 Subject: [PATCH 2/8] chore: update change log --- packages/stellar-wallet-snap/CHANGELOG.md | 2 +- .../src/handlers/keyring/keyring.test.ts | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/stellar-wallet-snap/CHANGELOG.md b/packages/stellar-wallet-snap/CHANGELOG.md index 590a8349e..001e931ca 100644 --- a/packages/stellar-wallet-snap/CHANGELOG.md +++ b/packages/stellar-wallet-snap/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Add `exportAccount` keyring method for base32 Stellar secret-seed export +- Add `exportAccount` keyring method for base32 Stellar secret-seed export ([#187] https://github.com/MetaMask/internal-snaps/pull/187) ## [0.1.0] diff --git a/packages/stellar-wallet-snap/src/handlers/keyring/keyring.test.ts b/packages/stellar-wallet-snap/src/handlers/keyring/keyring.test.ts index b572178d4..8cf0ce14f 100644 --- a/packages/stellar-wallet-snap/src/handlers/keyring/keyring.test.ts +++ b/packages/stellar-wallet-snap/src/handlers/keyring/keyring.test.ts @@ -173,9 +173,9 @@ describe('KeyringHandler', () => { jsonrpc: '2.0', } as JsonRpcRequest); - expect(JSON.stringify(jest.mocked(logger.debug).mock.calls)).not.toContain( - privateKey, - ); + expect( + JSON.stringify(jest.mocked(logger.debug).mock.calls), + ).not.toContain(privateKey); }); }); @@ -681,8 +681,7 @@ describe('KeyringHandler', () => { const result = await keyringHandler.exportAccount(mockAccountId, { type: 'private-key', - } as { type: 'private-key'; encoding: 'base32' }); - + } as Parameters[1]); expect(result.encoding).toBe('base32'); }); From f2fa909915b6abd7cb67f2ee7928d95d61df9cad Mon Sep 17 00:00:00 2001 From: Stanley Yuen <102275989+stanleyyconsensys@users.noreply.github.com> Date: Tue, 25 Aug 2026 16:36:19 +0800 Subject: [PATCH 3/8] chore: update chg log --- packages/stellar-wallet-snap/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stellar-wallet-snap/CHANGELOG.md b/packages/stellar-wallet-snap/CHANGELOG.md index 001e931ca..efeb6822a 100644 --- a/packages/stellar-wallet-snap/CHANGELOG.md +++ b/packages/stellar-wallet-snap/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Add `exportAccount` keyring method for base32 Stellar secret-seed export ([#187] https://github.com/MetaMask/internal-snaps/pull/187) +- Add `exportAccount` keyring method for base32 Stellar secret-seed export ([#187](https://github.com/MetaMask/internal-snaps/pull/187)) ## [0.1.0] From 4d9d49a5f3a864792577cccbe047b7a216ab14ed Mon Sep 17 00:00:00 2001 From: Stanley Yuen <102275989+stanleyyconsensys@users.noreply.github.com> Date: Thu, 27 Aug 2026 12:51:13 +0800 Subject: [PATCH 4/8] chore: update shasum --- packages/stellar-wallet-snap/snap.manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stellar-wallet-snap/snap.manifest.json b/packages/stellar-wallet-snap/snap.manifest.json index ad0bea836..488b06deb 100644 --- a/packages/stellar-wallet-snap/snap.manifest.json +++ b/packages/stellar-wallet-snap/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/internal-snaps.git" }, "source": { - "shasum": "YriIFuTsARfiMBCCdkAcEqo5fpCoyKZaLzsfAuRT/Q8=", + "shasum": "EK/mdyAjMEM/0v2FGxs65NOvZBk5T7vQPQ/Fs/jlWU0=", "location": { "npm": { "filePath": "dist/bundle.js", From 0a94381a7c7a4f2f9af612667819cb5ca533a0a9 Mon Sep 17 00:00:00 2001 From: Stanley Yuen <102275989+stanleyyconsensys@users.noreply.github.com> Date: Tue, 1 Sep 2026 12:12:41 +0800 Subject: [PATCH 5/8] chore: use sensitive string --- packages/stellar-wallet-snap/src/api/address.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/stellar-wallet-snap/src/api/address.ts b/packages/stellar-wallet-snap/src/api/address.ts index 509624ac8..34560dc5f 100644 --- a/packages/stellar-wallet-snap/src/api/address.ts +++ b/packages/stellar-wallet-snap/src/api/address.ts @@ -1,4 +1,4 @@ -import { refine, string, nonempty } from '@metamask/superstruct'; +import { refine, string, nonempty, sensitive } from '@metamask/superstruct'; import type { Infer } from '@metamask/superstruct'; import { StrKey } from '@stellar/stellar-sdk'; @@ -7,7 +7,7 @@ import { StrKey } from '@stellar/stellar-sdk'; * We only support non-muxed addresses. */ export const StellarAddressStruct = refine( - nonempty(string()), + nonempty(sensitive(string())), 'stellar_address', (value: string) => { try { From d20fa626bef86951c6767515f9604a35fb8184a4 Mon Sep 17 00:00:00 2001 From: Stanley Yuen <102275989+stanleyyconsensys@users.noreply.github.com> Date: Tue, 1 Sep 2026 12:14:45 +0800 Subject: [PATCH 6/8] chore: rollback platform version --- packages/bitcoin-wallet-snap/snap.manifest.json | 2 +- packages/solana-wallet-snap/snap.manifest.json | 2 +- packages/stellar-wallet-snap/snap.manifest.json | 2 +- packages/tron-wallet-snap/snap.manifest.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/bitcoin-wallet-snap/snap.manifest.json b/packages/bitcoin-wallet-snap/snap.manifest.json index ecef0a1d3..344e0a8c7 100644 --- a/packages/bitcoin-wallet-snap/snap.manifest.json +++ b/packages/bitcoin-wallet-snap/snap.manifest.json @@ -110,6 +110,6 @@ ] } }, - "platformVersion": "11.2.0", + "platformVersion": "12.0.1", "manifestVersion": "0.1" } diff --git a/packages/solana-wallet-snap/snap.manifest.json b/packages/solana-wallet-snap/snap.manifest.json index 8a5f96c45..3db6ea623 100644 --- a/packages/solana-wallet-snap/snap.manifest.json +++ b/packages/solana-wallet-snap/snap.manifest.json @@ -90,6 +90,6 @@ "snap_dialog": {}, "snap_getPreferences": {} }, - "platformVersion": "11.2.0", + "platformVersion": "12.0.1", "manifestVersion": "0.1" } diff --git a/packages/stellar-wallet-snap/snap.manifest.json b/packages/stellar-wallet-snap/snap.manifest.json index d8bce9f7e..f595998db 100644 --- a/packages/stellar-wallet-snap/snap.manifest.json +++ b/packages/stellar-wallet-snap/snap.manifest.json @@ -64,6 +64,6 @@ "scopes": ["stellar:pubnet"] } }, - "platformVersion": "11.2.0", + "platformVersion": "12.0.1", "manifestVersion": "0.1" } diff --git a/packages/tron-wallet-snap/snap.manifest.json b/packages/tron-wallet-snap/snap.manifest.json index 8ed1ab610..b7aac060f 100644 --- a/packages/tron-wallet-snap/snap.manifest.json +++ b/packages/tron-wallet-snap/snap.manifest.json @@ -73,6 +73,6 @@ ] } }, - "platformVersion": "11.2.0", + "platformVersion": "12.0.1", "manifestVersion": "0.1" } From 4e0315b561d43327174a085ed8809da329369dca Mon Sep 17 00:00:00 2001 From: Stanley Yuen <102275989+stanleyyconsensys@users.noreply.github.com> Date: Tue, 1 Sep 2026 12:18:06 +0800 Subject: [PATCH 7/8] Update CHANGELOG.md --- packages/stellar-wallet-snap/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stellar-wallet-snap/CHANGELOG.md b/packages/stellar-wallet-snap/CHANGELOG.md index 9ea70ce8d..aef859324 100644 --- a/packages/stellar-wallet-snap/CHANGELOG.md +++ b/packages/stellar-wallet-snap/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Add `exportAccount` keyring method for base32 Stellar secret-seed export ([#187](https://github.com/MetaMask/internal-snaps/pull/187)) +- Add `exportAccount` keyring method for base32 Stellar secret-seed export ([#217](https://github.com/MetaMask/internal-snaps/pull/217)) - Add `TrustlineExceedLimitException` for send simulation when a payment would exceed the destination trustline limit (previously a generic `TransactionValidationException`) ([#185](https://github.com/MetaMask/internal-snaps/pull/185)) - Add `@metamask/snap-networks-utils` `^1.0.0` ([#182](https://github.com/MetaMask/internal-snaps/pull/182)) - Use the shared `Logger` From 6eb973af26e6a44fcd036dc802e0644f4cdaa052 Mon Sep 17 00:00:00 2001 From: Stanley Yuen <102275989+stanleyyconsensys@users.noreply.github.com> Date: Tue, 1 Sep 2026 08:36:16 +0000 Subject: [PATCH 8/8] bump: `snap-sdk` to `12.0.1` + `snap-utils` to `12.6.0 ` + `keyring-api` to `24.1.0` + `snaps-execution-environments` to `11.3.0` + `metamask/snaps-jest` to `10.2.1` + `metamask/keyring-snap-sdk` to `10.0.0` (#214) ## Explanation ### This PR bumps - snap-sdk from 11.2.0 to 12.0.1 - it is a breaking change from snap-sdk, as it requires kerying api 24.1.0+ - it will start to pass the `Origin metadata` to keyring api submit request, but none of our validation is blocking it, so it is safe to bump - snap-utils from 12.4.0 to 12.6.0 - kerying api from 23.7.0 to 24.1.0 - it is a breaking change from keyring api, as it drop node version support 20 and 18 - Client already support that version, safe to bump - snaps-execution-environments from 11.2.0 to 11.3.0 - metamask/snaps-jest 10.2.0 to 10.2.1 - metamask/keyring-snap-sdk 9.2.1 to 10.0.0 ### With those bumps, they add - support PrivateKeyEncoding with base32 (It will be used for Stellar Private Key Export) - support for the optional originMetadata property to all handlers that also support origin ### Test bump PR on client https://github.com/MetaMask/metamask-extension/pull/45822 ## References ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/internal-snaps/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/internal-snaps/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them --- package.json | 5 +- packages/bitcoin-wallet-snap/CHANGELOG.md | 3 + packages/bitcoin-wallet-snap/package.json | 8 +- .../bitcoin-wallet-snap/snap.manifest.json | 2 +- packages/sample-snap/CHANGELOG.md | 2 +- packages/sample-snap/package.json | 4 +- packages/sample-snap/snap.manifest.json | 2 +- packages/snap-networks-utils/CHANGELOG.md | 1 + packages/snap-networks-utils/package.json | 2 +- packages/solana-wallet-snap/CHANGELOG.md | 3 + packages/solana-wallet-snap/package.json | 8 +- .../solana-wallet-snap/snap.manifest.json | 2 +- packages/stellar-wallet-snap/CHANGELOG.md | 3 + packages/stellar-wallet-snap/package.json | 8 +- .../stellar-wallet-snap/snap.manifest.json | 2 +- packages/tron-wallet-snap/CHANGELOG.md | 6 + packages/tron-wallet-snap/package.json | 8 +- packages/tron-wallet-snap/snap.manifest.json | 2 +- yarn.lock | 180 +++++++++++------- 19 files changed, 154 insertions(+), 97 deletions(-) diff --git a/package.json b/package.json index bf25d39f8..d14872289 100644 --- a/package.json +++ b/package.json @@ -83,8 +83,9 @@ "yargs": "^17.7.2" }, "resolutions": { - "@metamask/snaps-execution-environments": "11.2.0", - "@metamask/snaps-sdk": "11.2.0", + "@metamask/snaps-execution-environments": "11.3.0", + "@metamask/snaps-sdk": "12.0.1", + "@metamask/snaps-utils": "12.6.0", "@solana/addresses": "2.1.0", "@solana/kit": "2.1.0", "@stellar/stellar-sdk/axios@npm:1.15.0": "1.18.1", diff --git a/packages/bitcoin-wallet-snap/CHANGELOG.md b/packages/bitcoin-wallet-snap/CHANGELOG.md index 6ae8c43dd..0d8a862e0 100644 --- a/packages/bitcoin-wallet-snap/CHANGELOG.md +++ b/packages/bitcoin-wallet-snap/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- **BREAKING** Bump `@metamask/keyring-api` from `^23.7.0` to `^24.1.0` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) +- **BREAKING** Bump `@metamask/keyring-snap-sdk` from `^9.2.1` to `^10.0.0` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) +- **BREAKING** Bump `@metamask/snaps-sdk` from `^11.2.0` to `^12.0.1` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) - Reduce `keyring_createAccounts` entropy RPCs from one per account to one per distinct parent path by fetching the account-level parent node once and deriving hardened children locally ([#221](https://github.com/MetaMask/internal-snaps/pull/221)) - The private parent node is held transiently in memory during the batch — the same trust boundary as the previous per-account implementation — and children are neutered before descriptor construction. - The creation concurrency throttle is removed: with derivation local, the remaining per-account work is synchronous WASM wallet construction. diff --git a/packages/bitcoin-wallet-snap/package.json b/packages/bitcoin-wallet-snap/package.json index 6d051a460..2c6ac9603 100644 --- a/packages/bitcoin-wallet-snap/package.json +++ b/packages/bitcoin-wallet-snap/package.json @@ -52,13 +52,13 @@ "@metamask/auto-changelog": "^6.1.1", "@metamask/bitcoindevkit": "^0.1.13", "@metamask/key-tree": "^10.1.1", - "@metamask/keyring-api": "^23.7.0", - "@metamask/keyring-snap-sdk": "^9.2.1", + "@metamask/keyring-api": "^24.1.0", + "@metamask/keyring-snap-sdk": "^10.0.0", "@metamask/slip44": "^4.2.0", "@metamask/snap-networks-utils": "^1.0.0", "@metamask/snaps-cli": "^8.4.1", - "@metamask/snaps-jest": "^10.2.0", - "@metamask/snaps-sdk": "^11.2.0", + "@metamask/snaps-jest": "^10.2.1", + "@metamask/snaps-sdk": "^12.0.1", "@metamask/superstruct": "^3.4.1", "@metamask/utils": "^11.11.0", "bip322-js": "^3.0.0", diff --git a/packages/bitcoin-wallet-snap/snap.manifest.json b/packages/bitcoin-wallet-snap/snap.manifest.json index ecef0a1d3..344e0a8c7 100644 --- a/packages/bitcoin-wallet-snap/snap.manifest.json +++ b/packages/bitcoin-wallet-snap/snap.manifest.json @@ -110,6 +110,6 @@ ] } }, - "platformVersion": "11.2.0", + "platformVersion": "12.0.1", "manifestVersion": "0.1" } diff --git a/packages/sample-snap/CHANGELOG.md b/packages/sample-snap/CHANGELOG.md index a88d9d4b8..e1c218cee 100644 --- a/packages/sample-snap/CHANGELOG.md +++ b/packages/sample-snap/CHANGELOG.md @@ -14,6 +14,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Bump `@metamask/snaps-cli` from `^8.3.0` to `^8.4.1` ([#56](https://github.com/MetaMask/internal-snaps/pull/56)) -- Bump `@metamask/snaps-sdk` from `11.1.1` to `11.2.0` ([#56](https://github.com/MetaMask/internal-snaps/pull/56)) +- Bump `@metamask/snaps-sdk` from `^11.1.1` to `^12.0.1` ([#56](https://github.com/MetaMask/internal-snaps/pull/56), [#214](https://github.com/MetaMask/internal-snaps/pull/214)) [Unreleased]: https://github.com/MetaMask/internal-snaps/ diff --git a/packages/sample-snap/package.json b/packages/sample-snap/package.json index 4a98e4a4a..868d93eb7 100644 --- a/packages/sample-snap/package.json +++ b/packages/sample-snap/package.json @@ -43,8 +43,8 @@ "@jest/globals": "^29.5.0", "@metamask/auto-changelog": "^6.1.1", "@metamask/snaps-cli": "^8.4.1", - "@metamask/snaps-jest": "^10.2.0", - "@metamask/snaps-sdk": "^11.2.0", + "@metamask/snaps-jest": "^10.2.1", + "@metamask/snaps-sdk": "^12.0.1", "@types/react": "18.2.4", "@types/react-dom": "18.2.4", "eslint": "^9.39.1", diff --git a/packages/sample-snap/snap.manifest.json b/packages/sample-snap/snap.manifest.json index 6f1479004..2e1baf374 100644 --- a/packages/sample-snap/snap.manifest.json +++ b/packages/sample-snap/snap.manifest.json @@ -23,6 +23,6 @@ "snaps": false } }, - "platformVersion": "11.1.1", + "platformVersion": "12.0.1", "manifestVersion": "0.1" } diff --git a/packages/snap-networks-utils/CHANGELOG.md b/packages/snap-networks-utils/CHANGELOG.md index 80837ab97..de8c47267 100644 --- a/packages/snap-networks-utils/CHANGELOG.md +++ b/packages/snap-networks-utils/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **BREAKING** Replace the logger utilities with a configurable `Logger` class that requires a log level and supports level filtering, per-instance prefixes, and method decorators. ([#136](https://github.com/MetaMask/internal-snaps/pull/136)) - Bump `@metamask/utils` from `^11.9.0` to `^11.11.9` ([#161](https://github.com/MetaMask/internal-snaps/pull/161)) +- **BREAKING** Bump `@metamask/snaps-sdk` from `^11.2.0` to `^12.0.1` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) ## [1.0.0] diff --git a/packages/snap-networks-utils/package.json b/packages/snap-networks-utils/package.json index a62840d2b..5fc829e8a 100644 --- a/packages/snap-networks-utils/package.json +++ b/packages/snap-networks-utils/package.json @@ -73,7 +73,7 @@ "dependencies": { "@metamask/assets-controller": "^13.0.0", "@metamask/remote-feature-flag-controller": "^5.0.0", - "@metamask/snaps-sdk": "^11.2.0", + "@metamask/snaps-sdk": "^12.0.1", "@metamask/superstruct": "^3.4.1", "@metamask/utils": "^11.11.0", "bignumber.js": "^9.3.1", diff --git a/packages/solana-wallet-snap/CHANGELOG.md b/packages/solana-wallet-snap/CHANGELOG.md index 91f8d49ac..433958401 100644 --- a/packages/solana-wallet-snap/CHANGELOG.md +++ b/packages/solana-wallet-snap/CHANGELOG.md @@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Extract Snap-owned assets domain logic into `SnapAssetsAdapter`; `AssetsService` is a thin facade that delegates metadata, market data, fetch, persist, and account asset reads through the adapter (no Core routing yet). ([#121](https://github.com/MetaMask/internal-snaps/pull/121)) - Align `AssetsService` read API with `snap-networks-utils` / AssetsController shapes by adding `getAccountAssetByID`, `getAccountAssetsByIDs`, `getAccountAssetsByScope`, and `getAccountAssets`, and routing Keyring and Send through them (still Snap-owned storage). ([#120](https://github.com/MetaMask/internal-snaps/pull/120)) - Bump `@metamask/utils` from `^11.9.0` to `^11.11.9` ([#161](https://github.com/MetaMask/internal-snaps/pull/161)) +- **BREAKING** Bump `@metamask/keyring-api` from `^23.7.0` to `^24.1.0` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) +- **BREAKING** Bump `@metamask/keyring-snap-sdk` from `^9.2.1` to `^10.0.0` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) +- **BREAKING** Bump `@metamask/snaps-sdk` from `^11.2.0` to `^12.0.1` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) ### Fixed diff --git a/packages/solana-wallet-snap/package.json b/packages/solana-wallet-snap/package.json index 5a3f22cbd..f8d11e635 100644 --- a/packages/solana-wallet-snap/package.json +++ b/packages/solana-wallet-snap/package.json @@ -54,12 +54,12 @@ "@jest/globals": "^29.5.0", "@metamask/auto-changelog": "^6.1.1", "@metamask/key-tree": "^10.1.1", - "@metamask/keyring-api": "^23.7.0", - "@metamask/keyring-snap-sdk": "^9.2.1", + "@metamask/keyring-api": "^24.1.0", + "@metamask/keyring-snap-sdk": "^10.0.0", "@metamask/snap-networks-utils": "^1.0.0", "@metamask/snaps-cli": "^8.4.1", - "@metamask/snaps-jest": "^10.2.0", - "@metamask/snaps-sdk": "^11.2.0", + "@metamask/snaps-jest": "^10.2.1", + "@metamask/snaps-sdk": "^12.0.1", "@metamask/superstruct": "^3.4.1", "@metamask/utils": "^11.11.0", "@noble/ed25519": "2.1.0", diff --git a/packages/solana-wallet-snap/snap.manifest.json b/packages/solana-wallet-snap/snap.manifest.json index 8a5f96c45..3db6ea623 100644 --- a/packages/solana-wallet-snap/snap.manifest.json +++ b/packages/solana-wallet-snap/snap.manifest.json @@ -90,6 +90,6 @@ "snap_dialog": {}, "snap_getPreferences": {} }, - "platformVersion": "11.2.0", + "platformVersion": "12.0.1", "manifestVersion": "0.1" } diff --git a/packages/stellar-wallet-snap/CHANGELOG.md b/packages/stellar-wallet-snap/CHANGELOG.md index 23fdc5a7d..d1576eabc 100644 --- a/packages/stellar-wallet-snap/CHANGELOG.md +++ b/packages/stellar-wallet-snap/CHANGELOG.md @@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - `createValidatedSendTransaction` now throws `InvalidAssetForCreateAccountException` instead of `AccountNotActivatedException` when sending a non-native asset to an unfunded destination ([#185](https://github.com/MetaMask/internal-snaps/pull/185)) +- **BREAKING** Bump `@metamask/keyring-api` from `^23.7.0` to `^24.1.0` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) +- **BREAKING** Bump `@metamask/keyring-snap-sdk` from `^9.2.1` to `^10.0.0` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) +- **BREAKING** Bump `@metamask/snaps-sdk` from `^11.2.0` to `^12.0.1` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) ## [0.1.0] diff --git a/packages/stellar-wallet-snap/package.json b/packages/stellar-wallet-snap/package.json index 3fd217dfb..e0da4aac6 100644 --- a/packages/stellar-wallet-snap/package.json +++ b/packages/stellar-wallet-snap/package.json @@ -50,12 +50,12 @@ "devDependencies": { "@metamask/auto-changelog": "^6.1.1", "@metamask/key-tree": "^10.1.1", - "@metamask/keyring-api": "^23.7.0", - "@metamask/keyring-snap-sdk": "^9.2.1", + "@metamask/keyring-api": "^24.1.0", + "@metamask/keyring-snap-sdk": "^10.0.0", "@metamask/snap-networks-utils": "^1.0.0", "@metamask/snaps-cli": "^8.4.1", - "@metamask/snaps-jest": "^10.2.0", - "@metamask/snaps-sdk": "^11.2.0", + "@metamask/snaps-jest": "^10.2.1", + "@metamask/snaps-sdk": "^12.0.1", "@metamask/superstruct": "^3.4.1", "@metamask/utils": "^11.11.0", "@stellar/stellar-sdk": "^15.0.1", diff --git a/packages/stellar-wallet-snap/snap.manifest.json b/packages/stellar-wallet-snap/snap.manifest.json index d8bce9f7e..f595998db 100644 --- a/packages/stellar-wallet-snap/snap.manifest.json +++ b/packages/stellar-wallet-snap/snap.manifest.json @@ -64,6 +64,6 @@ "scopes": ["stellar:pubnet"] } }, - "platformVersion": "11.2.0", + "platformVersion": "12.0.1", "manifestVersion": "0.1" } diff --git a/packages/tron-wallet-snap/CHANGELOG.md b/packages/tron-wallet-snap/CHANGELOG.md index 395cfd005..29b0b54d0 100644 --- a/packages/tron-wallet-snap/CHANGELOG.md +++ b/packages/tron-wallet-snap/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- **BREAKING** Bump `@metamask/keyring-api` from `^23.7.0` to `^24.1.0` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) +- **BREAKING** Bump `@metamask/keyring-snap-sdk` from `^9.2.1` to `^10.0.0` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) +- **BREAKING** Bump `@metamask/snaps-sdk` from `^11.2.0` to `^12.0.1` ([#214](https://github.com/MetaMask/internal-snaps/pull/214)) + ## [3.2.0] ### Added diff --git a/packages/tron-wallet-snap/package.json b/packages/tron-wallet-snap/package.json index a331f4ab9..31eb474a3 100644 --- a/packages/tron-wallet-snap/package.json +++ b/packages/tron-wallet-snap/package.json @@ -51,14 +51,14 @@ "@metamask/assets-controller": "^13.0.0", "@metamask/auto-changelog": "^6.1.1", "@metamask/key-tree": "^10.1.1", - "@metamask/keyring-api": "^23.7.0", - "@metamask/keyring-snap-sdk": "^9.2.1", + "@metamask/keyring-api": "^24.1.0", + "@metamask/keyring-snap-sdk": "^10.0.0", "@metamask/messenger": "^2.0.0", "@metamask/remote-feature-flag-controller": "^5.0.0", "@metamask/snap-networks-utils": "^1.0.0", "@metamask/snaps-cli": "^8.4.1", - "@metamask/snaps-jest": "^10.2.0", - "@metamask/snaps-sdk": "^11.2.0", + "@metamask/snaps-jest": "^10.2.1", + "@metamask/snaps-sdk": "^12.0.1", "@metamask/superstruct": "^3.4.1", "@metamask/utils": "^11.11.0", "@types/lodash": "^4.17.15", diff --git a/packages/tron-wallet-snap/snap.manifest.json b/packages/tron-wallet-snap/snap.manifest.json index 8ed1ab610..b7aac060f 100644 --- a/packages/tron-wallet-snap/snap.manifest.json +++ b/packages/tron-wallet-snap/snap.manifest.json @@ -73,6 +73,6 @@ ] } }, - "platformVersion": "11.2.0", + "platformVersion": "12.0.1", "manifestVersion": "0.1" } diff --git a/yarn.lock b/yarn.lock index b6e1138bf..9d49d909e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1968,7 +1968,7 @@ __metadata: languageName: node linkType: hard -"@metamask/analytics-controller@npm:^1.1.1": +"@metamask/analytics-controller@npm:^1.2.1": version: 1.2.1 resolution: "@metamask/analytics-controller@npm:1.2.1" dependencies: @@ -2153,13 +2153,13 @@ __metadata: "@metamask/auto-changelog": "npm:^6.1.1" "@metamask/bitcoindevkit": "npm:^0.1.13" "@metamask/key-tree": "npm:^10.1.1" - "@metamask/keyring-api": "npm:^23.7.0" - "@metamask/keyring-snap-sdk": "npm:^9.2.1" + "@metamask/keyring-api": "npm:^24.1.0" + "@metamask/keyring-snap-sdk": "npm:^10.0.0" "@metamask/slip44": "npm:^4.2.0" "@metamask/snap-networks-utils": "npm:^1.0.0" "@metamask/snaps-cli": "npm:^8.4.1" - "@metamask/snaps-jest": "npm:^10.2.0" - "@metamask/snaps-sdk": "npm:^11.2.0" + "@metamask/snaps-jest": "npm:^10.2.1" + "@metamask/snaps-sdk": "npm:^12.0.1" "@metamask/superstruct": "npm:^3.4.1" "@metamask/utils": "npm:^11.11.0" bip322-js: "npm:^3.0.0" @@ -2193,7 +2193,7 @@ __metadata: languageName: node linkType: hard -"@metamask/chain-agnostic-permission@npm:^1.6.2": +"@metamask/chain-agnostic-permission@npm:^1.7.0": version: 1.7.0 resolution: "@metamask/chain-agnostic-permission@npm:1.7.0" dependencies: @@ -2785,6 +2785,18 @@ __metadata: languageName: node linkType: hard +"@metamask/keyring-api@npm:^24.1.0": + version: 24.1.0 + resolution: "@metamask/keyring-api@npm:24.1.0" + dependencies: + "@metamask/keyring-utils": "npm:^5.0.0" + "@metamask/superstruct": "npm:^3.4.1" + "@metamask/utils": "npm:^11.11.0" + bitcoin-address-validation: "npm:^2.2.3" + checksum: 10/bb2544281d1ec30900245cbd7d056234a69d121520851bf0c1f1ee13f0bbc4b111444ef47192ae2f1cfd8e265764d5e581d6bfed4e7b29f4cd020a4b7b950bb9 + languageName: node + linkType: hard + "@metamask/keyring-controller@npm:^27.1.0": version: 27.1.0 resolution: "@metamask/keyring-controller@npm:27.1.0" @@ -2866,6 +2878,22 @@ __metadata: languageName: node linkType: hard +"@metamask/keyring-snap-sdk@npm:^10.0.0": + version: 10.0.0 + resolution: "@metamask/keyring-snap-sdk@npm:10.0.0" + dependencies: + "@metamask/keyring-utils": "npm:^5.0.0" + "@metamask/snaps-sdk": "npm:^11.0.0" + "@metamask/superstruct": "npm:^3.4.1" + "@metamask/utils": "npm:^11.11.0" + webextension-polyfill: "npm:^0.12.0" + peerDependencies: + "@metamask/keyring-api": ^24.0.0 + "@metamask/providers": ^19.0.0 + checksum: 10/2b12b3b08d0ecb839547e2e367808797cc365a364e8a111250a056371fb86c91c5cae0bf57ebce8e80e1ffbd9f462422e217ca8f1b97753a5f4a8ff5fff2e902 + languageName: node + linkType: hard + "@metamask/keyring-snap-sdk@npm:^9.2.1": version: 9.2.1 resolution: "@metamask/keyring-snap-sdk@npm:9.2.1" @@ -2906,6 +2934,18 @@ __metadata: languageName: node linkType: hard +"@metamask/keyring-utils@npm:^5.0.0": + version: 5.0.0 + resolution: "@metamask/keyring-utils@npm:5.0.0" + dependencies: + "@ethereumjs/tx": "npm:^5.4.0" + "@metamask/superstruct": "npm:^3.4.1" + "@metamask/utils": "npm:^11.11.0" + bitcoin-address-validation: "npm:^2.2.3" + checksum: 10/261cad056370ec89c2d2b29afddfe50dfe0dca302a0f70380eb1fc96c31348bcefdd087d0e17fbe7dec39603408eea1acf8ebc36f230a8b8897fa9e231e4a2b2 + languageName: node + linkType: hard + "@metamask/message-manager@npm:^14.1.1": version: 14.1.2 resolution: "@metamask/message-manager@npm:14.1.2" @@ -3254,8 +3294,8 @@ __metadata: "@jest/globals": "npm:^29.5.0" "@metamask/auto-changelog": "npm:^6.1.1" "@metamask/snaps-cli": "npm:^8.4.1" - "@metamask/snaps-jest": "npm:^10.2.0" - "@metamask/snaps-sdk": "npm:^11.2.0" + "@metamask/snaps-jest": "npm:^10.2.1" + "@metamask/snaps-sdk": "npm:^12.0.1" "@types/react": "npm:18.2.4" "@types/react-dom": "npm:18.2.4" eslint: "npm:^9.39.1" @@ -3309,7 +3349,7 @@ __metadata: "@metamask/auto-changelog": "npm:^6.1.1" "@metamask/messenger": "npm:^2.0.0" "@metamask/remote-feature-flag-controller": "npm:^5.0.0" - "@metamask/snaps-sdk": "npm:^11.2.0" + "@metamask/snaps-sdk": "npm:^12.0.1" "@metamask/superstruct": "npm:^3.4.1" "@metamask/utils": "npm:^11.11.0" "@ts-bridge/cli": "npm:^0.6.4" @@ -3423,27 +3463,27 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-controllers@npm:^21.0.0": - version: 21.0.0 - resolution: "@metamask/snaps-controllers@npm:21.0.0" +"@metamask/snaps-controllers@npm:^21.1.0": + version: 21.1.0 + resolution: "@metamask/snaps-controllers@npm:21.1.0" dependencies: - "@metamask/analytics-controller": "npm:^1.1.1" + "@metamask/analytics-controller": "npm:^1.2.1" "@metamask/approval-controller": "npm:^9.0.2" "@metamask/base-controller": "npm:^9.1.0" "@metamask/json-rpc-engine": "npm:^10.5.0" "@metamask/json-rpc-middleware-stream": "npm:^8.0.8" "@metamask/key-tree": "npm:^10.1.1" - "@metamask/messenger": "npm:^1.2.0" + "@metamask/messenger": "npm:^2.0.0" "@metamask/object-multiplex": "npm:^2.1.0" "@metamask/permission-controller": "npm:^13.1.1" "@metamask/post-message-stream": "npm:^10.0.0" "@metamask/rpc-errors": "npm:^7.0.3" "@metamask/snaps-registry": "npm:^4.0.0" - "@metamask/snaps-rpc-methods": "npm:^17.0.0" - "@metamask/snaps-sdk": "npm:^11.1.1" - "@metamask/snaps-utils": "npm:^12.2.1" + "@metamask/snaps-rpc-methods": "npm:^17.1.1" + "@metamask/snaps-sdk": "npm:^12.0.0" + "@metamask/snaps-utils": "npm:^12.5.0" "@metamask/storage-service": "npm:^1.0.2" - "@metamask/superstruct": "npm:^3.2.1" + "@metamask/superstruct": "npm:^3.3.0" "@metamask/utils": "npm:^11.11.0" "@xstate/fsm": "npm:^2.0.0" async-mutex: "npm:^0.5.0" @@ -3459,49 +3499,49 @@ __metadata: semver: "npm:^7.5.4" tar-stream: "npm:^3.1.7" peerDependencies: - "@metamask/snaps-execution-environments": ^11.1.1 + "@metamask/snaps-execution-environments": ^11.3.0 peerDependenciesMeta: "@metamask/snaps-execution-environments": optional: true - checksum: 10/349fa04143a181ff52f68b6c3217157e09f0821eed0f4a2898af0c2897d221faf41f734a78c65dcbaa2666904fcde4d0880a8e38ca5496fec5f24add1de24219 + checksum: 10/fda303cddbe2f3cadc261f481c01d392f9ea8e4bd5937cbce4b78f34f780091b5fe906a85d1fae3862cffb35775d51e3152cd44b9a978cfa30a80cedf78aab7d languageName: node linkType: hard -"@metamask/snaps-execution-environments@npm:11.2.0": - version: 11.2.0 - resolution: "@metamask/snaps-execution-environments@npm:11.2.0" +"@metamask/snaps-execution-environments@npm:11.3.0": + version: 11.3.0 + resolution: "@metamask/snaps-execution-environments@npm:11.3.0" dependencies: "@metamask/json-rpc-engine": "npm:^10.5.0" "@metamask/object-multiplex": "npm:^2.1.0" "@metamask/post-message-stream": "npm:^10.0.0" "@metamask/providers": "npm:^22.1.1" "@metamask/rpc-errors": "npm:^7.0.3" - "@metamask/snaps-sdk": "npm:^11.2.0" - "@metamask/snaps-utils": "npm:^12.4.0" + "@metamask/snaps-sdk": "npm:^12.0.0" + "@metamask/snaps-utils": "npm:^12.5.0" "@metamask/superstruct": "npm:^3.3.0" "@metamask/utils": "npm:^11.11.0" readable-stream: "npm:^3.6.2" - checksum: 10/531d4d73927d4e11b750d15d871450139042cf35813e4b322de82f17239297462390f338cff331e335daa9ce44eda737ff42010586aed1c40beca7df5182fe3b + checksum: 10/618a15af5470cb60bf33986f780b3be663a24e062d4fd6211eacf16b2256593eb0afae6403aeae12c5e366519abb231a6c3ba86c84873883a287dc692e7c599c languageName: node linkType: hard -"@metamask/snaps-jest@npm:^10.2.0": - version: 10.2.0 - resolution: "@metamask/snaps-jest@npm:10.2.0" +"@metamask/snaps-jest@npm:^10.2.1": + version: 10.2.1 + resolution: "@metamask/snaps-jest@npm:10.2.1" dependencies: "@jest/environment": "npm:^29.5.0" "@jest/expect": "npm:^29.5.0" "@jest/globals": "npm:^29.5.0" - "@metamask/snaps-controllers": "npm:^21.0.0" - "@metamask/snaps-sdk": "npm:^11.2.0" - "@metamask/snaps-simulation": "npm:^4.3.0" + "@metamask/snaps-controllers": "npm:^21.1.0" + "@metamask/snaps-sdk": "npm:^12.0.0" + "@metamask/snaps-simulation": "npm:^4.3.1" "@metamask/superstruct": "npm:^3.3.0" "@metamask/utils": "npm:^11.11.0" express: "npm:^5.1.0" jest-environment-node: "npm:^29.5.0" jest-matcher-utils: "npm:^29.5.0" redux: "npm:^4.2.1" - checksum: 10/020c095b5672541ff840bf02f3e90178978fb14c2c6e35be0146748213f818975df6cce07e8ccf935875c11a38004787aebcc13f2175bda511f9ccc1c6488ca0 + checksum: 10/6e3ac9691ecd2809542e4a6d8016182a5c341bda7193b063d87bb3171edfd8586a3cf5f478bf116408ff60eb2b008d3e66b60ccc96dcf84b2e6a85ea1d7fa9e1 languageName: node linkType: hard @@ -3551,20 +3591,20 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-rpc-methods@npm:^17.0.0, @metamask/snaps-rpc-methods@npm:^17.1.0": - version: 17.1.0 - resolution: "@metamask/snaps-rpc-methods@npm:17.1.0" +"@metamask/snaps-rpc-methods@npm:^17.1.1": + version: 17.1.2 + resolution: "@metamask/snaps-rpc-methods@npm:17.1.2" dependencies: "@metamask/key-tree": "npm:^10.1.1" "@metamask/permission-controller": "npm:^13.1.1" "@metamask/rpc-errors": "npm:^7.0.3" - "@metamask/snaps-sdk": "npm:^11.2.0" - "@metamask/snaps-utils": "npm:^12.3.0" + "@metamask/snaps-sdk": "npm:^12.0.1" + "@metamask/snaps-utils": "npm:^12.6.0" "@metamask/superstruct": "npm:^3.3.0" "@metamask/utils": "npm:^11.11.0" "@noble/hashes": "npm:^1.7.1" async-mutex: "npm:^0.5.0" - checksum: 10/0afcd10f7f45611b74845c757bf9cad49044b51bfa1cf4043690f2084ad422684405aac405abed2b1c7f314857a6d208e902204dc82055d40f3a40c49c00c81d + checksum: 10/b2c477a09e5f9c11295547022ab1f369cad293a95b4d5088f8b28debb43d19e89204579acb0822cbdd0975ca7b6c2d7e7282df8bc9ef67b30b46bf0f1f378ea4 languageName: node linkType: hard @@ -3575,9 +3615,9 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-sdk@npm:11.2.0": - version: 11.2.0 - resolution: "@metamask/snaps-sdk@npm:11.2.0" +"@metamask/snaps-sdk@npm:12.0.1": + version: 12.0.1 + resolution: "@metamask/snaps-sdk@npm:12.0.1" dependencies: "@metamask/key-tree": "npm:^10.1.1" "@metamask/messenger": "npm:^2.0.0" @@ -3586,26 +3626,26 @@ __metadata: "@metamask/superstruct": "npm:^3.3.0" "@metamask/utils": "npm:^11.11.0" luxon: "npm:^3.5.0" - checksum: 10/ce5bb2c6427283b14121996e4d32c4aa95a6a9372419bb0d77998f697f61c76c45aa165d5f949d40797a9dbfe65d8d5c9bb9deaad2a2d5c7ad33d5e6329f7473 + checksum: 10/dfcd6874da9e0f7cab531768f7f3ab1425a579bb7e925e6ceea8e8549ad0be239d24564d2450bc2b92f7f66c1eb4c18fb2c7f9c7262e6166dd55961808e35f6d languageName: node linkType: hard -"@metamask/snaps-simulation@npm:^4.3.0": - version: 4.3.0 - resolution: "@metamask/snaps-simulation@npm:4.3.0" +"@metamask/snaps-simulation@npm:^4.3.1": + version: 4.3.1 + resolution: "@metamask/snaps-simulation@npm:4.3.1" dependencies: - "@metamask/chain-agnostic-permission": "npm:^1.6.2" + "@metamask/chain-agnostic-permission": "npm:^1.7.0" "@metamask/json-rpc-engine": "npm:^10.5.0" "@metamask/json-rpc-middleware-stream": "npm:^8.0.8" "@metamask/key-tree": "npm:^10.1.1" "@metamask/messenger": "npm:^2.0.0" "@metamask/permission-controller": "npm:^13.1.1" "@metamask/rpc-errors": "npm:^7.0.3" - "@metamask/snaps-controllers": "npm:^21.0.0" - "@metamask/snaps-execution-environments": "npm:^11.1.1" - "@metamask/snaps-rpc-methods": "npm:^17.1.0" - "@metamask/snaps-sdk": "npm:^11.2.0" - "@metamask/snaps-utils": "npm:^12.3.0" + "@metamask/snaps-controllers": "npm:^21.1.0" + "@metamask/snaps-execution-environments": "npm:^11.3.0" + "@metamask/snaps-rpc-methods": "npm:^17.1.1" + "@metamask/snaps-sdk": "npm:^12.0.0" + "@metamask/snaps-utils": "npm:^12.5.0" "@metamask/superstruct": "npm:^3.3.0" "@metamask/utils": "npm:^11.11.0" "@reduxjs/toolkit": "npm:^1.9.5" @@ -3615,13 +3655,13 @@ __metadata: mime: "npm:^3.0.0" readable-stream: "npm:^3.6.2" redux-saga: "npm:^1.2.3" - checksum: 10/0e20af44e41a0fa35016df2a7b625f7fd5ee33158d476828d63416879f5967b47395d2fee1c5e5967963fffec0d73d976acdd2c5397dcb4aada5a2e9af1a2a77 + checksum: 10/2717efbb9976c9bbb84a56b3dc85596869cff18d752a9638aa010b0ea4ef8e3ebcf3822eed0055d8684910aed043594cf18696190a54ef268d24031f21405592 languageName: node linkType: hard -"@metamask/snaps-utils@npm:^12.0.0, @metamask/snaps-utils@npm:^12.1.0, @metamask/snaps-utils@npm:^12.1.2, @metamask/snaps-utils@npm:^12.1.3, @metamask/snaps-utils@npm:^12.2.0, @metamask/snaps-utils@npm:^12.2.1, @metamask/snaps-utils@npm:^12.3.0, @metamask/snaps-utils@npm:^12.4.0": - version: 12.4.0 - resolution: "@metamask/snaps-utils@npm:12.4.0" +"@metamask/snaps-utils@npm:12.6.0": + version: 12.6.0 + resolution: "@metamask/snaps-utils@npm:12.6.0" dependencies: "@babel/core": "npm:^7.23.2" "@babel/types": "npm:^7.23.0" @@ -3631,7 +3671,7 @@ __metadata: "@metamask/rpc-errors": "npm:^7.0.3" "@metamask/slip44": "npm:^4.5.0" "@metamask/snaps-registry": "npm:^4.0.0" - "@metamask/snaps-sdk": "npm:^11.2.0" + "@metamask/snaps-sdk": "npm:^12.0.1" "@metamask/superstruct": "npm:^3.3.0" "@metamask/utils": "npm:^11.11.0" "@scure/base": "npm:^1.1.1" @@ -3646,7 +3686,7 @@ __metadata: semver: "npm:^7.5.4" ses: "npm:^2.1.0" validate-npm-package-name: "npm:^5.0.0" - checksum: 10/8b430dabbcd6aa033ced988d91f6ad91c906015c5d43ec66adb805e057bed607e8d1fefce010b767372f933089fcd048922d58c70f19b77987c26f85ffd89d93 + checksum: 10/57dc98974b74bcd33a1dddf57835964fa03dd520659364c7779ee6fe7905e1d002b3a13318b51afd9d45b9b823f94c713a8b91c693c021c6a0c9dd579be81c9c languageName: node linkType: hard @@ -3672,12 +3712,12 @@ __metadata: "@jest/globals": "npm:^29.5.0" "@metamask/auto-changelog": "npm:^6.1.1" "@metamask/key-tree": "npm:^10.1.1" - "@metamask/keyring-api": "npm:^23.7.0" - "@metamask/keyring-snap-sdk": "npm:^9.2.1" + "@metamask/keyring-api": "npm:^24.1.0" + "@metamask/keyring-snap-sdk": "npm:^10.0.0" "@metamask/snap-networks-utils": "npm:^1.0.0" "@metamask/snaps-cli": "npm:^8.4.1" - "@metamask/snaps-jest": "npm:^10.2.0" - "@metamask/snaps-sdk": "npm:^11.2.0" + "@metamask/snaps-jest": "npm:^10.2.1" + "@metamask/snaps-sdk": "npm:^12.0.1" "@metamask/superstruct": "npm:^3.4.1" "@metamask/utils": "npm:^11.11.0" "@noble/ed25519": "npm:2.1.0" @@ -3715,12 +3755,12 @@ __metadata: dependencies: "@metamask/auto-changelog": "npm:^6.1.1" "@metamask/key-tree": "npm:^10.1.1" - "@metamask/keyring-api": "npm:^23.7.0" - "@metamask/keyring-snap-sdk": "npm:^9.2.1" + "@metamask/keyring-api": "npm:^24.1.0" + "@metamask/keyring-snap-sdk": "npm:^10.0.0" "@metamask/snap-networks-utils": "npm:^1.0.0" "@metamask/snaps-cli": "npm:^8.4.1" - "@metamask/snaps-jest": "npm:^10.2.0" - "@metamask/snaps-sdk": "npm:^11.2.0" + "@metamask/snaps-jest": "npm:^10.2.1" + "@metamask/snaps-sdk": "npm:^12.0.1" "@metamask/superstruct": "npm:^3.4.1" "@metamask/utils": "npm:^11.11.0" "@stellar/stellar-sdk": "npm:^15.0.1" @@ -3807,14 +3847,14 @@ __metadata: "@metamask/assets-controller": "npm:^13.0.0" "@metamask/auto-changelog": "npm:^6.1.1" "@metamask/key-tree": "npm:^10.1.1" - "@metamask/keyring-api": "npm:^23.7.0" - "@metamask/keyring-snap-sdk": "npm:^9.2.1" + "@metamask/keyring-api": "npm:^24.1.0" + "@metamask/keyring-snap-sdk": "npm:^10.0.0" "@metamask/messenger": "npm:^2.0.0" "@metamask/remote-feature-flag-controller": "npm:^5.0.0" "@metamask/snap-networks-utils": "npm:^1.0.0" "@metamask/snaps-cli": "npm:^8.4.1" - "@metamask/snaps-jest": "npm:^10.2.0" - "@metamask/snaps-sdk": "npm:^11.2.0" + "@metamask/snaps-jest": "npm:^10.2.1" + "@metamask/snaps-sdk": "npm:^12.0.1" "@metamask/superstruct": "npm:^3.4.1" "@metamask/utils": "npm:^11.11.0" "@types/lodash": "npm:^4.17.15"