@attocash/commons-js 6.0.0 → 6.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.
@@ -14,10 +14,6 @@ import { get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED } from
14
14
  import { THROW_CCE2g6jy02ryeudk as THROW_CCE } from '../../../../../kotlin-kotlin-stdlib/kotlin/hacks.mjs';
15
15
  import { isInterface3d6p8outrmvmk as isInterface } from '../../../../../kotlin-kotlin-stdlib/kotlin/js/typeCheckUtils.mjs';
16
16
  import { readUTF8Lineygmlhrpm9syq as readUTF8Line } from '../../../../../ktor-ktor-io/io/ktor/utils/io/ByteReadChannelOperations.mjs';
17
- import {
18
- Default_getInstance363hicrc7jsft as Default_getInstance,
19
- Jsonsmkyu9xjl7fv as Json,
20
- } from '../../../../../kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/Json.mjs';
21
17
  import { AttoAccountgigli120r8kv as AttoAccount } from '../../../../../commons-commons-core/cash/atto/commons/AttoAccount.mjs';
22
18
  import { serializer1i4e9ym37oxmo as serializer } from '../../../../../kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/Serializers.mjs';
23
19
  import { KSerializerzf77vz1967fq as KSerializer } from '../../../../../kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/KSerializer.mjs';
@@ -28,10 +24,11 @@ import {
28
24
  headers24pki7ce1busg as headers,
29
25
  } from '../../../../../ktor-ktor-client-core/io/ktor/client/request/HttpRequest.mjs';
30
26
  import {
31
- timeout39ggydbhmf7b9 as timeout,
32
- get_HttpTimeout3mcrbvfnvmyx2 as get_HttpTimeout,
33
- } from '../../../../../ktor-ktor-client-core/io/ktor/client/plugins/HttpTimeout.mjs';
34
- import { Companion_getInstance1p3cpld7r1jz3 as Companion_getInstance } from '../../../../../ktor-ktor-http/io/ktor/http/HttpMethod.mjs';
27
+ Companion_getInstance3vz87v4c01z2t as Companion_getInstance,
28
+ toDuration7gy6v749ektt as toDuration,
29
+ _Duration___get_inWholeMilliseconds__impl__msfiry1byvgyrhm5g4a as _Duration___get_inWholeMilliseconds__impl__msfiry,
30
+ } from '../../../../../kotlin-kotlin-stdlib/kotlin/time/Duration.mjs';
31
+ import { Companion_getInstance1p3cpld7r1jz3 as Companion_getInstance_0 } from '../../../../../ktor-ktor-http/io/ktor/http/HttpMethod.mjs';
35
32
  import { HttpStatement3zxb33q8lku as HttpStatement } from '../../../../../ktor-ktor-client-core/io/ktor/client/statement/HttpStatement.mjs';
36
33
  import { suspendOrReturn49pspzlx5djv as suspendOrReturn } from '../../../../../kotlin-kotlin-stdlib/kotlin/coroutines/intrinsics/IntrinsicsJs.mjs';
37
34
  import {
@@ -42,8 +39,6 @@ import {
42
39
  initMetadataForLambda3af3he42mmnh as initMetadataForLambda,
43
40
  initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
44
41
  } from '../../../../../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs';
45
- import { Application_getInstanceq87g3bor693u as Application_getInstance } from '../../../../../ktor-ktor-http/io/ktor/http/ContentTypes.mjs';
46
- import { contentType1lwcfjsjo0z8g as contentType } from '../../../../../ktor-ktor-http/io/ktor/http/HttpMessageProperties.mjs';
47
42
  import { PrimitiveClasses_getInstance2v63zn04dtq03 as PrimitiveClasses_getInstance } from '../../../../../kotlin-kotlin-stdlib/kotlin/reflect/js/internal/primitives.mjs';
48
43
  import {
49
44
  OutgoingContent3t2ohmyam9o76 as OutgoingContent,
@@ -52,7 +47,17 @@ import {
52
47
  import { AttoReceivable1xbn2f5t545d2 as AttoReceivable } from '../../../../../commons-commons-core/cash/atto/commons/AttoReceivable.mjs';
53
48
  import { AttoAccountEntry3jl7ttc9zh04x as AttoAccountEntry } from '../../../../../commons-commons-core/cash/atto/commons/AttoAccountEntry.mjs';
54
49
  import { AttoTransaction14p2u1c57z17z as AttoTransaction } from '../../../../../commons-commons-core/cash/atto/commons/AttoTransaction.mjs';
55
- import { Companion_getInstanceud97dyzf471m as Companion_getInstance_0 } from '../../../../../ktor-ktor-http/io/ktor/http/HttpStatusCode.mjs';
50
+ import { Application_getInstanceq87g3bor693u as Application_getInstance } from '../../../../../ktor-ktor-http/io/ktor/http/ContentTypes.mjs';
51
+ import { contentType1lwcfjsjo0z8g as contentType } from '../../../../../ktor-ktor-http/io/ktor/http/HttpMessageProperties.mjs';
52
+ import {
53
+ timeout39ggydbhmf7b9 as timeout,
54
+ get_HttpTimeout3mcrbvfnvmyx2 as get_HttpTimeout,
55
+ } from '../../../../../ktor-ktor-client-core/io/ktor/client/plugins/HttpTimeout.mjs';
56
+ import {
57
+ DurationUnit_SECONDS_getInstance3jias9ne5z4er as DurationUnit_SECONDS_getInstance,
58
+ DurationUnit_MINUTES_getInstancejlptjvjgjkm8 as DurationUnit_MINUTES_getInstance,
59
+ } from '../../../../../kotlin-kotlin-stdlib/kotlin/time/DurationUnitJs.mjs';
60
+ import { Companion_getInstanceud97dyzf471m as Companion_getInstance_1 } from '../../../../../ktor-ktor-http/io/ktor/http/HttpStatusCode.mjs';
56
61
  import { ClientRequestExceptionj69ilxf38oeq as ClientRequestException } from '../../../../../ktor-ktor-client-core/io/ktor/client/plugins/DefaultResponseValidation.mjs';
57
62
  import {
58
63
  AccountSearch2mwh4um1wt8t0 as AccountSearch,
@@ -61,16 +66,11 @@ import {
61
66
  AttoNodeOperations2ltve6dru3dak as AttoNodeOperations,
62
67
  } from '../../../../../commons-commons-node/cash/atto/commons/node/AttoNodeOperations.mjs';
63
68
  import { Collection1k04j3hzsbod0 as Collection } from '../../../../../kotlin-kotlin-stdlib/kotlin/collections/Collections.mjs';
64
- import { emptyMapr06gerzljqtm as emptyMap } from '../../../../../kotlin-kotlin-stdlib/kotlin/collections/Maps.mjs';
65
69
  import {
66
- Companion_getInstance3vz87v4c01z2t as Companion_getInstance_1,
67
- toDuration7gy6v749ektt as toDuration,
68
- _Duration___get_inWholeMilliseconds__impl__msfiry1byvgyrhm5g4a as _Duration___get_inWholeMilliseconds__impl__msfiry,
69
- } from '../../../../../kotlin-kotlin-stdlib/kotlin/time/Duration.mjs';
70
- import {
71
- DurationUnit_SECONDS_getInstance3jias9ne5z4er as DurationUnit_SECONDS_getInstance,
72
- DurationUnit_MINUTES_getInstancejlptjvjgjkm8 as DurationUnit_MINUTES_getInstance,
73
- } from '../../../../../kotlin-kotlin-stdlib/kotlin/time/DurationUnitJs.mjs';
70
+ Default_getInstance363hicrc7jsft as Default_getInstance,
71
+ Jsonsmkyu9xjl7fv as Json,
72
+ } from '../../../../../kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/Json.mjs';
73
+ import { emptyMapr06gerzljqtm as emptyMap } from '../../../../../kotlin-kotlin-stdlib/kotlin/collections/Maps.mjs';
74
74
  import { FlowCollector26clgpmzihvke as FlowCollector } from '../../../../../kotlinx-coroutines-core/kotlinx/coroutines/flow/FlowCollector.mjs';
75
75
  import { flow3tazazxj2t7g4 as flow } from '../../../../../kotlinx-coroutines-core/kotlinx/coroutines/flow/Builders.mjs';
76
76
  import { firstvh3bah3c9r20 as first } from '../../../../../kotlinx-coroutines-core/kotlinx/coroutines/flow/Reduce.mjs';
@@ -83,6 +83,11 @@ import { HttpClient3584jcajl7sef as HttpClient } from '../../../../../ktor-ktor-
83
83
  //endregion
84
84
  //region block: pre-declaration
85
85
  //endregion
86
+ function get_json() {
87
+ _init_properties_AttoNodeClientRemote_kt__nmpoap();
88
+ return json_0;
89
+ }
90
+ var json_0;
86
91
  function get_httpClient() {
87
92
  _init_properties_AttoNodeClientRemote_kt__nmpoap();
88
93
  return httpClient;
@@ -124,21 +129,22 @@ function *_generator_invoke__zhh2q8($this, response, $completion) {
124
129
  if (tmp_3 === get_COROUTINE_SUSPENDED())
125
130
  tmp_3 = yield tmp_3;
126
131
  var tmp_4 = tmp_3;
127
- var channel = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
128
- while (!channel.l3u()) {
129
- var tmp_5 = readUTF8Line(channel, VOID, $completion);
132
+ // Inline function 'cash.atto.commons.node.readStream' call
133
+ var this_0 = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
134
+ while (!this_0.l3u()) {
135
+ var tmp_5 = readUTF8Line(this_0, VOID, $completion);
130
136
  if (tmp_5 === get_COROUTINE_SUSPENDED())
131
137
  tmp_5 = yield tmp_5;
132
- var json = tmp_5;
133
- if (!(json == null)) {
138
+ var value = tmp_5;
139
+ if (!(value == null)) {
134
140
  // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
135
- var this_0 = Default_getInstance();
141
+ var this_1 = get_json();
136
142
  // Inline function 'kotlinx.serialization.serializer' call
137
- var this_1 = this_0.v1p();
143
+ var this_2 = this_1.v1p();
138
144
  // Inline function 'kotlinx.serialization.internal.cast' call
139
- var this_2 = serializer(this_1, createKType(getKClass(AttoAccount()), arrayOf([]), false));
140
- var tmp$ret$4 = isInterface(this_2, KSerializer()) ? this_2 : THROW_CCE();
141
- var item = this_0.c1m(tmp$ret$4, json);
145
+ var this_3 = serializer(this_2, createKType(getKClass(AttoAccount()), arrayOf([]), false));
146
+ var tmp$ret$4 = isInterface(this_3, KSerializer()) ? this_3 : THROW_CCE();
147
+ var item = this_1.c1m(tmp$ret$4, value);
142
148
  var tmp_6 = $this.a58_1.j1a(item, $completion);
143
149
  if (tmp_6 === get_COROUTINE_SUSPENDED())
144
150
  tmp_6 = yield tmp_6;
@@ -150,7 +156,7 @@ function *_generator_invoke__zhh2q8_0($this, $this$flow, $completion) {
150
156
  var tmp = $this.d58_1.c58_1($completion);
151
157
  if (tmp === get_COROUTINE_SUSPENDED())
152
158
  tmp = yield tmp;
153
- var headers_0 = tmp;
159
+ var headers = tmp;
154
160
  var tmp0 = get_httpClient();
155
161
  // Inline function 'io.ktor.client.request.prepareGet' call
156
162
  var urlString = $this.d58_1.b58_1 + '/' + $this.e58_1;
@@ -158,10 +164,9 @@ function *_generator_invoke__zhh2q8_0($this, $this$flow, $completion) {
158
164
  // Inline function 'kotlin.apply' call
159
165
  var this_0 = new (HttpRequestBuilder())();
160
166
  url(this_0, urlString);
161
- timeout(this_0, AttoNodeClientRemote$accountStream$slambda$lambda);
162
- headers(this_0, AttoNodeClientRemote$accountStream$slambda$lambda_0(headers_0));
167
+ configure($this.d58_1, this_0, headers, 'application/x-ndjson', Companion_getInstance().wo_1);
163
168
  // Inline function 'io.ktor.client.request.prepareGet' call
164
- this_0.c4o_1 = Companion_getInstance().j4b_1;
169
+ this_0.c4o_1 = Companion_getInstance_0().j4b_1;
165
170
  // Inline function 'io.ktor.client.request.prepareRequest' call
166
171
  var tmp_0 = new (HttpStatement())(this_0, tmp0);
167
172
  var tmp_1 = tmp_0.s54(AttoNodeClientRemote$accountStream$slambda$slambda_0($this$flow), $completion);
@@ -169,27 +174,6 @@ function *_generator_invoke__zhh2q8_0($this, $this$flow, $completion) {
169
174
  tmp_1 = yield tmp_1;
170
175
  return Unit_instance;
171
176
  }
172
- function AttoNodeClientRemote$accountStream$slambda$lambda($this$timeout) {
173
- $this$timeout.s50(9223372036854775807n);
174
- return Unit_instance;
175
- }
176
- function AttoNodeClientRemote$accountStream$slambda$lambda_0($headers) {
177
- return ($this$headers) => {
178
- // Inline function 'kotlin.collections.forEach' call
179
- // Inline function 'kotlin.collections.iterator' call
180
- var _iterator__ex2g4s = $headers.x1().k1();
181
- while (_iterator__ex2g4s.l1()) {
182
- var element = _iterator__ex2g4s.m1();
183
- // Inline function 'kotlin.collections.component1' call
184
- var key = element.y1();
185
- // Inline function 'kotlin.collections.component2' call
186
- var value = element.z1();
187
- $this$headers.q3z(key, value);
188
- }
189
- $this$headers.q3z('Accept', 'application/x-ndjson');
190
- return Unit_instance;
191
- };
192
- }
193
177
  var AttoNodeClientRemote$accountStream$slambda$slambdaClass;
194
178
  function AttoNodeClientRemote$accountStream$slambda$slambda() {
195
179
  if (AttoNodeClientRemote$accountStream$slambda$slambdaClass === VOID) {
@@ -240,21 +224,22 @@ function *_generator_invoke__zhh2q8_1($this, response, $completion) {
240
224
  if (tmp_3 === get_COROUTINE_SUSPENDED())
241
225
  tmp_3 = yield tmp_3;
242
226
  var tmp_4 = tmp_3;
243
- var channel = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
244
- while (!channel.l3u()) {
245
- var tmp_5 = readUTF8Line(channel, VOID, $completion);
227
+ // Inline function 'cash.atto.commons.node.readStream' call
228
+ var this_0 = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
229
+ while (!this_0.l3u()) {
230
+ var tmp_5 = readUTF8Line(this_0, VOID, $completion);
246
231
  if (tmp_5 === get_COROUTINE_SUSPENDED())
247
232
  tmp_5 = yield tmp_5;
248
- var json = tmp_5;
249
- if (!(json == null)) {
233
+ var value = tmp_5;
234
+ if (!(value == null)) {
250
235
  // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
251
- var this_0 = Default_getInstance();
236
+ var this_1 = get_json();
252
237
  // Inline function 'kotlinx.serialization.serializer' call
253
- var this_1 = this_0.v1p();
238
+ var this_2 = this_1.v1p();
254
239
  // Inline function 'kotlinx.serialization.internal.cast' call
255
- var this_2 = serializer(this_1, createKType(getKClass(AttoAccount()), arrayOf([]), false));
256
- var tmp$ret$4 = isInterface(this_2, KSerializer()) ? this_2 : THROW_CCE();
257
- var item = this_0.c1m(tmp$ret$4, json);
240
+ var this_3 = serializer(this_2, createKType(getKClass(AttoAccount()), arrayOf([]), false));
241
+ var tmp$ret$4 = isInterface(this_3, KSerializer()) ? this_3 : THROW_CCE();
242
+ var item = this_1.c1m(tmp$ret$4, value);
258
243
  var tmp_6 = $this.f58_1.j1a(item, $completion);
259
244
  if (tmp_6 === get_COROUTINE_SUSPENDED())
260
245
  tmp_6 = yield tmp_6;
@@ -266,18 +251,16 @@ function *_generator_invoke__zhh2q8_2($this, $this$flow, $completion) {
266
251
  var tmp = $this.g58_1.c58_1($completion);
267
252
  if (tmp === get_COROUTINE_SUSPENDED())
268
253
  tmp = yield tmp;
269
- var headers_0 = tmp;
254
+ var headers = tmp;
270
255
  var tmp0 = get_httpClient();
271
256
  // Inline function 'io.ktor.client.request.preparePost' call
272
257
  var urlString = $this.g58_1.b58_1 + '/' + $this.h58_1;
273
258
  // Inline function 'io.ktor.client.request.preparePost' call
274
259
  var builder = new (HttpRequestBuilder())();
275
- builder.c4o_1 = Companion_getInstance().k4b_1;
260
+ builder.c4o_1 = Companion_getInstance_0().k4b_1;
276
261
  // Inline function 'kotlin.apply' call
277
262
  url(builder, urlString);
278
- timeout(builder, AttoNodeClientRemote$accountStream$slambda$lambda_1);
279
- headers(builder, AttoNodeClientRemote$accountStream$slambda$lambda_2(headers_0));
280
- contentType(builder, Application_getInstance().q44_1);
263
+ configure($this.g58_1, builder, headers, 'application/x-ndjson', Companion_getInstance().wo_1);
281
264
  // Inline function 'io.ktor.client.request.setBody' call
282
265
  var body = $this.i58_1;
283
266
  if (body == null) {
@@ -335,27 +318,6 @@ function *_generator_invoke__zhh2q8_2($this, $this$flow, $completion) {
335
318
  tmp_7 = yield tmp_7;
336
319
  return Unit_instance;
337
320
  }
338
- function AttoNodeClientRemote$accountStream$slambda$lambda_1($this$timeout) {
339
- $this$timeout.s50(9223372036854775807n);
340
- return Unit_instance;
341
- }
342
- function AttoNodeClientRemote$accountStream$slambda$lambda_2($headers) {
343
- return ($this$headers) => {
344
- // Inline function 'kotlin.collections.forEach' call
345
- // Inline function 'kotlin.collections.iterator' call
346
- var _iterator__ex2g4s = $headers.x1().k1();
347
- while (_iterator__ex2g4s.l1()) {
348
- var element = _iterator__ex2g4s.m1();
349
- // Inline function 'kotlin.collections.component1' call
350
- var key = element.y1();
351
- // Inline function 'kotlin.collections.component2' call
352
- var value = element.z1();
353
- $this$headers.q3z(key, value);
354
- }
355
- $this$headers.q3z('Accept', 'application/x-ndjson');
356
- return Unit_instance;
357
- };
358
- }
359
321
  var AttoNodeClientRemote$accountStream$slambda$slambdaClass_0;
360
322
  function AttoNodeClientRemote$accountStream$slambda$slambda_1() {
361
323
  if (AttoNodeClientRemote$accountStream$slambda$slambdaClass_0 === VOID) {
@@ -406,21 +368,22 @@ function *_generator_invoke__zhh2q8_3($this, response, $completion) {
406
368
  if (tmp_3 === get_COROUTINE_SUSPENDED())
407
369
  tmp_3 = yield tmp_3;
408
370
  var tmp_4 = tmp_3;
409
- var channel = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
410
- while (!channel.l3u()) {
411
- var tmp_5 = readUTF8Line(channel, VOID, $completion);
371
+ // Inline function 'cash.atto.commons.node.readStream' call
372
+ var this_0 = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
373
+ while (!this_0.l3u()) {
374
+ var tmp_5 = readUTF8Line(this_0, VOID, $completion);
412
375
  if (tmp_5 === get_COROUTINE_SUSPENDED())
413
376
  tmp_5 = yield tmp_5;
414
- var json = tmp_5;
415
- if (!(json == null)) {
377
+ var value = tmp_5;
378
+ if (!(value == null)) {
416
379
  // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
417
- var this_0 = Default_getInstance();
380
+ var this_1 = get_json();
418
381
  // Inline function 'kotlinx.serialization.serializer' call
419
- var this_1 = this_0.v1p();
382
+ var this_2 = this_1.v1p();
420
383
  // Inline function 'kotlinx.serialization.internal.cast' call
421
- var this_2 = serializer(this_1, createKType(getKClass(AttoReceivable()), arrayOf([]), false));
422
- var tmp$ret$4 = isInterface(this_2, KSerializer()) ? this_2 : THROW_CCE();
423
- var item = this_0.c1m(tmp$ret$4, json);
384
+ var this_3 = serializer(this_2, createKType(getKClass(AttoReceivable()), arrayOf([]), false));
385
+ var tmp$ret$4 = isInterface(this_3, KSerializer()) ? this_3 : THROW_CCE();
386
+ var item = this_1.c1m(tmp$ret$4, value);
424
387
  var tmp_6 = $this.j58_1.j1a(item, $completion);
425
388
  if (tmp_6 === get_COROUTINE_SUSPENDED())
426
389
  tmp_6 = yield tmp_6;
@@ -432,7 +395,7 @@ function *_generator_invoke__zhh2q8_4($this, $this$flow, $completion) {
432
395
  var tmp = $this.k58_1.c58_1($completion);
433
396
  if (tmp === get_COROUTINE_SUSPENDED())
434
397
  tmp = yield tmp;
435
- var headers_0 = tmp;
398
+ var headers = tmp;
436
399
  var tmp0 = get_httpClient();
437
400
  // Inline function 'io.ktor.client.request.prepareGet' call
438
401
  var urlString = $this.k58_1.b58_1 + '/' + $this.l58_1;
@@ -440,10 +403,9 @@ function *_generator_invoke__zhh2q8_4($this, $this$flow, $completion) {
440
403
  // Inline function 'kotlin.apply' call
441
404
  var this_0 = new (HttpRequestBuilder())();
442
405
  url(this_0, urlString);
443
- timeout(this_0, AttoNodeClientRemote$receivableStream$slambda$lambda);
444
- headers(this_0, AttoNodeClientRemote$receivableStream$slambda$lambda_0(headers_0));
406
+ configure($this.k58_1, this_0, headers, 'application/x-ndjson', Companion_getInstance().wo_1);
445
407
  // Inline function 'io.ktor.client.request.prepareGet' call
446
- this_0.c4o_1 = Companion_getInstance().j4b_1;
408
+ this_0.c4o_1 = Companion_getInstance_0().j4b_1;
447
409
  // Inline function 'io.ktor.client.request.prepareRequest' call
448
410
  var tmp_0 = new (HttpStatement())(this_0, tmp0);
449
411
  var tmp_1 = tmp_0.s54(AttoNodeClientRemote$receivableStream$slambda$slambda_0($this$flow), $completion);
@@ -451,27 +413,6 @@ function *_generator_invoke__zhh2q8_4($this, $this$flow, $completion) {
451
413
  tmp_1 = yield tmp_1;
452
414
  return Unit_instance;
453
415
  }
454
- function AttoNodeClientRemote$receivableStream$slambda$lambda($this$timeout) {
455
- $this$timeout.s50(9223372036854775807n);
456
- return Unit_instance;
457
- }
458
- function AttoNodeClientRemote$receivableStream$slambda$lambda_0($headers) {
459
- return ($this$headers) => {
460
- // Inline function 'kotlin.collections.forEach' call
461
- // Inline function 'kotlin.collections.iterator' call
462
- var _iterator__ex2g4s = $headers.x1().k1();
463
- while (_iterator__ex2g4s.l1()) {
464
- var element = _iterator__ex2g4s.m1();
465
- // Inline function 'kotlin.collections.component1' call
466
- var key = element.y1();
467
- // Inline function 'kotlin.collections.component2' call
468
- var value = element.z1();
469
- $this$headers.q3z(key, value);
470
- }
471
- $this$headers.q3z('Accept', 'application/x-ndjson');
472
- return Unit_instance;
473
- };
474
- }
475
416
  var AttoNodeClientRemote$receivableStream$slambda$slambdaClass;
476
417
  function AttoNodeClientRemote$receivableStream$slambda$slambda() {
477
418
  if (AttoNodeClientRemote$receivableStream$slambda$slambdaClass === VOID) {
@@ -522,21 +463,22 @@ function *_generator_invoke__zhh2q8_5($this, response, $completion) {
522
463
  if (tmp_3 === get_COROUTINE_SUSPENDED())
523
464
  tmp_3 = yield tmp_3;
524
465
  var tmp_4 = tmp_3;
525
- var channel = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
526
- while (!channel.l3u()) {
527
- var tmp_5 = readUTF8Line(channel, VOID, $completion);
466
+ // Inline function 'cash.atto.commons.node.readStream' call
467
+ var this_0 = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
468
+ while (!this_0.l3u()) {
469
+ var tmp_5 = readUTF8Line(this_0, VOID, $completion);
528
470
  if (tmp_5 === get_COROUTINE_SUSPENDED())
529
471
  tmp_5 = yield tmp_5;
530
- var json = tmp_5;
531
- if (!(json == null)) {
472
+ var value = tmp_5;
473
+ if (!(value == null)) {
532
474
  // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
533
- var this_0 = Default_getInstance();
475
+ var this_1 = get_json();
534
476
  // Inline function 'kotlinx.serialization.serializer' call
535
- var this_1 = this_0.v1p();
477
+ var this_2 = this_1.v1p();
536
478
  // Inline function 'kotlinx.serialization.internal.cast' call
537
- var this_2 = serializer(this_1, createKType(getKClass(AttoReceivable()), arrayOf([]), false));
538
- var tmp$ret$4 = isInterface(this_2, KSerializer()) ? this_2 : THROW_CCE();
539
- var item = this_0.c1m(tmp$ret$4, json);
479
+ var this_3 = serializer(this_2, createKType(getKClass(AttoReceivable()), arrayOf([]), false));
480
+ var tmp$ret$4 = isInterface(this_3, KSerializer()) ? this_3 : THROW_CCE();
481
+ var item = this_1.c1m(tmp$ret$4, value);
540
482
  var tmp_6 = $this.m58_1.j1a(item, $completion);
541
483
  if (tmp_6 === get_COROUTINE_SUSPENDED())
542
484
  tmp_6 = yield tmp_6;
@@ -548,18 +490,16 @@ function *_generator_invoke__zhh2q8_6($this, $this$flow, $completion) {
548
490
  var tmp = $this.n58_1.c58_1($completion);
549
491
  if (tmp === get_COROUTINE_SUSPENDED())
550
492
  tmp = yield tmp;
551
- var headers_0 = tmp;
493
+ var headers = tmp;
552
494
  var tmp0 = get_httpClient();
553
495
  // Inline function 'io.ktor.client.request.preparePost' call
554
496
  var urlString = $this.n58_1.b58_1 + '/' + $this.o58_1;
555
497
  // Inline function 'io.ktor.client.request.preparePost' call
556
498
  var builder = new (HttpRequestBuilder())();
557
- builder.c4o_1 = Companion_getInstance().k4b_1;
499
+ builder.c4o_1 = Companion_getInstance_0().k4b_1;
558
500
  // Inline function 'kotlin.apply' call
559
501
  url(builder, urlString);
560
- timeout(builder, AttoNodeClientRemote$receivableStream$slambda$lambda_1);
561
- headers(builder, AttoNodeClientRemote$receivableStream$slambda$lambda_2(headers_0));
562
- contentType(builder, Application_getInstance().q44_1);
502
+ configure($this.n58_1, builder, headers, 'application/x-ndjson', Companion_getInstance().wo_1);
563
503
  // Inline function 'io.ktor.client.request.setBody' call
564
504
  var body = $this.p58_1;
565
505
  if (body == null) {
@@ -617,27 +557,6 @@ function *_generator_invoke__zhh2q8_6($this, $this$flow, $completion) {
617
557
  tmp_7 = yield tmp_7;
618
558
  return Unit_instance;
619
559
  }
620
- function AttoNodeClientRemote$receivableStream$slambda$lambda_1($this$timeout) {
621
- $this$timeout.s50(9223372036854775807n);
622
- return Unit_instance;
623
- }
624
- function AttoNodeClientRemote$receivableStream$slambda$lambda_2($headers) {
625
- return ($this$headers) => {
626
- // Inline function 'kotlin.collections.forEach' call
627
- // Inline function 'kotlin.collections.iterator' call
628
- var _iterator__ex2g4s = $headers.x1().k1();
629
- while (_iterator__ex2g4s.l1()) {
630
- var element = _iterator__ex2g4s.m1();
631
- // Inline function 'kotlin.collections.component1' call
632
- var key = element.y1();
633
- // Inline function 'kotlin.collections.component2' call
634
- var value = element.z1();
635
- $this$headers.q3z(key, value);
636
- }
637
- $this$headers.q3z('Accept', 'application/x-ndjson');
638
- return Unit_instance;
639
- };
640
- }
641
560
  var AttoNodeClientRemote$receivableStream$slambda$slambdaClass_0;
642
561
  function AttoNodeClientRemote$receivableStream$slambda$slambda_1() {
643
562
  if (AttoNodeClientRemote$receivableStream$slambda$slambdaClass_0 === VOID) {
@@ -688,21 +607,22 @@ function *_generator_invoke__zhh2q8_7($this, response, $completion) {
688
607
  if (tmp_3 === get_COROUTINE_SUSPENDED())
689
608
  tmp_3 = yield tmp_3;
690
609
  var tmp_4 = tmp_3;
691
- var channel = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
692
- while (!channel.l3u()) {
693
- var tmp_5 = readUTF8Line(channel, VOID, $completion);
610
+ // Inline function 'cash.atto.commons.node.readStream' call
611
+ var this_0 = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
612
+ while (!this_0.l3u()) {
613
+ var tmp_5 = readUTF8Line(this_0, VOID, $completion);
694
614
  if (tmp_5 === get_COROUTINE_SUSPENDED())
695
615
  tmp_5 = yield tmp_5;
696
- var json = tmp_5;
697
- if (!(json == null)) {
616
+ var value = tmp_5;
617
+ if (!(value == null)) {
698
618
  // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
699
- var this_0 = Default_getInstance();
619
+ var this_1 = get_json();
700
620
  // Inline function 'kotlinx.serialization.serializer' call
701
- var this_1 = this_0.v1p();
621
+ var this_2 = this_1.v1p();
702
622
  // Inline function 'kotlinx.serialization.internal.cast' call
703
- var this_2 = serializer(this_1, createKType(getKClass(AttoAccountEntry()), arrayOf([]), false));
704
- var tmp$ret$4 = isInterface(this_2, KSerializer()) ? this_2 : THROW_CCE();
705
- var item = this_0.c1m(tmp$ret$4, json);
623
+ var this_3 = serializer(this_2, createKType(getKClass(AttoAccountEntry()), arrayOf([]), false));
624
+ var tmp$ret$4 = isInterface(this_3, KSerializer()) ? this_3 : THROW_CCE();
625
+ var item = this_1.c1m(tmp$ret$4, value);
706
626
  var tmp_6 = $this.q58_1.j1a(item, $completion);
707
627
  if (tmp_6 === get_COROUTINE_SUSPENDED())
708
628
  tmp_6 = yield tmp_6;
@@ -714,7 +634,7 @@ function *_generator_invoke__zhh2q8_8($this, $this$flow, $completion) {
714
634
  var tmp = $this.r58_1.c58_1($completion);
715
635
  if (tmp === get_COROUTINE_SUSPENDED())
716
636
  tmp = yield tmp;
717
- var headers_0 = tmp;
637
+ var headers = tmp;
718
638
  var tmp0 = get_httpClient();
719
639
  // Inline function 'io.ktor.client.request.prepareGet' call
720
640
  var urlString = $this.r58_1.b58_1 + '/' + $this.s58_1;
@@ -722,10 +642,9 @@ function *_generator_invoke__zhh2q8_8($this, $this$flow, $completion) {
722
642
  // Inline function 'kotlin.apply' call
723
643
  var this_0 = new (HttpRequestBuilder())();
724
644
  url(this_0, urlString);
725
- timeout(this_0, AttoNodeClientRemote$accountEntry$slambda$lambda);
726
- headers(this_0, AttoNodeClientRemote$accountEntry$slambda$lambda_0(headers_0));
645
+ configure($this.r58_1, this_0, headers, 'application/x-ndjson', Companion_getInstance().wo_1);
727
646
  // Inline function 'io.ktor.client.request.prepareGet' call
728
- this_0.c4o_1 = Companion_getInstance().j4b_1;
647
+ this_0.c4o_1 = Companion_getInstance_0().j4b_1;
729
648
  // Inline function 'io.ktor.client.request.prepareRequest' call
730
649
  var tmp_0 = new (HttpStatement())(this_0, tmp0);
731
650
  var tmp_1 = tmp_0.s54(AttoNodeClientRemote$accountEntry$slambda$slambda_0($this$flow), $completion);
@@ -733,27 +652,6 @@ function *_generator_invoke__zhh2q8_8($this, $this$flow, $completion) {
733
652
  tmp_1 = yield tmp_1;
734
653
  return Unit_instance;
735
654
  }
736
- function AttoNodeClientRemote$accountEntry$slambda$lambda($this$timeout) {
737
- $this$timeout.s50(9223372036854775807n);
738
- return Unit_instance;
739
- }
740
- function AttoNodeClientRemote$accountEntry$slambda$lambda_0($headers) {
741
- return ($this$headers) => {
742
- // Inline function 'kotlin.collections.forEach' call
743
- // Inline function 'kotlin.collections.iterator' call
744
- var _iterator__ex2g4s = $headers.x1().k1();
745
- while (_iterator__ex2g4s.l1()) {
746
- var element = _iterator__ex2g4s.m1();
747
- // Inline function 'kotlin.collections.component1' call
748
- var key = element.y1();
749
- // Inline function 'kotlin.collections.component2' call
750
- var value = element.z1();
751
- $this$headers.q3z(key, value);
752
- }
753
- $this$headers.q3z('Accept', 'application/x-ndjson');
754
- return Unit_instance;
755
- };
756
- }
757
655
  var AttoNodeClientRemote$accountEntry$slambda$slambdaClass;
758
656
  function AttoNodeClientRemote$accountEntry$slambda$slambda() {
759
657
  if (AttoNodeClientRemote$accountEntry$slambda$slambdaClass === VOID) {
@@ -804,21 +702,22 @@ function *_generator_invoke__zhh2q8_9($this, response, $completion) {
804
702
  if (tmp_3 === get_COROUTINE_SUSPENDED())
805
703
  tmp_3 = yield tmp_3;
806
704
  var tmp_4 = tmp_3;
807
- var channel = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
808
- while (!channel.l3u()) {
809
- var tmp_5 = readUTF8Line(channel, VOID, $completion);
705
+ // Inline function 'cash.atto.commons.node.readStream' call
706
+ var this_0 = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
707
+ while (!this_0.l3u()) {
708
+ var tmp_5 = readUTF8Line(this_0, VOID, $completion);
810
709
  if (tmp_5 === get_COROUTINE_SUSPENDED())
811
710
  tmp_5 = yield tmp_5;
812
- var json = tmp_5;
813
- if (!(json == null)) {
711
+ var value = tmp_5;
712
+ if (!(value == null)) {
814
713
  // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
815
- var this_0 = Default_getInstance();
714
+ var this_1 = get_json();
816
715
  // Inline function 'kotlinx.serialization.serializer' call
817
- var this_1 = this_0.v1p();
716
+ var this_2 = this_1.v1p();
818
717
  // Inline function 'kotlinx.serialization.internal.cast' call
819
- var this_2 = serializer(this_1, createKType(getKClass(AttoAccountEntry()), arrayOf([]), false));
820
- var tmp$ret$4 = isInterface(this_2, KSerializer()) ? this_2 : THROW_CCE();
821
- var item = this_0.c1m(tmp$ret$4, json);
718
+ var this_3 = serializer(this_2, createKType(getKClass(AttoAccountEntry()), arrayOf([]), false));
719
+ var tmp$ret$4 = isInterface(this_3, KSerializer()) ? this_3 : THROW_CCE();
720
+ var item = this_1.c1m(tmp$ret$4, value);
822
721
  var tmp_6 = $this.t58_1.j1a(item, $completion);
823
722
  if (tmp_6 === get_COROUTINE_SUSPENDED())
824
723
  tmp_6 = yield tmp_6;
@@ -830,7 +729,7 @@ function *_generator_invoke__zhh2q8_10($this, $this$flow, $completion) {
830
729
  var tmp = $this.u58_1.c58_1($completion);
831
730
  if (tmp === get_COROUTINE_SUSPENDED())
832
731
  tmp = yield tmp;
833
- var headers_0 = tmp;
732
+ var headers = tmp;
834
733
  var tmp0 = get_httpClient();
835
734
  // Inline function 'io.ktor.client.request.prepareGet' call
836
735
  var urlString = $this.u58_1.b58_1 + '/' + $this.v58_1;
@@ -838,10 +737,9 @@ function *_generator_invoke__zhh2q8_10($this, $this$flow, $completion) {
838
737
  // Inline function 'kotlin.apply' call
839
738
  var this_0 = new (HttpRequestBuilder())();
840
739
  url(this_0, urlString);
841
- timeout(this_0, AttoNodeClientRemote$accountEntryStream$slambda$lambda);
842
- headers(this_0, AttoNodeClientRemote$accountEntryStream$slambda$lambda_0(headers_0));
740
+ configure($this.u58_1, this_0, headers, 'application/x-ndjson', Companion_getInstance().wo_1);
843
741
  // Inline function 'io.ktor.client.request.prepareGet' call
844
- this_0.c4o_1 = Companion_getInstance().j4b_1;
742
+ this_0.c4o_1 = Companion_getInstance_0().j4b_1;
845
743
  // Inline function 'io.ktor.client.request.prepareRequest' call
846
744
  var tmp_0 = new (HttpStatement())(this_0, tmp0);
847
745
  var tmp_1 = tmp_0.s54(AttoNodeClientRemote$accountEntryStream$slambda$slambda_0($this$flow), $completion);
@@ -849,27 +747,6 @@ function *_generator_invoke__zhh2q8_10($this, $this$flow, $completion) {
849
747
  tmp_1 = yield tmp_1;
850
748
  return Unit_instance;
851
749
  }
852
- function AttoNodeClientRemote$accountEntryStream$slambda$lambda($this$timeout) {
853
- $this$timeout.s50(9223372036854775807n);
854
- return Unit_instance;
855
- }
856
- function AttoNodeClientRemote$accountEntryStream$slambda$lambda_0($headers) {
857
- return ($this$headers) => {
858
- // Inline function 'kotlin.collections.forEach' call
859
- // Inline function 'kotlin.collections.iterator' call
860
- var _iterator__ex2g4s = $headers.x1().k1();
861
- while (_iterator__ex2g4s.l1()) {
862
- var element = _iterator__ex2g4s.m1();
863
- // Inline function 'kotlin.collections.component1' call
864
- var key = element.y1();
865
- // Inline function 'kotlin.collections.component2' call
866
- var value = element.z1();
867
- $this$headers.q3z(key, value);
868
- }
869
- $this$headers.q3z('Accept', 'application/x-ndjson');
870
- return Unit_instance;
871
- };
872
- }
873
750
  var AttoNodeClientRemote$accountEntryStream$slambda$slambdaClass;
874
751
  function AttoNodeClientRemote$accountEntryStream$slambda$slambda() {
875
752
  if (AttoNodeClientRemote$accountEntryStream$slambda$slambdaClass === VOID) {
@@ -920,21 +797,22 @@ function *_generator_invoke__zhh2q8_11($this, response, $completion) {
920
797
  if (tmp_3 === get_COROUTINE_SUSPENDED())
921
798
  tmp_3 = yield tmp_3;
922
799
  var tmp_4 = tmp_3;
923
- var channel = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
924
- while (!channel.l3u()) {
925
- var tmp_5 = readUTF8Line(channel, VOID, $completion);
800
+ // Inline function 'cash.atto.commons.node.readStream' call
801
+ var this_0 = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
802
+ while (!this_0.l3u()) {
803
+ var tmp_5 = readUTF8Line(this_0, VOID, $completion);
926
804
  if (tmp_5 === get_COROUTINE_SUSPENDED())
927
805
  tmp_5 = yield tmp_5;
928
- var json = tmp_5;
929
- if (!(json == null)) {
806
+ var value = tmp_5;
807
+ if (!(value == null)) {
930
808
  // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
931
- var this_0 = Default_getInstance();
809
+ var this_1 = get_json();
932
810
  // Inline function 'kotlinx.serialization.serializer' call
933
- var this_1 = this_0.v1p();
811
+ var this_2 = this_1.v1p();
934
812
  // Inline function 'kotlinx.serialization.internal.cast' call
935
- var this_2 = serializer(this_1, createKType(getKClass(AttoAccountEntry()), arrayOf([]), false));
936
- var tmp$ret$4 = isInterface(this_2, KSerializer()) ? this_2 : THROW_CCE();
937
- var item = this_0.c1m(tmp$ret$4, json);
813
+ var this_3 = serializer(this_2, createKType(getKClass(AttoAccountEntry()), arrayOf([]), false));
814
+ var tmp$ret$4 = isInterface(this_3, KSerializer()) ? this_3 : THROW_CCE();
815
+ var item = this_1.c1m(tmp$ret$4, value);
938
816
  var tmp_6 = $this.w58_1.j1a(item, $completion);
939
817
  if (tmp_6 === get_COROUTINE_SUSPENDED())
940
818
  tmp_6 = yield tmp_6;
@@ -946,18 +824,16 @@ function *_generator_invoke__zhh2q8_12($this, $this$flow, $completion) {
946
824
  var tmp = $this.x58_1.c58_1($completion);
947
825
  if (tmp === get_COROUTINE_SUSPENDED())
948
826
  tmp = yield tmp;
949
- var headers_0 = tmp;
827
+ var headers = tmp;
950
828
  var tmp0 = get_httpClient();
951
829
  // Inline function 'io.ktor.client.request.preparePost' call
952
830
  var urlString = $this.x58_1.b58_1 + '/' + $this.y58_1;
953
831
  // Inline function 'io.ktor.client.request.preparePost' call
954
832
  var builder = new (HttpRequestBuilder())();
955
- builder.c4o_1 = Companion_getInstance().k4b_1;
833
+ builder.c4o_1 = Companion_getInstance_0().k4b_1;
956
834
  // Inline function 'kotlin.apply' call
957
835
  url(builder, urlString);
958
- timeout(builder, AttoNodeClientRemote$accountEntryStream$slambda$lambda_1);
959
- headers(builder, AttoNodeClientRemote$accountEntryStream$slambda$lambda_2(headers_0));
960
- contentType(builder, Application_getInstance().q44_1);
836
+ configure($this.x58_1, builder, headers, 'application/x-ndjson', Companion_getInstance().wo_1);
961
837
  // Inline function 'io.ktor.client.request.setBody' call
962
838
  var body = $this.z58_1;
963
839
  if (body == null) {
@@ -1015,27 +891,6 @@ function *_generator_invoke__zhh2q8_12($this, $this$flow, $completion) {
1015
891
  tmp_7 = yield tmp_7;
1016
892
  return Unit_instance;
1017
893
  }
1018
- function AttoNodeClientRemote$accountEntryStream$slambda$lambda_1($this$timeout) {
1019
- $this$timeout.s50(9223372036854775807n);
1020
- return Unit_instance;
1021
- }
1022
- function AttoNodeClientRemote$accountEntryStream$slambda$lambda_2($headers) {
1023
- return ($this$headers) => {
1024
- // Inline function 'kotlin.collections.forEach' call
1025
- // Inline function 'kotlin.collections.iterator' call
1026
- var _iterator__ex2g4s = $headers.x1().k1();
1027
- while (_iterator__ex2g4s.l1()) {
1028
- var element = _iterator__ex2g4s.m1();
1029
- // Inline function 'kotlin.collections.component1' call
1030
- var key = element.y1();
1031
- // Inline function 'kotlin.collections.component2' call
1032
- var value = element.z1();
1033
- $this$headers.q3z(key, value);
1034
- }
1035
- $this$headers.q3z('Accept', 'application/x-ndjson');
1036
- return Unit_instance;
1037
- };
1038
- }
1039
894
  var AttoNodeClientRemote$accountEntryStream$slambda$slambdaClass_0;
1040
895
  function AttoNodeClientRemote$accountEntryStream$slambda$slambda_1() {
1041
896
  if (AttoNodeClientRemote$accountEntryStream$slambda$slambdaClass_0 === VOID) {
@@ -1086,21 +941,22 @@ function *_generator_invoke__zhh2q8_13($this, response, $completion) {
1086
941
  if (tmp_3 === get_COROUTINE_SUSPENDED())
1087
942
  tmp_3 = yield tmp_3;
1088
943
  var tmp_4 = tmp_3;
1089
- var channel = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
1090
- while (!channel.l3u()) {
1091
- var tmp_5 = readUTF8Line(channel, VOID, $completion);
944
+ // Inline function 'cash.atto.commons.node.readStream' call
945
+ var this_0 = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
946
+ while (!this_0.l3u()) {
947
+ var tmp_5 = readUTF8Line(this_0, VOID, $completion);
1092
948
  if (tmp_5 === get_COROUTINE_SUSPENDED())
1093
949
  tmp_5 = yield tmp_5;
1094
- var json = tmp_5;
1095
- if (!(json == null)) {
950
+ var value = tmp_5;
951
+ if (!(value == null)) {
1096
952
  // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
1097
- var this_0 = Default_getInstance();
953
+ var this_1 = get_json();
1098
954
  // Inline function 'kotlinx.serialization.serializer' call
1099
- var this_1 = this_0.v1p();
955
+ var this_2 = this_1.v1p();
1100
956
  // Inline function 'kotlinx.serialization.internal.cast' call
1101
- var this_2 = serializer(this_1, createKType(getKClass(AttoTransaction()), arrayOf([]), false));
1102
- var tmp$ret$4 = isInterface(this_2, KSerializer()) ? this_2 : THROW_CCE();
1103
- var item = this_0.c1m(tmp$ret$4, json);
957
+ var this_3 = serializer(this_2, createKType(getKClass(AttoTransaction()), arrayOf([]), false));
958
+ var tmp$ret$4 = isInterface(this_3, KSerializer()) ? this_3 : THROW_CCE();
959
+ var item = this_1.c1m(tmp$ret$4, value);
1104
960
  var tmp_6 = $this.a59_1.j1a(item, $completion);
1105
961
  if (tmp_6 === get_COROUTINE_SUSPENDED())
1106
962
  tmp_6 = yield tmp_6;
@@ -1112,7 +968,7 @@ function *_generator_invoke__zhh2q8_14($this, $this$flow, $completion) {
1112
968
  var tmp = $this.b59_1.c58_1($completion);
1113
969
  if (tmp === get_COROUTINE_SUSPENDED())
1114
970
  tmp = yield tmp;
1115
- var headers_0 = tmp;
971
+ var headers = tmp;
1116
972
  var tmp0 = get_httpClient();
1117
973
  // Inline function 'io.ktor.client.request.prepareGet' call
1118
974
  var urlString = $this.b59_1.b58_1 + '/' + $this.c59_1;
@@ -1120,10 +976,9 @@ function *_generator_invoke__zhh2q8_14($this, $this$flow, $completion) {
1120
976
  // Inline function 'kotlin.apply' call
1121
977
  var this_0 = new (HttpRequestBuilder())();
1122
978
  url(this_0, urlString);
1123
- timeout(this_0, AttoNodeClientRemote$transaction$slambda$lambda);
1124
- headers(this_0, AttoNodeClientRemote$transaction$slambda$lambda_0(headers_0));
979
+ configure($this.b59_1, this_0, headers, 'application/x-ndjson', Companion_getInstance().wo_1);
1125
980
  // Inline function 'io.ktor.client.request.prepareGet' call
1126
- this_0.c4o_1 = Companion_getInstance().j4b_1;
981
+ this_0.c4o_1 = Companion_getInstance_0().j4b_1;
1127
982
  // Inline function 'io.ktor.client.request.prepareRequest' call
1128
983
  var tmp_0 = new (HttpStatement())(this_0, tmp0);
1129
984
  var tmp_1 = tmp_0.s54(AttoNodeClientRemote$transaction$slambda$slambda_0($this$flow), $completion);
@@ -1131,27 +986,6 @@ function *_generator_invoke__zhh2q8_14($this, $this$flow, $completion) {
1131
986
  tmp_1 = yield tmp_1;
1132
987
  return Unit_instance;
1133
988
  }
1134
- function AttoNodeClientRemote$transaction$slambda$lambda($this$timeout) {
1135
- $this$timeout.s50(9223372036854775807n);
1136
- return Unit_instance;
1137
- }
1138
- function AttoNodeClientRemote$transaction$slambda$lambda_0($headers) {
1139
- return ($this$headers) => {
1140
- // Inline function 'kotlin.collections.forEach' call
1141
- // Inline function 'kotlin.collections.iterator' call
1142
- var _iterator__ex2g4s = $headers.x1().k1();
1143
- while (_iterator__ex2g4s.l1()) {
1144
- var element = _iterator__ex2g4s.m1();
1145
- // Inline function 'kotlin.collections.component1' call
1146
- var key = element.y1();
1147
- // Inline function 'kotlin.collections.component2' call
1148
- var value = element.z1();
1149
- $this$headers.q3z(key, value);
1150
- }
1151
- $this$headers.q3z('Accept', 'application/x-ndjson');
1152
- return Unit_instance;
1153
- };
1154
- }
1155
989
  var AttoNodeClientRemote$transaction$slambda$slambdaClass;
1156
990
  function AttoNodeClientRemote$transaction$slambda$slambda() {
1157
991
  if (AttoNodeClientRemote$transaction$slambda$slambdaClass === VOID) {
@@ -1202,21 +1036,22 @@ function *_generator_invoke__zhh2q8_15($this, response, $completion) {
1202
1036
  if (tmp_3 === get_COROUTINE_SUSPENDED())
1203
1037
  tmp_3 = yield tmp_3;
1204
1038
  var tmp_4 = tmp_3;
1205
- var channel = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
1206
- while (!channel.l3u()) {
1207
- var tmp_5 = readUTF8Line(channel, VOID, $completion);
1039
+ // Inline function 'cash.atto.commons.node.readStream' call
1040
+ var this_0 = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
1041
+ while (!this_0.l3u()) {
1042
+ var tmp_5 = readUTF8Line(this_0, VOID, $completion);
1208
1043
  if (tmp_5 === get_COROUTINE_SUSPENDED())
1209
1044
  tmp_5 = yield tmp_5;
1210
- var json = tmp_5;
1211
- if (!(json == null)) {
1045
+ var value = tmp_5;
1046
+ if (!(value == null)) {
1212
1047
  // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
1213
- var this_0 = Default_getInstance();
1048
+ var this_1 = get_json();
1214
1049
  // Inline function 'kotlinx.serialization.serializer' call
1215
- var this_1 = this_0.v1p();
1050
+ var this_2 = this_1.v1p();
1216
1051
  // Inline function 'kotlinx.serialization.internal.cast' call
1217
- var this_2 = serializer(this_1, createKType(getKClass(AttoTransaction()), arrayOf([]), false));
1218
- var tmp$ret$4 = isInterface(this_2, KSerializer()) ? this_2 : THROW_CCE();
1219
- var item = this_0.c1m(tmp$ret$4, json);
1052
+ var this_3 = serializer(this_2, createKType(getKClass(AttoTransaction()), arrayOf([]), false));
1053
+ var tmp$ret$4 = isInterface(this_3, KSerializer()) ? this_3 : THROW_CCE();
1054
+ var item = this_1.c1m(tmp$ret$4, value);
1220
1055
  var tmp_6 = $this.d59_1.j1a(item, $completion);
1221
1056
  if (tmp_6 === get_COROUTINE_SUSPENDED())
1222
1057
  tmp_6 = yield tmp_6;
@@ -1228,7 +1063,7 @@ function *_generator_invoke__zhh2q8_16($this, $this$flow, $completion) {
1228
1063
  var tmp = $this.e59_1.c58_1($completion);
1229
1064
  if (tmp === get_COROUTINE_SUSPENDED())
1230
1065
  tmp = yield tmp;
1231
- var headers_0 = tmp;
1066
+ var headers = tmp;
1232
1067
  var tmp0 = get_httpClient();
1233
1068
  // Inline function 'io.ktor.client.request.prepareGet' call
1234
1069
  var urlString = $this.e59_1.b58_1 + '/' + $this.f59_1;
@@ -1236,10 +1071,9 @@ function *_generator_invoke__zhh2q8_16($this, $this$flow, $completion) {
1236
1071
  // Inline function 'kotlin.apply' call
1237
1072
  var this_0 = new (HttpRequestBuilder())();
1238
1073
  url(this_0, urlString);
1239
- timeout(this_0, AttoNodeClientRemote$transactionStream$slambda$lambda);
1240
- headers(this_0, AttoNodeClientRemote$transactionStream$slambda$lambda_0(headers_0));
1074
+ configure($this.e59_1, this_0, headers, 'application/x-ndjson', Companion_getInstance().wo_1);
1241
1075
  // Inline function 'io.ktor.client.request.prepareGet' call
1242
- this_0.c4o_1 = Companion_getInstance().j4b_1;
1076
+ this_0.c4o_1 = Companion_getInstance_0().j4b_1;
1243
1077
  // Inline function 'io.ktor.client.request.prepareRequest' call
1244
1078
  var tmp_0 = new (HttpStatement())(this_0, tmp0);
1245
1079
  var tmp_1 = tmp_0.s54(AttoNodeClientRemote$transactionStream$slambda$slambda_0($this$flow), $completion);
@@ -1247,27 +1081,6 @@ function *_generator_invoke__zhh2q8_16($this, $this$flow, $completion) {
1247
1081
  tmp_1 = yield tmp_1;
1248
1082
  return Unit_instance;
1249
1083
  }
1250
- function AttoNodeClientRemote$transactionStream$slambda$lambda($this$timeout) {
1251
- $this$timeout.s50(9223372036854775807n);
1252
- return Unit_instance;
1253
- }
1254
- function AttoNodeClientRemote$transactionStream$slambda$lambda_0($headers) {
1255
- return ($this$headers) => {
1256
- // Inline function 'kotlin.collections.forEach' call
1257
- // Inline function 'kotlin.collections.iterator' call
1258
- var _iterator__ex2g4s = $headers.x1().k1();
1259
- while (_iterator__ex2g4s.l1()) {
1260
- var element = _iterator__ex2g4s.m1();
1261
- // Inline function 'kotlin.collections.component1' call
1262
- var key = element.y1();
1263
- // Inline function 'kotlin.collections.component2' call
1264
- var value = element.z1();
1265
- $this$headers.q3z(key, value);
1266
- }
1267
- $this$headers.q3z('Accept', 'application/x-ndjson');
1268
- return Unit_instance;
1269
- };
1270
- }
1271
1084
  var AttoNodeClientRemote$transactionStream$slambda$slambdaClass;
1272
1085
  function AttoNodeClientRemote$transactionStream$slambda$slambda() {
1273
1086
  if (AttoNodeClientRemote$transactionStream$slambda$slambdaClass === VOID) {
@@ -1318,21 +1131,22 @@ function *_generator_invoke__zhh2q8_17($this, response, $completion) {
1318
1131
  if (tmp_3 === get_COROUTINE_SUSPENDED())
1319
1132
  tmp_3 = yield tmp_3;
1320
1133
  var tmp_4 = tmp_3;
1321
- var channel = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
1322
- while (!channel.l3u()) {
1323
- var tmp_5 = readUTF8Line(channel, VOID, $completion);
1134
+ // Inline function 'cash.atto.commons.node.readStream' call
1135
+ var this_0 = (!(tmp_4 == null) ? isInterface(tmp_4, ByteReadChannel()) : false) ? tmp_4 : THROW_CCE();
1136
+ while (!this_0.l3u()) {
1137
+ var tmp_5 = readUTF8Line(this_0, VOID, $completion);
1324
1138
  if (tmp_5 === get_COROUTINE_SUSPENDED())
1325
1139
  tmp_5 = yield tmp_5;
1326
- var json = tmp_5;
1327
- if (!(json == null)) {
1140
+ var value = tmp_5;
1141
+ if (!(value == null)) {
1328
1142
  // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
1329
- var this_0 = Default_getInstance();
1143
+ var this_1 = get_json();
1330
1144
  // Inline function 'kotlinx.serialization.serializer' call
1331
- var this_1 = this_0.v1p();
1145
+ var this_2 = this_1.v1p();
1332
1146
  // Inline function 'kotlinx.serialization.internal.cast' call
1333
- var this_2 = serializer(this_1, createKType(getKClass(AttoTransaction()), arrayOf([]), false));
1334
- var tmp$ret$4 = isInterface(this_2, KSerializer()) ? this_2 : THROW_CCE();
1335
- var item = this_0.c1m(tmp$ret$4, json);
1147
+ var this_3 = serializer(this_2, createKType(getKClass(AttoTransaction()), arrayOf([]), false));
1148
+ var tmp$ret$4 = isInterface(this_3, KSerializer()) ? this_3 : THROW_CCE();
1149
+ var item = this_1.c1m(tmp$ret$4, value);
1336
1150
  var tmp_6 = $this.g59_1.j1a(item, $completion);
1337
1151
  if (tmp_6 === get_COROUTINE_SUSPENDED())
1338
1152
  tmp_6 = yield tmp_6;
@@ -1344,18 +1158,16 @@ function *_generator_invoke__zhh2q8_18($this, $this$flow, $completion) {
1344
1158
  var tmp = $this.h59_1.c58_1($completion);
1345
1159
  if (tmp === get_COROUTINE_SUSPENDED())
1346
1160
  tmp = yield tmp;
1347
- var headers_0 = tmp;
1161
+ var headers = tmp;
1348
1162
  var tmp0 = get_httpClient();
1349
1163
  // Inline function 'io.ktor.client.request.preparePost' call
1350
1164
  var urlString = $this.h59_1.b58_1 + '/' + $this.i59_1;
1351
1165
  // Inline function 'io.ktor.client.request.preparePost' call
1352
1166
  var builder = new (HttpRequestBuilder())();
1353
- builder.c4o_1 = Companion_getInstance().k4b_1;
1167
+ builder.c4o_1 = Companion_getInstance_0().k4b_1;
1354
1168
  // Inline function 'kotlin.apply' call
1355
1169
  url(builder, urlString);
1356
- timeout(builder, AttoNodeClientRemote$transactionStream$slambda$lambda_1);
1357
- headers(builder, AttoNodeClientRemote$transactionStream$slambda$lambda_2(headers_0));
1358
- contentType(builder, Application_getInstance().q44_1);
1170
+ configure($this.h59_1, builder, headers, 'application/x-ndjson', Companion_getInstance().wo_1);
1359
1171
  // Inline function 'io.ktor.client.request.setBody' call
1360
1172
  var body = $this.j59_1;
1361
1173
  if (body == null) {
@@ -1413,27 +1225,6 @@ function *_generator_invoke__zhh2q8_18($this, $this$flow, $completion) {
1413
1225
  tmp_7 = yield tmp_7;
1414
1226
  return Unit_instance;
1415
1227
  }
1416
- function AttoNodeClientRemote$transactionStream$slambda$lambda_1($this$timeout) {
1417
- $this$timeout.s50(9223372036854775807n);
1418
- return Unit_instance;
1419
- }
1420
- function AttoNodeClientRemote$transactionStream$slambda$lambda_2($headers) {
1421
- return ($this$headers) => {
1422
- // Inline function 'kotlin.collections.forEach' call
1423
- // Inline function 'kotlin.collections.iterator' call
1424
- var _iterator__ex2g4s = $headers.x1().k1();
1425
- while (_iterator__ex2g4s.l1()) {
1426
- var element = _iterator__ex2g4s.m1();
1427
- // Inline function 'kotlin.collections.component1' call
1428
- var key = element.y1();
1429
- // Inline function 'kotlin.collections.component2' call
1430
- var value = element.z1();
1431
- $this$headers.q3z(key, value);
1432
- }
1433
- $this$headers.q3z('Accept', 'application/x-ndjson');
1434
- return Unit_instance;
1435
- };
1436
- }
1437
1228
  var AttoNodeClientRemote$transactionStream$slambda$slambdaClass_0;
1438
1229
  function AttoNodeClientRemote$transactionStream$slambda$slambda_1() {
1439
1230
  if (AttoNodeClientRemote$transactionStream$slambda$slambdaClass_0 === VOID) {
@@ -1459,25 +1250,46 @@ function AttoNodeClientRemote$transactionStream$slambda$slambda_2($this_flow) {
1459
1250
  l.$arity = 1;
1460
1251
  return l;
1461
1252
  }
1253
+ function configure($this, _this__u8e3s4, headersMap, accept, timeout_0) {
1254
+ contentType(_this__u8e3s4, Application_getInstance().q44_1);
1255
+ headers(_this__u8e3s4, AttoNodeClientRemote$configure$lambda(headersMap, accept));
1256
+ timeout(_this__u8e3s4, AttoNodeClientRemote$configure$lambda_0(timeout_0));
1257
+ }
1258
+ function configure$default($this, _this__u8e3s4, headersMap, accept, timeout, $super) {
1259
+ accept = accept === VOID ? 'application/json' : accept;
1260
+ var tmp;
1261
+ if (timeout === VOID) {
1262
+ // Inline function 'kotlin.time.Companion.seconds' call
1263
+ Companion_getInstance();
1264
+ tmp = toDuration(10, DurationUnit_SECONDS_getInstance());
1265
+ } else {
1266
+ tmp = timeout;
1267
+ }
1268
+ timeout = tmp;
1269
+ return configure($this, _this__u8e3s4, headersMap, accept, timeout);
1270
+ }
1462
1271
  function *_generator_account__bagbq1($this, publicKey, $completion) {
1463
- var uri = $this.b58_1 + '/accounts/' + publicKey.toString();
1464
- var tmp = $this.c58_1($completion);
1465
- if (tmp === get_COROUTINE_SUSPENDED())
1466
- tmp = yield tmp;
1467
- var headers_0 = tmp;
1468
- var tmp_0;
1272
+ var tmp;
1469
1273
  try {
1274
+ var tmp2 = 'accounts/' + publicKey.toString();
1275
+ // Inline function 'kotlin.time.Companion.seconds' call
1276
+ Companion_getInstance();
1277
+ // Inline function 'cash.atto.commons.node.AttoNodeClientRemote.get' call
1278
+ var timeout = toDuration(1, DurationUnit_SECONDS_getInstance());
1279
+ var tmp_0 = $this.c58_1($completion);
1280
+ if (tmp_0 === get_COROUTINE_SUSPENDED())
1281
+ tmp_0 = yield tmp_0;
1282
+ var headers = tmp_0;
1283
+ var tmp0 = get_httpClient();
1470
1284
  // Inline function 'io.ktor.client.request.get' call
1285
+ var urlString = $this.b58_1 + '/' + tmp2;
1471
1286
  // Inline function 'io.ktor.client.request.get' call
1472
- var tmp0 = get_httpClient();
1473
1287
  // Inline function 'kotlin.apply' call
1474
1288
  var this_0 = new (HttpRequestBuilder())();
1475
- url(this_0, uri);
1476
- contentType(this_0, Application_getInstance().q44_1);
1477
- headers(this_0, AttoNodeClientRemote$account$lambda(headers_0));
1478
- timeout(this_0, AttoNodeClientRemote$account$lambda_0);
1289
+ url(this_0, urlString);
1290
+ configure$default($this, this_0, headers, VOID, timeout);
1479
1291
  // Inline function 'io.ktor.client.request.get' call
1480
- this_0.c4o_1 = Companion_getInstance().j4b_1;
1292
+ this_0.c4o_1 = Companion_getInstance_0().j4b_1;
1481
1293
  // Inline function 'io.ktor.client.request.request' call
1482
1294
  var tmp_1 = (new (HttpStatement())(this_0, tmp0)).t54($completion);
1483
1295
  if (tmp_1 === get_COROUTINE_SUSPENDED())
@@ -1489,7 +1301,7 @@ function *_generator_account__bagbq1($this, publicKey, $completion) {
1489
1301
  // Inline function 'io.ktor.util.reflect.typeOfOrNull' call
1490
1302
  var tmp_4;
1491
1303
  try {
1492
- tmp_4 = createKType(getKClass(AttoAccount()), arrayOf([]), true);
1304
+ tmp_4 = createKType(getKClass(AttoAccount()), arrayOf([]), false);
1493
1305
  } catch ($p) {
1494
1306
  var tmp_5;
1495
1307
  if ($p instanceof Error) {
@@ -1500,19 +1312,19 @@ function *_generator_account__bagbq1($this, publicKey, $completion) {
1500
1312
  }
1501
1313
  tmp_4 = tmp_5;
1502
1314
  }
1503
- var tmp$ret$7 = tmp_4;
1504
- var tmp$ret$8 = new (TypeInfo())(tmp_3, tmp$ret$7);
1505
- var tmp_6 = tmp_2.y4p(tmp$ret$8, $completion);
1315
+ var tmp$ret$8 = tmp_4;
1316
+ var tmp$ret$9 = new (TypeInfo())(tmp_3, tmp$ret$8);
1317
+ var tmp_6 = tmp_2.y4p(tmp$ret$9, $completion);
1506
1318
  if (tmp_6 === get_COROUTINE_SUSPENDED())
1507
1319
  tmp_6 = yield tmp_6;
1508
1320
  var tmp_7 = tmp_6;
1509
- tmp_0 = (tmp_7 == null ? true : tmp_7 instanceof AttoAccount()) ? tmp_7 : THROW_CCE();
1321
+ tmp = tmp_7 instanceof AttoAccount() ? tmp_7 : THROW_CCE();
1510
1322
  } catch ($p) {
1511
1323
  var tmp_8;
1512
1324
  if ($p instanceof ClientRequestException()) {
1513
1325
  var e = $p;
1514
1326
  var tmp_9;
1515
- if (e.z4u_1.k4q().equals(Companion_getInstance_0().z4c_1)) {
1327
+ if (e.z4u_1.k4q().equals(Companion_getInstance_1().z4c_1)) {
1516
1328
  tmp_9 = null;
1517
1329
  } else {
1518
1330
  throw e;
@@ -1521,33 +1333,38 @@ function *_generator_account__bagbq1($this, publicKey, $completion) {
1521
1333
  } else {
1522
1334
  throw $p;
1523
1335
  }
1524
- tmp_0 = tmp_8;
1336
+ tmp = tmp_8;
1525
1337
  }
1526
- return tmp_0;
1338
+ return tmp;
1527
1339
  }
1528
1340
  function *_generator_account__bagbq1_0($this, addresses, $completion) {
1529
- var uri = $this.b58_1 + '/accounts';
1341
+ var tmp2 = 'accounts';
1342
+ // Inline function 'cash.atto.commons.node.AttoNodeClientRemote.post' call
1343
+ var body = new (AccountSearch())(addresses);
1344
+ // Inline function 'kotlin.time.Companion.seconds' call
1345
+ Companion_getInstance();
1346
+ var timeout = toDuration(10, DurationUnit_SECONDS_getInstance());
1530
1347
  var tmp = $this.c58_1($completion);
1531
1348
  if (tmp === get_COROUTINE_SUSPENDED())
1532
1349
  tmp = yield tmp;
1533
- var headers_0 = tmp;
1534
- var search = new (AccountSearch())(addresses);
1350
+ var headers = tmp;
1351
+ var tmp0 = get_httpClient();
1535
1352
  // Inline function 'io.ktor.client.request.post' call
1353
+ var urlString = $this.b58_1 + '/' + tmp2;
1536
1354
  // Inline function 'io.ktor.client.request.post' call
1537
- var this_0 = get_httpClient();
1538
1355
  var builder = new (HttpRequestBuilder())();
1539
- builder.c4o_1 = Companion_getInstance().k4b_1;
1540
- url(builder, uri);
1541
- contentType(builder, Application_getInstance().q44_1);
1356
+ builder.c4o_1 = Companion_getInstance_0().k4b_1;
1357
+ url(builder, urlString);
1358
+ configure$default($this, builder, headers, VOID, timeout);
1542
1359
  // Inline function 'io.ktor.client.request.setBody' call
1543
- if (search == null) {
1360
+ if (body == null) {
1544
1361
  builder.e4o_1 = NullBody_instance;
1545
1362
  // Inline function 'io.ktor.util.reflect.typeInfo' call
1546
- var tmp_0 = getKClass(AccountSearch());
1363
+ var tmp_0 = PrimitiveClasses_getInstance().sf();
1547
1364
  // Inline function 'io.ktor.util.reflect.typeOfOrNull' call
1548
1365
  var tmp_1;
1549
1366
  try {
1550
- tmp_1 = createKType(getKClass(AccountSearch()), arrayOf([]), false);
1367
+ tmp_1 = createKType(PrimitiveClasses_getInstance().sf(), arrayOf([]), false);
1551
1368
  } catch ($p) {
1552
1369
  var tmp_2;
1553
1370
  if ($p instanceof Error) {
@@ -1558,21 +1375,21 @@ function *_generator_account__bagbq1_0($this, addresses, $completion) {
1558
1375
  }
1559
1376
  tmp_1 = tmp_2;
1560
1377
  }
1561
- var tmp$ret$0 = tmp_1;
1562
- var tmp$ret$1 = new (TypeInfo())(tmp_0, tmp$ret$0);
1563
- builder.o4s(tmp$ret$1);
1378
+ var tmp$ret$1 = tmp_1;
1379
+ var tmp$ret$2 = new (TypeInfo())(tmp_0, tmp$ret$1);
1380
+ builder.o4s(tmp$ret$2);
1564
1381
  } else {
1565
- if (search instanceof OutgoingContent()) {
1566
- builder.e4o_1 = search;
1382
+ if (body instanceof OutgoingContent()) {
1383
+ builder.e4o_1 = body;
1567
1384
  builder.o4s(null);
1568
1385
  } else {
1569
- builder.e4o_1 = search;
1386
+ builder.e4o_1 = body;
1570
1387
  // Inline function 'io.ktor.util.reflect.typeInfo' call
1571
- var tmp_3 = getKClass(AccountSearch());
1388
+ var tmp_3 = PrimitiveClasses_getInstance().sf();
1572
1389
  // Inline function 'io.ktor.util.reflect.typeOfOrNull' call
1573
1390
  var tmp_4;
1574
1391
  try {
1575
- tmp_4 = createKType(getKClass(AccountSearch()), arrayOf([]), false);
1392
+ tmp_4 = createKType(PrimitiveClasses_getInstance().sf(), arrayOf([]), false);
1576
1393
  } catch ($p) {
1577
1394
  var tmp_5;
1578
1395
  if ($p instanceof Error) {
@@ -1583,16 +1400,14 @@ function *_generator_account__bagbq1_0($this, addresses, $completion) {
1583
1400
  }
1584
1401
  tmp_4 = tmp_5;
1585
1402
  }
1586
- var tmp$ret$2 = tmp_4;
1587
- var tmp$ret$3 = new (TypeInfo())(tmp_3, tmp$ret$2);
1588
- builder.o4s(tmp$ret$3);
1403
+ var tmp$ret$3 = tmp_4;
1404
+ var tmp$ret$4 = new (TypeInfo())(tmp_3, tmp$ret$3);
1405
+ builder.o4s(tmp$ret$4);
1589
1406
  }
1590
1407
  }
1591
- headers(builder, AttoNodeClientRemote$account$lambda_1(headers_0));
1592
- timeout(builder, AttoNodeClientRemote$account$lambda_2);
1593
- builder.c4o_1 = Companion_getInstance().k4b_1;
1408
+ builder.c4o_1 = Companion_getInstance_0().k4b_1;
1594
1409
  // Inline function 'io.ktor.client.request.request' call
1595
- var tmp_6 = (new (HttpStatement())(builder, this_0)).t54($completion);
1410
+ var tmp_6 = (new (HttpStatement())(builder, tmp0)).t54($completion);
1596
1411
  if (tmp_6 === get_COROUTINE_SUSPENDED())
1597
1412
  tmp_6 = yield tmp_6;
1598
1413
  // Inline function 'io.ktor.client.call.body' call
@@ -1613,31 +1428,34 @@ function *_generator_account__bagbq1_0($this, addresses, $completion) {
1613
1428
  }
1614
1429
  tmp_9 = tmp_10;
1615
1430
  }
1616
- var tmp$ret$10 = tmp_9;
1617
- var tmp$ret$11 = new (TypeInfo())(tmp_8, tmp$ret$10);
1618
- var tmp_11 = tmp_7.y4p(tmp$ret$11, $completion);
1431
+ var tmp$ret$11 = tmp_9;
1432
+ var tmp$ret$12 = new (TypeInfo())(tmp_8, tmp$ret$11);
1433
+ var tmp_11 = tmp_7.y4p(tmp$ret$12, $completion);
1619
1434
  if (tmp_11 === get_COROUTINE_SUSPENDED())
1620
1435
  tmp_11 = yield tmp_11;
1621
1436
  var tmp_12 = tmp_11;
1622
1437
  return (!(tmp_12 == null) ? isInterface(tmp_12, Collection()) : false) ? tmp_12 : THROW_CCE();
1623
1438
  }
1624
1439
  function *_generator_now__cbai8y($this, currentTime, $completion) {
1625
- var uri = $this.b58_1 + '/instants/' + currentTime.toString();
1440
+ // Inline function 'cash.atto.commons.node.AttoNodeClientRemote.get' call
1441
+ var urlPath = 'instants/' + currentTime.toString();
1442
+ // Inline function 'kotlin.time.Companion.seconds' call
1443
+ Companion_getInstance();
1444
+ var timeout = toDuration(10, DurationUnit_SECONDS_getInstance());
1626
1445
  var tmp = $this.c58_1($completion);
1627
1446
  if (tmp === get_COROUTINE_SUSPENDED())
1628
1447
  tmp = yield tmp;
1629
- var headers_0 = tmp;
1448
+ var headers = tmp;
1449
+ var tmp0 = get_httpClient();
1630
1450
  // Inline function 'io.ktor.client.request.get' call
1451
+ var urlString = $this.b58_1 + '/' + urlPath;
1631
1452
  // Inline function 'io.ktor.client.request.get' call
1632
- var tmp0 = get_httpClient();
1633
1453
  // Inline function 'kotlin.apply' call
1634
1454
  var this_0 = new (HttpRequestBuilder())();
1635
- url(this_0, uri);
1636
- contentType(this_0, Application_getInstance().q44_1);
1637
- headers(this_0, AttoNodeClientRemote$now$lambda(headers_0));
1638
- timeout(this_0, AttoNodeClientRemote$now$lambda_0);
1455
+ url(this_0, urlString);
1456
+ configure$default($this, this_0, headers, VOID, timeout);
1639
1457
  // Inline function 'io.ktor.client.request.get' call
1640
- this_0.c4o_1 = Companion_getInstance().j4b_1;
1458
+ this_0.c4o_1 = Companion_getInstance_0().j4b_1;
1641
1459
  // Inline function 'io.ktor.client.request.request' call
1642
1460
  var tmp_0 = (new (HttpStatement())(this_0, tmp0)).t54($completion);
1643
1461
  if (tmp_0 === get_COROUTINE_SUSPENDED())
@@ -1660,9 +1478,9 @@ function *_generator_now__cbai8y($this, currentTime, $completion) {
1660
1478
  }
1661
1479
  tmp_3 = tmp_4;
1662
1480
  }
1663
- var tmp$ret$7 = tmp_3;
1664
- var tmp$ret$8 = new (TypeInfo())(tmp_2, tmp$ret$7);
1665
- var tmp_5 = tmp_1.y4p(tmp$ret$8, $completion);
1481
+ var tmp$ret$8 = tmp_3;
1482
+ var tmp$ret$9 = new (TypeInfo())(tmp_2, tmp$ret$8);
1483
+ var tmp_5 = tmp_1.y4p(tmp$ret$9, $completion);
1666
1484
  if (tmp_5 === get_COROUTINE_SUSPENDED())
1667
1485
  tmp_5 = yield tmp_5;
1668
1486
  var tmp_6 = tmp_5;
@@ -1681,14 +1499,17 @@ function *_generator_publish__pkz857($this, transaction, $completion) {
1681
1499
  var tmp = $this.c58_1($completion);
1682
1500
  if (tmp === get_COROUTINE_SUSPENDED())
1683
1501
  tmp = yield tmp;
1684
- var headers_0 = tmp;
1502
+ var headers = tmp;
1685
1503
  // Inline function 'io.ktor.client.request.post' call
1686
1504
  // Inline function 'io.ktor.client.request.post' call
1687
1505
  var this_3 = get_httpClient();
1688
1506
  var builder = new (HttpRequestBuilder())();
1689
- builder.c4o_1 = Companion_getInstance().k4b_1;
1507
+ builder.c4o_1 = Companion_getInstance_0().k4b_1;
1690
1508
  url(builder, uri);
1691
- contentType(builder, Application_getInstance().q44_1);
1509
+ // Inline function 'kotlin.time.Companion.minutes' call
1510
+ Companion_getInstance();
1511
+ var tmp$ret$3 = toDuration(5, DurationUnit_MINUTES_getInstance());
1512
+ configure($this, builder, headers, 'application/x-ndjson', tmp$ret$3);
1692
1513
  // Inline function 'io.ktor.client.request.setBody' call
1693
1514
  if (json == null) {
1694
1515
  builder.e4o_1 = NullBody_instance;
@@ -1708,9 +1529,9 @@ function *_generator_publish__pkz857($this, transaction, $completion) {
1708
1529
  }
1709
1530
  tmp_1 = tmp_2;
1710
1531
  }
1711
- var tmp$ret$3 = tmp_1;
1712
- var tmp$ret$4 = new (TypeInfo())(tmp_0, tmp$ret$3);
1713
- builder.o4s(tmp$ret$4);
1532
+ var tmp$ret$4 = tmp_1;
1533
+ var tmp$ret$5 = new (TypeInfo())(tmp_0, tmp$ret$4);
1534
+ builder.o4s(tmp$ret$5);
1714
1535
  } else {
1715
1536
  if (json instanceof OutgoingContent()) {
1716
1537
  builder.e4o_1 = json;
@@ -1733,14 +1554,12 @@ function *_generator_publish__pkz857($this, transaction, $completion) {
1733
1554
  }
1734
1555
  tmp_4 = tmp_5;
1735
1556
  }
1736
- var tmp$ret$5 = tmp_4;
1737
- var tmp$ret$6 = new (TypeInfo())(tmp_3, tmp$ret$5);
1738
- builder.o4s(tmp$ret$6);
1557
+ var tmp$ret$6 = tmp_4;
1558
+ var tmp$ret$7 = new (TypeInfo())(tmp_3, tmp$ret$6);
1559
+ builder.o4s(tmp$ret$7);
1739
1560
  }
1740
1561
  }
1741
- headers(builder, AttoNodeClientRemote$publish$lambda(headers_0));
1742
- timeout(builder, AttoNodeClientRemote$publish$lambda_0);
1743
- builder.c4o_1 = Companion_getInstance().k4b_1;
1562
+ builder.c4o_1 = Companion_getInstance_0().k4b_1;
1744
1563
  // Inline function 'io.ktor.client.request.request' call
1745
1564
  var tmp_6 = (new (HttpStatement())(builder, this_3)).t54($completion);
1746
1565
  if (tmp_6 === get_COROUTINE_SUSPENDED())
@@ -1775,11 +1594,11 @@ function AttoNodeClientRemote$_init_$slambda_etzix7_0() {
1775
1594
  l.$arity = 0;
1776
1595
  return l;
1777
1596
  }
1778
- function AttoNodeClientRemote$account$lambda($headers) {
1597
+ function AttoNodeClientRemote$configure$lambda($headersMap, $accept) {
1779
1598
  return ($this$headers) => {
1780
1599
  // Inline function 'kotlin.collections.forEach' call
1781
1600
  // Inline function 'kotlin.collections.iterator' call
1782
- var _iterator__ex2g4s = $headers.x1().k1();
1601
+ var _iterator__ex2g4s = $headersMap.x1().k1();
1783
1602
  while (_iterator__ex2g4s.l1()) {
1784
1603
  var element = _iterator__ex2g4s.m1();
1785
1604
  // Inline function 'kotlin.collections.component1' call
@@ -1788,41 +1607,16 @@ function AttoNodeClientRemote$account$lambda($headers) {
1788
1607
  var value = element.z1();
1789
1608
  $this$headers.q3z(key, value);
1790
1609
  }
1791
- $this$headers.q3z('Accept', 'application/json');
1610
+ $this$headers.q3z('Accept', $accept);
1792
1611
  return Unit_instance;
1793
1612
  };
1794
1613
  }
1795
- function AttoNodeClientRemote$account$lambda_0($this$timeout) {
1796
- // Inline function 'kotlin.time.Companion.seconds' call
1797
- Companion_getInstance_1();
1798
- var tmp$ret$0 = toDuration(1, DurationUnit_SECONDS_getInstance());
1799
- $this$timeout.s50(_Duration___get_inWholeMilliseconds__impl__msfiry(tmp$ret$0));
1800
- return Unit_instance;
1801
- }
1802
- function AttoNodeClientRemote$account$lambda_1($headers) {
1803
- return ($this$headers) => {
1804
- // Inline function 'kotlin.collections.forEach' call
1805
- // Inline function 'kotlin.collections.iterator' call
1806
- var _iterator__ex2g4s = $headers.x1().k1();
1807
- while (_iterator__ex2g4s.l1()) {
1808
- var element = _iterator__ex2g4s.m1();
1809
- // Inline function 'kotlin.collections.component1' call
1810
- var key = element.y1();
1811
- // Inline function 'kotlin.collections.component2' call
1812
- var value = element.z1();
1813
- $this$headers.q3z(key, value);
1814
- }
1815
- $this$headers.q3z('Accept', 'application/json');
1614
+ function AttoNodeClientRemote$configure$lambda_0($timeout) {
1615
+ return ($this$timeout) => {
1616
+ $this$timeout.s50($timeout === Companion_getInstance().wo_1 ? 9223372036854775807n : _Duration___get_inWholeMilliseconds__impl__msfiry($timeout));
1816
1617
  return Unit_instance;
1817
1618
  };
1818
1619
  }
1819
- function AttoNodeClientRemote$account$lambda_2($this$timeout) {
1820
- // Inline function 'kotlin.time.Companion.seconds' call
1821
- Companion_getInstance_1();
1822
- var tmp$ret$0 = toDuration(10, DurationUnit_SECONDS_getInstance());
1823
- $this$timeout.s50(_Duration___get_inWholeMilliseconds__impl__msfiry(tmp$ret$0));
1824
- return Unit_instance;
1825
- }
1826
1620
  var AttoNodeClientRemote$accountStream$slambdaClass;
1827
1621
  function AttoNodeClientRemote$accountStream$slambda() {
1828
1622
  if (AttoNodeClientRemote$accountStream$slambdaClass === VOID) {
@@ -2087,54 +1881,6 @@ function AttoNodeClientRemote$transactionStream$slambda_2($this, $urlPath, $sear
2087
1881
  l.$arity = 1;
2088
1882
  return l;
2089
1883
  }
2090
- function AttoNodeClientRemote$now$lambda($headers) {
2091
- return ($this$headers) => {
2092
- // Inline function 'kotlin.collections.forEach' call
2093
- // Inline function 'kotlin.collections.iterator' call
2094
- var _iterator__ex2g4s = $headers.x1().k1();
2095
- while (_iterator__ex2g4s.l1()) {
2096
- var element = _iterator__ex2g4s.m1();
2097
- // Inline function 'kotlin.collections.component1' call
2098
- var key = element.y1();
2099
- // Inline function 'kotlin.collections.component2' call
2100
- var value = element.z1();
2101
- $this$headers.q3z(key, value);
2102
- }
2103
- $this$headers.q3z('Accept', 'application/json');
2104
- return Unit_instance;
2105
- };
2106
- }
2107
- function AttoNodeClientRemote$now$lambda_0($this$timeout) {
2108
- // Inline function 'kotlin.time.Companion.seconds' call
2109
- Companion_getInstance_1();
2110
- var tmp$ret$0 = toDuration(10, DurationUnit_SECONDS_getInstance());
2111
- $this$timeout.s50(_Duration___get_inWholeMilliseconds__impl__msfiry(tmp$ret$0));
2112
- return Unit_instance;
2113
- }
2114
- function AttoNodeClientRemote$publish$lambda($headers) {
2115
- return ($this$headers) => {
2116
- // Inline function 'kotlin.collections.forEach' call
2117
- // Inline function 'kotlin.collections.iterator' call
2118
- var _iterator__ex2g4s = $headers.x1().k1();
2119
- while (_iterator__ex2g4s.l1()) {
2120
- var element = _iterator__ex2g4s.m1();
2121
- // Inline function 'kotlin.collections.component1' call
2122
- var key = element.y1();
2123
- // Inline function 'kotlin.collections.component2' call
2124
- var value = element.z1();
2125
- $this$headers.q3z(key, value);
2126
- }
2127
- $this$headers.q3z('Accept', 'application/x-ndjson');
2128
- return Unit_instance;
2129
- };
2130
- }
2131
- function AttoNodeClientRemote$publish$lambda_0($this$timeout) {
2132
- // Inline function 'kotlin.time.Companion.minutes' call
2133
- Companion_getInstance_1();
2134
- var tmp$ret$0 = toDuration(5, DurationUnit_MINUTES_getInstance());
2135
- $this$timeout.s50(_Duration___get_inWholeMilliseconds__impl__msfiry(tmp$ret$0));
2136
- return Unit_instance;
2137
- }
2138
1884
  var AttoNodeClientRemoteClass;
2139
1885
  function AttoNodeClientRemote() {
2140
1886
  if (AttoNodeClientRemoteClass === VOID) {
@@ -2239,6 +1985,11 @@ function AttoNodeClientRemote() {
2239
1985
  }
2240
1986
  return AttoNodeClientRemoteClass;
2241
1987
  }
1988
+ function json$lambda($this$Json) {
1989
+ _init_properties_AttoNodeClientRemote_kt__nmpoap();
1990
+ $this$Json.a35_1 = true;
1991
+ return Unit_instance;
1992
+ }
2242
1993
  function httpClient$lambda($this$HttpClient) {
2243
1994
  _init_properties_AttoNodeClientRemote_kt__nmpoap();
2244
1995
  var tmp = get_ContentNegotiation();
@@ -2249,12 +2000,7 @@ function httpClient$lambda($this$HttpClient) {
2249
2000
  }
2250
2001
  function httpClient$lambda$lambda($this$install) {
2251
2002
  _init_properties_AttoNodeClientRemote_kt__nmpoap();
2252
- json($this$install, Json(VOID, httpClient$lambda$lambda$lambda));
2253
- return Unit_instance;
2254
- }
2255
- function httpClient$lambda$lambda$lambda($this$Json) {
2256
- _init_properties_AttoNodeClientRemote_kt__nmpoap();
2257
- $this$Json.a35_1 = true;
2003
+ json($this$install, get_json());
2258
2004
  return Unit_instance;
2259
2005
  }
2260
2006
  var remote$slambdaClass;
@@ -2280,6 +2026,7 @@ var properties_initialized_AttoNodeClientRemote_kt_wdig71;
2280
2026
  function _init_properties_AttoNodeClientRemote_kt__nmpoap() {
2281
2027
  if (!properties_initialized_AttoNodeClientRemote_kt_wdig71) {
2282
2028
  properties_initialized_AttoNodeClientRemote_kt_wdig71 = true;
2029
+ json_0 = Json(VOID, json$lambda);
2283
2030
  httpClient = HttpClient(httpClient$lambda);
2284
2031
  }
2285
2032
  }