@bitcredit/bcr-ebill-wasm 0.3.16 → 0.3.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -18,7 +18,7 @@ export enum SwitchIdentityTypeWeb {
18
18
  Person = 0,
19
19
  Company = 1,
20
20
  }
21
- export interface BillId {
21
+ export interface BillIdResponse {
22
22
  id: string;
23
23
  }
24
24
 
@@ -531,7 +531,7 @@ export interface SeedPhrase {
531
531
 
532
532
  export interface NotificationWeb {
533
533
  id: string;
534
- node_id: string | undefined;
534
+ node_id: string;
535
535
  notification_type: NotificationTypeWeb;
536
536
  reference_id: string | undefined;
537
537
  description: string;
@@ -691,7 +691,6 @@ export class Api {
691
691
  static notification(): Notification;
692
692
  static company(): Company;
693
693
  static bill(): Bill;
694
- static quote(): Quote;
695
694
  }
696
695
  export class Bill {
697
696
  private constructor();
@@ -710,8 +709,8 @@ export class Bill {
710
709
  detail(id: string): Promise<BitcreditBillWeb>;
711
710
  check_payment_for_bill(id: string): Promise<void>;
712
711
  check_payment(): Promise<void>;
713
- issue(payload: BitcreditBillPayload): Promise<BillId>;
714
- issue_blank(payload: BitcreditBillPayload): Promise<BillId>;
712
+ issue(payload: BitcreditBillPayload): Promise<BillIdResponse>;
713
+ issue_blank(payload: BitcreditBillPayload): Promise<BillIdResponse>;
715
714
  offer_to_sell(payload: OfferToSellBitcreditBillPayload): Promise<void>;
716
715
  /**
717
716
  * Blank offer to sell - the contact doesn't have to be an anonymous contact
@@ -757,7 +756,7 @@ export class Contact {
757
756
  private constructor();
758
757
  free(): void;
759
758
  static new(): Contact;
760
- file(id: string, file_name: string): Promise<BinaryFileResponse>;
759
+ file(node_id: string, file_name: string): Promise<BinaryFileResponse>;
761
760
  upload(payload: UploadFile): Promise<UploadFileResponse>;
762
761
  list(): Promise<ContactsResponse>;
763
762
  detail(node_id: string): Promise<ContactWeb>;
@@ -800,13 +799,6 @@ export class Notification {
800
799
  mark_as_done(notification_id: string): Promise<void>;
801
800
  trigger_test_msg(payload: any): Promise<void>;
802
801
  }
803
- export class Quote {
804
- private constructor();
805
- free(): void;
806
- static new(): Quote;
807
- get(id: string): Promise<BitcreditEbillQuote>;
808
- accept(id: string): Promise<BitcreditEbillQuote>;
809
- }
810
802
 
811
803
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
812
804
 
@@ -883,8 +875,6 @@ export interface InitOutput {
883
875
  readonly notification_list: (a: number, b: any) => any;
884
876
  readonly notification_mark_as_done: (a: number, b: number, c: number) => any;
885
877
  readonly notification_trigger_test_msg: (a: number, b: any) => any;
886
- readonly quote_get: (a: number, b: number, c: number) => any;
887
- readonly quote_accept: (a: number, b: number, c: number) => any;
888
878
  readonly __wbg_api_free: (a: number, b: number) => void;
889
879
  readonly api_bill: () => number;
890
880
  readonly initialize_api: (a: any) => any;
@@ -899,21 +889,18 @@ export interface InitOutput {
899
889
  readonly general_new: () => number;
900
890
  readonly identity_new: () => number;
901
891
  readonly notification_new: () => number;
902
- readonly quote_new: () => number;
903
892
  readonly bill_new: () => number;
904
893
  readonly api_general: () => number;
905
894
  readonly api_identity: () => number;
906
895
  readonly api_notification: () => number;
907
896
  readonly api_contact: () => number;
908
897
  readonly api_company: () => number;
909
- readonly api_quote: () => number;
910
898
  readonly __wbg_contact_free: (a: number, b: number) => void;
911
- readonly __wbg_quote_free: (a: number, b: number) => void;
899
+ readonly __wbg_identity_free: (a: number, b: number) => void;
900
+ readonly __wbg_notification_free: (a: number, b: number) => void;
901
+ readonly __wbg_bill_free: (a: number, b: number) => void;
912
902
  readonly __wbg_general_free: (a: number, b: number) => void;
913
903
  readonly __wbg_company_free: (a: number, b: number) => void;
914
- readonly __wbg_bill_free: (a: number, b: number) => void;
915
- readonly __wbg_notification_free: (a: number, b: number) => void;
916
- readonly __wbg_identity_free: (a: number, b: number) => void;
917
904
  readonly __wbindgen_malloc: (a: number, b: number) => number;
918
905
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
919
906
  readonly __wbindgen_exn_store: (a: number) => void;
@@ -922,10 +909,10 @@ export interface InitOutput {
922
909
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
923
910
  readonly __wbindgen_export_6: WebAssembly.Table;
924
911
  readonly __externref_table_dealloc: (a: number) => void;
925
- readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h416913aada729534: (a: number, b: number) => void;
926
- readonly closure315_externref_shim: (a: number, b: number, c: any) => void;
927
- readonly closure818_externref_shim_multivalue_shim: (a: number, b: number, c: any) => [number, number];
928
- readonly closure592_externref_shim: (a: number, b: number, c: any, d: any) => void;
912
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h362ffeadd57dfbc9: (a: number, b: number) => void;
913
+ readonly closure320_externref_shim: (a: number, b: number, c: any) => void;
914
+ readonly closure827_externref_shim_multivalue_shim: (a: number, b: number, c: any) => [number, number];
915
+ readonly closure602_externref_shim: (a: number, b: number, c: any, d: any) => void;
929
916
  readonly __wbindgen_start: () => void;
930
917
  }
931
918
 
package/index.js CHANGED
@@ -228,22 +228,22 @@ export function task_worker_entry_point(ptr) {
228
228
  }
229
229
 
230
230
  function __wbg_adapter_54(arg0, arg1) {
231
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h416913aada729534(arg0, arg1);
231
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h362ffeadd57dfbc9(arg0, arg1);
232
232
  }
233
233
 
234
234
  function __wbg_adapter_57(arg0, arg1, arg2) {
235
- wasm.closure315_externref_shim(arg0, arg1, arg2);
235
+ wasm.closure320_externref_shim(arg0, arg1, arg2);
236
236
  }
237
237
 
238
- function __wbg_adapter_64(arg0, arg1, arg2) {
239
- const ret = wasm.closure818_externref_shim_multivalue_shim(arg0, arg1, arg2);
238
+ function __wbg_adapter_66(arg0, arg1, arg2) {
239
+ const ret = wasm.closure827_externref_shim_multivalue_shim(arg0, arg1, arg2);
240
240
  if (ret[1]) {
241
241
  throw takeFromExternrefTable0(ret[0]);
242
242
  }
243
243
  }
244
244
 
245
- function __wbg_adapter_251(arg0, arg1, arg2, arg3) {
246
- wasm.closure592_externref_shim(arg0, arg1, arg2, arg3);
245
+ function __wbg_adapter_247(arg0, arg1, arg2, arg3) {
246
+ wasm.closure602_externref_shim(arg0, arg1, arg2, arg3);
247
247
  }
248
248
 
249
249
  /**
@@ -338,13 +338,6 @@ export class Api {
338
338
  const ret = wasm.api_bill();
339
339
  return Bill.__wrap(ret);
340
340
  }
341
- /**
342
- * @returns {Quote}
343
- */
344
- static quote() {
345
- const ret = wasm.api_bill();
346
- return Quote.__wrap(ret);
347
- }
348
341
  }
349
342
 
350
343
  const BillFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -501,7 +494,7 @@ export class Bill {
501
494
  }
502
495
  /**
503
496
  * @param {BitcreditBillPayload} payload
504
- * @returns {BillId}
497
+ * @returns {BillIdResponse}
505
498
  */
506
499
  issue(payload) {
507
500
  const ret = wasm.bill_issue(this.__wbg_ptr, payload);
@@ -509,7 +502,7 @@ export class Bill {
509
502
  }
510
503
  /**
511
504
  * @param {BitcreditBillPayload} payload
512
- * @returns {BillId}
505
+ * @returns {BillIdResponse}
513
506
  */
514
507
  issue_blank(payload) {
515
508
  const ret = wasm.bill_issue_blank(this.__wbg_ptr, payload);
@@ -835,12 +828,12 @@ export class Contact {
835
828
  return Contact.__wrap(ret);
836
829
  }
837
830
  /**
838
- * @param {string} id
831
+ * @param {string} node_id
839
832
  * @param {string} file_name
840
833
  * @returns {BinaryFileResponse}
841
834
  */
842
- file(id, file_name) {
843
- const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
835
+ file(node_id, file_name) {
836
+ const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
844
837
  const len0 = WASM_VECTOR_LEN;
845
838
  const ptr1 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
846
839
  const len1 = WASM_VECTOR_LEN;
@@ -1165,60 +1158,6 @@ export class Notification {
1165
1158
  }
1166
1159
  }
1167
1160
 
1168
- const QuoteFinalization = (typeof FinalizationRegistry === 'undefined')
1169
- ? { register: () => {}, unregister: () => {} }
1170
- : new FinalizationRegistry(ptr => wasm.__wbg_quote_free(ptr >>> 0, 1));
1171
-
1172
- export class Quote {
1173
-
1174
- static __wrap(ptr) {
1175
- ptr = ptr >>> 0;
1176
- const obj = Object.create(Quote.prototype);
1177
- obj.__wbg_ptr = ptr;
1178
- QuoteFinalization.register(obj, obj.__wbg_ptr, obj);
1179
- return obj;
1180
- }
1181
-
1182
- __destroy_into_raw() {
1183
- const ptr = this.__wbg_ptr;
1184
- this.__wbg_ptr = 0;
1185
- QuoteFinalization.unregister(this);
1186
- return ptr;
1187
- }
1188
-
1189
- free() {
1190
- const ptr = this.__destroy_into_raw();
1191
- wasm.__wbg_quote_free(ptr, 0);
1192
- }
1193
- /**
1194
- * @returns {Quote}
1195
- */
1196
- static new() {
1197
- const ret = wasm.api_bill();
1198
- return Quote.__wrap(ret);
1199
- }
1200
- /**
1201
- * @param {string} id
1202
- * @returns {BitcreditEbillQuote}
1203
- */
1204
- get(id) {
1205
- const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1206
- const len0 = WASM_VECTOR_LEN;
1207
- const ret = wasm.quote_get(this.__wbg_ptr, ptr0, len0);
1208
- return ret;
1209
- }
1210
- /**
1211
- * @param {string} id
1212
- * @returns {BitcreditEbillQuote}
1213
- */
1214
- accept(id) {
1215
- const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1216
- const len0 = WASM_VECTOR_LEN;
1217
- const ret = wasm.quote_accept(this.__wbg_ptr, ptr0, len0);
1218
- return ret;
1219
- }
1220
- }
1221
-
1222
1161
  async function __wbg_load(module, imports) {
1223
1162
  if (typeof Response === 'function' && module instanceof Response) {
1224
1163
  if (typeof WebAssembly.instantiateStreaming === 'function') {
@@ -1563,7 +1502,7 @@ function __wbg_get_imports() {
1563
1502
  const a = state0.a;
1564
1503
  state0.a = 0;
1565
1504
  try {
1566
- return __wbg_adapter_251(a, state0.b, arg0, arg1);
1505
+ return __wbg_adapter_247(a, state0.b, arg0, arg1);
1567
1506
  } finally {
1568
1507
  state0.a = a;
1569
1508
  }
@@ -1960,32 +1899,32 @@ function __wbg_get_imports() {
1960
1899
  const ret = false;
1961
1900
  return ret;
1962
1901
  };
1963
- imports.wbg.__wbindgen_closure_wrapper10674 = function(arg0, arg1, arg2) {
1964
- const ret = makeMutClosure(arg0, arg1, 816, __wbg_adapter_54);
1902
+ imports.wbg.__wbindgen_closure_wrapper10768 = function(arg0, arg1, arg2) {
1903
+ const ret = makeMutClosure(arg0, arg1, 825, __wbg_adapter_54);
1965
1904
  return ret;
1966
1905
  };
1967
- imports.wbg.__wbindgen_closure_wrapper10699 = function(arg0, arg1, arg2) {
1968
- const ret = makeMutClosure(arg0, arg1, 819, __wbg_adapter_64);
1906
+ imports.wbg.__wbindgen_closure_wrapper10794 = function(arg0, arg1, arg2) {
1907
+ const ret = makeMutClosure(arg0, arg1, 828, __wbg_adapter_66);
1969
1908
  return ret;
1970
1909
  };
1971
- imports.wbg.__wbindgen_closure_wrapper19395 = function(arg0, arg1, arg2) {
1972
- const ret = makeMutClosure(arg0, arg1, 582, __wbg_adapter_57);
1910
+ imports.wbg.__wbindgen_closure_wrapper19501 = function(arg0, arg1, arg2) {
1911
+ const ret = makeMutClosure(arg0, arg1, 592, __wbg_adapter_57);
1973
1912
  return ret;
1974
1913
  };
1975
- imports.wbg.__wbindgen_closure_wrapper19436 = function(arg0, arg1, arg2) {
1976
- const ret = makeMutClosure(arg0, arg1, 582, __wbg_adapter_54);
1914
+ imports.wbg.__wbindgen_closure_wrapper2122 = function(arg0, arg1, arg2) {
1915
+ const ret = makeMutClosure(arg0, arg1, 592, __wbg_adapter_54);
1977
1916
  return ret;
1978
1917
  };
1979
- imports.wbg.__wbindgen_closure_wrapper2108 = function(arg0, arg1, arg2) {
1980
- const ret = makeMutClosure(arg0, arg1, 582, __wbg_adapter_54);
1918
+ imports.wbg.__wbindgen_closure_wrapper2829 = function(arg0, arg1, arg2) {
1919
+ const ret = makeMutClosure(arg0, arg1, 321, __wbg_adapter_57);
1981
1920
  return ret;
1982
1921
  };
1983
- imports.wbg.__wbindgen_closure_wrapper2816 = function(arg0, arg1, arg2) {
1984
- const ret = makeMutClosure(arg0, arg1, 316, __wbg_adapter_57);
1922
+ imports.wbg.__wbindgen_closure_wrapper2949 = function(arg0, arg1, arg2) {
1923
+ const ret = makeMutClosure(arg0, arg1, 592, __wbg_adapter_54);
1985
1924
  return ret;
1986
1925
  };
1987
- imports.wbg.__wbindgen_closure_wrapper9654 = function(arg0, arg1, arg2) {
1988
- const ret = makeMutClosure(arg0, arg1, 669, __wbg_adapter_57);
1926
+ imports.wbg.__wbindgen_closure_wrapper9737 = function(arg0, arg1, arg2) {
1927
+ const ret = makeMutClosure(arg0, arg1, 678, __wbg_adapter_57);
1989
1928
  return ret;
1990
1929
  };
1991
1930
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
package/index_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitcredit/bcr-ebill-wasm",
3
3
  "type": "module",
4
- "version": "0.3.16",
4
+ "version": "0.3.17",
5
5
  "license": "MIT",
6
6
  "files": [
7
7
  "index_bg.wasm",