@dynamic-labs-wallet/forward-mpc-shared 0.1.0-alpha.6 → 0.1.0-alpha.7

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 (164) hide show
  1. package/dist/index.cjs +823 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +1030 -0
  4. package/dist/index.d.ts +1030 -9
  5. package/dist/index.js +768 -17
  6. package/dist/index.js.map +1 -1
  7. package/package.json +9 -7
  8. package/dist/attestation/index.d.ts +0 -1
  9. package/dist/attestation/index.d.ts.map +0 -1
  10. package/dist/attestation/index.js +0 -4
  11. package/dist/attestation/index.js.map +0 -1
  12. package/dist/codecs/DomainCodec.d.ts +0 -11
  13. package/dist/codecs/DomainCodec.d.ts.map +0 -1
  14. package/dist/codecs/DomainCodec.js +0 -25
  15. package/dist/codecs/DomainCodec.js.map +0 -1
  16. package/dist/codecs/EncryptedKeyshareCodec.d.ts +0 -11
  17. package/dist/codecs/EncryptedKeyshareCodec.d.ts.map +0 -1
  18. package/dist/codecs/EncryptedKeyshareCodec.js +0 -11
  19. package/dist/codecs/EncryptedKeyshareCodec.js.map +0 -1
  20. package/dist/codecs/Uint32ArrayCodec.d.ts +0 -3
  21. package/dist/codecs/Uint32ArrayCodec.d.ts.map +0 -1
  22. package/dist/codecs/Uint32ArrayCodec.js +0 -37
  23. package/dist/codecs/Uint32ArrayCodec.js.map +0 -1
  24. package/dist/codecs/Uint8ArrayCodec.d.ts +0 -3
  25. package/dist/codecs/Uint8ArrayCodec.d.ts.map +0 -1
  26. package/dist/codecs/Uint8ArrayCodec.js +0 -26
  27. package/dist/codecs/Uint8ArrayCodec.js.map +0 -1
  28. package/dist/codecs/Uint8ArrayOrHexCodec.d.ts +0 -3
  29. package/dist/codecs/Uint8ArrayOrHexCodec.d.ts.map +0 -1
  30. package/dist/codecs/Uint8ArrayOrHexCodec.js +0 -35
  31. package/dist/codecs/Uint8ArrayOrHexCodec.js.map +0 -1
  32. package/dist/codecs/WebSocketErrorCodec.d.ts +0 -15
  33. package/dist/codecs/WebSocketErrorCodec.d.ts.map +0 -1
  34. package/dist/codecs/WebSocketErrorCodec.js +0 -14
  35. package/dist/codecs/WebSocketErrorCodec.js.map +0 -1
  36. package/dist/codecs/index.d.ts +0 -4
  37. package/dist/codecs/index.d.ts.map +0 -1
  38. package/dist/codecs/index.js +0 -4
  39. package/dist/codecs/index.js.map +0 -1
  40. package/dist/constants/algorithms.d.ts +0 -56
  41. package/dist/constants/algorithms.d.ts.map +0 -1
  42. package/dist/constants/algorithms.js +0 -60
  43. package/dist/constants/algorithms.js.map +0 -1
  44. package/dist/constants/index.d.ts +0 -2
  45. package/dist/constants/index.d.ts.map +0 -1
  46. package/dist/constants/index.js +0 -2
  47. package/dist/constants/index.js.map +0 -1
  48. package/dist/crypto/decapsulate.d.ts +0 -2
  49. package/dist/crypto/decapsulate.d.ts.map +0 -1
  50. package/dist/crypto/decapsulate.js +0 -5
  51. package/dist/crypto/decapsulate.js.map +0 -1
  52. package/dist/crypto/encapsulate.d.ts +0 -5
  53. package/dist/crypto/encapsulate.d.ts.map +0 -1
  54. package/dist/crypto/encapsulate.js +0 -5
  55. package/dist/crypto/encapsulate.js.map +0 -1
  56. package/dist/crypto/generateKeypair.d.ts +0 -5
  57. package/dist/crypto/generateKeypair.d.ts.map +0 -1
  58. package/dist/crypto/generateKeypair.js +0 -17
  59. package/dist/crypto/generateKeypair.js.map +0 -1
  60. package/dist/crypto/index.d.ts +0 -6
  61. package/dist/crypto/index.d.ts.map +0 -1
  62. package/dist/crypto/index.js +0 -6
  63. package/dist/crypto/index.js.map +0 -1
  64. package/dist/crypto/keyDerivation.d.ts +0 -14
  65. package/dist/crypto/keyDerivation.d.ts.map +0 -1
  66. package/dist/crypto/keyDerivation.js +0 -21
  67. package/dist/crypto/keyDerivation.js.map +0 -1
  68. package/dist/crypto/keyshareEncryption.d.ts +0 -13
  69. package/dist/crypto/keyshareEncryption.d.ts.map +0 -1
  70. package/dist/crypto/keyshareEncryption.js +0 -39
  71. package/dist/crypto/keyshareEncryption.js.map +0 -1
  72. package/dist/index.d.ts.map +0 -1
  73. package/dist/messages/ConnectionAckV1Request.d.ts +0 -43
  74. package/dist/messages/ConnectionAckV1Request.d.ts.map +0 -1
  75. package/dist/messages/ConnectionAckV1Request.js +0 -17
  76. package/dist/messages/ConnectionAckV1Request.js.map +0 -1
  77. package/dist/messages/ConnectionAckV1Response.d.ts +0 -45
  78. package/dist/messages/ConnectionAckV1Response.d.ts.map +0 -1
  79. package/dist/messages/ConnectionAckV1Response.js +0 -18
  80. package/dist/messages/ConnectionAckV1Response.js.map +0 -1
  81. package/dist/messages/HandshakeV1Request.d.ts +0 -45
  82. package/dist/messages/HandshakeV1Request.d.ts.map +0 -1
  83. package/dist/messages/HandshakeV1Request.js +0 -28
  84. package/dist/messages/HandshakeV1Request.js.map +0 -1
  85. package/dist/messages/HandshakeV1Response.d.ts +0 -47
  86. package/dist/messages/HandshakeV1Response.d.ts.map +0 -1
  87. package/dist/messages/HandshakeV1Response.js +0 -20
  88. package/dist/messages/HandshakeV1Response.js.map +0 -1
  89. package/dist/messages/SignMessageV1Request.d.ts +0 -63
  90. package/dist/messages/SignMessageV1Request.d.ts.map +0 -1
  91. package/dist/messages/SignMessageV1Request.js +0 -42
  92. package/dist/messages/SignMessageV1Request.js.map +0 -1
  93. package/dist/messages/SignMessageV1Response.d.ts +0 -47
  94. package/dist/messages/SignMessageV1Response.d.ts.map +0 -1
  95. package/dist/messages/SignMessageV1Response.js +0 -28
  96. package/dist/messages/SignMessageV1Response.js.map +0 -1
  97. package/dist/messages/allMessages.d.ts +0 -259
  98. package/dist/messages/allMessages.d.ts.map +0 -1
  99. package/dist/messages/allMessages.js +0 -57
  100. package/dist/messages/allMessages.js.map +0 -1
  101. package/dist/messages/base.d.ts +0 -27
  102. package/dist/messages/base.d.ts.map +0 -1
  103. package/dist/messages/base.js +0 -12
  104. package/dist/messages/base.js.map +0 -1
  105. package/dist/messages/index.d.ts +0 -11
  106. package/dist/messages/index.d.ts.map +0 -1
  107. package/dist/messages/index.js +0 -14
  108. package/dist/messages/index.js.map +0 -1
  109. package/dist/messages/registry.d.ts +0 -136
  110. package/dist/messages/registry.d.ts.map +0 -1
  111. package/dist/messages/registry.js +0 -67
  112. package/dist/messages/registry.js.map +0 -1
  113. package/dist/messages/utils/StandardMessage.d.ts +0 -97
  114. package/dist/messages/utils/StandardMessage.d.ts.map +0 -1
  115. package/dist/messages/utils/StandardMessage.js +0 -98
  116. package/dist/messages/utils/StandardMessage.js.map +0 -1
  117. package/dist/messages/utils/encodingHelpers.d.ts +0 -20
  118. package/dist/messages/utils/encodingHelpers.d.ts.map +0 -1
  119. package/dist/messages/utils/encodingHelpers.js +0 -50
  120. package/dist/messages/utils/encodingHelpers.js.map +0 -1
  121. package/dist/messages/utils/index.d.ts +0 -4
  122. package/dist/messages/utils/index.d.ts.map +0 -1
  123. package/dist/messages/utils/index.js +0 -5
  124. package/dist/messages/utils/index.js.map +0 -1
  125. package/dist/messages/utils/schemaBuilder.d.ts +0 -19
  126. package/dist/messages/utils/schemaBuilder.d.ts.map +0 -1
  127. package/dist/messages/utils/schemaBuilder.js +0 -31
  128. package/dist/messages/utils/schemaBuilder.js.map +0 -1
  129. package/dist/signing/algorithms/BIP340SigningAlgorithm.d.ts +0 -20
  130. package/dist/signing/algorithms/BIP340SigningAlgorithm.d.ts.map +0 -1
  131. package/dist/signing/algorithms/BIP340SigningAlgorithm.js +0 -35
  132. package/dist/signing/algorithms/BIP340SigningAlgorithm.js.map +0 -1
  133. package/dist/signing/algorithms/EcdsaSigningAlgorithm.d.ts +0 -20
  134. package/dist/signing/algorithms/EcdsaSigningAlgorithm.d.ts.map +0 -1
  135. package/dist/signing/algorithms/EcdsaSigningAlgorithm.js +0 -43
  136. package/dist/signing/algorithms/EcdsaSigningAlgorithm.js.map +0 -1
  137. package/dist/signing/algorithms/Ed25519SigningAlgorithm.d.ts +0 -18
  138. package/dist/signing/algorithms/Ed25519SigningAlgorithm.d.ts.map +0 -1
  139. package/dist/signing/algorithms/Ed25519SigningAlgorithm.js +0 -34
  140. package/dist/signing/algorithms/Ed25519SigningAlgorithm.js.map +0 -1
  141. package/dist/signing/allAlgorithms.d.ts +0 -50
  142. package/dist/signing/allAlgorithms.d.ts.map +0 -1
  143. package/dist/signing/allAlgorithms.js +0 -59
  144. package/dist/signing/allAlgorithms.js.map +0 -1
  145. package/dist/signing/base.d.ts +0 -42
  146. package/dist/signing/base.d.ts.map +0 -1
  147. package/dist/signing/base.js +0 -6
  148. package/dist/signing/base.js.map +0 -1
  149. package/dist/signing/index.d.ts +0 -7
  150. package/dist/signing/index.d.ts.map +0 -1
  151. package/dist/signing/index.js +0 -9
  152. package/dist/signing/index.js.map +0 -1
  153. package/dist/signing/registry.d.ts +0 -26
  154. package/dist/signing/registry.d.ts.map +0 -1
  155. package/dist/signing/registry.js +0 -36
  156. package/dist/signing/registry.js.map +0 -1
  157. package/dist/types.d.ts +0 -42
  158. package/dist/types.d.ts.map +0 -1
  159. package/dist/types.js +0 -12
  160. package/dist/types.js.map +0 -1
  161. package/dist/utils/assertDefined.d.ts +0 -16
  162. package/dist/utils/assertDefined.d.ts.map +0 -1
  163. package/dist/utils/assertDefined.js +0 -27
  164. package/dist/utils/assertDefined.js.map +0 -1
@@ -1,31 +0,0 @@
1
- import { intersection, literal, type } from 'io-ts';
2
- /**
3
- * Build standard message schema with type and version
4
- * Eliminates duplication across all message schemas
5
- */
6
- export function buildMessageSchema(messageType, version, additionalFields = {}, ...additionalSchemas) {
7
- const schema = type({
8
- type: literal(messageType),
9
- version: literal(version),
10
- ...additionalFields,
11
- });
12
- if (additionalSchemas.length === 0) {
13
- return schema;
14
- }
15
- if (additionalSchemas.length === 1) {
16
- return intersection([schema, additionalSchemas[0]]);
17
- }
18
- // For multiple schemas, chain intersections
19
- let result = intersection([schema, additionalSchemas[0]]);
20
- for (let i = 1; i < additionalSchemas.length; i++) {
21
- result = intersection([result, additionalSchemas[i]]);
22
- }
23
- return result;
24
- }
25
- /**
26
- * Create schema from configuration
27
- */
28
- export function createSchemaFromConfig(config) {
29
- return buildMessageSchema(config.type, config.version, config.fields);
30
- }
31
- //# sourceMappingURL=schemaBuilder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemaBuilder.js","sourceRoot":"","sources":["../../../src/messages/utils/schemaBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAS,IAAI,EAAQ,MAAM,OAAO,CAAC;AAEjE;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAChC,WAAc,EACd,OAAU,EACV,mBAAwC,EAAE,EAC1C,GAAG,iBAA0B;IAE7B,MAAM,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC;QAC1B,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC;QACzB,GAAG,gBAAgB;KACpB,CAAC,CAAC;IAEH,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,OAAO,YAAY,CAAC,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,CAAC;IAED,4CAA4C;IAC5C,IAAI,MAAM,GAAc,YAAY,CAAC,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClD,MAAM,GAAG,YAAY,CAAC,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAWD;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,MAAiC;IAEjC,OAAO,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;AACxE,CAAC","sourcesContent":["import { intersection, literal, Mixed, type, Type } from 'io-ts';\n\n/**\n * Build standard message schema with type and version\n * Eliminates duplication across all message schemas\n */\nexport function buildMessageSchema<T extends string, V extends number>(\n messageType: T,\n version: V,\n additionalFields: Record<string, any> = {},\n ...additionalSchemas: Mixed[]\n): Type<any> {\n const schema = type({\n type: literal(messageType),\n version: literal(version),\n ...additionalFields,\n });\n\n if (additionalSchemas.length === 0) {\n return schema;\n }\n\n if (additionalSchemas.length === 1) {\n return intersection([schema, additionalSchemas[0]]);\n }\n\n // For multiple schemas, chain intersections\n let result: Type<any> = intersection([schema, additionalSchemas[0]]);\n for (let i = 1; i < additionalSchemas.length; i++) {\n result = intersection([result, additionalSchemas[i]]);\n }\n return result;\n}\n\n/**\n * Message schema configuration interface\n */\nexport interface MessageSchemaConfig<T extends string, V extends number> {\n type: T;\n version: V;\n fields: Record<string, any>;\n}\n\n/**\n * Create schema from configuration\n */\nexport function createSchemaFromConfig<T extends string, V extends number>(\n config: MessageSchemaConfig<T, V>\n): Type<any> {\n return buildMessageSchema(config.type, config.version, config.fields);\n}\n"]}
@@ -1,20 +0,0 @@
1
- import { BaseSigningAlgorithm } from '../base';
2
- export interface BIP340SignMessageSchema {
3
- signingAlgo: 'bip340';
4
- derivationPath?: Uint32Array;
5
- tweak?: Uint8Array;
6
- }
7
- export declare class BIP340SigningAlgorithm extends BaseSigningAlgorithm {
8
- readonly algorithmName: "bip340";
9
- readonly version = 1;
10
- readonly schema: import("io-ts").IntersectionC<[import("io-ts").TypeC<{
11
- signingAlgo: import("io-ts").LiteralC<"bip340">;
12
- }>, import("io-ts").PartialC<{
13
- derivationPath: import("io-ts").Type<Uint32Array<ArrayBufferLike>, string, unknown>;
14
- tweak: import("io-ts").Type<Uint8Array<ArrayBufferLike>, string, unknown>;
15
- }>]>;
16
- createKeygenResultFromSecretShare(secretShare: string): any;
17
- createSignRequest(keygenResult: any, params: any): any;
18
- processSignResult(_result: any): Uint8Array;
19
- }
20
- //# sourceMappingURL=BIP340SigningAlgorithm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BIP340SigningAlgorithm.d.ts","sourceRoot":"","sources":["../../../src/signing/algorithms/BIP340SigningAlgorithm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,QAAQ,CAAC;IACtB,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,qBAAa,sBAAuB,SAAQ,oBAAoB;IAC9D,QAAQ,CAAC,aAAa,EAAG,QAAQ,CAAU;IAC3C,QAAQ,CAAC,OAAO,KAAK;IAErB,QAAQ,CAAC,MAAM;;;;;SAQZ;IAEH,iCAAiC,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG;IAO3D,iBAAiB,CAAC,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG;IAOtD,iBAAiB,CAAC,OAAO,EAAE,GAAG,GAAG,UAAU;CAG5C"}
@@ -1,35 +0,0 @@
1
- import { BaseSigningAlgorithm } from '../base';
2
- import { intersection, literal, partial, type } from 'io-ts';
3
- import { Uint32ArrayCodec, Uint8ArrayCodec } from '../../codecs';
4
- export class BIP340SigningAlgorithm extends BaseSigningAlgorithm {
5
- constructor() {
6
- super(...arguments);
7
- this.algorithmName = 'bip340';
8
- this.version = 1;
9
- this.schema = intersection([
10
- type({
11
- signingAlgo: literal('bip340'),
12
- }),
13
- partial({
14
- derivationPath: Uint32ArrayCodec,
15
- tweak: Uint8ArrayCodec,
16
- }),
17
- ]);
18
- }
19
- createKeygenResultFromSecretShare(secretShare) {
20
- return {
21
- secretShare,
22
- pubkey: new Uint8Array(32), // Mock pubkey
23
- };
24
- }
25
- createSignRequest(keygenResult, params) {
26
- return {
27
- secretShare: keygenResult.secretShare,
28
- ...params,
29
- };
30
- }
31
- processSignResult(_result) {
32
- return new Uint8Array(64);
33
- }
34
- }
35
- //# sourceMappingURL=BIP340SigningAlgorithm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BIP340SigningAlgorithm.js","sourceRoot":"","sources":["../../../src/signing/algorithms/BIP340SigningAlgorithm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAQjE,MAAM,OAAO,sBAAuB,SAAQ,oBAAoB;IAAhE;;QACW,kBAAa,GAAG,QAAiB,CAAC;QAClC,YAAO,GAAG,CAAC,CAAC;QAEZ,WAAM,GAAG,YAAY,CAAC;YAC7B,IAAI,CAAC;gBACH,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC;aAC/B,CAAC;YACF,OAAO,CAAC;gBACN,cAAc,EAAE,gBAAgB;gBAChC,KAAK,EAAE,eAAe;aACvB,CAAC;SACH,CAAC,CAAC;IAmBL,CAAC;IAjBC,iCAAiC,CAAC,WAAmB;QACnD,OAAO;YACL,WAAW;YACX,MAAM,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,cAAc;SAC3C,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,YAAiB,EAAE,MAAW;QAC9C,OAAO;YACL,WAAW,EAAE,YAAY,CAAC,WAAW;YACrC,GAAG,MAAM;SACV,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,OAAY;QAC5B,OAAO,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { BaseSigningAlgorithm } from '../base';\nimport { intersection, literal, partial, type } from 'io-ts';\nimport { Uint32ArrayCodec, Uint8ArrayCodec } from '../../codecs';\n\nexport interface BIP340SignMessageSchema {\n signingAlgo: 'bip340';\n derivationPath?: Uint32Array;\n tweak?: Uint8Array;\n}\n\nexport class BIP340SigningAlgorithm extends BaseSigningAlgorithm {\n readonly algorithmName = 'bip340' as const;\n readonly version = 1;\n\n readonly schema = intersection([\n type({\n signingAlgo: literal('bip340'),\n }),\n partial({\n derivationPath: Uint32ArrayCodec,\n tweak: Uint8ArrayCodec,\n }),\n ]);\n\n createKeygenResultFromSecretShare(secretShare: string): any {\n return {\n secretShare,\n pubkey: new Uint8Array(32), // Mock pubkey\n };\n }\n\n createSignRequest(keygenResult: any, params: any): any {\n return {\n secretShare: keygenResult.secretShare,\n ...params,\n };\n }\n\n processSignResult(_result: any): Uint8Array {\n return new Uint8Array(64);\n }\n}\n"]}
@@ -1,20 +0,0 @@
1
- import { BaseSigningAlgorithm } from '../base';
2
- export interface EcdsaSignMessageSchema {
3
- signingAlgo: 'ecdsa';
4
- hashAlgo: 'sha256' | 'sha256d' | 'keccak256';
5
- derivationPath?: Uint32Array;
6
- }
7
- export declare class EcdsaSigningAlgorithm extends BaseSigningAlgorithm {
8
- readonly algorithmName: "ecdsa";
9
- readonly version = 1;
10
- readonly schema: import("io-ts").IntersectionC<[import("io-ts").TypeC<{
11
- signingAlgo: import("io-ts").LiteralC<"ecdsa">;
12
- }>, import("io-ts").PartialC<{
13
- hashAlgo: import("io-ts").UnionC<[import("io-ts").LiteralC<"sha256">, import("io-ts").LiteralC<"sha256d">, import("io-ts").LiteralC<"keccak256">]>;
14
- derivationPath: import("io-ts").Type<Uint32Array<ArrayBufferLike>, string, unknown>;
15
- }>]>;
16
- createKeygenResultFromSecretShare(secretShare: string): any;
17
- createSignRequest(keygenResult: any, params: any): any;
18
- processSignResult(_result: any): Uint8Array;
19
- }
20
- //# sourceMappingURL=EcdsaSigningAlgorithm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EcdsaSigningAlgorithm.d.ts","sourceRoot":"","sources":["../../../src/signing/algorithms/EcdsaSigningAlgorithm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;IAC7C,cAAc,CAAC,EAAE,WAAW,CAAC;CAC9B;AAED,qBAAa,qBAAsB,SAAQ,oBAAoB;IAC7D,QAAQ,CAAC,aAAa,EAAG,OAAO,CAAU;IAC1C,QAAQ,CAAC,OAAO,KAAK;IAErB,QAAQ,CAAC,MAAM;;;;;SAYZ;IAEH,iCAAiC,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG;IAW3D,iBAAiB,CAAC,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG;IAOtD,iBAAiB,CAAC,OAAO,EAAE,GAAG,GAAG,UAAU;CAG5C"}
@@ -1,43 +0,0 @@
1
- import { BaseSigningAlgorithm } from '../base';
2
- import { intersection, literal, partial, type, union } from 'io-ts';
3
- import { Uint32ArrayCodec } from '../../codecs';
4
- export class EcdsaSigningAlgorithm extends BaseSigningAlgorithm {
5
- constructor() {
6
- super(...arguments);
7
- this.algorithmName = 'ecdsa';
8
- this.version = 1;
9
- this.schema = intersection([
10
- type({
11
- signingAlgo: literal('ecdsa'),
12
- }),
13
- partial({
14
- hashAlgo: union([
15
- literal('sha256'),
16
- literal('sha256d'),
17
- literal('keccak256'),
18
- ]),
19
- derivationPath: Uint32ArrayCodec,
20
- }),
21
- ]);
22
- }
23
- createKeygenResultFromSecretShare(secretShare) {
24
- return {
25
- secretShare,
26
- pubkey: {
27
- pubKeyAsHex: () => '0x' + '00'.repeat(33),
28
- serializeCompressed: () => new Uint8Array(33),
29
- serializeUncompressed: () => new Uint8Array(65),
30
- },
31
- };
32
- }
33
- createSignRequest(keygenResult, params) {
34
- return {
35
- secretShare: keygenResult.secretShare,
36
- ...params,
37
- };
38
- }
39
- processSignResult(_result) {
40
- return new Uint8Array(64);
41
- }
42
- }
43
- //# sourceMappingURL=EcdsaSigningAlgorithm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EcdsaSigningAlgorithm.js","sourceRoot":"","sources":["../../../src/signing/algorithms/EcdsaSigningAlgorithm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAQhD,MAAM,OAAO,qBAAsB,SAAQ,oBAAoB;IAA/D;;QACW,kBAAa,GAAG,OAAgB,CAAC;QACjC,YAAO,GAAG,CAAC,CAAC;QAEZ,WAAM,GAAG,YAAY,CAAC;YAC7B,IAAI,CAAC;gBACH,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC;aAC9B,CAAC;YACF,OAAO,CAAC;gBACN,QAAQ,EAAE,KAAK,CAAC;oBACd,OAAO,CAAC,QAAQ,CAAC;oBACjB,OAAO,CAAC,SAAS,CAAC;oBAClB,OAAO,CAAC,WAAW,CAAC;iBACrB,CAAC;gBACF,cAAc,EAAE,gBAAgB;aACjC,CAAC;SACH,CAAC,CAAC;IAuBL,CAAC;IArBC,iCAAiC,CAAC,WAAmB;QACnD,OAAO;YACL,WAAW;YACX,MAAM,EAAE;gBACN,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;gBACzC,mBAAmB,EAAE,GAAG,EAAE,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC;gBAC7C,qBAAqB,EAAE,GAAG,EAAE,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC;aAChD;SACF,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,YAAiB,EAAE,MAAW;QAC9C,OAAO;YACL,WAAW,EAAE,YAAY,CAAC,WAAW;YACrC,GAAG,MAAM;SACV,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,OAAY;QAC5B,OAAO,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { BaseSigningAlgorithm } from '../base';\nimport { intersection, literal, partial, type, union } from 'io-ts';\nimport { Uint32ArrayCodec } from '../../codecs';\n\nexport interface EcdsaSignMessageSchema {\n signingAlgo: 'ecdsa';\n hashAlgo: 'sha256' | 'sha256d' | 'keccak256';\n derivationPath?: Uint32Array;\n}\n\nexport class EcdsaSigningAlgorithm extends BaseSigningAlgorithm {\n readonly algorithmName = 'ecdsa' as const;\n readonly version = 1;\n\n readonly schema = intersection([\n type({\n signingAlgo: literal('ecdsa'),\n }),\n partial({\n hashAlgo: union([\n literal('sha256'),\n literal('sha256d'),\n literal('keccak256'),\n ]),\n derivationPath: Uint32ArrayCodec,\n }),\n ]);\n\n createKeygenResultFromSecretShare(secretShare: string): any {\n return {\n secretShare,\n pubkey: {\n pubKeyAsHex: () => '0x' + '00'.repeat(33),\n serializeCompressed: () => new Uint8Array(33),\n serializeUncompressed: () => new Uint8Array(65),\n },\n };\n }\n\n createSignRequest(keygenResult: any, params: any): any {\n return {\n secretShare: keygenResult.secretShare,\n ...params,\n };\n }\n\n processSignResult(_result: any): Uint8Array {\n return new Uint8Array(64);\n }\n}\n"]}
@@ -1,18 +0,0 @@
1
- import { BaseSigningAlgorithm } from '../base';
2
- export interface Ed25519SignMessageSchema {
3
- signingAlgo: 'ed25519';
4
- derivationPath?: Uint32Array;
5
- }
6
- export declare class Ed25519SigningAlgorithm extends BaseSigningAlgorithm {
7
- readonly algorithmName: "ed25519";
8
- readonly version = 1;
9
- readonly schema: import("io-ts").IntersectionC<[import("io-ts").TypeC<{
10
- signingAlgo: import("io-ts").LiteralC<"ed25519">;
11
- }>, import("io-ts").PartialC<{
12
- derivationPath: import("io-ts").Type<Uint32Array<ArrayBufferLike>, string, unknown>;
13
- }>]>;
14
- createKeygenResultFromSecretShare(secretShare: string): any;
15
- createSignRequest(keygenResult: any, params: any): any;
16
- processSignResult(_result: any): Uint8Array;
17
- }
18
- //# sourceMappingURL=Ed25519SigningAlgorithm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Ed25519SigningAlgorithm.d.ts","sourceRoot":"","sources":["../../../src/signing/algorithms/Ed25519SigningAlgorithm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,WAAW,CAAC;CAC9B;AAED,qBAAa,uBAAwB,SAAQ,oBAAoB;IAC/D,QAAQ,CAAC,aAAa,EAAG,SAAS,CAAU;IAC5C,QAAQ,CAAC,OAAO,KAAK;IAErB,QAAQ,CAAC,MAAM;;;;SAOZ;IAEH,iCAAiC,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG;IAO3D,iBAAiB,CAAC,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG;IAOtD,iBAAiB,CAAC,OAAO,EAAE,GAAG,GAAG,UAAU;CAG5C"}
@@ -1,34 +0,0 @@
1
- import { BaseSigningAlgorithm } from '../base';
2
- import { intersection, literal, partial, type } from 'io-ts';
3
- import { Uint32ArrayCodec } from '../../codecs';
4
- export class Ed25519SigningAlgorithm extends BaseSigningAlgorithm {
5
- constructor() {
6
- super(...arguments);
7
- this.algorithmName = 'ed25519';
8
- this.version = 1;
9
- this.schema = intersection([
10
- type({
11
- signingAlgo: literal('ed25519'),
12
- }),
13
- partial({
14
- derivationPath: Uint32ArrayCodec,
15
- }),
16
- ]);
17
- }
18
- createKeygenResultFromSecretShare(secretShare) {
19
- return {
20
- secretShare,
21
- pubkey: new Uint8Array(32), // Mock pubkey
22
- };
23
- }
24
- createSignRequest(keygenResult, params) {
25
- return {
26
- secretShare: keygenResult.secretShare,
27
- ...params,
28
- };
29
- }
30
- processSignResult(_result) {
31
- return new Uint8Array(64);
32
- }
33
- }
34
- //# sourceMappingURL=Ed25519SigningAlgorithm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Ed25519SigningAlgorithm.js","sourceRoot":"","sources":["../../../src/signing/algorithms/Ed25519SigningAlgorithm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOhD,MAAM,OAAO,uBAAwB,SAAQ,oBAAoB;IAAjE;;QACW,kBAAa,GAAG,SAAkB,CAAC;QACnC,YAAO,GAAG,CAAC,CAAC;QAEZ,WAAM,GAAG,YAAY,CAAC;YAC7B,IAAI,CAAC;gBACH,WAAW,EAAE,OAAO,CAAC,SAAS,CAAC;aAChC,CAAC;YACF,OAAO,CAAC;gBACN,cAAc,EAAE,gBAAgB;aACjC,CAAC;SACH,CAAC,CAAC;IAmBL,CAAC;IAjBC,iCAAiC,CAAC,WAAmB;QACnD,OAAO;YACL,WAAW;YACX,MAAM,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,cAAc;SAC3C,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,YAAiB,EAAE,MAAW;QAC9C,OAAO;YACL,WAAW,EAAE,YAAY,CAAC,WAAW;YACrC,GAAG,MAAM;SACV,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,OAAY;QAC5B,OAAO,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { BaseSigningAlgorithm } from '../base';\nimport { intersection, literal, partial, type } from 'io-ts';\nimport { Uint32ArrayCodec } from '../../codecs';\n\nexport interface Ed25519SignMessageSchema {\n signingAlgo: 'ed25519';\n derivationPath?: Uint32Array;\n}\n\nexport class Ed25519SigningAlgorithm extends BaseSigningAlgorithm {\n readonly algorithmName = 'ed25519' as const;\n readonly version = 1;\n\n readonly schema = intersection([\n type({\n signingAlgo: literal('ed25519'),\n }),\n partial({\n derivationPath: Uint32ArrayCodec,\n }),\n ]);\n\n createKeygenResultFromSecretShare(secretShare: string): any {\n return {\n secretShare,\n pubkey: new Uint8Array(32), // Mock pubkey\n };\n }\n\n createSignRequest(keygenResult: any, params: any): any {\n return {\n secretShare: keygenResult.secretShare,\n ...params,\n };\n }\n\n processSignResult(_result: any): Uint8Array {\n return new Uint8Array(64);\n }\n}\n"]}
@@ -1,50 +0,0 @@
1
- import { type Type } from 'io-ts';
2
- import { Ed25519SigningAlgorithm, type Ed25519SignMessageSchema } from './algorithms/Ed25519SigningAlgorithm';
3
- import { BIP340SigningAlgorithm, type BIP340SignMessageSchema } from './algorithms/BIP340SigningAlgorithm';
4
- import { EcdsaSigningAlgorithm, type EcdsaSignMessageSchema } from './algorithms/EcdsaSigningAlgorithm';
5
- import type { ISigningAlgorithm } from './base';
6
- /**
7
- * 🎯 SINGLE SOURCE OF TRUTH - Add new algorithms here and everything else is automatic!
8
- * This is the ONLY place you need to add new signing algorithms
9
- */
10
- export declare const SIGNING_ALGORITHM_CLASSES: {
11
- readonly ed25519: typeof Ed25519SigningAlgorithm;
12
- readonly bip340: typeof BIP340SigningAlgorithm;
13
- readonly ecdsa: typeof EcdsaSigningAlgorithm;
14
- };
15
- /**
16
- * 📝 Explicit union type of all signing algorithm schemas
17
- * (Only other place you need to add new algorithms)
18
- */
19
- export type AllSigningAlgorithmSchemas = Ed25519SignMessageSchema | BIP340SignMessageSchema | EcdsaSignMessageSchema;
20
- /**
21
- * Derive signing algorithm name type from classes
22
- */
23
- export type SigningAlgorithmName = keyof typeof SIGNING_ALGORITHM_CLASSES;
24
- /**
25
- * Derive runtime array of algorithm names from classes
26
- */
27
- export declare const ALL_SIGNING_ALGORITHM_NAMES: SigningAlgorithmName[];
28
- /**
29
- * Create algorithm instances (derived from classes)
30
- */
31
- export declare const SIGNING_ALGORITHM_INSTANCES: Record<SigningAlgorithmName, ISigningAlgorithm>;
32
- /**
33
- * Create union schema (derived from instances)
34
- */
35
- export declare const ALL_SIGNING_ALGORITHM_SCHEMA: Type<AllSigningAlgorithmSchemas>;
36
- /**
37
- * Helper type to extract algorithm-specific schema
38
- */
39
- export type SigningAlgorithmSchemaFor<T extends AllSigningAlgorithmSchemas['signingAlgo']> = Extract<AllSigningAlgorithmSchemas, {
40
- signingAlgo: T;
41
- }>;
42
- /**
43
- * Utility to check if a string is a valid signing algorithm name
44
- */
45
- export declare function isValidSigningAlgorithm(name: string): name is SigningAlgorithmName;
46
- /**
47
- * Create keygen result from secret share using algorithm-specific logic
48
- */
49
- export declare function createKeygenResultFromSecretShare(algorithmName: SigningAlgorithmName, secretShare: string): any;
50
- //# sourceMappingURL=allAlgorithms.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"allAlgorithms.d.ts","sourceRoot":"","sources":["../../src/signing/allAlgorithms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EACL,uBAAuB,EACvB,KAAK,wBAAwB,EAC9B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,KAAK,uBAAuB,EAC7B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,qBAAqB,EACrB,KAAK,sBAAsB,EAC5B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;CAI5B,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAClC,wBAAwB,GACxB,uBAAuB,GACvB,sBAAsB,CAAC;AAM3B;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,yBAAyB,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAEnC,oBAAoB,EAAE,CAAC;AAE5B;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAC9C,oBAAoB,EACpB,iBAAiB,CAKlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,IAAI,CAAC,0BAA0B,CAmBpE,CAAC;AAEP;;GAEG;AACH,MAAM,MAAM,yBAAyB,CACnC,CAAC,SAAS,0BAA0B,CAAC,aAAa,CAAC,IACjD,OAAO,CAAC,0BAA0B,EAAE;IAAE,WAAW,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAE5D;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,GACX,IAAI,IAAI,oBAAoB,CAE9B;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,aAAa,EAAE,oBAAoB,EACnC,WAAW,EAAE,MAAM,GAClB,GAAG,CAML"}
@@ -1,59 +0,0 @@
1
- import { union } from 'io-ts';
2
- import { Ed25519SigningAlgorithm, } from './algorithms/Ed25519SigningAlgorithm';
3
- import { BIP340SigningAlgorithm, } from './algorithms/BIP340SigningAlgorithm';
4
- import { EcdsaSigningAlgorithm, } from './algorithms/EcdsaSigningAlgorithm';
5
- /**
6
- * 🎯 SINGLE SOURCE OF TRUTH - Add new algorithms here and everything else is automatic!
7
- * This is the ONLY place you need to add new signing algorithms
8
- */
9
- export const SIGNING_ALGORITHM_CLASSES = {
10
- ed25519: Ed25519SigningAlgorithm,
11
- bip340: BIP340SigningAlgorithm,
12
- ecdsa: EcdsaSigningAlgorithm,
13
- };
14
- /**
15
- * Derive runtime array of algorithm names from classes
16
- */
17
- export const ALL_SIGNING_ALGORITHM_NAMES = Object.keys(SIGNING_ALGORITHM_CLASSES);
18
- /**
19
- * Create algorithm instances (derived from classes)
20
- */
21
- export const SIGNING_ALGORITHM_INSTANCES = {
22
- ed25519: new SIGNING_ALGORITHM_CLASSES.ed25519(),
23
- bip340: new SIGNING_ALGORITHM_CLASSES.bip340(),
24
- ecdsa: new SIGNING_ALGORITHM_CLASSES.ecdsa(),
25
- };
26
- /**
27
- * Create union schema (derived from instances)
28
- */
29
- export const ALL_SIGNING_ALGORITHM_SCHEMA = (() => {
30
- const schemas = Object.values(SIGNING_ALGORITHM_INSTANCES).map((instance) => instance.schema);
31
- if (schemas.length === 0) {
32
- throw new Error('No signing algorithms defined');
33
- }
34
- if (schemas.length === 1) {
35
- return schemas[0];
36
- }
37
- return union([
38
- schemas[0],
39
- schemas[1],
40
- ...schemas.slice(2),
41
- ]);
42
- })();
43
- /**
44
- * Utility to check if a string is a valid signing algorithm name
45
- */
46
- export function isValidSigningAlgorithm(name) {
47
- return name in SIGNING_ALGORITHM_CLASSES;
48
- }
49
- /**
50
- * Create keygen result from secret share using algorithm-specific logic
51
- */
52
- export function createKeygenResultFromSecretShare(algorithmName, secretShare) {
53
- const algorithm = SIGNING_ALGORITHM_INSTANCES[algorithmName];
54
- if (!algorithm) {
55
- throw new Error(`Unknown signing algorithm: ${algorithmName}`);
56
- }
57
- return algorithm.createKeygenResultFromSecretShare(secretShare);
58
- }
59
- //# sourceMappingURL=allAlgorithms.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"allAlgorithms.js","sourceRoot":"","sources":["../../src/signing/allAlgorithms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAa,MAAM,OAAO,CAAC;AACzC,OAAO,EACL,uBAAuB,GAExB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,sBAAsB,GAEvB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,qBAAqB,GAEtB,MAAM,oCAAoC,CAAC;AAG5C;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,OAAO,EAAE,uBAAuB;IAChC,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE,qBAAqB;CACpB,CAAC;AAoBX;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,IAAI,CACpD,yBAAyB,CACA,CAAC;AAE5B;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAGpC;IACF,OAAO,EAAE,IAAI,yBAAyB,CAAC,OAAO,EAAE;IAChD,MAAM,EAAE,IAAI,yBAAyB,CAAC,MAAM,EAAE;IAC9C,KAAK,EAAE,IAAI,yBAAyB,CAAC,KAAK,EAAE;CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GACvC,CAAC,GAAG,EAAE;IACJ,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAC5D,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAC9B,CAAC;IAEF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,OAAO,CAAC,CAAC,CAAqC,CAAC;IACxD,CAAC;IAED,OAAO,KAAK,CAAC;QACX,OAAO,CAAC,CAAC,CAAC;QACV,OAAO,CAAC,CAAC,CAAC;QACV,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;KACpB,CAAqC,CAAC;AACzC,CAAC,CAAC,EAAE,CAAC;AASP;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,IAAY;IAEZ,OAAO,IAAI,IAAI,yBAAyB,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iCAAiC,CAC/C,aAAmC,EACnC,WAAmB;IAEnB,MAAM,SAAS,GAAG,2BAA2B,CAAC,aAAa,CAAC,CAAC;IAC7D,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,8BAA8B,aAAa,EAAE,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,SAAS,CAAC,iCAAiC,CAAC,WAAW,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import { union, type Type } from 'io-ts';\nimport {\n Ed25519SigningAlgorithm,\n type Ed25519SignMessageSchema,\n} from './algorithms/Ed25519SigningAlgorithm';\nimport {\n BIP340SigningAlgorithm,\n type BIP340SignMessageSchema,\n} from './algorithms/BIP340SigningAlgorithm';\nimport {\n EcdsaSigningAlgorithm,\n type EcdsaSignMessageSchema,\n} from './algorithms/EcdsaSigningAlgorithm';\nimport type { ISigningAlgorithm } from './base';\n\n/**\n * 🎯 SINGLE SOURCE OF TRUTH - Add new algorithms here and everything else is automatic!\n * This is the ONLY place you need to add new signing algorithms\n */\nexport const SIGNING_ALGORITHM_CLASSES = {\n ed25519: Ed25519SigningAlgorithm,\n bip340: BIP340SigningAlgorithm,\n ecdsa: EcdsaSigningAlgorithm,\n} as const;\n\n/**\n * 📝 Explicit union type of all signing algorithm schemas\n * (Only other place you need to add new algorithms)\n */\nexport type AllSigningAlgorithmSchemas =\n | Ed25519SignMessageSchema\n | BIP340SignMessageSchema\n | EcdsaSignMessageSchema;\n\n// ========================================\n// 🤖 EVERYTHING BELOW IS AUTOMATICALLY DERIVED\n// ========================================\n\n/**\n * Derive signing algorithm name type from classes\n */\nexport type SigningAlgorithmName = keyof typeof SIGNING_ALGORITHM_CLASSES;\n\n/**\n * Derive runtime array of algorithm names from classes\n */\nexport const ALL_SIGNING_ALGORITHM_NAMES = Object.keys(\n SIGNING_ALGORITHM_CLASSES\n) as SigningAlgorithmName[];\n\n/**\n * Create algorithm instances (derived from classes)\n */\nexport const SIGNING_ALGORITHM_INSTANCES: Record<\n SigningAlgorithmName,\n ISigningAlgorithm\n> = {\n ed25519: new SIGNING_ALGORITHM_CLASSES.ed25519(),\n bip340: new SIGNING_ALGORITHM_CLASSES.bip340(),\n ecdsa: new SIGNING_ALGORITHM_CLASSES.ecdsa(),\n};\n\n/**\n * Create union schema (derived from instances)\n */\nexport const ALL_SIGNING_ALGORITHM_SCHEMA: Type<AllSigningAlgorithmSchemas> =\n (() => {\n const schemas = Object.values(SIGNING_ALGORITHM_INSTANCES).map(\n (instance) => instance.schema\n );\n\n if (schemas.length === 0) {\n throw new Error('No signing algorithms defined');\n }\n\n if (schemas.length === 1) {\n return schemas[0] as Type<AllSigningAlgorithmSchemas>;\n }\n\n return union([\n schemas[0],\n schemas[1],\n ...schemas.slice(2),\n ]) as Type<AllSigningAlgorithmSchemas>;\n })();\n\n/**\n * Helper type to extract algorithm-specific schema\n */\nexport type SigningAlgorithmSchemaFor<\n T extends AllSigningAlgorithmSchemas['signingAlgo'],\n> = Extract<AllSigningAlgorithmSchemas, { signingAlgo: T }>;\n\n/**\n * Utility to check if a string is a valid signing algorithm name\n */\nexport function isValidSigningAlgorithm(\n name: string\n): name is SigningAlgorithmName {\n return name in SIGNING_ALGORITHM_CLASSES;\n}\n\n/**\n * Create keygen result from secret share using algorithm-specific logic\n */\nexport function createKeygenResultFromSecretShare(\n algorithmName: SigningAlgorithmName,\n secretShare: string\n): any {\n const algorithm = SIGNING_ALGORITHM_INSTANCES[algorithmName];\n if (!algorithm) {\n throw new Error(`Unknown signing algorithm: ${algorithmName}`);\n }\n return algorithm.createKeygenResultFromSecretShare(secretShare);\n}\n"]}
@@ -1,42 +0,0 @@
1
- import type { Type } from 'io-ts';
2
- /**
3
- * Base secret share data (what gets encrypted)
4
- */
5
- export interface SecretShareData {
6
- secretShare: string;
7
- signingAlgorithm: string;
8
- timestamp: number;
9
- nonce: string;
10
- }
11
- /**
12
- * Decrypted secret share with reconstructed keygen result
13
- */
14
- export interface DecryptedSecretShare {
15
- keygenResult: any;
16
- signingAlgorithm: string;
17
- timestamp: number;
18
- nonce: string;
19
- }
20
- /**
21
- * Base interface for signing algorithm implementations
22
- */
23
- export interface ISigningAlgorithm {
24
- readonly algorithmName: string;
25
- readonly version: number;
26
- readonly schema: Type<any>;
27
- createKeygenResultFromSecretShare(secretShare: string): any;
28
- createSignRequest(keygenResult: any, params: any): any;
29
- processSignResult(result: any): Uint8Array;
30
- }
31
- /**
32
- * Base signing algorithm class
33
- */
34
- export declare abstract class BaseSigningAlgorithm implements ISigningAlgorithm {
35
- abstract readonly algorithmName: string;
36
- abstract readonly version: number;
37
- abstract readonly schema: Type<any>;
38
- abstract createKeygenResultFromSecretShare(secretShare: string): any;
39
- abstract createSignRequest(keygenResult: any, params: any): any;
40
- abstract processSignResult(result: any): Uint8Array;
41
- }
42
- //# sourceMappingURL=base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/signing/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,GAAG,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAE3B,iCAAiC,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC;IAC5D,iBAAiB,CAAC,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG,CAAC;IACvD,iBAAiB,CAAC,MAAM,EAAE,GAAG,GAAG,UAAU,CAAC;CAC5C;AAED;;GAEG;AACH,8BAAsB,oBAAqB,YAAW,iBAAiB;IACrE,QAAQ,CAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAEpC,QAAQ,CAAC,iCAAiC,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG;IACpE,QAAQ,CAAC,iBAAiB,CAAC,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG;IAC/D,QAAQ,CAAC,iBAAiB,CAAC,MAAM,EAAE,GAAG,GAAG,UAAU;CACpD"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Base signing algorithm class
3
- */
4
- export class BaseSigningAlgorithm {
5
- }
6
- //# sourceMappingURL=base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/signing/base.ts"],"names":[],"mappings":"AAmCA;;GAEG;AACH,MAAM,OAAgB,oBAAoB;CAQzC","sourcesContent":["import type { Type } from 'io-ts';\n\n/**\n * Base secret share data (what gets encrypted)\n */\nexport interface SecretShareData {\n secretShare: string;\n signingAlgorithm: string;\n timestamp: number;\n nonce: string;\n}\n\n/**\n * Decrypted secret share with reconstructed keygen result\n */\nexport interface DecryptedSecretShare {\n keygenResult: any;\n signingAlgorithm: string;\n timestamp: number;\n nonce: string;\n}\n\n/**\n * Base interface for signing algorithm implementations\n */\nexport interface ISigningAlgorithm {\n readonly algorithmName: string;\n readonly version: number;\n readonly schema: Type<any>;\n\n createKeygenResultFromSecretShare(secretShare: string): any;\n createSignRequest(keygenResult: any, params: any): any;\n processSignResult(result: any): Uint8Array;\n}\n\n/**\n * Base signing algorithm class\n */\nexport abstract class BaseSigningAlgorithm implements ISigningAlgorithm {\n abstract readonly algorithmName: string;\n abstract readonly version: number;\n abstract readonly schema: Type<any>;\n\n abstract createKeygenResultFromSecretShare(secretShare: string): any;\n abstract createSignRequest(keygenResult: any, params: any): any;\n abstract processSignResult(result: any): Uint8Array;\n}\n"]}
@@ -1,7 +0,0 @@
1
- export * from './base';
2
- export * from './allAlgorithms';
3
- export * from './registry';
4
- export { Ed25519SigningAlgorithm } from './algorithms/Ed25519SigningAlgorithm';
5
- export { BIP340SigningAlgorithm } from './algorithms/BIP340SigningAlgorithm';
6
- export { EcdsaSigningAlgorithm } from './algorithms/EcdsaSigningAlgorithm';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signing/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAG3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC"}
@@ -1,9 +0,0 @@
1
- // Export everything - all derived from single source
2
- export * from './base';
3
- export * from './allAlgorithms';
4
- export * from './registry';
5
- // Export algorithm classes for direct use if needed
6
- export { Ed25519SigningAlgorithm } from './algorithms/Ed25519SigningAlgorithm';
7
- export { BIP340SigningAlgorithm } from './algorithms/BIP340SigningAlgorithm';
8
- export { EcdsaSigningAlgorithm } from './algorithms/EcdsaSigningAlgorithm';
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/signing/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAE3B,oDAAoD;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC","sourcesContent":["// Export everything - all derived from single source\nexport * from './base';\nexport * from './allAlgorithms';\nexport * from './registry';\n\n// Export algorithm classes for direct use if needed\nexport { Ed25519SigningAlgorithm } from './algorithms/Ed25519SigningAlgorithm';\nexport { BIP340SigningAlgorithm } from './algorithms/BIP340SigningAlgorithm';\nexport { EcdsaSigningAlgorithm } from './algorithms/EcdsaSigningAlgorithm';\n"]}
@@ -1,26 +0,0 @@
1
- import type { SigningAlgorithmName } from './allAlgorithms';
2
- import type { ISigningAlgorithm } from './base';
3
- /**
4
- * Ultra-simple registry - everything is derived, no registration needed
5
- */
6
- declare class SigningAlgorithmRegistry {
7
- /**
8
- * Get algorithm instance (derived from single source of truth)
9
- */
10
- get(name: SigningAlgorithmName): ISigningAlgorithm;
11
- /**
12
- * Type-safe check if algorithm exists
13
- */
14
- has(name: string): name is SigningAlgorithmName;
15
- /**
16
- * Get all algorithm names (derived from classes)
17
- */
18
- getAllNames(): SigningAlgorithmName[];
19
- /**
20
- * Get all algorithm instances (derived from classes)
21
- */
22
- getAllInstances(): Record<SigningAlgorithmName, ISigningAlgorithm>;
23
- }
24
- export declare const signingAlgorithmRegistry: SigningAlgorithmRegistry;
25
- export {};
26
- //# sourceMappingURL=registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/signing/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAOhD;;GAEG;AACH,cAAM,wBAAwB;IAC5B;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,oBAAoB,GAAG,iBAAiB;IAQlD;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,oBAAoB;IAI/C;;OAEG;IACH,WAAW,IAAI,oBAAoB,EAAE;IAIrC;;OAEG;IACH,eAAe,IAAI,MAAM,CAAC,oBAAoB,EAAE,iBAAiB,CAAC;CAGnE;AAED,eAAO,MAAM,wBAAwB,0BAAiC,CAAC"}
@@ -1,36 +0,0 @@
1
- import { SIGNING_ALGORITHM_INSTANCES, ALL_SIGNING_ALGORITHM_NAMES, isValidSigningAlgorithm, } from './allAlgorithms';
2
- /**
3
- * Ultra-simple registry - everything is derived, no registration needed
4
- */
5
- class SigningAlgorithmRegistry {
6
- /**
7
- * Get algorithm instance (derived from single source of truth)
8
- */
9
- get(name) {
10
- const algorithm = SIGNING_ALGORITHM_INSTANCES[name];
11
- if (!algorithm) {
12
- throw new Error(`Unknown signing algorithm: ${name}`);
13
- }
14
- return algorithm;
15
- }
16
- /**
17
- * Type-safe check if algorithm exists
18
- */
19
- has(name) {
20
- return isValidSigningAlgorithm(name);
21
- }
22
- /**
23
- * Get all algorithm names (derived from classes)
24
- */
25
- getAllNames() {
26
- return ALL_SIGNING_ALGORITHM_NAMES;
27
- }
28
- /**
29
- * Get all algorithm instances (derived from classes)
30
- */
31
- getAllInstances() {
32
- return SIGNING_ALGORITHM_INSTANCES;
33
- }
34
- }
35
- export const signingAlgorithmRegistry = new SigningAlgorithmRegistry();
36
- //# sourceMappingURL=registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/signing/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,wBAAwB;IAC5B;;OAEG;IACH,GAAG,CAAC,IAA0B;QAC5B,MAAM,SAAS,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI,EAAE,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,IAAY;QACd,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,WAAW;QACT,OAAO,2BAA2B,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,2BAA2B,CAAC;IACrC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,wBAAwB,EAAE,CAAC","sourcesContent":["import type { SigningAlgorithmName } from './allAlgorithms';\nimport type { ISigningAlgorithm } from './base';\nimport {\n SIGNING_ALGORITHM_INSTANCES,\n ALL_SIGNING_ALGORITHM_NAMES,\n isValidSigningAlgorithm,\n} from './allAlgorithms';\n\n/**\n * Ultra-simple registry - everything is derived, no registration needed\n */\nclass SigningAlgorithmRegistry {\n /**\n * Get algorithm instance (derived from single source of truth)\n */\n get(name: SigningAlgorithmName): ISigningAlgorithm {\n const algorithm = SIGNING_ALGORITHM_INSTANCES[name];\n if (!algorithm) {\n throw new Error(`Unknown signing algorithm: ${name}`);\n }\n return algorithm;\n }\n\n /**\n * Type-safe check if algorithm exists\n */\n has(name: string): name is SigningAlgorithmName {\n return isValidSigningAlgorithm(name);\n }\n\n /**\n * Get all algorithm names (derived from classes)\n */\n getAllNames(): SigningAlgorithmName[] {\n return ALL_SIGNING_ALGORITHM_NAMES;\n }\n\n /**\n * Get all algorithm instances (derived from classes)\n */\n getAllInstances(): Record<SigningAlgorithmName, ISigningAlgorithm> {\n return SIGNING_ALGORITHM_INSTANCES;\n }\n}\n\nexport const signingAlgorithmRegistry = new SigningAlgorithmRegistry();\n"]}
package/dist/types.d.ts DELETED
@@ -1,42 +0,0 @@
1
- /**
2
- * Base structure for all WebSocket messages
3
- */
4
- export interface BaseWebSocketMessage {
5
- type: string;
6
- version: number;
7
- }
8
- /**
9
- * WebSocket error types
10
- */
11
- export declare enum WebSocketErrorType {
12
- INVALID_MESSAGE = "INVALID_MESSAGE",
13
- HANDLER_NOT_FOUND = "HANDLER_NOT_FOUND",
14
- HANDLER_ERROR = "HANDLER_ERROR",
15
- CONNECTION_ERROR = "CONNECTION_ERROR",
16
- VALIDATION_ERROR = "VALIDATION_ERROR"
17
- }
18
- /**
19
- * Structured WebSocket error
20
- */
21
- export interface WebSocketError {
22
- type: WebSocketErrorType;
23
- message: string;
24
- details?: unknown;
25
- }
26
- /**
27
- * Standard error response format
28
- */
29
- export interface ErrorResponse extends BaseWebSocketMessage {
30
- type: 'error';
31
- error: WebSocketError;
32
- }
33
- /**
34
- * WebSocket connection context (client-side version without ws instance)
35
- */
36
- export interface WebSocketConnectionInfo {
37
- id: string;
38
- connectedAt: Date;
39
- lastActivity: Date;
40
- metadata?: Record<string, unknown>;
41
- }
42
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,oBAAY,kBAAkB;IAC5B,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;IACvC,aAAa,kBAAkB;IAC/B,gBAAgB,qBAAqB;IACrC,gBAAgB,qBAAqB;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,oBAAoB;IACzD,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,cAAc,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,IAAI,CAAC;IAClB,YAAY,EAAE,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC"}
package/dist/types.js DELETED
@@ -1,12 +0,0 @@
1
- /**
2
- * WebSocket error types
3
- */
4
- export var WebSocketErrorType;
5
- (function (WebSocketErrorType) {
6
- WebSocketErrorType["INVALID_MESSAGE"] = "INVALID_MESSAGE";
7
- WebSocketErrorType["HANDLER_NOT_FOUND"] = "HANDLER_NOT_FOUND";
8
- WebSocketErrorType["HANDLER_ERROR"] = "HANDLER_ERROR";
9
- WebSocketErrorType["CONNECTION_ERROR"] = "CONNECTION_ERROR";
10
- WebSocketErrorType["VALIDATION_ERROR"] = "VALIDATION_ERROR";
11
- })(WebSocketErrorType || (WebSocketErrorType = {}));
12
- //# sourceMappingURL=types.js.map
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,6DAAuC,CAAA;IACvC,qDAA+B,CAAA;IAC/B,2DAAqC,CAAA;IACrC,2DAAqC,CAAA;AACvC,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B","sourcesContent":["/**\n * Base structure for all WebSocket messages\n */\nexport interface BaseWebSocketMessage {\n type: string;\n version: number;\n}\n\n/**\n * WebSocket error types\n */\nexport enum WebSocketErrorType {\n INVALID_MESSAGE = 'INVALID_MESSAGE',\n HANDLER_NOT_FOUND = 'HANDLER_NOT_FOUND',\n HANDLER_ERROR = 'HANDLER_ERROR',\n CONNECTION_ERROR = 'CONNECTION_ERROR',\n VALIDATION_ERROR = 'VALIDATION_ERROR',\n}\n\n/**\n * Structured WebSocket error\n */\nexport interface WebSocketError {\n type: WebSocketErrorType;\n message: string;\n details?: unknown;\n}\n\n/**\n * Standard error response format\n */\nexport interface ErrorResponse extends BaseWebSocketMessage {\n type: 'error';\n error: WebSocketError;\n}\n\n/**\n * WebSocket connection context (client-side version without ws instance)\n */\nexport interface WebSocketConnectionInfo {\n id: string;\n connectedAt: Date;\n lastActivity: Date;\n metadata?: Record<string, unknown>;\n}\n"]}
@@ -1,16 +0,0 @@
1
- /**
2
- * Asserts that a value is defined (not null or undefined)
3
- * @throws Error if value is null or undefined
4
- */
5
- export declare function assertDefined<T>(value: T | null | undefined, message?: string): asserts value is T;
6
- /**
7
- * Asserts that a value is not null
8
- * @throws Error if value is null
9
- */
10
- export declare function assertNotNull<T>(value: T | null, message?: string): asserts value is T;
11
- /**
12
- * Returns a value if it is defined, otherwise throws an error
13
- * @throws Error if value is null or undefined
14
- */
15
- export declare function getDefined<T>(value: T | null | undefined, message?: string): T;
16
- //# sourceMappingURL=assertDefined.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assertDefined.d.ts","sourceRoot":"","sources":["../../src/utils/assertDefined.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC3B,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,KAAK,IAAI,CAAC,CAIpB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,KAAK,EAAE,CAAC,GAAG,IAAI,EACf,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,KAAK,IAAI,CAAC,CAIpB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC3B,OAAO,CAAC,EAAE,MAAM,GACf,CAAC,CAGH"}