diff --git a/src/fireblocks-sdk.ts b/src/fireblocks-sdk.ts index 8e210c47..9ff805be 100644 --- a/src/fireblocks-sdk.ts +++ b/src/fireblocks-sdk.ts @@ -92,6 +92,9 @@ import { SmartTransfersTicketsFilters, SmartTransfersTicketTermPayload, SmartTransfersTicketTermFundPayload, + ScreeningPolicyConfiguration, + TravelRulePolicy, + TravelRuleRulesConfiguration, SmartTransfersTicketTermResponse, SmartTransfersUserGroupsResponse, UsersGroup, @@ -1679,6 +1682,35 @@ export class FireblocksSDK { return await this.apiClient.issuePutRequest(`/v1/screening/travel-rule/vasp/update`, vaspInfo); } + /** + * Get PostScreening Policies for travel rule compliance + */ + public async getTravelRulePostScreeningPolicy(): Promise { + return await this.apiClient.issueGetRequest(`/v1/screening/travel_rule/post_screening_policy`); + } + + /** + * Get Screening Policies for travel rule compliance + */ + public async getTravelRuleScreeningPolicy(): Promise { + return await this.apiClient.issueGetRequest(`/v1/screening/travel_rule/screening_policy`); + } + + /** + * Get Screening Configuration for travel rule compliance + */ + public async getTravelRuleScreeningConfiguration(): Promise { + return await this.apiClient.issueGetRequest(`/v1/screening/travel_rule/policy_configuration`); + } + + /** + * Update Bypass Screening Configuration for travel rule compliance + * @param screeningPolicyConfiguration + */ + public async updateTravelRulePolicyConfiguration(screeningPolicyConfiguration: ScreeningPolicyConfiguration): Promise { + return await this.apiClient.issuePutRequest(`/v1/screening/travel_rule/policy_configuration`, screeningPolicyConfiguration); + } + /** * Creates Smart Transfers ticket * @param data diff --git a/src/types.ts b/src/types.ts index a0c1dd58..ed9158e8 100644 --- a/src/types.ts +++ b/src/types.ts @@ -502,6 +502,81 @@ export interface TravelRuleVaspFilter { order?: string; } +export interface ScreeningPolicyConfiguration { + bypassScreeningDuringServiceOutages?: boolean; + inboundTransactionDelay?: number; + outboundTransactionDelay?: number; +} + +export enum TravelRuleAction { + screen = "SCREEN", + pass = "PASS", + freeze = "FREEZE" +} + +export interface TravelRulePolicyRule { + sourceType?: string; + sourceSubType?: string; + destType?: string; + destSubType?: string; + destAddress?: string; + sourceId?: string; + destId?: string; + asset?: string; + baseAsset?: string; + amount?: number; + amountUSD?: number; + networkProtocol?: string; + operation?: string; + action: TravelRuleAction; +} + +export enum PolicyApprovalStatus { + live = "live", + processing = "processing" +} + +export enum TransactionDirection { + inbound = "INBOUND", + outbound = "OUTBOUND" +} + +export enum FbTravelRuleTransactionStatus { + completed = "COMPLETED", + pending = "PENDING", + rejected = "REJECTED", + failed = "FAILED", + canceled = "CANCELED", + blockingTimeExpired = "BLOCKING_TIME_EXPIRED", +} + +export enum TravelRuleVerdict { + accept = "ACCEPT", + reject = "REJECT", + alert = "ALERT", + wait = "WAIT", + freeze = "FREEZE", + cancel = "CANCEL" +} + +export interface TravelRuleRulesConfiguration { + direction?: TransactionDirection; + status?: FbTravelRuleTransactionStatus; + amountUSD?: number; + amount?: number; + asset?: string; + action: TravelRuleVerdict; +} + +export interface TravelRulePolicy { + tenantId?: string; + policy: TravelRulePolicyRule[]; + policyStatus?: PolicyApprovalStatus; + isDefault: boolean; + createDate?: Date; + lastUpdate: Date; +} + export enum Web3ConnectionFeeLevel { HIGH = "HIGH", MEDIUM = "MEDIUM",