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

@anypay/wallet

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anypay/wallet

``` import { Card, Cards, Balance, Transaction, Confirmation } from '@anypay/wallet'

latest
npmnpm
Version
0.0.3
Version published
Maintainers
2
Created
Source
import { Card, Cards, Balance, Transaction, Confirmation } from '@anypay/wallet'

let card: Card = new Cards.USDC_MATIC() // auto-detects either 'browser' or 'nodejs'

// or be explicit about whether you are in the browser or nodejs
let card: Card = new Cards.USDC_MATIC({ provider: 'browser' })

let balance: Balance = await getBalance(wallet)

// a card may be loaded directly given the 12 word backup seed phrase as mnemonic
card = new cards.USDC_MATIC({ mnemonic: process.env.polygon_seed_phrase })

let transaction: Transaction = await card.buildSignedTransaction({
  data: {
    address: '',
    value:  
  }
})

console.log(`here you have the signed transaction in full detail: ${transaction.txhex}`)

await transaction.broadcast()

console.log(`view your transaction here: https://polygonscan.com/tx/${transaction.txid}`)

const confirmation: Confirmation = await transaction.confirm()

FAQs

Package last updated on 26 May 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