@sidhujag/sysweb3-keyring 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +8 -0
  2. package/cjs/current-vault-refusal.js +6 -0
  3. package/cjs/current-vault-refusal.js.map +1 -0
  4. package/cjs/evm-fees.js +29 -1
  5. package/cjs/evm-fees.js.map +1 -1
  6. package/cjs/keyring-core.js +349 -84
  7. package/cjs/keyring-core.js.map +1 -1
  8. package/cjs/keyring-manager.js +100 -4
  9. package/cjs/keyring-manager.js.map +1 -1
  10. package/cjs/software.js +14 -1
  11. package/cjs/software.js.map +1 -1
  12. package/cjs/storage-core.js +44 -4
  13. package/cjs/storage-core.js.map +1 -1
  14. package/cjs/transactions/ethereum.js +52 -65
  15. package/cjs/transactions/ethereum.js.map +1 -1
  16. package/cjs/transactions/evm-cancellation.js +43 -0
  17. package/cjs/transactions/evm-cancellation.js.map +1 -0
  18. package/esm/ledger/dmk-host.js +31 -0
  19. package/esm/ledger/dmk-host.js.map +1 -0
  20. package/esm/ledger/dmk-selected-host.js +6 -0
  21. package/esm/ledger/dmk-selected-host.js.map +1 -0
  22. package/esm/ledger/dmk-session.js +153 -34
  23. package/esm/ledger/dmk-session.js.map +1 -1
  24. package/esm/ledger-host.js +3 -27
  25. package/esm/ledger-host.js.map +1 -1
  26. package/package.json +13 -1
  27. package/types/current-vault-refusal.d.ts +2 -0
  28. package/types/evm-fees.d.ts +25 -0
  29. package/types/keyring-core.d.ts +36 -3
  30. package/types/keyring-manager.d.ts +15 -3
  31. package/types/ledger/dmk-host.d.ts +7 -0
  32. package/types/ledger/dmk-selected-host.d.ts +7 -0
  33. package/types/ledger/dmk-session.d.ts +10 -2
  34. package/types/ledger-host.d.ts +6 -2
  35. package/types/software.d.ts +4 -3
  36. package/types/storage-core.d.ts +3 -1
  37. package/types/storage.d.ts +1 -1
  38. package/types/transactions/evm-cancellation.d.ts +10 -0
@@ -8,13 +8,15 @@ export interface VaultStoragePort {
8
8
  export interface VaultPersistence {
9
9
  setEncryptedVault(decryptedVault: any, pwd: string, freshVaultKeys?: {
10
10
  salt: string;
11
- }): Promise<void>;
11
+ }, assertCurrent?: () => void): Promise<void>;
12
12
  getDecryptedVault(pwd: string, legacyPassword?: string): Promise<any>;
13
13
  }
14
14
  export declare class VaultAuthenticationError extends Error {
15
15
  readonly code = "INVALID_PASSWORD";
16
16
  constructor();
17
17
  }
18
+ /** Authenticate a captured current-format vault. This path has no CBC fallback. */
19
+ export declare const decryptCurrentVault: (vault: string, key: string) => Promise<unknown>;
18
20
  /**
19
21
  * Create once per wallet authority and share across its network keyrings.
20
22
  * The host owns storage durability and cross-context atomic creation.
@@ -1,5 +1,5 @@
1
1
  export declare const setEncryptedVault: (decryptedVault: any, pwd: string, freshVaultKeys?: {
2
2
  salt: string;
3
- }) => Promise<void>;
3
+ }, assertCurrent?: () => void) => Promise<void>;
4
4
  export declare const getDecryptedVault: (pwd: string, legacyPassword?: string) => Promise<any>;
5
5
  export { VaultAuthenticationError } from './storage-core';
@@ -0,0 +1,10 @@
1
+ import type { planEvmCancellationFees } from '../evm-fees';
2
+ /** A host supplies the authenticated original identity and the captured fee plan. */
3
+ export type EvmCancellationEnvelopeIntent = Readonly<{
4
+ payer: string;
5
+ chainId: number | string;
6
+ nonce: number | string;
7
+ feePlan: ReturnType<typeof planEvmCancellationFees>;
8
+ }>;
9
+ /** Checks the exact unsigned bytes. Original eligibility and approval remain host checks. */
10
+ export declare function assertEvmCancellationEnvelope(unsigned: string, { payer, chainId, nonce, feePlan }: EvmCancellationEnvelopeIntent): void;