
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@basis-theory/basis-theory-js
Advanced tools
> [!CAUTION] > This SDK has been deprecated for use in Node.js environments. It is still supported for use in web elements and reactor environments. > > Our new Node.js SDK can be found at https://github.com/Basis-Theory/node-sdk > > See our documentation
[!CAUTION] This SDK has been deprecated for use in Node.js environments. It is still supported for use in web elements and reactor environments.
Our new Node.js SDK can be found at https://github.com/Basis-Theory/node-sdk
See our documentation site for more information. https://developers.basistheory.com/docs/sdks/server-side/node
The Basis Theory JS SDK
Using Node Package Manager
npm install --save @basis-theory/basis-theory-js
Using Yarn
yarn add @basis-theory/basis-theory-js
For a complete list of endpoints and examples, please refer to our API docs
import { BasisTheory } from '@basis-theory/basis-theory-js';
const bt = await new BasisTheory().init('<API Key>'); // replace with your application key
All of the service methods accept an optional RequestOptions
object. This is used if you want to set a per-request BT-TRACE-ID
, BT-API-KEY
and/or BT-IDEMPOTENCY-KEY
.
import { v4 as uuid } from 'uuid';
await bt.applications.list(
{},
{
apiKey: '<Management API Key>',
correlationId: 'aa5d3379-6385-4ef4-9fdb-ca1341572153',
idempotencyKey: 'bb5d3379-6385-4ef4-9fdb-ca1341572154',
}
);
await bt.tokens.create(
{
type: "token",
data: "Sensitive Value",
},
{
apiKey: '<API Key>',
correlationId: 'aa5d3379-6385-4ef4-9fdb-ca1341572153',
idempotencyKey: 'bb5d3379-6385-4ef4-9fdb-ca1341572154',
}
);
You can set a custom API Url to be used across all clients when creating a new SDK instance.
import { BasisTheory } from '@basis-theory/basis-theory-js';
const bt = await new BasisTheory().init('<API Key>', {
apiBaseUrl: 'https://api.somedomain.com',
}); // replace with your application key and api base URL.
Please, refer to the Elements Documentation on how to use it.
The provided scripts with the SDK will check for all dependencies, start docker, build the solution, and run all tests.
Run the following command from the root of the project:
make verify
FAQs
> [!CAUTION] > This SDK has been deprecated for use in Node.js environments. It is still supported for use in web elements and reactor environments. > > Our new Node.js SDK can be found at https://github.com/Basis-Theory/node-sdk > > See our documentation
The npm package @basis-theory/basis-theory-js receives a total of 14,057 weekly downloads. As such, @basis-theory/basis-theory-js popularity was classified as popular.
We found that @basis-theory/basis-theory-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.