@bitcredit/bcr-ebill-wasm 0.4.13 → 0.5.0-2

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.
Files changed (4) hide show
  1. package/index.d.ts +919 -906
  2. package/index.js +1844 -1870
  3. package/index_bg.wasm +0 -0
  4. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,39 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function initialize_api(cfg: Config): Promise<void>;
4
3
  /**
5
- * Entry point invoked by JavaScript in a worker.
4
+ * Response for a private key seeed backup
6
5
  */
7
- export function task_worker_entry_point(ptr: number): void;
8
- export enum ContactTypeWeb {
9
- Person = 0,
10
- Company = 1,
11
- Anon = 2,
12
- }
13
- export enum IdentityTypeWeb {
14
- Ident = 0,
15
- Anon = 1,
16
- }
17
- export enum SwitchIdentityTypeWeb {
18
- Person = 0,
19
- Company = 1,
20
- }
21
- export interface Config {
22
- log_level: string | undefined;
23
- app_url: string;
24
- bitcoin_network: string;
25
- esplora_base_url: string;
26
- nostr_relays: string[];
27
- nostr_only_known_contacts: boolean | undefined;
28
- job_runner_initial_delay_seconds: number;
29
- job_runner_check_interval_seconds: number;
30
- transport_initial_subscription_delay_seconds: number | undefined;
31
- default_mint_url: string;
32
- default_mint_node_id: string;
33
- num_confirmations_for_payment: number;
34
- dev_mode: boolean;
35
- disable_mandatory_email_confirmations: boolean;
36
- default_court_url: string;
6
+ export interface SeedPhrase {
7
+ /**
8
+ * The seed phrase of the current private key
9
+ */
10
+ seed_phrase: string;
37
11
  }
38
12
 
39
13
  /**
@@ -44,35 +18,22 @@ export interface Config {
44
18
  */
45
19
  export type TSResult<T> = { Success: T } | { Error: JsErrorData };
46
20
 
47
- export interface NotificationWeb {
48
- id: string;
49
- node_id: string;
50
- notification_type: NotificationTypeWeb;
51
- reference_id: string | undefined;
52
- description: string;
53
- datetime: string;
54
- active: boolean;
55
- payload: any | undefined;
21
+ export interface AcceptBitcreditBillPayload {
22
+ bill_id: string;
56
23
  }
57
24
 
58
- export type NotificationTypeWeb = "General" | "Company" | "Bill" | "Contact";
59
-
60
- export interface NotificationStatusWeb {
61
- node_id: string;
62
- active: boolean;
25
+ export interface AcceptCompanyInvitePayload {
26
+ id: string;
27
+ email: string;
63
28
  }
64
29
 
65
- export interface OptionalPostalAddressWeb {
66
- country: string | undefined;
67
- city: string | undefined;
68
- zip: string | undefined;
69
- address: string | undefined;
30
+ export interface ApproveContactSharePayload {
31
+ pending_share_id: string;
32
+ share_back: boolean;
70
33
  }
71
34
 
72
- export interface GeneralSearchResponse {
73
- bills: LightBitcreditBillWeb[];
74
- contacts: ContactWeb[];
75
- companies: CompanyWeb[];
35
+ export interface BalanceResponse {
36
+ sum: string;
76
37
  }
77
38
 
78
39
  export interface Base64FileResponse {
@@ -81,116 +42,136 @@ export interface Base64FileResponse {
81
42
  content_type: string;
82
43
  }
83
44
 
84
- export interface BalanceResponse {
85
- sum: string;
45
+ export interface BillAcceptanceStatusWeb {
46
+ time_of_request_to_accept: number | undefined;
47
+ requested_to_accept: boolean;
48
+ accepted: boolean;
49
+ request_to_accept_timed_out: boolean;
50
+ rejected_to_accept: boolean;
51
+ acceptance_deadline_timestamp: number | undefined;
86
52
  }
87
53
 
88
- export interface UploadFileResponse {
89
- file_upload_id: string;
54
+ export interface BillAnonParticipantWeb {
55
+ node_id: string;
56
+ nostr_relays: string[];
90
57
  }
91
58
 
92
- export type GeneralSearchFilterItemTypeWeb = "Company" | "Bill" | "Contact";
93
-
94
- export interface CreatePostalAddressWeb {
95
- country: string;
96
- city: string;
97
- zip: string | undefined;
98
- address: string;
59
+ export interface BillCallerActionsWeb {
60
+ bill_actions: BillCallerBillActionWeb[];
99
61
  }
100
62
 
101
- export interface CreateOptionalPostalAddressWeb {
102
- country: string | undefined;
103
- city: string | undefined;
104
- zip: string | undefined;
105
- address: string | undefined;
63
+ export interface BillCombinedBitcoinKeyWeb {
64
+ private_descriptor: string;
106
65
  }
107
66
 
108
- export interface StatusResponse {
109
- bitcoin_network: string;
110
- app_version: string;
67
+ export interface BillDataWeb {
68
+ time_of_drawing: number;
69
+ issue_date: string;
70
+ time_of_maturity: number;
71
+ maturity_date: string;
72
+ country_of_issuing: string;
73
+ city_of_issuing: string;
74
+ country_of_payment: string;
75
+ city_of_payment: string;
76
+ currency: string;
77
+ sum: string;
78
+ files: FileWeb[];
79
+ active_notification: NotificationWeb | undefined;
111
80
  }
112
81
 
113
- export interface OverviewResponse {
114
- currency: string;
115
- balances: OverviewBalanceResponse;
82
+ export interface BillHistoryBlockWeb {
83
+ block_id: number;
84
+ block_type: BillOpCodeWeb;
85
+ pay_to_the_order_of: LightBillParticipantWeb | undefined;
86
+ request_deadline: number | undefined;
87
+ signed: LightSignedByWeb;
88
+ signing_timestamp: number;
89
+ signing_address: PostalAddressWeb | undefined;
116
90
  }
117
91
 
118
- export interface UploadFile {
119
- data: number[];
120
- extension: string | undefined;
121
- name: string;
92
+ export interface BillHistoryResponse {
93
+ blocks: BillHistoryBlockWeb[];
122
94
  }
123
95
 
124
- export interface PostalAddressWeb {
125
- country: string;
126
- city: string;
127
- zip: string | undefined;
128
- address: string;
96
+ export interface BillIdResponse {
97
+ id: string;
129
98
  }
130
99
 
131
- export interface FileWeb {
100
+ export interface BillIdentParticipantWeb {
101
+ t: ContactTypeWeb;
102
+ node_id: string;
132
103
  name: string;
133
- hash: string;
134
- nostr_hash: string;
104
+ postal_address: PostalAddressWeb;
105
+ email: string | undefined;
106
+ nostr_relays: string[];
135
107
  }
136
108
 
137
- export interface CurrencyResponse {
138
- code: string;
109
+ export interface BillMintStatusWeb {
110
+ has_mint_requests: boolean;
139
111
  }
140
112
 
141
- export interface NotificationFilters {
142
- active: boolean | undefined;
143
- reference_id: string | undefined;
144
- notification_type: string | undefined;
145
- node_ids: string[] | undefined;
146
- limit: number | undefined;
147
- offset: number | undefined;
113
+ export interface BillNumbersToWordsForSum {
114
+ sum: number;
115
+ sum_as_words: string;
148
116
  }
149
117
 
150
- export interface GeneralSearchFilter {
151
- search_term: string;
152
- currency: string;
153
- item_types: GeneralSearchFilterItemTypeWeb[];
118
+ export interface BillParticipantsWeb {
119
+ drawee: BillIdentParticipantWeb;
120
+ drawer: BillIdentParticipantWeb;
121
+ payee: BillParticipantWeb;
122
+ endorsee: BillParticipantWeb | undefined;
123
+ endorsements_count: number;
124
+ all_participant_node_ids: string[];
154
125
  }
155
126
 
156
- export interface BinaryFileResponse {
157
- data: number[];
158
- name: string;
159
- content_type: string;
127
+ export interface BillPaymentStatusWeb {
128
+ time_of_request_to_pay: number | undefined;
129
+ requested_to_pay: boolean;
130
+ paid: boolean;
131
+ request_to_pay_timed_out: boolean;
132
+ rejected_to_pay: boolean;
133
+ payment_deadline_timestamp: number | undefined;
160
134
  }
161
135
 
162
- export interface CurrenciesResponse {
163
- currencies: CurrencyResponse[];
136
+ export interface BillRecourseStatusWeb {
137
+ time_of_last_request_to_recourse: number | undefined;
138
+ recoursed: boolean;
139
+ requested_to_recourse: boolean;
140
+ request_to_recourse_timed_out: boolean;
141
+ rejected_request_to_recourse: boolean;
142
+ recourse_deadline_timestamp: number | undefined;
164
143
  }
165
144
 
166
- export interface GeneralSearchFilterPayload {
167
- filter: GeneralSearchFilter;
145
+ export interface BillSellStatusWeb {
146
+ time_of_last_offer_to_sell: number | undefined;
147
+ sold: boolean;
148
+ offered_to_sell: boolean;
149
+ offer_to_sell_timed_out: boolean;
150
+ rejected_offer_to_sell: boolean;
151
+ buying_deadline_timestamp: number | undefined;
168
152
  }
169
153
 
170
- export interface OverviewBalanceResponse {
171
- payee: BalanceResponse;
172
- payer: BalanceResponse;
173
- contingent: BalanceResponse;
154
+ export interface BillStatusWeb {
155
+ acceptance: BillAcceptanceStatusWeb;
156
+ payment: BillPaymentStatusWeb;
157
+ sell: BillSellStatusWeb;
158
+ recourse: BillRecourseStatusWeb;
159
+ mint: BillMintStatusWeb;
160
+ redeemed_funds_available: boolean;
161
+ has_requested_funds: boolean;
162
+ last_block_time: number;
174
163
  }
175
164
 
176
- export interface LightBitcreditBillWeb {
177
- id: string;
178
- drawee: LightBillIdentParticipantWeb;
179
- drawer: LightBillIdentParticipantWeb;
180
- payee: LightBillParticipantWeb;
181
- endorsee: LightBillParticipantWeb | undefined;
182
- active_notification: NotificationWeb | undefined;
183
- sum: string;
184
- currency: string;
185
- issue_date: string;
186
- time_of_drawing: number;
187
- time_of_maturity: number;
188
- last_block_time: number;
165
+ export interface BillWaitingForPaymentStateWeb {
166
+ payer: BillIdentParticipantWeb;
167
+ payee: BillParticipantWeb;
168
+ payment_data: BillWaitingStatePaymentDataWeb;
189
169
  }
190
170
 
191
- export interface LightSignedByWeb {
192
- data: LightBillParticipantWeb;
193
- signatory: LightBillIdentParticipantWeb | undefined;
171
+ export interface BillWaitingForRecourseStateWeb {
172
+ recourser: BillParticipantWeb;
173
+ recoursee: BillIdentParticipantWeb;
174
+ payment_data: BillWaitingStatePaymentDataWeb;
194
175
  }
195
176
 
196
177
  export interface BillWaitingForSellStateWeb {
@@ -199,59 +180,21 @@ export interface BillWaitingForSellStateWeb {
199
180
  payment_data: BillWaitingStatePaymentDataWeb;
200
181
  }
201
182
 
202
- export interface BillCallerActionsWeb {
203
- bill_actions: BillCallerBillActionWeb[];
204
- }
205
-
206
- export interface BillMintStatusWeb {
207
- has_mint_requests: boolean;
183
+ export interface BillWaitingStatePaymentDataWeb {
184
+ time_of_request: number;
185
+ currency: string;
186
+ sum: string;
187
+ link_to_pay: string;
188
+ address_to_pay: string;
189
+ mempool_link_for_address_to_pay: string;
190
+ tx_id: string | undefined;
191
+ in_mempool: boolean;
192
+ confirmations: number;
193
+ payment_deadline: number | undefined;
208
194
  }
209
195
 
210
- export interface DateRange {
211
- from: string;
212
- to: string;
213
- }
214
-
215
- export interface BitcreditBillWeb {
216
- id: string;
217
- participants: BillParticipantsWeb;
218
- data: BillDataWeb;
219
- status: BillStatusWeb;
220
- current_waiting_state: BillCurrentWaitingStateWeb | undefined;
221
- actions: BillCallerActionsWeb;
222
- }
223
-
224
- export type BillOpCodeWeb = "Issue" | "Accept" | "Endorse" | "RequestToAccept" | "RequestToPay" | "OfferToSell" | "Sell" | "Mint" | "RejectToAccept" | "RejectToPay" | "RejectToBuy" | "RejectToPayRecourse" | "RequestRecourse" | "Recourse";
225
-
226
- export interface PastEndorseeWeb {
227
- pay_to_the_order_of: LightBillIdentParticipantWeb;
228
- signed: LightSignedByWeb;
229
- signing_timestamp: number;
230
- signing_address: PostalAddressWeb | undefined;
231
- }
232
-
233
- export type BillParticipantWeb = { Anon: BillAnonParticipantWeb } | { Ident: BillIdentParticipantWeb };
234
-
235
- export interface EndorseBitcreditBillPayload {
236
- endorsee: string;
237
- bill_id: string;
238
- }
239
-
240
- export type BillCallerBillActionWeb = "RequestAcceptance" | "Accept" | "RequestToPay" | "OfferToSell" | "Sell" | "Endorse" | "RequestRecourseForAcceptance" | "RequestRecourseForPayment" | "Recourse" | "Mint" | "RejectAcceptance" | "RejectPayment" | "RejectBuying" | "RejectPaymentForRecourse";
241
-
242
- export interface BillNumbersToWordsForSum {
243
- sum: number;
244
- sum_as_words: string;
245
- }
246
-
247
- export interface BillHistoryBlockWeb {
248
- block_id: number;
249
- block_type: BillOpCodeWeb;
250
- pay_to_the_order_of: LightBillParticipantWeb | undefined;
251
- request_deadline: number | undefined;
252
- signed: LightSignedByWeb;
253
- signing_timestamp: number;
254
- signing_address: PostalAddressWeb | undefined;
196
+ export interface BillsResponse {
197
+ bills: BitcreditBillWeb[];
255
198
  }
256
199
 
257
200
  export interface BillsSearchFilter {
@@ -261,305 +204,327 @@ export interface BillsSearchFilter {
261
204
  currency: string;
262
205
  }
263
206
 
264
- export type PastPaymentResultWeb = { Sell: PastPaymentDataSellWeb } | { Payment: PastPaymentDataPaymentWeb } | { Recourse: PastPaymentDataRecourseWeb };
207
+ export interface BillsSearchFilterPayload {
208
+ filter: BillsSearchFilter;
209
+ }
265
210
 
266
- export interface BillPaymentStatusWeb {
267
- time_of_request_to_pay: number | undefined;
268
- requested_to_pay: boolean;
269
- paid: boolean;
270
- request_to_pay_timed_out: boolean;
271
- rejected_to_pay: boolean;
272
- payment_deadline_timestamp: number | undefined;
211
+ export interface BinaryFileResponse {
212
+ data: number[];
213
+ name: string;
214
+ content_type: string;
273
215
  }
274
216
 
275
- export interface OfferToSellBitcreditBillPayload {
276
- buyer: string;
277
- bill_id: string;
217
+ export interface BitcreditBillPayload {
218
+ t: number;
219
+ country_of_issuing: string;
220
+ city_of_issuing: string;
221
+ issue_date: string;
222
+ maturity_date: string;
223
+ payee: string;
224
+ drawee: string;
278
225
  sum: string;
279
226
  currency: string;
280
- buying_deadline: string;
227
+ country_of_payment: string;
228
+ city_of_payment: string;
229
+ file_upload_ids: string[];
281
230
  }
282
231
 
283
- export interface RequestRecourseForAcceptancePayload {
284
- bill_id: string;
285
- recoursee: string;
286
- recourse_deadline: string;
232
+ export interface BitcreditBillWeb {
233
+ id: string;
234
+ participants: BillParticipantsWeb;
235
+ data: BillDataWeb;
236
+ status: BillStatusWeb;
237
+ current_waiting_state: BillCurrentWaitingStateWeb | undefined;
238
+ actions: BillCallerActionsWeb;
287
239
  }
288
240
 
289
- export interface BillWaitingForPaymentStateWeb {
290
- payer: BillIdentParticipantWeb;
291
- payee: BillParticipantWeb;
292
- payment_data: BillWaitingStatePaymentDataWeb;
241
+ export interface ChangeIdentityEmailPayload {
242
+ email: string;
293
243
  }
294
244
 
295
- export interface BillStatusWeb {
296
- acceptance: BillAcceptanceStatusWeb;
297
- payment: BillPaymentStatusWeb;
298
- sell: BillSellStatusWeb;
299
- recourse: BillRecourseStatusWeb;
300
- mint: BillMintStatusWeb;
301
- redeemed_funds_available: boolean;
302
- has_requested_funds: boolean;
303
- last_block_time: number;
245
+ export interface ChangeIdentityPayload {
246
+ name: string | undefined;
247
+ postal_address: CreateOptionalPostalAddressWeb;
248
+ date_of_birth: string | undefined;
249
+ country_of_birth: string | undefined;
250
+ city_of_birth: string | undefined;
251
+ identification_number: string | undefined;
252
+ profile_picture_file_upload_id: string | undefined;
253
+ identity_document_file_upload_id: string | undefined;
304
254
  }
305
255
 
306
- export type PastPaymentStatusWeb = { Paid: number } | { Rejected: number } | { Expired: number };
256
+ export interface ChangeSignatoryEmailPayload {
257
+ id: string;
258
+ email: string;
259
+ }
307
260
 
308
- export interface AcceptBitcreditBillPayload {
309
- bill_id: string;
261
+ export interface CompaniesResponse {
262
+ companies: CompanyWeb[];
310
263
  }
311
264
 
312
- export interface BillsSearchFilterPayload {
313
- filter: BillsSearchFilter;
265
+ export interface CompanyKeysWeb {
266
+ id: string;
314
267
  }
315
268
 
316
- export interface BillAnonParticipantWeb {
269
+ export interface CompanySignatoryWeb {
317
270
  node_id: string;
318
- nostr_relays: string[];
271
+ status: CompanySignatoryStatusWeb;
319
272
  }
320
273
 
321
- export interface RequestToPayBitcreditBillPayload {
322
- bill_id: string;
323
- currency: string;
324
- payment_deadline: string;
274
+ export interface CompanyWeb {
275
+ id: string;
276
+ name: string;
277
+ country_of_registration: string | undefined;
278
+ city_of_registration: string | undefined;
279
+ postal_address: PostalAddressWeb;
280
+ email: string;
281
+ registration_number: string | undefined;
282
+ registration_date: string | undefined;
283
+ proof_of_registration_file: FileWeb | undefined;
284
+ logo_file: FileWeb | undefined;
285
+ signatories: CompanySignatoryWeb[];
286
+ creation_time: number;
287
+ status: CompanyStatusWeb;
325
288
  }
326
289
 
327
- export interface PastPaymentDataSellWeb {
328
- time_of_request: number;
329
- buyer: BillParticipantWeb;
330
- seller: BillParticipantWeb;
331
- currency: string;
332
- sum: string;
333
- link_to_pay: string;
334
- address_to_pay: string;
335
- private_descriptor_to_spend: string;
336
- mempool_link_for_address_to_pay: string;
337
- status: PastPaymentStatusWeb;
290
+ export interface Config {
291
+ log_level: string | undefined;
292
+ app_url: string;
293
+ bitcoin_network: string;
294
+ esplora_base_url: string;
295
+ nostr_relays: string[];
296
+ nostr_only_known_contacts: boolean | undefined;
297
+ job_runner_initial_delay_seconds: number;
298
+ job_runner_check_interval_seconds: number;
299
+ transport_initial_subscription_delay_seconds: number | undefined;
300
+ default_mint_url: string;
301
+ default_mint_node_id: string;
302
+ num_confirmations_for_payment: number;
303
+ dev_mode: boolean;
304
+ disable_mandatory_email_confirmations: boolean;
305
+ default_court_url: string;
338
306
  }
339
307
 
340
- export interface LightBillIdentParticipantWeb {
341
- t: ContactTypeWeb;
342
- name: string;
343
- node_id: string;
308
+ export interface ConfirmEmailPayload {
309
+ email: string;
344
310
  }
345
311
 
346
- export interface BillWaitingForRecourseStateWeb {
347
- recourser: BillParticipantWeb;
348
- recoursee: BillIdentParticipantWeb;
349
- payment_data: BillWaitingStatePaymentDataWeb;
312
+ export interface ConfirmEmailPayload {
313
+ id: string;
314
+ email: string;
350
315
  }
351
316
 
352
- export interface BillIdentParticipantWeb {
317
+ export interface ContactWeb {
353
318
  t: ContactTypeWeb;
354
319
  node_id: string;
355
320
  name: string;
356
- postal_address: PostalAddressWeb;
357
321
  email: string | undefined;
322
+ postal_address: PostalAddressWeb | undefined;
323
+ date_of_birth_or_registration: string;
324
+ country_of_birth_or_registration: string | undefined;
325
+ city_of_birth_or_registration: string | undefined;
326
+ identification_number: string | undefined;
327
+ avatar_file: FileWeb | undefined;
328
+ proof_document_file: FileWeb | undefined;
358
329
  nostr_relays: string[];
330
+ is_logical: boolean;
359
331
  }
360
332
 
361
- export interface RejectActionBillPayload {
362
- bill_id: string;
363
- }
364
-
365
- export interface BillAcceptanceStatusWeb {
366
- time_of_request_to_accept: number | undefined;
367
- requested_to_accept: boolean;
368
- accepted: boolean;
369
- request_to_accept_timed_out: boolean;
370
- rejected_to_accept: boolean;
371
- acceptance_deadline_timestamp: number | undefined;
372
- }
373
-
374
- export interface EndorsementsResponse {
375
- endorsements: EndorsementWeb[];
333
+ export interface ContactsResponse {
334
+ contacts: ContactWeb[];
376
335
  }
377
336
 
378
- export interface LightBillIdentParticipantWithAddressWeb {
379
- t: ContactTypeWeb;
337
+ export interface CreateCompanyPayload {
338
+ id: string;
380
339
  name: string;
381
- node_id: string;
382
- postal_address: PostalAddressWeb;
383
- }
384
-
385
- export interface PastPaymentDataRecourseWeb {
386
- time_of_request: number;
387
- recourser: BillParticipantWeb;
388
- recoursee: BillIdentParticipantWeb;
389
- currency: string;
390
- sum: string;
391
- link_to_pay: string;
392
- address_to_pay: string;
393
- private_descriptor_to_spend: string;
394
- mempool_link_for_address_to_pay: string;
395
- status: PastPaymentStatusWeb;
340
+ country_of_registration: string | undefined;
341
+ city_of_registration: string | undefined;
342
+ postal_address: CreatePostalAddressWeb;
343
+ email: string;
344
+ registration_number: string | undefined;
345
+ registration_date: string | undefined;
346
+ proof_of_registration_file_upload_id: string | undefined;
347
+ logo_file_upload_id: string | undefined;
348
+ creator_email: string;
396
349
  }
397
350
 
398
- export interface BillParticipantsWeb {
399
- drawee: BillIdentParticipantWeb;
400
- drawer: BillIdentParticipantWeb;
401
- payee: BillParticipantWeb;
402
- endorsee: BillParticipantWeb | undefined;
403
- endorsements_count: number;
404
- all_participant_node_ids: string[];
351
+ export interface CreateOptionalPostalAddressWeb {
352
+ country: string | undefined;
353
+ city: string | undefined;
354
+ zip: string | undefined;
355
+ address: string | undefined;
405
356
  }
406
357
 
407
- export interface RequestToAcceptBitcreditBillPayload {
408
- bill_id: string;
409
- acceptance_deadline: string;
358
+ export interface CreatePostalAddressWeb {
359
+ country: string;
360
+ city: string;
361
+ zip: string | undefined;
362
+ address: string;
410
363
  }
411
364
 
412
- export interface BillHistoryResponse {
413
- blocks: BillHistoryBlockWeb[];
365
+ export interface CurrenciesResponse {
366
+ currencies: CurrencyResponse[];
414
367
  }
415
368
 
416
- export interface BillCombinedBitcoinKeyWeb {
417
- private_descriptor: string;
369
+ export interface CurrencyResponse {
370
+ code: string;
418
371
  }
419
372
 
420
- export interface BitcreditBillPayload {
421
- t: number;
422
- country_of_issuing: string;
423
- city_of_issuing: string;
424
- issue_date: string;
425
- maturity_date: string;
426
- payee: string;
427
- drawee: string;
428
- sum: string;
429
- currency: string;
430
- country_of_payment: string;
431
- city_of_payment: string;
432
- file_upload_ids: string[];
373
+ export interface DateRange {
374
+ from: string;
375
+ to: string;
433
376
  }
434
377
 
435
- export interface BillWaitingStatePaymentDataWeb {
436
- time_of_request: number;
437
- currency: string;
438
- sum: string;
439
- link_to_pay: string;
440
- address_to_pay: string;
441
- mempool_link_for_address_to_pay: string;
442
- tx_id: string | undefined;
443
- in_mempool: boolean;
444
- confirmations: number;
445
- payment_deadline: number | undefined;
378
+ export interface EditCompanyPayload {
379
+ id: string;
380
+ name: string | undefined;
381
+ email: string | undefined;
382
+ postal_address: CreateOptionalPostalAddressWeb;
383
+ country_of_registration: string | undefined;
384
+ city_of_registration: string | undefined;
385
+ registration_number: string | undefined;
386
+ registration_date: string | undefined;
387
+ logo_file_upload_id: string | undefined;
388
+ proof_of_registration_file_upload_id: string | undefined;
446
389
  }
447
390
 
448
- export type BillCurrentWaitingStateWeb = { Sell: BillWaitingForSellStateWeb } | { Payment: BillWaitingForPaymentStateWeb } | { Recourse: BillWaitingForRecourseStateWeb };
449
-
450
- export interface LightBillAnonParticipantWeb {
391
+ export interface EditContactPayload {
451
392
  node_id: string;
393
+ name: string | undefined;
394
+ email: string | undefined;
395
+ postal_address: CreateOptionalPostalAddressWeb;
396
+ date_of_birth_or_registration: string | undefined;
397
+ country_of_birth_or_registration: string | undefined;
398
+ city_of_birth_or_registration: string | undefined;
399
+ identification_number: string | undefined;
400
+ avatar_file_upload_id: string | undefined;
401
+ proof_document_file_upload_id: string | undefined;
452
402
  }
453
403
 
454
- export interface BillsResponse {
455
- bills: BitcreditBillWeb[];
404
+ export interface EndorseBitcreditBillPayload {
405
+ endorsee: string;
406
+ bill_id: string;
456
407
  }
457
408
 
458
- export interface RequestRecourseForPaymentPayload {
459
- bill_id: string;
460
- recoursee: string;
461
- currency: string;
462
- sum: string;
463
- recourse_deadline: string;
409
+ export interface EndorsementWeb {
410
+ pay_to_the_order_of: LightBillParticipantWeb;
411
+ signed: LightSignedByWeb;
412
+ signing_timestamp: number;
413
+ signing_address: PostalAddressWeb | undefined;
464
414
  }
465
415
 
466
- export interface PastPaymentsResponse {
467
- past_payments: PastPaymentResultWeb[];
416
+ export interface EndorsementsResponse {
417
+ endorsements: EndorsementWeb[];
468
418
  }
469
419
 
470
- export interface BillSellStatusWeb {
471
- time_of_last_offer_to_sell: number | undefined;
472
- sold: boolean;
473
- offered_to_sell: boolean;
474
- offer_to_sell_timed_out: boolean;
475
- rejected_offer_to_sell: boolean;
476
- buying_deadline_timestamp: number | undefined;
420
+ export interface FileWeb {
421
+ name: string;
422
+ hash: string;
423
+ nostr_hash: string;
477
424
  }
478
425
 
479
- export interface BillIdResponse {
480
- id: string;
426
+ export interface GeneralSearchFilter {
427
+ search_term: string;
428
+ currency: string;
429
+ item_types: GeneralSearchFilterItemTypeWeb[];
481
430
  }
482
431
 
483
- export interface RequestToMintBitcreditBillPayload {
484
- mint_node: string;
485
- bill_id: string;
432
+ export interface GeneralSearchFilterPayload {
433
+ filter: GeneralSearchFilter;
486
434
  }
487
435
 
488
- export interface EndorsementWeb {
489
- pay_to_the_order_of: LightBillParticipantWeb;
490
- signed: LightSignedByWeb;
491
- signing_timestamp: number;
492
- signing_address: PostalAddressWeb | undefined;
436
+ export interface GeneralSearchResponse {
437
+ bills: LightBitcreditBillWeb[];
438
+ contacts: ContactWeb[];
439
+ companies: CompanyWeb[];
493
440
  }
494
441
 
495
- export interface BillDataWeb {
496
- time_of_drawing: number;
497
- issue_date: string;
498
- time_of_maturity: number;
499
- maturity_date: string;
500
- country_of_issuing: string;
501
- city_of_issuing: string;
502
- country_of_payment: string;
503
- city_of_payment: string;
504
- currency: string;
505
- sum: string;
506
- files: FileWeb[];
507
- active_notification: NotificationWeb | undefined;
442
+ export interface IdentityEmailConfirmationWeb {
443
+ signature: string;
444
+ witness: string;
445
+ node_id: string;
446
+ company_node_id: string | undefined;
447
+ email: string;
448
+ created_at: number;
508
449
  }
509
450
 
510
- export interface PastEndorseesResponse {
511
- past_endorsees: PastEndorseeWeb[];
451
+ export interface IdentityWeb {
452
+ t: IdentityTypeWeb;
453
+ node_id: string;
454
+ name: string;
455
+ email: string | undefined;
456
+ bitcoin_public_key: string;
457
+ npub: string;
458
+ postal_address: OptionalPostalAddressWeb;
459
+ date_of_birth: string | undefined;
460
+ country_of_birth: string | undefined;
461
+ city_of_birth: string | undefined;
462
+ identification_number: string | undefined;
463
+ profile_picture_file: FileWeb | undefined;
464
+ identity_document_file: FileWeb | undefined;
465
+ nostr_relays: string[];
512
466
  }
513
467
 
514
- export type BillsFilterRoleWeb = "All" | "Payer" | "Payee" | "Contingent";
468
+ export interface InviteSignatoryPayload {
469
+ id: string;
470
+ signatory_node_id: string;
471
+ }
515
472
 
516
- export interface BillRecourseStatusWeb {
517
- time_of_last_request_to_recourse: number | undefined;
518
- recoursed: boolean;
519
- requested_to_recourse: boolean;
520
- request_to_recourse_timed_out: boolean;
521
- rejected_request_to_recourse: boolean;
522
- recourse_deadline_timestamp: number | undefined;
473
+ export interface JsErrorData {
474
+ error: JsErrorType;
475
+ message: string;
476
+ code: number;
523
477
  }
524
478
 
525
- export interface ShareBillWithCourtPayload {
526
- bill_id: string;
527
- court_node_id: string;
479
+ export interface LightBillAnonParticipantWeb {
480
+ node_id: string;
528
481
  }
529
482
 
530
- export interface ResyncBillPayload {
531
- bill_id: string;
483
+ export interface LightBillIdentParticipantWeb {
484
+ t: ContactTypeWeb;
485
+ name: string;
486
+ node_id: string;
532
487
  }
533
488
 
534
- export type LightBillParticipantWeb = { Anon: LightBillAnonParticipantWeb } | { Ident: LightBillIdentParticipantWithAddressWeb };
535
-
536
- export interface PastPaymentDataPaymentWeb {
537
- time_of_request: number;
538
- payer: BillIdentParticipantWeb;
539
- payee: BillParticipantWeb;
540
- currency: string;
541
- sum: string;
542
- link_to_pay: string;
543
- address_to_pay: string;
544
- private_descriptor_to_spend: string;
545
- mempool_link_for_address_to_pay: string;
546
- status: PastPaymentStatusWeb;
489
+ export interface LightBillIdentParticipantWithAddressWeb {
490
+ t: ContactTypeWeb;
491
+ name: string;
492
+ node_id: string;
493
+ postal_address: PostalAddressWeb;
547
494
  }
548
495
 
549
496
  export interface LightBillsResponse {
550
497
  bills: LightBitcreditBillWeb[];
551
498
  }
552
499
 
553
- export interface MintRequestWeb {
554
- requester_node_id: string;
555
- bill_id: string;
556
- mint_node_id: string;
557
- mint_request_id: string;
558
- timestamp: number;
559
- status: MintRequestStatusWeb;
500
+ export interface LightBitcreditBillWeb {
501
+ id: string;
502
+ drawee: LightBillIdentParticipantWeb;
503
+ drawer: LightBillIdentParticipantWeb;
504
+ payee: LightBillParticipantWeb;
505
+ endorsee: LightBillParticipantWeb | undefined;
506
+ active_notification: NotificationWeb | undefined;
507
+ sum: string;
508
+ currency: string;
509
+ issue_date: string;
510
+ time_of_drawing: number;
511
+ time_of_maturity: number;
512
+ last_block_time: number;
560
513
  }
561
514
 
562
- export type MintRequestStatusWeb = "Pending" | { Denied: { timestamp: number } } | "Offered" | "Accepted" | { Rejected: { timestamp: number } } | { Cancelled: { timestamp: number } } | { Expired: { timestamp: number } };
515
+ export interface LightSignedByWeb {
516
+ data: LightBillParticipantWeb;
517
+ signatory: LightBillIdentParticipantWeb | undefined;
518
+ }
519
+
520
+ export interface ListSignatoriesResponse {
521
+ signatories: SignatoryResponse[];
522
+ }
523
+
524
+ export interface LocallyHideSignatoryPayload {
525
+ id: string;
526
+ signatory_node_id: string;
527
+ }
563
528
 
564
529
  export interface MintOfferWeb {
565
530
  mint_request_id: string;
@@ -570,148 +535,154 @@ export interface MintOfferWeb {
570
535
  proofs_spent: boolean;
571
536
  }
572
537
 
573
- export interface MintRequestStateWeb {
574
- request: MintRequestWeb;
575
- offer: MintOfferWeb | undefined;
576
- }
577
-
578
538
  export interface MintRequestStateResponse {
579
539
  request_states: MintRequestStateWeb[];
580
540
  }
581
541
 
582
- export interface RemoveSignatoryPayload {
583
- id: string;
584
- signatory_node_id: string;
542
+ export interface MintRequestStateWeb {
543
+ request: MintRequestWeb;
544
+ offer: MintOfferWeb | undefined;
585
545
  }
586
546
 
587
- export interface CompanySignatoryWeb {
588
- node_id: string;
589
- status: CompanySignatoryStatusWeb;
547
+ export interface MintRequestWeb {
548
+ requester_node_id: string;
549
+ bill_id: string;
550
+ mint_node_id: string;
551
+ mint_request_id: string;
552
+ timestamp: number;
553
+ status: MintRequestStatusWeb;
590
554
  }
591
555
 
592
- export interface CompanyWeb {
593
- id: string;
556
+ export interface NewContactPayload {
557
+ t: number;
558
+ node_id: string;
594
559
  name: string;
595
- country_of_registration: string | undefined;
596
- city_of_registration: string | undefined;
597
- postal_address: PostalAddressWeb;
598
- email: string;
599
- registration_number: string | undefined;
600
- registration_date: string | undefined;
601
- proof_of_registration_file: FileWeb | undefined;
602
- logo_file: FileWeb | undefined;
603
- signatories: CompanySignatoryWeb[];
604
- creation_time: number;
605
- status: CompanyStatusWeb;
560
+ email: string | undefined;
561
+ postal_address: CreatePostalAddressWeb | undefined;
562
+ date_of_birth_or_registration: string | undefined;
563
+ country_of_birth_or_registration: string | undefined;
564
+ city_of_birth_or_registration: string | undefined;
565
+ identification_number: string | undefined;
566
+ avatar_file_upload_id: string | undefined;
567
+ proof_document_file_upload_id: string | undefined;
606
568
  }
607
569
 
608
- export interface CreateCompanyPayload {
609
- id: string;
570
+ export interface NewIdentityPayload {
571
+ t: number;
610
572
  name: string;
611
- country_of_registration: string | undefined;
612
- city_of_registration: string | undefined;
613
- postal_address: CreatePostalAddressWeb;
614
- email: string;
615
- registration_number: string | undefined;
616
- registration_date: string | undefined;
617
- proof_of_registration_file_upload_id: string | undefined;
618
- logo_file_upload_id: string | undefined;
619
- creator_email: string;
620
- }
621
-
622
- export interface AcceptCompanyInvitePayload {
623
- id: string;
624
- email: string;
573
+ email: string | undefined;
574
+ postal_address: CreateOptionalPostalAddressWeb;
575
+ date_of_birth: string | undefined;
576
+ country_of_birth: string | undefined;
577
+ city_of_birth: string | undefined;
578
+ identification_number: string | undefined;
579
+ profile_picture_file_upload_id: string | undefined;
580
+ identity_document_file_upload_id: string | undefined;
625
581
  }
626
582
 
627
- export interface LocallyHideSignatoryPayload {
628
- id: string;
629
- signatory_node_id: string;
583
+ export interface NotificationFilters {
584
+ active: boolean | undefined;
585
+ reference_id: string | undefined;
586
+ notification_type: string | undefined;
587
+ node_ids: string[] | undefined;
588
+ limit: number | undefined;
589
+ offset: number | undefined;
630
590
  }
631
591
 
632
- export type CompanyStatusWeb = "Invited" | "Active" | "None";
633
-
634
- export type CompanySignatoryStatusWeb = { Invited: { ts: number; inviter: string } } | { InviteAccepted: { ts: number } } | { InviteRejected: { ts: number } } | { InviteAcceptedIdentityProven: { ts: number; confirmation: IdentityEmailConfirmationWeb } } | { Removed: { ts: number; remover: string } };
635
-
636
- export interface ResyncCompanyPayload {
592
+ export interface NotificationStatusWeb {
637
593
  node_id: string;
594
+ active: boolean;
638
595
  }
639
596
 
640
- export interface ConfirmEmailPayload {
597
+ export interface NotificationWeb {
641
598
  id: string;
642
- email: string;
599
+ node_id: string;
600
+ notification_type: NotificationTypeWeb;
601
+ reference_id: string | undefined;
602
+ description: string;
603
+ datetime: string;
604
+ active: boolean;
605
+ payload: any | undefined;
643
606
  }
644
607
 
645
- export interface VerifyEmailPayload {
646
- id: string;
647
- confirmation_code: string;
608
+ export interface OfferToSellBitcreditBillPayload {
609
+ buyer: string;
610
+ bill_id: string;
611
+ sum: string;
612
+ currency: string;
613
+ buying_deadline: string;
648
614
  }
649
615
 
650
- export interface EditCompanyPayload {
651
- id: string;
652
- name: string | undefined;
653
- email: string | undefined;
654
- postal_address: CreateOptionalPostalAddressWeb;
655
- country_of_registration: string | undefined;
656
- city_of_registration: string | undefined;
657
- registration_number: string | undefined;
658
- registration_date: string | undefined;
659
- logo_file_upload_id: string | undefined;
660
- proof_of_registration_file_upload_id: string | undefined;
616
+ export interface OptionalPostalAddressWeb {
617
+ country: string | undefined;
618
+ city: string | undefined;
619
+ zip: string | undefined;
620
+ address: string | undefined;
661
621
  }
662
622
 
663
- export interface CompanyKeysWeb {
664
- id: string;
623
+ export interface OverviewBalanceResponse {
624
+ payee: BalanceResponse;
625
+ payer: BalanceResponse;
626
+ contingent: BalanceResponse;
665
627
  }
666
628
 
667
- export interface ListSignatoriesResponse {
668
- signatories: SignatoryResponse[];
629
+ export interface OverviewResponse {
630
+ currency: string;
631
+ balances: OverviewBalanceResponse;
669
632
  }
670
633
 
671
- export interface InviteSignatoryPayload {
672
- id: string;
673
- signatory_node_id: string;
634
+ export interface PastEndorseeWeb {
635
+ pay_to_the_order_of: LightBillIdentParticipantWeb;
636
+ signed: LightSignedByWeb;
637
+ signing_timestamp: number;
638
+ signing_address: PostalAddressWeb | undefined;
674
639
  }
675
640
 
676
- export interface ChangeSignatoryEmailPayload {
677
- id: string;
678
- email: string;
641
+ export interface PastEndorseesResponse {
642
+ past_endorsees: PastEndorseeWeb[];
679
643
  }
680
644
 
681
- export interface SignatoryResponse {
682
- t: ContactTypeWeb;
683
- node_id: string;
684
- name: string;
685
- postal_address: PostalAddressWeb | undefined;
686
- avatar_file: FileWeb | undefined;
687
- is_logical: boolean;
688
- signatory: CompanySignatoryWeb;
645
+ export interface PastPaymentDataPaymentWeb {
646
+ time_of_request: number;
647
+ payer: BillIdentParticipantWeb;
648
+ payee: BillParticipantWeb;
649
+ currency: string;
650
+ sum: string;
651
+ link_to_pay: string;
652
+ address_to_pay: string;
653
+ private_descriptor_to_spend: string;
654
+ mempool_link_for_address_to_pay: string;
655
+ status: PastPaymentStatusWeb;
689
656
  }
690
657
 
691
- export interface CompaniesResponse {
692
- companies: CompanyWeb[];
658
+ export interface PastPaymentDataRecourseWeb {
659
+ time_of_request: number;
660
+ recourser: BillParticipantWeb;
661
+ recoursee: BillIdentParticipantWeb;
662
+ currency: string;
663
+ sum: string;
664
+ link_to_pay: string;
665
+ address_to_pay: string;
666
+ private_descriptor_to_spend: string;
667
+ mempool_link_for_address_to_pay: string;
668
+ status: PastPaymentStatusWeb;
693
669
  }
694
670
 
695
- export interface ContactWeb {
696
- t: ContactTypeWeb;
697
- node_id: string;
698
- name: string;
699
- email: string | undefined;
700
- postal_address: PostalAddressWeb | undefined;
701
- date_of_birth_or_registration: string;
702
- country_of_birth_or_registration: string | undefined;
703
- city_of_birth_or_registration: string | undefined;
704
- identification_number: string | undefined;
705
- avatar_file: FileWeb | undefined;
706
- proof_document_file: FileWeb | undefined;
707
- nostr_relays: string[];
708
- is_logical: boolean;
671
+ export interface PastPaymentDataSellWeb {
672
+ time_of_request: number;
673
+ buyer: BillParticipantWeb;
674
+ seller: BillParticipantWeb;
675
+ currency: string;
676
+ sum: string;
677
+ link_to_pay: string;
678
+ address_to_pay: string;
679
+ private_descriptor_to_spend: string;
680
+ mempool_link_for_address_to_pay: string;
681
+ status: PastPaymentStatusWeb;
709
682
  }
710
683
 
711
- export interface SearchContactsPayload {
712
- search_term: string;
713
- include_logical: boolean | undefined;
714
- include_contact: boolean | undefined;
684
+ export interface PastPaymentsResponse {
685
+ past_payments: PastPaymentResultWeb[];
715
686
  }
716
687
 
717
688
  export interface PendingContactShareWeb {
@@ -727,105 +698,69 @@ export interface PendingContactSharesResponse {
727
698
  pending_shares: PendingContactShareWeb[];
728
699
  }
729
700
 
730
- export interface NewContactPayload {
731
- t: number;
732
- node_id: string;
733
- name: string;
734
- email: string | undefined;
735
- postal_address: CreatePostalAddressWeb | undefined;
736
- date_of_birth_or_registration: string | undefined;
737
- country_of_birth_or_registration: string | undefined;
738
- city_of_birth_or_registration: string | undefined;
739
- identification_number: string | undefined;
740
- avatar_file_upload_id: string | undefined;
741
- proof_document_file_upload_id: string | undefined;
701
+ export interface PostalAddressWeb {
702
+ country: string;
703
+ city: string;
704
+ zip: string | undefined;
705
+ address: string;
742
706
  }
743
707
 
744
- export interface EditContactPayload {
745
- node_id: string;
746
- name: string | undefined;
747
- email: string | undefined;
748
- postal_address: CreateOptionalPostalAddressWeb;
749
- date_of_birth_or_registration: string | undefined;
750
- country_of_birth_or_registration: string | undefined;
751
- city_of_birth_or_registration: string | undefined;
752
- identification_number: string | undefined;
753
- avatar_file_upload_id: string | undefined;
754
- proof_document_file_upload_id: string | undefined;
708
+ export interface RejectActionBillPayload {
709
+ bill_id: string;
755
710
  }
756
711
 
757
- export interface ApproveContactSharePayload {
758
- pending_share_id: string;
759
- share_back: boolean;
712
+ export interface RemoveSignatoryPayload {
713
+ id: string;
714
+ signatory_node_id: string;
760
715
  }
761
716
 
762
- export interface ContactsResponse {
763
- contacts: ContactWeb[];
717
+ export interface RequestRecourseForAcceptancePayload {
718
+ bill_id: string;
719
+ recoursee: string;
720
+ recourse_deadline: string;
764
721
  }
765
722
 
766
- export interface ShareContactTo {
767
- /**
768
- * The node id of the identity to share the contact details to
769
- */
770
- recipient: string;
723
+ export interface RequestRecourseForPaymentPayload {
724
+ bill_id: string;
725
+ recoursee: string;
726
+ currency: string;
727
+ sum: string;
728
+ recourse_deadline: string;
771
729
  }
772
730
 
773
- export interface ChangeIdentityPayload {
774
- name: string | undefined;
775
- postal_address: CreateOptionalPostalAddressWeb;
776
- date_of_birth: string | undefined;
777
- country_of_birth: string | undefined;
778
- city_of_birth: string | undefined;
779
- identification_number: string | undefined;
780
- profile_picture_file_upload_id: string | undefined;
781
- identity_document_file_upload_id: string | undefined;
731
+ export interface RequestToAcceptBitcreditBillPayload {
732
+ bill_id: string;
733
+ acceptance_deadline: string;
782
734
  }
783
735
 
784
- export interface ChangeIdentityEmailPayload {
785
- email: string;
736
+ export interface RequestToMintBitcreditBillPayload {
737
+ mint_node: string;
738
+ bill_id: string;
786
739
  }
787
740
 
788
- export interface SwitchIdentity {
789
- t: SwitchIdentityTypeWeb | undefined;
790
- node_id: string;
741
+ export interface RequestToPayBitcreditBillPayload {
742
+ bill_id: string;
743
+ currency: string;
744
+ payment_deadline: string;
791
745
  }
792
746
 
793
- export interface NewIdentityPayload {
794
- t: number;
795
- name: string;
796
- email: string | undefined;
797
- postal_address: CreateOptionalPostalAddressWeb;
798
- date_of_birth: string | undefined;
799
- country_of_birth: string | undefined;
800
- city_of_birth: string | undefined;
801
- identification_number: string | undefined;
802
- profile_picture_file_upload_id: string | undefined;
803
- identity_document_file_upload_id: string | undefined;
747
+ export interface ResyncBillPayload {
748
+ bill_id: string;
804
749
  }
805
750
 
806
- export interface VerifyEmailPayload {
807
- confirmation_code: string;
751
+ export interface ResyncCompanyPayload {
752
+ node_id: string;
808
753
  }
809
754
 
810
- export interface IdentityWeb {
811
- t: IdentityTypeWeb;
812
- node_id: string;
813
- name: string;
814
- email: string | undefined;
815
- bitcoin_public_key: string;
816
- npub: string;
817
- postal_address: OptionalPostalAddressWeb;
818
- date_of_birth: string | undefined;
819
- country_of_birth: string | undefined;
820
- city_of_birth: string | undefined;
821
- identification_number: string | undefined;
822
- profile_picture_file: FileWeb | undefined;
823
- identity_document_file: FileWeb | undefined;
824
- nostr_relays: string[];
755
+ export interface SearchContactsPayload {
756
+ search_term: string;
757
+ include_logical: boolean | undefined;
758
+ include_contact: boolean | undefined;
825
759
  }
826
760
 
827
- export interface ConfirmEmailPayload {
828
- email: string;
761
+ export interface ShareBillWithCourtPayload {
762
+ bill_id: string;
763
+ court_node_id: string;
829
764
  }
830
765
 
831
766
  export interface ShareCompanyContactTo {
@@ -839,374 +774,452 @@ export interface ShareCompanyContactTo {
839
774
  company_id: string;
840
775
  }
841
776
 
842
- export interface IdentityEmailConfirmationWeb {
843
- signature: string;
844
- witness: string;
777
+ export interface ShareContactTo {
778
+ /**
779
+ * The node id of the identity to share the contact details to
780
+ */
781
+ recipient: string;
782
+ }
783
+
784
+ export interface SignatoryResponse {
785
+ t: ContactTypeWeb;
845
786
  node_id: string;
846
- company_node_id: string | undefined;
847
- email: string;
848
- created_at: number;
787
+ name: string;
788
+ postal_address: PostalAddressWeb | undefined;
789
+ avatar_file: FileWeb | undefined;
790
+ is_logical: boolean;
791
+ signatory: CompanySignatoryWeb;
849
792
  }
850
793
 
851
- /**
852
- * Response for a private key seeed backup
853
- */
854
- export interface SeedPhrase {
855
- /**
856
- * The seed phrase of the current private key
857
- */
858
- seed_phrase: string;
794
+ export interface StatusResponse {
795
+ bitcoin_network: string;
796
+ app_version: string;
859
797
  }
860
798
 
861
- export interface JsErrorData {
862
- error: JsErrorType;
863
- message: string;
864
- code: number;
799
+ export interface SwitchIdentity {
800
+ t: SwitchIdentityTypeWeb | undefined;
801
+ node_id: string;
802
+ }
803
+
804
+ export interface UploadFile {
805
+ data: number[];
806
+ extension: string | undefined;
807
+ name: string;
808
+ }
809
+
810
+ export interface UploadFileResponse {
811
+ file_upload_id: string;
812
+ }
813
+
814
+ export interface VerifyEmailPayload {
815
+ confirmation_code: string;
816
+ }
817
+
818
+ export interface VerifyEmailPayload {
819
+ id: string;
820
+ confirmation_code: string;
865
821
  }
866
822
 
823
+ export type BillCallerBillActionWeb = "RequestAcceptance" | "Accept" | "RequestToPay" | "OfferToSell" | "Sell" | "Endorse" | "RequestRecourseForAcceptance" | "RequestRecourseForPayment" | "Recourse" | "Mint" | "RejectAcceptance" | "RejectPayment" | "RejectBuying" | "RejectPaymentForRecourse";
824
+
825
+ export type BillCurrentWaitingStateWeb = { Sell: BillWaitingForSellStateWeb } | { Payment: BillWaitingForPaymentStateWeb } | { Recourse: BillWaitingForRecourseStateWeb };
826
+
827
+ export type BillOpCodeWeb = "Issue" | "Accept" | "Endorse" | "RequestToAccept" | "RequestToPay" | "OfferToSell" | "Sell" | "Mint" | "RejectToAccept" | "RejectToPay" | "RejectToBuy" | "RejectToPayRecourse" | "RequestRecourse" | "Recourse";
828
+
829
+ export type BillParticipantWeb = { Anon: BillAnonParticipantWeb } | { Ident: BillIdentParticipantWeb };
830
+
831
+ export type BillsFilterRoleWeb = "All" | "Payer" | "Payee" | "Contingent";
832
+
833
+ export type CompanySignatoryStatusWeb = { Invited: { ts: number; inviter: string } } | { InviteAccepted: { ts: number } } | { InviteRejected: { ts: number } } | { InviteAcceptedIdentityProven: { ts: number; confirmation: IdentityEmailConfirmationWeb } } | { Removed: { ts: number; remover: string } };
834
+
835
+ export type CompanyStatusWeb = "Invited" | "Active" | "None";
836
+
837
+ export type GeneralSearchFilterItemTypeWeb = "Company" | "Bill" | "Contact";
838
+
867
839
  export type JsErrorType = "FieldEmpty" | "FieldInvalid" | "InvalidSum" | "InvalidCurrency" | "InvalidContentType" | "IdentityCantBeAnon" | "InvalidContactType" | "InvalidIdentityType" | "InvalidDate" | "InvalidCountry" | "InvalidTimestamp" | "DeadlineBeforeMinimum" | "SelfDraftedBillCantBeBlank" | "RequestToMintForBillAndMintAlreadyActive" | "SignerCantBeAnon" | "ContactIsAnonymous" | "InvalidContact" | "InvalidMint" | "IssueDateAfterMaturityDate" | "MaturityDateInThePast" | "InvalidFileUploadId" | "InvalidNodeId" | "InvalidBillId" | "InvalidBillType" | "DraweeCantBePayee" | "EndorserCantBeEndorsee" | "BuyerCantBeSeller" | "RecourserCantBeRecoursee" | "DraweeNotInContacts" | "PayeeNotInContacts" | "MintNotInContacts" | "BuyerNotInContacts" | "EndorseeNotInContacts" | "RecourseeNotInContacts" | "CancelMintRequestNotPending" | "RejectMintRequestNotOffered" | "AcceptMintRequestNotOffered" | "AcceptMintOfferExpired" | "NoConfirmedEmailForIdentIdentity" | "NoFileForFileUploadId" | "NotFound" | "ExternalApi" | "Crypto" | "Persistence" | "Blockchain" | "Protocol" | "InvalidRelayUrl" | "Serialization" | "Init" | "NotificationNetwork" | "NotificationMessage" | "InvalidOperation" | "BillAlreadyAccepted" | "BillWasRejectedToAccept" | "BillAcceptanceExpired" | "BillWasRejectedToPay" | "BillPaymentExpired" | "BillWasRecoursedToTheEnd" | "BillAlreadyRequestedToAccept" | "BillNotAccepted" | "CallerIsNotDrawee" | "CallerIsNotHolder" | "CallerIsNotRecoursee" | "CallerIsNotBuyer" | "RequestAlreadyRejected" | "BillAlreadyPaid" | "BillWasNotRequestedToPay" | "BillWasNotOfferedToSell" | "BillRequestToAcceptDidNotExpireAndWasNotRejected" | "BillRequestToPayDidNotExpireAndWasNotRejected" | "RecourseeNotPastHolder" | "BillWasNotRequestedToRecourse" | "BillIsNotRequestedToRecourseAndWaitingForPayment" | "BillIsNotOfferToSellWaitingForPayment" | "BillSellDataInvalid" | "BillRecourseDataInvalid" | "BillIsRequestedToPayAndWaitingForPayment" | "BillIsOfferedToSellAndWaitingForPayment" | "BillIsInRecourseAndWaitingForPayment" | "SignatoryNotInContacts" | "SignatoryAlreadySignatory" | "CantRemoveLastSignatory" | "NotASignatory" | "NotARemovedOrRejectedSignatory" | "NotInvitedAsSignatory" | "NoSignerIdentityProof" | "FileIsTooBig" | "FileIsEmpty" | "TooManyFiles" | "InvalidFileName" | "UnknownNodeId" | "CallerMustBeSignatory" | "InvalidSignature" | "InvalidHash" | "InvalidUrl" | "InvalidIdentityProofStatus" | "Json" | "InvalidBillAction" | "InvalidMintRequestId";
868
840
 
841
+ export type LightBillParticipantWeb = { Anon: LightBillAnonParticipantWeb } | { Ident: LightBillIdentParticipantWithAddressWeb };
842
+
843
+ export type MintRequestStatusWeb = "Pending" | { Denied: { timestamp: number } } | "Offered" | "Accepted" | { Rejected: { timestamp: number } } | { Cancelled: { timestamp: number } } | { Expired: { timestamp: number } };
844
+
845
+ export type NotificationTypeWeb = "General" | "Company" | "Bill" | "Contact";
846
+
847
+ export type PastPaymentResultWeb = { Sell: PastPaymentDataSellWeb } | { Payment: PastPaymentDataPaymentWeb } | { Recourse: PastPaymentDataRecourseWeb };
848
+
849
+ export type PastPaymentStatusWeb = { Paid: number } | { Rejected: number } | { Expired: number };
850
+
851
+
869
852
  export class Api {
870
- private constructor();
871
- free(): void;
872
- [Symbol.dispose](): void;
873
- static notification(): Notification;
874
- static bill(): Bill;
875
- static company(): Company;
876
- static contact(): Contact;
877
- static general(): General;
878
- static identity(): Identity;
853
+ private constructor();
854
+ free(): void;
855
+ [Symbol.dispose](): void;
856
+ static bill(): Bill;
857
+ static company(): Company;
858
+ static contact(): Contact;
859
+ static general(): General;
860
+ static identity(): Identity;
861
+ static notification(): Notification;
879
862
  }
863
+
880
864
  export class Bill {
881
- private constructor();
882
- free(): void;
883
- [Symbol.dispose](): void;
884
- attachment(bill_id: string, file_name: string): Promise<TSResult<BinaryFileResponse>>;
885
- list_light(): Promise<TSResult<LightBillsResponse>>;
886
- mint_state(id: string): Promise<TSResult<MintRequestStateResponse>>;
887
- bitcoin_key(id: string): Promise<TSResult<BillCombinedBitcoinKeyWeb>>;
888
- issue_blank(payload: BitcreditBillPayload): Promise<TSResult<BillIdResponse>>;
889
- bill_history(bill_id: string): Promise<TSResult<BillHistoryResponse>>;
890
- endorse_bill(payload: EndorseBitcreditBillPayload): Promise<TSResult<void>>;
891
- endorsements(id: string): Promise<TSResult<EndorsementsResponse>>;
892
- check_payment(): Promise<TSResult<void>>;
893
- offer_to_sell(payload: OfferToSellBitcreditBillPayload): Promise<TSResult<void>>;
894
- past_payments(id: string): Promise<TSResult<PastPaymentsResponse>>;
895
- reject_to_buy(payload: RejectActionBillPayload): Promise<TSResult<void>>;
896
- reject_to_pay(payload: RejectActionBillPayload): Promise<TSResult<void>>;
897
- past_endorsees(id: string): Promise<TSResult<PastEndorseesResponse>>;
898
- request_to_pay(payload: RequestToPayBitcreditBillPayload): Promise<TSResult<void>>;
899
- request_to_mint(payload: RequestToMintBitcreditBillPayload): Promise<TSResult<void>>;
900
- /**
901
- * Given a bill id, resync the chain via block transport
902
- */
903
- sync_bill_chain(payload: ResyncBillPayload): Promise<TSResult<void>>;
904
- check_mint_state(id: string): Promise<TSResult<void>>;
905
- clear_bill_cache(): Promise<TSResult<void>>;
906
- reject_to_accept(payload: RejectActionBillPayload): Promise<TSResult<void>>;
907
- accept_mint_offer(mint_request_id: string): Promise<TSResult<void>>;
908
- attachment_base64(bill_id: string, file_name: string): Promise<TSResult<Base64FileResponse>>;
909
- reject_mint_offer(mint_request_id: string): Promise<TSResult<void>>;
910
- request_to_accept(payload: RequestToAcceptBitcreditBillPayload): Promise<TSResult<void>>;
911
- /**
912
- * Blank endorsement - the contact doesn't have to be an anonymous contact
913
- */
914
- endorse_bill_blank(payload: EndorseBitcreditBillPayload): Promise<TSResult<void>>;
915
- /**
916
- * Blank offer to sell - the contact doesn't have to be an anonymous contact
917
- */
918
- offer_to_sell_blank(payload: OfferToSellBitcreditBillPayload): Promise<TSResult<void>>;
919
- share_bill_with_court(payload: ShareBillWithCourtPayload): Promise<TSResult<void>>;
920
- cancel_request_to_mint(mint_request_id: string): Promise<TSResult<void>>;
921
- check_payment_for_bill(id: string): Promise<TSResult<void>>;
922
- reject_to_pay_recourse(payload: RejectActionBillPayload): Promise<TSResult<void>>;
923
- numbers_to_words_for_sum(id: string): Promise<TSResult<BillNumbersToWordsForSum>>;
924
- dev_mode_get_full_bill_chain(bill_id: string): Promise<TSResult<string[]>>;
925
- request_to_recourse_bill_payment(payload: RequestRecourseForPaymentPayload): Promise<TSResult<void>>;
926
- request_to_recourse_bill_acceptance(payload: RequestRecourseForPaymentPayload): Promise<TSResult<void>>;
927
- static new(): Bill;
928
- list(): Promise<TSResult<BillsResponse>>;
929
- issue(payload: BitcreditBillPayload): Promise<TSResult<BillIdResponse>>;
930
- accept(payload: AcceptBitcreditBillPayload): Promise<TSResult<void>>;
931
- detail(id: string): Promise<TSResult<BitcreditBillWeb>>;
932
- search(payload: BillsSearchFilterPayload): Promise<TSResult<LightBillsResponse>>;
933
- upload(payload: UploadFile): Promise<TSResult<UploadFileResponse>>;
865
+ private constructor();
866
+ free(): void;
867
+ [Symbol.dispose](): void;
868
+ accept(payload: AcceptBitcreditBillPayload): Promise<TSResult<void>>;
869
+ accept_mint_offer(mint_request_id: string): Promise<TSResult<void>>;
870
+ attachment(bill_id: string, file_name: string): Promise<TSResult<BinaryFileResponse>>;
871
+ attachment_base64(bill_id: string, file_name: string): Promise<TSResult<Base64FileResponse>>;
872
+ bill_history(bill_id: string): Promise<TSResult<BillHistoryResponse>>;
873
+ bitcoin_key(id: string): Promise<TSResult<BillCombinedBitcoinKeyWeb>>;
874
+ cancel_request_to_mint(mint_request_id: string): Promise<TSResult<void>>;
875
+ check_mint_state(id: string): Promise<TSResult<void>>;
876
+ check_payment(): Promise<TSResult<void>>;
877
+ check_payment_for_bill(id: string): Promise<TSResult<void>>;
878
+ clear_bill_cache(): Promise<TSResult<void>>;
879
+ detail(id: string): Promise<TSResult<BitcreditBillWeb>>;
880
+ dev_mode_get_full_bill_chain(bill_id: string): Promise<TSResult<string[]>>;
881
+ endorse_bill(payload: EndorseBitcreditBillPayload): Promise<TSResult<void>>;
882
+ /**
883
+ * Blank endorsement - the contact doesn't have to be an anonymous contact
884
+ */
885
+ endorse_bill_blank(payload: EndorseBitcreditBillPayload): Promise<TSResult<void>>;
886
+ endorsements(id: string): Promise<TSResult<EndorsementsResponse>>;
887
+ issue(payload: BitcreditBillPayload): Promise<TSResult<BillIdResponse>>;
888
+ issue_blank(payload: BitcreditBillPayload): Promise<TSResult<BillIdResponse>>;
889
+ list(): Promise<TSResult<BillsResponse>>;
890
+ list_light(): Promise<TSResult<LightBillsResponse>>;
891
+ mint_state(id: string): Promise<TSResult<MintRequestStateResponse>>;
892
+ static new(): Bill;
893
+ numbers_to_words_for_sum(id: string): Promise<TSResult<BillNumbersToWordsForSum>>;
894
+ offer_to_sell(payload: OfferToSellBitcreditBillPayload): Promise<TSResult<void>>;
895
+ /**
896
+ * Blank offer to sell - the contact doesn't have to be an anonymous contact
897
+ */
898
+ offer_to_sell_blank(payload: OfferToSellBitcreditBillPayload): Promise<TSResult<void>>;
899
+ past_endorsees(id: string): Promise<TSResult<PastEndorseesResponse>>;
900
+ past_payments(id: string): Promise<TSResult<PastPaymentsResponse>>;
901
+ reject_mint_offer(mint_request_id: string): Promise<TSResult<void>>;
902
+ reject_to_accept(payload: RejectActionBillPayload): Promise<TSResult<void>>;
903
+ reject_to_buy(payload: RejectActionBillPayload): Promise<TSResult<void>>;
904
+ reject_to_pay(payload: RejectActionBillPayload): Promise<TSResult<void>>;
905
+ reject_to_pay_recourse(payload: RejectActionBillPayload): Promise<TSResult<void>>;
906
+ request_to_accept(payload: RequestToAcceptBitcreditBillPayload): Promise<TSResult<void>>;
907
+ request_to_mint(payload: RequestToMintBitcreditBillPayload): Promise<TSResult<void>>;
908
+ request_to_pay(payload: RequestToPayBitcreditBillPayload): Promise<TSResult<void>>;
909
+ request_to_recourse_bill_acceptance(payload: RequestRecourseForPaymentPayload): Promise<TSResult<void>>;
910
+ request_to_recourse_bill_payment(payload: RequestRecourseForPaymentPayload): Promise<TSResult<void>>;
911
+ search(payload: BillsSearchFilterPayload): Promise<TSResult<LightBillsResponse>>;
912
+ share_bill_with_court(payload: ShareBillWithCourtPayload): Promise<TSResult<void>>;
913
+ /**
914
+ * Given a bill id, resync the chain via block transport
915
+ */
916
+ sync_bill_chain(payload: ResyncBillPayload): Promise<TSResult<void>>;
917
+ upload(payload: UploadFile): Promise<TSResult<UploadFileResponse>>;
934
918
  }
919
+
935
920
  export class Company {
936
- private constructor();
937
- free(): void;
938
- [Symbol.dispose](): void;
939
- create_keys(): Promise<TSResult<CompanyKeysWeb>>;
940
- file_base64(id: string, file_name: string): Promise<TSResult<Base64FileResponse>>;
941
- list_invites(): Promise<TSResult<CompaniesResponse>>;
942
- verify_email(payload: VerifyEmailPayload): Promise<TSResult<void>>;
943
- accept_invite(payload: AcceptCompanyInvitePayload): Promise<TSResult<void>>;
944
- confirm_email(payload: ConfirmEmailPayload): Promise<TSResult<void>>;
945
- reject_invite(company_id: string): Promise<TSResult<void>>;
946
- invite_signatory(payload: InviteSignatoryPayload): Promise<TSResult<void>>;
947
- list_signatories(id: string): Promise<TSResult<ListSignatoriesResponse>>;
948
- remove_signatory(payload: RemoveSignatoryPayload): Promise<TSResult<void>>;
949
- /**
950
- * Given a node id, resync the company chain via block transport
951
- */
952
- sync_company_chain(payload: ResyncCompanyPayload): Promise<TSResult<void>>;
953
- share_contact_details(payload: ShareCompanyContactTo): Promise<TSResult<void>>;
954
- change_signatory_email(payload: ChangeSignatoryEmailPayload): Promise<TSResult<void>>;
955
- locally_hide_signatory(payload: LocallyHideSignatoryPayload): Promise<TSResult<void>>;
956
- get_email_confirmations(company_id: string): Promise<TSResult<IdentityEmailConfirmationWeb[]>>;
957
- dev_mode_get_full_company_chain(company_id: string): Promise<TSResult<string[]>>;
958
- static new(): Company;
959
- edit(payload: EditCompanyPayload): Promise<TSResult<void>>;
960
- file(id: string, file_name: string): Promise<TSResult<BinaryFileResponse>>;
961
- list(): Promise<TSResult<CompaniesResponse>>;
962
- create(payload: CreateCompanyPayload): Promise<TSResult<CompanyWeb>>;
963
- detail(id: string): Promise<TSResult<CompanyWeb>>;
964
- upload(payload: UploadFile): Promise<TSResult<UploadFileResponse>>;
921
+ private constructor();
922
+ free(): void;
923
+ [Symbol.dispose](): void;
924
+ accept_invite(payload: AcceptCompanyInvitePayload): Promise<TSResult<void>>;
925
+ change_signatory_email(payload: ChangeSignatoryEmailPayload): Promise<TSResult<void>>;
926
+ confirm_email(payload: ConfirmEmailPayload): Promise<TSResult<void>>;
927
+ create(payload: CreateCompanyPayload): Promise<TSResult<CompanyWeb>>;
928
+ create_keys(): Promise<TSResult<CompanyKeysWeb>>;
929
+ detail(id: string): Promise<TSResult<CompanyWeb>>;
930
+ dev_mode_get_full_company_chain(company_id: string): Promise<TSResult<string[]>>;
931
+ edit(payload: EditCompanyPayload): Promise<TSResult<void>>;
932
+ file(id: string, file_name: string): Promise<TSResult<BinaryFileResponse>>;
933
+ file_base64(id: string, file_name: string): Promise<TSResult<Base64FileResponse>>;
934
+ get_email_confirmations(company_id: string): Promise<TSResult<IdentityEmailConfirmationWeb[]>>;
935
+ invite_signatory(payload: InviteSignatoryPayload): Promise<TSResult<void>>;
936
+ list(): Promise<TSResult<CompaniesResponse>>;
937
+ list_invites(): Promise<TSResult<CompaniesResponse>>;
938
+ list_signatories(id: string): Promise<TSResult<ListSignatoriesResponse>>;
939
+ locally_hide_signatory(payload: LocallyHideSignatoryPayload): Promise<TSResult<void>>;
940
+ static new(): Company;
941
+ reject_invite(company_id: string): Promise<TSResult<void>>;
942
+ remove_signatory(payload: RemoveSignatoryPayload): Promise<TSResult<void>>;
943
+ share_contact_details(payload: ShareCompanyContactTo): Promise<TSResult<void>>;
944
+ /**
945
+ * Given a node id, resync the company chain via block transport
946
+ */
947
+ sync_company_chain(payload: ResyncCompanyPayload): Promise<TSResult<void>>;
948
+ upload(payload: UploadFile): Promise<TSResult<UploadFileResponse>>;
949
+ verify_email(payload: VerifyEmailPayload): Promise<TSResult<void>>;
965
950
  }
951
+
966
952
  export class Contact {
967
- private constructor();
968
- free(): void;
969
- [Symbol.dispose](): void;
970
- deanonymize(payload: NewContactPayload): Promise<TSResult<ContactWeb>>;
971
- file_base64(node_id: string, file_name: string): Promise<TSResult<Base64FileResponse>>;
972
- reject_contact_share(pending_share_id: string): Promise<TSResult<void>>;
973
- approve_contact_share(payload: ApproveContactSharePayload): Promise<TSResult<void>>;
974
- get_pending_contact_share(id: string): Promise<TSResult<PendingContactShareWeb | undefined>>;
975
- list_pending_contact_shares(receiver_node_id: string): Promise<TSResult<PendingContactSharesResponse>>;
976
- static new(): Contact;
977
- edit(payload: EditContactPayload): Promise<TSResult<void>>;
978
- file(node_id: string, file_name: string): Promise<TSResult<BinaryFileResponse>>;
979
- list(): Promise<TSResult<ContactsResponse>>;
980
- create(payload: NewContactPayload): Promise<TSResult<ContactWeb>>;
981
- detail(node_id: string): Promise<TSResult<ContactWeb>>;
982
- remove(node_id: string): Promise<TSResult<void>>;
983
- search(payload: SearchContactsPayload): Promise<TSResult<ContactsResponse>>;
984
- upload(payload: UploadFile): Promise<TSResult<UploadFileResponse>>;
953
+ private constructor();
954
+ free(): void;
955
+ [Symbol.dispose](): void;
956
+ approve_contact_share(payload: ApproveContactSharePayload): Promise<TSResult<void>>;
957
+ create(payload: NewContactPayload): Promise<TSResult<ContactWeb>>;
958
+ deanonymize(payload: NewContactPayload): Promise<TSResult<ContactWeb>>;
959
+ detail(node_id: string): Promise<TSResult<ContactWeb>>;
960
+ edit(payload: EditContactPayload): Promise<TSResult<void>>;
961
+ file(node_id: string, file_name: string): Promise<TSResult<BinaryFileResponse>>;
962
+ file_base64(node_id: string, file_name: string): Promise<TSResult<Base64FileResponse>>;
963
+ get_pending_contact_share(id: string): Promise<TSResult<PendingContactShareWeb | undefined>>;
964
+ list(): Promise<TSResult<ContactsResponse>>;
965
+ list_pending_contact_shares(receiver_node_id: string): Promise<TSResult<PendingContactSharesResponse>>;
966
+ static new(): Contact;
967
+ reject_contact_share(pending_share_id: string): Promise<TSResult<void>>;
968
+ remove(node_id: string): Promise<TSResult<void>>;
969
+ search(payload: SearchContactsPayload): Promise<TSResult<ContactsResponse>>;
970
+ upload(payload: UploadFile): Promise<TSResult<UploadFileResponse>>;
971
+ }
972
+
973
+ export enum ContactTypeWeb {
974
+ Person = 0,
975
+ Company = 1,
976
+ Anon = 2,
985
977
  }
978
+
986
979
  export class General {
987
- private constructor();
988
- free(): void;
989
- [Symbol.dispose](): void;
990
- currencies(): Promise<TSResult<CurrenciesResponse>>;
991
- static new(): General;
992
- search(payload: GeneralSearchFilterPayload): Promise<TSResult<GeneralSearchResponse>>;
993
- status(): Promise<TSResult<StatusResponse>>;
994
- overview(currency: string): Promise<TSResult<OverviewResponse>>;
995
- temp_file(file_upload_id: string): Promise<TSResult<BinaryFileResponse>>;
980
+ private constructor();
981
+ free(): void;
982
+ [Symbol.dispose](): void;
983
+ currencies(): Promise<TSResult<CurrenciesResponse>>;
984
+ static new(): General;
985
+ overview(currency: string): Promise<TSResult<OverviewResponse>>;
986
+ search(payload: GeneralSearchFilterPayload): Promise<TSResult<GeneralSearchResponse>>;
987
+ status(): Promise<TSResult<StatusResponse>>;
988
+ temp_file(file_upload_id: string): Promise<TSResult<BinaryFileResponse>>;
996
989
  }
990
+
997
991
  export class Identity {
998
- private constructor();
999
- free(): void;
1000
- [Symbol.dispose](): void;
1001
- deanonymize(payload: NewIdentityPayload): Promise<TSResult<IdentityWeb>>;
1002
- file_base64(file_name: string): Promise<TSResult<Base64FileResponse>>;
1003
- seed_backup(): Promise<TSResult<SeedPhrase>>;
1004
- change_email(payload: ChangeIdentityEmailPayload): Promise<TSResult<void>>;
1005
- seed_recover(payload: SeedPhrase): Promise<TSResult<void>>;
1006
- verify_email(payload: VerifyEmailPayload): Promise<TSResult<void>>;
1007
- confirm_email(payload: ConfirmEmailPayload): Promise<TSResult<void>>;
1008
- /**
1009
- * Resync the identity chain via block transport
1010
- */
1011
- sync_identity_chain(): Promise<TSResult<void>>;
1012
- share_contact_details(payload: ShareContactTo): Promise<TSResult<void>>;
1013
- get_email_confirmations(): Promise<TSResult<IdentityEmailConfirmationWeb[]>>;
1014
- dev_mode_get_full_identity_chain(): Promise<TSResult<string[]>>;
1015
- static new(): Identity;
1016
- file(file_name: string): Promise<TSResult<BinaryFileResponse>>;
1017
- active(): Promise<TSResult<SwitchIdentity>>;
1018
- change(payload: ChangeIdentityPayload): Promise<TSResult<void>>;
1019
- create(payload: NewIdentityPayload): Promise<TSResult<IdentityWeb>>;
1020
- detail(): Promise<TSResult<IdentityWeb>>;
1021
- switch(switch_identity_payload: SwitchIdentity): Promise<TSResult<void>>;
1022
- upload(payload: UploadFile): Promise<TSResult<UploadFileResponse>>;
992
+ private constructor();
993
+ free(): void;
994
+ [Symbol.dispose](): void;
995
+ active(): Promise<TSResult<SwitchIdentity>>;
996
+ change(payload: ChangeIdentityPayload): Promise<TSResult<void>>;
997
+ change_email(payload: ChangeIdentityEmailPayload): Promise<TSResult<void>>;
998
+ confirm_email(payload: ConfirmEmailPayload): Promise<TSResult<void>>;
999
+ create(payload: NewIdentityPayload): Promise<TSResult<IdentityWeb>>;
1000
+ deanonymize(payload: NewIdentityPayload): Promise<TSResult<IdentityWeb>>;
1001
+ detail(): Promise<TSResult<IdentityWeb>>;
1002
+ dev_mode_get_full_identity_chain(): Promise<TSResult<string[]>>;
1003
+ file(file_name: string): Promise<TSResult<BinaryFileResponse>>;
1004
+ file_base64(file_name: string): Promise<TSResult<Base64FileResponse>>;
1005
+ get_email_confirmations(): Promise<TSResult<IdentityEmailConfirmationWeb[]>>;
1006
+ static new(): Identity;
1007
+ seed_backup(): Promise<TSResult<SeedPhrase>>;
1008
+ seed_recover(payload: SeedPhrase): Promise<TSResult<void>>;
1009
+ share_contact_details(payload: ShareContactTo): Promise<TSResult<void>>;
1010
+ switch(switch_identity_payload: SwitchIdentity): Promise<TSResult<void>>;
1011
+ /**
1012
+ * Resync the identity chain via block transport
1013
+ */
1014
+ sync_identity_chain(): Promise<TSResult<void>>;
1015
+ upload(payload: UploadFile): Promise<TSResult<UploadFileResponse>>;
1016
+ verify_email(payload: VerifyEmailPayload): Promise<TSResult<void>>;
1017
+ }
1018
+
1019
+ export enum IdentityTypeWeb {
1020
+ Ident = 0,
1021
+ Anon = 1,
1023
1022
  }
1023
+
1024
1024
  export class Notification {
1025
- private constructor();
1026
- free(): void;
1027
- [Symbol.dispose](): void;
1028
- mark_as_done(notification_id: string): Promise<TSResult<void>>;
1029
- trigger_test_msg(payload: any): Promise<TSResult<void>>;
1030
- active_notifications_for_node_ids(node_ids: string[]): Promise<TSResult<NotificationStatusWeb[]>>;
1031
- static new(): Notification;
1032
- /**
1033
- * Fetch email notifications preferences link for the currently selected identity
1034
- */
1035
- get_email_notifications_preferences_link(): Promise<TSResult<String>>;
1036
- list(filters: NotificationFilters): Promise<TSResult<NotificationWeb[]>>;
1037
- subscribe(callback: Function): Promise<void>;
1025
+ private constructor();
1026
+ free(): void;
1027
+ [Symbol.dispose](): void;
1028
+ active_notifications_for_node_ids(node_ids: string[]): Promise<TSResult<NotificationStatusWeb[]>>;
1029
+ /**
1030
+ * Fetch email notifications preferences link for the currently selected identity
1031
+ */
1032
+ get_email_notifications_preferences_link(): Promise<TSResult<String>>;
1033
+ list(filters: NotificationFilters): Promise<TSResult<NotificationWeb[]>>;
1034
+ mark_as_done(notification_id: string): Promise<TSResult<void>>;
1035
+ static new(): Notification;
1036
+ subscribe(callback: Function): Promise<void>;
1037
+ trigger_test_msg(payload: any): Promise<TSResult<void>>;
1038
+ }
1039
+
1040
+ export enum SwitchIdentityTypeWeb {
1041
+ Person = 0,
1042
+ Company = 1,
1038
1043
  }
1039
1044
 
1045
+ export function initialize_api(cfg: Config): Promise<void>;
1046
+
1047
+ /**
1048
+ * Entry point invoked by JavaScript in a worker.
1049
+ */
1050
+ export function task_worker_entry_point(ptr: number): void;
1051
+
1040
1052
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
1041
1053
 
1042
1054
  export interface InitOutput {
1043
- readonly memory: WebAssembly.Memory;
1044
- readonly __wbg_api_free: (a: number, b: number) => void;
1045
- readonly api_bill: () => number;
1046
- readonly bill_accept: (a: number, b: any) => any;
1047
- readonly bill_accept_mint_offer: (a: number, b: number, c: number) => any;
1048
- readonly bill_attachment: (a: number, b: number, c: number, d: number, e: number) => any;
1049
- readonly bill_attachment_base64: (a: number, b: number, c: number, d: number, e: number) => any;
1050
- readonly bill_bill_history: (a: number, b: number, c: number) => any;
1051
- readonly bill_bitcoin_key: (a: number, b: number, c: number) => any;
1052
- readonly bill_cancel_request_to_mint: (a: number, b: number, c: number) => any;
1053
- readonly bill_check_mint_state: (a: number, b: number, c: number) => any;
1054
- readonly bill_check_payment: (a: number) => any;
1055
- readonly bill_check_payment_for_bill: (a: number, b: number, c: number) => any;
1056
- readonly bill_clear_bill_cache: (a: number) => any;
1057
- readonly bill_detail: (a: number, b: number, c: number) => any;
1058
- readonly bill_dev_mode_get_full_bill_chain: (a: number, b: number, c: number) => any;
1059
- readonly bill_endorse_bill: (a: number, b: any) => any;
1060
- readonly bill_endorse_bill_blank: (a: number, b: any) => any;
1061
- readonly bill_endorsements: (a: number, b: number, c: number) => any;
1062
- readonly bill_issue: (a: number, b: any) => any;
1063
- readonly bill_issue_blank: (a: number, b: any) => any;
1064
- readonly bill_list: (a: number) => any;
1065
- readonly bill_list_light: (a: number) => any;
1066
- readonly bill_mint_state: (a: number, b: number, c: number) => any;
1067
- readonly bill_numbers_to_words_for_sum: (a: number, b: number, c: number) => any;
1068
- readonly bill_offer_to_sell: (a: number, b: any) => any;
1069
- readonly bill_offer_to_sell_blank: (a: number, b: any) => any;
1070
- readonly bill_past_endorsees: (a: number, b: number, c: number) => any;
1071
- readonly bill_past_payments: (a: number, b: number, c: number) => any;
1072
- readonly bill_reject_mint_offer: (a: number, b: number, c: number) => any;
1073
- readonly bill_reject_to_accept: (a: number, b: any) => any;
1074
- readonly bill_reject_to_buy: (a: number, b: any) => any;
1075
- readonly bill_reject_to_pay: (a: number, b: any) => any;
1076
- readonly bill_reject_to_pay_recourse: (a: number, b: any) => any;
1077
- readonly bill_request_to_accept: (a: number, b: any) => any;
1078
- readonly bill_request_to_mint: (a: number, b: any) => any;
1079
- readonly bill_request_to_pay: (a: number, b: any) => any;
1080
- readonly bill_request_to_recourse_bill_acceptance: (a: number, b: any) => any;
1081
- readonly bill_request_to_recourse_bill_payment: (a: number, b: any) => any;
1082
- readonly bill_search: (a: number, b: any) => any;
1083
- readonly bill_share_bill_with_court: (a: number, b: any) => any;
1084
- readonly bill_sync_bill_chain: (a: number, b: any) => any;
1085
- readonly bill_upload: (a: number, b: any) => any;
1086
- readonly company_accept_invite: (a: number, b: any) => any;
1087
- readonly company_change_signatory_email: (a: number, b: any) => any;
1088
- readonly company_confirm_email: (a: number, b: any) => any;
1089
- readonly company_create: (a: number, b: any) => any;
1090
- readonly company_create_keys: (a: number) => any;
1091
- readonly company_detail: (a: number, b: number, c: number) => any;
1092
- readonly company_dev_mode_get_full_company_chain: (a: number, b: number, c: number) => any;
1093
- readonly company_edit: (a: number, b: any) => any;
1094
- readonly company_file: (a: number, b: number, c: number, d: number, e: number) => any;
1095
- readonly company_file_base64: (a: number, b: number, c: number, d: number, e: number) => any;
1096
- readonly company_get_email_confirmations: (a: number, b: number, c: number) => any;
1097
- readonly company_invite_signatory: (a: number, b: any) => any;
1098
- readonly company_list: (a: number) => any;
1099
- readonly company_list_invites: (a: number) => any;
1100
- readonly company_list_signatories: (a: number, b: number, c: number) => any;
1101
- readonly company_locally_hide_signatory: (a: number, b: any) => any;
1102
- readonly company_reject_invite: (a: number, b: number, c: number) => any;
1103
- readonly company_remove_signatory: (a: number, b: any) => any;
1104
- readonly company_share_contact_details: (a: number, b: any) => any;
1105
- readonly company_sync_company_chain: (a: number, b: any) => any;
1106
- readonly company_upload: (a: number, b: any) => any;
1107
- readonly company_verify_email: (a: number, b: any) => any;
1108
- readonly contact_approve_contact_share: (a: number, b: any) => any;
1109
- readonly contact_create: (a: number, b: any) => any;
1110
- readonly contact_deanonymize: (a: number, b: any) => any;
1111
- readonly contact_detail: (a: number, b: number, c: number) => any;
1112
- readonly contact_edit: (a: number, b: any) => any;
1113
- readonly contact_file: (a: number, b: number, c: number, d: number, e: number) => any;
1114
- readonly contact_file_base64: (a: number, b: number, c: number, d: number, e: number) => any;
1115
- readonly contact_get_pending_contact_share: (a: number, b: number, c: number) => any;
1116
- readonly contact_list: (a: number) => any;
1117
- readonly contact_list_pending_contact_shares: (a: number, b: number, c: number) => any;
1118
- readonly contact_reject_contact_share: (a: number, b: number, c: number) => any;
1119
- readonly contact_remove: (a: number, b: number, c: number) => any;
1120
- readonly contact_search: (a: number, b: any) => any;
1121
- readonly contact_upload: (a: number, b: any) => any;
1122
- readonly general_currencies: (a: number) => any;
1123
- readonly general_overview: (a: number, b: number, c: number) => any;
1124
- readonly general_search: (a: number, b: any) => any;
1125
- readonly general_status: (a: number) => any;
1126
- readonly general_temp_file: (a: number, b: number, c: number) => any;
1127
- readonly identity_active: (a: number) => any;
1128
- readonly identity_change: (a: number, b: any) => any;
1129
- readonly identity_change_email: (a: number, b: any) => any;
1130
- readonly identity_confirm_email: (a: number, b: any) => any;
1131
- readonly identity_create: (a: number, b: any) => any;
1132
- readonly identity_deanonymize: (a: number, b: any) => any;
1133
- readonly identity_detail: (a: number) => any;
1134
- readonly identity_dev_mode_get_full_identity_chain: (a: number) => any;
1135
- readonly identity_file: (a: number, b: number, c: number) => any;
1136
- readonly identity_file_base64: (a: number, b: number, c: number) => any;
1137
- readonly identity_get_email_confirmations: (a: number) => any;
1138
- readonly identity_seed_backup: (a: number) => any;
1139
- readonly identity_seed_recover: (a: number, b: any) => any;
1140
- readonly identity_share_contact_details: (a: number, b: any) => any;
1141
- readonly identity_switch: (a: number, b: any) => any;
1142
- readonly identity_sync_identity_chain: (a: number) => any;
1143
- readonly identity_upload: (a: number, b: any) => any;
1144
- readonly identity_verify_email: (a: number, b: any) => any;
1145
- readonly initialize_api: (a: any) => any;
1146
- readonly notification_active_notifications_for_node_ids: (a: number, b: any) => any;
1147
- readonly notification_get_email_notifications_preferences_link: (a: number) => any;
1148
- readonly notification_list: (a: number, b: any) => any;
1149
- readonly notification_mark_as_done: (a: number, b: number, c: number) => any;
1150
- readonly notification_subscribe: (a: number, b: any) => any;
1151
- readonly notification_trigger_test_msg: (a: number, b: any) => any;
1152
- readonly ring_core_0_17_14__bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1153
- readonly rustsecp256k1_v0_10_0_context_create: (a: number) => number;
1154
- readonly rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
1155
- readonly rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
1156
- readonly rustsecp256k1_v0_10_0_default_illegal_callback_fn: (a: number, b: number) => void;
1157
- readonly task_worker_entry_point: (a: number) => [number, number];
1158
- readonly api_company: () => number;
1159
- readonly api_contact: () => number;
1160
- readonly api_general: () => number;
1161
- readonly api_identity: () => number;
1162
- readonly api_notification: () => number;
1163
- readonly bill_new: () => number;
1164
- readonly company_new: () => number;
1165
- readonly contact_new: () => number;
1166
- readonly general_new: () => number;
1167
- readonly identity_new: () => number;
1168
- readonly notification_new: () => number;
1169
- readonly __wbg_contact_free: (a: number, b: number) => void;
1170
- readonly __wbg_company_free: (a: number, b: number) => void;
1171
- readonly __wbg_identity_free: (a: number, b: number) => void;
1172
- readonly __wbg_notification_free: (a: number, b: number) => void;
1173
- readonly __wbg_bill_free: (a: number, b: number) => void;
1174
- readonly __wbg_general_free: (a: number, b: number) => void;
1175
- readonly wasm_bindgen__convert__closures_____invoke__h625e6e48994b4d4d: (a: number, b: number) => void;
1176
- readonly wasm_bindgen__closure__destroy__h527ee7579c097780: (a: number, b: number) => void;
1177
- readonly wasm_bindgen__convert__closures_____invoke__hefd514050543a57d: (a: number, b: number, c: any) => [number, number];
1178
- readonly wasm_bindgen__closure__destroy__had46d023ac555f7b: (a: number, b: number) => void;
1179
- readonly wasm_bindgen__closure__destroy__h3037230e8ee2d37d: (a: number, b: number) => void;
1180
- readonly wasm_bindgen__convert__closures_____invoke__hd658b83f8a6440c8: (a: number, b: number) => void;
1181
- readonly wasm_bindgen__convert__closures_____invoke__h0fbebb9798cf06eb: (a: number, b: number, c: any) => void;
1182
- readonly wasm_bindgen__convert__closures_____invoke__h0dd348e3cbf490c5: (a: number, b: number, c: any, d: any) => void;
1183
- readonly __wbindgen_malloc: (a: number, b: number) => number;
1184
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
1185
- readonly __wbindgen_exn_store: (a: number) => void;
1186
- readonly __externref_table_alloc: () => number;
1187
- readonly __wbindgen_externrefs: WebAssembly.Table;
1188
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
1189
- readonly __externref_table_dealloc: (a: number) => void;
1190
- readonly __wbindgen_start: () => void;
1055
+ readonly memory: WebAssembly.Memory;
1056
+ readonly __wbg_api_free: (a: number, b: number) => void;
1057
+ readonly api_bill: () => number;
1058
+ readonly bill_accept: (a: number, b: any) => any;
1059
+ readonly bill_accept_mint_offer: (a: number, b: number, c: number) => any;
1060
+ readonly bill_attachment: (a: number, b: number, c: number, d: number, e: number) => any;
1061
+ readonly bill_attachment_base64: (a: number, b: number, c: number, d: number, e: number) => any;
1062
+ readonly bill_bill_history: (a: number, b: number, c: number) => any;
1063
+ readonly bill_bitcoin_key: (a: number, b: number, c: number) => any;
1064
+ readonly bill_cancel_request_to_mint: (a: number, b: number, c: number) => any;
1065
+ readonly bill_check_mint_state: (a: number, b: number, c: number) => any;
1066
+ readonly bill_check_payment: (a: number) => any;
1067
+ readonly bill_check_payment_for_bill: (a: number, b: number, c: number) => any;
1068
+ readonly bill_clear_bill_cache: (a: number) => any;
1069
+ readonly bill_detail: (a: number, b: number, c: number) => any;
1070
+ readonly bill_dev_mode_get_full_bill_chain: (a: number, b: number, c: number) => any;
1071
+ readonly bill_endorse_bill: (a: number, b: any) => any;
1072
+ readonly bill_endorse_bill_blank: (a: number, b: any) => any;
1073
+ readonly bill_endorsements: (a: number, b: number, c: number) => any;
1074
+ readonly bill_issue: (a: number, b: any) => any;
1075
+ readonly bill_issue_blank: (a: number, b: any) => any;
1076
+ readonly bill_list: (a: number) => any;
1077
+ readonly bill_list_light: (a: number) => any;
1078
+ readonly bill_mint_state: (a: number, b: number, c: number) => any;
1079
+ readonly bill_numbers_to_words_for_sum: (a: number, b: number, c: number) => any;
1080
+ readonly bill_offer_to_sell: (a: number, b: any) => any;
1081
+ readonly bill_offer_to_sell_blank: (a: number, b: any) => any;
1082
+ readonly bill_past_endorsees: (a: number, b: number, c: number) => any;
1083
+ readonly bill_past_payments: (a: number, b: number, c: number) => any;
1084
+ readonly bill_reject_mint_offer: (a: number, b: number, c: number) => any;
1085
+ readonly bill_reject_to_accept: (a: number, b: any) => any;
1086
+ readonly bill_reject_to_buy: (a: number, b: any) => any;
1087
+ readonly bill_reject_to_pay: (a: number, b: any) => any;
1088
+ readonly bill_reject_to_pay_recourse: (a: number, b: any) => any;
1089
+ readonly bill_request_to_accept: (a: number, b: any) => any;
1090
+ readonly bill_request_to_mint: (a: number, b: any) => any;
1091
+ readonly bill_request_to_pay: (a: number, b: any) => any;
1092
+ readonly bill_request_to_recourse_bill_acceptance: (a: number, b: any) => any;
1093
+ readonly bill_request_to_recourse_bill_payment: (a: number, b: any) => any;
1094
+ readonly bill_search: (a: number, b: any) => any;
1095
+ readonly bill_share_bill_with_court: (a: number, b: any) => any;
1096
+ readonly bill_sync_bill_chain: (a: number, b: any) => any;
1097
+ readonly bill_upload: (a: number, b: any) => any;
1098
+ readonly company_accept_invite: (a: number, b: any) => any;
1099
+ readonly company_change_signatory_email: (a: number, b: any) => any;
1100
+ readonly company_confirm_email: (a: number, b: any) => any;
1101
+ readonly company_create: (a: number, b: any) => any;
1102
+ readonly company_create_keys: (a: number) => any;
1103
+ readonly company_detail: (a: number, b: number, c: number) => any;
1104
+ readonly company_dev_mode_get_full_company_chain: (a: number, b: number, c: number) => any;
1105
+ readonly company_edit: (a: number, b: any) => any;
1106
+ readonly company_file: (a: number, b: number, c: number, d: number, e: number) => any;
1107
+ readonly company_file_base64: (a: number, b: number, c: number, d: number, e: number) => any;
1108
+ readonly company_get_email_confirmations: (a: number, b: number, c: number) => any;
1109
+ readonly company_invite_signatory: (a: number, b: any) => any;
1110
+ readonly company_list: (a: number) => any;
1111
+ readonly company_list_invites: (a: number) => any;
1112
+ readonly company_list_signatories: (a: number, b: number, c: number) => any;
1113
+ readonly company_locally_hide_signatory: (a: number, b: any) => any;
1114
+ readonly company_reject_invite: (a: number, b: number, c: number) => any;
1115
+ readonly company_remove_signatory: (a: number, b: any) => any;
1116
+ readonly company_share_contact_details: (a: number, b: any) => any;
1117
+ readonly company_sync_company_chain: (a: number, b: any) => any;
1118
+ readonly company_upload: (a: number, b: any) => any;
1119
+ readonly company_verify_email: (a: number, b: any) => any;
1120
+ readonly contact_approve_contact_share: (a: number, b: any) => any;
1121
+ readonly contact_create: (a: number, b: any) => any;
1122
+ readonly contact_deanonymize: (a: number, b: any) => any;
1123
+ readonly contact_detail: (a: number, b: number, c: number) => any;
1124
+ readonly contact_edit: (a: number, b: any) => any;
1125
+ readonly contact_file: (a: number, b: number, c: number, d: number, e: number) => any;
1126
+ readonly contact_file_base64: (a: number, b: number, c: number, d: number, e: number) => any;
1127
+ readonly contact_get_pending_contact_share: (a: number, b: number, c: number) => any;
1128
+ readonly contact_list: (a: number) => any;
1129
+ readonly contact_list_pending_contact_shares: (a: number, b: number, c: number) => any;
1130
+ readonly contact_reject_contact_share: (a: number, b: number, c: number) => any;
1131
+ readonly contact_remove: (a: number, b: number, c: number) => any;
1132
+ readonly contact_search: (a: number, b: any) => any;
1133
+ readonly contact_upload: (a: number, b: any) => any;
1134
+ readonly general_currencies: (a: number) => any;
1135
+ readonly general_overview: (a: number, b: number, c: number) => any;
1136
+ readonly general_search: (a: number, b: any) => any;
1137
+ readonly general_status: (a: number) => any;
1138
+ readonly general_temp_file: (a: number, b: number, c: number) => any;
1139
+ readonly identity_active: (a: number) => any;
1140
+ readonly identity_change: (a: number, b: any) => any;
1141
+ readonly identity_change_email: (a: number, b: any) => any;
1142
+ readonly identity_confirm_email: (a: number, b: any) => any;
1143
+ readonly identity_create: (a: number, b: any) => any;
1144
+ readonly identity_deanonymize: (a: number, b: any) => any;
1145
+ readonly identity_detail: (a: number) => any;
1146
+ readonly identity_dev_mode_get_full_identity_chain: (a: number) => any;
1147
+ readonly identity_file: (a: number, b: number, c: number) => any;
1148
+ readonly identity_file_base64: (a: number, b: number, c: number) => any;
1149
+ readonly identity_get_email_confirmations: (a: number) => any;
1150
+ readonly identity_seed_backup: (a: number) => any;
1151
+ readonly identity_seed_recover: (a: number, b: any) => any;
1152
+ readonly identity_share_contact_details: (a: number, b: any) => any;
1153
+ readonly identity_switch: (a: number, b: any) => any;
1154
+ readonly identity_sync_identity_chain: (a: number) => any;
1155
+ readonly identity_upload: (a: number, b: any) => any;
1156
+ readonly identity_verify_email: (a: number, b: any) => any;
1157
+ readonly initialize_api: (a: any) => any;
1158
+ readonly notification_active_notifications_for_node_ids: (a: number, b: any) => any;
1159
+ readonly notification_get_email_notifications_preferences_link: (a: number) => any;
1160
+ readonly notification_list: (a: number, b: any) => any;
1161
+ readonly notification_mark_as_done: (a: number, b: number, c: number) => any;
1162
+ readonly notification_subscribe: (a: number, b: any) => any;
1163
+ readonly notification_trigger_test_msg: (a: number, b: any) => any;
1164
+ readonly ring_core_0_17_14__bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1165
+ readonly rustsecp256k1_v0_10_0_context_create: (a: number) => number;
1166
+ readonly rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
1167
+ readonly rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
1168
+ readonly rustsecp256k1_v0_10_0_default_illegal_callback_fn: (a: number, b: number) => void;
1169
+ readonly task_worker_entry_point: (a: number) => [number, number];
1170
+ readonly api_company: () => number;
1171
+ readonly api_contact: () => number;
1172
+ readonly api_general: () => number;
1173
+ readonly api_identity: () => number;
1174
+ readonly api_notification: () => number;
1175
+ readonly bill_new: () => number;
1176
+ readonly company_new: () => number;
1177
+ readonly contact_new: () => number;
1178
+ readonly general_new: () => number;
1179
+ readonly identity_new: () => number;
1180
+ readonly notification_new: () => number;
1181
+ readonly __wbg_identity_free: (a: number, b: number) => void;
1182
+ readonly __wbg_notification_free: (a: number, b: number) => void;
1183
+ readonly __wbg_contact_free: (a: number, b: number) => void;
1184
+ readonly __wbg_company_free: (a: number, b: number) => void;
1185
+ readonly __wbg_bill_free: (a: number, b: number) => void;
1186
+ readonly __wbg_general_free: (a: number, b: number) => void;
1187
+ readonly wasm_bindgen__closure__destroy__h0b956fc35bdbbf1b: (a: number, b: number) => void;
1188
+ readonly wasm_bindgen__closure__destroy__hcec5ce3597ff49f3: (a: number, b: number) => void;
1189
+ readonly wasm_bindgen__closure__destroy__h3b2c91a22da7cff4: (a: number, b: number) => void;
1190
+ readonly wasm_bindgen__convert__closures_____invoke__h5dcf2b3ada1c9735: (a: number, b: number, c: any) => [number, number];
1191
+ readonly wasm_bindgen__convert__closures_____invoke__h10959bbd61423240: (a: number, b: number, c: any, d: any) => void;
1192
+ readonly wasm_bindgen__convert__closures_____invoke__h1baea19e6e6059b9: (a: number, b: number, c: any) => void;
1193
+ readonly wasm_bindgen__convert__closures_____invoke__h5c952655b73c2f33: (a: number, b: number) => void;
1194
+ readonly wasm_bindgen__convert__closures_____invoke__hc1f2fd96e1bb4481: (a: number, b: number) => void;
1195
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
1196
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
1197
+ readonly __wbindgen_exn_store: (a: number) => void;
1198
+ readonly __externref_table_alloc: () => number;
1199
+ readonly __wbindgen_externrefs: WebAssembly.Table;
1200
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
1201
+ readonly __externref_table_dealloc: (a: number) => void;
1202
+ readonly __wbindgen_start: () => void;
1191
1203
  }
1192
1204
 
1193
1205
  export type SyncInitInput = BufferSource | WebAssembly.Module;
1206
+
1194
1207
  /**
1195
- * Instantiates the given `module`, which can either be bytes or
1196
- * a precompiled `WebAssembly.Module`.
1197
- *
1198
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
1199
- *
1200
- * @returns {InitOutput}
1201
- */
1208
+ * Instantiates the given `module`, which can either be bytes or
1209
+ * a precompiled `WebAssembly.Module`.
1210
+ *
1211
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
1212
+ *
1213
+ * @returns {InitOutput}
1214
+ */
1202
1215
  export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
1203
1216
 
1204
1217
  /**
1205
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
1206
- * for everything else, calls `WebAssembly.instantiate` directly.
1207
- *
1208
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
1209
- *
1210
- * @returns {Promise<InitOutput>}
1211
- */
1218
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
1219
+ * for everything else, calls `WebAssembly.instantiate` directly.
1220
+ *
1221
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
1222
+ *
1223
+ * @returns {Promise<InitOutput>}
1224
+ */
1212
1225
  export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;