@notabene/javascript-sdk 2.2.2 → 2.4.0

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.
Files changed (118) hide show
  1. package/README.md +2 -0
  2. package/dist/notabene.cjs +1 -1
  3. package/dist/notabene.d.ts +16 -2
  4. package/dist/notabene.js +5 -5
  5. package/dist/tsdoc-metadata.json +1 -1
  6. package/docs/README.md +1 -1
  7. package/docs/_media/TransactionOptions.md +10 -10
  8. package/docs/ivms/types/README.md +1 -1
  9. package/docs/ivms/types/enumerations/PayloadVersionCode.md +3 -3
  10. package/docs/ivms/types/interfaces/PayloadMetadata.md +3 -3
  11. package/docs/ivms/types/type-aliases/Address.md +2 -2
  12. package/docs/ivms/types/type-aliases/AddressTypeCode.md +2 -2
  13. package/docs/ivms/types/type-aliases/Beneficiary.md +2 -2
  14. package/docs/ivms/types/type-aliases/BeneficiaryVASP.md +2 -2
  15. package/docs/ivms/types/type-aliases/DateAndPlaceOfBirth.md +2 -2
  16. package/docs/ivms/types/type-aliases/ISOCountryCode.md +2 -2
  17. package/docs/ivms/types/type-aliases/ISODate.md +2 -2
  18. package/docs/ivms/types/type-aliases/IVMS101.md +2 -2
  19. package/docs/ivms/types/type-aliases/IntermediaryVASP.md +2 -2
  20. package/docs/ivms/types/type-aliases/LegalPerson.md +2 -2
  21. package/docs/ivms/types/type-aliases/LegalPersonName.md +2 -2
  22. package/docs/ivms/types/type-aliases/LegalPersonNameID.md +2 -2
  23. package/docs/ivms/types/type-aliases/LegalPersonNameTypeCode.md +2 -2
  24. package/docs/ivms/types/type-aliases/LocalLegalPersonNameID.md +2 -2
  25. package/docs/ivms/types/type-aliases/LocalNaturalPersonNameID.md +2 -2
  26. package/docs/ivms/types/type-aliases/NationalIdentification.md +2 -2
  27. package/docs/ivms/types/type-aliases/NationalIdentifierTypeCode.md +2 -2
  28. package/docs/ivms/types/type-aliases/NaturalPerson.md +2 -2
  29. package/docs/ivms/types/type-aliases/NaturalPersonName.md +2 -2
  30. package/docs/ivms/types/type-aliases/NaturalPersonNameID.md +2 -2
  31. package/docs/ivms/types/type-aliases/NaturalPersonNameTypeCode.md +2 -2
  32. package/docs/ivms/types/type-aliases/OriginatingVASP.md +2 -2
  33. package/docs/ivms/types/type-aliases/Originator.md +2 -2
  34. package/docs/ivms/types/type-aliases/Person.md +2 -2
  35. package/docs/ivms/types/type-aliases/TransferPath.md +2 -2
  36. package/docs/ivms/types/type-aliases/TransliterationMethodCode.md +2 -2
  37. package/docs/modules.md +1 -1
  38. package/docs/notabene/README.md +1 -1
  39. package/docs/notabene/classes/EmbeddedComponent.md +57 -31
  40. package/docs/notabene/classes/default.md +61 -25
  41. package/docs/notabene/functions/decodeFragmentToObject.md +5 -3
  42. package/docs/notabene/interfaces/NotabeneConfig.md +6 -6
  43. package/docs/notabene/type-aliases/MessageCallback.md +5 -3
  44. package/docs/types/README.md +2 -1
  45. package/docs/types/enumerations/AgentType.md +3 -3
  46. package/docs/types/enumerations/CMType.md +8 -8
  47. package/docs/types/enumerations/ErrorIdentifierCode.md +47 -0
  48. package/docs/types/enumerations/HMType.md +3 -3
  49. package/docs/types/enumerations/PersonType.md +4 -4
  50. package/docs/types/enumerations/ProofStatus.md +5 -5
  51. package/docs/types/enumerations/ProofTypes.md +36 -13
  52. package/docs/types/enumerations/Status.md +6 -6
  53. package/docs/types/enumerations/VASPSearchControl.md +3 -3
  54. package/docs/types/enumerations/ValidationSections.md +5 -5
  55. package/docs/types/interfaces/Agent.md +7 -7
  56. package/docs/types/interfaces/CallbackOptions.md +3 -3
  57. package/docs/types/interfaces/ComponentRequest.md +3 -3
  58. package/docs/types/interfaces/ComponentResponse.md +5 -5
  59. package/docs/types/interfaces/ConnectionRecord.md +8 -8
  60. package/docs/types/interfaces/ConnectionRequest.md +4 -4
  61. package/docs/types/interfaces/Counterparty.md +11 -11
  62. package/docs/types/interfaces/DeclarationProof.md +7 -7
  63. package/docs/types/interfaces/Deposit.md +10 -10
  64. package/docs/types/interfaces/DepositRequest.md +8 -8
  65. package/docs/types/interfaces/DepositRequestOptions.md +2 -2
  66. package/docs/types/interfaces/LegalPerson.md +14 -14
  67. package/docs/types/interfaces/MicroTransferProof.md +10 -10
  68. package/docs/types/interfaces/NaturalPerson.md +14 -14
  69. package/docs/types/interfaces/OwnershipProof.md +5 -5
  70. package/docs/types/interfaces/ScreenshotProof.md +6 -6
  71. package/docs/types/interfaces/SignatureProof.md +19 -9
  72. package/docs/types/interfaces/ThresholdOptions.md +4 -4
  73. package/docs/types/interfaces/Transaction.md +9 -9
  74. package/docs/types/interfaces/TransactionOptions.md +10 -10
  75. package/docs/types/interfaces/TransactionResponse.md +9 -9
  76. package/docs/types/interfaces/VASP.md +10 -10
  77. package/docs/types/interfaces/Wallet.md +9 -9
  78. package/docs/types/interfaces/Withdrawal.md +10 -10
  79. package/docs/types/type-aliases/BlockchainAddress.md +2 -2
  80. package/docs/types/type-aliases/CAIP10.md +2 -2
  81. package/docs/types/type-aliases/CAIP19.md +2 -2
  82. package/docs/types/type-aliases/CAIP2.md +2 -2
  83. package/docs/types/type-aliases/CAIP220.md +2 -2
  84. package/docs/types/type-aliases/Cancel.md +2 -2
  85. package/docs/types/type-aliases/Completed.md +2 -2
  86. package/docs/types/type-aliases/ComponentMessage.md +2 -2
  87. package/docs/types/type-aliases/ConnectionOptions.md +2 -2
  88. package/docs/types/type-aliases/CryptoCredential.md +2 -2
  89. package/docs/types/type-aliases/DID.md +2 -2
  90. package/docs/types/type-aliases/DTI.md +2 -2
  91. package/docs/types/type-aliases/Destination.md +2 -2
  92. package/docs/types/type-aliases/Error.md +3 -3
  93. package/docs/types/type-aliases/FieldOptions.md +3 -3
  94. package/docs/types/type-aliases/FieldTypes.md +2 -2
  95. package/docs/types/type-aliases/HostMessage.md +2 -2
  96. package/docs/types/type-aliases/ISOCurrency.md +2 -2
  97. package/docs/types/type-aliases/InvalidValue.md +2 -2
  98. package/docs/types/type-aliases/LEI.md +2 -2
  99. package/docs/types/type-aliases/LegalPersonFieldName.md +2 -2
  100. package/docs/types/type-aliases/LegalPersonFields.md +2 -2
  101. package/docs/types/type-aliases/NaturalPersonFieldName.md +2 -2
  102. package/docs/types/type-aliases/NaturalPersonFields.md +2 -2
  103. package/docs/types/type-aliases/NotabeneAsset.md +2 -2
  104. package/docs/types/type-aliases/Ready.md +2 -2
  105. package/docs/types/type-aliases/ResizeRequest.md +2 -2
  106. package/docs/types/type-aliases/Source.md +2 -2
  107. package/docs/types/type-aliases/Theme.md +6 -2
  108. package/docs/types/type-aliases/TransactionAsset.md +2 -2
  109. package/docs/types/type-aliases/TravelAddress.md +2 -2
  110. package/docs/types/type-aliases/URI.md +2 -2
  111. package/docs/types/type-aliases/UUID.md +2 -2
  112. package/docs/types/type-aliases/UpdateValue.md +2 -2
  113. package/docs/types/type-aliases/V1Asset.md +3 -3
  114. package/docs/types/type-aliases/V1Transaction.md +2 -2
  115. package/docs/types/type-aliases/VASPOptions.md +2 -2
  116. package/docs/types/type-aliases/ValidationError.md +2 -2
  117. package/package.json +8 -8
  118. package/src/types.ts +17 -1
package/src/types.ts CHANGED
@@ -235,6 +235,7 @@ export type ISOCurrency = string;
235
235
  * @public
236
236
  */
237
237
  export type Theme = {
238
+ mode: 'light' | 'dark'; // Defaults to 'light'
238
239
  primaryColor?: string;
239
240
  secondaryColor?: string;
240
241
  fontFamily?: string;
@@ -823,6 +824,13 @@ export type ResizeRequest = {
823
824
  height: number;
824
825
  };
825
826
 
827
+ export enum ErrorIdentifierCode {
828
+ SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE',
829
+ WALLET_CONNECTION_FAILED = 'WALLET_CONNECTION_FAILED',
830
+ WALLET_NOT_SUPPORTED = 'WALLET_NOT_SUPPORTED',
831
+ TOKEN_INVALID = 'TOKEN_INVALID',
832
+ }
833
+
826
834
  /**
827
835
  * Represents an error component message
828
836
  * @param message - Error message
@@ -834,7 +842,7 @@ export type Error = {
834
842
  type: CMType.ERROR;
835
843
  message: string;
836
844
  description?: string;
837
- identifier?: string;
845
+ identifier?: ErrorIdentifierCode;
838
846
  };
839
847
 
840
848
  /**
@@ -982,6 +990,9 @@ export enum ProofStatus {
982
990
  * - SIWE: Sign-In with Ethereum message signature (EIP-4361)
983
991
  * - EIP712: Ethereum typed data signature following EIP-712 standard
984
992
  * - BIP137: Bitcoin message signature following BIP-137
993
+ * - BIP322: Bitcoin message signature following BIP-322
994
+ * - TIP191: Tron message signing
995
+ * - ED25519: Ed25519 signature (used in Solana)
985
996
  * - XPUB: Extended public key signature for HD wallets
986
997
  * - MicroTransfer: Proof via small blockchain transaction
987
998
  * - Screenshot: Image proof of ownership/access
@@ -1000,7 +1011,9 @@ export enum ProofTypes {
1000
1011
  EIP712 = 'eip-712',
1001
1012
  EIP1271 = 'eip-1271',
1002
1013
  BIP137 = 'bip-137',
1014
+ BIP322 = 'bip-322',
1003
1015
  BIP137_XPUB = 'xpub',
1016
+ TIP191 = 'tip-191',
1004
1017
  ED25519 = 'ed25519',
1005
1018
  MicroTransfer = 'microtransfer',
1006
1019
  Screenshot = 'screenshot',
@@ -1058,14 +1071,17 @@ export interface SignatureProof extends OwnershipProof {
1058
1071
  | ProofTypes.EIP712
1059
1072
  | ProofTypes.EIP1271
1060
1073
  | ProofTypes.BIP137
1074
+ | ProofTypes.BIP322
1061
1075
  | ProofTypes.BIP137_XPUB
1062
1076
  | ProofTypes.ED25519
1077
+ | ProofTypes.TIP191
1063
1078
  | ProofTypes.SIWX
1064
1079
  | ProofTypes.SIWE;
1065
1080
 
1066
1081
  proof: string;
1067
1082
  attestation: string;
1068
1083
  wallet_provider: string;
1084
+ xpub?: string;
1069
1085
  }
1070
1086
 
1071
1087
  /**