@bitcredit/bcr-ebill-wasm 0.5.4 → 0.5.5

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
@@ -66,9 +66,7 @@ export interface BillCallerPaymentStateWeb {
66
66
  time_of_request: number;
67
67
  currency: string;
68
68
  sum: string;
69
- link_to_pay: string;
70
69
  address_to_pay: string;
71
- mempool_link_for_address_to_pay: string;
72
70
  status: PaymentStatusWeb;
73
71
  payment_deadline: number;
74
72
  tx_id: string | undefined;
@@ -77,7 +75,16 @@ export interface BillCallerPaymentStateWeb {
77
75
  private_descriptor_to_spend: string | undefined;
78
76
  }
79
77
 
78
+ export interface BillCheckSweepBTCFundsPayload {
79
+ bill_id: string;
80
+ source_address: string;
81
+ destination_address: string;
82
+ }
83
+
80
84
  export interface BillCombinedBitcoinKeyWeb {
85
+ block_id: number;
86
+ signing_timestamp: number;
87
+ payment_op: BillOpCodeWeb;
81
88
  private_descriptor: string;
82
89
  }
83
90
 
@@ -96,10 +103,17 @@ export interface BillDataWeb {
96
103
  active_notification: NotificationWeb | undefined;
97
104
  }
98
105
 
106
+ export interface BillHistoryBlockPaymentDataWeb {
107
+ currency: string;
108
+ sum: string;
109
+ payment_address: string;
110
+ }
111
+
99
112
  export interface BillHistoryBlockWeb {
100
113
  block_id: number;
101
114
  block_type: BillOpCodeWeb;
102
115
  pay_to_the_order_of: LightBillParticipantWeb | undefined;
116
+ payment_data: BillHistoryBlockPaymentDataWeb | undefined;
103
117
  request_deadline: number | undefined;
104
118
  signed: LightSignedByWeb;
105
119
  signing_timestamp: number;
@@ -180,6 +194,32 @@ export interface BillStatusWeb {
180
194
  last_block_time: number;
181
195
  }
182
196
 
197
+ export interface BillSweepBTCEstimateWeb {
198
+ available_funds: number;
199
+ economy: BillSweepBTCOptionWeb;
200
+ fast: BillSweepBTCOptionWeb;
201
+ }
202
+
203
+ export interface BillSweepBTCFundsPayload {
204
+ bill_id: string;
205
+ source_address: string;
206
+ destination_address: string;
207
+ fee: number;
208
+ }
209
+
210
+ export interface BillSweepBTCFundsResultWeb {
211
+ tx_id: string;
212
+ link_to_tx: string;
213
+ fee_sat: number;
214
+ sweep_amount: number;
215
+ }
216
+
217
+ export interface BillSweepBTCOptionWeb {
218
+ fee_rate_sat_vb: number;
219
+ fee_sat: number;
220
+ amount_to_sweep_sat: number;
221
+ }
222
+
183
223
  export interface BillWaitingForPaymentStateWeb {
184
224
  payer: BillIdentParticipantWeb;
185
225
  payee: BillParticipantWeb;
@@ -202,9 +242,7 @@ export interface BillWaitingStatePaymentDataWeb {
202
242
  time_of_request: number;
203
243
  currency: string;
204
244
  sum: string;
205
- link_to_pay: string;
206
245
  address_to_pay: string;
207
- mempool_link_for_address_to_pay: string;
208
246
  tx_id: string | undefined;
209
247
  in_mempool: boolean;
210
248
  confirmations: number;
@@ -257,6 +295,16 @@ export interface BitcreditBillWeb {
257
295
  actions: BillCallerActionsWeb;
258
296
  }
259
297
 
298
+ export interface BtcAddressAndSumPayload {
299
+ bill_id: string;
300
+ address: string;
301
+ sum: string;
302
+ }
303
+
304
+ export interface BtcAddressPayload {
305
+ address: string;
306
+ }
307
+
260
308
  export interface ChangeIdentityEmailPayload {
261
309
  email: string;
262
310
  }
@@ -312,6 +360,7 @@ export interface Config {
312
360
  bitcoin_network: string;
313
361
  esplora_base_urls: string[];
314
362
  nostr_relays: string[];
363
+ blossom_servers: string[] | undefined;
315
364
  nostr_only_known_contacts: boolean | undefined;
316
365
  nostr_max_relays: number | undefined;
317
366
  job_runner_initial_delay_seconds: number;
@@ -542,6 +591,10 @@ export interface LightSignedByWeb {
542
591
  signatory: LightBillSignatoryWeb | undefined;
543
592
  }
544
593
 
594
+ export interface LinkToPayResponse {
595
+ link_to_pay: string;
596
+ }
597
+
545
598
  export interface ListSignatoriesResponse {
546
599
  signatories: SignatoryResponse[];
547
600
  }
@@ -551,6 +604,10 @@ export interface LocallyHideSignatoryPayload {
551
604
  signatory_node_id: string;
552
605
  }
553
606
 
607
+ export interface MempoolLinkResponse {
608
+ mempool_link: string;
609
+ }
610
+
554
611
  export interface MintOfferWeb {
555
612
  mint_request_id: string;
556
613
  keyset_id: string;
@@ -673,10 +730,8 @@ export interface PastPaymentDataPaymentWeb {
673
730
  payee: BillParticipantWeb;
674
731
  currency: string;
675
732
  sum: string;
676
- link_to_pay: string;
677
733
  address_to_pay: string;
678
734
  private_descriptor_to_spend: string;
679
- mempool_link_for_address_to_pay: string;
680
735
  status: PaymentStatusWeb;
681
736
  }
682
737
 
@@ -686,10 +741,8 @@ export interface PastPaymentDataRecourseWeb {
686
741
  recoursee: BillIdentParticipantWeb;
687
742
  currency: string;
688
743
  sum: string;
689
- link_to_pay: string;
690
744
  address_to_pay: string;
691
745
  private_descriptor_to_spend: string;
692
- mempool_link_for_address_to_pay: string;
693
746
  status: PaymentStatusWeb;
694
747
  }
695
748
 
@@ -699,10 +752,8 @@ export interface PastPaymentDataSellWeb {
699
752
  seller: BillParticipantWeb;
700
753
  currency: string;
701
754
  sum: string;
702
- link_to_pay: string;
703
755
  address_to_pay: string;
704
756
  private_descriptor_to_spend: string;
705
- mempool_link_for_address_to_pay: string;
706
757
  status: PaymentStatusWeb;
707
758
  }
708
759
 
@@ -887,7 +938,7 @@ export type CompanyStatusWeb = "Invited" | "Active" | "None";
887
938
 
888
939
  export type GeneralSearchFilterItemTypeWeb = "Company" | "Bill" | "Contact";
889
940
 
890
- 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" | "InvalidIdentityProof" | "InvalidReferenceBlock" | "InvalidSignature" | "InvalidHash" | "InvalidUrl" | "InvalidIdentityProofStatus" | "Json" | "InvalidBillAction" | "InvalidCompanyAction" | "CompanySignerCreatorMismatch" | "InvalidMintRequestId";
941
+ export type JsErrorType = "FieldEmpty" | "FieldInvalid" | "InvalidSum" | "InvalidCurrency" | "InvalidBitcoinAddress" | "InvalidContentType" | "IdentityCantBeAnon" | "InvalidContactType" | "InvalidIdentityType" | "InvalidDate" | "InvalidCountry" | "InvalidTimestamp" | "DeadlineBeforeMinimum" | "SelfDraftedBillCantBeBlank" | "RequestToMintForBillAndMintAlreadyActive" | "SignerCantBeAnon" | "ContactIsAnonymous" | "InvalidContact" | "InvalidMint" | "IssueDateAfterMaturityDate" | "MaturityDateInThePast" | "RequestToPayBeforeMaturityDate" | "InvalidFileUploadId" | "InvalidNodeId" | "InvalidBillId" | "InvalidBillType" | "DraweeCantBePayee" | "EndorserCantBeEndorsee" | "BuyerCantBeSeller" | "RecourserCantBeRecoursee" | "DraweeNotInContacts" | "PayeeNotInContacts" | "MintNotInContacts" | "BuyerNotInContacts" | "EndorseeNotInContacts" | "RecourseeNotInContacts" | "NoPaymentForSweep" | "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" | "InvalidIdentityProof" | "InvalidReferenceBlock" | "InvalidSignature" | "InvalidHash" | "InvalidUrl" | "InvalidIdentityProofStatus" | "Json" | "InvalidBillAction" | "InvalidCompanyAction" | "CompanySignerCreatorMismatch" | "InvalidMintRequestId";
891
942
 
892
943
  export type LightBillParticipantWeb = { Anon: LightBillAnonParticipantWeb } | { Ident: LightBillIdentParticipantWithAddressWeb };
893
944
 
@@ -921,8 +972,9 @@ export class Bill {
921
972
  attachment(bill_id: string, file_name: string): Promise<TSResult<BinaryFileResponse>>;
922
973
  attachment_base64(bill_id: string, file_name: string): Promise<TSResult<Base64FileResponse>>;
923
974
  bill_history(bill_id: string): Promise<TSResult<BillHistoryResponse>>;
924
- bitcoin_key(id: string): Promise<TSResult<BillCombinedBitcoinKeyWeb>>;
975
+ bitcoin_keys(id: string): Promise<TSResult<BillCombinedBitcoinKeyWeb[]>>;
925
976
  cancel_request_to_mint(mint_request_id: string): Promise<TSResult<void>>;
977
+ check_and_estimate_btc_sweep(payload: BillCheckSweepBTCFundsPayload): Promise<TSResult<BillSweepBTCEstimateWeb>>;
926
978
  check_mint_state(id: string): Promise<TSResult<void>>;
927
979
  check_payment(): Promise<TSResult<void>>;
928
980
  check_payment_for_bill(id: string): Promise<TSResult<void>>;
@@ -960,6 +1012,7 @@ export class Bill {
960
1012
  request_to_recourse_bill_payment(payload: RequestRecourseForPaymentPayload): Promise<TSResult<void>>;
961
1013
  search(payload: BillsSearchFilterPayload): Promise<TSResult<LightBillsResponse>>;
962
1014
  share_bill_with_court(payload: ShareBillWithCourtPayload): Promise<TSResult<void>>;
1015
+ sweep_btc_funds(payload: BillSweepBTCFundsPayload): Promise<TSResult<BillSweepBTCFundsResultWeb>>;
963
1016
  /**
964
1017
  * Given a bill id, resync the chain via block transport
965
1018
  */
@@ -1031,6 +1084,8 @@ export class General {
1031
1084
  free(): void;
1032
1085
  [Symbol.dispose](): void;
1033
1086
  currencies(): Promise<TSResult<CurrenciesResponse>>;
1087
+ link_to_pay(payload: BtcAddressAndSumPayload): Promise<TSResult<LinkToPayResponse>>;
1088
+ mempool_link(payload: BtcAddressPayload): Promise<TSResult<MempoolLinkResponse>>;
1034
1089
  static new(): General;
1035
1090
  overview(currency: string): Promise<TSResult<OverviewResponse>>;
1036
1091
  search(payload: GeneralSearchFilterPayload): Promise<TSResult<GeneralSearchResponse>>;
@@ -1110,8 +1165,9 @@ export interface InitOutput {
1110
1165
  readonly bill_attachment: (a: number, b: number, c: number, d: number, e: number) => any;
1111
1166
  readonly bill_attachment_base64: (a: number, b: number, c: number, d: number, e: number) => any;
1112
1167
  readonly bill_bill_history: (a: number, b: number, c: number) => any;
1113
- readonly bill_bitcoin_key: (a: number, b: number, c: number) => any;
1168
+ readonly bill_bitcoin_keys: (a: number, b: number, c: number) => any;
1114
1169
  readonly bill_cancel_request_to_mint: (a: number, b: number, c: number) => any;
1170
+ readonly bill_check_and_estimate_btc_sweep: (a: number, b: any) => any;
1115
1171
  readonly bill_check_mint_state: (a: number, b: number, c: number) => any;
1116
1172
  readonly bill_check_payment: (a: number) => any;
1117
1173
  readonly bill_check_payment_for_bill: (a: number, b: number, c: number) => any;
@@ -1142,6 +1198,7 @@ export interface InitOutput {
1142
1198
  readonly bill_request_to_recourse_bill_payment: (a: number, b: any) => any;
1143
1199
  readonly bill_search: (a: number, b: any) => any;
1144
1200
  readonly bill_share_bill_with_court: (a: number, b: any) => any;
1201
+ readonly bill_sweep_btc_funds: (a: number, b: any) => any;
1145
1202
  readonly bill_sync_bill_chain: (a: number, b: any) => any;
1146
1203
  readonly bill_upload: (a: number, b: any) => any;
1147
1204
  readonly company_accept_invite: (a: number, b: any) => any;
@@ -1181,6 +1238,8 @@ export interface InitOutput {
1181
1238
  readonly contact_search: (a: number, b: any) => any;
1182
1239
  readonly contact_upload: (a: number, b: any) => any;
1183
1240
  readonly general_currencies: (a: number) => any;
1241
+ readonly general_link_to_pay: (a: number, b: any) => any;
1242
+ readonly general_mempool_link: (a: number, b: any) => any;
1184
1243
  readonly general_overview: (a: number, b: number, c: number) => any;
1185
1244
  readonly general_search: (a: number, b: any) => any;
1186
1245
  readonly general_status: (a: number) => any;
@@ -1228,21 +1287,21 @@ export interface InitOutput {
1228
1287
  readonly identity_new: () => number;
1229
1288
  readonly notification_new: () => number;
1230
1289
  readonly __wbg_notification_free: (a: number, b: number) => void;
1290
+ readonly __wbg_general_free: (a: number, b: number) => void;
1231
1291
  readonly __wbg_contact_free: (a: number, b: number) => void;
1292
+ readonly __wbg_identity_free: (a: number, b: number) => void;
1232
1293
  readonly __wbg_company_free: (a: number, b: number) => void;
1233
1294
  readonly __wbg_bill_free: (a: number, b: number) => void;
1234
- readonly __wbg_identity_free: (a: number, b: number) => void;
1235
- readonly __wbg_general_free: (a: number, b: number) => void;
1236
- readonly wasm_bindgen__closure__destroy__h09fbd19efde926e5: (a: number, b: number) => void;
1237
- readonly wasm_bindgen__closure__destroy__h449cff5b9e4d94fb: (a: number, b: number) => void;
1238
- readonly wasm_bindgen__closure__destroy__hf7912581150b7665: (a: number, b: number) => void;
1239
- readonly wasm_bindgen__convert__closures_____invoke__he28c7d7169170f6c: (a: number, b: number, c: any) => [number, number];
1240
- readonly wasm_bindgen__convert__closures_____invoke__h5a11856e308f2f3b: (a: number, b: number, c: any) => [number, number];
1241
- readonly wasm_bindgen__convert__closures_____invoke__h890880bc264504f6: (a: number, b: number, c: any, d: any) => void;
1242
- readonly wasm_bindgen__convert__closures_____invoke__h514b2025d9144009: (a: number, b: number, c: any) => void;
1243
- readonly wasm_bindgen__convert__closures_____invoke__h514b2025d9144009_2: (a: number, b: number, c: any) => void;
1244
- readonly wasm_bindgen__convert__closures_____invoke__h18fe93cc93023748: (a: number, b: number) => void;
1245
- readonly wasm_bindgen__convert__closures_____invoke__h497077385a37d13e: (a: number, b: number) => void;
1295
+ readonly wasm_bindgen__closure__destroy__h1a9d23fd4945790d: (a: number, b: number) => void;
1296
+ readonly wasm_bindgen__closure__destroy__hf52121e5fd25adee: (a: number, b: number) => void;
1297
+ readonly wasm_bindgen__closure__destroy__h8eeb6247348d8b8d: (a: number, b: number) => void;
1298
+ readonly wasm_bindgen__convert__closures_____invoke__h6a16cf40ed7c3dc6: (a: number, b: number, c: any) => [number, number];
1299
+ readonly wasm_bindgen__convert__closures_____invoke__ha132f01477ba4261: (a: number, b: number, c: any) => [number, number];
1300
+ readonly wasm_bindgen__convert__closures_____invoke__h8d039b794964528f: (a: number, b: number, c: any, d: any) => void;
1301
+ readonly wasm_bindgen__convert__closures_____invoke__h559ba374a7c34ef8: (a: number, b: number, c: any) => void;
1302
+ readonly wasm_bindgen__convert__closures_____invoke__h559ba374a7c34ef8_2: (a: number, b: number, c: any) => void;
1303
+ readonly wasm_bindgen__convert__closures_____invoke__h0168043ef256dc2c: (a: number, b: number) => void;
1304
+ readonly wasm_bindgen__convert__closures_____invoke__h7f23800cc18bfe93: (a: number, b: number) => void;
1246
1305
  readonly __wbindgen_malloc: (a: number, b: number) => number;
1247
1306
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
1248
1307
  readonly __wbindgen_exn_store: (a: number) => void;
package/index.js CHANGED
@@ -130,12 +130,12 @@ export class Bill {
130
130
  }
131
131
  /**
132
132
  * @param {string} id
133
- * @returns {TSResult<BillCombinedBitcoinKeyWeb>}
133
+ * @returns {TSResult<BillCombinedBitcoinKeyWeb[]>}
134
134
  */
135
- bitcoin_key(id) {
135
+ bitcoin_keys(id) {
136
136
  const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
137
137
  const len0 = WASM_VECTOR_LEN;
138
- const ret = wasm.bill_bitcoin_key(this.__wbg_ptr, ptr0, len0);
138
+ const ret = wasm.bill_bitcoin_keys(this.__wbg_ptr, ptr0, len0);
139
139
  return ret;
140
140
  }
141
141
  /**
@@ -148,6 +148,14 @@ export class Bill {
148
148
  const ret = wasm.bill_cancel_request_to_mint(this.__wbg_ptr, ptr0, len0);
149
149
  return ret;
150
150
  }
151
+ /**
152
+ * @param {BillCheckSweepBTCFundsPayload} payload
153
+ * @returns {TSResult<BillSweepBTCEstimateWeb>}
154
+ */
155
+ check_and_estimate_btc_sweep(payload) {
156
+ const ret = wasm.bill_check_and_estimate_btc_sweep(this.__wbg_ptr, payload);
157
+ return ret;
158
+ }
151
159
  /**
152
160
  * @param {string} id
153
161
  * @returns {TSResult<void>}
@@ -411,6 +419,14 @@ export class Bill {
411
419
  const ret = wasm.bill_share_bill_with_court(this.__wbg_ptr, payload);
412
420
  return ret;
413
421
  }
422
+ /**
423
+ * @param {BillSweepBTCFundsPayload} payload
424
+ * @returns {TSResult<BillSweepBTCFundsResultWeb>}
425
+ */
426
+ sweep_btc_funds(payload) {
427
+ const ret = wasm.bill_sweep_btc_funds(this.__wbg_ptr, payload);
428
+ return ret;
429
+ }
414
430
  /**
415
431
  * Given a bill id, resync the chain via block transport
416
432
  * @param {ResyncBillPayload} payload
@@ -846,6 +862,22 @@ export class General {
846
862
  const ret = wasm.general_currencies(this.__wbg_ptr);
847
863
  return ret;
848
864
  }
865
+ /**
866
+ * @param {BtcAddressAndSumPayload} payload
867
+ * @returns {TSResult<LinkToPayResponse>}
868
+ */
869
+ link_to_pay(payload) {
870
+ const ret = wasm.general_link_to_pay(this.__wbg_ptr, payload);
871
+ return ret;
872
+ }
873
+ /**
874
+ * @param {BtcAddressPayload} payload
875
+ * @returns {TSResult<MempoolLinkResponse>}
876
+ */
877
+ mempool_link(payload) {
878
+ const ret = wasm.general_mempool_link(this.__wbg_ptr, payload);
879
+ return ret;
880
+ }
849
881
  /**
850
882
  * @returns {General}
851
883
  */
@@ -1592,7 +1624,7 @@ function __wbg_get_imports() {
1592
1624
  const a = state0.a;
1593
1625
  state0.a = 0;
1594
1626
  try {
1595
- return wasm_bindgen__convert__closures_____invoke__h890880bc264504f6(a, state0.b, arg0, arg1);
1627
+ return wasm_bindgen__convert__closures_____invoke__h8d039b794964528f(a, state0.b, arg0, arg1);
1596
1628
  } finally {
1597
1629
  state0.a = a;
1598
1630
  }
@@ -1622,7 +1654,7 @@ function __wbg_get_imports() {
1622
1654
  const a = state0.a;
1623
1655
  state0.a = 0;
1624
1656
  try {
1625
- return wasm_bindgen__convert__closures_____invoke__h890880bc264504f6(a, state0.b, arg0, arg1);
1657
+ return wasm_bindgen__convert__closures_____invoke__h8d039b794964528f(a, state0.b, arg0, arg1);
1626
1658
  } finally {
1627
1659
  state0.a = a;
1628
1660
  }
@@ -1904,6 +1936,10 @@ function __wbg_get_imports() {
1904
1936
  const ret = arg0.target;
1905
1937
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1906
1938
  },
1939
+ __wbg_text_372f5b91442c50f9: function() { return handleError(function (arg0) {
1940
+ const ret = arg0.text();
1941
+ return ret;
1942
+ }, arguments); },
1907
1943
  __wbg_then_098abe61755d12f6: function(arg0, arg1) {
1908
1944
  const ret = arg0.then(arg1);
1909
1945
  return ret;
@@ -1958,38 +1994,38 @@ function __wbg_get_imports() {
1958
1994
  return ret;
1959
1995
  },
1960
1996
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1961
- // Cast intrinsic for `Closure(Closure { dtor_idx: 56, function: Function { arguments: [Externref], shim_idx: 664, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1962
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h09fbd19efde926e5, wasm_bindgen__convert__closures_____invoke__he28c7d7169170f6c);
1997
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 56, function: Function { arguments: [Externref], shim_idx: 684, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1998
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1a9d23fd4945790d, wasm_bindgen__convert__closures_____invoke__h6a16cf40ed7c3dc6);
1963
1999
  return ret;
1964
2000
  },
1965
2001
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1966
- // Cast intrinsic for `Closure(Closure { dtor_idx: 56, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 326, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1967
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h09fbd19efde926e5, wasm_bindgen__convert__closures_____invoke__h514b2025d9144009);
2002
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 56, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 325, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2003
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1a9d23fd4945790d, wasm_bindgen__convert__closures_____invoke__h559ba374a7c34ef8);
1968
2004
  return ret;
1969
2005
  },
1970
2006
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
1971
- // Cast intrinsic for `Closure(Closure { dtor_idx: 56, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 326, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1972
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h09fbd19efde926e5, wasm_bindgen__convert__closures_____invoke__h514b2025d9144009_2);
2007
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 56, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 325, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2008
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1a9d23fd4945790d, wasm_bindgen__convert__closures_____invoke__h559ba374a7c34ef8_2);
1973
2009
  return ret;
1974
2010
  },
1975
2011
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
1976
- // Cast intrinsic for `Closure(Closure { dtor_idx: 56, function: Function { arguments: [], shim_idx: 329, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1977
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h09fbd19efde926e5, wasm_bindgen__convert__closures_____invoke__h18fe93cc93023748);
2012
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 56, function: Function { arguments: [], shim_idx: 328, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2013
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1a9d23fd4945790d, wasm_bindgen__convert__closures_____invoke__h0168043ef256dc2c);
1978
2014
  return ret;
1979
2015
  },
1980
2016
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
1981
2017
  // Cast intrinsic for `Closure(Closure { dtor_idx: 56, function: Function { arguments: [], shim_idx: 57, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1982
- const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h09fbd19efde926e5, wasm_bindgen__convert__closures_____invoke__h497077385a37d13e);
2018
+ const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1a9d23fd4945790d, wasm_bindgen__convert__closures_____invoke__h7f23800cc18bfe93);
1983
2019
  return ret;
1984
2020
  },
1985
2021
  __wbindgen_cast_0000000000000006: function(arg0, arg1) {
1986
- // Cast intrinsic for `Closure(Closure { dtor_idx: 884, function: Function { arguments: [], shim_idx: 329, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1987
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h449cff5b9e4d94fb, wasm_bindgen__convert__closures_____invoke__h18fe93cc93023748);
2022
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 977, function: Function { arguments: [], shim_idx: 328, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2023
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hf52121e5fd25adee, wasm_bindgen__convert__closures_____invoke__h0168043ef256dc2c);
1988
2024
  return ret;
1989
2025
  },
1990
2026
  __wbindgen_cast_0000000000000007: function(arg0, arg1) {
1991
- // Cast intrinsic for `Closure(Closure { dtor_idx: 889, function: Function { arguments: [NamedExternref("Event")], shim_idx: 890, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1992
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hf7912581150b7665, wasm_bindgen__convert__closures_____invoke__h5a11856e308f2f3b);
2027
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 982, function: Function { arguments: [NamedExternref("Event")], shim_idx: 983, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2028
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8eeb6247348d8b8d, wasm_bindgen__convert__closures_____invoke__ha132f01477ba4261);
1993
2029
  return ret;
1994
2030
  },
1995
2031
  __wbindgen_cast_0000000000000008: function(arg0) {
@@ -2033,38 +2069,38 @@ function __wbg_get_imports() {
2033
2069
  };
2034
2070
  }
2035
2071
 
2036
- function wasm_bindgen__convert__closures_____invoke__h18fe93cc93023748(arg0, arg1) {
2037
- wasm.wasm_bindgen__convert__closures_____invoke__h18fe93cc93023748(arg0, arg1);
2072
+ function wasm_bindgen__convert__closures_____invoke__h0168043ef256dc2c(arg0, arg1) {
2073
+ wasm.wasm_bindgen__convert__closures_____invoke__h0168043ef256dc2c(arg0, arg1);
2038
2074
  }
2039
2075
 
2040
- function wasm_bindgen__convert__closures_____invoke__h497077385a37d13e(arg0, arg1) {
2041
- wasm.wasm_bindgen__convert__closures_____invoke__h497077385a37d13e(arg0, arg1);
2076
+ function wasm_bindgen__convert__closures_____invoke__h7f23800cc18bfe93(arg0, arg1) {
2077
+ wasm.wasm_bindgen__convert__closures_____invoke__h7f23800cc18bfe93(arg0, arg1);
2042
2078
  }
2043
2079
 
2044
- function wasm_bindgen__convert__closures_____invoke__h514b2025d9144009(arg0, arg1, arg2) {
2045
- wasm.wasm_bindgen__convert__closures_____invoke__h514b2025d9144009(arg0, arg1, arg2);
2080
+ function wasm_bindgen__convert__closures_____invoke__h559ba374a7c34ef8(arg0, arg1, arg2) {
2081
+ wasm.wasm_bindgen__convert__closures_____invoke__h559ba374a7c34ef8(arg0, arg1, arg2);
2046
2082
  }
2047
2083
 
2048
- function wasm_bindgen__convert__closures_____invoke__h514b2025d9144009_2(arg0, arg1, arg2) {
2049
- wasm.wasm_bindgen__convert__closures_____invoke__h514b2025d9144009_2(arg0, arg1, arg2);
2084
+ function wasm_bindgen__convert__closures_____invoke__h559ba374a7c34ef8_2(arg0, arg1, arg2) {
2085
+ wasm.wasm_bindgen__convert__closures_____invoke__h559ba374a7c34ef8_2(arg0, arg1, arg2);
2050
2086
  }
2051
2087
 
2052
- function wasm_bindgen__convert__closures_____invoke__he28c7d7169170f6c(arg0, arg1, arg2) {
2053
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__he28c7d7169170f6c(arg0, arg1, arg2);
2088
+ function wasm_bindgen__convert__closures_____invoke__h6a16cf40ed7c3dc6(arg0, arg1, arg2) {
2089
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h6a16cf40ed7c3dc6(arg0, arg1, arg2);
2054
2090
  if (ret[1]) {
2055
2091
  throw takeFromExternrefTable0(ret[0]);
2056
2092
  }
2057
2093
  }
2058
2094
 
2059
- function wasm_bindgen__convert__closures_____invoke__h5a11856e308f2f3b(arg0, arg1, arg2) {
2060
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h5a11856e308f2f3b(arg0, arg1, arg2);
2095
+ function wasm_bindgen__convert__closures_____invoke__ha132f01477ba4261(arg0, arg1, arg2) {
2096
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__ha132f01477ba4261(arg0, arg1, arg2);
2061
2097
  if (ret[1]) {
2062
2098
  throw takeFromExternrefTable0(ret[0]);
2063
2099
  }
2064
2100
  }
2065
2101
 
2066
- function wasm_bindgen__convert__closures_____invoke__h890880bc264504f6(arg0, arg1, arg2, arg3) {
2067
- wasm.wasm_bindgen__convert__closures_____invoke__h890880bc264504f6(arg0, arg1, arg2, arg3);
2102
+ function wasm_bindgen__convert__closures_____invoke__h8d039b794964528f(arg0, arg1, arg2, arg3) {
2103
+ wasm.wasm_bindgen__convert__closures_____invoke__h8d039b794964528f(arg0, arg1, arg2, arg3);
2068
2104
  }
2069
2105
 
2070
2106
 
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.5.4",
4
+ "version": "0.5.5",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",