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

@audius/eth

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@audius/eth

The core Typescript mappings to the Audius Ethereum Contracts

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
3
Created
Source

@audius/eth

Typed ABIs and production addresses for the Audius Ethereum contracts. Designed for use with viem and fully tree-shakable — import only the contracts you need.

Installation

npm install @audius/eth viem

Usage

Each contract export is a plain object with abi and address:

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { Staking } from '@audius/eth'

const client = createPublicClient({
  chain: mainnet,
  transport: http()
})

const totalStaked = await client.readContract({
  ...Staking,
  functionName: 'totalStaked'
})

Check pending rewards claim

import { ClaimsManager } from '@audius/eth'

const isPending = await client.readContract({
  ...ClaimsManager,
  functionName: 'claimPending',
  args: ['0xYourServiceProviderAddress']
})

Read a governance proposal

import { Governance } from '@audius/eth'

const proposal = await client.readContract({
  ...Governance,
  functionName: 'getProposalById',
  args: [1n]
})

Look up service provider endpoints

import { ServiceProviderFactory, VALIDATOR_SERVICE_TYPE } from '@audius/eth'

// Get the total number of validators
const total = await client.readContract({
  ...ServiceProviderFactory,
  functionName: 'getTotalServiceTypeProviders',
  args: [VALIDATOR_SERVICE_TYPE]
})

// Get the endpoint info for the first one
const info = await client.readContract({
  ...ServiceProviderFactory,
  functionName: 'getServiceEndpointInfo',
  args: [VALIDATOR_SERVICE_TYPE, 1n]
})

EIP-2612 permit (gasless approval)

AudiusToken and AudiusWormhole include domain and types for EIP-712 signing:

import { AudiusToken } from '@audius/eth'

const signature = await walletClient.signTypedData({
  domain: {
    ...AudiusToken.domain,
    chainId: 1,
    verifyingContract: AudiusToken.address
  },
  types: AudiusToken.types,
  primaryType: 'Permit',
  message: {
    owner: '0x...',
    spender: '0x...',
    value: 1000000000000000000n,
    nonce: 0n,
    deadline: 99999999999n
  }
})

Contracts

ExportDescription
AudiusTokenThe AUDIO ERC-20 token. Mintable, pausable, burnable. Supports EIP-2612 permit().
AudiusWormholeSends AUDIO cross-chain via Wormhole with meta-transaction support.
ClaimsManagerPeriodic minting and distribution of AUDIO staking rewards.
DelegateManagerDelegation of AUDIO tokens to service providers with lockup periods.
EthRewardsManagerTransfers AUDIO rewards from Ethereum to Solana via Wormhole.
GovernanceOn-chain governance: proposals, stake-weighted voting, execution.
RegistryCentral directory mapping contract names to addresses.
ServiceProviderFactoryRegistration and staking for discovery nodes and content nodes.
ServiceTypeManagerRegistry of valid service types and their versions.
StakingCore staking contract holding all staked AUDIO with checkpointing.
TrustedNotifierManagerRegistry of trusted notifier entities.

FAQs

Package last updated on 18 Mar 2026

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