
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@blockmason/link-sdk
Advanced tools
Convenience library for accessing an API hosted on Blockmason Link.
To add this library to your app, do one of the following:
Using Yarn:
yarn add @blockmason/link-sdk
Using NPM:
npm install @blockmason/link-sdk
First, your app should import the link
module from this library.
Using ES6:
import { link } from '@blockmason/link-sdk';
Using CommonJS modules (Node.js):
const { link } = require('@blockmason/link-sdk');
Once you have the link()
function imported, create a client for your
Link project like this:
const project = link({
clientId: '<your-client-id>',
clientSecret: '<your-client-secret>'
});
Use the Client ID and Client Secret provided by your Link project to fill in the respective values above.
The Link SDK uses fetch()
to make HTTP requests. Most modern browsers
provide this function as a global, but it is absent from Node.js.
When calling the link()
function from a Node.js environment, you can
pass in a fetch()
implementation along as a second parameter, like this:
const fetch = require('node-fetch');
const { link } = require('@blockmason/link-sdk');
const project = link({
clientId: '<your-client-id>',
clientSecret: '<your-client-secret>'
}, {
fetch
});
The above snippet uses the node-fetch
compatibility package.
Then, you can use the project
object to make requests against your
Link project.
For example, assuming your project has a GET /echo endpoint that
expects a message
input and responds with a message
output:
const { message } = await project.get('/echo', {
message: 'Hello, world!'
});
console.log(message);
// "Hello, world!"
Another example, assuming your project has a POST /mint endpoint
that expects to
and amount
inputs:
await project.post('/mint', {
amount: 1000,
to: '0x1111222233334444555566667777888899990000'
});
FAQs
Convenience library for accessing an API hosted on Blockmason Link.
We found that @blockmason/link-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.