@authenticdoc/sdk 0.1.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/LICENSE +10 -0
- package/README.md +130 -0
- package/dist/index.d.ts +173 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +319 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +43 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/wasm/authenticdoc.d.ts +318 -0
- package/dist/wasm/authenticdoc.js +1734 -0
- package/dist/wasm/authenticdoc_bg.wasm +0 -0
- package/dist/wasm/authenticdoc_bg.wasm.d.ts +56 -0
- package/package.json +38 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Role of a participant in a signing envelope. */
|
|
2
|
+
export type EnvelopeRole = "viewer" | "signer";
|
|
3
|
+
/**
|
|
4
|
+
* One named participant of an envelope. `relay` is an opaque hint (a WebSocket
|
|
5
|
+
* URL the SDK does not validate).
|
|
6
|
+
*/
|
|
7
|
+
export interface EnvelopeParticipant {
|
|
8
|
+
role: EnvelopeRole;
|
|
9
|
+
pubkey: string;
|
|
10
|
+
relay: string;
|
|
11
|
+
}
|
|
12
|
+
/** A participant's signature over an envelope's inner document. */
|
|
13
|
+
export interface EnvelopeSignature {
|
|
14
|
+
pubkey: string;
|
|
15
|
+
id: string;
|
|
16
|
+
sig: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A Nostr event/note. Templates, envelopes, identities and badges all
|
|
20
|
+
* serialize as (or wrap) one of these on the wire. Kept loose on purpose —
|
|
21
|
+
* the SDK owns the exact shape; consumers usually round-trip it opaquely.
|
|
22
|
+
*/
|
|
23
|
+
export interface NostrNote {
|
|
24
|
+
id?: string;
|
|
25
|
+
pubkey?: string;
|
|
26
|
+
created_at?: number;
|
|
27
|
+
kind?: number;
|
|
28
|
+
tags?: string[][];
|
|
29
|
+
content?: string;
|
|
30
|
+
sig?: string;
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
/** A template is a Nostr note (parameterized replaceable event). */
|
|
34
|
+
export type Template = NostrNote;
|
|
35
|
+
/** An envelope serializes as its inner Nostr note. */
|
|
36
|
+
export type Envelope = NostrNote;
|
|
37
|
+
/** Result of decoding a data-URL template `content`. */
|
|
38
|
+
export interface DecodedDataUrl {
|
|
39
|
+
mime: string;
|
|
40
|
+
/** Standard (not URL-safe) base64 of the raw bytes. */
|
|
41
|
+
bytes_base64: string;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAIA,mDAAmD;AACnD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,mEAAmE;AACnE,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,oEAAoE;AACpE,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC;AAEjC,sDAAsD;AACtD,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC;AAEjC,wDAAwD;AACxD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,6EAA6E;AAC7E,uCAAuC"}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* An opaque secp256k1 keypair living in WASM memory.
|
|
6
|
+
*
|
|
7
|
+
* Construct one with [`Keypair::generate`] or the `from_*` constructors. The
|
|
8
|
+
* secret key stays inside the WASM module; JS only ever holds this handle.
|
|
9
|
+
* Replaces the FFI crate's `uint64_t` handle table (and its `RwLock`).
|
|
10
|
+
*/
|
|
11
|
+
export class Keypair {
|
|
12
|
+
private constructor();
|
|
13
|
+
free(): void;
|
|
14
|
+
[Symbol.dispose](): void;
|
|
15
|
+
/**
|
|
16
|
+
* Load a keypair from a 64-character hex private key.
|
|
17
|
+
*/
|
|
18
|
+
static fromHex(hex: string): Keypair;
|
|
19
|
+
/**
|
|
20
|
+
* Load a keypair from a BIP-39 mnemonic phrase (English, 12 or 24 words).
|
|
21
|
+
*/
|
|
22
|
+
static fromMnemonic(phrase: string): Keypair;
|
|
23
|
+
/**
|
|
24
|
+
* Load a keypair from a bech32 `nsec1…` string.
|
|
25
|
+
*/
|
|
26
|
+
static fromNsec(nsec: string): Keypair;
|
|
27
|
+
/**
|
|
28
|
+
* Generate a fresh extractable keypair.
|
|
29
|
+
*/
|
|
30
|
+
static generate(): Keypair;
|
|
31
|
+
/**
|
|
32
|
+
* Export the 24-word BIP-39 mnemonic (secret material — handle with care).
|
|
33
|
+
*/
|
|
34
|
+
mnemonic(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Export the bech32 `nsec` (secret material — handle with care).
|
|
37
|
+
*/
|
|
38
|
+
nsec(): string;
|
|
39
|
+
/**
|
|
40
|
+
* The hex-encoded public key.
|
|
41
|
+
*/
|
|
42
|
+
readonly pubkey: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Unwrap a badge addressed to the holder keypair.
|
|
47
|
+
*/
|
|
48
|
+
export function badgeUnwrap(outer_json: string, holder_keypair: Keypair): string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Verify that a badge was issued by `expected_issuer_pubkey`. Throws on
|
|
52
|
+
* mismatch.
|
|
53
|
+
*/
|
|
54
|
+
export function badgeVerify(badge_json: string, expected_issuer_pubkey: string): void;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Wrap a signed inner badge for delivery to a holder.
|
|
58
|
+
*/
|
|
59
|
+
export function badgeWrap(signed_inner_json: string, holder_pubkey: string, issuer_keypair: Keypair): string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Attach signatures via the (non-owner) participant path.
|
|
63
|
+
* `sigs_json` is a JSON array of `EnvelopeSignature`.
|
|
64
|
+
*/
|
|
65
|
+
export function envelopeAddParticipantSigs(envelope_json: string, keypair: Keypair, sigs_json: string): string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Attach signatures via the owner path (idempotent — replaces existing sigs).
|
|
69
|
+
*/
|
|
70
|
+
export function envelopeAddParticipantSigsAsOwner(envelope_json: string, owner_keypair: Keypair, sigs_json: string): string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Produce this keypair's participant signature over the envelope's inner
|
|
74
|
+
* document. Returns the signature as JSON.
|
|
75
|
+
*/
|
|
76
|
+
export function envelopeCreateParticipantSig(envelope_json: string, keypair: Keypair): string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Build a v2 envelope directly from raw file bytes plus metadata.
|
|
80
|
+
*
|
|
81
|
+
* Equivalent to [`template_from_bytes`] + [`envelope_new`]. `id = None`/empty
|
|
82
|
+
* mints a UUID.
|
|
83
|
+
*/
|
|
84
|
+
export function envelopeFromBytes(id: string | null | undefined, title: string, mime: string, bytes: Uint8Array, participants_json: string): string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The envelope's parameter id (matches the wrapped template id).
|
|
88
|
+
*/
|
|
89
|
+
export function envelopeId(envelope_json: string): string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Build a v2 envelope wrapping `template_json` for `participants_json`
|
|
93
|
+
* (a JSON array of `EnvelopeParticipant`).
|
|
94
|
+
*/
|
|
95
|
+
export function envelopeNew(template_json: string, participants_json: string): string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The envelope's participant list as JSON.
|
|
99
|
+
*/
|
|
100
|
+
export function envelopeParticipants(envelope_json: string): string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Sign the envelope's outer Nostr event with `keypair`.
|
|
104
|
+
*/
|
|
105
|
+
export function envelopeSign(envelope_json: string, keypair: Keypair): string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The envelope's `created_at` timestamp (Unix seconds).
|
|
109
|
+
*/
|
|
110
|
+
export function envelopeTimestamp(envelope_json: string): bigint;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Decrypt the envelope title using a participant keypair.
|
|
114
|
+
*/
|
|
115
|
+
export function envelopeTitle(envelope_json: string, keypair: Keypair): string;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Verify a signed envelope (outer event id + signature + shape).
|
|
119
|
+
*/
|
|
120
|
+
export function envelopeVerify(envelope_json: string): void;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Verify every participant signature in the envelope, returning them as JSON.
|
|
124
|
+
*/
|
|
125
|
+
export function envelopeVerifyAllParticipantSigs(envelope_json: string, keypair: Keypair): string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Verify a single peer's signature (`peer_pubkey` hex), returning it as JSON.
|
|
129
|
+
* `keypair` must be a participant able to decrypt the body.
|
|
130
|
+
*/
|
|
131
|
+
export function envelopeVerifyParticipantSig(envelope_json: string, keypair: Keypair, peer_pubkey: string): string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Decrypt and return the inner document as a Nostr note JSON blob.
|
|
135
|
+
*/
|
|
136
|
+
export function envelopeViewDocument(envelope_json: string, keypair: Keypair): string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Parse a Nostr badge-award event into an Identity JSON object.
|
|
140
|
+
*/
|
|
141
|
+
export function identityFromEvent(note_json: string): string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Encode a hex Nostr public key as a bech32 `npub`.
|
|
145
|
+
*/
|
|
146
|
+
export function identityNpub(pubkey_hex: string): string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Build an unsigned Nostr event from an Identity JSON object.
|
|
150
|
+
*/
|
|
151
|
+
export function identityToEvent(identity_json: string): string;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Sign any Nostr note with `keypair`. A zero `created_at` is replaced with the
|
|
155
|
+
* current Unix timestamp before signing.
|
|
156
|
+
*/
|
|
157
|
+
export function noteSign(note_json: string, keypair: Keypair): string;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Add a `description` tag and return the updated template JSON.
|
|
161
|
+
*/
|
|
162
|
+
export function templateAddDescription(template_json: string, description: string): string;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Add a custom tag and return the updated template JSON.
|
|
166
|
+
*/
|
|
167
|
+
export function templateAddTag(template_json: string, key: string, value: string): string;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Extract the body content.
|
|
171
|
+
*/
|
|
172
|
+
export function templateContent(template_json: string): string;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Decode a data-URL `content`, returning JSON
|
|
176
|
+
* `{"mime": <string>, "bytes_base64": <standard base64>}`. Throws if the
|
|
177
|
+
* content is not a base64 data URL.
|
|
178
|
+
*/
|
|
179
|
+
export function templateDecodeDataUrl(template_json: string): string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Read the `description` tag. Throws if absent.
|
|
183
|
+
*/
|
|
184
|
+
export function templateDescription(template_json: string): string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Extract the document id (the `d` parameter tag).
|
|
188
|
+
*/
|
|
189
|
+
export function templateDocumentId(template_json: string): string;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Build a template from raw file bytes, stored as an RFC 2397 data URL.
|
|
193
|
+
*
|
|
194
|
+
* Pass `id = None`/`undefined` or an empty string to mint a UUID.
|
|
195
|
+
*/
|
|
196
|
+
export function templateFromBytes(id: string | null | undefined, title: string, mime: string, bytes: Uint8Array): string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Read the first value of a custom tag. Throws if the tag is absent.
|
|
200
|
+
*/
|
|
201
|
+
export function templateGetTag(template_json: string, key: string): string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Whether the template `content` is a base64 data URL (built via
|
|
205
|
+
* [`template_from_bytes`]).
|
|
206
|
+
*/
|
|
207
|
+
export function templateIsDataUrl(template_json: string): boolean;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Build a new template (UUID + title + body) and return it as JSON.
|
|
211
|
+
*/
|
|
212
|
+
export function templateNew(title: string, body: string): string;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Overwrite the document id and return the updated template JSON.
|
|
216
|
+
*/
|
|
217
|
+
export function templateSetDocumentId(template_json: string, id: string): string;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Set the title and return the updated template JSON.
|
|
221
|
+
*/
|
|
222
|
+
export function templateSetTitle(template_json: string, title: string): string;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Sign a template with `keypair`, returning the signed template JSON.
|
|
226
|
+
*/
|
|
227
|
+
export function templateSign(template_json: string, keypair: Keypair): string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Extract the title.
|
|
231
|
+
*/
|
|
232
|
+
export function templateTitle(template_json: string): string;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Verify a signed template (event id + signature + shape).
|
|
236
|
+
*/
|
|
237
|
+
export function templateVerify(template_json: string): void;
|
|
238
|
+
|
|
239
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
240
|
+
|
|
241
|
+
export interface InitOutput {
|
|
242
|
+
readonly memory: WebAssembly.Memory;
|
|
243
|
+
readonly __wbg_keypair_free: (a: number, b: number) => void;
|
|
244
|
+
readonly badgeUnwrap: (a: number, b: number, c: number, d: number) => void;
|
|
245
|
+
readonly badgeVerify: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
246
|
+
readonly badgeWrap: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
247
|
+
readonly envelopeAddParticipantSigs: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
248
|
+
readonly envelopeAddParticipantSigsAsOwner: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
249
|
+
readonly envelopeCreateParticipantSig: (a: number, b: number, c: number, d: number) => void;
|
|
250
|
+
readonly envelopeFromBytes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
251
|
+
readonly envelopeId: (a: number, b: number, c: number) => void;
|
|
252
|
+
readonly envelopeNew: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
253
|
+
readonly envelopeParticipants: (a: number, b: number, c: number) => void;
|
|
254
|
+
readonly envelopeSign: (a: number, b: number, c: number, d: number) => void;
|
|
255
|
+
readonly envelopeTimestamp: (a: number, b: number, c: number) => void;
|
|
256
|
+
readonly envelopeTitle: (a: number, b: number, c: number, d: number) => void;
|
|
257
|
+
readonly envelopeVerify: (a: number, b: number, c: number) => void;
|
|
258
|
+
readonly envelopeVerifyAllParticipantSigs: (a: number, b: number, c: number, d: number) => void;
|
|
259
|
+
readonly envelopeVerifyParticipantSig: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
260
|
+
readonly envelopeViewDocument: (a: number, b: number, c: number, d: number) => void;
|
|
261
|
+
readonly identityFromEvent: (a: number, b: number, c: number) => void;
|
|
262
|
+
readonly identityNpub: (a: number, b: number, c: number) => void;
|
|
263
|
+
readonly identityToEvent: (a: number, b: number, c: number) => void;
|
|
264
|
+
readonly keypair_fromHex: (a: number, b: number, c: number) => void;
|
|
265
|
+
readonly keypair_fromMnemonic: (a: number, b: number, c: number) => void;
|
|
266
|
+
readonly keypair_fromNsec: (a: number, b: number, c: number) => void;
|
|
267
|
+
readonly keypair_generate: () => number;
|
|
268
|
+
readonly keypair_mnemonic: (a: number, b: number) => void;
|
|
269
|
+
readonly keypair_nsec: (a: number, b: number) => void;
|
|
270
|
+
readonly keypair_pubkey: (a: number, b: number) => void;
|
|
271
|
+
readonly noteSign: (a: number, b: number, c: number, d: number) => void;
|
|
272
|
+
readonly templateAddDescription: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
273
|
+
readonly templateAddTag: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
274
|
+
readonly templateContent: (a: number, b: number, c: number) => void;
|
|
275
|
+
readonly templateDecodeDataUrl: (a: number, b: number, c: number) => void;
|
|
276
|
+
readonly templateDescription: (a: number, b: number, c: number) => void;
|
|
277
|
+
readonly templateDocumentId: (a: number, b: number, c: number) => void;
|
|
278
|
+
readonly templateFromBytes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
279
|
+
readonly templateGetTag: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
280
|
+
readonly templateIsDataUrl: (a: number, b: number, c: number) => void;
|
|
281
|
+
readonly templateNew: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
282
|
+
readonly templateSetDocumentId: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
283
|
+
readonly templateSetTitle: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
284
|
+
readonly templateSign: (a: number, b: number, c: number, d: number) => void;
|
|
285
|
+
readonly templateTitle: (a: number, b: number, c: number) => void;
|
|
286
|
+
readonly templateVerify: (a: number, b: number, c: number) => void;
|
|
287
|
+
readonly rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
288
|
+
readonly rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
289
|
+
readonly rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
290
|
+
readonly rustsecp256k1_v0_10_0_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
291
|
+
readonly __wbindgen_export: (a: number) => void;
|
|
292
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
293
|
+
readonly __wbindgen_export2: (a: number, b: number) => number;
|
|
294
|
+
readonly __wbindgen_export3: (a: number, b: number, c: number, d: number) => number;
|
|
295
|
+
readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
302
|
+
* a precompiled `WebAssembly.Module`.
|
|
303
|
+
*
|
|
304
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
305
|
+
*
|
|
306
|
+
* @returns {InitOutput}
|
|
307
|
+
*/
|
|
308
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
312
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
313
|
+
*
|
|
314
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
315
|
+
*
|
|
316
|
+
* @returns {Promise<InitOutput>}
|
|
317
|
+
*/
|
|
318
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|