@bitcredit/bcr-ebill-wasm 0.4.8 → 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 CHANGED
@@ -186,7 +186,7 @@ export interface PastPaymentDataPaymentWeb {
186
186
 
187
187
  export interface PastPaymentDataRecourseWeb {
188
188
  time_of_request: number;
189
- recourser: BillIdentParticipantWeb;
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: BillIdentParticipantWeb;
235
+ recourser: BillParticipantWeb;
236
236
  recoursee: BillIdentParticipantWeb;
237
237
  payment_data: BillWaitingStatePaymentDataWeb;
238
238
  }
@@ -360,6 +360,11 @@ export interface LightBillIdentParticipantWeb {
360
360
  node_id: string;
361
361
  }
362
362
 
363
+ export interface ShareBillWithCourtPayload {
364
+ bill_id: string;
365
+ court_node_id: string;
366
+ }
367
+
363
368
  export interface CompaniesResponse {
364
369
  companies: CompanyWeb[];
365
370
  }
@@ -456,6 +461,12 @@ export interface EditContactPayload {
456
461
  proof_document_file_upload_id: string | undefined;
457
462
  }
458
463
 
464
+ export interface SearchContactsPayload {
465
+ search_term: string;
466
+ include_logical: boolean | undefined;
467
+ include_contact: boolean | undefined;
468
+ }
469
+
459
470
  export interface ContactWeb {
460
471
  t: ContactTypeWeb;
461
472
  node_id: string;
@@ -469,6 +480,7 @@ export interface ContactWeb {
469
480
  avatar_file: FileWeb | undefined;
470
481
  proof_document_file: FileWeb | undefined;
471
482
  nostr_relays: string[];
483
+ is_logical: boolean;
472
484
  }
473
485
 
474
486
  export interface SwitchIdentity {
@@ -518,10 +530,34 @@ export interface IdentityWeb {
518
530
  nostr_relays: string[];
519
531
  }
520
532
 
533
+ /**
534
+ * Response for a private key seeed backup
535
+ */
521
536
  export interface SeedPhrase {
537
+ /**
538
+ * The seed phrase of the current private key
539
+ */
522
540
  seed_phrase: string;
523
541
  }
524
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
+
525
561
  export interface IdentityProofWeb {
526
562
  id: string;
527
563
  node_id: string;
@@ -530,6 +566,7 @@ export interface IdentityProofWeb {
530
566
  timestamp: number;
531
567
  status: IdentityProofStatusWeb;
532
568
  status_last_checked_timestamp: number;
569
+ block_id: number;
533
570
  }
534
571
 
535
572
  export type IdentityProofStatusWeb = "Success" | "NotFound" | "FailureConnect" | "FailureClient" | "FailureServer";
@@ -649,7 +686,7 @@ export interface UploadFileResponse {
649
686
  file_upload_id: string;
650
687
  }
651
688
 
652
- export type JsErrorType = "FieldEmpty" | "InvalidSum" | "InvalidCurrency" | "InvalidPaymentAddress" | "InvalidContentType" | "IdentityCantBeAnon" | "IdentityIsNotBillIssuer" | "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" | "BillWasRejectedToRecourse" | "BillRequestToRecourseExpired" | "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" | "DrawerIsNotBillIssuer" | "SignatoryNotInContacts" | "SignatoryAlreadySignatory" | "CantRemoveLastSignatory" | "NotASignatory" | "InvalidSecp256k1Key" | "FileIsTooBig" | "FileIsEmpty" | "TooManyFiles" | "InvalidFileName" | "UnknownNodeId" | "BackupNotSupported" | "CallerMustBeSignatory" | "InvalidBase58" | "InvalidSignature" | "InvalidUrl" | "InvalidIdentityProofStatus";
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";
653
690
 
654
691
  export interface JsErrorData {
655
692
  error: JsErrorType;
@@ -670,6 +707,7 @@ export interface Config {
670
707
  default_mint_node_id: string;
671
708
  num_confirmations_for_payment: number;
672
709
  dev_mode: boolean;
710
+ default_court_url: string;
673
711
  }
674
712
 
675
713
  export interface MintRequestStateWeb {
@@ -704,6 +742,7 @@ export interface MintRequestWeb {
704
742
  export class Api {
705
743
  private constructor();
706
744
  free(): void;
745
+ [Symbol.dispose](): void;
707
746
  static general(): General;
708
747
  static contact(): Contact;
709
748
  static identity(): Identity;
@@ -715,6 +754,7 @@ export class Api {
715
754
  export class Bill {
716
755
  private constructor();
717
756
  free(): void;
757
+ [Symbol.dispose](): void;
718
758
  static new(): Bill;
719
759
  endorsements(id: string): Promise<EndorsementsResponse>;
720
760
  past_payments(id: string): Promise<PastPaymentsResponse>;
@@ -763,10 +803,12 @@ export class Bill {
763
803
  */
764
804
  sync_bill_chain(payload: ResyncBillPayload): Promise<void>;
765
805
  dev_mode_get_full_bill_chain(bill_id: string): Promise<string[]>;
806
+ share_bill_with_court(payload: ShareBillWithCourtPayload): Promise<void>;
766
807
  }
767
808
  export class Company {
768
809
  private constructor();
769
810
  free(): void;
811
+ [Symbol.dispose](): void;
770
812
  static new(): Company;
771
813
  file(id: string, file_name: string): Promise<BinaryFileResponse>;
772
814
  file_base64(id: string, file_name: string): Promise<Base64FileResponse>;
@@ -778,15 +820,19 @@ export class Company {
778
820
  edit(payload: EditCompanyPayload): Promise<void>;
779
821
  add_signatory(payload: AddSignatoryPayload): Promise<void>;
780
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[]>;
781
825
  }
782
826
  export class Contact {
783
827
  private constructor();
784
828
  free(): void;
829
+ [Symbol.dispose](): void;
785
830
  static new(): Contact;
786
831
  file(node_id: string, file_name: string): Promise<BinaryFileResponse>;
787
832
  file_base64(node_id: string, file_name: string): Promise<Base64FileResponse>;
788
833
  upload(payload: UploadFile): Promise<UploadFileResponse>;
789
834
  list(): Promise<ContactsResponse>;
835
+ search(payload: SearchContactsPayload): Promise<ContactsResponse>;
790
836
  detail(node_id: string): Promise<ContactWeb>;
791
837
  remove(node_id: string): Promise<void>;
792
838
  deanonymize(payload: NewContactPayload): Promise<ContactWeb>;
@@ -796,6 +842,7 @@ export class Contact {
796
842
  export class General {
797
843
  private constructor();
798
844
  free(): void;
845
+ [Symbol.dispose](): void;
799
846
  static new(): General;
800
847
  status(): Promise<StatusResponse>;
801
848
  currencies(): Promise<CurrenciesResponse>;
@@ -806,6 +853,7 @@ export class General {
806
853
  export class Identity {
807
854
  private constructor();
808
855
  free(): void;
856
+ [Symbol.dispose](): void;
809
857
  static new(): Identity;
810
858
  file(file_name: string): Promise<BinaryFileResponse>;
811
859
  file_base64(file_name: string): Promise<Base64FileResponse>;
@@ -818,10 +866,13 @@ export class Identity {
818
866
  switch(switch_identity_payload: SwitchIdentity): Promise<void>;
819
867
  seed_backup(): Promise<SeedPhrase>;
820
868
  seed_recover(payload: SeedPhrase): Promise<void>;
869
+ share_contact_details(payload: ShareContactTo): Promise<void>;
870
+ dev_mode_get_full_identity_chain(): Promise<string[]>;
821
871
  }
822
872
  export class IdentityProof {
823
873
  private constructor();
824
874
  free(): void;
875
+ [Symbol.dispose](): void;
825
876
  static new(): IdentityProof;
826
877
  /**
827
878
  * Get identity stamp to post on social media for the currently selected identity
@@ -848,6 +899,7 @@ export class IdentityProof {
848
899
  export class Notification {
849
900
  private constructor();
850
901
  free(): void;
902
+ [Symbol.dispose](): void;
851
903
  static new(): Notification;
852
904
  active_notifications_for_node_ids(node_ids: string[]): Promise<NotificationStatusWeb[]>;
853
905
  subscribe(callback: Function): Promise<void>;
@@ -906,6 +958,7 @@ export interface InitOutput {
906
958
  readonly bill_clear_bill_cache: (a: number) => any;
907
959
  readonly bill_sync_bill_chain: (a: number, b: any) => any;
908
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;
909
962
  readonly company_file: (a: number, b: number, c: number, d: number, e: number) => any;
910
963
  readonly company_file_base64: (a: number, b: number, c: number, d: number, e: number) => any;
911
964
  readonly company_upload: (a: number, b: any) => any;
@@ -916,10 +969,13 @@ export interface InitOutput {
916
969
  readonly company_edit: (a: number, b: any) => any;
917
970
  readonly company_add_signatory: (a: number, b: any) => any;
918
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;
919
974
  readonly contact_file: (a: number, b: number, c: number, d: number, e: number) => any;
920
975
  readonly contact_file_base64: (a: number, b: number, c: number, d: number, e: number) => any;
921
976
  readonly contact_upload: (a: number, b: any) => any;
922
977
  readonly contact_list: (a: number) => any;
978
+ readonly contact_search: (a: number, b: any) => any;
923
979
  readonly contact_detail: (a: number, b: number, c: number) => any;
924
980
  readonly contact_remove: (a: number, b: number, c: number) => any;
925
981
  readonly contact_deanonymize: (a: number, b: any) => any;
@@ -941,6 +997,8 @@ export interface InitOutput {
941
997
  readonly identity_switch: (a: number, b: any) => any;
942
998
  readonly identity_seed_backup: (a: number) => any;
943
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;
944
1002
  readonly identityproof_get_identity_stamp: (a: number) => any;
945
1003
  readonly identityproof_list: (a: number) => any;
946
1004
  readonly identityproof_add: (a: number, b: number, c: number, d: number, e: number) => any;
@@ -975,13 +1033,13 @@ export interface InitOutput {
975
1033
  readonly api_notification: () => number;
976
1034
  readonly api_contact: () => number;
977
1035
  readonly api_company: () => number;
978
- readonly __wbg_bill_free: (a: number, b: number) => void;
979
- readonly __wbg_contact_free: (a: number, b: number) => void;
1036
+ readonly __wbg_notification_free: (a: number, b: number) => void;
980
1037
  readonly __wbg_general_free: (a: number, b: number) => void;
1038
+ readonly __wbg_contact_free: (a: number, b: number) => void;
1039
+ readonly __wbg_bill_free: (a: number, b: number) => void;
981
1040
  readonly __wbg_identity_free: (a: number, b: number) => void;
982
- readonly __wbg_notification_free: (a: number, b: number) => void;
983
- readonly __wbg_company_free: (a: number, b: number) => void;
984
1041
  readonly __wbg_identityproof_free: (a: number, b: number) => void;
1042
+ readonly __wbg_company_free: (a: number, b: number) => void;
985
1043
  readonly __wbindgen_malloc: (a: number, b: number) => number;
986
1044
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
987
1045
  readonly __wbindgen_exn_store: (a: number) => void;
@@ -990,11 +1048,11 @@ export interface InitOutput {
990
1048
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
991
1049
  readonly __wbindgen_export_6: WebAssembly.Table;
992
1050
  readonly __externref_table_dealloc: (a: number) => void;
993
- readonly closure357_externref_shim: (a: number, b: number, c: any) => void;
994
- readonly wasm_bindgen__convert__closures_____invoke__h154b536fadeb3f8d: (a: number, b: number) => void;
995
- readonly closure866_externref_shim_multivalue_shim: (a: number, b: number, c: any) => [number, number];
996
- readonly wasm_bindgen__convert__closures_____invoke__h15d8466e320b582b: (a: number, b: number) => void;
997
- readonly closure651_externref_shim: (a: number, b: number, c: any, d: any) => void;
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;
998
1056
  readonly __wbindgen_start: () => void;
999
1057
  }
1000
1058