
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
@audius/sdk
Advanced tools
The Audius JavaScript (TypeScript) SDK allows you to easily build on and interact with the Audius protocol.
š·āāļø We're actively working on building out more SDK features and functionality - stay tuned!
In your terminal, run:
npm install web3 @audius/sdk
import { sdk } from '@audius/sdk'
const audiusSdk = sdk({ appName: 'Name of your app goes here' })
const track = await audiusSdk.tracks.getTrack({ trackId: 'D7KyD' })
console.log(track, 'Track fetched!')
import Web3 from 'web3'
import { sdk } from '@audius/sdk'
// If running in a browser, set window.Web3
window.Web3 = Web3
const audiusSdk = sdk({ appName: 'My Example App' })
const track = await audiusSdk.tracks.getTrack({ trackId: 'D7KyD' })
console.log(track, 'Track fetched!')
If your bundler doesn't automatically polyfill node libraries (like when using create-react-app v5) you will need to use the
web3script tag instead of theweb3npm package
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@audius/sdk@latest/dist/sdk.min.js"></script>
The Audius SDK will then be assigned to window.audiusSdk.
const audiusSdk = window.audiusSdk({ appName: 'Name of your app goes here' })
const track = await audiusSdk.tracks.getTrack({ trackId: 'D7KyD' })
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@audius/sdk@latest/dist/sdk.min.js"></script>
<script>
const fn = async () => {
const audiusSdk = window.audiusSdk({
appName: "My Example App",
});
const track = await audiusSdk.tracks.getTrack({ trackId: 'D7KyD' });
console.log(track, "Track fetched!");
}
fn()
</script>
</head>
<body>
<h1>Example content</h1>
</body>
</html>
FAQs
Audius SDK
The npm package @audius/sdk receives a total of 232 weekly downloads. As such, @audius/sdk popularity was classified as not popular.
We found that @audius/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than 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
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.