New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@tokenscript/card-sdk

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tokenscript/card-sdk

Provides common code and types for interacting from the TokenScript engine from a card view

latest
Source
npmnpm
Version
1.5.0
Version published
Maintainers
0
Created
Source

TokenScript Card SDK

The TokenScript card SDK is bundled with the TokenScript engine and is injected into each cards iframe or webview along with the TokenScript userspace code.

The SDK:

  • Provides data from the view to the engine
  • Provides methods for TokenScript cards to interact with the engine or user-agent
  • Bundles commonly used libraries, so they don't have to be included in each TokenScript
  • Provides tokenscript.d.ts, so that TokenScript developers can get type hinting & autocomplete for SDK methods

Installation

To include SDK type in your TokenScript project, install the SDK as a developer dependency:

npm i -D @tokenscript/card-sdk

Then include the tokenscript.d.ts in the entrypoint of your application (e.g. index.ts/main.ts):

import "@tokenscript/card-sdk/src/tokenscript.d.ts";

OR

///<reference path="../node_modules/@tokenscript/card-sdk/src/tokenscript.d.ts""/>

Bundled libraries

  • ethers.js (version ^6.9)

Bundling the SDK

To build & bundle an updated SDK with the engine: npm run bundle

FAQs

Package last updated on 22 Oct 2024

Did you know?

Socket

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.

Install

Related posts