@wallfree-dev/serializer 0.13.42

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 (214) hide show
  1. package/LICENSE.md +7 -0
  2. package/index.d.ts +24 -0
  3. package/index.js +20 -0
  4. package/index.js.map +1 -0
  5. package/package.json +65 -0
  6. package/readme.md +121 -0
  7. package/v2/inter-app-communication-protocol.d.ts +15 -0
  8. package/v2/inter-app-communication-protocol.js +124 -0
  9. package/v2/inter-app-communication-protocol.js.map +1 -0
  10. package/v2/interfaces.d.ts +8 -0
  11. package/v2/interfaces.js +31 -0
  12. package/v2/interfaces.js.map +1 -0
  13. package/v2/message.d.ts +43 -0
  14. package/v2/message.js +85 -0
  15. package/v2/message.js.map +1 -0
  16. package/v2/payloads/chunked-payload.d.ts +18 -0
  17. package/v2/payloads/chunked-payload.js +56 -0
  18. package/v2/payloads/chunked-payload.js.map +1 -0
  19. package/v2/payloads/full-payload.d.ts +15 -0
  20. package/v2/payloads/full-payload.js +61 -0
  21. package/v2/payloads/full-payload.js.map +1 -0
  22. package/v2/payloads/payload.d.ts +5 -0
  23. package/v2/payloads/payload.js +3 -0
  24. package/v2/payloads/payload.js.map +1 -0
  25. package/v2/schemas/definitions/account-share-request.d.ts +4 -0
  26. package/v2/schemas/definitions/account-share-request.js +3 -0
  27. package/v2/schemas/definitions/account-share-request.js.map +1 -0
  28. package/v2/schemas/definitions/account-share-response.d.ts +5 -0
  29. package/v2/schemas/definitions/account-share-response.js +3 -0
  30. package/v2/schemas/definitions/account-share-response.js.map +1 -0
  31. package/v2/schemas/definitions/config-set-request.d.ts +7 -0
  32. package/v2/schemas/definitions/config-set-request.js +3 -0
  33. package/v2/schemas/definitions/config-set-request.js.map +1 -0
  34. package/v2/schemas/definitions/config-set-response.d.ts +4 -0
  35. package/v2/schemas/definitions/config-set-response.js +3 -0
  36. package/v2/schemas/definitions/config-set-response.js.map +1 -0
  37. package/v2/schemas/definitions/hex-string.d.ts +1 -0
  38. package/v2/schemas/definitions/hex-string.js +3 -0
  39. package/v2/schemas/definitions/hex-string.js.map +1 -0
  40. package/v2/schemas/definitions/item-retrieve-request.d.ts +5 -0
  41. package/v2/schemas/definitions/item-retrieve-request.js +3 -0
  42. package/v2/schemas/definitions/item-retrieve-request.js.map +1 -0
  43. package/v2/schemas/definitions/item-retrieve-response.d.ts +3 -0
  44. package/v2/schemas/definitions/item-retrieve-response.js +3 -0
  45. package/v2/schemas/definitions/item-retrieve-response.js.map +1 -0
  46. package/v2/schemas/definitions/item-store-request.d.ts +5 -0
  47. package/v2/schemas/definitions/item-store-request.js +3 -0
  48. package/v2/schemas/definitions/item-store-request.js.map +1 -0
  49. package/v2/schemas/definitions/item-store-response.d.ts +3 -0
  50. package/v2/schemas/definitions/item-store-response.js +3 -0
  51. package/v2/schemas/definitions/item-store-response.js.map +1 -0
  52. package/v2/schemas/definitions/message-encrypt-request.d.ts +8 -0
  53. package/v2/schemas/definitions/message-encrypt-request.js +3 -0
  54. package/v2/schemas/definitions/message-encrypt-request.js.map +1 -0
  55. package/v2/schemas/definitions/message-encrypt-response.d.ts +4 -0
  56. package/v2/schemas/definitions/message-encrypt-response.js +3 -0
  57. package/v2/schemas/definitions/message-encrypt-response.js.map +1 -0
  58. package/v2/schemas/definitions/message-sign-request.d.ts +5 -0
  59. package/v2/schemas/definitions/message-sign-request.js +3 -0
  60. package/v2/schemas/definitions/message-sign-request.js.map +1 -0
  61. package/v2/schemas/definitions/message-sign-response.d.ts +5 -0
  62. package/v2/schemas/definitions/message-sign-response.js +3 -0
  63. package/v2/schemas/definitions/message-sign-response.js.map +1 -0
  64. package/v2/schemas/definitions/message-verify-request.d.ts +6 -0
  65. package/v2/schemas/definitions/message-verify-request.js +3 -0
  66. package/v2/schemas/definitions/message-verify-request.js.map +1 -0
  67. package/v2/schemas/definitions/message-verify-response.d.ts +6 -0
  68. package/v2/schemas/definitions/message-verify-response.js +3 -0
  69. package/v2/schemas/definitions/message-verify-response.js.map +1 -0
  70. package/v2/schemas/definitions/multisig-request.d.ts +7 -0
  71. package/v2/schemas/definitions/multisig-request.js +3 -0
  72. package/v2/schemas/definitions/multisig-request.js.map +1 -0
  73. package/v2/schemas/definitions/multisig-response.d.ts +5 -0
  74. package/v2/schemas/definitions/multisig-response.js +3 -0
  75. package/v2/schemas/definitions/multisig-response.js.map +1 -0
  76. package/v2/schemas/definitions/pair-request.d.ts +7 -0
  77. package/v2/schemas/definitions/pair-request.js +3 -0
  78. package/v2/schemas/definitions/pair-request.js.map +1 -0
  79. package/v2/schemas/definitions/pair-response.d.ts +6 -0
  80. package/v2/schemas/definitions/pair-response.js +3 -0
  81. package/v2/schemas/definitions/pair-response.js.map +1 -0
  82. package/v2/schemas/generated/account-share-request.json +22 -0
  83. package/v2/schemas/generated/account-share-response.json +22 -0
  84. package/v2/schemas/generated/message-sign-request.json +22 -0
  85. package/v2/schemas/generated/message-sign-response.json +22 -0
  86. package/v2/schemas/schema.d.ts +30 -0
  87. package/v2/schemas/schema.js +15 -0
  88. package/v2/schemas/schema.js.map +1 -0
  89. package/v2/serializer.d.ts +25 -0
  90. package/v2/serializer.js +165 -0
  91. package/v2/serializer.js.map +1 -0
  92. package/v2/transactions/transaction-sign-request.d.ts +5 -0
  93. package/v2/transactions/transaction-sign-request.js +3 -0
  94. package/v2/transactions/transaction-sign-request.js.map +1 -0
  95. package/v2/transactions/transaction-sign-response.d.ts +4 -0
  96. package/v2/transactions/transaction-sign-response.js +3 -0
  97. package/v2/transactions/transaction-sign-response.js.map +1 -0
  98. package/v2/utils/generateId.d.ts +1 -0
  99. package/v2/utils/generateId.js +15 -0
  100. package/v2/utils/generateId.js.map +1 -0
  101. package/v2/utils/json-to-rlp.d.ts +8 -0
  102. package/v2/utils/json-to-rlp.js +177 -0
  103. package/v2/utils/json-to-rlp.js.map +1 -0
  104. package/v2/utils/toBuffer.d.ts +4 -0
  105. package/v2/utils/toBuffer.js +27 -0
  106. package/v2/utils/toBuffer.js.map +1 -0
  107. package/v2/validators/transactions.validator.d.ts +8 -0
  108. package/v2/validators/transactions.validator.js +3 -0
  109. package/v2/validators/transactions.validator.js.map +1 -0
  110. package/v2/validators/validators.d.ts +1 -0
  111. package/v2/validators/validators.js +172 -0
  112. package/v2/validators/validators.js.map +1 -0
  113. package/v3/iac-message-wrapper.d.ts +15 -0
  114. package/v3/iac-message-wrapper.js +77 -0
  115. package/v3/iac-message-wrapper.js.map +1 -0
  116. package/v3/interfaces.d.ts +8 -0
  117. package/v3/interfaces.js +31 -0
  118. package/v3/interfaces.js.map +1 -0
  119. package/v3/message.d.ts +42 -0
  120. package/v3/message.js +117 -0
  121. package/v3/message.js.map +1 -0
  122. package/v3/payload.d.ts +10 -0
  123. package/v3/payload.js +28 -0
  124. package/v3/payload.js.map +1 -0
  125. package/v3/schemas/definitions/account-share-request.d.ts +4 -0
  126. package/v3/schemas/definitions/account-share-request.js +3 -0
  127. package/v3/schemas/definitions/account-share-request.js.map +1 -0
  128. package/v3/schemas/definitions/account-share-response.d.ts +9 -0
  129. package/v3/schemas/definitions/account-share-response.js +3 -0
  130. package/v3/schemas/definitions/account-share-response.js.map +1 -0
  131. package/v3/schemas/definitions/config-set-request.d.ts +7 -0
  132. package/v3/schemas/definitions/config-set-request.js +3 -0
  133. package/v3/schemas/definitions/config-set-request.js.map +1 -0
  134. package/v3/schemas/definitions/config-set-response.d.ts +4 -0
  135. package/v3/schemas/definitions/config-set-response.js +3 -0
  136. package/v3/schemas/definitions/config-set-response.js.map +1 -0
  137. package/v3/schemas/definitions/hex-string.d.ts +1 -0
  138. package/v3/schemas/definitions/hex-string.js +3 -0
  139. package/v3/schemas/definitions/hex-string.js.map +1 -0
  140. package/v3/schemas/definitions/item-retrieve-request.d.ts +5 -0
  141. package/v3/schemas/definitions/item-retrieve-request.js +3 -0
  142. package/v3/schemas/definitions/item-retrieve-request.js.map +1 -0
  143. package/v3/schemas/definitions/item-retrieve-response.d.ts +3 -0
  144. package/v3/schemas/definitions/item-retrieve-response.js +3 -0
  145. package/v3/schemas/definitions/item-retrieve-response.js.map +1 -0
  146. package/v3/schemas/definitions/item-store-request.d.ts +5 -0
  147. package/v3/schemas/definitions/item-store-request.js +3 -0
  148. package/v3/schemas/definitions/item-store-request.js.map +1 -0
  149. package/v3/schemas/definitions/item-store-response.d.ts +3 -0
  150. package/v3/schemas/definitions/item-store-response.js +3 -0
  151. package/v3/schemas/definitions/item-store-response.js.map +1 -0
  152. package/v3/schemas/definitions/message-encrypt-request.d.ts +8 -0
  153. package/v3/schemas/definitions/message-encrypt-request.js +3 -0
  154. package/v3/schemas/definitions/message-encrypt-request.js.map +1 -0
  155. package/v3/schemas/definitions/message-encrypt-response.d.ts +4 -0
  156. package/v3/schemas/definitions/message-encrypt-response.js +3 -0
  157. package/v3/schemas/definitions/message-encrypt-response.js.map +1 -0
  158. package/v3/schemas/definitions/message-sign-request.d.ts +5 -0
  159. package/v3/schemas/definitions/message-sign-request.js +3 -0
  160. package/v3/schemas/definitions/message-sign-request.js.map +1 -0
  161. package/v3/schemas/definitions/message-sign-response.d.ts +5 -0
  162. package/v3/schemas/definitions/message-sign-response.js +3 -0
  163. package/v3/schemas/definitions/message-sign-response.js.map +1 -0
  164. package/v3/schemas/definitions/message-verify-request.d.ts +6 -0
  165. package/v3/schemas/definitions/message-verify-request.js +3 -0
  166. package/v3/schemas/definitions/message-verify-request.js.map +1 -0
  167. package/v3/schemas/definitions/message-verify-response.d.ts +6 -0
  168. package/v3/schemas/definitions/message-verify-response.js +3 -0
  169. package/v3/schemas/definitions/message-verify-response.js.map +1 -0
  170. package/v3/schemas/definitions/multisig-request.d.ts +7 -0
  171. package/v3/schemas/definitions/multisig-request.js +3 -0
  172. package/v3/schemas/definitions/multisig-request.js.map +1 -0
  173. package/v3/schemas/definitions/multisig-response.d.ts +5 -0
  174. package/v3/schemas/definitions/multisig-response.js +3 -0
  175. package/v3/schemas/definitions/multisig-response.js.map +1 -0
  176. package/v3/schemas/definitions/pair-request.d.ts +7 -0
  177. package/v3/schemas/definitions/pair-request.js +3 -0
  178. package/v3/schemas/definitions/pair-request.js.map +1 -0
  179. package/v3/schemas/definitions/pair-response.d.ts +6 -0
  180. package/v3/schemas/definitions/pair-response.js +3 -0
  181. package/v3/schemas/definitions/pair-response.js.map +1 -0
  182. package/v3/schemas/generated/account-share-request.json +22 -0
  183. package/v3/schemas/generated/account-share-response.json +34 -0
  184. package/v3/schemas/generated/message-sign-request.json +22 -0
  185. package/v3/schemas/generated/message-sign-response.json +22 -0
  186. package/v3/schemas/generated/transaction-sign-request-astar.json +0 -0
  187. package/v3/schemas/generated/transaction-sign-request-substrate.json +29 -0
  188. package/v3/schemas/schema.d.ts +29 -0
  189. package/v3/schemas/schema.js +14 -0
  190. package/v3/schemas/schema.js.map +1 -0
  191. package/v3/serializer.d.ts +23 -0
  192. package/v3/serializer.js +171 -0
  193. package/v3/serializer.js.map +1 -0
  194. package/v3/transactions/transaction-sign-request.d.ts +5 -0
  195. package/v3/transactions/transaction-sign-request.js +3 -0
  196. package/v3/transactions/transaction-sign-request.js.map +1 -0
  197. package/v3/transactions/transaction-sign-response.d.ts +4 -0
  198. package/v3/transactions/transaction-sign-response.js +3 -0
  199. package/v3/transactions/transaction-sign-response.js.map +1 -0
  200. package/v3/utils/generateId.d.ts +2 -0
  201. package/v3/utils/generateId.js +17 -0
  202. package/v3/utils/generateId.js.map +1 -0
  203. package/v3/utils/json-to-rlp.d.ts +8 -0
  204. package/v3/utils/json-to-rlp.js +235 -0
  205. package/v3/utils/json-to-rlp.js.map +1 -0
  206. package/v3/utils/toBuffer.d.ts +2 -0
  207. package/v3/utils/toBuffer.js +22 -0
  208. package/v3/utils/toBuffer.js.map +1 -0
  209. package/v3/validators/transactions.validator.d.ts +9 -0
  210. package/v3/validators/transactions.validator.js +3 -0
  211. package/v3/validators/transactions.validator.js.map +1 -0
  212. package/v3/validators/validators.d.ts +1 -0
  213. package/v3/validators/validators.js +170 -0
  214. package/v3/validators/validators.js.map +1 -0
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=item-retrieve-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-retrieve-response.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/item-retrieve-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface ItemStoreRequest {
2
+ id: string;
3
+ payload: string;
4
+ callbackURL?: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=item-store-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-store-request.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/item-store-request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export interface ItemStoreResponse {
2
+ storageId: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=item-store-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-store-response.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/item-store-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export interface MessageEncryptRequest {
2
+ method: 'symmetric' | 'asymmetric';
3
+ message: string;
4
+ publicKey: string;
5
+ protocol: string;
6
+ publicKeyToEncryptResponse: string;
7
+ callbackURL?: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=message-encrypt-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-encrypt-request.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/message-encrypt-request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface MessageEncryptResponse {
2
+ encryptedMessage: string;
3
+ publicKey: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=message-encrypt-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-encrypt-response.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/message-encrypt-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface MessageSignRequest {
2
+ message: string;
3
+ publicKey: string;
4
+ callbackURL?: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=message-sign-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-sign-request.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/message-sign-request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface MessageSignResponse {
2
+ message: string;
3
+ publicKey: string;
4
+ signature: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=message-sign-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-sign-response.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/message-sign-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export interface MessageSignRequest {
2
+ message: string;
3
+ publicKey: string;
4
+ signature: string;
5
+ callbackURL?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=message-verify-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-verify-request.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/message-verify-request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export interface MessageSignResponse {
2
+ message: string;
3
+ publicKey: string;
4
+ signature: string;
5
+ isValid: boolean;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=message-verify-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-verify-response.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/message-verify-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export interface MultisigRequest {
2
+ signingPeers: string[];
3
+ transaction: string;
4
+ signature: string;
5
+ publicKey: string;
6
+ callbackURL?: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=multisig-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multisig-request.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/multisig-request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface MultisigResponse {
2
+ signingPeers: string[];
3
+ transaction: string;
4
+ signature: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=multisig-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multisig-response.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/multisig-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export interface PairRequest {
2
+ peerId: string;
3
+ appName: string;
4
+ appVersion: string;
5
+ publicKey: string;
6
+ callbackURL?: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pair-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pair-request.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/pair-request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export interface PairResponse {
2
+ peerId: string;
3
+ appName: string;
4
+ appVersion: string;
5
+ publicKey: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pair-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pair-response.js","sourceRoot":"","sources":["../../../../src/v3/schemas/definitions/pair-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ {
2
+ "$ref": "#/definitions/AccountShareRequest",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "AccountShareRequest": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "callbackURL": {
9
+ "type": "string"
10
+ },
11
+ "protocols": {
12
+ "items": {
13
+ "type": "string"
14
+ },
15
+ "type": "array"
16
+ }
17
+ },
18
+ "required": ["protocols"],
19
+ "type": "object"
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$ref": "#/definitions/AccountShareResponse",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "AccountShareResponse": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "derivationPath": {
9
+ "type": "string"
10
+ },
11
+ "groupId": {
12
+ "type": "string"
13
+ },
14
+ "groupLabel": {
15
+ "type": "string"
16
+ },
17
+ "isActive": {
18
+ "type": "boolean"
19
+ },
20
+ "isExtendedPublicKey": {
21
+ "type": "boolean"
22
+ },
23
+ "masterFingerprint": {
24
+ "type": "string"
25
+ },
26
+ "publicKey": {
27
+ "type": "string"
28
+ }
29
+ },
30
+ "required": ["publicKey", "derivationPath", "isExtendedPublicKey", "masterFingerprint", "isActive", "groupId", "groupLabel"],
31
+ "type": "object"
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$ref": "#/definitions/MessageSignRequest",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "MessageSignRequest": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "callbackURL": {
9
+ "type": "string"
10
+ },
11
+ "message": {
12
+ "type": "string"
13
+ },
14
+ "publicKey": {
15
+ "type": "string"
16
+ }
17
+ },
18
+ "required": ["message", "publicKey"],
19
+ "type": "object"
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$ref": "#/definitions/MessageSignResponse",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "MessageSignResponse": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "message": {
9
+ "type": "string"
10
+ },
11
+ "publicKey": {
12
+ "type": "string"
13
+ },
14
+ "signature": {
15
+ "type": "string"
16
+ }
17
+ },
18
+ "required": ["message", "publicKey", "signature"],
19
+ "type": "object"
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$ref": "#/definitions/UnsignedSubstrateTransaction",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "UnsignedSubstrateTransaction": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "callbackURL": {
9
+ "type": "string"
10
+ },
11
+ "publicKey": {
12
+ "type": "string"
13
+ },
14
+ "transaction": {
15
+ "additionalProperties": false,
16
+ "properties": {
17
+ "encoded": {
18
+ "type": "string"
19
+ }
20
+ },
21
+ "required": ["encoded"],
22
+ "type": "object"
23
+ }
24
+ },
25
+ "required": ["publicKey", "transaction"],
26
+ "type": "object"
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,29 @@
1
+ export declare type SchemaTransformer = (value: any) => any;
2
+ export declare enum SchemaTypes {
3
+ STRING = "string",
4
+ NUMBER = "number",
5
+ INTEGER = "integer",
6
+ BOOLEAN = "boolean",
7
+ NULL = "null",
8
+ ARRAY = "array",
9
+ OBJECT = "object"
10
+ }
11
+ export interface SchemaRoot {
12
+ $ref: string;
13
+ $schema: string;
14
+ definitions: SchemaDefinition;
15
+ }
16
+ export interface SchemaItem {
17
+ $ref?: string;
18
+ type?: SchemaTypes;
19
+ additionalProperties?: boolean;
20
+ properties?: SchemaItem;
21
+ required?: string[];
22
+ }
23
+ export interface SchemaDefinition {
24
+ [key: string]: SchemaItem;
25
+ }
26
+ export interface SchemaInfo {
27
+ schema: SchemaRoot;
28
+ transformer?: SchemaTransformer;
29
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SchemaTypes = void 0;
4
+ var SchemaTypes;
5
+ (function (SchemaTypes) {
6
+ SchemaTypes["STRING"] = "string";
7
+ SchemaTypes["NUMBER"] = "number";
8
+ SchemaTypes["INTEGER"] = "integer";
9
+ SchemaTypes["BOOLEAN"] = "boolean";
10
+ SchemaTypes["NULL"] = "null";
11
+ SchemaTypes["ARRAY"] = "array";
12
+ SchemaTypes["OBJECT"] = "object";
13
+ })(SchemaTypes = exports.SchemaTypes || (exports.SchemaTypes = {}));
14
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/v3/schemas/schema.ts"],"names":[],"mappings":";;;AAEA,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,gCAAiB,CAAA;AACnB,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB"}
@@ -0,0 +1,23 @@
1
+ import { ProtocolSymbols } from '@wallfree-dev/coinlib-core/utils/ProtocolSymbols';
2
+ import { IACMessageDefinitionObjectV3 } from './message';
3
+ import { SchemaInfo } from './schemas/schema';
4
+ import { TransactionValidator, TransactionValidatorFactory } from './validators/transactions.validator';
5
+ export declare class SerializerV3 {
6
+ private readonly schemas;
7
+ private readonly validators;
8
+ private readonly supportedProtocols;
9
+ private static instance;
10
+ static getInstance(): SerializerV3;
11
+ private constructor();
12
+ static addSchema(schemaId: number, schema: SchemaInfo, protocol?: ProtocolSymbols): void;
13
+ addSchema(schemaId: number, schema: SchemaInfo, protocol?: ProtocolSymbols): void;
14
+ static getSchemas(schemaId: number, protocol?: ProtocolSymbols): SchemaInfo[];
15
+ getSchemas(schemaId: number, protocol?: ProtocolSymbols): SchemaInfo[];
16
+ private static getSchemaName;
17
+ static addValidator(protocol: ProtocolSymbols, validator: TransactionValidatorFactory): void;
18
+ addValidator(protocol: ProtocolSymbols, validator: TransactionValidatorFactory): void;
19
+ getSupportedProtocols(): Set<string>;
20
+ serialize(messages: IACMessageDefinitionObjectV3[]): Promise<string>;
21
+ deserialize(data: string): Promise<IACMessageDefinitionObjectV3[]>;
22
+ serializationValidatorByProtocolIdentifier(protocolIdentifier: ProtocolSymbols): TransactionValidator;
23
+ }
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.SerializerV3 = void 0;
40
+ var errors_1 = require("@wallfree-dev/coinlib-core/errors");
41
+ var ProtocolSymbols_1 = require("@wallfree-dev/coinlib-core/utils/ProtocolSymbols");
42
+ var iac_message_wrapper_1 = require("./iac-message-wrapper");
43
+ var interfaces_1 = require("./interfaces");
44
+ var accountShareResponse = require('./schemas/generated/account-share-response.json');
45
+ var messageSignRequest = require('./schemas/generated/message-sign-request.json');
46
+ var messageSignResponse = require('./schemas/generated/message-sign-response.json');
47
+ var SerializerV3 = /** @class */ (function () {
48
+ function SerializerV3() {
49
+ this.schemas = new Map();
50
+ this.validators = new Map();
51
+ this.supportedProtocols = new Set();
52
+ this.addSchema(interfaces_1.IACMessageType.AccountShareResponse, { schema: accountShareResponse });
53
+ this.addSchema(interfaces_1.IACMessageType.MessageSignRequest, { schema: messageSignRequest });
54
+ this.addSchema(interfaces_1.IACMessageType.MessageSignResponse, { schema: messageSignResponse });
55
+ }
56
+ SerializerV3.getInstance = function () {
57
+ if (SerializerV3.instance === undefined) {
58
+ SerializerV3.instance = new SerializerV3();
59
+ }
60
+ return SerializerV3.instance;
61
+ };
62
+ SerializerV3.addSchema = function (schemaId, schema, protocol) {
63
+ SerializerV3.getInstance().addSchema(schemaId, schema, protocol);
64
+ };
65
+ SerializerV3.prototype.addSchema = function (schemaId, schema, protocol) {
66
+ var _a;
67
+ var protocolSpecificSchemaName = SerializerV3.getSchemaName(schemaId, protocol);
68
+ var schemas = (_a = this.schemas.get(protocolSpecificSchemaName)) !== null && _a !== void 0 ? _a : [];
69
+ if (schemas.some(function (el) { return el.schema === schema.schema; })) {
70
+ throw new errors_1.SerializerError(errors_1.SerializerErrorType.SCHEMA_ALREADY_EXISTS, "Schema ".concat(protocolSpecificSchemaName, " already exists"));
71
+ }
72
+ schemas.push(schema);
73
+ this.schemas.set(protocolSpecificSchemaName, schemas);
74
+ if (protocol) {
75
+ this.supportedProtocols.add(protocol);
76
+ }
77
+ };
78
+ SerializerV3.getSchemas = function (schemaId, protocol) {
79
+ return SerializerV3.getInstance().getSchemas(schemaId, protocol);
80
+ };
81
+ SerializerV3.prototype.getSchemas = function (schemaId, protocol) {
82
+ var protocolSpecificSchemaName = SerializerV3.getSchemaName(schemaId, protocol);
83
+ var schemas;
84
+ if (this.schemas.has(protocolSpecificSchemaName)) {
85
+ schemas = this.schemas.get(protocolSpecificSchemaName);
86
+ }
87
+ else if (protocol !== undefined) {
88
+ var split = protocol.split('-');
89
+ // if protocol is a sub protocol and there is no schema defined for it, use the main protocol schema as the fallback
90
+ if (split.length >= 2) {
91
+ return this.getSchemas(schemaId, split[0]);
92
+ }
93
+ }
94
+ // Try to get the protocol specific scheme, if it doesn't exist fall back to the generic one
95
+ schemas = schemas !== undefined && schemas.length > 0 ? schemas : this.schemas.get(SerializerV3.getSchemaName(schemaId));
96
+ if (!schemas) {
97
+ throw new errors_1.SerializerError(errors_1.SerializerErrorType.SCHEMA_DOES_NOT_EXISTS, "Schema ".concat(protocolSpecificSchemaName, " does not exist"));
98
+ }
99
+ return schemas;
100
+ };
101
+ SerializerV3.getSchemaName = function (schemaId, protocol) {
102
+ var schemaName = "".concat(schemaId, "-").concat(protocol);
103
+ if ((protocol !== undefined && schemaId === interfaces_1.IACMessageType.TransactionSignRequest) ||
104
+ schemaId === interfaces_1.IACMessageType.TransactionSignResponse) {
105
+ var split = schemaName.split('-');
106
+ if (split.length >= 3 && "".concat(split[1], "-").concat(split[2]) === ProtocolSymbols_1.SubProtocolSymbols.ETH_ERC20) {
107
+ return "".concat(schemaId, "-").concat(ProtocolSymbols_1.SubProtocolSymbols.ETH_ERC20);
108
+ }
109
+ }
110
+ return protocol ? "".concat(schemaId, "-").concat(protocol) : schemaId.toString();
111
+ };
112
+ SerializerV3.addValidator = function (protocol, validator) {
113
+ SerializerV3.getInstance().addValidator(protocol, validator);
114
+ };
115
+ SerializerV3.prototype.addValidator = function (protocol, validator) {
116
+ this.validators.set(protocol, validator);
117
+ };
118
+ SerializerV3.prototype.getSupportedProtocols = function () {
119
+ return this.supportedProtocols;
120
+ };
121
+ SerializerV3.prototype.serialize = function (messages) {
122
+ return __awaiter(this, void 0, void 0, function () {
123
+ var iacps;
124
+ var _this = this;
125
+ return __generator(this, function (_a) {
126
+ if (messages.every(function (message) {
127
+ return _this.getSchemas(message.type, message.protocol).length > 0;
128
+ })) {
129
+ iacps = iac_message_wrapper_1.IACMessageWrapper.fromDecoded(JSON.parse(JSON.stringify(messages)));
130
+ return [2 /*return*/, iacps.encoded(this)];
131
+ }
132
+ else {
133
+ throw new errors_1.SerializerError(errors_1.SerializerErrorType.SCHEMA_DOES_NOT_EXISTS, "Unknown schema");
134
+ }
135
+ return [2 /*return*/];
136
+ });
137
+ });
138
+ };
139
+ SerializerV3.prototype.deserialize = function (data) {
140
+ return __awaiter(this, void 0, void 0, function () {
141
+ var result, deserializedIACMessageDefinitionObjects;
142
+ return __generator(this, function (_a) {
143
+ try {
144
+ result = iac_message_wrapper_1.IACMessageWrapper.fromEncoded(data, this);
145
+ }
146
+ catch (e) {
147
+ console.error('Deserialize error:', e);
148
+ throw new Error("Cannot decode data: ".concat(e instanceof Error ? e.message : String(e)));
149
+ }
150
+ deserializedIACMessageDefinitionObjects = result.payload.asJson();
151
+ return [2 /*return*/, deserializedIACMessageDefinitionObjects];
152
+ });
153
+ });
154
+ };
155
+ SerializerV3.prototype.serializationValidatorByProtocolIdentifier = function (protocolIdentifier) {
156
+ var _a;
157
+ var validatorsKeys = Array.from(this.validators.keys());
158
+ var exactMatch = validatorsKeys.find(function (protocol) { return protocolIdentifier === protocol; });
159
+ var startsWith = validatorsKeys.find(function (protocol) { return protocolIdentifier.startsWith(protocol); });
160
+ // TODO: Only use validator if it's a transaction
161
+ var validatorFactory = this.validators.get((_a = exactMatch !== null && exactMatch !== void 0 ? exactMatch : startsWith) !== null && _a !== void 0 ? _a : ProtocolSymbols_1.MainProtocolSymbols.ETH);
162
+ if (!validatorFactory) {
163
+ throw Error("Validator not registered for ".concat(protocolIdentifier, ", ").concat(exactMatch, ", ").concat(startsWith, ", ").concat(validatorFactory));
164
+ }
165
+ return validatorFactory.create();
166
+ };
167
+ SerializerV3.instance = undefined;
168
+ return SerializerV3;
169
+ }());
170
+ exports.SerializerV3 = SerializerV3;
171
+ //# sourceMappingURL=serializer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializer.js","sourceRoot":"","sources":["../../src/v3/serializer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAAwF;AACxF,oFAA2H;AAE3H,6DAAyD;AACzD,2CAA6C;AAK7C,IAAM,oBAAoB,GAAe,OAAO,CAAC,iDAAiD,CAAC,CAAA;AAEnG,IAAM,kBAAkB,GAAe,OAAO,CAAC,+CAA+C,CAAC,CAAA;AAC/F,IAAM,mBAAmB,GAAe,OAAO,CAAC,gDAAgD,CAAC,CAAA;AAEjG;IAcE;QAbiB,YAAO,GAA8B,IAAI,GAAG,EAAE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AA,kBAAkB,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAvC,CAAuC,CAAC,CAAA;QAC1H,iDAAiD;QACjD,IAAM,gBAAgB,GAA4C,IAAI,CAAC,UAAU,CAAC,GAAG,CACnF,MAAA,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,UAAU,mCAAI,qCAAmB,CAAC,GAAG,CACpD,CAAA;QAED,IAAI,CAAC,gBAAgB,EAAE;YACrB,MAAM,KAAK,CAAC,uCAAgC,kBAAkB,eAAK,UAAU,eAAK,UAAU,eAAK,gBAAgB,CAAE,CAAC,CAAA;SACrH;QAED,OAAO,gBAAgB,CAAC,MAAM,EAAE,CAAA;IAClC,CAAC;IAlIc,qBAAQ,GAA6B,SAAS,CAAA;IAmI/D,mBAAC;CAAA,AAxID,IAwIC;AAxIY,oCAAY"}
@@ -0,0 +1,5 @@
1
+ export interface TransactionSignRequest<T = any> {
2
+ transaction: T;
3
+ publicKey: string;
4
+ callbackURL?: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=transaction-sign-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-sign-request.js","sourceRoot":"","sources":["../../../src/v3/transactions/transaction-sign-request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface TransactionSignResponse {
2
+ transaction: string;
3
+ accountIdentifier: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=transaction-sign-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-sign-response.js","sourceRoot":"","sources":["../../../src/v3/transactions/transaction-sign-response.ts"],"names":[],"mappings":""}