@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.
- package/README.md +148 -7
- package/dist/application/app.d.ts +34 -3
- package/dist/application/app.js +138 -126
- package/dist/application/operations.d.ts +3 -0
- package/dist/application/operations.js +30 -8
- package/dist/cli/cli.d.ts +1 -0
- package/dist/cli/cli.js +101 -13
- package/dist/cli/onboarding.d.ts +13 -0
- package/dist/cli/onboarding.js +99 -2
- package/dist/cli/output.js +18 -2
- package/dist/doctor/profile.js +2 -1
- package/dist/internal-marketplace.d.ts +25 -0
- package/dist/internal-marketplace.js +50 -0
- package/dist/marketplace/approval-files.d.ts +3 -0
- package/dist/marketplace/approval-files.js +97 -0
- package/dist/marketplace/approval-preview.d.ts +2 -0
- package/dist/marketplace/approval-preview.js +86 -0
- package/dist/marketplace/proof-approval.d.ts +82 -0
- package/dist/marketplace/proof-approval.js +671 -0
- package/dist/marketplace/topups.d.ts +82 -0
- package/dist/marketplace/topups.js +485 -0
- package/dist/network/batching.d.ts +2 -0
- package/dist/network/batching.js +23 -0
- package/dist/network/entry.d.ts +2 -0
- package/dist/network/entry.js +35 -0
- package/dist/network/reader.d.ts +2 -0
- package/dist/network/reader.js +125 -37
- package/dist/spending/approval.d.ts +5 -0
- package/dist/spending/approval.js +2 -0
- package/dist/spending/atto-x402.d.ts +31 -0
- package/dist/spending/atto-x402.js +174 -0
- package/dist/spending/ledger.d.ts +74 -2
- package/dist/spending/ledger.js +298 -7
- package/dist/spending/payments.d.ts +105 -5
- package/dist/spending/payments.js +795 -11
- package/dist/storage/recovery-seed.d.ts +13 -0
- package/dist/storage/recovery-seed.js +93 -0
- package/dist/storage/state.d.ts +4 -0
- package/dist/storage/state.js +32 -2
- package/dist/wallet/receive.d.ts +39 -0
- package/dist/wallet/receive.js +264 -0
- package/dist/wallet/signing.d.ts +1 -0
- package/dist/wallet/signing.js +37 -21
- package/dist/wallet/types.d.ts +1 -0
- package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs +1922 -1918
- package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/README.md +9 -0
- package/node_modules/@attocash/commons-core/commons-commons-core.d.mts +10 -0
- package/node_modules/@attocash/commons-core/commons-commons-core.mjs +2543 -2434
- package/node_modules/@attocash/commons-core/commons-commons-core.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs +4695 -4227
- package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs +60 -60
- package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs +651 -631
- package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs +2294 -2295
- package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
- package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/package.json +1 -1
- package/node_modules/@attocash/commons-node/commons-commons-node.d.mts +1 -0
- package/node_modules/@attocash/commons-node/commons-commons-node.mjs +873 -847
- package/node_modules/@attocash/commons-node/commons-commons-node.mjs.map +1 -1
- package/node_modules/@attocash/commons-node/kotlin-logging.mjs +109 -109
- package/node_modules/@attocash/commons-node/kotlin-logging.mjs.map +1 -1
- package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
- package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-node/package.json +3 -3
- package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.d.mts +1 -0
- package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs +674 -640
- package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs.map +1 -1
- package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs +109 -109
- package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs.map +1 -1
- package/node_modules/@attocash/commons-node-remote/kotlinx-browser.mjs.map +1 -1
- package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -1
- package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
- package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-node-remote/package.json +4 -4
- package/node_modules/@attocash/commons-transport/commons-commons-transport.d.mts +1 -0
- package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs +52 -51
- package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs +13 -13
- package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/kotlinx-browser.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs +2639 -2608
- package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
- package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs +411 -196
- package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs +2115 -1976
- package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs +7 -7
- package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs +385 -384
- package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs +1261 -1185
- package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs +668 -656
- package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-openapi-schema.mjs +89 -0
- package/node_modules/@attocash/commons-transport/ktor-ktor-openapi-schema.mjs.map +1 -0
- package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs +9 -9
- package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs +120 -128
- package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs +46 -49
- package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-sse.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs +1041 -985
- package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-websocket-serialization.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs +530 -455
- package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/package.json +4 -4
- package/node_modules/@attocash/commons-worker/commons-commons-worker.d.mts +1 -0
- package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs +230 -226
- package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker/kotlin-logging.mjs +109 -109
- package/node_modules/@attocash/commons-worker/kotlin-logging.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
- package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker/package.json +3 -3
- package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.d.mts +1 -0
- package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs +91 -86
- package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs +109 -109
- package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker-remote/kotlinx-browser.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
- package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker-remote/package.json +4 -4
- 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
|
-
|
|
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
|
-
|
|
16
|
-
|
|
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
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
+
Companion_getInstance29j9s2wnmk34z as Companion_getInstance_0,
|
|
37
|
+
Application_getInstance3vhi2qmce4cj0 as Application_getInstance,
|
|
36
38
|
OutgoingContent3t2ohmyam9o76 as OutgoingContent,
|
|
37
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
+
work3lctluiffi34a as work,
|
|
45
|
+
work1yjb62hcp0x3a as work_0,
|
|
44
46
|
AttoWorkerOperations1gnkwfcdzd0wa as AttoWorkerOperations,
|
|
45
|
-
|
|
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
|
-
|
|
55
|
+
Companion_instance2enxrnk22gxoi as Companion_instance_0,
|
|
54
56
|
} from '@attocash/commons-core/commons-commons-core.mjs';
|
|
55
|
-
import {
|
|
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.
|
|
70
|
-
this.
|
|
71
|
+
this.timeout_1 = timeout;
|
|
72
|
+
this.transport_1 = new AttoHttpTransport(url, headerProvider);
|
|
71
73
|
}
|
|
72
|
-
*
|
|
73
|
-
throw NotImplementedError.
|
|
74
|
+
*work_87s8mv_k$(threshold, target, $completion) {
|
|
75
|
+
throw NotImplementedError.new_kotlin_NotImplementedError_8rzvsv_k$();
|
|
74
76
|
}
|
|
75
|
-
*
|
|
76
|
-
var tmp0 = this.
|
|
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.
|
|
79
|
-
var tmp0_0 = tmp0.
|
|
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.
|
|
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.
|
|
86
|
+
builder.method_1 = Companion_getInstance_0().Post_1;
|
|
85
87
|
url(builder, urlString);
|
|
86
|
-
configure(builder, yield* tmp0.
|
|
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.
|
|
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
|
|
96
|
+
var tmp_1;
|
|
94
97
|
try {
|
|
95
|
-
|
|
98
|
+
tmp_1 = createKType(getKClass(Request), arrayOf([]), false);
|
|
96
99
|
} catch ($p) {
|
|
97
|
-
var
|
|
100
|
+
var tmp_2;
|
|
98
101
|
if ($p instanceof Error) {
|
|
99
102
|
var _unused_var__etf5q3 = $p;
|
|
100
|
-
|
|
103
|
+
tmp_2 = null;
|
|
101
104
|
} else {
|
|
102
105
|
throw $p;
|
|
103
106
|
}
|
|
104
|
-
|
|
107
|
+
tmp_1 = tmp_2;
|
|
105
108
|
}
|
|
106
|
-
var tmp$ret$7 =
|
|
107
|
-
var tmp$ret$6 = new TypeInfo(tmp, tmp$ret$7);
|
|
108
|
-
builder.
|
|
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.
|
|
112
|
-
builder.
|
|
114
|
+
builder.body_1 = request;
|
|
115
|
+
builder.set_bodyType_8pgqkl_k$(null);
|
|
113
116
|
} else {
|
|
114
|
-
builder.
|
|
117
|
+
builder.body_1 = request;
|
|
115
118
|
// Inline function 'io.ktor.util.reflect.typeInfo' call
|
|
116
|
-
var
|
|
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
|
|
122
|
+
var tmp_5;
|
|
119
123
|
try {
|
|
120
|
-
|
|
124
|
+
tmp_5 = createKType(getKClass(Request), arrayOf([]), false);
|
|
121
125
|
} catch ($p_0) {
|
|
122
|
-
var
|
|
126
|
+
var tmp_6;
|
|
123
127
|
if ($p_0 instanceof Error) {
|
|
124
128
|
var _unused_var__etf5q3_0 = $p_0;
|
|
125
|
-
|
|
129
|
+
tmp_6 = null;
|
|
126
130
|
} else {
|
|
127
131
|
throw $p_0;
|
|
128
132
|
}
|
|
129
|
-
|
|
133
|
+
tmp_5 = tmp_6;
|
|
130
134
|
}
|
|
131
|
-
var tmp$ret$9 =
|
|
132
|
-
var tmp$ret$8 = new TypeInfo(
|
|
133
|
-
builder.
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
148
|
+
var tmp_10;
|
|
144
149
|
try {
|
|
145
|
-
|
|
150
|
+
tmp_10 = createKType(getKClass(Response), arrayOf([]), false);
|
|
146
151
|
} catch ($p_1) {
|
|
147
|
-
var
|
|
152
|
+
var tmp_11;
|
|
148
153
|
if ($p_1 instanceof Error) {
|
|
149
154
|
var _unused_var__etf5q3_1 = $p_1;
|
|
150
|
-
|
|
155
|
+
tmp_11 = null;
|
|
151
156
|
} else {
|
|
152
157
|
throw $p_1;
|
|
153
158
|
}
|
|
154
|
-
|
|
159
|
+
tmp_10 = tmp_11;
|
|
155
160
|
}
|
|
156
|
-
var tmp$ret$13 =
|
|
157
|
-
var tmp$ret$12 = new TypeInfo(
|
|
158
|
-
var
|
|
159
|
-
var response =
|
|
160
|
-
var target = new AttoWorkTarget(fromHexToByteArray(request.
|
|
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.
|
|
163
|
-
var message = 'Remote worker returned invalid work for network=' + request.
|
|
164
|
-
throw IllegalArgumentException.
|
|
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
|
-
|
|
173
|
+
close_yn9xrc_k$() {
|
|
169
174
|
}
|
|
170
175
|
}
|
|
171
176
|
class AttoWorkerAsyncBuilder {
|
|
172
177
|
constructor(url) {
|
|
173
|
-
this.
|
|
174
|
-
this.
|
|
175
|
-
this.
|
|
176
|
-
this.
|
|
177
|
-
this.
|
|
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.
|
|
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.
|
|
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.
|
|
196
|
+
this.cached_1 = value;
|
|
192
197
|
return this;
|
|
193
198
|
}
|
|
194
199
|
timeout(value) {
|
|
195
200
|
// Inline function 'kotlin.apply' call
|
|
196
|
-
this.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
227
|
+
var tmp_0 = this.timeout_1;
|
|
223
228
|
// Inline function 'kotlin.let' call
|
|
224
|
-
var it = remote(tmp, this.
|
|
229
|
+
var it = remote(tmp, this.url_1, tmp_0, AttoWorkerAsyncBuilder$build$slambda(this));
|
|
225
230
|
var tmp_1;
|
|
226
|
-
if (this.
|
|
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().
|
|
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.
|
|
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).
|
|
279
|
-
protoOf(WorkerRemote).
|
|
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","
|
|
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":";;;;;;;;;;;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