@notabene/javascript-sdk 2.15.0-next.2 → 2.15.0-next.3

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.
@@ -1,6 +1,3 @@
1
- import type { Agent as Agent_2 } from '@taprsvp/types';
2
- import type { DID as DID_2 } from '@taprsvp/types';
3
-
4
1
  /**
5
2
  * A blockchain account
6
3
  * @public
@@ -53,6 +50,59 @@ declare type Address = {
53
50
  country: ISOCountryCode;
54
51
  };
55
52
 
53
+ /**
54
+ * Represents an address
55
+ *
56
+ * Per IVMS101 spec section 5.2.6.1, an address contains location information
57
+ * that can be expressed either as:
58
+ * - Structured fields (streetName, buildingNumber, etc.)
59
+ * - Unstructured addressLine array (free-form text)
60
+ *
61
+ * Constraint C8 requires at least one of:
62
+ * - addressLine OR
63
+ * - (streetName AND (buildingName OR buildingNumber))
64
+ */
65
+ declare interface Address_2 {
66
+ /** Identifies the nature of the address */
67
+ addressType: AddressTypeCode_2;
68
+ /** Identification of a division of a large organisation or building */
69
+ department?: string;
70
+ /** Identification of a sub-division of a large organisation or building */
71
+ subDepartment?: string;
72
+ /** Name of a street or thoroughfare */
73
+ streetName?: string;
74
+ /** Number that identifies the position of a building on a street */
75
+ buildingNumber?: string;
76
+ /** Name of the building or house */
77
+ buildingName?: string;
78
+ /** Floor or storey within a building */
79
+ floor?: string;
80
+ /** Numbered box in a post office, assigned to a person or organisation, where letters are kept until called for */
81
+ postBox?: string;
82
+ /** Building room number */
83
+ room?: string;
84
+ /** Identifier consisting of a group of letters and/or numbers */
85
+ postcode?: string;
86
+ /** Name of a built-up area, with defined boundaries, and a local government */
87
+ townName: string;
88
+ /** Specific location name within the town */
89
+ townLocationName?: string;
90
+ /** Identifies a subdivision within a country subdivision */
91
+ districtName?: string;
92
+ /** Identifies a subdivision of a country */
93
+ countrySubDivision?: string;
94
+ /** Nation with its own government */
95
+ country: CountryCode;
96
+ /**
97
+ * Information that locates and identifies a specific address, as defined by postal services,
98
+ * presented in free format text.
99
+ *
100
+ * Array of 0 to 7 lines, each max 70 characters (Max70Text)
101
+ * @maxItems 7
102
+ */
103
+ addressLine?: string[];
104
+ }
105
+
56
106
  /**
57
107
  * Address Type Code
58
108
  * Specifies the type of address
@@ -60,6 +110,9 @@ declare type Address = {
60
110
  */
61
111
  declare type AddressTypeCode = 'HOME' | 'BIZZ' | 'GEOG';
62
112
 
113
+ /** Codes identifying the nature of an address */
114
+ declare type AddressTypeCode_2 = "HOME" | "BIZZ" | "GEOG";
115
+
63
116
  /**
64
117
  * Who is the agent acting on behalf of the counterparty
65
118
  * @public
@@ -73,6 +126,76 @@ export declare interface Agent {
73
126
  verified?: boolean;
74
127
  }
75
128
 
129
+ /**
130
+ * Agent Interface
131
+ * Represents software acting on behalf of participants in TAP transactions.
132
+ * Agents handle communication, compliance, and transaction processing.
133
+ *
134
+ * @example
135
+ * ```typescript
136
+ * const originatorAgent: Agent = {
137
+ * "@id": "did:web:vasp.example.com",
138
+ * role: "SourceAddress",
139
+ * for: "did:example:customer123",
140
+ * name: "Example VASP Agent",
141
+ * leiCode: "969500KN90DZLPGW6898",
142
+ * url: "https://vasp.example.com",
143
+ * email: "compliance@vasp.example.com",
144
+ * geographicAddress: [{
145
+ * addressType: "HOME",
146
+ * streetName: "123 Main St",
147
+ * buildingNumber: "123",
148
+ * postCode: "12345",
149
+ * townName: "Example City",
150
+ * country: "US"
151
+ * }],
152
+ * policies: [{
153
+ * "@type": "RequireAuthorization",
154
+ * purpose: "AML compliance verification"
155
+ * }],
156
+ * serviceUrl: "https://vasp.example.com/didcomm"
157
+ * };
158
+ * ```
159
+ */
160
+ declare interface Agent_2 extends Partial<Organization> {
161
+ /**
162
+ * Unique identifier for the participant
163
+ * Can be either a DID or an IRI
164
+ */
165
+ "@id": DID_2 | IRI;
166
+ /**
167
+ * Role of the participant in the transaction
168
+ * Standard values for Agents are: "SettlementAddress", "SourceAddress", "CustodialService"
169
+ * All role values MUST use PascalCase
170
+ * Optional for all participant types
171
+ */
172
+ role?: AgentRoles;
173
+ /**
174
+ * DID of the party this participant acts for
175
+ * Used when participant is an agent acting on behalf of another party
176
+ * Required for type "Agent", optional for other types
177
+ * Can be a single DID or an array of DIDs representing multiple parties
178
+ */
179
+ for: DID_2 | DID_2[];
180
+ /**
181
+ * List of policies that apply to this participant
182
+ * Defines requirements and constraints on the participant's actions
183
+ */
184
+ policies?: Policies[];
185
+ /**
186
+ * Optional DIDComm service endpoint URL
187
+ * This field SHOULD only be used as a fallback when no DIDComm service endpoint
188
+ * is resolvable from the agent's DID document. Particularly useful for self-hosted
189
+ * and decentralized agents. For security purposes, this field SHOULD be ignored
190
+ * if a valid DIDComm service endpoint is already listed in the DID document.
191
+ *
192
+ * @example "https://agent.example.com/didcomm"
193
+ */
194
+ serviceUrl?: IRI;
195
+ }
196
+
197
+ declare type AgentRoles = "SettlementAddress" | "SourceAddress" | "CustodialService" | "EscrowAgent" | string;
198
+
76
199
  /**
77
200
  * Explicit layout configuration for the agent selection step.
78
201
  *
@@ -677,6 +800,8 @@ export declare type CounterpartyAssistConfig = boolean | {
677
800
  identityVerification?: IdentityVerificationConfig;
678
801
  };
679
802
 
803
+ declare type CountryCode = "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "CV" | "KH" | "CM" | "CA" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CD" | "CG" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "CI" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "SZ" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MK" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW" | "AX" | "XX";
804
+
680
805
  /**
681
806
  * A crypto credential
682
807
  * @public
@@ -759,6 +884,18 @@ export declare type Destination = BlockchainAddress | CAIP10 | CryptoCredential
759
884
  */
760
885
  export declare type DID = `did:${string}:${string}`;
761
886
 
887
+ /**
888
+ * Decentralized Identifier (DID)
889
+ * A globally unique persistent identifier that doesn't require a centralized registration authority.
890
+ *
891
+ * Format: `did:method:method-specific-id`
892
+ *
893
+ * @example "did:web:example.com"
894
+ * @example "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"
895
+ * @see {@link https://www.w3.org/TR/did-core/ | DID Core Specification}
896
+ */
897
+ declare type DID_2 = `did:${string}:${string}`;
898
+
762
899
  /**
763
900
  * Digital Token Identifier (DTI) following ISO 24165 standard
764
901
  *
@@ -1006,6 +1143,15 @@ export declare type InvalidValue<T> = {
1006
1143
  errors: ValidationError[];
1007
1144
  };
1008
1145
 
1146
+ /**
1147
+ * Internationalized Resource Identifier (IRI)
1148
+ * A unique identifier that may contain international characters.
1149
+ * Used for identifying resources, particularly in JSON-LD contexts.
1150
+ *
1151
+ * @see {@link https://www.w3.org/TR/json-ld11/#iris | JSON-LD 1.1 IRIs}
1152
+ */
1153
+ declare type IRI = `${string}:${string}`;
1154
+
1009
1155
  /**
1010
1156
  * ISO-3166 Alpha-2 country code
1011
1157
  * @example "US" for United States, "GB" for United Kingdom
@@ -1041,6 +1187,19 @@ export declare type IVMS101 = {
1041
1187
  payloadMetadata?: PayloadMetadata;
1042
1188
  };
1043
1189
 
1190
+ /**
1191
+ * Base interface for JSON-LD objects
1192
+ * Provides the core structure for JSON-LD compatible objects with type information.
1193
+ *
1194
+ * @template T - The type string that identifies the object type
1195
+ */
1196
+ declare interface JsonLdObject<T extends string> {
1197
+ "@context"?: IRI | Record<string, string>;
1198
+ "@type": T;
1199
+ }
1200
+
1201
+ declare type LegalEntityNationalIdentifierTypeCode = Omit<NationalIdentifierTypeCode_2, "ARNU" | "CCPT" | "DRLC" | "SOCS" | "IDCD">;
1202
+
1044
1203
  /**
1045
1204
  * Interface representing a legal entity (organization/company) involved in a transaction
1046
1205
  *
@@ -1132,6 +1291,14 @@ declare type LegalPersonNameID = {
1132
1291
  legalPersonNameIdentifierType: LegalPersonNameTypeCode;
1133
1292
  };
1134
1293
 
1294
+ /** Represents a legal person's name identifier */
1295
+ declare interface LegalPersonNameId {
1296
+ /** Name by which the legal person is known */
1297
+ legalPersonName: string;
1298
+ /** The nature of the name specified */
1299
+ legalPersonNameIdentifierType: LegalPersonNameTypeCode_2;
1300
+ }
1301
+
1135
1302
  /**
1136
1303
  * Legal Person Name Type Code
1137
1304
  * Specifies the type of name for a legal person
@@ -1139,12 +1306,24 @@ declare type LegalPersonNameID = {
1139
1306
  */
1140
1307
  declare type LegalPersonNameTypeCode = 'LEGL' | 'SHRT' | 'TRAD';
1141
1308
 
1309
+ /** Codes representing the nature of a legal person's name */
1310
+ declare type LegalPersonNameTypeCode_2 = "LEGL" | "SHRT" | "TRAD";
1311
+
1142
1312
  /**
1143
1313
  * A LEI Legal Entity Identifier
1144
1314
  * @public
1145
1315
  */
1146
1316
  export declare type LEI = string;
1147
1317
 
1318
+ /**
1319
+ * Legal Entity Identifier (LEI)
1320
+ * A 20-character alphanumeric code that uniquely identifies legal entities globally.
1321
+ *
1322
+ * @example "969500KN90DZLPGW6898"
1323
+ * @see {@link https://www.iso.org/standard/59771.html | ISO 17442}
1324
+ */
1325
+ declare type LEICode = string;
1326
+
1148
1327
  /**
1149
1328
  * Local Legal Person Name ID
1150
1329
  * Represents a local name identifier for a legal person
@@ -1209,6 +1388,18 @@ export declare type NationalIdentification = {
1209
1388
  registrationAuthority?: string;
1210
1389
  };
1211
1390
 
1391
+ /** Represents a national identification */
1392
+ declare interface NationalIdentification_2<C> {
1393
+ /** An identifier issued by an appropriate issuing authority */
1394
+ nationalIdentifier: string;
1395
+ /** Specifies the type of identifier */
1396
+ nationalIdentifierType: C;
1397
+ /** Country of the issuing authority */
1398
+ countryOfIssue?: CountryCode;
1399
+ /** A code specifying the registration authority */
1400
+ registrationAuthority?: string;
1401
+ }
1402
+
1212
1403
  /**
1213
1404
  * National Identifier Type Code
1214
1405
  * Specifies the type of national identifier
@@ -1216,6 +1407,22 @@ export declare type NationalIdentification = {
1216
1407
  */
1217
1408
  declare type NationalIdentifierTypeCode = 'ARNU' | 'CCPT' | 'RAID' | 'DRLC' | 'FIIN' | 'TXID' | 'SOCS' | 'IDCD' | 'LEIX' | 'MISC';
1218
1409
 
1410
+ /**
1411
+ * Codes identifying the type of national identification
1412
+ *
1413
+ * - **ARNU**: Alien registration number - Number assigned by a government agency to identify foreign nationals
1414
+ * - **CCPT**: Passport number - Number assigned by a passport authority
1415
+ * - **RAID**: Registration authority identifier - Identifier of a legal entity as maintained by a registration authority
1416
+ * - **DRLC**: Driver license number - Number assigned to a driver's license
1417
+ * - **FIIN**: Foreign investment identity number - Number assigned to a foreign investor (other than the alien number)
1418
+ * - **TXID**: Tax identification number - Number assigned by a tax authority to an entity
1419
+ * - **SOCS**: Social security number - Number assigned by a social security agency
1420
+ * - **IDCD**: Identity card number - Number assigned by a national authority to an identity card
1421
+ * - **LEIX**: Legal Entity Identifier - Legal Entity Identifier (LEI) assigned in accordance with ISO 17442
1422
+ * - **MISC**: Miscellaneous - Other types of national identification not covered by the above codes
1423
+ */
1424
+ declare type NationalIdentifierTypeCode_2 = "ARNU" | "CCPT" | "RAID" | "DRLC" | "FIIN" | "TXID" | "SOCS" | "IDCD" | "LEIX" | "MISC";
1425
+
1219
1426
  /**
1220
1427
  * Field properties for national identifier type selection
1221
1428
  * @public
@@ -1345,6 +1552,15 @@ declare type NaturalPersonV2 = Omit<NaturalPerson_2, 'name'> & {
1345
1552
  name: NaturalPersonNameV2;
1346
1553
  };
1347
1554
 
1555
+ /**
1556
+ * Primary constructor for Notabene UX elements
1557
+ *
1558
+ * This class provides methods to create and manage various Notabene components
1559
+ * such as withdrawal assist, deposit assist, connect, and deposit request.
1560
+ * It also handles URL generation and fragment decoding for these components.
1561
+ *
1562
+ * @public
1563
+ */
1348
1564
  declare class Notabene {
1349
1565
  private nodeUrl?;
1350
1566
  private authToken?;
@@ -1469,6 +1685,155 @@ export declare interface NotabeneConfig {
1469
1685
  locale?: string;
1470
1686
  }
1471
1687
 
1688
+ /**
1689
+ * Organization Interface
1690
+ * Represents a legal entity (company, institution, merchant) in TAP transactions.
1691
+ * Supports both schema.org/Organization properties and IVMS101 identity data for compliance.
1692
+ *
1693
+ * Organizations typically have less privacy concerns than natural persons, making direct
1694
+ * inclusion of IVMS101 data more common for transparency and compliance purposes.
1695
+ *
1696
+ * @example
1697
+ * ```typescript
1698
+ * // Basic organization with schema.org properties
1699
+ * const basicOrg: Organization = {
1700
+ * "@id": "did:web:example.com",
1701
+ * "@type": "https://schema.org/Organization",
1702
+ * name: "Example Corp",
1703
+ * url: "https://example.com",
1704
+ * email: "contact@example.com"
1705
+ * };
1706
+ *
1707
+ * // VASP with full compliance data
1708
+ * const vasp: Organization = {
1709
+ * "@id": "did:web:vasp.example.com",
1710
+ * "@type": "https://schema.org/Organization",
1711
+ * name: "Example Virtual Asset Service Provider",
1712
+ * leiCode: "969500KN90DZLPGW6898",
1713
+ * url: "https://vasp.example.com",
1714
+ * logo: "https://vasp.example.com/logo.png",
1715
+ * description: "Licensed Virtual Asset Service Provider",
1716
+ * email: "compliance@vasp.example.com",
1717
+ * telephone: "+1-555-123-4567",
1718
+ * geographicAddress: [{
1719
+ * addressType: "BIZZ",
1720
+ * streetName: "456 Financial District",
1721
+ * buildingNumber: "456",
1722
+ * postCode: "10005",
1723
+ * townName: "New York",
1724
+ * country: "US"
1725
+ * }],
1726
+ * nationalIdentifier: {
1727
+ * nationalIdentifier: "12-3456789",
1728
+ * nationalIdentifierType: "TXID", // Tax ID
1729
+ * countryOfIssue: "US"
1730
+ * },
1731
+ * countryOfRegistration: "US"
1732
+ * };
1733
+ *
1734
+ * // Merchant with MCC
1735
+ * const merchant: Organization = {
1736
+ * "@id": "did:web:coffee.example.com",
1737
+ * "@type": "https://schema.org/Organization",
1738
+ * name: "Downtown Coffee Shop",
1739
+ * mcc: "5812", // Restaurant
1740
+ * url: "https://coffee.example.com",
1741
+ * geographicAddress: [{
1742
+ * addressType: "BIZZ",
1743
+ * streetName: "123 Main Street",
1744
+ * buildingNumber: "123",
1745
+ * postCode: "12345",
1746
+ * townName: "Anytown",
1747
+ * country: "US"
1748
+ * }]
1749
+ * };
1750
+ * ```
1751
+ *
1752
+ * @see {@link https://github.com/TransactionAuthorizationProtocol/TAIPs/blob/main/TAIPs/taip-6.md | TAIP-6: Party Identification}
1753
+ * @see {@link https://schema.org/Organization | schema.org/Organization}
1754
+ */
1755
+ declare interface Organization extends Participant {
1756
+ "@type": "https://schema.org/Organization";
1757
+ /**
1758
+ * Legal Entity Identifier (LEI) code
1759
+ * 20-character alphanumeric code that uniquely identifies legal entities globally
1760
+ * Used to uniquely identify legal entities involved in financial transactions
1761
+ * @example "969500KN90DZLPGW6898"
1762
+ * @see {@link https://www.iso.org/standard/59771.html | ISO 17442}
1763
+ */
1764
+ leiCode?: LEICode;
1765
+ /**
1766
+ * Legal name of the organization
1767
+ * Can be a simple string or structured IVMS101 name identifiers
1768
+ * For regulated entities, IVMS101 format may be required for compliance
1769
+ * @example "Example Corporation Inc." // Simple string
1770
+ * @example [{ legalPersonName: "Example Corp", legalPersonNameIdentifierType: "LEGL" }] // IVMS101
1771
+ */
1772
+ name?: string | LegalPersonNameId[];
1773
+ /**
1774
+ * Customer identification string
1775
+ * Internal identifier used by the institution for this organization
1776
+ * @example "CORP-789012"
1777
+ */
1778
+ customerIdentification?: string;
1779
+ /**
1780
+ * National identification documents
1781
+ * Government-issued identifiers like tax ID, business registration number
1782
+ * @example { nationalIdentifier: "12-3456789", nationalIdentifierType: "TXID", countryOfIssue: "US" }
1783
+ */
1784
+ nationalIdentifier?: NationalIdentification_2<LegalEntityNationalIdentifierTypeCode>;
1785
+ /**
1786
+ * Merchant Category Code (ISO 18245)
1787
+ * Standard classification code for merchant types in payment transactions
1788
+ * Used primarily for merchants in payment requests
1789
+ *
1790
+ * @example "5411" // Grocery stores and supermarkets
1791
+ * @example "5812" // Restaurants
1792
+ * @example "5734" // Computer software stores
1793
+ * @example "6012" // Financial institutions
1794
+ * @see {@link https://www.iso.org/standard/33365.html | ISO 18245}
1795
+ */
1796
+ mcc?: string;
1797
+ /**
1798
+ * URL pointing to the organization's website
1799
+ * Based on schema.org/Organization
1800
+ * @example "https://example.vasp.com"
1801
+ * @example "https://merchant.example.com"
1802
+ */
1803
+ url?: string;
1804
+ /**
1805
+ * URL pointing to the organization's logo image
1806
+ * Based on schema.org/Organization
1807
+ * @example "https://example.vasp.com/logo.png"
1808
+ * @example "https://cdn.example.com/assets/logo.svg"
1809
+ */
1810
+ logo?: string;
1811
+ /**
1812
+ * Description of the organization
1813
+ * Based on schema.org/Organization
1814
+ * @example "Licensed Virtual Asset Service Provider"
1815
+ * @example "Online marketplace for digital assets and collectibles"
1816
+ * @example "Full-service financial institution"
1817
+ */
1818
+ description?: string;
1819
+ /**
1820
+ * Physical addresses of the organization
1821
+ * IVMS101 format addresses for regulatory compliance
1822
+ * Supports multiple address types (BIZZ for business, etc.)
1823
+ * @example [{ addressType: "BIZZ", streetName: "456 Business Ave", townName: "Finance City", country: "US" }]
1824
+ */
1825
+ geographicAddress?: Address_2[];
1826
+ /**
1827
+ * Country of registration/incorporation
1828
+ * ISO 3166-1 alpha-2 country code where the organization is legally registered
1829
+ * @example "US" // United States
1830
+ * @example "GB" // United Kingdom
1831
+ * @example "SG" // Singapore
1832
+ * @example "CH" // Switzerland
1833
+ */
1834
+ countryOfRegistration?: CountryCode;
1835
+ }
1836
+
1472
1837
  /**
1473
1838
  * Originating VASP
1474
1839
  * Represents the VASP which initiates the VA transfer
@@ -1532,6 +1897,38 @@ export declare interface OwnershipProof {
1532
1897
  address: CAIP10;
1533
1898
  }
1534
1899
 
1900
+ /**
1901
+ * Participant in a TAP transaction
1902
+ * Represents either a party (originator/beneficiary) or an agent in the transaction.
1903
+ * Can include verification methods and policies.
1904
+ *
1905
+ * @see {@link https://github.com/TransactionAuthorizationProtocol/TAIPs/blob/main/TAIPs/taip-5.md | TAIP-5: Agents}
1906
+ * @see {@link https://github.com/TransactionAuthorizationProtocol/TAIPs/blob/main/TAIPs/taip-6.md | TAIP-6: Party Identification}
1907
+ */
1908
+ declare interface Participant {
1909
+ /**
1910
+ * Unique identifier for the participant
1911
+ * Can be either a DID or an IRI
1912
+ */
1913
+ "@id": DID_2 | IRI;
1914
+ "@context"?: string | string[];
1915
+ "@type"?: string | string[];
1916
+ /**
1917
+ * Contact email address
1918
+ * Based on schema.org/Organization and schema.org/Person
1919
+ * @example "compliance@example.vasp.com"
1920
+ */
1921
+ email?: string;
1922
+ /**
1923
+ * Contact telephone number
1924
+ * Based on schema.org/Organization and schema.org/Person
1925
+ * @example "+1-555-123-4567"
1926
+ */
1927
+ telephone?: string;
1928
+ }
1929
+
1930
+ declare type PartyType = "originator" | "beneficiary" | "customer" | "merchant" | "principal";
1931
+
1535
1932
  /**
1536
1933
  * 6.7
1537
1934
  * Data describing the contents of the payload.
@@ -1597,6 +1994,46 @@ declare type PersonV2 = Omit<Person, 'naturalPerson'> & {
1597
1994
  accountNumber?: string[];
1598
1995
  };
1599
1996
 
1997
+ /**
1998
+ * Policy type definition
1999
+ * Union type of all possible policy types in TAP.
2000
+ */
2001
+ declare type Policies = RequireAuthorization | RequirePresentation | RequireRelationshipConfirmation | RequirePurpose;
2002
+
2003
+ /**
2004
+ * Base interface for all TAP policy types.
2005
+ * Policies define requirements and constraints that must be satisfied during a transaction.
2006
+ * Each specific policy type extends this base interface with its own requirements.
2007
+ *
2008
+ * @template T - The specific policy type identifier (e.g. "RequireAuthorization", "RequirePresentation")
2009
+ *
2010
+ * @see {@link https://github.com/TransactionAuthorizationProtocol/TAIPs/blob/main/TAIPs/taip-7.md | TAIP-7: Policies}
2011
+ */
2012
+ declare interface Policy<T extends string> extends JsonLdObject<T> {
2013
+ /** The type identifier for this policy */
2014
+ "@type": T;
2015
+ /**
2016
+ * Optional DID of the party or agent required to fulfill this policy
2017
+ * Can be a single DID or an array of DIDs
2018
+ */
2019
+ from?: DID_2 | IRI;
2020
+ /**
2021
+ * Optional role of the party required to fulfill this policy
2022
+ * E.g. 'SettlementAddress', 'SourceAddress', or 'CustodialService'
2023
+ */
2024
+ fromRole?: AgentRoles;
2025
+ /**
2026
+ * Optional agent representing a party required to fulfill this policy
2027
+ * E.g. 'originator' or 'beneficiary' in TAIP-3
2028
+ */
2029
+ fromAgent?: PartyType;
2030
+ /**
2031
+ * Optional human-readable description of the policy's purpose
2032
+ * Used to explain why this requirement exists
2033
+ */
2034
+ purpose?: string;
2035
+ }
2036
+
1600
2037
  /**
1601
2038
  * Status of the ownership proof verification process
1602
2039
  *
@@ -1684,6 +2121,74 @@ export declare interface RefreshSource {
1684
2121
 
1685
2122
  declare type RequestID = UUID;
1686
2123
 
2124
+ /**
2125
+ * Policy requiring authorization before proceeding
2126
+ * Used to ensure specific agents authorize a transaction.
2127
+ *
2128
+ * @see {@link https://github.com/TransactionAuthorizationProtocol/TAIPs/blob/main/TAIPs/taip-7.md | TAIP-7: Policies}
2129
+ */
2130
+ declare interface RequireAuthorization extends Policy<"RequireAuthorization"> {
2131
+ }
2132
+
2133
+ /**
2134
+ * Policy requiring presentation of verifiable credentials
2135
+ * Used to request specific verifiable credentials from participants.
2136
+ *
2137
+ * @see {@link https://github.com/TransactionAuthorizationProtocol/TAIPs/blob/main/TAIPs/taip-7.md | TAIP-7: Policies}
2138
+ * @see {@link https://github.com/TransactionAuthorizationProtocol/TAIPs/blob/main/TAIPs/taip-8.md | TAIP-8: Verifiable Credentials}
2139
+ */
2140
+ declare interface RequirePresentation extends Policy<"RequirePresentation"> {
2141
+ /**
2142
+ * Optional DID of the party the presentation is about
2143
+ * Used when requesting credentials about a specific party
2144
+ */
2145
+ aboutParty?: DID_2 | IRI;
2146
+ /**
2147
+ * Optional DID of the agent the presentation is about
2148
+ * Used when requesting credentials about a specific agent
2149
+ */
2150
+ aboutAgent?: DID_2 | IRI;
2151
+ /**
2152
+ * Presentation Exchange definition
2153
+ * Specifies the required credentials and constraints
2154
+ */
2155
+ presentationDefinition: string;
2156
+ /**
2157
+ * Optional credential type shorthand
2158
+ * Simplified way to request a specific credential type
2159
+ */
2160
+ credentialType?: string;
2161
+ }
2162
+
2163
+ /**
2164
+ * Policy requiring purpose codes for transactions
2165
+ * Used to enforce the inclusion of ISO 20022 purpose codes.
2166
+ *
2167
+ * @see {@link https://github.com/TransactionAuthorizationProtocol/TAIPs/blob/main/TAIPs/taip-13.md | TAIP-13: Purpose Codes}
2168
+ */
2169
+ declare interface RequirePurpose extends Policy<"RequirePurpose"> {
2170
+ /**
2171
+ * Required purpose code fields
2172
+ * Specifies which purpose code types must be included
2173
+ */
2174
+ required: Array<"purpose" | "categoryPurpose">;
2175
+ }
2176
+
2177
+ /**
2178
+ * Policy requiring relationship confirmation
2179
+ * Used to verify control of addresses and relationships between parties.
2180
+ *
2181
+ * @see {@link https://github.com/TransactionAuthorizationProtocol/TAIPs/blob/main/TAIPs/taip-7.md | TAIP-7: Policies}
2182
+ * @see {@link https://github.com/TransactionAuthorizationProtocol/TAIPs/blob/main/TAIPs/taip-9.md | TAIP-9: Proof of Relationship}
2183
+ */
2184
+ declare interface RequireRelationshipConfirmation extends Policy<"RequireRelationshipConfirmation"> {
2185
+ /**
2186
+ * Required nonce for signature
2187
+ * Prevents replay attacks
2188
+ */
2189
+ nonce: string;
2190
+ }
2191
+
1687
2192
  /**
1688
2193
  * Represents a resize request component message. This is handled by the library.
1689
2194
  * @internal
@@ -10,7 +10,7 @@
10
10
  "author": "Notabene <developers@notabene.id>",
11
11
  "license": "MIT",
12
12
  "packageManager": "yarn@4.5.1",
13
- "version": "2.15.0-next.2",
13
+ "version": "2.15.0-next.3",
14
14
  "source": "src/notabene.ts",
15
15
  "main": "dist/cjs/notabene.cjs",
16
16
  "module": "dist/esm/notabene.js",
@@ -72,6 +72,7 @@
72
72
  "@semantic-release/git": "^10.0.1",
73
73
  "@semantic-release/gitlab": "^13.2.1",
74
74
  "@semantic-release/npm": "^12.0.1",
75
+ "@taprsvp/types": "^1.14.0",
75
76
  "@vitest/coverage-v8": "^2.1.8",
76
77
  "eslint": "^9.14.0",
77
78
  "eslint-config-prettier": "^9.1.0",
@@ -79,6 +80,7 @@
79
80
  "fast-check": "^3.23.1",
80
81
  "globals": "^15.11.0",
81
82
  "husky": "^9.1.6",
83
+ "jose": "^6.1.0",
82
84
  "jsdom": "^25.0.1",
83
85
  "lint-staged": "^15.2.10",
84
86
  "prettier": "^3.3.3",
@@ -104,9 +106,5 @@
104
106
  "extends": [
105
107
  "@commitlint/config-conventional"
106
108
  ]
107
- },
108
- "dependencies": {
109
- "@taprsvp/types": "^1.13.0",
110
- "jose": "^6.1.0"
111
109
  }
112
110
  }