File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed
Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 1- import type { ComplianceResponse , HeightResponse , TimeResponse } from '../types' ;
1+ import type {
2+ ComplianceResponse ,
3+ ComplianceV2Response ,
4+ HeightResponse ,
5+ TimeResponse ,
6+ } from '../types' ;
27import RestClient from './rest' ;
38
49export default class UtilityClient extends RestClient {
@@ -29,4 +34,14 @@ export default class UtilityClient extends RestClient {
2934 const uri = '/v4/screen' ;
3035 return this . get ( uri , { address } ) ;
3136 }
37+
38+ /**
39+ * @description Screen an address to see if it is restricted
40+ * @param {string } address evm or dydx address
41+ * @returns {ComplianceResponse } whether the specified address is restricted
42+ */
43+ async complianceScreen ( address : string ) : Promise < ComplianceV2Response > {
44+ const uri = `/v4/compliance/screen/${ address } ` ;
45+ return this . get ( uri ) ;
46+ }
3247}
Original file line number Diff line number Diff line change @@ -105,6 +105,30 @@ export interface HeightResponse {
105105
106106export interface ComplianceResponse {
107107 restricted : boolean ;
108+ reason ?: string ;
109+ }
110+
111+ export enum ComplianceReason {
112+ MANUAL = 'MANUAL' ,
113+ US_GEO = 'US_GEO' ,
114+ CA_GEO = 'CA_GEO' ,
115+ GB_GEO = 'GB_GEO' ,
116+ SANCTIONED_GEO = 'SANCTIONED_GEO' ,
117+ COMPLIANCE_PROVIDER = 'COMPLIANCE_PROVIDER' ,
118+ }
119+
120+ export enum ComplianceStatus {
121+ COMPLIANT = 'COMPLIANT' ,
122+ FIRST_STRIKE_CLOSE_ONLY = 'FIRST_STRIKE_CLOSE_ONLY' ,
123+ FIRST_STRIKE = 'FIRST_STRIKE' ,
124+ CLOSE_ONLY = 'CLOSE_ONLY' ,
125+ BLOCKED = 'BLOCKED' ,
126+ }
127+
128+ export interface ComplianceV2Response {
129+ status : ComplianceStatus ;
130+ reason ?: ComplianceReason ;
131+ updatedAt ?: string ;
108132}
109133
110134// ------------ Squid ------------ //
You can’t perform that action at this time.
0 commit comments