Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

usdc

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

usdc

USDC Multi-Chain Payments SDK

latest
npmnpm
Version
0.1.4
Version published
Maintainers
2
Created
Source

USDC

https://www.circle.com/en/multichain-usdc

USDC is available on many of the world's leading blockchains, with more chain integrations expected.

Installation

npm install --save usdc

Example Usage

Stellar
import { stellar } from 'usdc'

stellar.getUSDCBalance({ address: process.env.stellar_usdc_address })
	.then(console.log)
  
const { txid } = await stellar.sendUSDCPayment({
  mnemonic: process.env.stellar_usdc_mnemonic,
  to: [{
    address: process.env.stellar_usdc_address,
    amount: 1
  }]
})

stellar.checkPaymentStatus({ txid }).then(console.log)


Ethereum
import { ethereum } from 'usdc'

ethereum({ address: process.env.ethereum_usdc_address })
	.then(console.log)
  
const { txid } = await ethereum.sendUSDCPayment({
  mnemonic: process.env.ethereum_usdc_mnemonic,
  to: [{
    address: process.env.ethereum_usdc_address,
    amount: 1
  }]
})

ethereum.checkPaymentStatus({ txid }).then(console.log)

Polygon
import { polygon } from 'usdc'

polygon({ address: process.env.polygon_usdc_address })
	.then(console.log)

const { txid } = await polygon.sendUSDCPayment({
  mnemonic: process.env.polygon_usdc_mnemonic,
  to: [{
    address: process.env.polygon_usdc_address,
    amount: 1
  }]
})

polygon.checkPaymentStatus({ txid }).then(console.log)

Hedera
import { hedera } from 'usdc'

hedera({ address: process.env.hedera_usdc_address })
	.then(console.log)

const { txid } = await hedera.sendUSDCPayment({
  mnemonic: process.env.hedera_usdc_mnemonic,
  to: [{
    address: process.env.hedera_usdc_address,
    amount: 1
  }]
})

hedera.checkPaymentStatus({ txid }).then(console.log)

Avalanche
import { avalanche } from 'usdc'

avalanche({ address: process.env.avalanche_usdc_address })
	.then(console.log)

const { txid } = await avalanche.sendUSDCPayment({
  mnemonic: process.env.avalanche_usdc_mnemonic,
  to: [{
    address: process.env.avalanche_usdc_address,
    amount: 1
  }]
})

avalanche.checkPaymentStatus({ txid }).then(console.log)

Solana
import { solana } from 'usdc'

solana({ address: process.env.solana_usdc_address })
	.then(console.log)

const { txid } = await solana.sendUSDCPayment({
  mnemonic: process.env.solana_usdc_mnemonic,
  to: [{
    address: process.env.solana_usdc_address,
    amount: 1
  }]
})

solana.checkPaymentStatus({ txid }).then(console.log)

Tron
import { tron } from 'usdc'

tron({ address: process.env.tron_usdc_address })
	.then(console.log)

const { txid } = await tron.sendUSDCPayment({
  mnemonic: process.env.tron_usdc_mnemonic,
  to: [{
    address: process.env.tron_usdc_address,
    amount: 1
  }]
})

tron.checkPaymentStatus({ txid }).then(console.log)

Flow
import { flow } from 'usdc'

flow({ address: process.env.flow_usdc_address })
	.then(console.log)

const { txid } = await flow.sendUSDCPayment({
  mnemonic: process.env.flow_usdc_mnemonic,
  to: [{
    address: process.env.flow_usdc_address,
    amount: 1
  }]
})

flow.checkPaymentStatus({ txid }).then(console.log)

Algorand
import { algorand } from 'usdc'

algorand({ address: process.env.algorand_usdc_address })
	.then(console.log)

const { txid } = await algorand.sendUSDCPayment({
  mnemonic: process.env.algorand_usdc_mnemonic,
  to: [{
    address: process.env.algorand_usdc_address,
    amount: 1
  }]
})

algorand.checkPaymentStatus({ txid }).then(console.log)

FAQs

Package last updated on 17 Apr 2023

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