Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@fleekhq/sdk
Advanced tools
Fleek SDK makes easier interact with Fleek APIs and Internet Computer.
Fleek SDK is a javascript library that makes easier to interact with Fleek APIs and Internet Computer.
Use the npm
package manager to install it.
npm install @fleekhq/sdk
It can also be installed through yarn.
yarn add @fleekhq/sdk
The SDK can be imported using an import statement.
import { Fleek } from '@fleekhq/sdk';
The SDK can also be imported using a require.
const { Fleek } = require('@fleekhq/sdk');
You can initialise instance only with apiKey
, but if you want to leverage asset canister you also need to provide assetCanisterId
property.
import { Fleek } from '@fleekhq/sdk';
const sdk = new Fleek({
apiKey: 'your-api-key', // your Fleek API Key
assetCanisterId: 'your-asset-canister-id',
});
Returns an instance of the IPFS client. For more information check out https://www.npmjs.com/package/ipfs-http-client.
const ipfs = sdk.ipfs();
await sdk.ipfs().add(...);
Returns an instance of the IC storage client
const assetStorage = sdk.assets();
await sdk.assets().store(key, data);
await sdk.assets().storeJson(key, { some: 'value' });
const asset = await sdk.assets().get(key);
Returns the asset with the provided key
. Returns null
if not found.
const assets = await sdk.assets().listAll();
Returns a list of all assets. Returns []
if none.
// list images for a specific user
const prefix = `images/${uid}`;
const assets = await sdk.assets().list(prefix);
Returns a list of all assets whose keys start with the provided prefix
. Returns []
if none.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
FAQs
Fleek SDK makes easier interact with Fleek APIs and Internet Computer.
We found that @fleekhq/sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.