@bitcredit/bcr-ebill-wasm 0.5.0-2 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +16 -21
- package/index.js +31 -41
- package/index_bg.wasm +0 -0
- package/package.json +5 -1
package/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export interface AcceptCompanyInvitePayload {
|
|
|
29
29
|
|
|
30
30
|
export interface ApproveContactSharePayload {
|
|
31
31
|
pending_share_id: string;
|
|
32
|
+
add_to_contacts: boolean;
|
|
32
33
|
share_back: boolean;
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -110,11 +111,6 @@ export interface BillMintStatusWeb {
|
|
|
110
111
|
has_mint_requests: boolean;
|
|
111
112
|
}
|
|
112
113
|
|
|
113
|
-
export interface BillNumbersToWordsForSum {
|
|
114
|
-
sum: number;
|
|
115
|
-
sum_as_words: string;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
114
|
export interface BillParticipantsWeb {
|
|
119
115
|
drawee: BillIdentParticipantWeb;
|
|
120
116
|
drawer: BillIdentParticipantWeb;
|
|
@@ -291,9 +287,10 @@ export interface Config {
|
|
|
291
287
|
log_level: string | undefined;
|
|
292
288
|
app_url: string;
|
|
293
289
|
bitcoin_network: string;
|
|
294
|
-
|
|
290
|
+
esplora_base_urls: string[];
|
|
295
291
|
nostr_relays: string[];
|
|
296
292
|
nostr_only_known_contacts: boolean | undefined;
|
|
293
|
+
nostr_max_relays: number | undefined;
|
|
297
294
|
job_runner_initial_delay_seconds: number;
|
|
298
295
|
job_runner_check_interval_seconds: number;
|
|
299
296
|
transport_initial_subscription_delay_seconds: number | undefined;
|
|
@@ -530,7 +527,7 @@ export interface MintOfferWeb {
|
|
|
530
527
|
mint_request_id: string;
|
|
531
528
|
keyset_id: string;
|
|
532
529
|
expiration_timestamp: number;
|
|
533
|
-
discounted_sum:
|
|
530
|
+
discounted_sum: string;
|
|
534
531
|
proofs: string | undefined;
|
|
535
532
|
proofs_spent: boolean;
|
|
536
533
|
}
|
|
@@ -840,7 +837,7 @@ export type JsErrorType = "FieldEmpty" | "FieldInvalid" | "InvalidSum" | "Invali
|
|
|
840
837
|
|
|
841
838
|
export type LightBillParticipantWeb = { Anon: LightBillAnonParticipantWeb } | { Ident: LightBillIdentParticipantWithAddressWeb };
|
|
842
839
|
|
|
843
|
-
export type MintRequestStatusWeb = "Pending" | { Denied: { timestamp: number } } | "Offered" | "Accepted" | { Rejected: { timestamp: number } } | { Cancelled: { timestamp: number } } | { Expired: { timestamp: number } };
|
|
840
|
+
export type MintRequestStatusWeb = "Pending" | { Denied: { timestamp: number } } | "Offered" | "Accepted" | "MintingEnabled" | { Rejected: { timestamp: number } } | { Cancelled: { timestamp: number } } | { Expired: { timestamp: number } };
|
|
844
841
|
|
|
845
842
|
export type NotificationTypeWeb = "General" | "Company" | "Bill" | "Contact";
|
|
846
843
|
|
|
@@ -890,7 +887,6 @@ export class Bill {
|
|
|
890
887
|
list_light(): Promise<TSResult<LightBillsResponse>>;
|
|
891
888
|
mint_state(id: string): Promise<TSResult<MintRequestStateResponse>>;
|
|
892
889
|
static new(): Bill;
|
|
893
|
-
numbers_to_words_for_sum(id: string): Promise<TSResult<BillNumbersToWordsForSum>>;
|
|
894
890
|
offer_to_sell(payload: OfferToSellBitcreditBillPayload): Promise<TSResult<void>>;
|
|
895
891
|
/**
|
|
896
892
|
* Blank offer to sell - the contact doesn't have to be an anonymous contact
|
|
@@ -1076,7 +1072,6 @@ export interface InitOutput {
|
|
|
1076
1072
|
readonly bill_list: (a: number) => any;
|
|
1077
1073
|
readonly bill_list_light: (a: number) => any;
|
|
1078
1074
|
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
1075
|
readonly bill_offer_to_sell: (a: number, b: any) => any;
|
|
1081
1076
|
readonly bill_offer_to_sell_blank: (a: number, b: any) => any;
|
|
1082
1077
|
readonly bill_past_endorsees: (a: number, b: number, c: number) => any;
|
|
@@ -1178,20 +1173,20 @@ export interface InitOutput {
|
|
|
1178
1173
|
readonly general_new: () => number;
|
|
1179
1174
|
readonly identity_new: () => number;
|
|
1180
1175
|
readonly notification_new: () => number;
|
|
1176
|
+
readonly __wbg_bill_free: (a: number, b: number) => void;
|
|
1177
|
+
readonly __wbg_contact_free: (a: number, b: number) => void;
|
|
1178
|
+
readonly __wbg_general_free: (a: number, b: number) => void;
|
|
1181
1179
|
readonly __wbg_identity_free: (a: number, b: number) => void;
|
|
1182
1180
|
readonly __wbg_notification_free: (a: number, b: number) => void;
|
|
1183
|
-
readonly __wbg_contact_free: (a: number, b: number) => void;
|
|
1184
1181
|
readonly __wbg_company_free: (a: number, b: number) => void;
|
|
1185
|
-
readonly
|
|
1186
|
-
readonly
|
|
1187
|
-
readonly
|
|
1188
|
-
readonly
|
|
1189
|
-
readonly
|
|
1190
|
-
readonly
|
|
1191
|
-
readonly
|
|
1192
|
-
readonly
|
|
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;
|
|
1182
|
+
readonly wasm_bindgen__closure__destroy__h51aac892dc13997d: (a: number, b: number) => void;
|
|
1183
|
+
readonly wasm_bindgen__closure__destroy__hbe06519e24c1c17d: (a: number, b: number) => void;
|
|
1184
|
+
readonly wasm_bindgen__closure__destroy__h5f782d91b3951026: (a: number, b: number) => void;
|
|
1185
|
+
readonly wasm_bindgen__convert__closures_____invoke__h8d953eaa28de6843: (a: number, b: number, c: any) => [number, number];
|
|
1186
|
+
readonly wasm_bindgen__convert__closures_____invoke__h6abaf268b0f3e50a: (a: number, b: number, c: any, d: any) => void;
|
|
1187
|
+
readonly wasm_bindgen__convert__closures_____invoke__hc7201d82e9552dab: (a: number, b: number, c: any) => void;
|
|
1188
|
+
readonly wasm_bindgen__convert__closures_____invoke__h135d7136d7f648a6: (a: number, b: number) => void;
|
|
1189
|
+
readonly wasm_bindgen__convert__closures_____invoke__h39afabf71b34096e: (a: number, b: number) => void;
|
|
1195
1190
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1196
1191
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1197
1192
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/index.js
CHANGED
|
@@ -276,16 +276,6 @@ export class Bill {
|
|
|
276
276
|
const ret = wasm.api_bill();
|
|
277
277
|
return Bill.__wrap(ret);
|
|
278
278
|
}
|
|
279
|
-
/**
|
|
280
|
-
* @param {string} id
|
|
281
|
-
* @returns {TSResult<BillNumbersToWordsForSum>}
|
|
282
|
-
*/
|
|
283
|
-
numbers_to_words_for_sum(id) {
|
|
284
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
285
|
-
const len0 = WASM_VECTOR_LEN;
|
|
286
|
-
const ret = wasm.bill_numbers_to_words_for_sum(this.__wbg_ptr, ptr0, len0);
|
|
287
|
-
return ret;
|
|
288
|
-
}
|
|
289
279
|
/**
|
|
290
280
|
* @param {OfferToSellBitcreditBillPayload} payload
|
|
291
281
|
* @returns {TSResult<void>}
|
|
@@ -1310,7 +1300,7 @@ function __wbg_get_imports() {
|
|
|
1310
1300
|
const ret = arg0.call(arg1, arg2);
|
|
1311
1301
|
return ret;
|
|
1312
1302
|
}, arguments); },
|
|
1313
|
-
|
|
1303
|
+
__wbg_clearInterval_f58e642200529dfb: function(arg0) {
|
|
1314
1304
|
globalThis.clearInterval(arg0);
|
|
1315
1305
|
},
|
|
1316
1306
|
__wbg_clearTimeout_42d9ccd50822fd3a: function(arg0) {
|
|
@@ -1394,7 +1384,7 @@ function __wbg_get_imports() {
|
|
|
1394
1384
|
__wbg_error_794d0ffc9d00d5c3: function(arg0, arg1, arg2, arg3) {
|
|
1395
1385
|
console.error(arg0, arg1, arg2, arg3);
|
|
1396
1386
|
},
|
|
1397
|
-
|
|
1387
|
+
__wbg_error_c8eaf2faafef0bdd: function(arg0, arg1) {
|
|
1398
1388
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
1399
1389
|
},
|
|
1400
1390
|
__wbg_fetch_6bbc32f991730587: function(arg0) {
|
|
@@ -1408,7 +1398,7 @@ function __wbg_get_imports() {
|
|
|
1408
1398
|
__wbg_getRandomValues_1c61fac11405ffdc: function() { return handleError(function (arg0, arg1) {
|
|
1409
1399
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1410
1400
|
}, arguments); },
|
|
1411
|
-
|
|
1401
|
+
__wbg_getRandomValues_71d446877d8b0ad4: function() { return handleError(function (arg0, arg1) {
|
|
1412
1402
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1413
1403
|
}, arguments); },
|
|
1414
1404
|
__wbg_getRandomValues_b3f15fcbfabb0f8b: function() { return handleError(function (arg0, arg1) {
|
|
@@ -1590,7 +1580,7 @@ function __wbg_get_imports() {
|
|
|
1590
1580
|
const a = state0.a;
|
|
1591
1581
|
state0.a = 0;
|
|
1592
1582
|
try {
|
|
1593
|
-
return
|
|
1583
|
+
return wasm_bindgen__convert__closures_____invoke__h6abaf268b0f3e50a(a, state0.b, arg0, arg1);
|
|
1594
1584
|
} finally {
|
|
1595
1585
|
state0.a = a;
|
|
1596
1586
|
}
|
|
@@ -1641,7 +1631,7 @@ function __wbg_get_imports() {
|
|
|
1641
1631
|
const ret = arg0.node;
|
|
1642
1632
|
return ret;
|
|
1643
1633
|
},
|
|
1644
|
-
|
|
1634
|
+
__wbg_now_20ea2aaee436b621: function() { return handleError(function () {
|
|
1645
1635
|
const ret = Date.now();
|
|
1646
1636
|
return ret;
|
|
1647
1637
|
}, arguments); },
|
|
@@ -1750,7 +1740,7 @@ function __wbg_get_imports() {
|
|
|
1750
1740
|
__wbg_send_bc0336a1b5ce4fb7: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1751
1741
|
arg0.send(getStringFromWasm0(arg1, arg2));
|
|
1752
1742
|
}, arguments); },
|
|
1753
|
-
|
|
1743
|
+
__wbg_setInterval_def8cfc26a20eec7: function(arg0, arg1) {
|
|
1754
1744
|
const ret = globalThis.setInterval(arg0, arg1);
|
|
1755
1745
|
return ret;
|
|
1756
1746
|
},
|
|
@@ -1758,7 +1748,7 @@ function __wbg_get_imports() {
|
|
|
1758
1748
|
const ret = setTimeout(arg0, arg1);
|
|
1759
1749
|
return ret;
|
|
1760
1750
|
},
|
|
1761
|
-
|
|
1751
|
+
__wbg_setTimeout_c3c682fa1d6caf77: function(arg0, arg1) {
|
|
1762
1752
|
globalThis.setTimeout(arg0, arg1);
|
|
1763
1753
|
},
|
|
1764
1754
|
__wbg_setTimeout_db2dbaeefb6f39c7: function() { return handleError(function (arg0, arg1) {
|
|
@@ -1942,38 +1932,38 @@ function __wbg_get_imports() {
|
|
|
1942
1932
|
return ret;
|
|
1943
1933
|
},
|
|
1944
1934
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1945
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1946
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1935
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 59, function: Function { arguments: [Externref], shim_idx: 328, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1936
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h51aac892dc13997d, wasm_bindgen__convert__closures_____invoke__hc7201d82e9552dab);
|
|
1947
1937
|
return ret;
|
|
1948
1938
|
},
|
|
1949
1939
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1950
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1951
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1940
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 59, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 328, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1941
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h51aac892dc13997d, wasm_bindgen__convert__closures_____invoke__hc7201d82e9552dab);
|
|
1952
1942
|
return ret;
|
|
1953
1943
|
},
|
|
1954
1944
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1955
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1956
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1945
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 59, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 328, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1946
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h51aac892dc13997d, wasm_bindgen__convert__closures_____invoke__hc7201d82e9552dab);
|
|
1957
1947
|
return ret;
|
|
1958
1948
|
},
|
|
1959
1949
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1960
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1961
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1950
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 59, function: Function { arguments: [], shim_idx: 331, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1951
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h51aac892dc13997d, wasm_bindgen__convert__closures_____invoke__h135d7136d7f648a6);
|
|
1962
1952
|
return ret;
|
|
1963
1953
|
},
|
|
1964
1954
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
1965
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1966
|
-
const ret = makeClosure(arg0, arg1, wasm.
|
|
1955
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 59, function: Function { arguments: [], shim_idx: 60, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
1956
|
+
const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h51aac892dc13997d, wasm_bindgen__convert__closures_____invoke__h39afabf71b34096e);
|
|
1967
1957
|
return ret;
|
|
1968
1958
|
},
|
|
1969
1959
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
1970
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1971
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1960
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 882, function: Function { arguments: [], shim_idx: 331, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1961
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hbe06519e24c1c17d, wasm_bindgen__convert__closures_____invoke__h135d7136d7f648a6);
|
|
1972
1962
|
return ret;
|
|
1973
1963
|
},
|
|
1974
1964
|
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
1975
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1976
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1965
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 885, function: Function { arguments: [NamedExternref("Event")], shim_idx: 886, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1966
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h5f782d91b3951026, wasm_bindgen__convert__closures_____invoke__h8d953eaa28de6843);
|
|
1977
1967
|
return ret;
|
|
1978
1968
|
},
|
|
1979
1969
|
__wbindgen_cast_0000000000000008: function(arg0) {
|
|
@@ -2017,27 +2007,27 @@ function __wbg_get_imports() {
|
|
|
2017
2007
|
};
|
|
2018
2008
|
}
|
|
2019
2009
|
|
|
2020
|
-
function
|
|
2021
|
-
wasm.
|
|
2010
|
+
function wasm_bindgen__convert__closures_____invoke__h135d7136d7f648a6(arg0, arg1) {
|
|
2011
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h135d7136d7f648a6(arg0, arg1);
|
|
2022
2012
|
}
|
|
2023
2013
|
|
|
2024
|
-
function
|
|
2025
|
-
wasm.
|
|
2014
|
+
function wasm_bindgen__convert__closures_____invoke__h39afabf71b34096e(arg0, arg1) {
|
|
2015
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h39afabf71b34096e(arg0, arg1);
|
|
2026
2016
|
}
|
|
2027
2017
|
|
|
2028
|
-
function
|
|
2029
|
-
wasm.
|
|
2018
|
+
function wasm_bindgen__convert__closures_____invoke__hc7201d82e9552dab(arg0, arg1, arg2) {
|
|
2019
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hc7201d82e9552dab(arg0, arg1, arg2);
|
|
2030
2020
|
}
|
|
2031
2021
|
|
|
2032
|
-
function
|
|
2033
|
-
const ret = wasm.
|
|
2022
|
+
function wasm_bindgen__convert__closures_____invoke__h8d953eaa28de6843(arg0, arg1, arg2) {
|
|
2023
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h8d953eaa28de6843(arg0, arg1, arg2);
|
|
2034
2024
|
if (ret[1]) {
|
|
2035
2025
|
throw takeFromExternrefTable0(ret[0]);
|
|
2036
2026
|
}
|
|
2037
2027
|
}
|
|
2038
2028
|
|
|
2039
|
-
function
|
|
2040
|
-
wasm.
|
|
2029
|
+
function wasm_bindgen__convert__closures_____invoke__h6abaf268b0f3e50a(arg0, arg1, arg2, arg3) {
|
|
2030
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h6abaf268b0f3e50a(arg0, arg1, arg2, arg3);
|
|
2041
2031
|
}
|
|
2042
2032
|
|
|
2043
2033
|
|
package/index_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitcredit/bcr-ebill-wasm",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.1",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/BitcreditProtocol/Bitcredit-Core"
|
|
9
|
+
},
|
|
6
10
|
"files": [
|
|
7
11
|
"index_bg.wasm",
|
|
8
12
|
"index.js",
|