Skip to content

Commit

Permalink
Improve Travel Rule interface with additional fields update existing …
Browse files Browse the repository at this point in the history
…one (#176)

* Improve Travel Rule interface with addtional fields update existinog one

* Remove asset name and amount from travel rule message interface
  • Loading branch information
rade-fireblocks authored Jun 6, 2023
1 parent a2b78ad commit 6597f55
Showing 1 changed file with 34 additions and 31 deletions.
65 changes: 34 additions & 31 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,57 +296,46 @@ export interface ValidateCreateTravelRuleTransaction {
skipBeneficiaryDataValidation?: boolean;
}


export interface TravelRule {
originatorRef?: string;
beneficiaryRef?: string;
originatorVASPdid: string;
travelRuleBehavior?: boolean;
beneficiaryVASPdid: string;
originator?: TROriginator;
beneficiary?: TROriginator;
beneficiaryVASPname?: string;
originator: TROriginator;
beneficiary: TRBeneficiary;
pii?: PII;
jsonDidKey?: string;
}


interface PII {
originator?: TROriginator;
beneficiary?: TROriginator;
}

interface TROriginator {
export interface TROriginator {
originatorPersons?: TROriginatorPerson[];
beneficiaryPersons?: TROriginatorPerson[];
accountNumber?: string[];
}

interface TROriginatorPersons extends Array<TROriginatorPerson> {}

interface TROriginatorPerson {
export interface TROriginatorPerson {
naturalPerson?: TRNaturalPerson;
legalPerson?: TRNaturalPerson;
}

interface TRNaturalPerson {
name?: TRName;
geographicAddress?: TRGeographicAddress;
export interface TRNaturalPerson {
name: TRName[];
geographicAddress?: TRGeographicAddress[];
nationalIdentification?: TRNationalIdentification;
dateAndPlaceOfBirth?: TRDateAndPlaceOfBirth;
}

interface TRName extends Array<TRPersonNameIdentifier> {}

interface TRPersonNameIdentifier {
nameIdentifier?: TRNameIdentifier;
export interface TRName {
nameIdentifier?: TRNameIdentifier[];
}

interface TRNameIdentifier {
export interface TRNameIdentifier {
primaryIdentifier?: string;
secondaryIdentifier?: string;
nameIdentifierType?: string;
}

interface TRGeographicAddress extends Array<TRGeographicAddressData> {}

interface TRGeographicAddressData {
export interface TRGeographicAddress {
streetName?: string;
townName?: string;
country?: string;
Expand All @@ -365,27 +354,41 @@ interface TRGeographicAddressData {
addressLine?: string;
}

interface TRNationalIdentification {
countryOfIssue?: string;
export interface TRNationalIdentification {
nationalIdentifier?: string;
nationalIdentifierType?: string;
registrationAuthority?: string;
countryOfIssue?: string;
}

interface TRDateAndPlaceOfBirth {
export interface TRDateAndPlaceOfBirth {
dateOfBirth?: string;
placeOfBirth?: string;
}

export interface TRBeneficiary {
beneficiaryPersons?: TRBeneficiaryPerson[];
originatorPersons?: TROriginatorPerson[];
accountNumber?: string[];
}

export interface TRBeneficiaryPerson {
naturalPerson?: TRNaturalPerson;
}

interface PII {
originator?: TROriginator;
beneficiary?: TRBeneficiary;
}

export interface TravelRuleOptions {
clientId: string;
clientSecret: string;
authURL?: string;
audience?: string;
audiencePII?: string;

baseURL?: string;
baseURLPII?: string;

jsonDidKey?: string;
beneficiaryDidKey?: string;
travelRuleMessage?: TravelRule;
Expand Down

0 comments on commit 6597f55

Please sign in to comment.