@dynamic-labs-wallet/forward-mpc-shared 0.6.0 → 0.7.0

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.
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as fp_ts_lib_Either from 'fp-ts/lib/Either';
2
2
  import * as io_ts from 'io-ts';
3
3
  import { Type, TypeOf } from 'io-ts';
4
- import { SigningAlgorithm } from '@dynamic-labs-wallet/core';
4
+ import { SigningAlgorithm } from '@dynamic-labs-wallet/primitives';
5
5
  import { either } from 'fp-ts';
6
6
 
7
7
  /**
@@ -577,6 +577,11 @@ declare class EcdsaSigningAlgorithm extends BaseSigningAlgorithm {
577
577
  processSignResult(_result: any): Uint8Array;
578
578
  }
579
579
 
580
+ /**
581
+ * Author: Jesse
582
+ * Date: 2026-05-11
583
+ * **NOTE**: We can probably refactor this into waas-sdk somewhere like primitives packages.
584
+ */
580
585
  /**
581
586
  * 🎯 SINGLE SOURCE OF TRUTH - Add new algorithms here and everything else is automatic!
582
587
  * This is the ONLY place you need to add new signing algorithms
@@ -625,39 +630,21 @@ declare function isValidSigningAlgorithm(name: string): name is SigningAlgorithm
625
630
  */
626
631
  declare function createKeygenResultFromSecretShare(algorithmName: SigningAlgorithmName, secretShare: string): any;
627
632
 
633
+ type SupportedSigningAlgorithm = Extract<SigningAlgorithm, SigningAlgorithm.ECDSA | SigningAlgorithm.ED25519 | SigningAlgorithm.BIP340>;
634
+ interface AlgorithmConfig {
635
+ name: SigningAlgorithmName;
636
+ dynamicEnum: SigningAlgorithm;
637
+ className: string;
638
+ requiresHashAlgo: boolean;
639
+ supportsDerivationPath: boolean;
640
+ supportsTweak: boolean;
641
+ supportedHashAlgos: string[];
642
+ }
628
643
  /**
629
644
  * Algorithm configurations for complex properties
630
645
  * Maps Dynamic SDK enum values to our internal algorithm names
631
646
  */
632
- declare const ALGORITHMS: {
633
- readonly ECDSA: {
634
- readonly name: "ecdsa";
635
- readonly dynamicEnum: SigningAlgorithm.ECDSA;
636
- readonly className: "Ecdsa";
637
- readonly requiresHashAlgo: true;
638
- readonly supportsDerivationPath: true;
639
- readonly supportsTweak: false;
640
- readonly supportedHashAlgos: readonly ["sha256", "sha256d", "keccak256"];
641
- };
642
- readonly ED25519: {
643
- readonly name: "ed25519";
644
- readonly dynamicEnum: SigningAlgorithm.ED25519;
645
- readonly className: "Ed25519";
646
- readonly requiresHashAlgo: false;
647
- readonly supportsDerivationPath: true;
648
- readonly supportsTweak: false;
649
- readonly supportedHashAlgos: readonly [];
650
- };
651
- readonly BIP340: {
652
- readonly name: "bip340";
653
- readonly dynamicEnum: SigningAlgorithm.BIP340;
654
- readonly className: "BIP340";
655
- readonly requiresHashAlgo: false;
656
- readonly supportsDerivationPath: true;
657
- readonly supportsTweak: true;
658
- readonly supportedHashAlgos: readonly [];
659
- };
660
- };
647
+ declare const ALGORITHMS: Record<SupportedSigningAlgorithm, AlgorithmConfig>;
661
648
  /**
662
649
  * Type definitions - use Dynamic SDK's SigningAlgorithm enum
663
650
  */
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as fp_ts_lib_Either from 'fp-ts/lib/Either';
2
2
  import * as io_ts from 'io-ts';
3
3
  import { Type, TypeOf } from 'io-ts';
4
- import { SigningAlgorithm } from '@dynamic-labs-wallet/core';
4
+ import { SigningAlgorithm } from '@dynamic-labs-wallet/primitives';
5
5
  import { either } from 'fp-ts';
6
6
 
7
7
  /**
@@ -577,6 +577,11 @@ declare class EcdsaSigningAlgorithm extends BaseSigningAlgorithm {
577
577
  processSignResult(_result: any): Uint8Array;
578
578
  }
579
579
 
580
+ /**
581
+ * Author: Jesse
582
+ * Date: 2026-05-11
583
+ * **NOTE**: We can probably refactor this into waas-sdk somewhere like primitives packages.
584
+ */
580
585
  /**
581
586
  * 🎯 SINGLE SOURCE OF TRUTH - Add new algorithms here and everything else is automatic!
582
587
  * This is the ONLY place you need to add new signing algorithms
@@ -625,39 +630,21 @@ declare function isValidSigningAlgorithm(name: string): name is SigningAlgorithm
625
630
  */
626
631
  declare function createKeygenResultFromSecretShare(algorithmName: SigningAlgorithmName, secretShare: string): any;
627
632
 
633
+ type SupportedSigningAlgorithm = Extract<SigningAlgorithm, SigningAlgorithm.ECDSA | SigningAlgorithm.ED25519 | SigningAlgorithm.BIP340>;
634
+ interface AlgorithmConfig {
635
+ name: SigningAlgorithmName;
636
+ dynamicEnum: SigningAlgorithm;
637
+ className: string;
638
+ requiresHashAlgo: boolean;
639
+ supportsDerivationPath: boolean;
640
+ supportsTweak: boolean;
641
+ supportedHashAlgos: string[];
642
+ }
628
643
  /**
629
644
  * Algorithm configurations for complex properties
630
645
  * Maps Dynamic SDK enum values to our internal algorithm names
631
646
  */
632
- declare const ALGORITHMS: {
633
- readonly ECDSA: {
634
- readonly name: "ecdsa";
635
- readonly dynamicEnum: SigningAlgorithm.ECDSA;
636
- readonly className: "Ecdsa";
637
- readonly requiresHashAlgo: true;
638
- readonly supportsDerivationPath: true;
639
- readonly supportsTweak: false;
640
- readonly supportedHashAlgos: readonly ["sha256", "sha256d", "keccak256"];
641
- };
642
- readonly ED25519: {
643
- readonly name: "ed25519";
644
- readonly dynamicEnum: SigningAlgorithm.ED25519;
645
- readonly className: "Ed25519";
646
- readonly requiresHashAlgo: false;
647
- readonly supportsDerivationPath: true;
648
- readonly supportsTweak: false;
649
- readonly supportedHashAlgos: readonly [];
650
- };
651
- readonly BIP340: {
652
- readonly name: "bip340";
653
- readonly dynamicEnum: SigningAlgorithm.BIP340;
654
- readonly className: "BIP340";
655
- readonly requiresHashAlgo: false;
656
- readonly supportsDerivationPath: true;
657
- readonly supportsTweak: true;
658
- readonly supportedHashAlgos: readonly [];
659
- };
660
- };
647
+ declare const ALGORITHMS: Record<SupportedSigningAlgorithm, AlgorithmConfig>;
661
648
  /**
662
649
  * Type definitions - use Dynamic SDK's SigningAlgorithm enum
663
650
  */
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { either } from 'fp-ts';
2
2
  import { Type, failure, success, type, partial, number, string, union, undefined as _undefined, intersection, literal, identity, unknown, array } from 'io-ts';
3
3
  import { hexToBytes, bytesToHex, randomBytes } from '@noble/hashes/utils.js';
4
- import { SigningAlgorithm } from '@dynamic-labs-wallet/core';
4
+ import { SigningAlgorithm } from '@dynamic-labs-wallet/primitives';
5
5
  import { ml_kem768 } from '@noble/post-quantum/ml-kem.js';
6
6
  import { hkdf } from '@noble/hashes/hkdf.js';
7
7
  import { sha256 } from '@noble/hashes/sha2.js';