1.0.3 • Published 2 years ago

ethereum-sanction-check v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

This node module help to check if a account is sanction. Currently only chainalysis sanction api is support. Here you can find more Information: https://public.chainalysis.com/docs/index.html#create-an-api-key

ENS Names compatible

const SanctionCheck = require( 'ethereum-sanction-check' )

async function main( { tests } ) {
    const check = new SanctionCheck( {
        'providerUrl': process.env.HTTP_NODE_PROVIDER,
        'chainalysisApiKey': process.env.CHAINALYSIS_API_KEY
    } )

    await check.start( { 'tests': tests } )
    check.print()
    return s.checks
}


main( { 'tests': 'vitalik.eth' } )
    .then( checks => console.log( checks ) )
    .catch( e => console.log( e ) )

LISTS with validation check

const SanctionCheck = require( 'ethereum-sanction-check' )

async function main( { tests } ) {
    const check = new SanctionCheck( {
        'providerUrl': process.env.HTTP_NODE_PROVIDER,
        'chainalysisApiKey': process.env.CHAINALYSIS_API_KEY
    } )

    await check.start( { 'tests': tests } )
    check.print()
    return s.checks
}

const tests = [ 
    '0x0000000000000000000000000000000000000001',
    '0x0000000000000000000000000000000000000002',
    '0x0000000000000000000000000000000000000003',
    null,
    1,
    'invalid'
 ]

main( { 'tests': tests } )
    .then( checks => console.log( checks ) )
    .catch( e => console.log( e ) )
  1. Examples
  2. Quickstart
  3. Setup
  4. Options
  5. Contributing
  6. License
  7. Code of Conduct
  8. Support my Work
const SanctionCheck = require( 'ethereum-sanction-check' )

const check = new SanctionCheck( {
    'chainalysisApiKey': process.env.CHAINALYSIS_API_KEY
} )

const tests = [ '0x0000000000000000000000000000000000000000' ]

check.start( { 'tests': tests } )
    .then( s => { s.print() } )
    .catch( err => console.log( err ) )
npm i ethereum-sanction-check

constructor()

const SanctionCheck = require( 'ethereum-sanction-check' )

const check = new SanctionCheck( { 
    'providerUrl': null, 
    'chainalysisApiKey': process.env.CHAINALYSIS_API_KEY
    'sleep': 1, 
    'provider': null 
} )
NameTypeRequiredDefaultDescription
providerUrlStringNonullIs only used for ENS Domainnames: LINK
chainalysisApiKeyStringYesnullYou can find more Information here: LINK
sleepStringNo0Delay between queries in milliseconds
providerEtherjs Provider ObjectNonullBy default it will created for you. You can also pass the object y yourself: LINK

.start( { tests: [] } )

NameTypeRequiredDefaultDescription
testsString or ArrayYesInsert your addresses here as Array or a single string

.print()
Console log all results.

.checks
Return results as array

Bug reports and pull requests are welcome on GitHub at https://github.com/a6b8/ethereum-sanction-check-for-nodejs. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

  • Only chainalysis api included

The module is available as open source under the terms of the MIT License.

Please ⭐️ star this Project, every ⭐️ star makes us very happy!

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago