@airgap/serializer 0.13.11-beta.1 → 0.13.11-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/index.d.ts +24 -0
  2. package/index.js +20 -0
  3. package/index.js.map +1 -0
  4. package/package.json +1 -5
  5. package/v2/inter-app-communication-protocol.d.ts +15 -0
  6. package/v2/inter-app-communication-protocol.js +124 -0
  7. package/v2/inter-app-communication-protocol.js.map +1 -0
  8. package/v2/interfaces.d.ts +8 -0
  9. package/v2/interfaces.js +31 -0
  10. package/v2/interfaces.js.map +1 -0
  11. package/v2/message.d.ts +43 -0
  12. package/v2/message.js +85 -0
  13. package/v2/message.js.map +1 -0
  14. package/v2/payloads/chunked-payload.d.ts +18 -0
  15. package/v2/payloads/chunked-payload.js +56 -0
  16. package/v2/payloads/chunked-payload.js.map +1 -0
  17. package/v2/payloads/full-payload.d.ts +15 -0
  18. package/v2/payloads/full-payload.js +61 -0
  19. package/v2/payloads/full-payload.js.map +1 -0
  20. package/v2/payloads/payload.d.ts +5 -0
  21. package/v2/payloads/payload.js +3 -0
  22. package/v2/payloads/payload.js.map +1 -0
  23. package/v2/schemas/definitions/account-share-request.d.ts +4 -0
  24. package/v2/schemas/definitions/account-share-request.js +3 -0
  25. package/v2/schemas/definitions/account-share-request.js.map +1 -0
  26. package/v2/schemas/definitions/account-share-response.d.ts +5 -0
  27. package/v2/schemas/definitions/account-share-response.js +3 -0
  28. package/v2/schemas/definitions/account-share-response.js.map +1 -0
  29. package/v2/schemas/definitions/config-set-request.d.ts +7 -0
  30. package/v2/schemas/definitions/config-set-request.js +3 -0
  31. package/v2/schemas/definitions/config-set-request.js.map +1 -0
  32. package/v2/schemas/definitions/config-set-response.d.ts +4 -0
  33. package/v2/schemas/definitions/config-set-response.js +3 -0
  34. package/v2/schemas/definitions/config-set-response.js.map +1 -0
  35. package/v2/schemas/definitions/hex-string.d.ts +1 -0
  36. package/v2/schemas/definitions/hex-string.js +3 -0
  37. package/v2/schemas/definitions/hex-string.js.map +1 -0
  38. package/v2/schemas/definitions/item-retrieve-request.d.ts +5 -0
  39. package/v2/schemas/definitions/item-retrieve-request.js +3 -0
  40. package/v2/schemas/definitions/item-retrieve-request.js.map +1 -0
  41. package/v2/schemas/definitions/item-retrieve-response.d.ts +3 -0
  42. package/v2/schemas/definitions/item-retrieve-response.js +3 -0
  43. package/v2/schemas/definitions/item-retrieve-response.js.map +1 -0
  44. package/v2/schemas/definitions/item-store-request.d.ts +5 -0
  45. package/v2/schemas/definitions/item-store-request.js +3 -0
  46. package/v2/schemas/definitions/item-store-request.js.map +1 -0
  47. package/v2/schemas/definitions/item-store-response.d.ts +3 -0
  48. package/v2/schemas/definitions/item-store-response.js +3 -0
  49. package/v2/schemas/definitions/item-store-response.js.map +1 -0
  50. package/v2/schemas/definitions/message-encrypt-request.d.ts +8 -0
  51. package/v2/schemas/definitions/message-encrypt-request.js +3 -0
  52. package/v2/schemas/definitions/message-encrypt-request.js.map +1 -0
  53. package/v2/schemas/definitions/message-encrypt-response.d.ts +4 -0
  54. package/v2/schemas/definitions/message-encrypt-response.js +3 -0
  55. package/v2/schemas/definitions/message-encrypt-response.js.map +1 -0
  56. package/v2/schemas/definitions/message-sign-request.d.ts +5 -0
  57. package/v2/schemas/definitions/message-sign-request.js +3 -0
  58. package/v2/schemas/definitions/message-sign-request.js.map +1 -0
  59. package/v2/schemas/definitions/message-sign-response.d.ts +5 -0
  60. package/v2/schemas/definitions/message-sign-response.js +3 -0
  61. package/v2/schemas/definitions/message-sign-response.js.map +1 -0
  62. package/v2/schemas/definitions/message-verify-request.d.ts +6 -0
  63. package/v2/schemas/definitions/message-verify-request.js +3 -0
  64. package/v2/schemas/definitions/message-verify-request.js.map +1 -0
  65. package/v2/schemas/definitions/message-verify-response.d.ts +6 -0
  66. package/v2/schemas/definitions/message-verify-response.js +3 -0
  67. package/v2/schemas/definitions/message-verify-response.js.map +1 -0
  68. package/v2/schemas/definitions/multisig-request.d.ts +7 -0
  69. package/v2/schemas/definitions/multisig-request.js +3 -0
  70. package/v2/schemas/definitions/multisig-request.js.map +1 -0
  71. package/v2/schemas/definitions/multisig-response.d.ts +5 -0
  72. package/v2/schemas/definitions/multisig-response.js +3 -0
  73. package/v2/schemas/definitions/multisig-response.js.map +1 -0
  74. package/v2/schemas/definitions/pair-request.d.ts +7 -0
  75. package/v2/schemas/definitions/pair-request.js +3 -0
  76. package/v2/schemas/definitions/pair-request.js.map +1 -0
  77. package/v2/schemas/definitions/pair-response.d.ts +6 -0
  78. package/v2/schemas/definitions/pair-response.js +3 -0
  79. package/v2/schemas/definitions/pair-response.js.map +1 -0
  80. package/v2/schemas/generated/account-share-request.json +22 -0
  81. package/v2/schemas/generated/account-share-response.json +22 -0
  82. package/v2/schemas/generated/message-sign-request.json +22 -0
  83. package/v2/schemas/generated/message-sign-response.json +22 -0
  84. package/v2/schemas/schema.d.ts +30 -0
  85. package/v2/schemas/schema.js +15 -0
  86. package/v2/schemas/schema.js.map +1 -0
  87. package/v2/serializer.d.ts +25 -0
  88. package/v2/serializer.js +165 -0
  89. package/v2/serializer.js.map +1 -0
  90. package/v2/transactions/transaction-sign-request.d.ts +5 -0
  91. package/v2/transactions/transaction-sign-request.js +3 -0
  92. package/v2/transactions/transaction-sign-request.js.map +1 -0
  93. package/v2/transactions/transaction-sign-response.d.ts +4 -0
  94. package/v2/transactions/transaction-sign-response.js +3 -0
  95. package/v2/transactions/transaction-sign-response.js.map +1 -0
  96. package/v2/utils/generateId.d.ts +1 -0
  97. package/v2/utils/generateId.js +15 -0
  98. package/v2/utils/generateId.js.map +1 -0
  99. package/v2/utils/json-to-rlp.d.ts +8 -0
  100. package/v2/utils/json-to-rlp.js +177 -0
  101. package/v2/utils/json-to-rlp.js.map +1 -0
  102. package/v2/utils/toBuffer.d.ts +4 -0
  103. package/v2/utils/toBuffer.js +27 -0
  104. package/v2/utils/toBuffer.js.map +1 -0
  105. package/v2/validators/transactions.validator.d.ts +8 -0
  106. package/v2/validators/transactions.validator.js +3 -0
  107. package/v2/validators/transactions.validator.js.map +1 -0
  108. package/v2/validators/validators.d.ts +1 -0
  109. package/v2/validators/validators.js +172 -0
  110. package/v2/validators/validators.js.map +1 -0
  111. package/v3/iac-message-wrapper.d.ts +15 -0
  112. package/v3/iac-message-wrapper.js +72 -0
  113. package/v3/iac-message-wrapper.js.map +1 -0
  114. package/v3/interfaces.d.ts +8 -0
  115. package/v3/interfaces.js +31 -0
  116. package/v3/interfaces.js.map +1 -0
  117. package/v3/message.d.ts +42 -0
  118. package/v3/message.js +117 -0
  119. package/v3/message.js.map +1 -0
  120. package/v3/payload.d.ts +10 -0
  121. package/v3/payload.js +28 -0
  122. package/v3/payload.js.map +1 -0
  123. package/v3/schemas/definitions/account-share-request.d.ts +4 -0
  124. package/v3/schemas/definitions/account-share-request.js +3 -0
  125. package/v3/schemas/definitions/account-share-request.js.map +1 -0
  126. package/v3/schemas/definitions/account-share-response.d.ts +9 -0
  127. package/v3/schemas/definitions/account-share-response.js +3 -0
  128. package/v3/schemas/definitions/account-share-response.js.map +1 -0
  129. package/v3/schemas/definitions/config-set-request.d.ts +7 -0
  130. package/v3/schemas/definitions/config-set-request.js +3 -0
  131. package/v3/schemas/definitions/config-set-request.js.map +1 -0
  132. package/v3/schemas/definitions/config-set-response.d.ts +4 -0
  133. package/v3/schemas/definitions/config-set-response.js +3 -0
  134. package/v3/schemas/definitions/config-set-response.js.map +1 -0
  135. package/v3/schemas/definitions/hex-string.d.ts +1 -0
  136. package/v3/schemas/definitions/hex-string.js +3 -0
  137. package/v3/schemas/definitions/hex-string.js.map +1 -0
  138. package/v3/schemas/definitions/item-retrieve-request.d.ts +5 -0
  139. package/v3/schemas/definitions/item-retrieve-request.js +3 -0
  140. package/v3/schemas/definitions/item-retrieve-request.js.map +1 -0
  141. package/v3/schemas/definitions/item-retrieve-response.d.ts +3 -0
  142. package/v3/schemas/definitions/item-retrieve-response.js +3 -0
  143. package/v3/schemas/definitions/item-retrieve-response.js.map +1 -0
  144. package/v3/schemas/definitions/item-store-request.d.ts +5 -0
  145. package/v3/schemas/definitions/item-store-request.js +3 -0
  146. package/v3/schemas/definitions/item-store-request.js.map +1 -0
  147. package/v3/schemas/definitions/item-store-response.d.ts +3 -0
  148. package/v3/schemas/definitions/item-store-response.js +3 -0
  149. package/v3/schemas/definitions/item-store-response.js.map +1 -0
  150. package/v3/schemas/definitions/message-encrypt-request.d.ts +8 -0
  151. package/v3/schemas/definitions/message-encrypt-request.js +3 -0
  152. package/v3/schemas/definitions/message-encrypt-request.js.map +1 -0
  153. package/v3/schemas/definitions/message-encrypt-response.d.ts +4 -0
  154. package/v3/schemas/definitions/message-encrypt-response.js +3 -0
  155. package/v3/schemas/definitions/message-encrypt-response.js.map +1 -0
  156. package/v3/schemas/definitions/message-sign-request.d.ts +5 -0
  157. package/v3/schemas/definitions/message-sign-request.js +3 -0
  158. package/v3/schemas/definitions/message-sign-request.js.map +1 -0
  159. package/v3/schemas/definitions/message-sign-response.d.ts +5 -0
  160. package/v3/schemas/definitions/message-sign-response.js +3 -0
  161. package/v3/schemas/definitions/message-sign-response.js.map +1 -0
  162. package/v3/schemas/definitions/message-verify-request.d.ts +6 -0
  163. package/v3/schemas/definitions/message-verify-request.js +3 -0
  164. package/v3/schemas/definitions/message-verify-request.js.map +1 -0
  165. package/v3/schemas/definitions/message-verify-response.d.ts +6 -0
  166. package/v3/schemas/definitions/message-verify-response.js +3 -0
  167. package/v3/schemas/definitions/message-verify-response.js.map +1 -0
  168. package/v3/schemas/definitions/multisig-request.d.ts +7 -0
  169. package/v3/schemas/definitions/multisig-request.js +3 -0
  170. package/v3/schemas/definitions/multisig-request.js.map +1 -0
  171. package/v3/schemas/definitions/multisig-response.d.ts +5 -0
  172. package/v3/schemas/definitions/multisig-response.js +3 -0
  173. package/v3/schemas/definitions/multisig-response.js.map +1 -0
  174. package/v3/schemas/definitions/pair-request.d.ts +7 -0
  175. package/v3/schemas/definitions/pair-request.js +3 -0
  176. package/v3/schemas/definitions/pair-request.js.map +1 -0
  177. package/v3/schemas/definitions/pair-response.d.ts +6 -0
  178. package/v3/schemas/definitions/pair-response.js +3 -0
  179. package/v3/schemas/definitions/pair-response.js.map +1 -0
  180. package/v3/schemas/generated/account-share-request.json +22 -0
  181. package/v3/schemas/generated/account-share-response.json +34 -0
  182. package/v3/schemas/generated/message-sign-request.json +22 -0
  183. package/v3/schemas/generated/message-sign-response.json +22 -0
  184. package/v3/schemas/generated/transaction-sign-request-astar.json +0 -0
  185. package/v3/schemas/generated/transaction-sign-request-substrate.json +29 -0
  186. package/v3/schemas/schema.d.ts +29 -0
  187. package/v3/schemas/schema.js +14 -0
  188. package/v3/schemas/schema.js.map +1 -0
  189. package/v3/serializer.d.ts +21 -0
  190. package/v3/serializer.js +163 -0
  191. package/v3/serializer.js.map +1 -0
  192. package/v3/transactions/transaction-sign-request.d.ts +5 -0
  193. package/v3/transactions/transaction-sign-request.js +3 -0
  194. package/v3/transactions/transaction-sign-request.js.map +1 -0
  195. package/v3/transactions/transaction-sign-response.d.ts +4 -0
  196. package/v3/transactions/transaction-sign-response.js +3 -0
  197. package/v3/transactions/transaction-sign-response.js.map +1 -0
  198. package/v3/utils/generateId.d.ts +2 -0
  199. package/v3/utils/generateId.js +17 -0
  200. package/v3/utils/generateId.js.map +1 -0
  201. package/v3/utils/json-to-rlp.d.ts +8 -0
  202. package/v3/utils/json-to-rlp.js +235 -0
  203. package/v3/utils/json-to-rlp.js.map +1 -0
  204. package/v3/utils/toBuffer.d.ts +2 -0
  205. package/v3/utils/toBuffer.js +22 -0
  206. package/v3/utils/toBuffer.js.map +1 -0
  207. package/v3/validators/transactions.validator.d.ts +9 -0
  208. package/v3/validators/transactions.validator.js +3 -0
  209. package/v3/validators/transactions.validator.js.map +1 -0
  210. package/v3/validators/validators.d.ts +1 -0
  211. package/v3/validators/validators.js +170 -0
  212. package/v3/validators/validators.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-set-request.js","sourceRoot":"","sources":["../../../../src/v2/schemas/definitions/config-set-request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface ConfigSetResponse {
2
+ key: string;
3
+ success: boolean;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=config-set-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-set-response.js","sourceRoot":"","sources":["../../../../src/v2/schemas/definitions/config-set-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export declare type HexString = string;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=hex-string.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hex-string.js","sourceRoot":"","sources":["../../../../src/v2/schemas/definitions/hex-string.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface ItemStoreRequest {
2
+ storageId: string;
3
+ encryptionPublicKey: string;
4
+ callbackURL?: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=item-retrieve-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-retrieve-request.js","sourceRoot":"","sources":["../../../../src/v2/schemas/definitions/item-retrieve-request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export interface ItemStoreResponse {
2
+ payload: string;
3
+ }
@@ -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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/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,22 @@
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
+ "isExtendedPublicKey": {
12
+ "type": "boolean"
13
+ },
14
+ "publicKey": {
15
+ "type": "string"
16
+ }
17
+ },
18
+ "required": ["publicKey", "derivationPath", "isExtendedPublicKey"],
19
+ "type": "object"
20
+ }
21
+ }
22
+ }
@@ -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,30 @@
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
+ HEX_STRING = "hexString"
11
+ }
12
+ export interface SchemaRoot {
13
+ $ref: string;
14
+ $schema: string;
15
+ definitions: SchemaDefinition;
16
+ }
17
+ export interface SchemaItem {
18
+ $ref?: string;
19
+ type?: SchemaTypes;
20
+ additionalProperties?: boolean;
21
+ properties?: SchemaItem;
22
+ required?: string[];
23
+ }
24
+ export interface SchemaDefinition {
25
+ [key: string]: SchemaItem;
26
+ }
27
+ export interface SchemaInfo {
28
+ schema: SchemaRoot;
29
+ transformer?: SchemaTransformer;
30
+ }
@@ -0,0 +1,15 @@
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["HEX_STRING"] = "hexString"; // TODO: Should we do it like that?
14
+ })(SchemaTypes = exports.SchemaTypes || (exports.SchemaTypes = {}));
15
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/v2/schemas/schema.ts"],"names":[],"mappings":";;;AAEA,IAAY,WASX;AATD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,gCAAiB,CAAA;IACjB,uCAAwB,CAAA,CAAC,mCAAmC;AAC9D,CAAC,EATW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAStB"}
@@ -0,0 +1,25 @@
1
+ import { ProtocolSymbols } from '@airgap/coinlib-core/utils/ProtocolSymbols';
2
+ import { IACMessageDefinitionObject } from './message';
3
+ import { SchemaInfo } from './schemas/schema';
4
+ import { TransactionValidator, TransactionValidatorFactory } from './validators/transactions.validator';
5
+ export declare enum IACPayloadType {
6
+ FULL = 0,
7
+ CHUNKED = 1
8
+ }
9
+ export declare class Serializer {
10
+ private readonly schemas;
11
+ private readonly validators;
12
+ private static instance;
13
+ static getInstance(): Serializer;
14
+ private constructor();
15
+ static addSchema(schemaId: number, schema: SchemaInfo, protocol?: ProtocolSymbols): void;
16
+ addSchema(schemaId: number, schema: SchemaInfo, protocol?: ProtocolSymbols): void;
17
+ static getSchema(schemaId: number, protocol?: ProtocolSymbols): SchemaInfo;
18
+ getSchema(schemaId: number, protocol?: ProtocolSymbols): SchemaInfo;
19
+ private static getSchemaName;
20
+ static addValidator(protocol: ProtocolSymbols, validator: TransactionValidatorFactory): void;
21
+ addValidator(protocol: ProtocolSymbols, validator: TransactionValidatorFactory): void;
22
+ serialize(messages: IACMessageDefinitionObject[], singleChunkSize?: number, multiChunkSize?: number): Promise<string[]>;
23
+ deserialize(data: string[]): Promise<IACMessageDefinitionObject[]>;
24
+ serializationValidatorByProtocolIdentifier(protocolIdentifier: ProtocolSymbols): TransactionValidator;
25
+ }
@@ -0,0 +1,165 @@
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.Serializer = exports.IACPayloadType = void 0;
40
+ var errors_1 = require("@airgap/coinlib-core/errors");
41
+ var ProtocolSymbols_1 = require("@airgap/coinlib-core/utils/ProtocolSymbols");
42
+ var inter_app_communication_protocol_1 = require("./inter-app-communication-protocol");
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 IACPayloadType;
48
+ (function (IACPayloadType) {
49
+ IACPayloadType[IACPayloadType["FULL"] = 0] = "FULL";
50
+ IACPayloadType[IACPayloadType["CHUNKED"] = 1] = "CHUNKED";
51
+ })(IACPayloadType = exports.IACPayloadType || (exports.IACPayloadType = {}));
52
+ var Serializer = /** @class */ (function () {
53
+ function Serializer() {
54
+ this.schemas = new Map();
55
+ this.validators = new Map();
56
+ this.addSchema(interfaces_1.IACMessageType.AccountShareResponse, { schema: accountShareResponse });
57
+ this.addSchema(interfaces_1.IACMessageType.MessageSignRequest, { schema: messageSignRequest });
58
+ this.addSchema(interfaces_1.IACMessageType.MessageSignResponse, { schema: messageSignResponse });
59
+ }
60
+ Serializer.getInstance = function () {
61
+ if (Serializer.instance === undefined) {
62
+ Serializer.instance = new Serializer();
63
+ }
64
+ return Serializer.instance;
65
+ };
66
+ Serializer.addSchema = function (schemaId, schema, protocol) {
67
+ Serializer.getInstance().addSchema(schemaId, schema, protocol);
68
+ };
69
+ Serializer.prototype.addSchema = function (schemaId, schema, protocol) {
70
+ var protocolSpecificSchemaName = Serializer.getSchemaName(schemaId, protocol);
71
+ if (this.schemas.has(protocolSpecificSchemaName)) {
72
+ throw new errors_1.SerializerError(errors_1.SerializerErrorType.SCHEMA_ALREADY_EXISTS, "Schema ".concat(protocolSpecificSchemaName, " already exists"));
73
+ }
74
+ this.schemas.set(protocolSpecificSchemaName, schema);
75
+ };
76
+ Serializer.getSchema = function (schemaId, protocol) {
77
+ return Serializer.getInstance().getSchema(schemaId, protocol);
78
+ };
79
+ Serializer.prototype.getSchema = function (schemaId, protocol) {
80
+ var protocolSpecificSchemaName = Serializer.getSchemaName(schemaId, protocol);
81
+ var schema;
82
+ if (this.schemas.has(protocolSpecificSchemaName)) {
83
+ schema = this.schemas.get(protocolSpecificSchemaName);
84
+ }
85
+ else if (protocol !== undefined) {
86
+ var split = protocol.split('-');
87
+ // if protocol is a sub protocol and there is no schema defined for it, use the main protocol schema as the fallback
88
+ if (split.length >= 2) {
89
+ return this.getSchema(schemaId, split[0]);
90
+ }
91
+ }
92
+ // Try to get the protocol specific scheme, if it doesn't exist fall back to the generic one
93
+ schema = schema !== null && schema !== void 0 ? schema : this.schemas.get(Serializer.getSchemaName(schemaId));
94
+ if (!schema) {
95
+ throw new errors_1.SerializerError(errors_1.SerializerErrorType.SCHEMA_DOES_NOT_EXISTS, "Schema ".concat(protocolSpecificSchemaName, " does not exist"));
96
+ }
97
+ return schema;
98
+ };
99
+ Serializer.getSchemaName = function (schemaId, protocol) {
100
+ var schemaName = "".concat(schemaId, "-").concat(protocol);
101
+ if ((protocol !== undefined && schemaId === interfaces_1.IACMessageType.TransactionSignRequest) ||
102
+ schemaId === interfaces_1.IACMessageType.TransactionSignResponse) {
103
+ var split = schemaName.split('-');
104
+ if (split.length >= 3 && "".concat(split[1], "-").concat(split[2]) === ProtocolSymbols_1.SubProtocolSymbols.ETH_ERC20) {
105
+ return "".concat(schemaId, "-").concat(ProtocolSymbols_1.SubProtocolSymbols.ETH_ERC20);
106
+ }
107
+ }
108
+ return protocol ? "".concat(schemaId, "-").concat(protocol) : schemaId.toString();
109
+ };
110
+ Serializer.addValidator = function (protocol, validator) {
111
+ Serializer.getInstance().addValidator(protocol, validator);
112
+ };
113
+ Serializer.prototype.addValidator = function (protocol, validator) {
114
+ this.validators.set(protocol, validator);
115
+ };
116
+ Serializer.prototype.serialize = function (messages, singleChunkSize, multiChunkSize) {
117
+ if (singleChunkSize === void 0) { singleChunkSize = 0; }
118
+ if (multiChunkSize === void 0) { multiChunkSize = 0; }
119
+ return __awaiter(this, void 0, void 0, function () {
120
+ var iacps;
121
+ var _this = this;
122
+ return __generator(this, function (_a) {
123
+ if (messages.every(function (message) {
124
+ return _this.getSchema(message.type, message.protocol);
125
+ })) {
126
+ iacps = inter_app_communication_protocol_1.IACProtocol.fromDecoded(JSON.parse(JSON.stringify(messages)), singleChunkSize, multiChunkSize, this);
127
+ return [2 /*return*/, iacps.map(function (iac) { return iac.encoded(_this); })];
128
+ }
129
+ else {
130
+ throw new errors_1.SerializerError(errors_1.SerializerErrorType.SCHEMA_DOES_NOT_EXISTS, "Unknown schema");
131
+ }
132
+ return [2 /*return*/];
133
+ });
134
+ });
135
+ };
136
+ Serializer.prototype.deserialize = function (data) {
137
+ return __awaiter(this, void 0, void 0, function () {
138
+ var result, deserializedIACMessageDefinitionObjects;
139
+ return __generator(this, function (_a) {
140
+ result = inter_app_communication_protocol_1.IACProtocol.fromEncoded(data, this);
141
+ deserializedIACMessageDefinitionObjects = result
142
+ .map(function (el) { return el.payload; })
143
+ .map(function (el) { return el.asJson(); })
144
+ .reduce(function (pv, cv) { return pv.concat.apply(pv, cv); }, []);
145
+ return [2 /*return*/, deserializedIACMessageDefinitionObjects];
146
+ });
147
+ });
148
+ };
149
+ Serializer.prototype.serializationValidatorByProtocolIdentifier = function (protocolIdentifier) {
150
+ var _a;
151
+ var validatorsKeys = Array.from(this.validators.keys());
152
+ var exactMatch = validatorsKeys.find(function (protocol) { return protocolIdentifier === protocol; });
153
+ var startsWith = validatorsKeys.find(function (protocol) { return protocolIdentifier.startsWith(protocol); });
154
+ // TODO: Only use validator if it's a transaction
155
+ var validatorFactory = this.validators.get((_a = exactMatch !== null && exactMatch !== void 0 ? exactMatch : startsWith) !== null && _a !== void 0 ? _a : ProtocolSymbols_1.MainProtocolSymbols.ETH);
156
+ if (!validatorFactory) {
157
+ throw Error("Validator not registered for ".concat(protocolIdentifier, ", ").concat(exactMatch, ", ").concat(startsWith, ", ").concat(validatorFactory));
158
+ }
159
+ return validatorFactory.create();
160
+ };
161
+ Serializer.instance = undefined;
162
+ return Serializer;
163
+ }());
164
+ exports.Serializer = Serializer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B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;QAE5E,IAAM,UAAU,GAAgC,cAAc,CAAC,IAAI,CAAC,UAAC,QAAQ,IAAK,OAAA,kBAAkB,KAAK,QAAQ,EAA/B,CAA+B,CAAC,CAAA;QAClH,IAAM,UAAU,GAAgC,cAAc,CAAC,IAAI,CAAC,UAAC,QAAQ,IAAK,OAAA,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;IA1Hc,mBAAQ,GAA2B,SAAS,CAAA;IA2H7D,iBAAC;CAAA,AA/HD,IA+HC;AA/HY,gCAAU"}
@@ -0,0 +1,5 @@
1
+ export interface TransactionSignRequest {
2
+ transaction: any;
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/v2/transactions/transaction-sign-request.ts"],"names":[],"mappings":""}