@coin-voyage/vue

CoinVoyage PayKit and SwapKit components for Vue 3 and Nuxt.
Install
npm install @coin-voyage/vue
Latest Version:0.1.0
Vue:3
License:BSD-2-Clause license
Last Updated:Oct 5, 2026
Links: npm
Maintainer: coinvoyage

@coin-voyage/vue

CoinVoyage PayKit and SwapKit components for Vue 3 and Nuxt.

The components wrap @coin-voyage/embed, the framework-agnostic CoinVoyage runtime. It ships with its own wallet providers, so your app needs no React, wagmi or wallet adapter setup.

Installation

npm install @coin-voyage/vue

Requires Vue 3.3 or later.

Pay button

Pass either an existing orderId or deposit parameters.

<script setup lang="ts">
import { CoinVoyagePay } from "@coin-voyage/vue"

function onComplete(event: unknown) {
  // Display only. Verify the payment on your server before fulfilling an order.
}
</script>

<template>
  <CoinVoyagePay
    api-key="YOUR_PUBLIC_API_KEY"
    wallet-connect-project-id="YOUR_WALLETCONNECT_PROJECT_ID"
    :deposit="{ toChain: 8453, toAmount: 25, toAddress: '0x...' }"
    button-text="Donate now"
    mode="dark"
    @complete="onComplete"
    @error="console.error"
  />
</template>

SALE orders must be created by a trusted backend, for example with ApiClient from @coin-voyage/paykit/server, and passed in as order-id. Never put a signing secret in browser code.

Swap widget

<script setup lang="ts">
import { CoinVoyageSwap } from "@coin-voyage/vue"
</script>

<template>
  <CoinVoyageSwap
    api-key="YOUR_PUBLIC_API_KEY"
    :default-source-currency="{ chain_id: 1 }"
    :default-slippage-bps="50"
    :appearance="{ accent: '#d6296f', accentHover: '#b8225f', accentText: '#ffffff' }"
  />
</template>

Props

Both components:

Prop Type Notes
apiKey string Required. Public API key.
mode "light" | "dark" | "auto" Defaults to auto.
walletConnectProjectId string Enables WalletConnect.
appearance Appearance accent, accentHover, accentText, background, surface, text, radius.

CoinVoyagePay:

Prop Type Notes
orderId string Existing order. Use this or deposit.
deposit Deposit { toChain, toToken?, toAmount, toAddress }.
buttonText string Defaults to Pay.
defaultOpen boolean Opens the payment modal on mount.
cardPayments boolean Defaults to true.
customTheme PayTheme PayKit theme variables.

CoinVoyageSwap:

Prop Type Notes
defaultSourceCurrency Currency { chain_id, address? }.
defaultDestinationCurrency Currency { chain_id, address? }.
defaultSlippageBps number 0-10000.
theme SwapTheme SwapKit theme.

Changing any prop remounts the widget, which resets an in-progress payment. Keep props stable while a payment is open.

Events

Event Emitted when
complete A payment or swap completed.
error The widget failed, the configuration is invalid, or loading failed.
open The payment modal opened (CoinVoyagePay only).
close The payment modal closed (CoinVoyagePay only).

Events are UI notifications, not proof of payment. Merchant fulfillment requires server-side verification.

Nuxt and SSR

The runtime is imported in the browser only, after the component mounts. On the server the components render an empty <div>, so no <ClientOnly> wrapper is needed.

Composable

useCoinVoyage mounts a widget into your own element.

import { ref } from "vue"
import { useCoinVoyage } from "@coin-voyage/vue"

const element = ref<HTMLElement>()
useCoinVoyage(element, () => ({ widget: "swap", apiKey: "YOUR_PUBLIC_API_KEY" }))

Notes

  • Render widgets in the top-level page, not in an iframe. Wallet discovery does not work across frames.
  • Widgets on one page share browser wallet sessions. Avoid running several payments at once.
  • The runtime is large (about 1 MB gzipped). It loads as separate chunks after mount and does not affect your initial bundle.

Related Packages

@alikhalilll/nuxt-crypto

Symmetric Web Crypto service for Nuxt 3/4. AES-256-GCM + PBKDF2 with key caching...

1,675 4
vue-tradingchart

Vue trading view charts

1,494 0
@vue-dapp/nuxt

Vue Dapp Nuxt module

1,363 207
@scayle/storefront-nuxt

Nuxt integration for the SCAYLE Commerce Engine and Storefront API

152,903
nuxt-tsconfig-stub

Stub Nuxt's generated tsconfig.json at installation

70,835 24

Version History

Version Released Vue License
0.1.0 ^3.3.0 BSD-2-Clause license