@bitcredit/bcr-ebill-wasm 0.4.7 → 0.4.9
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 +70 -11
- package/index.js +401 -343
- package/index_bg.wasm +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -186,7 +186,7 @@ export interface PastPaymentDataPaymentWeb {
|
|
|
186
186
|
|
|
187
187
|
export interface PastPaymentDataRecourseWeb {
|
|
188
188
|
time_of_request: number;
|
|
189
|
-
recourser:
|
|
189
|
+
recourser: BillParticipantWeb;
|
|
190
190
|
recoursee: BillIdentParticipantWeb;
|
|
191
191
|
currency: string;
|
|
192
192
|
sum: string;
|
|
@@ -232,7 +232,7 @@ export interface BillWaitingForPaymentStateWeb {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
export interface BillWaitingForRecourseStateWeb {
|
|
235
|
-
recourser:
|
|
235
|
+
recourser: BillParticipantWeb;
|
|
236
236
|
recoursee: BillIdentParticipantWeb;
|
|
237
237
|
payment_data: BillWaitingStatePaymentDataWeb;
|
|
238
238
|
}
|
|
@@ -321,6 +321,7 @@ export interface LightBitcreditBillWeb {
|
|
|
321
321
|
issue_date: string;
|
|
322
322
|
time_of_drawing: number;
|
|
323
323
|
time_of_maturity: number;
|
|
324
|
+
last_block_time: number;
|
|
324
325
|
}
|
|
325
326
|
|
|
326
327
|
export type BillParticipantWeb = { Anon: BillAnonParticipantWeb } | { Ident: BillIdentParticipantWeb };
|
|
@@ -359,6 +360,11 @@ export interface LightBillIdentParticipantWeb {
|
|
|
359
360
|
node_id: string;
|
|
360
361
|
}
|
|
361
362
|
|
|
363
|
+
export interface ShareBillWithCourtPayload {
|
|
364
|
+
bill_id: string;
|
|
365
|
+
court_node_id: string;
|
|
366
|
+
}
|
|
367
|
+
|
|
362
368
|
export interface CompaniesResponse {
|
|
363
369
|
companies: CompanyWeb[];
|
|
364
370
|
}
|
|
@@ -455,6 +461,12 @@ export interface EditContactPayload {
|
|
|
455
461
|
proof_document_file_upload_id: string | undefined;
|
|
456
462
|
}
|
|
457
463
|
|
|
464
|
+
export interface SearchContactsPayload {
|
|
465
|
+
search_term: string;
|
|
466
|
+
include_logical: boolean | undefined;
|
|
467
|
+
include_contact: boolean | undefined;
|
|
468
|
+
}
|
|
469
|
+
|
|
458
470
|
export interface ContactWeb {
|
|
459
471
|
t: ContactTypeWeb;
|
|
460
472
|
node_id: string;
|
|
@@ -468,6 +480,7 @@ export interface ContactWeb {
|
|
|
468
480
|
avatar_file: FileWeb | undefined;
|
|
469
481
|
proof_document_file: FileWeb | undefined;
|
|
470
482
|
nostr_relays: string[];
|
|
483
|
+
is_logical: boolean;
|
|
471
484
|
}
|
|
472
485
|
|
|
473
486
|
export interface SwitchIdentity {
|
|
@@ -517,10 +530,34 @@ export interface IdentityWeb {
|
|
|
517
530
|
nostr_relays: string[];
|
|
518
531
|
}
|
|
519
532
|
|
|
533
|
+
/**
|
|
534
|
+
* Response for a private key seeed backup
|
|
535
|
+
*/
|
|
520
536
|
export interface SeedPhrase {
|
|
537
|
+
/**
|
|
538
|
+
* The seed phrase of the current private key
|
|
539
|
+
*/
|
|
521
540
|
seed_phrase: string;
|
|
522
541
|
}
|
|
523
542
|
|
|
543
|
+
export interface ShareContactTo {
|
|
544
|
+
/**
|
|
545
|
+
* The node id of the identity to share the contact details to
|
|
546
|
+
*/
|
|
547
|
+
recipient: string;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export interface ShareCompanyContactTo {
|
|
551
|
+
/**
|
|
552
|
+
* The node id of the identity to share the contact details to
|
|
553
|
+
*/
|
|
554
|
+
recipient: string;
|
|
555
|
+
/**
|
|
556
|
+
* The node id of the company to share the contact details for
|
|
557
|
+
*/
|
|
558
|
+
company_id: string;
|
|
559
|
+
}
|
|
560
|
+
|
|
524
561
|
export interface IdentityProofWeb {
|
|
525
562
|
id: string;
|
|
526
563
|
node_id: string;
|
|
@@ -529,6 +566,7 @@ export interface IdentityProofWeb {
|
|
|
529
566
|
timestamp: number;
|
|
530
567
|
status: IdentityProofStatusWeb;
|
|
531
568
|
status_last_checked_timestamp: number;
|
|
569
|
+
block_id: number;
|
|
532
570
|
}
|
|
533
571
|
|
|
534
572
|
export type IdentityProofStatusWeb = "Success" | "NotFound" | "FailureConnect" | "FailureClient" | "FailureServer";
|
|
@@ -648,7 +686,7 @@ export interface UploadFileResponse {
|
|
|
648
686
|
file_upload_id: string;
|
|
649
687
|
}
|
|
650
688
|
|
|
651
|
-
export type JsErrorType = "FieldEmpty" | "InvalidSum" | "InvalidCurrency" | "InvalidPaymentAddress" | "InvalidContentType" | "IdentityCantBeAnon" | "
|
|
689
|
+
export type JsErrorType = "FieldEmpty" | "InvalidSum" | "InvalidCurrency" | "InvalidPaymentAddress" | "InvalidContentType" | "IdentityCantBeAnon" | "InvalidContactType" | "InvalidIdentityType" | "InvalidDate" | "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" | "NoFileForFileUploadId" | "NotFound" | "ExternalApi" | "Io" | "Crypto" | "Persistence" | "Blockchain" | "InvalidRelayUrl" | "Serialization" | "Init" | "NotificationNetwork" | "NotificationMessage" | "InvalidOperation" | "BillAlreadyAccepted" | "BillWasRejectedToAccept" | "BillAcceptanceExpired" | "BillWasRejectedToPay" | "BillPaymentExpired" | "BillWasRecoursedToTheEnd" | "BillAlreadyRequestedToAccept" | "BillNotAccepted" | "CallerIsNotDrawee" | "CallerIsNotHolder" | "CallerIsNotRecoursee" | "CallerIsNotBuyer" | "RequestAlreadyExpired" | "RequestAlreadyRejected" | "BillAlreadyPaid" | "BillWasNotRequestedToAccept" | "BillWasNotRequestedToPay" | "BillWasNotOfferedToSell" | "BillRequestToAcceptDidNotExpireAndWasNotRejected" | "BillRequestToPayDidNotExpireAndWasNotRejected" | "RecourseeNotPastHolder" | "BillWasNotRequestedToRecourse" | "BillIsNotRequestedToRecourseAndWaitingForPayment" | "BillIsNotOfferToSellWaitingForPayment" | "BillSellDataInvalid" | "BillRecourseDataInvalid" | "BillIsRequestedToPayAndWaitingForPayment" | "BillIsOfferedToSellAndWaitingForPayment" | "BillIsInRecourseAndWaitingForPayment" | "BillWasRequestedToPay" | "SignatoryNotInContacts" | "SignatoryAlreadySignatory" | "CantRemoveLastSignatory" | "NotASignatory" | "InvalidSecp256k1Key" | "FileIsTooBig" | "FileIsEmpty" | "TooManyFiles" | "InvalidFileName" | "UnknownNodeId" | "BackupNotSupported" | "CallerMustBeSignatory" | "InvalidBase58" | "InvalidSignature" | "InvalidUrl" | "InvalidIdentityProofStatus" | "Json";
|
|
652
690
|
|
|
653
691
|
export interface JsErrorData {
|
|
654
692
|
error: JsErrorType;
|
|
@@ -669,6 +707,7 @@ export interface Config {
|
|
|
669
707
|
default_mint_node_id: string;
|
|
670
708
|
num_confirmations_for_payment: number;
|
|
671
709
|
dev_mode: boolean;
|
|
710
|
+
default_court_url: string;
|
|
672
711
|
}
|
|
673
712
|
|
|
674
713
|
export interface MintRequestStateWeb {
|
|
@@ -703,6 +742,7 @@ export interface MintRequestWeb {
|
|
|
703
742
|
export class Api {
|
|
704
743
|
private constructor();
|
|
705
744
|
free(): void;
|
|
745
|
+
[Symbol.dispose](): void;
|
|
706
746
|
static general(): General;
|
|
707
747
|
static contact(): Contact;
|
|
708
748
|
static identity(): Identity;
|
|
@@ -714,6 +754,7 @@ export class Api {
|
|
|
714
754
|
export class Bill {
|
|
715
755
|
private constructor();
|
|
716
756
|
free(): void;
|
|
757
|
+
[Symbol.dispose](): void;
|
|
717
758
|
static new(): Bill;
|
|
718
759
|
endorsements(id: string): Promise<EndorsementsResponse>;
|
|
719
760
|
past_payments(id: string): Promise<PastPaymentsResponse>;
|
|
@@ -762,10 +803,12 @@ export class Bill {
|
|
|
762
803
|
*/
|
|
763
804
|
sync_bill_chain(payload: ResyncBillPayload): Promise<void>;
|
|
764
805
|
dev_mode_get_full_bill_chain(bill_id: string): Promise<string[]>;
|
|
806
|
+
share_bill_with_court(payload: ShareBillWithCourtPayload): Promise<void>;
|
|
765
807
|
}
|
|
766
808
|
export class Company {
|
|
767
809
|
private constructor();
|
|
768
810
|
free(): void;
|
|
811
|
+
[Symbol.dispose](): void;
|
|
769
812
|
static new(): Company;
|
|
770
813
|
file(id: string, file_name: string): Promise<BinaryFileResponse>;
|
|
771
814
|
file_base64(id: string, file_name: string): Promise<Base64FileResponse>;
|
|
@@ -777,15 +820,19 @@ export class Company {
|
|
|
777
820
|
edit(payload: EditCompanyPayload): Promise<void>;
|
|
778
821
|
add_signatory(payload: AddSignatoryPayload): Promise<void>;
|
|
779
822
|
remove_signatory(payload: RemoveSignatoryPayload): Promise<void>;
|
|
823
|
+
share_contact_details(payload: ShareCompanyContactTo): Promise<void>;
|
|
824
|
+
dev_mode_get_full_company_chain(company_id: string): Promise<string[]>;
|
|
780
825
|
}
|
|
781
826
|
export class Contact {
|
|
782
827
|
private constructor();
|
|
783
828
|
free(): void;
|
|
829
|
+
[Symbol.dispose](): void;
|
|
784
830
|
static new(): Contact;
|
|
785
831
|
file(node_id: string, file_name: string): Promise<BinaryFileResponse>;
|
|
786
832
|
file_base64(node_id: string, file_name: string): Promise<Base64FileResponse>;
|
|
787
833
|
upload(payload: UploadFile): Promise<UploadFileResponse>;
|
|
788
834
|
list(): Promise<ContactsResponse>;
|
|
835
|
+
search(payload: SearchContactsPayload): Promise<ContactsResponse>;
|
|
789
836
|
detail(node_id: string): Promise<ContactWeb>;
|
|
790
837
|
remove(node_id: string): Promise<void>;
|
|
791
838
|
deanonymize(payload: NewContactPayload): Promise<ContactWeb>;
|
|
@@ -795,6 +842,7 @@ export class Contact {
|
|
|
795
842
|
export class General {
|
|
796
843
|
private constructor();
|
|
797
844
|
free(): void;
|
|
845
|
+
[Symbol.dispose](): void;
|
|
798
846
|
static new(): General;
|
|
799
847
|
status(): Promise<StatusResponse>;
|
|
800
848
|
currencies(): Promise<CurrenciesResponse>;
|
|
@@ -805,6 +853,7 @@ export class General {
|
|
|
805
853
|
export class Identity {
|
|
806
854
|
private constructor();
|
|
807
855
|
free(): void;
|
|
856
|
+
[Symbol.dispose](): void;
|
|
808
857
|
static new(): Identity;
|
|
809
858
|
file(file_name: string): Promise<BinaryFileResponse>;
|
|
810
859
|
file_base64(file_name: string): Promise<Base64FileResponse>;
|
|
@@ -817,10 +866,13 @@ export class Identity {
|
|
|
817
866
|
switch(switch_identity_payload: SwitchIdentity): Promise<void>;
|
|
818
867
|
seed_backup(): Promise<SeedPhrase>;
|
|
819
868
|
seed_recover(payload: SeedPhrase): Promise<void>;
|
|
869
|
+
share_contact_details(payload: ShareContactTo): Promise<void>;
|
|
870
|
+
dev_mode_get_full_identity_chain(): Promise<string[]>;
|
|
820
871
|
}
|
|
821
872
|
export class IdentityProof {
|
|
822
873
|
private constructor();
|
|
823
874
|
free(): void;
|
|
875
|
+
[Symbol.dispose](): void;
|
|
824
876
|
static new(): IdentityProof;
|
|
825
877
|
/**
|
|
826
878
|
* Get identity stamp to post on social media for the currently selected identity
|
|
@@ -847,6 +899,7 @@ export class IdentityProof {
|
|
|
847
899
|
export class Notification {
|
|
848
900
|
private constructor();
|
|
849
901
|
free(): void;
|
|
902
|
+
[Symbol.dispose](): void;
|
|
850
903
|
static new(): Notification;
|
|
851
904
|
active_notifications_for_node_ids(node_ids: string[]): Promise<NotificationStatusWeb[]>;
|
|
852
905
|
subscribe(callback: Function): Promise<void>;
|
|
@@ -905,6 +958,7 @@ export interface InitOutput {
|
|
|
905
958
|
readonly bill_clear_bill_cache: (a: number) => any;
|
|
906
959
|
readonly bill_sync_bill_chain: (a: number, b: any) => any;
|
|
907
960
|
readonly bill_dev_mode_get_full_bill_chain: (a: number, b: number, c: number) => any;
|
|
961
|
+
readonly bill_share_bill_with_court: (a: number, b: any) => any;
|
|
908
962
|
readonly company_file: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
909
963
|
readonly company_file_base64: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
910
964
|
readonly company_upload: (a: number, b: any) => any;
|
|
@@ -915,10 +969,13 @@ export interface InitOutput {
|
|
|
915
969
|
readonly company_edit: (a: number, b: any) => any;
|
|
916
970
|
readonly company_add_signatory: (a: number, b: any) => any;
|
|
917
971
|
readonly company_remove_signatory: (a: number, b: any) => any;
|
|
972
|
+
readonly company_share_contact_details: (a: number, b: any) => any;
|
|
973
|
+
readonly company_dev_mode_get_full_company_chain: (a: number, b: number, c: number) => any;
|
|
918
974
|
readonly contact_file: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
919
975
|
readonly contact_file_base64: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
920
976
|
readonly contact_upload: (a: number, b: any) => any;
|
|
921
977
|
readonly contact_list: (a: number) => any;
|
|
978
|
+
readonly contact_search: (a: number, b: any) => any;
|
|
922
979
|
readonly contact_detail: (a: number, b: number, c: number) => any;
|
|
923
980
|
readonly contact_remove: (a: number, b: number, c: number) => any;
|
|
924
981
|
readonly contact_deanonymize: (a: number, b: any) => any;
|
|
@@ -940,6 +997,8 @@ export interface InitOutput {
|
|
|
940
997
|
readonly identity_switch: (a: number, b: any) => any;
|
|
941
998
|
readonly identity_seed_backup: (a: number) => any;
|
|
942
999
|
readonly identity_seed_recover: (a: number, b: any) => any;
|
|
1000
|
+
readonly identity_share_contact_details: (a: number, b: any) => any;
|
|
1001
|
+
readonly identity_dev_mode_get_full_identity_chain: (a: number) => any;
|
|
943
1002
|
readonly identityproof_get_identity_stamp: (a: number) => any;
|
|
944
1003
|
readonly identityproof_list: (a: number) => any;
|
|
945
1004
|
readonly identityproof_add: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
@@ -975,12 +1034,12 @@ export interface InitOutput {
|
|
|
975
1034
|
readonly api_contact: () => number;
|
|
976
1035
|
readonly api_company: () => number;
|
|
977
1036
|
readonly __wbg_notification_free: (a: number, b: number) => void;
|
|
1037
|
+
readonly __wbg_general_free: (a: number, b: number) => void;
|
|
978
1038
|
readonly __wbg_contact_free: (a: number, b: number) => void;
|
|
979
|
-
readonly
|
|
1039
|
+
readonly __wbg_bill_free: (a: number, b: number) => void;
|
|
980
1040
|
readonly __wbg_identity_free: (a: number, b: number) => void;
|
|
981
1041
|
readonly __wbg_identityproof_free: (a: number, b: number) => void;
|
|
982
|
-
readonly
|
|
983
|
-
readonly __wbg_bill_free: (a: number, b: number) => void;
|
|
1042
|
+
readonly __wbg_company_free: (a: number, b: number) => void;
|
|
984
1043
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
985
1044
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
986
1045
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
@@ -989,11 +1048,11 @@ export interface InitOutput {
|
|
|
989
1048
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
990
1049
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
991
1050
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
992
|
-
readonly
|
|
993
|
-
readonly
|
|
994
|
-
readonly
|
|
995
|
-
readonly
|
|
996
|
-
readonly
|
|
1051
|
+
readonly closure360_externref_shim: (a: number, b: number, c: any) => void;
|
|
1052
|
+
readonly wasm_bindgen__convert__closures_____invoke__he8b053958e0f2813: (a: number, b: number) => void;
|
|
1053
|
+
readonly wasm_bindgen__convert__closures_____invoke__h3ad16ba13f574f1c: (a: number, b: number) => void;
|
|
1054
|
+
readonly closure875_externref_shim_multivalue_shim: (a: number, b: number, c: any) => [number, number];
|
|
1055
|
+
readonly closure658_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
997
1056
|
readonly __wbindgen_start: () => void;
|
|
998
1057
|
}
|
|
999
1058
|
|