@bitcredit/bcr-ebill-wasm 0.4.3 → 0.4.4
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 +21 -32
- package/index.js +71 -34
- package/index_bg.wasm +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -193,16 +193,6 @@ export interface PastPaymentDataRecourseWeb {
|
|
|
193
193
|
status: PastPaymentStatusWeb;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
export interface BitcreditEbillQuote {
|
|
197
|
-
bill_id: string;
|
|
198
|
-
quote_id: string;
|
|
199
|
-
sum: number;
|
|
200
|
-
mint_node_id: string;
|
|
201
|
-
mint_url: string;
|
|
202
|
-
accepted: boolean;
|
|
203
|
-
token: string;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
196
|
export interface BitcreditBillWeb {
|
|
207
197
|
id: string;
|
|
208
198
|
participants: BillParticipantsWeb;
|
|
@@ -213,37 +203,34 @@ export interface BitcreditBillWeb {
|
|
|
213
203
|
|
|
214
204
|
export type BillCurrentWaitingStateWeb = { Sell: BillWaitingForSellStateWeb } | { Payment: BillWaitingForPaymentStateWeb } | { Recourse: BillWaitingForRecourseStateWeb };
|
|
215
205
|
|
|
216
|
-
export interface
|
|
206
|
+
export interface BillWaitingStatePaymentDataWeb {
|
|
217
207
|
time_of_request: number;
|
|
218
|
-
buyer: BillParticipantWeb;
|
|
219
|
-
seller: BillParticipantWeb;
|
|
220
208
|
currency: string;
|
|
221
209
|
sum: string;
|
|
222
210
|
link_to_pay: string;
|
|
223
211
|
address_to_pay: string;
|
|
224
212
|
mempool_link_for_address_to_pay: string;
|
|
213
|
+
tx_id: string | undefined;
|
|
214
|
+
in_mempool: boolean;
|
|
215
|
+
confirmations: number;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface BillWaitingForSellStateWeb {
|
|
219
|
+
buyer: BillParticipantWeb;
|
|
220
|
+
seller: BillParticipantWeb;
|
|
221
|
+
payment_data: BillWaitingStatePaymentDataWeb;
|
|
225
222
|
}
|
|
226
223
|
|
|
227
224
|
export interface BillWaitingForPaymentStateWeb {
|
|
228
|
-
time_of_request: number;
|
|
229
225
|
payer: BillIdentParticipantWeb;
|
|
230
226
|
payee: BillParticipantWeb;
|
|
231
|
-
|
|
232
|
-
sum: string;
|
|
233
|
-
link_to_pay: string;
|
|
234
|
-
address_to_pay: string;
|
|
235
|
-
mempool_link_for_address_to_pay: string;
|
|
227
|
+
payment_data: BillWaitingStatePaymentDataWeb;
|
|
236
228
|
}
|
|
237
229
|
|
|
238
230
|
export interface BillWaitingForRecourseStateWeb {
|
|
239
|
-
time_of_request: number;
|
|
240
231
|
recourser: BillIdentParticipantWeb;
|
|
241
232
|
recoursee: BillIdentParticipantWeb;
|
|
242
|
-
|
|
243
|
-
sum: string;
|
|
244
|
-
link_to_pay: string;
|
|
245
|
-
address_to_pay: string;
|
|
246
|
-
mempool_link_for_address_to_pay: string;
|
|
233
|
+
payment_data: BillWaitingStatePaymentDataWeb;
|
|
247
234
|
}
|
|
248
235
|
|
|
249
236
|
export interface BillStatusWeb {
|
|
@@ -662,6 +649,7 @@ export interface Config {
|
|
|
662
649
|
job_runner_check_interval_seconds: number;
|
|
663
650
|
default_mint_url: string;
|
|
664
651
|
default_mint_node_id: string;
|
|
652
|
+
num_confirmations_for_payment: number;
|
|
665
653
|
}
|
|
666
654
|
|
|
667
655
|
export interface MintRequestStateWeb {
|
|
@@ -916,12 +904,12 @@ export interface InitOutput {
|
|
|
916
904
|
readonly api_notification: () => number;
|
|
917
905
|
readonly api_contact: () => number;
|
|
918
906
|
readonly api_company: () => number;
|
|
919
|
-
readonly __wbg_identity_free: (a: number, b: number) => void;
|
|
920
|
-
readonly __wbg_bill_free: (a: number, b: number) => void;
|
|
921
907
|
readonly __wbg_company_free: (a: number, b: number) => void;
|
|
908
|
+
readonly __wbg_general_free: (a: number, b: number) => void;
|
|
909
|
+
readonly __wbg_bill_free: (a: number, b: number) => void;
|
|
922
910
|
readonly __wbg_notification_free: (a: number, b: number) => void;
|
|
923
911
|
readonly __wbg_contact_free: (a: number, b: number) => void;
|
|
924
|
-
readonly
|
|
912
|
+
readonly __wbg_identity_free: (a: number, b: number) => void;
|
|
925
913
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
926
914
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
927
915
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
@@ -930,10 +918,11 @@ export interface InitOutput {
|
|
|
930
918
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
931
919
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
932
920
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
933
|
-
readonly
|
|
934
|
-
readonly
|
|
935
|
-
readonly
|
|
936
|
-
readonly
|
|
921
|
+
readonly _dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcdc569c6fce875f5: (a: number, b: number) => void;
|
|
922
|
+
readonly closure336_externref_shim: (a: number, b: number, c: any) => void;
|
|
923
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h05d8c0db83408407: (a: number, b: number) => void;
|
|
924
|
+
readonly closure843_externref_shim_multivalue_shim: (a: number, b: number, c: any) => [number, number];
|
|
925
|
+
readonly closure626_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
937
926
|
readonly __wbindgen_start: () => void;
|
|
938
927
|
}
|
|
939
928
|
|
package/index.js
CHANGED
|
@@ -138,6 +138,28 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
138
138
|
return real;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
function makeClosure(arg0, arg1, dtor, f) {
|
|
142
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
143
|
+
const real = (...args) => {
|
|
144
|
+
// First up with a closure we increment the internal reference
|
|
145
|
+
// count. This ensures that the Rust closure environment won't
|
|
146
|
+
// be deallocated while we're invoking it.
|
|
147
|
+
state.cnt++;
|
|
148
|
+
try {
|
|
149
|
+
return f(state.a, state.b, ...args);
|
|
150
|
+
} finally {
|
|
151
|
+
if (--state.cnt === 0) {
|
|
152
|
+
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
|
|
153
|
+
state.a = 0;
|
|
154
|
+
CLOSURE_DTORS.unregister(state);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
real.original = state;
|
|
159
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
160
|
+
return real;
|
|
161
|
+
}
|
|
162
|
+
|
|
141
163
|
function debugString(val) {
|
|
142
164
|
// primitive types
|
|
143
165
|
const type = typeof val;
|
|
@@ -228,22 +250,26 @@ export function task_worker_entry_point(ptr) {
|
|
|
228
250
|
}
|
|
229
251
|
|
|
230
252
|
function __wbg_adapter_54(arg0, arg1) {
|
|
231
|
-
wasm.
|
|
253
|
+
wasm._dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcdc569c6fce875f5(arg0, arg1);
|
|
232
254
|
}
|
|
233
255
|
|
|
234
256
|
function __wbg_adapter_57(arg0, arg1, arg2) {
|
|
235
|
-
wasm.
|
|
257
|
+
wasm.closure336_externref_shim(arg0, arg1, arg2);
|
|
236
258
|
}
|
|
237
259
|
|
|
238
|
-
function
|
|
239
|
-
|
|
260
|
+
function __wbg_adapter_60(arg0, arg1) {
|
|
261
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h05d8c0db83408407(arg0, arg1);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function __wbg_adapter_69(arg0, arg1, arg2) {
|
|
265
|
+
const ret = wasm.closure843_externref_shim_multivalue_shim(arg0, arg1, arg2);
|
|
240
266
|
if (ret[1]) {
|
|
241
267
|
throw takeFromExternrefTable0(ret[0]);
|
|
242
268
|
}
|
|
243
269
|
}
|
|
244
270
|
|
|
245
|
-
function
|
|
246
|
-
wasm.
|
|
271
|
+
function __wbg_adapter_251(arg0, arg1, arg2, arg3) {
|
|
272
|
+
wasm.closure626_externref_shim(arg0, arg1, arg2, arg3);
|
|
247
273
|
}
|
|
248
274
|
|
|
249
275
|
/**
|
|
@@ -275,6 +301,8 @@ const __wbindgen_enum_IdbCursorDirection = ["next", "nextunique", "prev", "prevu
|
|
|
275
301
|
|
|
276
302
|
const __wbindgen_enum_IdbTransactionMode = ["readonly", "readwrite", "versionchange", "readwriteflush", "cleanup"];
|
|
277
303
|
|
|
304
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
305
|
+
|
|
278
306
|
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
279
307
|
|
|
280
308
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
@@ -1291,15 +1319,14 @@ function __wbg_get_imports() {
|
|
|
1291
1319
|
const ret = arg0.call(arg1, arg2);
|
|
1292
1320
|
return ret;
|
|
1293
1321
|
}, arguments) };
|
|
1294
|
-
imports.wbg.
|
|
1295
|
-
|
|
1296
|
-
return ret;
|
|
1322
|
+
imports.wbg.__wbg_clearInterval_938929bdd0f2dff9 = function(arg0) {
|
|
1323
|
+
globalThis.clearInterval(arg0);
|
|
1297
1324
|
};
|
|
1298
|
-
imports.wbg.
|
|
1325
|
+
imports.wbg.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
|
|
1299
1326
|
const ret = clearTimeout(arg0);
|
|
1300
1327
|
return ret;
|
|
1301
1328
|
};
|
|
1302
|
-
imports.wbg.
|
|
1329
|
+
imports.wbg.__wbg_clearTimeout_6222fede17abcb1a = function(arg0) {
|
|
1303
1330
|
const ret = clearTimeout(arg0);
|
|
1304
1331
|
return ret;
|
|
1305
1332
|
};
|
|
@@ -1379,14 +1406,14 @@ function __wbg_get_imports() {
|
|
|
1379
1406
|
const ret = arg0.error;
|
|
1380
1407
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1381
1408
|
}, arguments) };
|
|
1382
|
-
imports.wbg.__wbg_fetch_11bff8299d0ecd2b = function(arg0) {
|
|
1383
|
-
const ret = fetch(arg0);
|
|
1384
|
-
return ret;
|
|
1385
|
-
};
|
|
1386
1409
|
imports.wbg.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
|
|
1387
1410
|
const ret = arg0.fetch(arg1);
|
|
1388
1411
|
return ret;
|
|
1389
1412
|
};
|
|
1413
|
+
imports.wbg.__wbg_fetch_f156d10be9a5c88a = function(arg0) {
|
|
1414
|
+
const ret = fetch(arg0);
|
|
1415
|
+
return ret;
|
|
1416
|
+
};
|
|
1390
1417
|
imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
|
|
1391
1418
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1392
1419
|
}, arguments) };
|
|
@@ -1549,7 +1576,7 @@ function __wbg_get_imports() {
|
|
|
1549
1576
|
const a = state0.a;
|
|
1550
1577
|
state0.a = 0;
|
|
1551
1578
|
try {
|
|
1552
|
-
return
|
|
1579
|
+
return __wbg_adapter_251(a, state0.b, arg0, arg1);
|
|
1553
1580
|
} finally {
|
|
1554
1581
|
state0.a = a;
|
|
1555
1582
|
}
|
|
@@ -1726,14 +1753,17 @@ function __wbg_get_imports() {
|
|
|
1726
1753
|
imports.wbg.__wbg_send_fc0c204e8a1757f4 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1727
1754
|
arg0.send(getArrayU8FromWasm0(arg1, arg2));
|
|
1728
1755
|
}, arguments) };
|
|
1729
|
-
imports.wbg.
|
|
1730
|
-
const ret = setInterval(arg0, arg1);
|
|
1756
|
+
imports.wbg.__wbg_setInterval_c733bbe39e9b7c2b = function(arg0, arg1) {
|
|
1757
|
+
const ret = globalThis.setInterval(arg0, arg1);
|
|
1731
1758
|
return ret;
|
|
1732
|
-
}
|
|
1733
|
-
imports.wbg.
|
|
1759
|
+
};
|
|
1760
|
+
imports.wbg.__wbg_setTimeout_2b339866a2aa3789 = function(arg0, arg1) {
|
|
1734
1761
|
const ret = setTimeout(arg0, arg1);
|
|
1735
1762
|
return ret;
|
|
1736
1763
|
};
|
|
1764
|
+
imports.wbg.__wbg_setTimeout_8f06012fba12034e = function(arg0, arg1) {
|
|
1765
|
+
globalThis.setTimeout(arg0, arg1);
|
|
1766
|
+
};
|
|
1737
1767
|
imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
|
|
1738
1768
|
const ret = setTimeout(arg0, arg1);
|
|
1739
1769
|
return ret;
|
|
@@ -1764,6 +1794,9 @@ function __wbg_get_imports() {
|
|
|
1764
1794
|
imports.wbg.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
|
|
1765
1795
|
arg0.body = arg1;
|
|
1766
1796
|
};
|
|
1797
|
+
imports.wbg.__wbg_setcache_12f17c3a980650e4 = function(arg0, arg1) {
|
|
1798
|
+
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
1799
|
+
};
|
|
1767
1800
|
imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {
|
|
1768
1801
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1769
1802
|
};
|
|
@@ -1946,32 +1979,36 @@ function __wbg_get_imports() {
|
|
|
1946
1979
|
const ret = false;
|
|
1947
1980
|
return ret;
|
|
1948
1981
|
};
|
|
1949
|
-
imports.wbg.
|
|
1950
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1982
|
+
imports.wbg.__wbindgen_closure_wrapper10178 = function(arg0, arg1, arg2) {
|
|
1983
|
+
const ret = makeMutClosure(arg0, arg1, 702, __wbg_adapter_57);
|
|
1984
|
+
return ret;
|
|
1985
|
+
};
|
|
1986
|
+
imports.wbg.__wbindgen_closure_wrapper11112 = function(arg0, arg1, arg2) {
|
|
1987
|
+
const ret = makeMutClosure(arg0, arg1, 841, __wbg_adapter_60);
|
|
1951
1988
|
return ret;
|
|
1952
1989
|
};
|
|
1953
|
-
imports.wbg.
|
|
1954
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1990
|
+
imports.wbg.__wbindgen_closure_wrapper11135 = function(arg0, arg1, arg2) {
|
|
1991
|
+
const ret = makeMutClosure(arg0, arg1, 844, __wbg_adapter_69);
|
|
1955
1992
|
return ret;
|
|
1956
1993
|
};
|
|
1957
|
-
imports.wbg.
|
|
1958
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1994
|
+
imports.wbg.__wbindgen_closure_wrapper19898 = function(arg0, arg1, arg2) {
|
|
1995
|
+
const ret = makeMutClosure(arg0, arg1, 616, __wbg_adapter_57);
|
|
1959
1996
|
return ret;
|
|
1960
1997
|
};
|
|
1961
|
-
imports.wbg.
|
|
1962
|
-
const ret =
|
|
1998
|
+
imports.wbg.__wbindgen_closure_wrapper2097 = function(arg0, arg1, arg2) {
|
|
1999
|
+
const ret = makeClosure(arg0, arg1, 337, __wbg_adapter_54);
|
|
1963
2000
|
return ret;
|
|
1964
2001
|
};
|
|
1965
|
-
imports.wbg.
|
|
1966
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2002
|
+
imports.wbg.__wbindgen_closure_wrapper2811 = function(arg0, arg1, arg2) {
|
|
2003
|
+
const ret = makeMutClosure(arg0, arg1, 337, __wbg_adapter_57);
|
|
1967
2004
|
return ret;
|
|
1968
2005
|
};
|
|
1969
|
-
imports.wbg.
|
|
1970
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2006
|
+
imports.wbg.__wbindgen_closure_wrapper5282 = function(arg0, arg1, arg2) {
|
|
2007
|
+
const ret = makeMutClosure(arg0, arg1, 616, __wbg_adapter_60);
|
|
1971
2008
|
return ret;
|
|
1972
2009
|
};
|
|
1973
|
-
imports.wbg.
|
|
1974
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2010
|
+
imports.wbg.__wbindgen_closure_wrapper8377 = function(arg0, arg1, arg2) {
|
|
2011
|
+
const ret = makeMutClosure(arg0, arg1, 616, __wbg_adapter_60);
|
|
1975
2012
|
return ret;
|
|
1976
2013
|
};
|
|
1977
2014
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/index_bg.wasm
CHANGED
|
Binary file
|