@oatscenter/trellis 0.100.0-rc.1
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 +59 -0
- package/auth/authorization/client_context.d.ts +61 -0
- package/auth/authorization/client_context.js +266 -0
- package/auth/authorization/nats_registry.d.ts +41 -0
- package/auth/authorization/nats_registry.js +283 -0
- package/auth/authorization/provider_cache.d.ts +90 -0
- package/auth/authorization/provider_cache.js +783 -0
- package/auth/authorization/refresh.d.ts +46 -0
- package/auth/authorization/refresh.js +246 -0
- package/auth/authorization/types.d.ts +207 -0
- package/auth/authorization/types.js +60 -0
- package/auth/authorization_context.d.ts +11 -0
- package/auth/authorization_context.js +10 -0
- package/auth/browser/flow_types.d.ts +84 -0
- package/auth/browser/flow_types.js +70 -0
- package/auth/browser/portal.d.ts +21 -0
- package/auth/browser/portal.js +307 -0
- package/auth/browser/storage.d.ts +26 -0
- package/auth/browser/storage.js +224 -0
- package/auth/browser.d.ts +11 -0
- package/auth/browser.js +10 -0
- package/auth/browser_recovery.d.ts +13 -0
- package/auth/browser_recovery.js +38 -0
- package/auth/device_activation.d.ts +134 -0
- package/auth/device_activation.js +376 -0
- package/auth/http_error.d.ts +12 -0
- package/auth/http_error.js +32 -0
- package/auth/keys.d.ts +5 -0
- package/auth/keys.js +63 -0
- package/auth/mod.d.ts +16 -0
- package/auth/mod.js +16 -0
- package/auth/proof.d.ts +31 -0
- package/auth/proof.js +95 -0
- package/auth/protocol_wasm/trellis_protocol_wasm.d.ts +138 -0
- package/auth/protocol_wasm/trellis_protocol_wasm.js +605 -0
- package/auth/protocol_wasm/trellis_protocol_wasm_bg.wasm +0 -0
- package/auth/protocol_wasm/trellis_protocol_wasm_bytes.d.ts +1 -0
- package/auth/protocol_wasm/trellis_protocol_wasm_bytes.js +2 -0
- package/auth/protocol_wasm.d.ts +179 -0
- package/auth/protocol_wasm.js +133 -0
- package/auth/session_auth.d.ts +30 -0
- package/auth/session_auth.js +77 -0
- package/auth/session_proof.d.ts +53 -0
- package/auth/session_proof.js +43 -0
- package/auth/time.d.ts +6 -0
- package/auth/time.js +7 -0
- package/auth/trellis_id.d.ts +1 -0
- package/auth/trellis_id.js +5 -0
- package/auth/utils.d.ts +10 -0
- package/auth/utils.js +69 -0
- package/auth.d.ts +1 -0
- package/auth.js +1 -0
- package/caller.d.ts +111 -0
- package/caller.js +85 -0
- package/client.d.ts +14 -0
- package/client.js +1 -0
- package/client_connect.d.ts +143 -0
- package/client_connect.js +1097 -0
- package/codec.d.ts +13 -0
- package/codec.js +192 -0
- package/connection.d.ts +107 -0
- package/connection.js +396 -0
- package/device/activation.d.ts +42 -0
- package/device/activation.js +319 -0
- package/device.d.ts +80 -0
- package/device.js +687 -0
- package/env.d.ts +2 -0
- package/env.js +10 -0
- package/errors/AuthError.d.ts +30 -0
- package/errors/AuthError.js +34 -0
- package/errors/KVError.d.ts +30 -0
- package/errors/KVError.js +36 -0
- package/errors/OperationLifecycleError.d.ts +110 -0
- package/errors/OperationLifecycleError.js +142 -0
- package/errors/RemoteError.d.ts +61 -0
- package/errors/RemoteError.js +72 -0
- package/errors/SchemaValidationError.d.ts +48 -0
- package/errors/SchemaValidationError.js +49 -0
- package/errors/StoreError.d.ts +21 -0
- package/errors/StoreError.js +31 -0
- package/errors/TransferError.d.ts +21 -0
- package/errors/TransferError.js +31 -0
- package/errors/TransportError.d.ts +29 -0
- package/errors/TransportError.js +33 -0
- package/errors/TrellisError.d.ts +15 -0
- package/errors/TrellisError.js +15 -0
- package/errors/ValidationError.d.ts +50 -0
- package/errors/ValidationError.js +59 -0
- package/errors/index.d.ts +254 -0
- package/errors/index.js +238 -0
- package/generated.d.ts +4 -0
- package/generated.js +3 -0
- package/generated_support.d.ts +120 -0
- package/generated_support.js +359 -0
- package/globals.d.ts +9 -0
- package/globals.js +16 -0
- package/health_transport.d.ts +18 -0
- package/health_transport.js +32 -0
- package/helpers.d.ts +11 -0
- package/helpers.js +53 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/internal_sdk/generated/apis/auth/mod.d.ts +805 -0
- package/internal_sdk/generated/apis/auth/mod.js +958 -0
- package/internal_sdk/generated/apis/core/mod.d.ts +79 -0
- package/internal_sdk/generated/apis/core/mod.js +93 -0
- package/internal_sdk/generated/apis/events/mod.d.ts +224 -0
- package/internal_sdk/generated/apis/events/mod.js +313 -0
- package/internal_sdk/generated/apis/health/mod.d.ts +106 -0
- package/internal_sdk/generated/apis/health/mod.js +132 -0
- package/internal_sdk/generated/apis/index.d.ts +7 -0
- package/internal_sdk/generated/apis/index.js +8 -0
- package/internal_sdk/generated/apis/jobs/mod.d.ts +176 -0
- package/internal_sdk/generated/apis/jobs/mod.js +209 -0
- package/internal_sdk/generated/apis/state/mod.d.ts +104 -0
- package/internal_sdk/generated/apis/state/mod.js +139 -0
- package/internal_sdk/generated/index.d.ts +4 -0
- package/internal_sdk/generated/index.js +5 -0
- package/internal_sdk/generated/package.json +18 -0
- package/internal_sdk/generated/participants/cli/mod.d.ts +402 -0
- package/internal_sdk/generated/participants/cli/mod.js +460 -0
- package/internal_sdk/generated/participants/cli/types.d.ts +2 -0
- package/internal_sdk/generated/participants/cli/types.js +3 -0
- package/internal_sdk/generated/participants/console/mod.d.ts +489 -0
- package/internal_sdk/generated/participants/console/mod.js +579 -0
- package/internal_sdk/generated/participants/console/types.d.ts +2 -0
- package/internal_sdk/generated/participants/console/types.js +3 -0
- package/internal_sdk/generated/participants/eventsRuntime/mod.d.ts +64 -0
- package/internal_sdk/generated/participants/eventsRuntime/mod.js +42 -0
- package/internal_sdk/generated/participants/eventsRuntime/types.d.ts +2 -0
- package/internal_sdk/generated/participants/eventsRuntime/types.js +3 -0
- package/internal_sdk/generated/participants/healthRuntime/mod.d.ts +58 -0
- package/internal_sdk/generated/participants/healthRuntime/mod.js +36 -0
- package/internal_sdk/generated/participants/healthRuntime/types.d.ts +2 -0
- package/internal_sdk/generated/participants/healthRuntime/types.js +3 -0
- package/internal_sdk/generated/participants/index.d.ts +8 -0
- package/internal_sdk/generated/participants/index.js +9 -0
- package/internal_sdk/generated/participants/jobsRuntime/mod.d.ts +64 -0
- package/internal_sdk/generated/participants/jobsRuntime/mod.js +42 -0
- package/internal_sdk/generated/participants/jobsRuntime/types.d.ts +2 -0
- package/internal_sdk/generated/participants/jobsRuntime/types.js +3 -0
- package/internal_sdk/generated/participants/platform/mod.d.ts +164 -0
- package/internal_sdk/generated/participants/platform/mod.js +149 -0
- package/internal_sdk/generated/participants/platform/types.d.ts +7 -0
- package/internal_sdk/generated/participants/platform/types.js +5 -0
- package/internal_sdk/generated/participants/portal/mod.d.ts +131 -0
- package/internal_sdk/generated/participants/portal/mod.js +109 -0
- package/internal_sdk/generated/participants/portal/types.d.ts +2 -0
- package/internal_sdk/generated/participants/portal/types.js +3 -0
- package/internal_sdk/generated/types/_internal/p0.d.ts +13511 -0
- package/internal_sdk/generated/types/_internal/p0.js +6105 -0
- package/internal_sdk/generated/types/index.d.ts +2951 -0
- package/internal_sdk/generated/types/index.js +1477 -0
- package/jobs.d.ts +309 -0
- package/jobs.js +389 -0
- package/kv.d.ts +85 -0
- package/kv.js +330 -0
- package/operations.d.ts +189 -0
- package/operations.js +847 -0
- package/package.json +73 -0
- package/pagination.d.ts +25 -0
- package/pagination.js +117 -0
- package/participant.d.ts +6 -0
- package/participant.js +6 -0
- package/participant_runtime/api.d.ts +131 -0
- package/participant_runtime/api.js +42 -0
- package/participant_runtime/json.d.ts +16 -0
- package/participant_runtime/json.js +193 -0
- package/participant_runtime/metadata.d.ts +34 -0
- package/participant_runtime/metadata.js +4 -0
- package/participant_runtime/participant.d.ts +200 -0
- package/participant_runtime/participant.js +330 -0
- package/participant_runtime/schemas.d.ts +347 -0
- package/participant_runtime/schemas.js +211 -0
- package/participant_runtime/surface_names.d.ts +16 -0
- package/participant_runtime/surface_names.js +34 -0
- package/portable.d.ts +30 -0
- package/portable.js +14 -0
- package/provider.d.ts +69 -0
- package/provider.js +68 -0
- package/runtime_transport.d.ts +25 -0
- package/runtime_transport.js +48 -0
- package/service/mod.d.ts +14 -0
- package/service/mod.js +13 -0
- package/service/outbox_inbox.d.ts +259 -0
- package/service/outbox_inbox.js +908 -0
- package/service/runtime/bootstrap.d.ts +56 -0
- package/service/runtime/bootstrap.js +226 -0
- package/service/runtime/core.d.ts +46 -0
- package/service/runtime/core.js +1747 -0
- package/service/runtime/health.d.ts +97 -0
- package/service/runtime/health.js +153 -0
- package/service/runtime/health_schemas.d.ts +23 -0
- package/service/runtime/health_schemas.js +20 -0
- package/service/runtime/internal_jobs/active-job.d.ts +40 -0
- package/service/runtime/internal_jobs/active-job.js +91 -0
- package/service/runtime/internal_jobs/bindings.d.ts +40 -0
- package/service/runtime/internal_jobs/bindings.js +1 -0
- package/service/runtime/internal_jobs/cancellation-registry.d.ts +13 -0
- package/service/runtime/internal_jobs/cancellation-registry.js +55 -0
- package/service/runtime/internal_jobs/heartbeat.d.ts +33 -0
- package/service/runtime/internal_jobs/heartbeat.js +65 -0
- package/service/runtime/internal_jobs/job-manager.d.ts +126 -0
- package/service/runtime/internal_jobs/job-manager.js +821 -0
- package/service/runtime/internal_jobs/key-coordinator.d.ts +280 -0
- package/service/runtime/internal_jobs/key-coordinator.js +747 -0
- package/service/runtime/internal_jobs/projection.d.ts +3 -0
- package/service/runtime/internal_jobs/projection.js +42 -0
- package/service/runtime/internal_jobs/runtime-worker.d.ts +126 -0
- package/service/runtime/internal_jobs/runtime-worker.js +454 -0
- package/service/runtime/internal_jobs/types.d.ts +246 -0
- package/service/runtime/internal_jobs/types.js +163 -0
- package/service/runtime/logger.d.ts +2 -0
- package/service/runtime/logger.js +7 -0
- package/service/runtime/runtime.d.ts +16 -0
- package/service/runtime/runtime.js +1 -0
- package/service/runtime/service.d.ts +372 -0
- package/service/runtime/service.js +1896 -0
- package/service/runtime/transfer/download.d.ts +27 -0
- package/service/runtime/transfer/download.js +1 -0
- package/service/runtime/transfer/protocol.d.ts +15 -0
- package/service/runtime/transfer/protocol.js +46 -0
- package/service/runtime/transfer/queue.d.ts +18 -0
- package/service/runtime/transfer/queue.js +136 -0
- package/service/runtime/transfer/upload.d.ts +40 -0
- package/service/runtime/transfer/upload.js +27 -0
- package/service/runtime/transfer.d.ts +62 -0
- package/service/runtime/transfer.js +763 -0
- package/session.d.ts +862 -0
- package/session.js +3407 -0
- package/store.d.ts +71 -0
- package/store.js +412 -0
- package/store_entry.d.ts +20 -0
- package/store_entry.js +75 -0
- package/tasks.d.ts +10 -0
- package/tasks.js +28 -0
- package/telemetry/carrier.d.ts +8 -0
- package/telemetry/carrier.js +20 -0
- package/telemetry/core.d.ts +7 -0
- package/telemetry/core.js +14 -0
- package/telemetry/env.d.ts +2 -0
- package/telemetry/env.js +10 -0
- package/telemetry/init.d.ts +2 -0
- package/telemetry/init.js +7 -0
- package/telemetry/metrics.d.ts +81 -0
- package/telemetry/metrics.js +267 -0
- package/telemetry/mod.d.ts +13 -0
- package/telemetry/mod.js +8 -0
- package/telemetry/nats.d.ts +6 -0
- package/telemetry/nats.js +6 -0
- package/telemetry/result.d.ts +1 -0
- package/telemetry/result.js +18 -0
- package/telemetry/runtime.d.ts +1 -0
- package/telemetry/runtime.js +141 -0
- package/telemetry/trace.d.ts +4 -0
- package/telemetry/trace.js +26 -0
- package/telemetry/trellis.d.ts +1 -0
- package/telemetry/trellis.js +1 -0
- package/telemetry.d.ts +1 -0
- package/telemetry.js +1 -0
- package/transfer.d.ts +112 -0
- package/transfer.js +525 -0
- package/transfer_protocol.d.ts +1 -0
- package/transfer_protocol.js +13 -0
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
/* @ts-self-types="./trellis_protocol_wasm.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Opaque Rust-owned authorization context retained for repeated proof verification.
|
|
5
|
+
*/
|
|
6
|
+
export class VerifiedAuthorizationContextHandle {
|
|
7
|
+
static __wrap(ptr) {
|
|
8
|
+
const obj = Object.create(VerifiedAuthorizationContextHandle.prototype);
|
|
9
|
+
obj.__wbg_ptr = ptr;
|
|
10
|
+
VerifiedAuthorizationContextHandleFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
11
|
+
return obj;
|
|
12
|
+
}
|
|
13
|
+
__destroy_into_raw() {
|
|
14
|
+
const ptr = this.__wbg_ptr;
|
|
15
|
+
this.__wbg_ptr = 0;
|
|
16
|
+
VerifiedAuthorizationContextHandleFinalization.unregister(this);
|
|
17
|
+
return ptr;
|
|
18
|
+
}
|
|
19
|
+
free() {
|
|
20
|
+
const ptr = this.__destroy_into_raw();
|
|
21
|
+
wasm.__wbg_verifiedauthorizationcontexthandle_free(ptr, 0);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Require the retained context to be eligible at the supplied current time.
|
|
25
|
+
* @param {string} policy_json
|
|
26
|
+
*/
|
|
27
|
+
assert_current(policy_json) {
|
|
28
|
+
const ptr0 = passStringToWasm0(policy_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
29
|
+
const len0 = WASM_VECTOR_LEN;
|
|
30
|
+
const ret = wasm.verifiedauthorizationcontexthandle_assert_current(this.__wbg_ptr, ptr0, len0);
|
|
31
|
+
if (ret[1]) {
|
|
32
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Return the verified context projection used by the TypeScript cache.
|
|
37
|
+
* @returns {string}
|
|
38
|
+
*/
|
|
39
|
+
projection() {
|
|
40
|
+
let deferred2_0;
|
|
41
|
+
let deferred2_1;
|
|
42
|
+
try {
|
|
43
|
+
const ret = wasm.verifiedauthorizationcontexthandle_projection(this.__wbg_ptr);
|
|
44
|
+
var ptr1 = ret[0];
|
|
45
|
+
var len1 = ret[1];
|
|
46
|
+
if (ret[3]) {
|
|
47
|
+
ptr1 = 0; len1 = 0;
|
|
48
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
49
|
+
}
|
|
50
|
+
deferred2_0 = ptr1;
|
|
51
|
+
deferred2_1 = len1;
|
|
52
|
+
return getStringFromWasm0(ptr1, len1);
|
|
53
|
+
} finally {
|
|
54
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (Symbol.dispose) VerifiedAuthorizationContextHandle.prototype[Symbol.dispose] = VerifiedAuthorizationContextHandle.prototype.free;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Verify an online-issued context once and retain it inside WASM.
|
|
62
|
+
* @param {string} issuer_json
|
|
63
|
+
* @param {string} context_json
|
|
64
|
+
* @param {string} policy_json
|
|
65
|
+
* @param {boolean} historical
|
|
66
|
+
* @returns {VerifiedAuthorizationContextHandle}
|
|
67
|
+
*/
|
|
68
|
+
export function create_authorization_context_handle(issuer_json, context_json, policy_json, historical) {
|
|
69
|
+
const ptr0 = passStringToWasm0(issuer_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
70
|
+
const len0 = WASM_VECTOR_LEN;
|
|
71
|
+
const ptr1 = passStringToWasm0(context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
72
|
+
const len1 = WASM_VECTOR_LEN;
|
|
73
|
+
const ptr2 = passStringToWasm0(policy_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
74
|
+
const len2 = WASM_VECTOR_LEN;
|
|
75
|
+
const ret = wasm.create_authorization_context_handle(ptr0, len0, ptr1, len1, ptr2, len2, historical);
|
|
76
|
+
if (ret[2]) {
|
|
77
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
78
|
+
}
|
|
79
|
+
return VerifiedAuthorizationContextHandle.__wrap(ret[0]);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Decode and query-bind a shared versioned pagination cursor.
|
|
84
|
+
* @param {string} encoded
|
|
85
|
+
* @param {string} query_digest
|
|
86
|
+
* @returns {string}
|
|
87
|
+
*/
|
|
88
|
+
export function decode_pagination_cursor(encoded, query_digest) {
|
|
89
|
+
let deferred4_0;
|
|
90
|
+
let deferred4_1;
|
|
91
|
+
try {
|
|
92
|
+
const ptr0 = passStringToWasm0(encoded, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
93
|
+
const len0 = WASM_VECTOR_LEN;
|
|
94
|
+
const ptr1 = passStringToWasm0(query_digest, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
95
|
+
const len1 = WASM_VECTOR_LEN;
|
|
96
|
+
const ret = wasm.decode_pagination_cursor(ptr0, len0, ptr1, len1);
|
|
97
|
+
var ptr3 = ret[0];
|
|
98
|
+
var len3 = ret[1];
|
|
99
|
+
if (ret[3]) {
|
|
100
|
+
ptr3 = 0; len3 = 0;
|
|
101
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
102
|
+
}
|
|
103
|
+
deferred4_0 = ptr3;
|
|
104
|
+
deferred4_1 = len3;
|
|
105
|
+
return getStringFromWasm0(ptr3, len3);
|
|
106
|
+
} finally {
|
|
107
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Encode a JSON value as a shared versioned pagination cursor.
|
|
113
|
+
* @param {string} query_digest
|
|
114
|
+
* @param {string} after_json
|
|
115
|
+
* @returns {string}
|
|
116
|
+
*/
|
|
117
|
+
export function encode_pagination_cursor(query_digest, after_json) {
|
|
118
|
+
let deferred4_0;
|
|
119
|
+
let deferred4_1;
|
|
120
|
+
try {
|
|
121
|
+
const ptr0 = passStringToWasm0(query_digest, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
122
|
+
const len0 = WASM_VECTOR_LEN;
|
|
123
|
+
const ptr1 = passStringToWasm0(after_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
124
|
+
const len1 = WASM_VECTOR_LEN;
|
|
125
|
+
const ret = wasm.encode_pagination_cursor(ptr0, len0, ptr1, len1);
|
|
126
|
+
var ptr3 = ret[0];
|
|
127
|
+
var len3 = ret[1];
|
|
128
|
+
if (ret[3]) {
|
|
129
|
+
ptr3 = 0; len3 = 0;
|
|
130
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
131
|
+
}
|
|
132
|
+
deferred4_0 = ptr3;
|
|
133
|
+
deferred4_1 = len3;
|
|
134
|
+
return getStringFromWasm0(ptr3, len3);
|
|
135
|
+
} finally {
|
|
136
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Derive an API-qualified event base subject.
|
|
142
|
+
* @param {string} api_id
|
|
143
|
+
* @param {string} action
|
|
144
|
+
* @returns {string}
|
|
145
|
+
*/
|
|
146
|
+
export function event_subject(api_id, action) {
|
|
147
|
+
let deferred4_0;
|
|
148
|
+
let deferred4_1;
|
|
149
|
+
try {
|
|
150
|
+
const ptr0 = passStringToWasm0(api_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
151
|
+
const len0 = WASM_VECTOR_LEN;
|
|
152
|
+
const ptr1 = passStringToWasm0(action, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
153
|
+
const len1 = WASM_VECTOR_LEN;
|
|
154
|
+
const ret = wasm.event_subject(ptr0, len0, ptr1, len1);
|
|
155
|
+
var ptr3 = ret[0];
|
|
156
|
+
var len3 = ret[1];
|
|
157
|
+
if (ret[3]) {
|
|
158
|
+
ptr3 = 0; len3 = 0;
|
|
159
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
160
|
+
}
|
|
161
|
+
deferred4_0 = ptr3;
|
|
162
|
+
deferred4_1 = len3;
|
|
163
|
+
return getStringFromWasm0(ptr3, len3);
|
|
164
|
+
} finally {
|
|
165
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Compute the shared query binding for an opaque pagination cursor.
|
|
171
|
+
* @param {string} endpoint
|
|
172
|
+
* @param {string} query_json
|
|
173
|
+
* @returns {string}
|
|
174
|
+
*/
|
|
175
|
+
export function pagination_query_digest(endpoint, query_json) {
|
|
176
|
+
let deferred4_0;
|
|
177
|
+
let deferred4_1;
|
|
178
|
+
try {
|
|
179
|
+
const ptr0 = passStringToWasm0(endpoint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
180
|
+
const len0 = WASM_VECTOR_LEN;
|
|
181
|
+
const ptr1 = passStringToWasm0(query_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
182
|
+
const len1 = WASM_VECTOR_LEN;
|
|
183
|
+
const ret = wasm.pagination_query_digest(ptr0, len0, ptr1, len1);
|
|
184
|
+
var ptr3 = ret[0];
|
|
185
|
+
var len3 = ret[1];
|
|
186
|
+
if (ret[3]) {
|
|
187
|
+
ptr3 = 0; len3 = 0;
|
|
188
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
189
|
+
}
|
|
190
|
+
deferred4_0 = ptr3;
|
|
191
|
+
deferred4_1 = len3;
|
|
192
|
+
return getStringFromWasm0(ptr3, len3);
|
|
193
|
+
} finally {
|
|
194
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Parse and normalize one strict JSON-encoded session-proof envelope.
|
|
200
|
+
* @param {string} proof_json
|
|
201
|
+
* @returns {string}
|
|
202
|
+
*/
|
|
203
|
+
export function parse_session_proof(proof_json) {
|
|
204
|
+
let deferred3_0;
|
|
205
|
+
let deferred3_1;
|
|
206
|
+
try {
|
|
207
|
+
const ptr0 = passStringToWasm0(proof_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
208
|
+
const len0 = WASM_VECTOR_LEN;
|
|
209
|
+
const ret = wasm.parse_session_proof(ptr0, len0);
|
|
210
|
+
var ptr2 = ret[0];
|
|
211
|
+
var len2 = ret[1];
|
|
212
|
+
if (ret[3]) {
|
|
213
|
+
ptr2 = 0; len2 = 0;
|
|
214
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
215
|
+
}
|
|
216
|
+
deferred3_0 = ptr2;
|
|
217
|
+
deferred3_1 = len2;
|
|
218
|
+
return getStringFromWasm0(ptr2, len2);
|
|
219
|
+
} finally {
|
|
220
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Return the canonical request digest for a JSON-encoded proof-bearing request.
|
|
226
|
+
* @param {string} request_json
|
|
227
|
+
* @returns {string}
|
|
228
|
+
*/
|
|
229
|
+
export function session_proof_request_digest(request_json) {
|
|
230
|
+
let deferred3_0;
|
|
231
|
+
let deferred3_1;
|
|
232
|
+
try {
|
|
233
|
+
const ptr0 = passStringToWasm0(request_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
234
|
+
const len0 = WASM_VECTOR_LEN;
|
|
235
|
+
const ret = wasm.session_proof_request_digest(ptr0, len0);
|
|
236
|
+
var ptr2 = ret[0];
|
|
237
|
+
var len2 = ret[1];
|
|
238
|
+
if (ret[3]) {
|
|
239
|
+
ptr2 = 0; len2 = 0;
|
|
240
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
241
|
+
}
|
|
242
|
+
deferred3_0 = ptr2;
|
|
243
|
+
deferred3_1 = len2;
|
|
244
|
+
return getStringFromWasm0(ptr2, len2);
|
|
245
|
+
} finally {
|
|
246
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Return the canonical signing digest for a JSON-encoded purpose-specific input.
|
|
252
|
+
* @param {string} input_json
|
|
253
|
+
* @returns {string}
|
|
254
|
+
*/
|
|
255
|
+
export function session_proof_signing_digest(input_json) {
|
|
256
|
+
let deferred3_0;
|
|
257
|
+
let deferred3_1;
|
|
258
|
+
try {
|
|
259
|
+
const ptr0 = passStringToWasm0(input_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
260
|
+
const len0 = WASM_VECTOR_LEN;
|
|
261
|
+
const ret = wasm.session_proof_signing_digest(ptr0, len0);
|
|
262
|
+
var ptr2 = ret[0];
|
|
263
|
+
var len2 = ret[1];
|
|
264
|
+
if (ret[3]) {
|
|
265
|
+
ptr2 = 0; len2 = 0;
|
|
266
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
267
|
+
}
|
|
268
|
+
deferred3_0 = ptr2;
|
|
269
|
+
deferred3_1 = len2;
|
|
270
|
+
return getStringFromWasm0(ptr2, len2);
|
|
271
|
+
} finally {
|
|
272
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Verify a live context with its authenticated online issuer entry.
|
|
278
|
+
* @param {string} issuer_json
|
|
279
|
+
* @param {string} context_json
|
|
280
|
+
* @param {string} policy_json
|
|
281
|
+
* @returns {string}
|
|
282
|
+
*/
|
|
283
|
+
export function verify_authorization_context(issuer_json, context_json, policy_json) {
|
|
284
|
+
let deferred5_0;
|
|
285
|
+
let deferred5_1;
|
|
286
|
+
try {
|
|
287
|
+
const ptr0 = passStringToWasm0(issuer_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
288
|
+
const len0 = WASM_VECTOR_LEN;
|
|
289
|
+
const ptr1 = passStringToWasm0(context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
290
|
+
const len1 = WASM_VECTOR_LEN;
|
|
291
|
+
const ptr2 = passStringToWasm0(policy_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
292
|
+
const len2 = WASM_VECTOR_LEN;
|
|
293
|
+
const ret = wasm.verify_authorization_context(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
294
|
+
var ptr4 = ret[0];
|
|
295
|
+
var len4 = ret[1];
|
|
296
|
+
if (ret[3]) {
|
|
297
|
+
ptr4 = 0; len4 = 0;
|
|
298
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
299
|
+
}
|
|
300
|
+
deferred5_0 = ptr4;
|
|
301
|
+
deferred5_1 = len4;
|
|
302
|
+
return getStringFromWasm0(ptr4, len4);
|
|
303
|
+
} finally {
|
|
304
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Verify one context-bound authorization event proof from a JSON argument.
|
|
310
|
+
*
|
|
311
|
+
* The result is always a JSON object. Successful results have `ok: true` and
|
|
312
|
+
* contain verified publisher/context metadata; rejected inputs have `ok: false`
|
|
313
|
+
* and a stable authorization error code and path. Event context chains are
|
|
314
|
+
* checked at their signed historical boundary before the strict event-time
|
|
315
|
+
* window is evaluated.
|
|
316
|
+
* @param {VerifiedAuthorizationContextHandle} context
|
|
317
|
+
* @param {string} event_json
|
|
318
|
+
* @param {Uint8Array} payload
|
|
319
|
+
* @returns {string}
|
|
320
|
+
*/
|
|
321
|
+
export function verify_authorization_event(context, event_json, payload) {
|
|
322
|
+
let deferred3_0;
|
|
323
|
+
let deferred3_1;
|
|
324
|
+
try {
|
|
325
|
+
_assertClass(context, VerifiedAuthorizationContextHandle);
|
|
326
|
+
const ptr0 = passStringToWasm0(event_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
327
|
+
const len0 = WASM_VECTOR_LEN;
|
|
328
|
+
const ptr1 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
|
|
329
|
+
const len1 = WASM_VECTOR_LEN;
|
|
330
|
+
const ret = wasm.verify_authorization_event(context.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
331
|
+
deferred3_0 = ret[0];
|
|
332
|
+
deferred3_1 = ret[1];
|
|
333
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
334
|
+
} finally {
|
|
335
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Verify one context-bound authorization request proof from a JSON argument.
|
|
341
|
+
*
|
|
342
|
+
* The result is always a JSON object. Successful results have `ok: true` and
|
|
343
|
+
* contain the verified context digest; rejected inputs have `ok: false`
|
|
344
|
+
* and a stable authorization error code and path.
|
|
345
|
+
* @param {VerifiedAuthorizationContextHandle} context
|
|
346
|
+
* @param {string} request_json
|
|
347
|
+
* @param {Uint8Array} payload
|
|
348
|
+
* @returns {string}
|
|
349
|
+
*/
|
|
350
|
+
export function verify_authorization_request(context, request_json, payload) {
|
|
351
|
+
let deferred3_0;
|
|
352
|
+
let deferred3_1;
|
|
353
|
+
try {
|
|
354
|
+
_assertClass(context, VerifiedAuthorizationContextHandle);
|
|
355
|
+
const ptr0 = passStringToWasm0(request_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
356
|
+
const len0 = WASM_VECTOR_LEN;
|
|
357
|
+
const ptr1 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
|
|
358
|
+
const len1 = WASM_VECTOR_LEN;
|
|
359
|
+
const ret = wasm.verify_authorization_request(context.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
360
|
+
deferred3_0 = ret[0];
|
|
361
|
+
deferred3_1 = ret[1];
|
|
362
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
363
|
+
} finally {
|
|
364
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Verify a JSON-encoded session proof.
|
|
370
|
+
* @param {string} input_json
|
|
371
|
+
* @param {string} proof_json
|
|
372
|
+
* @param {string} signer_public_key
|
|
373
|
+
* @param {number} now_ms
|
|
374
|
+
* @param {number} maximum_age_ms
|
|
375
|
+
* @param {number} maximum_future_skew_ms
|
|
376
|
+
*/
|
|
377
|
+
export function verify_session_proof(input_json, proof_json, signer_public_key, now_ms, maximum_age_ms, maximum_future_skew_ms) {
|
|
378
|
+
const ptr0 = passStringToWasm0(input_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
379
|
+
const len0 = WASM_VECTOR_LEN;
|
|
380
|
+
const ptr1 = passStringToWasm0(proof_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
381
|
+
const len1 = WASM_VECTOR_LEN;
|
|
382
|
+
const ptr2 = passStringToWasm0(signer_public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
383
|
+
const len2 = WASM_VECTOR_LEN;
|
|
384
|
+
const ret = wasm.verify_session_proof(ptr0, len0, ptr1, len1, ptr2, len2, now_ms, maximum_age_ms, maximum_future_skew_ms);
|
|
385
|
+
if (ret[1]) {
|
|
386
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
function __wbg_get_imports() {
|
|
390
|
+
const import0 = {
|
|
391
|
+
__proto__: null,
|
|
392
|
+
__wbg_Error_fdd633d4bb5dd76a: function(arg0, arg1) {
|
|
393
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
394
|
+
return ret;
|
|
395
|
+
},
|
|
396
|
+
__wbg___wbindgen_throw_ea4887a5f8f9a9db: function(arg0, arg1) {
|
|
397
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
398
|
+
},
|
|
399
|
+
__wbindgen_init_externref_table: function() {
|
|
400
|
+
const table = wasm.__wbindgen_externrefs;
|
|
401
|
+
const offset = table.grow(4);
|
|
402
|
+
table.set(0, undefined);
|
|
403
|
+
table.set(offset + 0, undefined);
|
|
404
|
+
table.set(offset + 1, null);
|
|
405
|
+
table.set(offset + 2, true);
|
|
406
|
+
table.set(offset + 3, false);
|
|
407
|
+
},
|
|
408
|
+
};
|
|
409
|
+
return {
|
|
410
|
+
__proto__: null,
|
|
411
|
+
"./trellis_protocol_wasm_bg.js": import0,
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
const VerifiedAuthorizationContextHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
416
|
+
? { register: () => {}, unregister: () => {} }
|
|
417
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_verifiedauthorizationcontexthandle_free(ptr, 1));
|
|
418
|
+
|
|
419
|
+
function _assertClass(instance, klass) {
|
|
420
|
+
if (!(instance instanceof klass)) {
|
|
421
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
function getStringFromWasm0(ptr, len) {
|
|
426
|
+
return decodeText(ptr >>> 0, len);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
let cachedUint8ArrayMemory0 = null;
|
|
430
|
+
function getUint8ArrayMemory0() {
|
|
431
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
432
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
433
|
+
}
|
|
434
|
+
return cachedUint8ArrayMemory0;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
438
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
439
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
440
|
+
WASM_VECTOR_LEN = arg.length;
|
|
441
|
+
return ptr;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
445
|
+
if (realloc === undefined) {
|
|
446
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
447
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
448
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
449
|
+
WASM_VECTOR_LEN = buf.length;
|
|
450
|
+
return ptr;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
let len = arg.length;
|
|
454
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
455
|
+
|
|
456
|
+
const mem = getUint8ArrayMemory0();
|
|
457
|
+
|
|
458
|
+
let offset = 0;
|
|
459
|
+
|
|
460
|
+
for (; offset < len; offset++) {
|
|
461
|
+
const code = arg.charCodeAt(offset);
|
|
462
|
+
if (code > 0x7F) break;
|
|
463
|
+
mem[ptr + offset] = code;
|
|
464
|
+
}
|
|
465
|
+
if (offset !== len) {
|
|
466
|
+
if (offset !== 0) {
|
|
467
|
+
arg = arg.slice(offset);
|
|
468
|
+
}
|
|
469
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
470
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
471
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
472
|
+
|
|
473
|
+
offset += ret.written;
|
|
474
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
WASM_VECTOR_LEN = offset;
|
|
478
|
+
return ptr;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
function takeFromExternrefTable0(idx) {
|
|
482
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
483
|
+
wasm.__externref_table_dealloc(idx);
|
|
484
|
+
return value;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
488
|
+
cachedTextDecoder.decode();
|
|
489
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
490
|
+
let numBytesDecoded = 0;
|
|
491
|
+
function decodeText(ptr, len) {
|
|
492
|
+
numBytesDecoded += len;
|
|
493
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
494
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
495
|
+
cachedTextDecoder.decode();
|
|
496
|
+
numBytesDecoded = len;
|
|
497
|
+
}
|
|
498
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
const cachedTextEncoder = new TextEncoder();
|
|
502
|
+
|
|
503
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
504
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
505
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
506
|
+
view.set(buf);
|
|
507
|
+
return {
|
|
508
|
+
read: arg.length,
|
|
509
|
+
written: buf.length
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
let WASM_VECTOR_LEN = 0;
|
|
515
|
+
|
|
516
|
+
let wasmModule, wasmInstance, wasm;
|
|
517
|
+
function __wbg_finalize_init(instance, module) {
|
|
518
|
+
wasmInstance = instance;
|
|
519
|
+
wasm = instance.exports;
|
|
520
|
+
wasmModule = module;
|
|
521
|
+
cachedUint8ArrayMemory0 = null;
|
|
522
|
+
wasm.__wbindgen_start();
|
|
523
|
+
return wasm;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
async function __wbg_load(module, imports) {
|
|
527
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
528
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
529
|
+
try {
|
|
530
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
531
|
+
} catch (e) {
|
|
532
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
533
|
+
|
|
534
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
535
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
536
|
+
|
|
537
|
+
} else { throw e; }
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
const bytes = await module.arrayBuffer();
|
|
542
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
543
|
+
} else {
|
|
544
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
545
|
+
|
|
546
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
547
|
+
return { instance, module };
|
|
548
|
+
} else {
|
|
549
|
+
return instance;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
function expectedResponseType(type) {
|
|
554
|
+
switch (type) {
|
|
555
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
556
|
+
}
|
|
557
|
+
return false;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
function initSync(module) {
|
|
562
|
+
if (wasm !== undefined) return wasm;
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
if (module !== undefined) {
|
|
566
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
567
|
+
({module} = module)
|
|
568
|
+
} else {
|
|
569
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
const imports = __wbg_get_imports();
|
|
574
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
575
|
+
module = new WebAssembly.Module(module);
|
|
576
|
+
}
|
|
577
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
578
|
+
return __wbg_finalize_init(instance, module);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
async function __wbg_init(module_or_path) {
|
|
582
|
+
if (wasm !== undefined) return wasm;
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
if (module_or_path !== undefined) {
|
|
586
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
587
|
+
({module_or_path} = module_or_path)
|
|
588
|
+
} else {
|
|
589
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
const imports = __wbg_get_imports();
|
|
595
|
+
|
|
596
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
597
|
+
module_or_path = fetch(module_or_path);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
601
|
+
|
|
602
|
+
return __wbg_finalize_init(instance, module);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
export { initSync, __wbg_init as default };
|
|
Binary file
|