Socket
Socket
Sign inDemoInstall

@anypay/wallet

Package Overview
Dependencies
3
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @anypay/wallet

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


Version published
Maintainers
2
Created

Readme

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

Last updated on 26 May 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc