Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travel Rule Configuration and Policy routes #187

Merged
merged 11 commits into from
Sep 19, 2023
Merged
44 changes: 43 additions & 1 deletion src/fireblocks-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ import {
SmartTransfersTicketsFilters,
SmartTransfersTicketTermPayload,
SmartTransfersTicketTermFundPayload,
SmartTransfersTicketTermResponse,
SmartTransfersTicketTermResponse, ScreeningPolicyConfiguration,
} from "./types";
import { AxiosProxyConfig, AxiosResponse } from "axios";
import { PIIEncryption } from "./pii-client";
Expand Down Expand Up @@ -1549,6 +1549,48 @@ export class FireblocksSDK {
return await this.apiClient.issuePutRequest(`/v1/screening/travel-rule/vasp/update`, vaspInfo);
}

/**
* Get PostScreening Policies for travel rule compliance
*/
public async getPostScreeningPolicy(): Promise<TravelRuleVasp> {
return await this.apiClient.issueGetRequest(`/v1/screening/travel_rule/post_screening_policy}`);
}

/**
* Get Screening Policies for travel rule compliance
*/
public async getScreeningPolicy(): Promise<TravelRuleVasp> {
return await this.apiClient.issueGetRequest(`/v1/screening/travel_rule/screening_policy}`);
}

/**
* Get Screening Configuration for travel rule compliance
*/
public async getScreeningConfiguration(): Promise<TravelRuleVasp> {
return await this.apiClient.issueGetRequest(`/v1/screening/travel_rule/policy_configuration}`);
}

/**
* Set Bypass Screening Configuration for travel rule compliance
*/
public async setBypassConfiguration(bypassConfiguration: ScreeningPolicyConfiguration): Promise<TravelRuleVasp> {
return await this.apiClient.issuePutRequest(`/api/travel-rule/bypass/configuration}`, bypassConfiguration);
}

/**
* Update Inbound Transaction Delay Configuration for travel rule compliance
*/
public async updateInboundDelay(inboundDelay: ScreeningPolicyConfiguration): Promise<TravelRuleVasp> {
return await this.apiClient.issuePutRequest(`/v1/screening/travel_rule/inbound_delay}`, inboundDelay);
}

/**
* Update Outbound Transaction Delay Configuration for travel rule compliance
*/
public async updateOutboundDelay(outboundDelay: ScreeningPolicyConfiguration): Promise<TravelRuleVasp> {
return await this.apiClient.issuePutRequest(`/v1/screening/travel_rule/policy_configuration}`, outboundDelay);
}

/**
* Creates Smart Transfers ticket
* @param data
Expand Down
6 changes: 6 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,12 @@ export interface TravelRuleVaspFilter {
order?: string;
}

export interface ScreeningPolicyConfiguration {
bypassScreeningDuringServiceOutages?: boolean;
inboundTransactionDelay?: number;
outboundTransactionDelay?: number;
}

export enum Web3ConnectionFeeLevel {
HIGH = "HIGH",
MEDIUM = "MEDIUM",
Expand Down