1.0.24 • Published 9 months ago

@celo/compliance v1.0.24

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

OFAC Compliance

A simple package to help you stay compliant with OFAC sanctioned addresses (e.g. front-ends, other applicable products).

Purpose

This package simplifies the process of staying up-to-date with the latest OFAC sanctioned addresses by providing them in a JSON format via an API (recommended) or direct import (discouraged).

Update Cadence

!IMPORTANT Please note that there is currently no SLA for how quickly the repository will be updated to reflect the most recent OFAC sanctioned addresses. Updates will be done on a best-effort basis.

Usage

Option 1: Make an API call (recommended)

You can make an API call to retrieve the latest OFAC sanctions list from

https://celo-org.github.io/compliance/ofac.sanctions.json

For example:

export async function getSanctionedAddresses(): Promise<string[]> {
    return await fetch("https://celo-org.github.io/compliance/ofac.sanctions.json")
        .then((response) => {
            return response.json();
        })
        .catch((err) => {
            console.log(err);
        });
}

!TIP No changes to your code will be necessary when the list is updated as this API will always return the latest version.

Option 2: Import the SANCTIONED_ADDRESSES list (discouraged)

If you really want to, you can explicitly import the SANCTIONED_ADDRESSES list exported in the @celo/compliance package directly into your code.

!WARNING Although, please note that this is not recommended as it will require you to update your dependency every time the list is updated.

import { SANCTIONED_ADDRESSES } from "@celo/compliance";

export function getSanctionedAddresses(): string[] {
    return SANCTIONED_ADDRESSES;
}
1.0.24

9 months ago

1.0.22

1 year ago

1.0.23

12 months ago

1.0.21

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.20

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago