UNPKG

did-provider-quick

Version:

Veramo plugin that can enable creation and control of did:quick identifiers.

32 lines 992 B
import { ArweaveSigner, TurboFactory, USD, } from "@ardrive/turbo-sdk"; import Arweave from "arweave"; import * as dotenv from "dotenv"; import open from "open"; const arweave = Arweave.init({ host: 'arweave.net', port: 443, protocol: 'https' }); dotenv.config(); (async () => { const jwk = JSON.parse(process.env.ARWEAVE_WALLET_JWK); const address = await arweave.wallets.jwkToAddress(jwk); const signer = new ArweaveSigner(jwk); const turboAuthClient = TurboFactory.authenticated({ privateKey: jwk, }); // const estimatedWinc = await turboAuthClient.getWincForFiat({ // amount: USD(10), // }); const { url } = await turboAuthClient.createCheckoutSession({ amount: USD(10), owner: address, // add a promo code if you have one }); // open the URL to top-up, continue when done console.log("url: ", url); if (url) { open(url); } })(); //# sourceMappingURL=topUpArweaveWallet.js.map