@bitcredit/bcr-ebill-wasm 0.3.9 → 0.3.11
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 +21 -0
- package/index.d.ts +304 -264
- package/index.js +116 -50
- package/index_bg.wasm +0 -0
- package/package.json +2 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Bitcredit
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/index.d.ts
CHANGED
|
@@ -8,193 +8,16 @@ export function task_worker_entry_point(ptr: number): void;
|
|
|
8
8
|
export enum ContactTypeWeb {
|
|
9
9
|
Person = 0,
|
|
10
10
|
Company = 1,
|
|
11
|
+
Anon = 2,
|
|
11
12
|
}
|
|
12
13
|
export enum IdentityTypeWeb {
|
|
14
|
+
Ident = 0,
|
|
15
|
+
Anon = 1,
|
|
16
|
+
}
|
|
17
|
+
export enum SwitchIdentityTypeWeb {
|
|
13
18
|
Person = 0,
|
|
14
19
|
Company = 1,
|
|
15
20
|
}
|
|
16
|
-
export interface NotificationWeb {
|
|
17
|
-
id: string;
|
|
18
|
-
node_id: string | undefined;
|
|
19
|
-
notification_type: NotificationTypeWeb;
|
|
20
|
-
reference_id: string | undefined;
|
|
21
|
-
description: string;
|
|
22
|
-
datetime: string;
|
|
23
|
-
active: boolean;
|
|
24
|
-
payload: any | undefined;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type NotificationTypeWeb = "General" | "Bill";
|
|
28
|
-
|
|
29
|
-
export interface CompaniesResponse {
|
|
30
|
-
companies: CompanyWeb[];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface CompanyWeb {
|
|
34
|
-
id: string;
|
|
35
|
-
name: string;
|
|
36
|
-
country_of_registration: string | undefined;
|
|
37
|
-
city_of_registration: string | undefined;
|
|
38
|
-
postal_address: PostalAddressWeb;
|
|
39
|
-
email: string;
|
|
40
|
-
registration_number: string | undefined;
|
|
41
|
-
registration_date: string | undefined;
|
|
42
|
-
proof_of_registration_file: FileWeb | undefined;
|
|
43
|
-
logo_file: FileWeb | undefined;
|
|
44
|
-
signatories: string[];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface CreateCompanyPayload {
|
|
48
|
-
name: string;
|
|
49
|
-
country_of_registration: string | undefined;
|
|
50
|
-
city_of_registration: string | undefined;
|
|
51
|
-
postal_address: PostalAddressWeb;
|
|
52
|
-
email: string;
|
|
53
|
-
registration_number: string | undefined;
|
|
54
|
-
registration_date: string | undefined;
|
|
55
|
-
proof_of_registration_file_upload_id: string | undefined;
|
|
56
|
-
logo_file_upload_id: string | undefined;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface EditCompanyPayload {
|
|
60
|
-
id: string;
|
|
61
|
-
name: string | undefined;
|
|
62
|
-
email: string | undefined;
|
|
63
|
-
postal_address: OptionalPostalAddressWeb;
|
|
64
|
-
country_of_registration: string | undefined;
|
|
65
|
-
city_of_registration: string | undefined;
|
|
66
|
-
registration_number: string | undefined;
|
|
67
|
-
registration_date: string | undefined;
|
|
68
|
-
logo_file_upload_id: string | undefined;
|
|
69
|
-
proof_of_registration_file_upload_id: string | undefined;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface AddSignatoryPayload {
|
|
73
|
-
id: string;
|
|
74
|
-
signatory_node_id: string;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface RemoveSignatoryPayload {
|
|
78
|
-
id: string;
|
|
79
|
-
signatory_node_id: string;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export interface ListSignatoriesResponse {
|
|
83
|
-
signatories: SignatoryResponse[];
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface SignatoryResponse {
|
|
87
|
-
t: ContactTypeWeb;
|
|
88
|
-
node_id: string;
|
|
89
|
-
name: string;
|
|
90
|
-
postal_address: PostalAddressWeb;
|
|
91
|
-
avatar_file: FileWeb | undefined;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface ContactsResponse {
|
|
95
|
-
contacts: ContactWeb[];
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export interface NewContactPayload {
|
|
99
|
-
t: number;
|
|
100
|
-
node_id: string;
|
|
101
|
-
name: string;
|
|
102
|
-
email: string;
|
|
103
|
-
postal_address: PostalAddressWeb;
|
|
104
|
-
date_of_birth_or_registration: string | undefined;
|
|
105
|
-
country_of_birth_or_registration: string | undefined;
|
|
106
|
-
city_of_birth_or_registration: string | undefined;
|
|
107
|
-
identification_number: string | undefined;
|
|
108
|
-
avatar_file_upload_id: string | undefined;
|
|
109
|
-
proof_document_file_upload_id: string | undefined;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export interface EditContactPayload {
|
|
113
|
-
node_id: string;
|
|
114
|
-
name: string | undefined;
|
|
115
|
-
email: string | undefined;
|
|
116
|
-
postal_address: OptionalPostalAddressWeb;
|
|
117
|
-
date_of_birth_or_registration: string | undefined;
|
|
118
|
-
country_of_birth_or_registration: string | undefined;
|
|
119
|
-
city_of_birth_or_registration: string | undefined;
|
|
120
|
-
identification_number: string | undefined;
|
|
121
|
-
avatar_file_upload_id: string | undefined;
|
|
122
|
-
proof_document_file_upload_id: string | undefined;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export interface ContactWeb {
|
|
126
|
-
t: ContactTypeWeb;
|
|
127
|
-
node_id: string;
|
|
128
|
-
name: string;
|
|
129
|
-
email: string;
|
|
130
|
-
postal_address: PostalAddressWeb;
|
|
131
|
-
date_of_birth_or_registration: string | undefined;
|
|
132
|
-
country_of_birth_or_registration: string | undefined;
|
|
133
|
-
city_of_birth_or_registration: string | undefined;
|
|
134
|
-
identification_number: string | undefined;
|
|
135
|
-
avatar_file: FileWeb | undefined;
|
|
136
|
-
proof_document_file: FileWeb | undefined;
|
|
137
|
-
nostr_relays: string[];
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export interface SwitchIdentity {
|
|
141
|
-
t: IdentityTypeWeb | undefined;
|
|
142
|
-
node_id: string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export interface NewIdentityPayload {
|
|
146
|
-
name: string;
|
|
147
|
-
email: string;
|
|
148
|
-
postal_address: OptionalPostalAddressWeb;
|
|
149
|
-
date_of_birth: string | undefined;
|
|
150
|
-
country_of_birth: string | undefined;
|
|
151
|
-
city_of_birth: string | undefined;
|
|
152
|
-
identification_number: string | undefined;
|
|
153
|
-
profile_picture_file_upload_id: string | undefined;
|
|
154
|
-
identity_document_file_upload_id: string | undefined;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export interface ChangeIdentityPayload {
|
|
158
|
-
name: string | undefined;
|
|
159
|
-
email: string | undefined;
|
|
160
|
-
postal_address: OptionalPostalAddressWeb;
|
|
161
|
-
date_of_birth: string | undefined;
|
|
162
|
-
country_of_birth: string | undefined;
|
|
163
|
-
city_of_birth: string | undefined;
|
|
164
|
-
identification_number: string | undefined;
|
|
165
|
-
profile_picture_file_upload_id: string | undefined;
|
|
166
|
-
identity_document_file_upload_id: string | undefined;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export interface IdentityWeb {
|
|
170
|
-
node_id: string;
|
|
171
|
-
name: string;
|
|
172
|
-
email: string;
|
|
173
|
-
bitcoin_public_key: string;
|
|
174
|
-
npub: string;
|
|
175
|
-
postal_address: OptionalPostalAddressWeb;
|
|
176
|
-
date_of_birth: string | undefined;
|
|
177
|
-
country_of_birth: string | undefined;
|
|
178
|
-
city_of_birth: string | undefined;
|
|
179
|
-
identification_number: string | undefined;
|
|
180
|
-
profile_picture_file: FileWeb | undefined;
|
|
181
|
-
identity_document_file: FileWeb | undefined;
|
|
182
|
-
nostr_relay: string | undefined;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export interface SeedPhrase {
|
|
186
|
-
seed_phrase: string;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export interface Config {
|
|
190
|
-
log_level: string | undefined;
|
|
191
|
-
bitcoin_network: string;
|
|
192
|
-
esplora_base_url: string;
|
|
193
|
-
nostr_relay: string;
|
|
194
|
-
job_runner_initial_delay_seconds: number;
|
|
195
|
-
job_runner_check_interval_seconds: number;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
21
|
export interface BillId {
|
|
199
22
|
id: string;
|
|
200
23
|
}
|
|
@@ -280,22 +103,22 @@ export interface BillCombinedBitcoinKeyWeb {
|
|
|
280
103
|
export type BillsFilterRoleWeb = "All" | "Payer" | "Payee" | "Contingent";
|
|
281
104
|
|
|
282
105
|
export interface PastEndorseeWeb {
|
|
283
|
-
pay_to_the_order_of:
|
|
106
|
+
pay_to_the_order_of: LightBillIdentParticipantWeb;
|
|
284
107
|
signed: LightSignedByWeb;
|
|
285
108
|
signing_timestamp: number;
|
|
286
|
-
signing_address: PostalAddressWeb;
|
|
109
|
+
signing_address: PostalAddressWeb | undefined;
|
|
287
110
|
}
|
|
288
111
|
|
|
289
112
|
export interface LightSignedByWeb {
|
|
290
|
-
data:
|
|
291
|
-
signatory:
|
|
113
|
+
data: LightBillParticipantWeb;
|
|
114
|
+
signatory: LightBillIdentParticipantWeb | undefined;
|
|
292
115
|
}
|
|
293
116
|
|
|
294
117
|
export interface EndorsementWeb {
|
|
295
|
-
pay_to_the_order_of:
|
|
118
|
+
pay_to_the_order_of: LightBillIdentParticipantWithAddressWeb;
|
|
296
119
|
signed: LightSignedByWeb;
|
|
297
120
|
signing_timestamp: number;
|
|
298
|
-
signing_address: PostalAddressWeb;
|
|
121
|
+
signing_address: PostalAddressWeb | undefined;
|
|
299
122
|
}
|
|
300
123
|
|
|
301
124
|
export interface BillsSearchFilterPayload {
|
|
@@ -340,8 +163,8 @@ export type PastPaymentStatusWeb = { Paid: number } | { Rejected: number } | { E
|
|
|
340
163
|
|
|
341
164
|
export interface PastPaymentDataSellWeb {
|
|
342
165
|
time_of_request: number;
|
|
343
|
-
buyer:
|
|
344
|
-
seller:
|
|
166
|
+
buyer: BillParticipantWeb;
|
|
167
|
+
seller: BillParticipantWeb;
|
|
345
168
|
currency: string;
|
|
346
169
|
sum: string;
|
|
347
170
|
link_to_pay: string;
|
|
@@ -353,8 +176,8 @@ export interface PastPaymentDataSellWeb {
|
|
|
353
176
|
|
|
354
177
|
export interface PastPaymentDataPaymentWeb {
|
|
355
178
|
time_of_request: number;
|
|
356
|
-
payer:
|
|
357
|
-
payee:
|
|
179
|
+
payer: BillIdentParticipantWeb;
|
|
180
|
+
payee: BillParticipantWeb;
|
|
358
181
|
currency: string;
|
|
359
182
|
sum: string;
|
|
360
183
|
link_to_pay: string;
|
|
@@ -366,8 +189,8 @@ export interface PastPaymentDataPaymentWeb {
|
|
|
366
189
|
|
|
367
190
|
export interface PastPaymentDataRecourseWeb {
|
|
368
191
|
time_of_request: number;
|
|
369
|
-
recourser:
|
|
370
|
-
recoursee:
|
|
192
|
+
recourser: BillIdentParticipantWeb;
|
|
193
|
+
recoursee: BillIdentParticipantWeb;
|
|
371
194
|
currency: string;
|
|
372
195
|
sum: string;
|
|
373
196
|
link_to_pay: string;
|
|
@@ -399,8 +222,8 @@ export type BillCurrentWaitingStateWeb = { Sell: BillWaitingForSellStateWeb } |
|
|
|
399
222
|
|
|
400
223
|
export interface BillWaitingForSellStateWeb {
|
|
401
224
|
time_of_request: number;
|
|
402
|
-
buyer:
|
|
403
|
-
seller:
|
|
225
|
+
buyer: BillParticipantWeb;
|
|
226
|
+
seller: BillParticipantWeb;
|
|
404
227
|
currency: string;
|
|
405
228
|
sum: string;
|
|
406
229
|
link_to_pay: string;
|
|
@@ -410,8 +233,8 @@ export interface BillWaitingForSellStateWeb {
|
|
|
410
233
|
|
|
411
234
|
export interface BillWaitingForPaymentStateWeb {
|
|
412
235
|
time_of_request: number;
|
|
413
|
-
payer:
|
|
414
|
-
payee:
|
|
236
|
+
payer: BillIdentParticipantWeb;
|
|
237
|
+
payee: BillParticipantWeb;
|
|
415
238
|
currency: string;
|
|
416
239
|
sum: string;
|
|
417
240
|
link_to_pay: string;
|
|
@@ -421,8 +244,8 @@ export interface BillWaitingForPaymentStateWeb {
|
|
|
421
244
|
|
|
422
245
|
export interface BillWaitingForRecourseStateWeb {
|
|
423
246
|
time_of_request: number;
|
|
424
|
-
recourser:
|
|
425
|
-
recoursee:
|
|
247
|
+
recourser: BillIdentParticipantWeb;
|
|
248
|
+
recoursee: BillIdentParticipantWeb;
|
|
426
249
|
currency: string;
|
|
427
250
|
sum: string;
|
|
428
251
|
link_to_pay: string;
|
|
@@ -488,20 +311,20 @@ export interface BillDataWeb {
|
|
|
488
311
|
}
|
|
489
312
|
|
|
490
313
|
export interface BillParticipantsWeb {
|
|
491
|
-
drawee:
|
|
492
|
-
drawer:
|
|
493
|
-
payee:
|
|
494
|
-
endorsee:
|
|
314
|
+
drawee: BillIdentParticipantWeb;
|
|
315
|
+
drawer: BillIdentParticipantWeb;
|
|
316
|
+
payee: BillParticipantWeb;
|
|
317
|
+
endorsee: BillParticipantWeb | undefined;
|
|
495
318
|
endorsements_count: number;
|
|
496
319
|
all_participant_node_ids: string[];
|
|
497
320
|
}
|
|
498
321
|
|
|
499
322
|
export interface LightBitcreditBillWeb {
|
|
500
323
|
id: string;
|
|
501
|
-
drawee:
|
|
502
|
-
drawer:
|
|
503
|
-
payee:
|
|
504
|
-
endorsee:
|
|
324
|
+
drawee: LightBillIdentParticipantWeb;
|
|
325
|
+
drawer: LightBillIdentParticipantWeb;
|
|
326
|
+
payee: LightBillParticipantWeb;
|
|
327
|
+
endorsee: LightBillParticipantWeb | undefined;
|
|
505
328
|
active_notification: NotificationWeb | undefined;
|
|
506
329
|
sum: string;
|
|
507
330
|
currency: string;
|
|
@@ -510,28 +333,217 @@ export interface LightBitcreditBillWeb {
|
|
|
510
333
|
time_of_maturity: number;
|
|
511
334
|
}
|
|
512
335
|
|
|
513
|
-
export
|
|
336
|
+
export type BillParticipantWeb = { Anon: BillAnonParticipantWeb } | { Ident: BillIdentParticipantWeb };
|
|
337
|
+
|
|
338
|
+
export interface BillAnonParticipantWeb {
|
|
339
|
+
node_id: string;
|
|
340
|
+
email: string | undefined;
|
|
341
|
+
nostr_relays: string[];
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export interface BillIdentParticipantWeb {
|
|
514
345
|
t: ContactTypeWeb;
|
|
515
346
|
node_id: string;
|
|
516
347
|
name: string;
|
|
517
348
|
postal_address: PostalAddressWeb;
|
|
518
349
|
email: string | undefined;
|
|
519
|
-
|
|
350
|
+
nostr_relays: string[];
|
|
520
351
|
}
|
|
521
352
|
|
|
522
|
-
export interface
|
|
353
|
+
export interface LightBillIdentParticipantWithAddressWeb {
|
|
523
354
|
t: ContactTypeWeb;
|
|
524
355
|
name: string;
|
|
525
356
|
node_id: string;
|
|
526
357
|
postal_address: PostalAddressWeb;
|
|
527
358
|
}
|
|
528
359
|
|
|
529
|
-
export
|
|
360
|
+
export type LightBillParticipantWeb = { Anon: LightBillAnonParticipantWeb } | { Ident: LightBillIdentParticipantWeb };
|
|
361
|
+
|
|
362
|
+
export interface LightBillAnonParticipantWeb {
|
|
363
|
+
node_id: string;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export interface LightBillIdentParticipantWeb {
|
|
530
367
|
t: ContactTypeWeb;
|
|
531
368
|
name: string;
|
|
532
369
|
node_id: string;
|
|
533
370
|
}
|
|
534
371
|
|
|
372
|
+
export interface CompaniesResponse {
|
|
373
|
+
companies: CompanyWeb[];
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export interface CompanyWeb {
|
|
377
|
+
id: string;
|
|
378
|
+
name: string;
|
|
379
|
+
country_of_registration: string | undefined;
|
|
380
|
+
city_of_registration: string | undefined;
|
|
381
|
+
postal_address: PostalAddressWeb;
|
|
382
|
+
email: string;
|
|
383
|
+
registration_number: string | undefined;
|
|
384
|
+
registration_date: string | undefined;
|
|
385
|
+
proof_of_registration_file: FileWeb | undefined;
|
|
386
|
+
logo_file: FileWeb | undefined;
|
|
387
|
+
signatories: string[];
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export interface CreateCompanyPayload {
|
|
391
|
+
name: string;
|
|
392
|
+
country_of_registration: string | undefined;
|
|
393
|
+
city_of_registration: string | undefined;
|
|
394
|
+
postal_address: PostalAddressWeb;
|
|
395
|
+
email: string;
|
|
396
|
+
registration_number: string | undefined;
|
|
397
|
+
registration_date: string | undefined;
|
|
398
|
+
proof_of_registration_file_upload_id: string | undefined;
|
|
399
|
+
logo_file_upload_id: string | undefined;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export interface EditCompanyPayload {
|
|
403
|
+
id: string;
|
|
404
|
+
name: string | undefined;
|
|
405
|
+
email: string | undefined;
|
|
406
|
+
postal_address: OptionalPostalAddressWeb;
|
|
407
|
+
country_of_registration: string | undefined;
|
|
408
|
+
city_of_registration: string | undefined;
|
|
409
|
+
registration_number: string | undefined;
|
|
410
|
+
registration_date: string | undefined;
|
|
411
|
+
logo_file_upload_id: string | undefined;
|
|
412
|
+
proof_of_registration_file_upload_id: string | undefined;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export interface AddSignatoryPayload {
|
|
416
|
+
id: string;
|
|
417
|
+
signatory_node_id: string;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export interface RemoveSignatoryPayload {
|
|
421
|
+
id: string;
|
|
422
|
+
signatory_node_id: string;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export interface ListSignatoriesResponse {
|
|
426
|
+
signatories: SignatoryResponse[];
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export interface SignatoryResponse {
|
|
430
|
+
t: ContactTypeWeb;
|
|
431
|
+
node_id: string;
|
|
432
|
+
name: string;
|
|
433
|
+
postal_address: PostalAddressWeb;
|
|
434
|
+
avatar_file: FileWeb | undefined;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export interface ContactsResponse {
|
|
438
|
+
contacts: ContactWeb[];
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
export interface NewContactPayload {
|
|
442
|
+
t: number;
|
|
443
|
+
node_id: string;
|
|
444
|
+
name: string;
|
|
445
|
+
email: string | undefined;
|
|
446
|
+
postal_address: PostalAddressWeb | undefined;
|
|
447
|
+
date_of_birth_or_registration: string | undefined;
|
|
448
|
+
country_of_birth_or_registration: string | undefined;
|
|
449
|
+
city_of_birth_or_registration: string | undefined;
|
|
450
|
+
identification_number: string | undefined;
|
|
451
|
+
avatar_file_upload_id: string | undefined;
|
|
452
|
+
proof_document_file_upload_id: string | undefined;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export interface EditContactPayload {
|
|
456
|
+
node_id: string;
|
|
457
|
+
name: string | undefined;
|
|
458
|
+
email: string | undefined;
|
|
459
|
+
postal_address: OptionalPostalAddressWeb;
|
|
460
|
+
date_of_birth_or_registration: string | undefined;
|
|
461
|
+
country_of_birth_or_registration: string | undefined;
|
|
462
|
+
city_of_birth_or_registration: string | undefined;
|
|
463
|
+
identification_number: string | undefined;
|
|
464
|
+
avatar_file_upload_id: string | undefined;
|
|
465
|
+
proof_document_file_upload_id: string | undefined;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export interface ContactWeb {
|
|
469
|
+
t: ContactTypeWeb;
|
|
470
|
+
node_id: string;
|
|
471
|
+
name: string;
|
|
472
|
+
email: string | undefined;
|
|
473
|
+
postal_address: PostalAddressWeb | undefined;
|
|
474
|
+
date_of_birth_or_registration: string | undefined;
|
|
475
|
+
country_of_birth_or_registration: string | undefined;
|
|
476
|
+
city_of_birth_or_registration: string | undefined;
|
|
477
|
+
identification_number: string | undefined;
|
|
478
|
+
avatar_file: FileWeb | undefined;
|
|
479
|
+
proof_document_file: FileWeb | undefined;
|
|
480
|
+
nostr_relays: string[];
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
export interface SwitchIdentity {
|
|
484
|
+
t: SwitchIdentityTypeWeb | undefined;
|
|
485
|
+
node_id: string;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
export interface NewIdentityPayload {
|
|
489
|
+
t: number;
|
|
490
|
+
name: string;
|
|
491
|
+
email: string | undefined;
|
|
492
|
+
postal_address: OptionalPostalAddressWeb;
|
|
493
|
+
date_of_birth: string | undefined;
|
|
494
|
+
country_of_birth: string | undefined;
|
|
495
|
+
city_of_birth: string | undefined;
|
|
496
|
+
identification_number: string | undefined;
|
|
497
|
+
profile_picture_file_upload_id: string | undefined;
|
|
498
|
+
identity_document_file_upload_id: string | undefined;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export interface ChangeIdentityPayload {
|
|
502
|
+
name: string | undefined;
|
|
503
|
+
email: string | undefined;
|
|
504
|
+
postal_address: OptionalPostalAddressWeb;
|
|
505
|
+
date_of_birth: string | undefined;
|
|
506
|
+
country_of_birth: string | undefined;
|
|
507
|
+
city_of_birth: string | undefined;
|
|
508
|
+
identification_number: string | undefined;
|
|
509
|
+
profile_picture_file_upload_id: string | undefined;
|
|
510
|
+
identity_document_file_upload_id: string | undefined;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export interface IdentityWeb {
|
|
514
|
+
t: IdentityTypeWeb;
|
|
515
|
+
node_id: string;
|
|
516
|
+
name: string;
|
|
517
|
+
email: string | undefined;
|
|
518
|
+
bitcoin_public_key: string;
|
|
519
|
+
npub: string;
|
|
520
|
+
postal_address: OptionalPostalAddressWeb;
|
|
521
|
+
date_of_birth: string | undefined;
|
|
522
|
+
country_of_birth: string | undefined;
|
|
523
|
+
city_of_birth: string | undefined;
|
|
524
|
+
identification_number: string | undefined;
|
|
525
|
+
profile_picture_file: FileWeb | undefined;
|
|
526
|
+
identity_document_file: FileWeb | undefined;
|
|
527
|
+
nostr_relays: string[];
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export interface SeedPhrase {
|
|
531
|
+
seed_phrase: string;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export interface NotificationWeb {
|
|
535
|
+
id: string;
|
|
536
|
+
node_id: string | undefined;
|
|
537
|
+
notification_type: NotificationTypeWeb;
|
|
538
|
+
reference_id: string | undefined;
|
|
539
|
+
description: string;
|
|
540
|
+
datetime: string;
|
|
541
|
+
active: boolean;
|
|
542
|
+
payload: any | undefined;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
export type NotificationTypeWeb = "General" | "Bill";
|
|
546
|
+
|
|
535
547
|
export interface StatusResponse {
|
|
536
548
|
bitcoin_network: string;
|
|
537
549
|
app_version: string;
|
|
@@ -622,7 +634,7 @@ export interface UploadFileResponse {
|
|
|
622
634
|
file_upload_id: string;
|
|
623
635
|
}
|
|
624
636
|
|
|
625
|
-
export type JsErrorType = "FieldEmpty" | "InvalidSum" | "InvalidCurrency" | "InvalidPaymentAddress" | "InvalidContentType" | "InvalidContactType" | "InvalidDate" | "IssueDateAfterMaturityDate" | "MaturityDateInThePast" | "InvalidFileUploadId" | "InvalidBillType" | "DraweeCantBePayee" | "EndorserCantBeEndorsee" | "BuyerCantBeSeller" | "RecourserCantBeRecoursee" | "DraweeNotInContacts" | "PayeeNotInContacts" | "MintNotInContacts" | "BuyerNotInContacts" | "EndorseeNotInContacts" | "RecourseeNotInContacts" | "NoFileForFileUploadId" | "NotFound" | "ExternalApi" | "Io" | "Crypto" | "Persistence" | "Blockchain" | "Serialization" | "Init" | "NotificationNetwork" | "NotificationMessage" | "InvalidOperation" | "BillAlreadyAccepted" | "BillWasRejectedToAccept" | "BillAcceptanceExpired" | "BillWasRejectedToPay" | "BillPaymentExpired" | "BillWasRejectedToRecourse" | "BillRequestToRecourseExpired" | "BillWasRecoursedToTheEnd" | "BillAlreadyRequestedToAccept" | "BillNotAccepted" | "CallerIsNotDrawee" | "CallerIsNotHolder" | "CallerIsNotRecoursee" | "CallerIsNotBuyer" | "RequestAlreadyExpired" | "RequestAlreadyRejected" | "BillAlreadyPaid" | "BillWasNotRequestedToAccept" | "BillWasNotRequestedToPay" | "BillWasNotOfferedToSell" | "BillRequestToAcceptDidNotExpireAndWasNotRejected" | "BillRequestToPayDidNotExpireAndWasNotRejected" | "RecourseeNotPastHolder" | "BillWasNotRequestedToRecourse" | "BillIsNotRequestedToRecourseAndWaitingForPayment" | "BillIsNotOfferToSellWaitingForPayment" | "BillSellDataInvalid" | "BillRecourseDataInvalid" | "BillIsRequestedToPayAndWaitingForPayment" | "BillIsOfferedToSellAndWaitingForPayment" | "BillIsInRecourseAndWaitingForPayment" | "BillWasRequestedToPay" | "
|
|
637
|
+
export type JsErrorType = "FieldEmpty" | "InvalidSum" | "InvalidCurrency" | "InvalidPaymentAddress" | "InvalidContentType" | "IdentityCantBeAnon" | "IdentityIsNotBillIssuer" | "InvalidContactType" | "InvalidIdentityType" | "InvalidDate" | "SelfDraftedBillCantBeBlank" | "SignerCantBeAnon" | "ContactIsAnonymous" | "InvalidContact" | "IssueDateAfterMaturityDate" | "MaturityDateInThePast" | "InvalidFileUploadId" | "InvalidBillType" | "DraweeCantBePayee" | "EndorserCantBeEndorsee" | "BuyerCantBeSeller" | "RecourserCantBeRecoursee" | "DraweeNotInContacts" | "PayeeNotInContacts" | "MintNotInContacts" | "BuyerNotInContacts" | "EndorseeNotInContacts" | "RecourseeNotInContacts" | "NoFileForFileUploadId" | "NotFound" | "ExternalApi" | "Io" | "Crypto" | "Persistence" | "Blockchain" | "Serialization" | "Init" | "NotificationNetwork" | "NotificationMessage" | "InvalidOperation" | "BillAlreadyAccepted" | "BillWasRejectedToAccept" | "BillAcceptanceExpired" | "BillWasRejectedToPay" | "BillPaymentExpired" | "BillWasRejectedToRecourse" | "BillRequestToRecourseExpired" | "BillWasRecoursedToTheEnd" | "BillAlreadyRequestedToAccept" | "BillNotAccepted" | "CallerIsNotDrawee" | "CallerIsNotHolder" | "CallerIsNotRecoursee" | "CallerIsNotBuyer" | "RequestAlreadyExpired" | "RequestAlreadyRejected" | "BillAlreadyPaid" | "BillWasNotRequestedToAccept" | "BillWasNotRequestedToPay" | "BillWasNotOfferedToSell" | "BillRequestToAcceptDidNotExpireAndWasNotRejected" | "BillRequestToPayDidNotExpireAndWasNotRejected" | "RecourseeNotPastHolder" | "BillWasNotRequestedToRecourse" | "BillIsNotRequestedToRecourseAndWaitingForPayment" | "BillIsNotOfferToSellWaitingForPayment" | "BillSellDataInvalid" | "BillRecourseDataInvalid" | "BillIsRequestedToPayAndWaitingForPayment" | "BillIsOfferedToSellAndWaitingForPayment" | "BillIsInRecourseAndWaitingForPayment" | "BillWasRequestedToPay" | "DrawerIsNotBillIssuer" | "SignatoryNotInContacts" | "SignatoryAlreadySignatory" | "CantRemoveLastSignatory" | "NotASignatory" | "InvalidSecp256k1Key" | "FileIsTooBig" | "InvalidFileName" | "UnknownNodeId" | "BackupNotSupported" | "CallerMustBeSignatory";
|
|
626
638
|
|
|
627
639
|
export interface JsErrorData {
|
|
628
640
|
error: JsErrorType;
|
|
@@ -630,6 +642,15 @@ export interface JsErrorData {
|
|
|
630
642
|
code: number;
|
|
631
643
|
}
|
|
632
644
|
|
|
645
|
+
export interface Config {
|
|
646
|
+
log_level: string | undefined;
|
|
647
|
+
bitcoin_network: string;
|
|
648
|
+
esplora_base_url: string;
|
|
649
|
+
nostr_relays: string[];
|
|
650
|
+
job_runner_initial_delay_seconds: number;
|
|
651
|
+
job_runner_check_interval_seconds: number;
|
|
652
|
+
}
|
|
653
|
+
|
|
633
654
|
export class Api {
|
|
634
655
|
private constructor();
|
|
635
656
|
free(): void;
|
|
@@ -656,15 +677,29 @@ export class Bill {
|
|
|
656
677
|
list(): Promise<BillsResponse>;
|
|
657
678
|
numbers_to_words_for_sum(id: string): Promise<BillNumbersToWordsForSum>;
|
|
658
679
|
detail(id: string): Promise<BitcreditBillWeb>;
|
|
680
|
+
check_payment_for_bill(id: string): Promise<void>;
|
|
659
681
|
check_payment(): Promise<void>;
|
|
660
682
|
issue(payload: BitcreditBillPayload): Promise<BillId>;
|
|
683
|
+
issue_blank(payload: BitcreditBillPayload): Promise<BillId>;
|
|
661
684
|
offer_to_sell(payload: OfferToSellBitcreditBillPayload): Promise<void>;
|
|
685
|
+
/**
|
|
686
|
+
* Blank offer to sell - the contact doesn't have to be an anonymous contact
|
|
687
|
+
*/
|
|
688
|
+
offer_to_sell_blank(payload: OfferToSellBitcreditBillPayload): Promise<void>;
|
|
662
689
|
endorse_bill(payload: EndorseBitcreditBillPayload): Promise<void>;
|
|
690
|
+
/**
|
|
691
|
+
* Blank endorsement - the contact doesn't have to be an anonymous contact
|
|
692
|
+
*/
|
|
693
|
+
endorse_bill_blank(payload: EndorseBitcreditBillPayload): Promise<void>;
|
|
663
694
|
request_to_pay(payload: RequestToPayBitcreditBillPayload): Promise<void>;
|
|
664
695
|
request_to_accept(payload: RequestToAcceptBitcreditBillPayload): Promise<void>;
|
|
665
696
|
accept(payload: AcceptBitcreditBillPayload): Promise<void>;
|
|
666
697
|
request_to_mint(payload: RequestToMintBitcreditBillPayload): Promise<void>;
|
|
667
698
|
mint_bill(payload: MintBitcreditBillPayload): Promise<void>;
|
|
699
|
+
/**
|
|
700
|
+
* Blank mint - the contact doesn't have to be an anonymous contact
|
|
701
|
+
*/
|
|
702
|
+
mint_bill_blank(payload: MintBitcreditBillPayload): Promise<void>;
|
|
668
703
|
reject_to_accept(payload: RejectActionBillPayload): Promise<void>;
|
|
669
704
|
reject_to_pay(payload: RejectActionBillPayload): Promise<void>;
|
|
670
705
|
reject_to_buy(payload: RejectActionBillPayload): Promise<void>;
|
|
@@ -696,6 +731,7 @@ export class Contact {
|
|
|
696
731
|
list(): Promise<ContactsResponse>;
|
|
697
732
|
detail(node_id: string): Promise<ContactWeb>;
|
|
698
733
|
remove(node_id: string): Promise<void>;
|
|
734
|
+
deanonymize(payload: NewContactPayload): Promise<ContactWeb>;
|
|
699
735
|
create(payload: NewContactPayload): Promise<ContactWeb>;
|
|
700
736
|
edit(payload: EditContactPayload): Promise<void>;
|
|
701
737
|
}
|
|
@@ -715,8 +751,9 @@ export class Identity {
|
|
|
715
751
|
static new(): Identity;
|
|
716
752
|
file(file_name: string): Promise<BinaryFileResponse>;
|
|
717
753
|
upload(payload: UploadFile): Promise<UploadFileResponse>;
|
|
718
|
-
detail(): Promise<
|
|
719
|
-
|
|
754
|
+
detail(): Promise<IdentityWeb>;
|
|
755
|
+
deanonymize(payload: NewIdentityPayload): Promise<IdentityWeb>;
|
|
756
|
+
create(payload: NewIdentityPayload): Promise<IdentityWeb>;
|
|
720
757
|
change(payload: ChangeIdentityPayload): Promise<void>;
|
|
721
758
|
active(): Promise<SwitchIdentity>;
|
|
722
759
|
switch(switch_identity_payload: SwitchIdentity): Promise<void>;
|
|
@@ -744,8 +781,6 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
744
781
|
|
|
745
782
|
export interface InitOutput {
|
|
746
783
|
readonly memory: WebAssembly.Memory;
|
|
747
|
-
readonly __wbg_bill_free: (a: number, b: number) => void;
|
|
748
|
-
readonly bill_new: () => number;
|
|
749
784
|
readonly bill_endorsements: (a: number, b: number, c: number) => any;
|
|
750
785
|
readonly bill_past_payments: (a: number, b: number, c: number) => any;
|
|
751
786
|
readonly bill_past_endorsees: (a: number, b: number, c: number) => any;
|
|
@@ -757,15 +792,20 @@ export interface InitOutput {
|
|
|
757
792
|
readonly bill_list: (a: number) => any;
|
|
758
793
|
readonly bill_numbers_to_words_for_sum: (a: number, b: number, c: number) => any;
|
|
759
794
|
readonly bill_detail: (a: number, b: number, c: number) => any;
|
|
795
|
+
readonly bill_check_payment_for_bill: (a: number, b: number, c: number) => any;
|
|
760
796
|
readonly bill_check_payment: (a: number) => any;
|
|
761
797
|
readonly bill_issue: (a: number, b: any) => any;
|
|
798
|
+
readonly bill_issue_blank: (a: number, b: any) => any;
|
|
762
799
|
readonly bill_offer_to_sell: (a: number, b: any) => any;
|
|
800
|
+
readonly bill_offer_to_sell_blank: (a: number, b: any) => any;
|
|
763
801
|
readonly bill_endorse_bill: (a: number, b: any) => any;
|
|
802
|
+
readonly bill_endorse_bill_blank: (a: number, b: any) => any;
|
|
764
803
|
readonly bill_request_to_pay: (a: number, b: any) => any;
|
|
765
804
|
readonly bill_request_to_accept: (a: number, b: any) => any;
|
|
766
805
|
readonly bill_accept: (a: number, b: any) => any;
|
|
767
806
|
readonly bill_request_to_mint: (a: number, b: any) => any;
|
|
768
807
|
readonly bill_mint_bill: (a: number, b: any) => any;
|
|
808
|
+
readonly bill_mint_bill_blank: (a: number, b: any) => any;
|
|
769
809
|
readonly bill_reject_to_accept: (a: number, b: any) => any;
|
|
770
810
|
readonly bill_reject_to_pay: (a: number, b: any) => any;
|
|
771
811
|
readonly bill_reject_to_buy: (a: number, b: any) => any;
|
|
@@ -773,25 +813,60 @@ export interface InitOutput {
|
|
|
773
813
|
readonly bill_request_to_recourse_bill_payment: (a: number, b: any) => any;
|
|
774
814
|
readonly bill_request_to_recourse_bill_acceptance: (a: number, b: any) => any;
|
|
775
815
|
readonly bill_clear_bill_cache: (a: number) => any;
|
|
776
|
-
readonly
|
|
816
|
+
readonly company_file: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
817
|
+
readonly company_upload: (a: number, b: any) => any;
|
|
818
|
+
readonly company_list: (a: number) => any;
|
|
819
|
+
readonly company_list_signatories: (a: number, b: number, c: number) => any;
|
|
820
|
+
readonly company_detail: (a: number, b: number, c: number) => any;
|
|
821
|
+
readonly company_create: (a: number, b: any) => any;
|
|
822
|
+
readonly company_edit: (a: number, b: any) => any;
|
|
823
|
+
readonly company_add_signatory: (a: number, b: any) => any;
|
|
824
|
+
readonly company_remove_signatory: (a: number, b: any) => any;
|
|
825
|
+
readonly contact_file: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
826
|
+
readonly contact_upload: (a: number, b: any) => any;
|
|
827
|
+
readonly contact_list: (a: number) => any;
|
|
828
|
+
readonly contact_detail: (a: number, b: number, c: number) => any;
|
|
829
|
+
readonly contact_remove: (a: number, b: number, c: number) => any;
|
|
830
|
+
readonly contact_deanonymize: (a: number, b: any) => any;
|
|
831
|
+
readonly contact_create: (a: number, b: any) => any;
|
|
832
|
+
readonly contact_edit: (a: number, b: any) => any;
|
|
833
|
+
readonly general_status: (a: number) => any;
|
|
834
|
+
readonly general_currencies: (a: number) => any;
|
|
835
|
+
readonly general_temp_file: (a: number, b: number, c: number) => any;
|
|
836
|
+
readonly general_overview: (a: number, b: number, c: number) => any;
|
|
837
|
+
readonly general_search: (a: number, b: any) => any;
|
|
777
838
|
readonly identity_file: (a: number, b: number, c: number) => any;
|
|
778
839
|
readonly identity_upload: (a: number, b: any) => any;
|
|
779
840
|
readonly identity_detail: (a: number) => any;
|
|
841
|
+
readonly identity_deanonymize: (a: number, b: any) => any;
|
|
780
842
|
readonly identity_create: (a: number, b: any) => any;
|
|
781
843
|
readonly identity_change: (a: number, b: any) => any;
|
|
782
844
|
readonly identity_active: (a: number) => any;
|
|
783
845
|
readonly identity_switch: (a: number, b: any) => any;
|
|
784
846
|
readonly identity_seed_backup: (a: number) => any;
|
|
785
847
|
readonly identity_seed_recover: (a: number, b: any) => any;
|
|
786
|
-
readonly __wbg_notification_free: (a: number, b: number) => void;
|
|
787
848
|
readonly notification_subscribe: (a: number, b: any) => any;
|
|
788
849
|
readonly notification_list: (a: number, b: any) => any;
|
|
789
850
|
readonly notification_mark_as_done: (a: number, b: number, c: number) => any;
|
|
790
851
|
readonly notification_trigger_test_msg: (a: number, b: any) => any;
|
|
791
|
-
readonly
|
|
792
|
-
readonly
|
|
852
|
+
readonly quote_get: (a: number, b: number, c: number) => any;
|
|
853
|
+
readonly quote_accept: (a: number, b: number, c: number) => any;
|
|
793
854
|
readonly __wbg_api_free: (a: number, b: number) => void;
|
|
794
855
|
readonly api_bill: () => number;
|
|
856
|
+
readonly initialize_api: (a: any) => any;
|
|
857
|
+
readonly ring_core_0_17_14__bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
858
|
+
readonly rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
859
|
+
readonly rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
860
|
+
readonly rustsecp256k1_v0_10_0_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
861
|
+
readonly rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
862
|
+
readonly task_worker_entry_point: (a: number) => [number, number];
|
|
863
|
+
readonly company_new: () => number;
|
|
864
|
+
readonly contact_new: () => number;
|
|
865
|
+
readonly general_new: () => number;
|
|
866
|
+
readonly identity_new: () => number;
|
|
867
|
+
readonly notification_new: () => number;
|
|
868
|
+
readonly quote_new: () => number;
|
|
869
|
+
readonly bill_new: () => number;
|
|
795
870
|
readonly api_general: () => number;
|
|
796
871
|
readonly api_identity: () => number;
|
|
797
872
|
readonly api_notification: () => number;
|
|
@@ -799,43 +874,12 @@ export interface InitOutput {
|
|
|
799
874
|
readonly api_company: () => number;
|
|
800
875
|
readonly api_quote: () => number;
|
|
801
876
|
readonly __wbg_quote_free: (a: number, b: number) => void;
|
|
802
|
-
readonly
|
|
803
|
-
readonly quote_get: (a: number, b: number, c: number) => any;
|
|
804
|
-
readonly quote_accept: (a: number, b: number, c: number) => any;
|
|
805
|
-
readonly __wbg_company_free: (a: number, b: number) => void;
|
|
806
|
-
readonly company_new: () => number;
|
|
807
|
-
readonly company_file: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
808
|
-
readonly company_upload: (a: number, b: any) => any;
|
|
809
|
-
readonly company_list: (a: number) => any;
|
|
810
|
-
readonly company_list_signatories: (a: number, b: number, c: number) => any;
|
|
811
|
-
readonly company_detail: (a: number, b: number, c: number) => any;
|
|
812
|
-
readonly company_create: (a: number, b: any) => any;
|
|
813
|
-
readonly company_edit: (a: number, b: any) => any;
|
|
814
|
-
readonly company_add_signatory: (a: number, b: any) => any;
|
|
815
|
-
readonly company_remove_signatory: (a: number, b: any) => any;
|
|
877
|
+
readonly __wbg_bill_free: (a: number, b: number) => void;
|
|
816
878
|
readonly __wbg_general_free: (a: number, b: number) => void;
|
|
817
|
-
readonly
|
|
818
|
-
readonly
|
|
819
|
-
readonly
|
|
820
|
-
readonly general_overview: (a: number, b: number, c: number) => any;
|
|
821
|
-
readonly general_search: (a: number, b: any) => any;
|
|
822
|
-
readonly initialize_api: (a: any) => any;
|
|
823
|
-
readonly general_new: () => number;
|
|
879
|
+
readonly __wbg_notification_free: (a: number, b: number) => void;
|
|
880
|
+
readonly __wbg_company_free: (a: number, b: number) => void;
|
|
881
|
+
readonly __wbg_identity_free: (a: number, b: number) => void;
|
|
824
882
|
readonly __wbg_contact_free: (a: number, b: number) => void;
|
|
825
|
-
readonly contact_new: () => number;
|
|
826
|
-
readonly contact_file: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
827
|
-
readonly contact_upload: (a: number, b: any) => any;
|
|
828
|
-
readonly contact_list: (a: number) => any;
|
|
829
|
-
readonly contact_detail: (a: number, b: number, c: number) => any;
|
|
830
|
-
readonly contact_remove: (a: number, b: number, c: number) => any;
|
|
831
|
-
readonly contact_create: (a: number, b: any) => any;
|
|
832
|
-
readonly contact_edit: (a: number, b: any) => any;
|
|
833
|
-
readonly task_worker_entry_point: (a: number) => [number, number];
|
|
834
|
-
readonly ring_core_0_17_14__bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
835
|
-
readonly rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
836
|
-
readonly rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
837
|
-
readonly rustsecp256k1_v0_10_0_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
838
|
-
readonly rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
839
883
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
840
884
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
841
885
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
@@ -844,14 +888,10 @@ export interface InitOutput {
|
|
|
844
888
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
845
889
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
846
890
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
847
|
-
readonly
|
|
848
|
-
readonly
|
|
849
|
-
readonly
|
|
850
|
-
readonly
|
|
851
|
-
readonly closure5986_externref_shim: (a: number, b: number, c: any) => void;
|
|
852
|
-
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc67bcbb225f7a8a4: (a: number, b: number) => void;
|
|
853
|
-
readonly closure6188_externref_shim: (a: number, b: number, c: any) => void;
|
|
854
|
-
readonly closure6329_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
891
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8272bbffa8fe9e5a: (a: number, b: number) => void;
|
|
892
|
+
readonly closure251_externref_shim: (a: number, b: number, c: any) => void;
|
|
893
|
+
readonly closure732_externref_shim_multivalue_shim: (a: number, b: number, c: any) => [number, number];
|
|
894
|
+
readonly closure506_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
855
895
|
readonly __wbindgen_start: () => void;
|
|
856
896
|
}
|
|
857
897
|
|
package/index.js
CHANGED
|
@@ -228,51 +228,43 @@ export function task_worker_entry_point(ptr) {
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
function __wbg_adapter_54(arg0, arg1) {
|
|
231
|
-
wasm.
|
|
231
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8272bbffa8fe9e5a(arg0, arg1);
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
function __wbg_adapter_57(arg0, arg1, arg2) {
|
|
235
|
-
|
|
235
|
+
wasm.closure251_externref_shim(arg0, arg1, arg2);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function __wbg_adapter_64(arg0, arg1, arg2) {
|
|
239
|
+
const ret = wasm.closure732_externref_shim_multivalue_shim(arg0, arg1, arg2);
|
|
236
240
|
if (ret[1]) {
|
|
237
241
|
throw takeFromExternrefTable0(ret[0]);
|
|
238
242
|
}
|
|
239
243
|
}
|
|
240
244
|
|
|
241
|
-
function
|
|
242
|
-
wasm.
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
function __wbg_adapter_63(arg0, arg1, arg2) {
|
|
246
|
-
wasm.closure5794_externref_shim(arg0, arg1, arg2);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
function __wbg_adapter_66(arg0, arg1, arg2) {
|
|
250
|
-
wasm.closure5986_externref_shim(arg0, arg1, arg2);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
function __wbg_adapter_69(arg0, arg1) {
|
|
254
|
-
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc67bcbb225f7a8a4(arg0, arg1);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
function __wbg_adapter_72(arg0, arg1, arg2) {
|
|
258
|
-
wasm.closure6188_externref_shim(arg0, arg1, arg2);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
function __wbg_adapter_432(arg0, arg1, arg2, arg3) {
|
|
262
|
-
wasm.closure6329_externref_shim(arg0, arg1, arg2, arg3);
|
|
245
|
+
function __wbg_adapter_248(arg0, arg1, arg2, arg3) {
|
|
246
|
+
wasm.closure506_externref_shim(arg0, arg1, arg2, arg3);
|
|
263
247
|
}
|
|
264
248
|
|
|
265
249
|
/**
|
|
266
|
-
* @enum {0 | 1}
|
|
250
|
+
* @enum {0 | 1 | 2}
|
|
267
251
|
*/
|
|
268
252
|
export const ContactTypeWeb = Object.freeze({
|
|
269
253
|
Person: 0, "0": "Person",
|
|
270
254
|
Company: 1, "1": "Company",
|
|
255
|
+
Anon: 2, "2": "Anon",
|
|
271
256
|
});
|
|
272
257
|
/**
|
|
273
258
|
* @enum {0 | 1}
|
|
274
259
|
*/
|
|
275
260
|
export const IdentityTypeWeb = Object.freeze({
|
|
261
|
+
Ident: 0, "0": "Ident",
|
|
262
|
+
Anon: 1, "1": "Anon",
|
|
263
|
+
});
|
|
264
|
+
/**
|
|
265
|
+
* @enum {0 | 1}
|
|
266
|
+
*/
|
|
267
|
+
export const SwitchIdentityTypeWeb = Object.freeze({
|
|
276
268
|
Person: 0, "0": "Person",
|
|
277
269
|
Company: 1, "1": "Company",
|
|
278
270
|
});
|
|
@@ -384,7 +376,7 @@ export class Bill {
|
|
|
384
376
|
* @returns {Bill}
|
|
385
377
|
*/
|
|
386
378
|
static new() {
|
|
387
|
-
const ret = wasm.
|
|
379
|
+
const ret = wasm.api_bill();
|
|
388
380
|
return Bill.__wrap(ret);
|
|
389
381
|
}
|
|
390
382
|
/**
|
|
@@ -490,6 +482,16 @@ export class Bill {
|
|
|
490
482
|
const ret = wasm.bill_detail(this.__wbg_ptr, ptr0, len0);
|
|
491
483
|
return ret;
|
|
492
484
|
}
|
|
485
|
+
/**
|
|
486
|
+
* @param {string} id
|
|
487
|
+
* @returns {Promise<void>}
|
|
488
|
+
*/
|
|
489
|
+
check_payment_for_bill(id) {
|
|
490
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
491
|
+
const len0 = WASM_VECTOR_LEN;
|
|
492
|
+
const ret = wasm.bill_check_payment_for_bill(this.__wbg_ptr, ptr0, len0);
|
|
493
|
+
return ret;
|
|
494
|
+
}
|
|
493
495
|
/**
|
|
494
496
|
* @returns {Promise<void>}
|
|
495
497
|
*/
|
|
@@ -505,6 +507,14 @@ export class Bill {
|
|
|
505
507
|
const ret = wasm.bill_issue(this.__wbg_ptr, payload);
|
|
506
508
|
return ret;
|
|
507
509
|
}
|
|
510
|
+
/**
|
|
511
|
+
* @param {BitcreditBillPayload} payload
|
|
512
|
+
* @returns {BillId}
|
|
513
|
+
*/
|
|
514
|
+
issue_blank(payload) {
|
|
515
|
+
const ret = wasm.bill_issue_blank(this.__wbg_ptr, payload);
|
|
516
|
+
return ret;
|
|
517
|
+
}
|
|
508
518
|
/**
|
|
509
519
|
* @param {OfferToSellBitcreditBillPayload} payload
|
|
510
520
|
* @returns {Promise<void>}
|
|
@@ -513,6 +523,15 @@ export class Bill {
|
|
|
513
523
|
const ret = wasm.bill_offer_to_sell(this.__wbg_ptr, payload);
|
|
514
524
|
return ret;
|
|
515
525
|
}
|
|
526
|
+
/**
|
|
527
|
+
* Blank offer to sell - the contact doesn't have to be an anonymous contact
|
|
528
|
+
* @param {OfferToSellBitcreditBillPayload} payload
|
|
529
|
+
* @returns {Promise<void>}
|
|
530
|
+
*/
|
|
531
|
+
offer_to_sell_blank(payload) {
|
|
532
|
+
const ret = wasm.bill_offer_to_sell_blank(this.__wbg_ptr, payload);
|
|
533
|
+
return ret;
|
|
534
|
+
}
|
|
516
535
|
/**
|
|
517
536
|
* @param {EndorseBitcreditBillPayload} payload
|
|
518
537
|
* @returns {Promise<void>}
|
|
@@ -521,6 +540,15 @@ export class Bill {
|
|
|
521
540
|
const ret = wasm.bill_endorse_bill(this.__wbg_ptr, payload);
|
|
522
541
|
return ret;
|
|
523
542
|
}
|
|
543
|
+
/**
|
|
544
|
+
* Blank endorsement - the contact doesn't have to be an anonymous contact
|
|
545
|
+
* @param {EndorseBitcreditBillPayload} payload
|
|
546
|
+
* @returns {Promise<void>}
|
|
547
|
+
*/
|
|
548
|
+
endorse_bill_blank(payload) {
|
|
549
|
+
const ret = wasm.bill_endorse_bill_blank(this.__wbg_ptr, payload);
|
|
550
|
+
return ret;
|
|
551
|
+
}
|
|
524
552
|
/**
|
|
525
553
|
* @param {RequestToPayBitcreditBillPayload} payload
|
|
526
554
|
* @returns {Promise<void>}
|
|
@@ -561,6 +589,15 @@ export class Bill {
|
|
|
561
589
|
const ret = wasm.bill_mint_bill(this.__wbg_ptr, payload);
|
|
562
590
|
return ret;
|
|
563
591
|
}
|
|
592
|
+
/**
|
|
593
|
+
* Blank mint - the contact doesn't have to be an anonymous contact
|
|
594
|
+
* @param {MintBitcreditBillPayload} payload
|
|
595
|
+
* @returns {Promise<void>}
|
|
596
|
+
*/
|
|
597
|
+
mint_bill_blank(payload) {
|
|
598
|
+
const ret = wasm.bill_mint_bill_blank(this.__wbg_ptr, payload);
|
|
599
|
+
return ret;
|
|
600
|
+
}
|
|
564
601
|
/**
|
|
565
602
|
* @param {RejectActionBillPayload} payload
|
|
566
603
|
* @returns {Promise<void>}
|
|
@@ -647,7 +684,7 @@ export class Company {
|
|
|
647
684
|
* @returns {Company}
|
|
648
685
|
*/
|
|
649
686
|
static new() {
|
|
650
|
-
const ret = wasm.
|
|
687
|
+
const ret = wasm.api_bill();
|
|
651
688
|
return Company.__wrap(ret);
|
|
652
689
|
}
|
|
653
690
|
/**
|
|
@@ -761,7 +798,7 @@ export class Contact {
|
|
|
761
798
|
* @returns {Contact}
|
|
762
799
|
*/
|
|
763
800
|
static new() {
|
|
764
|
-
const ret = wasm.
|
|
801
|
+
const ret = wasm.api_bill();
|
|
765
802
|
return Contact.__wrap(ret);
|
|
766
803
|
}
|
|
767
804
|
/**
|
|
@@ -812,6 +849,14 @@ export class Contact {
|
|
|
812
849
|
const ret = wasm.contact_remove(this.__wbg_ptr, ptr0, len0);
|
|
813
850
|
return ret;
|
|
814
851
|
}
|
|
852
|
+
/**
|
|
853
|
+
* @param {NewContactPayload} payload
|
|
854
|
+
* @returns {ContactWeb}
|
|
855
|
+
*/
|
|
856
|
+
deanonymize(payload) {
|
|
857
|
+
const ret = wasm.contact_deanonymize(this.__wbg_ptr, payload);
|
|
858
|
+
return ret;
|
|
859
|
+
}
|
|
815
860
|
/**
|
|
816
861
|
* @param {NewContactPayload} payload
|
|
817
862
|
* @returns {ContactWeb}
|
|
@@ -859,7 +904,7 @@ export class General {
|
|
|
859
904
|
* @returns {General}
|
|
860
905
|
*/
|
|
861
906
|
static new() {
|
|
862
|
-
const ret = wasm.
|
|
907
|
+
const ret = wasm.api_bill();
|
|
863
908
|
return General.__wrap(ret);
|
|
864
909
|
}
|
|
865
910
|
/**
|
|
@@ -935,7 +980,7 @@ export class Identity {
|
|
|
935
980
|
* @returns {Identity}
|
|
936
981
|
*/
|
|
937
982
|
static new() {
|
|
938
|
-
const ret = wasm.
|
|
983
|
+
const ret = wasm.api_bill();
|
|
939
984
|
return Identity.__wrap(ret);
|
|
940
985
|
}
|
|
941
986
|
/**
|
|
@@ -957,7 +1002,7 @@ export class Identity {
|
|
|
957
1002
|
return ret;
|
|
958
1003
|
}
|
|
959
1004
|
/**
|
|
960
|
-
* @returns {
|
|
1005
|
+
* @returns {IdentityWeb}
|
|
961
1006
|
*/
|
|
962
1007
|
detail() {
|
|
963
1008
|
const ret = wasm.identity_detail(this.__wbg_ptr);
|
|
@@ -965,7 +1010,15 @@ export class Identity {
|
|
|
965
1010
|
}
|
|
966
1011
|
/**
|
|
967
1012
|
* @param {NewIdentityPayload} payload
|
|
968
|
-
* @returns {
|
|
1013
|
+
* @returns {IdentityWeb}
|
|
1014
|
+
*/
|
|
1015
|
+
deanonymize(payload) {
|
|
1016
|
+
const ret = wasm.identity_deanonymize(this.__wbg_ptr, payload);
|
|
1017
|
+
return ret;
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* @param {NewIdentityPayload} payload
|
|
1021
|
+
* @returns {IdentityWeb}
|
|
969
1022
|
*/
|
|
970
1023
|
create(payload) {
|
|
971
1024
|
const ret = wasm.identity_create(this.__wbg_ptr, payload);
|
|
@@ -1040,7 +1093,7 @@ export class Notification {
|
|
|
1040
1093
|
* @returns {Notification}
|
|
1041
1094
|
*/
|
|
1042
1095
|
static new() {
|
|
1043
|
-
const ret = wasm.
|
|
1096
|
+
const ret = wasm.api_bill();
|
|
1044
1097
|
return Notification.__wrap(ret);
|
|
1045
1098
|
}
|
|
1046
1099
|
/**
|
|
@@ -1108,7 +1161,7 @@ export class Quote {
|
|
|
1108
1161
|
* @returns {Quote}
|
|
1109
1162
|
*/
|
|
1110
1163
|
static new() {
|
|
1111
|
-
const ret = wasm.
|
|
1164
|
+
const ret = wasm.api_bill();
|
|
1112
1165
|
return Quote.__wrap(ret);
|
|
1113
1166
|
}
|
|
1114
1167
|
/**
|
|
@@ -1276,6 +1329,9 @@ function __wbg_get_imports() {
|
|
|
1276
1329
|
const ret = Object.entries(arg0);
|
|
1277
1330
|
return ret;
|
|
1278
1331
|
};
|
|
1332
|
+
imports.wbg.__wbg_error_243f933071f88b86 = function(arg0, arg1) {
|
|
1333
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
1334
|
+
};
|
|
1279
1335
|
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
1280
1336
|
let deferred0_0;
|
|
1281
1337
|
let deferred0_1;
|
|
@@ -1302,7 +1358,7 @@ function __wbg_get_imports() {
|
|
|
1302
1358
|
const ret = fetch(arg0);
|
|
1303
1359
|
return ret;
|
|
1304
1360
|
};
|
|
1305
|
-
imports.wbg.
|
|
1361
|
+
imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
|
|
1306
1362
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1307
1363
|
}, arguments) };
|
|
1308
1364
|
imports.wbg.__wbg_getRandomValues_3d90134a348e46b3 = function() { return handleError(function (arg0, arg1) {
|
|
@@ -1417,6 +1473,16 @@ function __wbg_get_imports() {
|
|
|
1417
1473
|
const ret = result;
|
|
1418
1474
|
return ret;
|
|
1419
1475
|
};
|
|
1476
|
+
imports.wbg.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
|
|
1477
|
+
let result;
|
|
1478
|
+
try {
|
|
1479
|
+
result = arg0 instanceof Window;
|
|
1480
|
+
} catch (_) {
|
|
1481
|
+
result = false;
|
|
1482
|
+
}
|
|
1483
|
+
const ret = result;
|
|
1484
|
+
return ret;
|
|
1485
|
+
};
|
|
1420
1486
|
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
1421
1487
|
const ret = Array.isArray(arg0);
|
|
1422
1488
|
return ret;
|
|
@@ -1467,7 +1533,7 @@ function __wbg_get_imports() {
|
|
|
1467
1533
|
const a = state0.a;
|
|
1468
1534
|
state0.a = 0;
|
|
1469
1535
|
try {
|
|
1470
|
-
return
|
|
1536
|
+
return __wbg_adapter_248(a, state0.b, arg0, arg1);
|
|
1471
1537
|
} finally {
|
|
1472
1538
|
state0.a = a;
|
|
1473
1539
|
}
|
|
@@ -1864,32 +1930,32 @@ function __wbg_get_imports() {
|
|
|
1864
1930
|
const ret = false;
|
|
1865
1931
|
return ret;
|
|
1866
1932
|
};
|
|
1867
|
-
imports.wbg.
|
|
1868
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1933
|
+
imports.wbg.__wbindgen_closure_wrapper1555 = function(arg0, arg1, arg2) {
|
|
1934
|
+
const ret = makeMutClosure(arg0, arg1, 495, __wbg_adapter_54);
|
|
1869
1935
|
return ret;
|
|
1870
1936
|
};
|
|
1871
|
-
imports.wbg.
|
|
1872
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1937
|
+
imports.wbg.__wbindgen_closure_wrapper18163 = function(arg0, arg1, arg2) {
|
|
1938
|
+
const ret = makeMutClosure(arg0, arg1, 495, __wbg_adapter_57);
|
|
1873
1939
|
return ret;
|
|
1874
1940
|
};
|
|
1875
|
-
imports.wbg.
|
|
1876
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1941
|
+
imports.wbg.__wbindgen_closure_wrapper18204 = function(arg0, arg1, arg2) {
|
|
1942
|
+
const ret = makeMutClosure(arg0, arg1, 495, __wbg_adapter_54);
|
|
1877
1943
|
return ret;
|
|
1878
1944
|
};
|
|
1879
|
-
imports.wbg.
|
|
1880
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1945
|
+
imports.wbg.__wbindgen_closure_wrapper2248 = function(arg0, arg1, arg2) {
|
|
1946
|
+
const ret = makeMutClosure(arg0, arg1, 252, __wbg_adapter_57);
|
|
1881
1947
|
return ret;
|
|
1882
1948
|
};
|
|
1883
|
-
imports.wbg.
|
|
1884
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1949
|
+
imports.wbg.__wbindgen_closure_wrapper2359 = function(arg0, arg1, arg2) {
|
|
1950
|
+
const ret = makeMutClosure(arg0, arg1, 495, __wbg_adapter_54);
|
|
1885
1951
|
return ret;
|
|
1886
1952
|
};
|
|
1887
|
-
imports.wbg.
|
|
1888
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1953
|
+
imports.wbg.__wbindgen_closure_wrapper7862 = function(arg0, arg1, arg2) {
|
|
1954
|
+
const ret = makeMutClosure(arg0, arg1, 495, __wbg_adapter_57);
|
|
1889
1955
|
return ret;
|
|
1890
1956
|
};
|
|
1891
|
-
imports.wbg.
|
|
1892
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1957
|
+
imports.wbg.__wbindgen_closure_wrapper8874 = function(arg0, arg1, arg2) {
|
|
1958
|
+
const ret = makeMutClosure(arg0, arg1, 252, __wbg_adapter_64);
|
|
1893
1959
|
return ret;
|
|
1894
1960
|
};
|
|
1895
1961
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/index_bg.wasm
CHANGED
|
Binary file
|