@attocash/cli 0.2.3 → 0.3.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 (137) hide show
  1. package/README.md +148 -7
  2. package/dist/application/app.d.ts +34 -3
  3. package/dist/application/app.js +138 -126
  4. package/dist/application/operations.d.ts +3 -0
  5. package/dist/application/operations.js +30 -8
  6. package/dist/cli/cli.d.ts +1 -0
  7. package/dist/cli/cli.js +101 -13
  8. package/dist/cli/onboarding.d.ts +13 -0
  9. package/dist/cli/onboarding.js +99 -2
  10. package/dist/cli/output.js +18 -2
  11. package/dist/doctor/profile.js +2 -1
  12. package/dist/internal-marketplace.d.ts +25 -0
  13. package/dist/internal-marketplace.js +50 -0
  14. package/dist/marketplace/approval-files.d.ts +3 -0
  15. package/dist/marketplace/approval-files.js +97 -0
  16. package/dist/marketplace/approval-preview.d.ts +2 -0
  17. package/dist/marketplace/approval-preview.js +86 -0
  18. package/dist/marketplace/proof-approval.d.ts +82 -0
  19. package/dist/marketplace/proof-approval.js +671 -0
  20. package/dist/marketplace/topups.d.ts +82 -0
  21. package/dist/marketplace/topups.js +485 -0
  22. package/dist/network/batching.d.ts +2 -0
  23. package/dist/network/batching.js +23 -0
  24. package/dist/network/entry.d.ts +2 -0
  25. package/dist/network/entry.js +35 -0
  26. package/dist/network/reader.d.ts +2 -0
  27. package/dist/network/reader.js +125 -37
  28. package/dist/spending/approval.d.ts +5 -0
  29. package/dist/spending/approval.js +2 -0
  30. package/dist/spending/atto-x402.d.ts +31 -0
  31. package/dist/spending/atto-x402.js +174 -0
  32. package/dist/spending/ledger.d.ts +74 -2
  33. package/dist/spending/ledger.js +298 -7
  34. package/dist/spending/payments.d.ts +105 -5
  35. package/dist/spending/payments.js +795 -11
  36. package/dist/storage/recovery-seed.d.ts +13 -0
  37. package/dist/storage/recovery-seed.js +93 -0
  38. package/dist/storage/state.d.ts +4 -0
  39. package/dist/storage/state.js +32 -2
  40. package/dist/wallet/receive.d.ts +39 -0
  41. package/dist/wallet/receive.js +264 -0
  42. package/dist/wallet/signing.d.ts +1 -0
  43. package/dist/wallet/signing.js +37 -21
  44. package/dist/wallet/types.d.ts +1 -0
  45. package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs +1922 -1918
  46. package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -1
  47. package/node_modules/@attocash/commons-core/README.md +9 -0
  48. package/node_modules/@attocash/commons-core/commons-commons-core.d.mts +10 -0
  49. package/node_modules/@attocash/commons-core/commons-commons-core.mjs +2543 -2434
  50. package/node_modules/@attocash/commons-core/commons-commons-core.mjs.map +1 -1
  51. package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs +4695 -4227
  52. package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs.map +1 -1
  53. package/node_modules/@attocash/commons-core/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -1
  54. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs +60 -60
  55. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -1
  56. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs +651 -631
  57. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
  58. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs +2294 -2295
  59. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
  60. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
  61. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
  62. package/node_modules/@attocash/commons-core/package.json +1 -1
  63. package/node_modules/@attocash/commons-node/commons-commons-node.d.mts +1 -0
  64. package/node_modules/@attocash/commons-node/commons-commons-node.mjs +873 -847
  65. package/node_modules/@attocash/commons-node/commons-commons-node.mjs.map +1 -1
  66. package/node_modules/@attocash/commons-node/kotlin-logging.mjs +109 -109
  67. package/node_modules/@attocash/commons-node/kotlin-logging.mjs.map +1 -1
  68. package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
  69. package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
  70. package/node_modules/@attocash/commons-node/package.json +3 -3
  71. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.d.mts +1 -0
  72. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs +674 -640
  73. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs.map +1 -1
  74. package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs +109 -109
  75. package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs.map +1 -1
  76. package/node_modules/@attocash/commons-node-remote/kotlinx-browser.mjs.map +1 -1
  77. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -1
  78. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
  79. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
  80. package/node_modules/@attocash/commons-node-remote/package.json +4 -4
  81. package/node_modules/@attocash/commons-transport/commons-commons-transport.d.mts +1 -0
  82. package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs +52 -51
  83. package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs.map +1 -1
  84. package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs +13 -13
  85. package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs.map +1 -1
  86. package/node_modules/@attocash/commons-transport/kotlinx-browser.mjs.map +1 -1
  87. package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs +2639 -2608
  88. package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs.map +1 -1
  89. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -1
  90. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
  91. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
  92. package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs +411 -196
  93. package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs.map +1 -1
  94. package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs +2115 -1976
  95. package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs.map +1 -1
  96. package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs +7 -7
  97. package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs.map +1 -1
  98. package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs +385 -384
  99. package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs.map +1 -1
  100. package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs +1261 -1185
  101. package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs.map +1 -1
  102. package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs +668 -656
  103. package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs.map +1 -1
  104. package/node_modules/@attocash/commons-transport/ktor-ktor-openapi-schema.mjs +89 -0
  105. package/node_modules/@attocash/commons-transport/ktor-ktor-openapi-schema.mjs.map +1 -0
  106. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs +9 -9
  107. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -1
  108. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs +120 -128
  109. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs.map +1 -1
  110. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs +46 -49
  111. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs.map +1 -1
  112. package/node_modules/@attocash/commons-transport/ktor-ktor-sse.mjs.map +1 -1
  113. package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs +1041 -985
  114. package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs.map +1 -1
  115. package/node_modules/@attocash/commons-transport/ktor-ktor-websocket-serialization.mjs.map +1 -1
  116. package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs +530 -455
  117. package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs.map +1 -1
  118. package/node_modules/@attocash/commons-transport/package.json +4 -4
  119. package/node_modules/@attocash/commons-worker/commons-commons-worker.d.mts +1 -0
  120. package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs +230 -226
  121. package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs.map +1 -1
  122. package/node_modules/@attocash/commons-worker/kotlin-logging.mjs +109 -109
  123. package/node_modules/@attocash/commons-worker/kotlin-logging.mjs.map +1 -1
  124. package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
  125. package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
  126. package/node_modules/@attocash/commons-worker/package.json +3 -3
  127. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.d.mts +1 -0
  128. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs +91 -86
  129. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs.map +1 -1
  130. package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs +109 -109
  131. package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs.map +1 -1
  132. package/node_modules/@attocash/commons-worker-remote/kotlinx-browser.mjs.map +1 -1
  133. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -1
  134. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
  135. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
  136. package/node_modules/@attocash/commons-worker-remote/package.json +4 -4
  137. package/package.json +9 -5
@@ -1,23 +1,25 @@
1
1
  import {
2
2
  VOID3gxj6tk5isa35 as VOID,
3
3
  emptyMapr06gerzljqtm as emptyMap,
4
+ orPromise1iucc2to2udt2 as orPromise,
4
5
  constructCallableReference23y65rf941mch as constructCallableReference,
5
6
  NotImplementedErrorfzlkpv14xxr8 as NotImplementedError,
7
+ $3l5vvh8yg0ier as $,
6
8
  getKClass3t8tygqu4lcxf as getKClass,
7
9
  arrayOf1akklvh2at202 as arrayOf,
8
10
  createKType31ecntyyaay3k as createKType,
9
- Unit_instance3vdlo4e4f5ggx as Unit_instance,
11
+ Unit_instance3kz1zqli6gr1r as Unit_instance,
10
12
  THROW_CCE2g6jy02ryeudk as THROW_CCE,
11
13
  IllegalArgumentException2asla15b5jaob as IllegalArgumentException,
12
14
  toString1pkumu07cwy4m as toString,
13
15
  protoOf180f3jzyo7rfj as protoOf,
14
16
  initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
15
- Companion_getInstance4z8fvmvpott5 as Companion_getInstance,
16
- DurationUnit_MINUTES_getInstance3l9dh3bdonhtl as DurationUnit_MINUTES_getInstance,
17
+ Companion_getInstance2jahap30xtp3t as Companion_getInstance,
18
+ DurationUnit_MINUTES_getInstance33ilufdckt9os as DurationUnit_MINUTES_getInstance,
17
19
  toDuration7gy6v749ektt as toDuration,
18
20
  to2cs3ny02qtbcb as to,
19
21
  plus2lr02ok6jhhxu as plus,
20
- DurationUnit_SECONDS_getInstancehu17fry790z2 as DurationUnit_SECONDS_getInstance,
22
+ DurationUnit_SECONDS_getInstance162tnxlnf2fpv as DurationUnit_SECONDS_getInstance,
21
23
  toDurationba1nlt78o6vu as toDuration_0,
22
24
  } from '@attocash/commons-core/kotlin-kotlin-stdlib.mjs';
23
25
  import {
@@ -31,18 +33,18 @@ import {
31
33
  HttpStatement3zxb33q8lku as HttpStatement,
32
34
  } from '@attocash/commons-transport/ktor-ktor-client-core.mjs';
33
35
  import {
34
- Companion_getInstance1pptfj8vjmgsz as Companion_getInstance_0,
35
- Application_getInstance17ubdrb0i0ohu as Application_getInstance,
36
+ Companion_getInstance29j9s2wnmk34z as Companion_getInstance_0,
37
+ Application_getInstance3vhi2qmce4cj0 as Application_getInstance,
36
38
  OutgoingContent3t2ohmyam9o76 as OutgoingContent,
37
- NullBody_instanceyfq32eqie90j as NullBody_instance,
39
+ NullBody_instance22vwyocs8eppk as NullBody_instance,
38
40
  } from '@attocash/commons-transport/ktor-ktor-http.mjs';
39
41
  import {
40
42
  Request2o3t1kyfw778m as Request,
41
43
  Response3lq22kwwmc6vl as Response,
42
- work2x6e1hnelgs5b as work,
43
- work3q0nhsjbo6lx9 as work_0,
44
+ work3lctluiffi34a as work,
45
+ work1yjb62hcp0x3a as work_0,
44
46
  AttoWorkerOperations1gnkwfcdzd0wa as AttoWorkerOperations,
45
- Companion_instance1kp6jnubfith as Companion_instance,
47
+ Companion_instance7s716lzs1l85 as Companion_instance,
46
48
  cached1s4yf99twpuut as cached,
47
49
  toAsync10i9ow1f352l5 as toAsync,
48
50
  } from '@attocash/commons-worker/commons-commons-worker.mjs';
@@ -50,9 +52,9 @@ import { TypeInfo2nbxsuf4v8os2 as TypeInfo } from '@attocash/commons-transport/k
50
52
  import {
51
53
  fromHexToByteArrayplx5jrfi7guj as fromHexToByteArray,
52
54
  AttoWorkTarget3v4zqc5kfdpel as AttoWorkTarget,
53
- Companion_instancer1aiy15xy072 as Companion_instance_0,
55
+ Companion_instance2enxrnk22gxoi as Companion_instance_0,
54
56
  } from '@attocash/commons-core/commons-commons-core.mjs';
55
- import { Dispatchers_getInstance20p7pyqnrepag as Dispatchers_getInstance } from '@attocash/commons-transport/kotlinx-coroutines-core.mjs';
57
+ import { Dispatchers_getInstance128lm494a5r5s as Dispatchers_getInstance } from '@attocash/commons-transport/kotlinx-coroutines-core.mjs';
56
58
  //region block: imports
57
59
  //endregion
58
60
  //region block: pre-declaration
@@ -66,134 +68,137 @@ class WorkerRemote {
66
68
  tmp = headerProvider;
67
69
  }
68
70
  headerProvider = tmp;
69
- this.b5d_1 = timeout;
70
- this.c5d_1 = new AttoHttpTransport(url, headerProvider);
71
+ this.timeout_1 = timeout;
72
+ this.transport_1 = new AttoHttpTransport(url, headerProvider);
71
73
  }
72
- *m3j(threshold, target, $completion) {
73
- throw NotImplementedError.pd();
74
+ *work_87s8mv_k$(threshold, target, $completion) {
75
+ throw NotImplementedError.new_kotlin_NotImplementedError_8rzvsv_k$();
74
76
  }
75
- *n3k(request, $completion) {
76
- var tmp0 = this.c5d_1;
77
+ *work_s1kcy2_k$(request, $completion) {
78
+ var tmp0 = this.transport_1;
77
79
  // Inline function 'cash.atto.commons.transport.AttoHttpTransport.post' call
78
- var timeouts = new AttoHttpTimeouts(VOID, this.b5d_1);
79
- var tmp0_0 = tmp0.t5c_1;
80
+ var timeouts = new AttoHttpTimeouts(VOID, this.timeout_1);
81
+ var tmp0_0 = tmp0.client_1;
80
82
  // Inline function 'io.ktor.client.request.post' call
81
- var urlString = tmp0.u5c('works');
83
+ var urlString = tmp0.url_zd587b_k$('works');
82
84
  // Inline function 'io.ktor.client.request.post' call
83
85
  var builder = new HttpRequestBuilder();
84
- builder.h4w_1 = Companion_getInstance_0().i4g_1;
86
+ builder.method_1 = Companion_getInstance_0().Post_1;
85
87
  url(builder, urlString);
86
- configure(builder, yield* tmp0.s5c_1($completion), Application_getInstance().n49_1, timeouts);
88
+ configure(builder, yield* $(tmp0.headerProvider_1($completion), $completion), Application_getInstance().Json_1, timeouts);
87
89
  // Inline function 'io.ktor.client.request.setBody' call
88
90
  if (request == null) {
89
- builder.j4w_1 = NullBody_instance;
91
+ builder.body_1 = NullBody_instance;
90
92
  // Inline function 'io.ktor.util.reflect.typeInfo' call
91
93
  var tmp = getKClass(Request);
94
+ var tmp_0 = null instanceof Request;
92
95
  // Inline function 'io.ktor.util.reflect.typeOfOrNull' call
93
- var tmp_0;
96
+ var tmp_1;
94
97
  try {
95
- tmp_0 = createKType(getKClass(Request), arrayOf([]), false);
98
+ tmp_1 = createKType(getKClass(Request), arrayOf([]), false);
96
99
  } catch ($p) {
97
- var tmp_1;
100
+ var tmp_2;
98
101
  if ($p instanceof Error) {
99
102
  var _unused_var__etf5q3 = $p;
100
- tmp_1 = null;
103
+ tmp_2 = null;
101
104
  } else {
102
105
  throw $p;
103
106
  }
104
- tmp_0 = tmp_1;
107
+ tmp_1 = tmp_2;
105
108
  }
106
- var tmp$ret$7 = tmp_0;
107
- var tmp$ret$6 = new TypeInfo(tmp, tmp$ret$7);
108
- builder.y4z(tmp$ret$6);
109
+ var tmp$ret$7 = tmp_1;
110
+ var tmp$ret$6 = new TypeInfo(tmp, tmp_0, tmp$ret$7);
111
+ builder.set_bodyType_8pgqkl_k$(tmp$ret$6);
109
112
  } else {
110
113
  if (request instanceof OutgoingContent) {
111
- builder.j4w_1 = request;
112
- builder.y4z(null);
114
+ builder.body_1 = request;
115
+ builder.set_bodyType_8pgqkl_k$(null);
113
116
  } else {
114
- builder.j4w_1 = request;
117
+ builder.body_1 = request;
115
118
  // Inline function 'io.ktor.util.reflect.typeInfo' call
116
- var tmp_2 = getKClass(Request);
119
+ var tmp_3 = getKClass(Request);
120
+ var tmp_4 = null instanceof Request;
117
121
  // Inline function 'io.ktor.util.reflect.typeOfOrNull' call
118
- var tmp_3;
122
+ var tmp_5;
119
123
  try {
120
- tmp_3 = createKType(getKClass(Request), arrayOf([]), false);
124
+ tmp_5 = createKType(getKClass(Request), arrayOf([]), false);
121
125
  } catch ($p_0) {
122
- var tmp_4;
126
+ var tmp_6;
123
127
  if ($p_0 instanceof Error) {
124
128
  var _unused_var__etf5q3_0 = $p_0;
125
- tmp_4 = null;
129
+ tmp_6 = null;
126
130
  } else {
127
131
  throw $p_0;
128
132
  }
129
- tmp_3 = tmp_4;
133
+ tmp_5 = tmp_6;
130
134
  }
131
- var tmp$ret$9 = tmp_3;
132
- var tmp$ret$8 = new TypeInfo(tmp_2, tmp$ret$9);
133
- builder.y4z(tmp$ret$8);
135
+ var tmp$ret$9 = tmp_5;
136
+ var tmp$ret$8 = new TypeInfo(tmp_3, tmp_4, tmp$ret$9);
137
+ builder.set_bodyType_8pgqkl_k$(tmp$ret$8);
134
138
  }
135
139
  }
136
- builder.h4w_1 = Companion_getInstance_0().i4g_1;
140
+ builder.method_1 = Companion_getInstance_0().Post_1;
137
141
  // Inline function 'io.ktor.client.request.request' call
138
142
  // Inline function 'io.ktor.client.call.body' call
139
- var tmp_5 = (yield* (new HttpStatement(builder, tmp0_0)).j5a($completion)).e4x();
143
+ var tmp_7 = (yield* (new HttpStatement(builder, tmp0_0)).execute_rsj18j_k$($completion)).get_call_wojxrb_k$();
140
144
  // Inline function 'io.ktor.util.reflect.typeInfo' call
141
- var tmp_6 = getKClass(Response);
145
+ var tmp_8 = getKClass(Response);
146
+ var tmp_9 = null instanceof Response;
142
147
  // Inline function 'io.ktor.util.reflect.typeOfOrNull' call
143
- var tmp_7;
148
+ var tmp_10;
144
149
  try {
145
- tmp_7 = createKType(getKClass(Response), arrayOf([]), false);
150
+ tmp_10 = createKType(getKClass(Response), arrayOf([]), false);
146
151
  } catch ($p_1) {
147
- var tmp_8;
152
+ var tmp_11;
148
153
  if ($p_1 instanceof Error) {
149
154
  var _unused_var__etf5q3_1 = $p_1;
150
- tmp_8 = null;
155
+ tmp_11 = null;
151
156
  } else {
152
157
  throw $p_1;
153
158
  }
154
- tmp_7 = tmp_8;
159
+ tmp_10 = tmp_11;
155
160
  }
156
- var tmp$ret$13 = tmp_7;
157
- var tmp$ret$12 = new TypeInfo(tmp_6, tmp$ret$13);
158
- var tmp_9 = yield* tmp_5.b4x(tmp$ret$12, $completion);
159
- var response = tmp_9 instanceof Response ? tmp_9 : THROW_CCE();
160
- var target = new AttoWorkTarget(fromHexToByteArray(request.h3k_1));
161
+ var tmp$ret$13 = tmp_10;
162
+ var tmp$ret$12 = new TypeInfo(tmp_8, tmp_9, tmp$ret$13);
163
+ var tmp_12 = yield* tmp_7.bodyNullable_wn8z59_k$(tmp$ret$12, $completion);
164
+ var response = tmp_12 instanceof Response ? tmp_12 : THROW_CCE();
165
+ var target = new AttoWorkTarget(fromHexToByteArray(request.target_1));
161
166
  // Inline function 'kotlin.require' call
162
- if (!Companion_instance_0.t2q(request.f3k_1, request.g3k_1, target, response.l3k_1.value)) {
163
- var message = 'Remote worker returned invalid work for network=' + request.f3k_1.toString() + ' timestamp=' + request.g3k_1.toString() + ' target=' + request.h3k_1;
164
- throw IllegalArgumentException.n2(toString(message));
167
+ if (!Companion_instance_0.isValid_bw4l0h_k$(request.network_1, request.timestamp_1, target, response.work_1.value)) {
168
+ var message = 'Remote worker returned invalid work for network=' + request.network_1.toString() + ' timestamp=' + request.timestamp_1.toString() + ' target=' + request.target_1;
169
+ throw IllegalArgumentException.new_kotlin_IllegalArgumentException_sfqr8_k$(toString(message));
165
170
  }
166
171
  return response;
167
172
  }
168
- q6() {
173
+ close_yn9xrc_k$() {
169
174
  }
170
175
  }
171
176
  class AttoWorkerAsyncBuilder {
172
177
  constructor(url) {
173
- this.d5d_1 = url;
174
- this.e5d_1 = true;
175
- this.f5d_1 = emptyMap();
176
- this.g5d_1 = get_DEFAULT_TIMEOUT();
177
- this.h5d_1 = null;
178
+ this.url_1 = url;
179
+ this.cached_1 = true;
180
+ this.headers_1 = emptyMap();
181
+ this.timeout_1 = get_DEFAULT_TIMEOUT();
182
+ this.retryEvery_1 = null;
178
183
  }
179
184
  headers(value) {
180
185
  // Inline function 'kotlin.apply' call
181
- this.f5d_1 = value;
186
+ this.headers_1 = value;
182
187
  return this;
183
188
  }
184
189
  header(name, value) {
185
190
  // Inline function 'kotlin.apply' call
186
- this.f5d_1 = plus(this.f5d_1, to(name, value));
191
+ this.headers_1 = plus(this.headers_1, to(name, value));
187
192
  return this;
188
193
  }
189
194
  cached(value) {
190
195
  // Inline function 'kotlin.apply' call
191
- this.e5d_1 = value;
196
+ this.cached_1 = value;
192
197
  return this;
193
198
  }
194
199
  timeout(value) {
195
200
  // Inline function 'kotlin.apply' call
196
- this.g5d_1 = value;
201
+ this.timeout_1 = value;
197
202
  return this;
198
203
  }
199
204
  timeoutSeconds(value) {
@@ -201,12 +206,12 @@ class AttoWorkerAsyncBuilder {
201
206
  var tmp = this;
202
207
  // Inline function 'kotlin.time.Companion.seconds' call
203
208
  Companion_getInstance();
204
- tmp.g5d_1 = toDuration_0(value, DurationUnit_SECONDS_getInstance());
209
+ tmp.timeout_1 = toDuration_0(value, DurationUnit_SECONDS_getInstance());
205
210
  return this;
206
211
  }
207
212
  retryEvery(value) {
208
213
  // Inline function 'kotlin.apply' call
209
- this.h5d_1 = value;
214
+ this.retryEvery_1 = value;
210
215
  return this;
211
216
  }
212
217
  retryEverySeconds(value) {
@@ -214,22 +219,22 @@ class AttoWorkerAsyncBuilder {
214
219
  var tmp = this;
215
220
  // Inline function 'kotlin.time.Companion.seconds' call
216
221
  Companion_getInstance();
217
- tmp.h5d_1 = toDuration_0(value, DurationUnit_SECONDS_getInstance());
222
+ tmp.retryEvery_1 = toDuration_0(value, DurationUnit_SECONDS_getInstance());
218
223
  return this;
219
224
  }
220
225
  build() {
221
226
  var tmp = Companion_instance;
222
- var tmp_0 = this.g5d_1;
227
+ var tmp_0 = this.timeout_1;
223
228
  // Inline function 'kotlin.let' call
224
- var it = remote(tmp, this.d5d_1, tmp_0, AttoWorkerAsyncBuilder$build$slambda(this));
229
+ var it = remote(tmp, this.url_1, tmp_0, AttoWorkerAsyncBuilder$build$slambda(this));
225
230
  var tmp_1;
226
- if (this.e5d_1) {
231
+ if (this.cached_1) {
227
232
  tmp_1 = cached(it);
228
233
  } else {
229
234
  tmp_1 = it;
230
235
  }
231
236
  var tmp$ret$0 = tmp_1;
232
- return toAsync(tmp$ret$0, Dispatchers_getInstance().q32_1);
237
+ return toAsync(tmp$ret$0, Dispatchers_getInstance().Default_1);
233
238
  }
234
239
  }
235
240
  //endregion
@@ -251,14 +256,14 @@ function remote(_this__u8e3s4, url, timeout, headerProvider) {
251
256
  return new WorkerRemote(url, timeout, headerProvider);
252
257
  }
253
258
  function WorkerRemote$_init_$slambda_6gmo0o() {
254
- return constructCallableReference(function *($completion) {
259
+ return constructCallableReference(($completion) => orPromise($completion, function *($completion) {
255
260
  return emptyMap();
256
- }, 0);
261
+ }), 0);
257
262
  }
258
263
  function remote$slambda() {
259
- return constructCallableReference(function *($completion) {
264
+ return constructCallableReference(($completion) => orPromise($completion, function *($completion) {
260
265
  return emptyMap();
261
- }, 0);
266
+ }), 0);
262
267
  }
263
268
  var properties_initialized_AttoWorkerRemote_kt_o3uktw;
264
269
  function _init_properties_AttoWorkerRemote_kt__jggsya() {
@@ -270,13 +275,13 @@ function _init_properties_AttoWorkerRemote_kt__jggsya() {
270
275
  }
271
276
  }
272
277
  function AttoWorkerAsyncBuilder$build$slambda(this$0) {
273
- return constructCallableReference(function *($completion) {
274
- return this$0.f5d_1;
275
- }, 0);
278
+ return constructCallableReference(($completion) => orPromise($completion, function *($completion) {
279
+ return this$0.headers_1;
280
+ }), 0);
276
281
  }
277
282
  //region block: post-declaration
278
- protoOf(WorkerRemote).n3j = work;
279
- protoOf(WorkerRemote).o3j = work_0;
283
+ protoOf(WorkerRemote).work_qtc4fi_k$ = work;
284
+ protoOf(WorkerRemote).work_uniq4r_k$ = work_0;
280
285
  initMetadataForClass(WorkerRemote, 'WorkerRemote', VOID, VOID, [AttoWorkerOperations], [2, 1, 3]);
281
286
  initMetadataForClass(AttoWorkerAsyncBuilder, 'AttoWorkerAsyncBuilder');
282
287
  //endregion
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../commons-worker-remote/src/commonMain/kotlin/cash/atto/commons/worker/AttoWorkerRemote.kt","../../../../../commons-transport/src/commonMain/kotlin/cash/atto/commons/transport/AttoHttpTransport.kt","../../../../../../../../../../mnt/agent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/request/builders.kt","../../../../../../../../../../mnt/agent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/request/RequestBody.kt","../../../../../../../../../../mnt/agent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/reflect/Type.kt","../../../../../../../../../../mnt/agent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/call/HttpClientCall.kt","../../../../../commons-npm-bundle/build/compileSync/js/main/productionLibrary/kotlin/src/kotlin/util/Preconditions.kt","../../../../../commons-worker-remote/src/webMain/kotlin/cash/atto/commons/worker/AttoWorkerAsyncBuilder.web.kt","../../../../../commons-npm-bundle/build/compileSync/js/main/productionLibrary/kotlin/src/kotlin/time/Duration.kt","../../../../../commons-npm-bundle/build/compileSync/js/main/productionLibrary/kotlin/src/kotlin/util/Standard.kt"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null],"ignoreList":[],"x_google_ignoreList":[],"names":["url","timeout","headerProvider","work","threshold","target","$completion","request","builder","<unused var>","response","message","close","headers","value","header","name","cached","timeoutSeconds","retryEvery","retryEverySeconds","build","<get-DEFAULT_TIMEOUT>","remote","<this>","WorkerRemote$<init>$slambda","WorkerRemote$<init>$slambda$lambda","remote$slambda","remote$slambda$lambda","<init properties AttoWorkerRemote.kt>","AttoWorkerAsyncBuilder$build$slambda","AttoWorkerAsyncBuilder$build$slambda$lambda"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAaIA,G,EACQC,O,EACRC,c;iCADgC,qB;;;YACoB,oC;;;;;IADpD,oB;IAGwB,mCAAkB,GAAlB,EAAuB,cAAvB,C;;MAEPC,CACbC,S,EACAC,M,EAFaC,WAAAH,EAGH;A,IAAA,8B;EAA0B,C;MAEvBA,CAASI,O,EAATD,WAAAH,EAA+E;A,eAExF,I,CAAA,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EAfrE,C;C;uBA8CwDC,CAAAA,E;8CAAAC,CAAAtB,WAAAsB,EAAA;A,IAAY,OAAV,U;EAAW,C,EA9CrE,C;C;;qDAAAC,CAAAA,E;;;;;sBQmMwD,WRzLf,CQyLe,EAAwB,kCAAxB,C;;C;6CDhKLC,C,MAAAA,E;8CAAAC,CAAAzB,WAAAyB,EAAA;A,IAAS,OAAP,MAAO,CAAP,K;EAAQ,C,EAnC7D,C;C;;;;;;;;;;;"}
1
+ {"version":3,"sources":["NATIVE_IMPLEMENTATIONS.kt","../../../../../commons-worker-remote/src/commonMain/kotlin/cash/atto/commons/worker/AttoWorkerRemote.kt","../../../../../commons-transport/src/commonMain/kotlin/cash/atto/commons/transport/AttoHttpTransport.kt","../../../../../../../../../../../../mnt/agent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/request/builders.kt","../../../../../../../../../../../../mnt/agent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/request/RequestBody.kt","../../../../../../../../../../../../mnt/agent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/reflect/Type.kt","../../../../../../../../../../../../mnt/agent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/call/HttpClientCall.kt","src/kotlin/util/Preconditions.kt","../../../../../commons-worker-remote/src/webMain/kotlin/cash/atto/commons/worker/AttoWorkerAsyncBuilder.web.kt","src/kotlin/time/Duration.kt","src/kotlin/util/Standard.kt"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null],"ignoreList":[0],"x_google_ignoreList":[0],"names":["url","work","threshold","target","request","builder","response","message","close","headers","value","header","name","cached","timeout","timeoutSeconds","retryEvery","retryEverySeconds","build","remote","<this>","$"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCaIA,G,EDbJ,O,EAAA,c;iCCcoC,qB;QDdpC,G;;YCewD,oC;;;;;IADpD,wB;IAGwB,yC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