![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@onchain-id/complydefi-sdk
Advanced tools
This package facilitates the interaction with ComplyDefi stored in the BlockChain.
To interact with the BlockChain, you will need to instantiate a Provider.
The SDK is using Ethers to connect with Ethereum network. Thus, any provider supported by Ethers can be used with the SDK. This means any standard web3 provider should by supported.
Connect to a default provider:
// You can use any standard network name
// - "homestead"
// - "rinkeby"
// - "ropsten"
// - "kovan"
const ethers = require('ethers');
const provider = ethers.getDefaultProvider('ropsten');
const complyDefi = await Complydefi.at('0x...', {provider});
Connect to JSON RPC:
// When using the JSON-RPC API, the network will be automatically detected
// Default: http://localhost:8545
let httpProvider = new ethers.providers.JsonRpcProvider();
Connect to any Web3 Provider:
// When using a Web3 provider, the network will be automatically detected
// e.g. HTTP provider
let currentProvider = new web3.providers.HttpProvider('http://localhost:8545');
let web3Provider = new ethers.providers.Web3Provider(currentProvider);
Connect to metamask:
// The network will be automatically detected; if the network is
// changed in MetaMask, it causes a page refresh.
let provider = new ethers.providers.Web3Provider(web3.currentProvider);
const { ComplyDefiSDK } = require('@onchain-id/complydefi-sdk');
const provider = new ethers.providers.JsonRpcProvider();
(async () => {
const complyDefi = new ComplyDefiSDK.ComplyDefi('0xadD92F8Ef0729E969c5a98Ea5740c9b644B362e3', { provider });
const claims = await complyDefi.getRequiredClaims();
console.log(claims); // ['claim1', 'claim2']
})();
const { ComplyDefiSDK } = require('@onchain-id/complydefi-sdk');
const provider = new ethers.providers.JsonRpcProvider();
(async () => {
const complyDefi = new ComplyDefiSDK.ComplyDefi('0xadD92F8Ef0729E969c5a98Ea5740c9b644B362e3', { provider });
const isComply = await complyDefi.isComply('0xasfgdsgd...dsasd');
console.log(isComply); // true or false
})();
npm i
.npm run lint lint
.npm run test:unit
. You can run unit tests each time you modify a file with npm run test:unit:watch
.npm run build
. This will build package into the dist/
folder from the TypeScript sources.npm run test:e2e
.FAQs
Interact with ComplyDeFi
We found that @onchain-id/complydefi-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.