@adapt-toolkit/sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/dist/common/index.d.ts +7 -0
  2. package/dist/common/index.d.ts.map +1 -0
  3. package/dist/common/index.js +7 -0
  4. package/dist/common/index.js.map +1 -0
  5. package/dist/common/interfaces/adapt_environment.d.ts +21 -0
  6. package/dist/common/interfaces/adapt_environment.d.ts.map +1 -0
  7. package/dist/common/interfaces/adapt_environment.js +2 -0
  8. package/dist/common/interfaces/adapt_environment.js.map +1 -0
  9. package/dist/common/interfaces/adapt_evaluation_unit.d.ts +12 -0
  10. package/dist/common/interfaces/adapt_evaluation_unit.d.ts.map +1 -0
  11. package/dist/common/interfaces/adapt_evaluation_unit.js +2 -0
  12. package/dist/common/interfaces/adapt_evaluation_unit.js.map +1 -0
  13. package/dist/common/interfaces/adapt_packet_context.d.ts +29 -0
  14. package/dist/common/interfaces/adapt_packet_context.d.ts.map +1 -0
  15. package/dist/common/interfaces/adapt_packet_context.js +2 -0
  16. package/dist/common/interfaces/adapt_packet_context.js.map +1 -0
  17. package/dist/common/interfaces/adapt_value.d.ts +23 -0
  18. package/dist/common/interfaces/adapt_value.d.ts.map +1 -0
  19. package/dist/common/interfaces/adapt_value.js +2 -0
  20. package/dist/common/interfaces/adapt_value.js.map +1 -0
  21. package/dist/common/interfaces/common.d.ts +18 -0
  22. package/dist/common/interfaces/common.d.ts.map +1 -0
  23. package/dist/common/interfaces/common.js +4 -0
  24. package/dist/common/interfaces/common.js.map +1 -0
  25. package/dist/common/memory_management/adapt_object_lifetime.d.ts +114 -0
  26. package/dist/common/memory_management/adapt_object_lifetime.d.ts.map +1 -0
  27. package/dist/common/memory_management/adapt_object_lifetime.js +159 -0
  28. package/dist/common/memory_management/adapt_object_lifetime.js.map +1 -0
  29. package/dist/index.d.ts +3 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +2 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/loaders/browser.d.ts +5 -0
  34. package/dist/loaders/browser.d.ts.map +1 -0
  35. package/dist/loaders/browser.js +6 -0
  36. package/dist/loaders/browser.js.map +1 -0
  37. package/dist/loaders/node.d.ts +13 -0
  38. package/dist/loaders/node.d.ts.map +1 -0
  39. package/dist/loaders/node.js +29 -0
  40. package/dist/loaders/node.js.map +1 -0
  41. package/dist/loaders/react-native.d.ts +11 -0
  42. package/dist/loaders/react-native.d.ts.map +1 -0
  43. package/dist/loaders/react-native.js +19 -0
  44. package/dist/loaders/react-native.js.map +1 -0
  45. package/dist/loaders/shared.d.ts +17 -0
  46. package/dist/loaders/shared.d.ts.map +1 -0
  47. package/dist/loaders/shared.js +2 -0
  48. package/dist/loaders/shared.js.map +1 -0
  49. package/dist/utilities/broker/broker.d.ts +21 -0
  50. package/dist/utilities/broker/broker.d.ts.map +1 -0
  51. package/dist/utilities/broker/broker.js +267 -0
  52. package/dist/utilities/broker/broker.js.map +1 -0
  53. package/dist/utilities/broker/broker_client.d.ts +40 -0
  54. package/dist/utilities/broker/broker_client.d.ts.map +1 -0
  55. package/dist/utilities/broker/broker_client.js +111 -0
  56. package/dist/utilities/broker/broker_client.js.map +1 -0
  57. package/dist/utilities/broker/broker_configurator.d.ts +6 -0
  58. package/dist/utilities/broker/broker_configurator.d.ts.map +1 -0
  59. package/dist/utilities/broker/broker_configurator.js +8 -0
  60. package/dist/utilities/broker/broker_configurator.js.map +1 -0
  61. package/dist/utilities/broker/index.d.ts +4 -0
  62. package/dist/utilities/broker/index.d.ts.map +1 -0
  63. package/dist/utilities/broker/index.js +4 -0
  64. package/dist/utilities/broker/index.js.map +1 -0
  65. package/dist/utilities/common/adapt_waitlist.d.ts +5 -0
  66. package/dist/utilities/common/adapt_waitlist.d.ts.map +1 -0
  67. package/dist/utilities/common/adapt_waitlist.js +4 -0
  68. package/dist/utilities/common/adapt_waitlist.js.map +1 -0
  69. package/dist/utilities/common/async_queue_adapter.d.ts +40 -0
  70. package/dist/utilities/common/async_queue_adapter.d.ts.map +1 -0
  71. package/dist/utilities/common/async_queue_adapter.js +88 -0
  72. package/dist/utilities/common/async_queue_adapter.js.map +1 -0
  73. package/dist/utilities/common/command_line_configurator.d.ts +88 -0
  74. package/dist/utilities/common/command_line_configurator.d.ts.map +1 -0
  75. package/dist/utilities/common/command_line_configurator.js +217 -0
  76. package/dist/utilities/common/command_line_configurator.js.map +1 -0
  77. package/dist/utilities/common/decorators.d.ts +17 -0
  78. package/dist/utilities/common/decorators.d.ts.map +1 -0
  79. package/dist/utilities/common/decorators.js +84 -0
  80. package/dist/utilities/common/decorators.js.map +1 -0
  81. package/dist/utilities/common/errors/adapt_initialization_error.d.ts +4 -0
  82. package/dist/utilities/common/errors/adapt_initialization_error.d.ts.map +1 -0
  83. package/dist/utilities/common/errors/adapt_initialization_error.js +6 -0
  84. package/dist/utilities/common/errors/adapt_initialization_error.js.map +1 -0
  85. package/dist/utilities/common/errors/adapt_network_error.d.ts +8 -0
  86. package/dist/utilities/common/errors/adapt_network_error.d.ts.map +1 -0
  87. package/dist/utilities/common/errors/adapt_network_error.js +12 -0
  88. package/dist/utilities/common/errors/adapt_network_error.js.map +1 -0
  89. package/dist/utilities/common/errors/adapt_protocol_error.d.ts +12 -0
  90. package/dist/utilities/common/errors/adapt_protocol_error.d.ts.map +1 -0
  91. package/dist/utilities/common/errors/adapt_protocol_error.js +16 -0
  92. package/dist/utilities/common/errors/adapt_protocol_error.js.map +1 -0
  93. package/dist/utilities/common/errors/adapt_test_mode_error.d.ts +11 -0
  94. package/dist/utilities/common/errors/adapt_test_mode_error.d.ts.map +1 -0
  95. package/dist/utilities/common/errors/adapt_test_mode_error.js +22 -0
  96. package/dist/utilities/common/errors/adapt_test_mode_error.js.map +1 -0
  97. package/dist/utilities/common/http_server.d.ts +18 -0
  98. package/dist/utilities/common/http_server.d.ts.map +1 -0
  99. package/dist/utilities/common/http_server.js +41 -0
  100. package/dist/utilities/common/http_server.js.map +1 -0
  101. package/dist/utilities/common/index.d.ts +25 -0
  102. package/dist/utilities/common/index.d.ts.map +1 -0
  103. package/dist/utilities/common/index.js +36 -0
  104. package/dist/utilities/common/index.js.map +1 -0
  105. package/dist/utilities/common/logger/logger.d.ts +83 -0
  106. package/dist/utilities/common/logger/logger.d.ts.map +1 -0
  107. package/dist/utilities/common/logger/logger.js +272 -0
  108. package/dist/utilities/common/logger/logger.js.map +1 -0
  109. package/dist/utilities/common/logger/logging_level.d.ts +13 -0
  110. package/dist/utilities/common/logger/logging_level.d.ts.map +1 -0
  111. package/dist/utilities/common/logger/logging_level.js +36 -0
  112. package/dist/utilities/common/logger/logging_level.js.map +1 -0
  113. package/dist/utilities/common/logger/message.d.ts +65 -0
  114. package/dist/utilities/common/logger/message.d.ts.map +1 -0
  115. package/dist/utilities/common/logger/message.js +169 -0
  116. package/dist/utilities/common/logger/message.js.map +1 -0
  117. package/dist/utilities/common/logger/network_component.d.ts +3 -0
  118. package/dist/utilities/common/logger/network_component.d.ts.map +1 -0
  119. package/dist/utilities/common/logger/network_component.js +4 -0
  120. package/dist/utilities/common/logger/network_component.js.map +1 -0
  121. package/dist/utilities/common/totp_qr_code_generator.d.ts +12 -0
  122. package/dist/utilities/common/totp_qr_code_generator.d.ts.map +1 -0
  123. package/dist/utilities/common/totp_qr_code_generator.js +19 -0
  124. package/dist/utilities/common/totp_qr_code_generator.js.map +1 -0
  125. package/dist/utilities/common/waitlist/waitlist.d.ts +36 -0
  126. package/dist/utilities/common/waitlist/waitlist.d.ts.map +1 -0
  127. package/dist/utilities/common/waitlist/waitlist.js +116 -0
  128. package/dist/utilities/common/waitlist/waitlist.js.map +1 -0
  129. package/dist/utilities/common/web_socket_client.d.ts +50 -0
  130. package/dist/utilities/common/web_socket_client.d.ts.map +1 -0
  131. package/dist/utilities/common/web_socket_client.js +80 -0
  132. package/dist/utilities/common/web_socket_client.js.map +1 -0
  133. package/dist/utilities/common/web_socket_connection.d.ts +29 -0
  134. package/dist/utilities/common/web_socket_connection.d.ts.map +1 -0
  135. package/dist/utilities/common/web_socket_connection.js +94 -0
  136. package/dist/utilities/common/web_socket_connection.js.map +1 -0
  137. package/dist/utilities/evaluator/common.d.ts +10 -0
  138. package/dist/utilities/evaluator/common.d.ts.map +1 -0
  139. package/dist/utilities/evaluator/common.js +128 -0
  140. package/dist/utilities/evaluator/common.js.map +1 -0
  141. package/dist/utilities/evaluator/evaluator.d.ts +35 -0
  142. package/dist/utilities/evaluator/evaluator.d.ts.map +1 -0
  143. package/dist/utilities/evaluator/evaluator.js +141 -0
  144. package/dist/utilities/evaluator/evaluator.js.map +1 -0
  145. package/dist/utilities/evaluator/index.d.ts +3 -0
  146. package/dist/utilities/evaluator/index.d.ts.map +1 -0
  147. package/dist/utilities/evaluator/index.js +3 -0
  148. package/dist/utilities/evaluator/index.js.map +1 -0
  149. package/dist/utilities/executables/adapt_wrapper.d.ts +3 -0
  150. package/dist/utilities/executables/adapt_wrapper.d.ts.map +1 -0
  151. package/dist/utilities/executables/adapt_wrapper.js +25 -0
  152. package/dist/utilities/executables/adapt_wrapper.js.map +1 -0
  153. package/dist/utilities/executables/adapt_wrapper_mobile.d.ts +3 -0
  154. package/dist/utilities/executables/adapt_wrapper_mobile.d.ts.map +1 -0
  155. package/dist/utilities/executables/adapt_wrapper_mobile.js +20 -0
  156. package/dist/utilities/executables/adapt_wrapper_mobile.js.map +1 -0
  157. package/dist/utilities/executables/adapt_wrapper_script.d.ts +2 -0
  158. package/dist/utilities/executables/adapt_wrapper_script.d.ts.map +1 -0
  159. package/dist/utilities/executables/adapt_wrapper_script.js +6 -0
  160. package/dist/utilities/executables/adapt_wrapper_script.js.map +1 -0
  161. package/dist/utilities/executables/broker.d.ts +2 -0
  162. package/dist/utilities/executables/broker.d.ts.map +1 -0
  163. package/dist/utilities/executables/broker.js +23 -0
  164. package/dist/utilities/executables/broker.js.map +1 -0
  165. package/dist/utilities/executables/index.d.ts +2 -0
  166. package/dist/utilities/executables/index.d.ts.map +1 -0
  167. package/dist/utilities/executables/index.js +2 -0
  168. package/dist/utilities/executables/index.js.map +1 -0
  169. package/dist/utilities/executables/local_data_storage.d.ts +2 -0
  170. package/dist/utilities/executables/local_data_storage.d.ts.map +1 -0
  171. package/dist/utilities/executables/local_data_storage.js +20 -0
  172. package/dist/utilities/executables/local_data_storage.js.map +1 -0
  173. package/dist/utilities/executables/local_data_storage_cmd_helper.d.ts +2 -0
  174. package/dist/utilities/executables/local_data_storage_cmd_helper.d.ts.map +1 -0
  175. package/dist/utilities/executables/local_data_storage_cmd_helper.js +52 -0
  176. package/dist/utilities/executables/local_data_storage_cmd_helper.js.map +1 -0
  177. package/dist/utilities/storage/data_storage.d.ts +97 -0
  178. package/dist/utilities/storage/data_storage.d.ts.map +1 -0
  179. package/dist/utilities/storage/data_storage.js +440 -0
  180. package/dist/utilities/storage/data_storage.js.map +1 -0
  181. package/dist/utilities/storage/index.d.ts +6 -0
  182. package/dist/utilities/storage/index.d.ts.map +1 -0
  183. package/dist/utilities/storage/index.js +6 -0
  184. package/dist/utilities/storage/index.js.map +1 -0
  185. package/dist/utilities/storage/local_data_storage.d.ts +7 -0
  186. package/dist/utilities/storage/local_data_storage.d.ts.map +1 -0
  187. package/dist/utilities/storage/local_data_storage.js +18 -0
  188. package/dist/utilities/storage/local_data_storage.js.map +1 -0
  189. package/dist/utilities/storage/local_data_storage_base.d.ts +74 -0
  190. package/dist/utilities/storage/local_data_storage_base.d.ts.map +1 -0
  191. package/dist/utilities/storage/local_data_storage_base.js +163 -0
  192. package/dist/utilities/storage/local_data_storage_base.js.map +1 -0
  193. package/dist/utilities/storage/local_data_storage_configurator.d.ts +7 -0
  194. package/dist/utilities/storage/local_data_storage_configurator.d.ts.map +1 -0
  195. package/dist/utilities/storage/local_data_storage_configurator.js +13 -0
  196. package/dist/utilities/storage/local_data_storage_configurator.js.map +1 -0
  197. package/dist/utilities/storage/storage_client.d.ts +28 -0
  198. package/dist/utilities/storage/storage_client.d.ts.map +1 -0
  199. package/dist/utilities/storage/storage_client.js +79 -0
  200. package/dist/utilities/storage/storage_client.js.map +1 -0
  201. package/dist/utilities/wrappers/configurators/adapt_wrapper_configurator.d.ts +14 -0
  202. package/dist/utilities/wrappers/configurators/adapt_wrapper_configurator.d.ts.map +1 -0
  203. package/dist/utilities/wrappers/configurators/adapt_wrapper_configurator.js +57 -0
  204. package/dist/utilities/wrappers/configurators/adapt_wrapper_configurator.js.map +1 -0
  205. package/dist/utilities/wrappers/configurators/control_packet_configurator.d.ts +12 -0
  206. package/dist/utilities/wrappers/configurators/control_packet_configurator.d.ts.map +1 -0
  207. package/dist/utilities/wrappers/configurators/control_packet_configurator.js +52 -0
  208. package/dist/utilities/wrappers/configurators/control_packet_configurator.js.map +1 -0
  209. package/dist/utilities/wrappers/configurators/packet_wrapper_configurator.d.ts +32 -0
  210. package/dist/utilities/wrappers/configurators/packet_wrapper_configurator.d.ts.map +1 -0
  211. package/dist/utilities/wrappers/configurators/packet_wrapper_configurator.js +123 -0
  212. package/dist/utilities/wrappers/configurators/packet_wrapper_configurator.js.map +1 -0
  213. package/dist/utilities/wrappers/enclave/control_packet.d.ts +18 -0
  214. package/dist/utilities/wrappers/enclave/control_packet.d.ts.map +1 -0
  215. package/dist/utilities/wrappers/enclave/control_packet.js +213 -0
  216. package/dist/utilities/wrappers/enclave/control_packet.js.map +1 -0
  217. package/dist/utilities/wrappers/index.d.ts +5 -0
  218. package/dist/utilities/wrappers/index.d.ts.map +1 -0
  219. package/dist/utilities/wrappers/index.js +5 -0
  220. package/dist/utilities/wrappers/index.js.map +1 -0
  221. package/dist/utilities/wrappers/wrappers/adapt_packet_wrapper.d.ts +19 -0
  222. package/dist/utilities/wrappers/wrappers/adapt_packet_wrapper.d.ts.map +1 -0
  223. package/dist/utilities/wrappers/wrappers/adapt_packet_wrapper.js +55 -0
  224. package/dist/utilities/wrappers/wrappers/adapt_packet_wrapper.js.map +1 -0
  225. package/dist/utilities/wrappers/wrappers/adapt_wrapper.d.ts +131 -0
  226. package/dist/utilities/wrappers/wrappers/adapt_wrapper.d.ts.map +1 -0
  227. package/dist/utilities/wrappers/wrappers/adapt_wrapper.js +716 -0
  228. package/dist/utilities/wrappers/wrappers/adapt_wrapper.js.map +1 -0
  229. package/dist/utilities/wrappers/wrappers/impl/adapt_packet_wrapper_impl.d.ts +75 -0
  230. package/dist/utilities/wrappers/wrappers/impl/adapt_packet_wrapper_impl.d.ts.map +1 -0
  231. package/dist/utilities/wrappers/wrappers/impl/adapt_packet_wrapper_impl.js +550 -0
  232. package/dist/utilities/wrappers/wrappers/impl/adapt_packet_wrapper_impl.js.map +1 -0
  233. package/dist/wasm/adapt.d.ts +79 -0
  234. package/dist/wasm/adapt.d.ts.map +1 -0
  235. package/dist/wasm/adapt.js +430 -0
  236. package/dist/wasm/adapt.js.map +1 -0
  237. package/dist/wasm/backend-node.d.ts +1 -0
  238. package/dist/wasm/backend-node.d.ts.map +1 -0
  239. package/dist/wasm/backend-node.js +1 -0
  240. package/dist/wasm/backend-node.js.map +1 -0
  241. package/dist/wasm/index.d.ts +12 -0
  242. package/dist/wasm/index.d.ts.map +1 -0
  243. package/dist/wasm/index.js +15 -0
  244. package/dist/wasm/index.js.map +1 -0
  245. package/dist/wasm/mufl-bindings.d.ts +3 -0
  246. package/dist/wasm/mufl-bindings.d.ts.map +1 -0
  247. package/dist/wasm/mufl-bindings.js +3833 -0
  248. package/dist/wasm/mufl-bindings.js.map +1 -0
  249. package/dist/wasm/mufl-bindings.wasm +0 -0
  250. package/dist/wasm/wasm_types.d.ts +96 -0
  251. package/dist/wasm/wasm_types.d.ts.map +1 -0
  252. package/dist/wasm/wasm_types.js +2 -0
  253. package/dist/wasm/wasm_types.js.map +1 -0
  254. package/dist/wrapper/conversion.d.ts +9 -0
  255. package/dist/wrapper/conversion.d.ts.map +1 -0
  256. package/dist/wrapper/conversion.js +30 -0
  257. package/dist/wrapper/conversion.js.map +1 -0
  258. package/dist/wrapper/index.d.ts +11 -0
  259. package/dist/wrapper/index.d.ts.map +1 -0
  260. package/dist/wrapper/index.js +25 -0
  261. package/dist/wrapper/index.js.map +1 -0
  262. package/dist/wrapper/memory_management/adapt_builder.d.ts +36 -0
  263. package/dist/wrapper/memory_management/adapt_builder.d.ts.map +1 -0
  264. package/dist/wrapper/memory_management/adapt_builder.js +98 -0
  265. package/dist/wrapper/memory_management/adapt_builder.js.map +1 -0
  266. package/dist/wrapper/memory_management/exit_handler_registrar.d.ts +10 -0
  267. package/dist/wrapper/memory_management/exit_handler_registrar.d.ts.map +1 -0
  268. package/dist/wrapper/memory_management/exit_handler_registrar.js +38 -0
  269. package/dist/wrapper/memory_management/exit_handler_registrar.js.map +1 -0
  270. package/dist/wrapper/protocol/message_handler_interfaces.d.ts +32 -0
  271. package/dist/wrapper/protocol/message_handler_interfaces.d.ts.map +1 -0
  272. package/dist/wrapper/protocol/message_handler_interfaces.js +2 -0
  273. package/dist/wrapper/protocol/message_handler_interfaces.js.map +1 -0
  274. package/dist/wrapper/protocol/protocol.d.ts +171 -0
  275. package/dist/wrapper/protocol/protocol.d.ts.map +1 -0
  276. package/dist/wrapper/protocol/protocol.js +387 -0
  277. package/dist/wrapper/protocol/protocol.js.map +1 -0
  278. package/package.json +127 -0
@@ -0,0 +1,550 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { AdaptObjectBuilder, object_to_adapt_value, Protocol } from '../../../../wrapper/index.js';
8
+ import { AdaptProtocolError, AdaptProtocolErrorType, AdaptWaitlist, AsyncQueueAdapter, Callback, LazyMessage, LoggerProxy, logging, log_fn_call, MessageDependency } from '../../../common/index.js';
9
+ import { AdaptEnvironment } from '@adapt-toolkit/sdk/backend';
10
+ import { ControlPacketConfigurator } from "../../configurators/control_packet_configurator.js";
11
+ import { ControlPacket } from "../../enclave/control_packet.js";
12
+ const adapt_packet_wrapper_impl_logger_proxy = new LoggerProxy("adapt packet wrapper impl");
13
+ export class AdaptPacketWrapperImpl {
14
+ adapt_wrapper;
15
+ builder = new AdaptObjectBuilder();
16
+ queue = new AsyncQueueAdapter(this.worker.bind(this));
17
+ worker_functions;
18
+ registration_accepted = false;
19
+ pending_messages = [];
20
+ waitlist;
21
+ pending_transactions;
22
+ first_messages;
23
+ prepared_to_execute_first_messages = false;
24
+ // web code sets this callback. Packet Wrapper calls this callback on every verify request from the packet
25
+ #on_verify_request;
26
+ // same here, setter is only availabe in browser
27
+ #on_return_data;
28
+ #on_transaction_failure;
29
+ container_id;
30
+ packet;
31
+ identity_proof_document;
32
+ control_packet;
33
+ create_create_packet_message() {
34
+ return AdaptObjectBuilder.execute_and_collect_garbage(builder => {
35
+ const args = builder.Attach(this.packet.CreateDictionary()
36
+ .Mutate(Protocol.FieldName.packet_info, builder.Attach(this.packet.CreateDictionary().Mutate(Protocol.FieldName.packet_id, this.packet.GetContainerID()).Mutate(Protocol.FieldName.state, this.packet.GetHash()))));
37
+ const create_packet = Protocol.CreateProtocolMessage(Protocol.MessageName.w2d_create_packet, { from: this.packet.GetContainerID(), body: args }).Detach();
38
+ return create_packet;
39
+ }, e => {
40
+ const message = e instanceof Error ? e.message : e;
41
+ throw new AdaptProtocolError(AdaptProtocolErrorType.INTERNAL_ERROR, "Internal error: while trying to create 'create_packet' message: " + message);
42
+ });
43
+ }
44
+ create_write_snapshot_message() {
45
+ return AdaptObjectBuilder.execute_and_collect_garbage(builder => {
46
+ // send snapshot data to the data storage
47
+ const packet_arg = builder.Attach(this.packet.CreateDictionary().Mutate(Protocol.FieldName.packet_data, this.packet.NewBinaryFromHex(Buffer.from(this.packet.Serialize()).toString('hex'))).Mutate(Protocol.FieldName.packet_info, builder.Attach(this.packet.CreateDictionary().Mutate(Protocol.FieldName.packet_id, this.packet.GetContainerID()).Mutate(Protocol.FieldName.state, this.packet.GetHash()))));
48
+ let write_snapshot_args = builder.Attach(this.packet.CreateDictionary().Mutate(Protocol.FieldName.packet, packet_arg));
49
+ const write_snapshot = Protocol.CreateProtocolMessage(Protocol.MessageName.w2d_write_snapshot, { from: builder.AdaptValue.New(this.packet.GetContainerID()), body: write_snapshot_args }).Detach();
50
+ return write_snapshot;
51
+ }, e => {
52
+ const message = e instanceof Error ? e.message : e;
53
+ throw new AdaptProtocolError(AdaptProtocolErrorType.INTERNAL_ERROR, "Internal error: while trying to create 'write snapshot' message:" + message);
54
+ });
55
+ }
56
+ load_attestation_document(is_control_packet = false) {
57
+ return AdaptObjectBuilder.execute_and_collect_garbage(builder => {
58
+ const execute_transaction = (trn_body) => {
59
+ builder.Attach(trn_body);
60
+ logging.info("Executing transaction in the packet: ", trn_body.Visualize());
61
+ const trn_result = builder.Attach(this.packet.ExecuteTransaction(trn_body));
62
+ const result_type = Protocol.GetTransactionResultKind(trn_result);
63
+ if (result_type !== 'SUC')
64
+ throw new Error("Internal error: transaction " + trn_body.Reduce(Protocol.FieldName.name).Visualize() + " failed.");
65
+ logging.info("Packet state updated. Previous state: ", this.packet.GetHash().Visualize().substring(2));
66
+ if (this.packet.lifetime == this.builder.lifetime)
67
+ this.packet.Destroy();
68
+ this.packet = trn_result.GetPacket().Clone(this.builder.lifetime);
69
+ logging.info("New state: ", this.packet.GetHash().Visualize().substring(2));
70
+ };
71
+ if (!is_control_packet && this.adapt_wrapper.config.env === 'enclave') {
72
+ if (!this.adapt_wrapper.control_packet || !this.adapt_wrapper.control_packet.packet) {
73
+ throw new Error("Control packet in enclave was not set.");
74
+ }
75
+ const control_packet_ip_document = builder.Attach(this.adapt_wrapper.control_packet.packet.identity_proof_document);
76
+ execute_transaction(object_to_adapt_value({
77
+ name: "::control_packet_identity_proof_document::set_identity_proof_document",
78
+ targ: control_packet_ip_document
79
+ }));
80
+ }
81
+ execute_transaction(object_to_adapt_value({
82
+ name: "::platform_dependent_attestation_document::load_attestation_document",
83
+ targ: this.packet.ExecuteTransaction(builder.Attach(object_to_adapt_value({
84
+ name: "::attestation_document::create",
85
+ targ: false
86
+ })))
87
+ }));
88
+ }, e => {
89
+ const message = e instanceof Error ? e.message : e;
90
+ throw new AdaptProtocolError(AdaptProtocolErrorType.INTERNAL_ERROR, "Internal error while creating attestation document: " + message);
91
+ });
92
+ }
93
+ create_registration_message() {
94
+ return AdaptObjectBuilder.execute_and_collect_garbage(builder => {
95
+ const args = builder.Attach(Protocol.GetProtocolContainer().CreateDictionary().Mutate(Protocol.FieldName.ip_document, Protocol.GetIdentityProofDocument(this.packet)));
96
+ const message = Protocol.CreateProtocolMessage(Protocol.MessageName.w2b_reg, { from: builder.AdaptValue.New(this.packet.GetContainerID()), body: args }).Detach();
97
+ return message;
98
+ }, e => {
99
+ const message = e instanceof Error ? e.message : e;
100
+ throw new AdaptProtocolError(AdaptProtocolErrorType.INTERNAL_ERROR, "Internal error while creating registration message: " + message);
101
+ });
102
+ }
103
+ constructor(adapt_packet_wrapper, packet, config, adapt_wrapper, messages, is_backup) {
104
+ this.adapt_wrapper = adapt_wrapper;
105
+ this.packet = packet;
106
+ this.builder.Attach(this.packet);
107
+ this.container_id = this.packet.GetContainerID().Visualize();
108
+ this.control_packet = config instanceof ControlPacketConfigurator ? new ControlPacket(config, adapt_packet_wrapper, adapt_wrapper) : undefined;
109
+ this.waitlist = new AdaptWaitlist();
110
+ logging.debug("Creating adapt packet wrapper.");
111
+ this.worker_functions = new Map([
112
+ [Protocol.MessageName.b2w_reg_ok, this.b2w_reg_ok_v1_handler.bind(this)],
113
+ [Protocol.MessageName.b2w_exec_transaction, this.b2w_exec_transaction_v1_handler.bind(this)],
114
+ [Protocol.MessageName.d2w_write_transaction_confirm, this.d2w_write_transaction_confirm_v1_handler.bind(this)],
115
+ [Protocol.MessageName.d2w_write_snapshot_confirm, this.d2w_write_snapshot_confirm_v1_handler.bind(this)],
116
+ [Protocol.MessageName.d2w_create_packet_confirm, this.d2w_create_packet_confirm_v1_handler.bind(this)]
117
+ ]);
118
+ this.queue.resume();
119
+ this.pending_transactions = new AsyncQueueAdapter(this.pending_transactions_worker.bind(this));
120
+ if (!is_backup)
121
+ this.load_attestation_document(config instanceof ControlPacketConfigurator);
122
+ this.identity_proof_document = this.builder.Attach(this.packet.ExecuteTransaction(this.builder.Attach(object_to_adapt_value({
123
+ name: "::identity_proof_document::create",
124
+ targ: undefined
125
+ }))));
126
+ this.first_messages = messages;
127
+ const first_message_cb = (() => {
128
+ logging.info(`Packet with id ${this.packet.GetContainerID().Visualize()} created and prepared to execute first messages.`);
129
+ this.prepared_to_execute_first_messages = true;
130
+ this.first_messages.forEach(message => this.on_first_message(message));
131
+ }).bind(this);
132
+ const registration_message_callback = (() => {
133
+ const registration_message = this.create_registration_message();
134
+ this.send_to_adapt_wrappper_impl(registration_message, true);
135
+ }).bind(this);
136
+ if (is_backup) {
137
+ registration_message_callback();
138
+ first_message_cb();
139
+ }
140
+ else if (this.adapt_wrapper.storage_available) {
141
+ logging.debug("Creating packet wrapper with available data storage.");
142
+ const create_packet_message = this.create_create_packet_message();
143
+ const write_snapshot_message = this.create_write_snapshot_message();
144
+ logging.debug("Sending the registration message to the broker and create packet/write snapshot messages to the data storage.");
145
+ this.waitlist.add([
146
+ new MessageDependency(create_packet_message.GetHash().Visualize(), new Callback(this.send_to_adapt_wrapper.bind(this, write_snapshot_message))),
147
+ new MessageDependency(write_snapshot_message.GetHash().Visualize(), new Callback(registration_message_callback))
148
+ ], first_message_cb);
149
+ this.send_to_adapt_wrapper(create_packet_message);
150
+ }
151
+ else {
152
+ logging.debug("Created packet without access to the data storage.");
153
+ logging.debug("Sending the registration message to the broker.");
154
+ registration_message_callback();
155
+ logging.debug("Executing first messages.");
156
+ first_message_cb();
157
+ }
158
+ }
159
+ add_client_message(message) {
160
+ let messages = [].concat(message);
161
+ if (this.prepared_to_execute_first_messages) {
162
+ messages.forEach(m => this.on_client_message(m));
163
+ }
164
+ else {
165
+ this.first_messages.push(...messages);
166
+ }
167
+ }
168
+ /**
169
+ * Message from the adapt wrapper
170
+ * @param message
171
+ */
172
+ on_message(message) {
173
+ // message processing logic
174
+ logging.message_received('adapt_wrapper', 'packet_wrapper', message, this.packet);
175
+ this.queue.push({
176
+ kind: 'incoming_message',
177
+ data: message
178
+ });
179
+ }
180
+ send_to_adapt_wrapper(message) {
181
+ this.queue.push({
182
+ kind: 'outgoing_message',
183
+ data: message
184
+ });
185
+ }
186
+ send_to_adapt_wrappper_impl(message, registration_message = false) {
187
+ const type_id = Protocol.GetTypeId(message);
188
+ let to_storage = type_id.startsWith('w2d');
189
+ if (!to_storage && !this.registration_accepted && !registration_message) {
190
+ logging.debug("Message not forwarded to adapt wrapper. Registration wasn't accepted yet.");
191
+ logging.debug("Adding message to the list of pending messages:", new LazyMessage(() => message.Visualize()));
192
+ this.pending_messages.push(message);
193
+ return;
194
+ }
195
+ logging.message_sent('packet_wrapper', 'adapt_wrapper', message);
196
+ this.adapt_wrapper.receive_message(message);
197
+ }
198
+ on_first_message(message) {
199
+ logging.debug('Received first message:', new LazyMessage(() => new LazyMessage(() => message.Visualize())));
200
+ this.queue.push({
201
+ kind: 'first_or_client_message',
202
+ data: message
203
+ });
204
+ }
205
+ on_client_message(message) {
206
+ logging.debug("Received message from a client:", new LazyMessage(() => message.Visualize()));
207
+ this.queue.push({
208
+ kind: 'first_or_client_message',
209
+ data: message
210
+ });
211
+ }
212
+ worker(task, cb) {
213
+ try {
214
+ if (task.kind === 'incoming_message') {
215
+ this.incoming_message_handler(task);
216
+ }
217
+ else if (task.kind === 'first_or_client_message') {
218
+ this.first_or_client_message_handler(task);
219
+ }
220
+ else {
221
+ this.send_to_adapt_wrappper_impl(task.data);
222
+ }
223
+ }
224
+ catch (e) {
225
+ logging.error(e instanceof Error ? e.stack : e);
226
+ }
227
+ finally {
228
+ cb();
229
+ }
230
+ }
231
+ first_or_client_message_handler(task) {
232
+ this.b2w_exec_transaction_v1_handler(task.data, true);
233
+ }
234
+ incoming_message_handler(task) {
235
+ const message_type_id = Protocol.GetTypeId(task.data);
236
+ const func = this.worker_functions.get(message_type_id);
237
+ if (func)
238
+ func(task.data);
239
+ else
240
+ throw new AdaptProtocolError(AdaptProtocolErrorType.INVALID_MESSAGE, "Unrecognized message type id: " + message_type_id.toString());
241
+ }
242
+ b2w_reg_ok_v1_handler(message) {
243
+ logging.debug("Adapt wrapper received confirmation of registration from broker");
244
+ this.registration_accepted = true;
245
+ message.Destroy();
246
+ this.pending_messages.forEach(message => {
247
+ this.queue.unshift({
248
+ kind: 'outgoing_message',
249
+ data: message
250
+ });
251
+ });
252
+ }
253
+ d2w_write_transaction_confirm_v1_handler(message) {
254
+ this.process_confirmation_message(message);
255
+ }
256
+ d2w_write_snapshot_confirm_v1_handler(message) {
257
+ this.process_confirmation_message(message);
258
+ }
259
+ d2w_create_packet_confirm_v1_handler(message) {
260
+ this.process_confirmation_message(message);
261
+ }
262
+ process_confirmation_message(message) {
263
+ AdaptObjectBuilder.execute_and_collect_garbage(builder => {
264
+ builder.Attach(message);
265
+ const message_hash = builder.Attach(Protocol.GetMessageHash(message));
266
+ this.waitlist.satisfy(message_hash.Visualize(), message.Clone());
267
+ }, e => {
268
+ const message = e instanceof Error ? e.message : e;
269
+ throw new Error("Error while processing confirmation message: " + message);
270
+ });
271
+ }
272
+ /**
273
+ * Transactions processing workflow:
274
+ * When b2w_exec_transaction_v1 is received by adapt packet wrapper, the message is added to the queue of pending transactions.
275
+ * This queue process one transactions at time.
276
+ */
277
+ b2w_exec_transaction_v1_handler(message, is_first_message = false) {
278
+ // Ensure, that container id in 'to' field is the same as the container id manages by the wrapper and validate attestation document of the issuer container
279
+ if (is_first_message) {
280
+ this.pending_transactions.push({ trn: message, is_user_transaction: true });
281
+ return;
282
+ }
283
+ AdaptObjectBuilder.execute_and_collect_garbage(builder => {
284
+ const to = builder.Attach(Protocol.GetTo(message));
285
+ if (!to.Equals(this.packet.GetContainerID()))
286
+ throw new AdaptProtocolError(AdaptProtocolErrorType.LOGIC_ERROR, "Invalid container id of incoming transaction message." + "Expected: " + this.packet.GetContainerID().Visualize() + ", but received: " + to.Visualize());
287
+ const body = builder.Attach(Protocol.GetBody(message));
288
+ const ip_document = body.Reduce(Protocol.FieldName.ip_document);
289
+ // TODO: check if attestation document of the container is known to us, if not, attestation document in the message should not be NIL
290
+ // if (!is_first_message) {
291
+ // try {
292
+ // builder.Attach(Protocol.ValidateIdentityProofDocument(ip_document, builder.AdaptEnvironment.SystemTime()));
293
+ // } catch (e) {
294
+ // const message = e instanceof Error ? e.message : e;
295
+ // throw new AdaptProtocolError(AdaptProtocolErrorType.IP_DOCUMENT_VALIDATION_FAILURE, "Attestation document validation failed: " + message);
296
+ // }
297
+ // }
298
+ // logging.debug("Idenity proof document validated.");
299
+ });
300
+ // add transaction to the queue of pending transactions
301
+ this.pending_transactions.push({ trn: message, is_user_transaction: false });
302
+ }
303
+ // ========================= pending transactions worker and related methods ======================
304
+ pending_transactions_worker(event, cb) {
305
+ try {
306
+ this.execute_transaction(event);
307
+ }
308
+ catch (e) {
309
+ const message = e instanceof Error ? e.message : e;
310
+ logging.error("while executing transaction:", message);
311
+ if (this.#on_transaction_failure && e instanceof Error) {
312
+ this.#on_transaction_failure(e.message);
313
+ }
314
+ this.pending_transactions.resume(); // if transaction failed, next transactions can be processed
315
+ }
316
+ finally {
317
+ cb();
318
+ }
319
+ }
320
+ create_write_transaction_message(trn_result, transient_data_encrypted, request_data_encrypted) {
321
+ return AdaptObjectBuilder.execute_and_collect_garbage(builder => {
322
+ const args = builder.Attach(Protocol.GetProtocolContainer().CreateDictionary()
323
+ .Mutate(Protocol.FieldName.state_change, builder.Attach(Protocol.GetProtocolContainer().CreateDictionary())
324
+ .Mutate(Protocol.FieldName.final_state_id, trn_result.GetPacket().GetHash())
325
+ .Mutate(Protocol.FieldName.transaction, builder.Attach(Protocol.GetProtocolContainer().CreateDictionary().
326
+ Mutate(Protocol.FieldName.transient_data_encrypted, transient_data_encrypted).
327
+ Mutate(Protocol.FieldName.request_data_encrypted, request_data_encrypted))))
328
+ .Mutate(Protocol.FieldName.packet_info, builder.Attach(Protocol.CreatePacketInfo(this.packet))));
329
+ const write_transaction_message = Protocol.CreateProtocolMessage(Protocol.MessageName.w2d_write_transaction, { from: builder.AdaptValue.New(this.packet.GetContainerID()), body: args }).Detach();
330
+ return write_transaction_message;
331
+ });
332
+ }
333
+ execute_transaction({ trn, is_user_transaction }) {
334
+ this.pending_transactions.pause();
335
+ const builder = new AdaptObjectBuilder();
336
+ let envelope;
337
+ if (is_user_transaction) {
338
+ logging.debug("Executing user transaction in the packet: ", new LazyMessage(() => trn.Visualize()));
339
+ envelope = trn;
340
+ }
341
+ else {
342
+ logging.debug("Executing a transaction in the packet");
343
+ const body = builder.Attach(Protocol.GetBody(trn));
344
+ envelope = body.Reduce(Protocol.FieldName.envlp);
345
+ const trn_body = envelope.Reduce(Protocol.FieldName.body);
346
+ logging.debug("Executing transaction: ", new LazyMessage(() => builder.Attach(Protocol.DescribeTransaction(this.packet, trn_body)).Visualize()));
347
+ }
348
+ // generate and save entropy and timestamp
349
+ const entropy = builder.AdaptEnvironment.GetRandomBytes(256);
350
+ const time = builder.AdaptEnvironment.SystemTime();
351
+ // execute transaction
352
+ const trn_result = this.packet.ExecuteTransaction(envelope, entropy.Visualize().substring(2), time).Detach();
353
+ logging.info("Adapt transaction output: ", AdaptEnvironment.getStdoutContents(), AdaptEnvironment.getStderrContents());
354
+ // check, whether transaction succeeded. Otherwise, do not continue processing the transaction
355
+ const transaction_result_type = Protocol.GetTransactionResultKind(trn_result);
356
+ if (transaction_result_type === 'FAIL') {
357
+ throw new AdaptProtocolError(AdaptProtocolErrorType.TRANSACTION_FAILURE, "Transaction failed with message " + trn_result.Reduce(Protocol.FieldName.result).Visualize());
358
+ }
359
+ logging.debug("Container hash before transaction:", new LazyMessage(() => this.packet.GetHash().Visualize()));
360
+ logging.debug("Transaction result:", new LazyMessage(() => trn_result.Visualize()));
361
+ logging.debug("Container hash after transaction:", new LazyMessage(() => trn_result.GetPacket().GetHash().Visualize()));
362
+ if (this.adapt_wrapper.storage_available) {
363
+ // encrypt transaction request and transient data with encryption key of this container
364
+ const transient_data = builder.Attach(this.packet.CreateDictionary().Mutate(Protocol.FieldName.timestamp, time).Mutate(Protocol.FieldName.entropy, entropy.Visualize().substring(2)));
365
+ const transient_data_encrypted = builder.Attach(this.packet.ExecuteTransaction(builder.Attach(object_to_adapt_value({
366
+ name: "::key_storage_api::default_encrypt",
367
+ targ: builder.Attach(object_to_adapt_value({
368
+ message: transient_data,
369
+ recipient_container_id: this.packet.GetContainerID()
370
+ }))
371
+ }))));
372
+ const request_data_encrypted = builder.Attach(this.packet.ExecuteTransaction(builder.Attach(object_to_adapt_value({
373
+ name: "::key_storage_api::default_encrypt",
374
+ targ: builder.Attach(object_to_adapt_value({
375
+ message: envelope,
376
+ recipient_container_id: this.packet.GetContainerID()
377
+ }))
378
+ }))));
379
+ const write_transaction_message = this.create_write_transaction_message(trn_result, transient_data_encrypted, request_data_encrypted);
380
+ const write_transaction_message_hash = write_transaction_message.GetHash().Visualize();
381
+ this.waitlist.add([new MessageDependency(write_transaction_message_hash)], this.process_transaction_result.bind(this, trn_result));
382
+ this.send_to_adapt_wrapper(write_transaction_message);
383
+ logging.debug("write transaction message:", new LazyMessage(() => write_transaction_message.Visualize()));
384
+ }
385
+ else {
386
+ this.process_transaction_result(trn_result);
387
+ }
388
+ }
389
+ process_transaction_result(message) {
390
+ AdaptObjectBuilder.execute_and_collect_garbage(builder => {
391
+ logging.info("Processing transaction result:", message.Visualize());
392
+ logging.info("Container state before transaction:", this.packet.GetHash().Visualize());
393
+ builder.Attach(message);
394
+ const transaction_result = Protocol.GetTransactionResultKind(message);
395
+ const result = message.Reduce(Protocol.FieldName.result);
396
+ if (transaction_result === 'SUC') {
397
+ if (this.packet.lifetime == this.builder.lifetime)
398
+ this.packet.Destroy();
399
+ this.packet = message.GetPacket().Clone(this.builder.lifetime);
400
+ logging.info("Packet state updated. New state: ", this.packet.GetHash().Visualize());
401
+ let idx = 0;
402
+ let value;
403
+ while (!(value = result.Reduce(idx)).IsNil()) {
404
+ idx++;
405
+ const action_kind = value.Reduce(Protocol.FieldName.action_kind).Visualize();
406
+ if (action_kind === "RET") {
407
+ if (this.packet.lifetime == this.builder.lifetime)
408
+ this.packet.Destroy();
409
+ if (this.control_packet) {
410
+ const packet = message.GetPacket().Clone(this.builder.lifetime);
411
+ this.control_packet.on_message(value.Reduce(Protocol.FieldName.data).Detach(), cb => {
412
+ this.packet = packet;
413
+ logging.info("Packet state updated. New state: ", this.packet.GetHash().Visualize());
414
+ if (cb)
415
+ cb();
416
+ this.pending_transactions.resume();
417
+ });
418
+ return;
419
+ }
420
+ this.packet = message.GetPacket().Clone(this.builder.lifetime);
421
+ logging.info("Packet state updated. New state: ", this.packet.GetHash().Visualize());
422
+ if (this.#on_return_data)
423
+ this.#on_return_data(value.Detach().Reduce(Protocol.FieldName.data), this.packet);
424
+ }
425
+ else if (action_kind === "SEND") {
426
+ this.send_to_adapt_wrapper(Protocol.CreateTransactionMessageFromEnvelope(value.Reduce(Protocol.FieldName.data)));
427
+ }
428
+ else if (action_kind === "VER") {
429
+ if (this.#on_verify_request)
430
+ this.#on_verify_request(value.Detach().Reduce(Protocol.FieldName.data));
431
+ }
432
+ else if (action_kind === "TIMEOUT") {
433
+ const data = value.Reduce(Protocol.FieldName.data);
434
+ const seconds = data.Reduce('seconds').GetNumber();
435
+ const continuation_id = data.Reduce('continuation_id').Visualize();
436
+ logging.debug("Recieved timeout request. Seconds: ", seconds, "continuation id: ", continuation_id);
437
+ const on_timeout = () => {
438
+ logging.debug("Calling timeout callback.");
439
+ this.pending_transactions.push({
440
+ trn: object_to_adapt_value({ name: "::continuation::continue_transaction", targ: { id: continuation_id, args: false } }).Detach(),
441
+ is_user_transaction: true
442
+ });
443
+ };
444
+ setTimeout(on_timeout.bind(this), seconds * 1000);
445
+ }
446
+ else {
447
+ logging.error("Received invalid transaction action: ", action_kind);
448
+ continue;
449
+ }
450
+ }
451
+ this.pending_transactions.resume();
452
+ }
453
+ else if (transaction_result === 'FAIL') {
454
+ throw new AdaptProtocolError(AdaptProtocolErrorType.INTERNAL_ERROR, "Invalid transaction result. Fail wasn't expected here. It should be handled before");
455
+ }
456
+ else {
457
+ throw new AdaptProtocolError(AdaptProtocolErrorType.INTERNAL_ERROR, "Unexpected transaction result: " + transaction_result + ". Transaction result should be checked before.");
458
+ }
459
+ });
460
+ }
461
+ //----------------------------- browser only methods ---------------------------------------
462
+ set on_verify_request(new_value) {
463
+ this.#on_verify_request = new_value;
464
+ }
465
+ set on_return_data(new_value) {
466
+ this.#on_return_data = new_value;
467
+ }
468
+ set on_transaction_failure(new_value) {
469
+ this.#on_transaction_failure = new_value;
470
+ }
471
+ acceptVerificationRequest(id) {
472
+ AdaptObjectBuilder.execute_and_collect_garbage(builder => {
473
+ const message = object_to_adapt_value({ name: "::verification::accept", targ: builder.Attach(object_to_adapt_value({ id: id })) });
474
+ this.add_client_message(message);
475
+ });
476
+ }
477
+ }
478
+ __decorate([
479
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
480
+ ], AdaptPacketWrapperImpl.prototype, "create_create_packet_message", null);
481
+ __decorate([
482
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
483
+ ], AdaptPacketWrapperImpl.prototype, "create_write_snapshot_message", null);
484
+ __decorate([
485
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
486
+ ], AdaptPacketWrapperImpl.prototype, "load_attestation_document", null);
487
+ __decorate([
488
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
489
+ ], AdaptPacketWrapperImpl.prototype, "create_registration_message", null);
490
+ __decorate([
491
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
492
+ ], AdaptPacketWrapperImpl.prototype, "add_client_message", null);
493
+ __decorate([
494
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
495
+ ], AdaptPacketWrapperImpl.prototype, "on_message", null);
496
+ __decorate([
497
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
498
+ ], AdaptPacketWrapperImpl.prototype, "send_to_adapt_wrapper", null);
499
+ __decorate([
500
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
501
+ ], AdaptPacketWrapperImpl.prototype, "send_to_adapt_wrappper_impl", null);
502
+ __decorate([
503
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
504
+ ], AdaptPacketWrapperImpl.prototype, "on_first_message", null);
505
+ __decorate([
506
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
507
+ ], AdaptPacketWrapperImpl.prototype, "on_client_message", null);
508
+ __decorate([
509
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
510
+ ], AdaptPacketWrapperImpl.prototype, "worker", null);
511
+ __decorate([
512
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
513
+ ], AdaptPacketWrapperImpl.prototype, "first_or_client_message_handler", null);
514
+ __decorate([
515
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
516
+ ], AdaptPacketWrapperImpl.prototype, "incoming_message_handler", null);
517
+ __decorate([
518
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
519
+ ], AdaptPacketWrapperImpl.prototype, "b2w_reg_ok_v1_handler", null);
520
+ __decorate([
521
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
522
+ ], AdaptPacketWrapperImpl.prototype, "d2w_write_transaction_confirm_v1_handler", null);
523
+ __decorate([
524
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
525
+ ], AdaptPacketWrapperImpl.prototype, "d2w_write_snapshot_confirm_v1_handler", null);
526
+ __decorate([
527
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
528
+ ], AdaptPacketWrapperImpl.prototype, "d2w_create_packet_confirm_v1_handler", null);
529
+ __decorate([
530
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
531
+ ], AdaptPacketWrapperImpl.prototype, "process_confirmation_message", null);
532
+ __decorate([
533
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
534
+ ], AdaptPacketWrapperImpl.prototype, "b2w_exec_transaction_v1_handler", null);
535
+ __decorate([
536
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
537
+ ], AdaptPacketWrapperImpl.prototype, "pending_transactions_worker", null);
538
+ __decorate([
539
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
540
+ ], AdaptPacketWrapperImpl.prototype, "create_write_transaction_message", null);
541
+ __decorate([
542
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
543
+ ], AdaptPacketWrapperImpl.prototype, "execute_transaction", null);
544
+ __decorate([
545
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
546
+ ], AdaptPacketWrapperImpl.prototype, "process_transaction_result", null);
547
+ __decorate([
548
+ log_fn_call(adapt_packet_wrapper_impl_logger_proxy)
549
+ ], AdaptPacketWrapperImpl.prototype, "acceptVerificationRequest", null);
550
+ //# sourceMappingURL=adapt_packet_wrapper_impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapt_packet_wrapper_impl.js","sourceRoot":"","sources":["../../../../../src/utilities/wrappers/wrappers/impl/adapt_packet_wrapper_impl.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAClG,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,aAAa,EAAE,iBAAiB,EAAE,QAAQ,EAAc,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAChN,OAAO,EAAE,gBAAgB,EAA2D,MAAM,UAAU,CA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