@erudite-intelligence/x402-doge
v1.0.0
Published
x402 Payment Protocol V2 - Dogecoin Network Plugin. UTXO-based DOGE payments for AI agents and web services.
Maintainers
Readme
@erudite-intelligence/x402-doge
x402 Payment Protocol V2 — Dogecoin Plugin
The first x402 implementation for Dogecoin. P2PKH-based DOGE payments for AI agents and web services.
Published by Erudite Intelligence LLC under the @erudite-intelligence npm org.
Overview
This package implements the exact payment scheme for the x402 protocol on Dogecoin. Dogecoin is a Bitcoin fork that does not support SegWit, so payments use P2PKH (legacy) addresses and raw signed transactions.
Network: Dogecoin (DOGE)
Scheme: exact
CAIP-2: bip122:1a91e3dace36e2be3bf030a65679fe8 (mainnet)
Unit: koinu (1 DOGE = 100,000,000 koinu)
Address format: P2PKH (D... addresses only)
Install
npm install @erudite-intelligence/x402-dogeUsage
Client (Payer)
const { createPayment } = require("@erudite-intelligence/x402-doge");
const payload = await createPayment(
{
scheme: "exact",
network: "bip122:1a91e3dace36e2be3bf030a65679fe8",
amount: "100000000", // 1 DOGE in koinu
asset: "DOGE",
payTo: "DMerchantAddress...",
maxTimeoutSeconds: 120,
},
{
privateKey: "your-wif-or-hex-private-key",
utxos: [
{
txid: "abc123...",
vout: 0,
value: 500000000, // 5 DOGE in koinu
scriptPubKey: "76a914..." // P2PKH script hex (required for signing)
}
],
}
);Important: Unlike SegWit (Litecoin/Bitcoin), Dogecoin P2PKH signing requires the
scriptPubKeyhex of each UTXO. Your wallet/UTXO provider must supply this.
Server (Facilitator)
const { verifyPayment, settlePayment } = require("@erudite-intelligence/x402-doge");
const result = await verifyPayment(
paymentPayload,
expectedPayTo,
expectedAmount,
expectedNetwork
);
if (result.isValid) {
const settlement = await settlePayment(paymentPayload, expectedNetwork);
}Dogecoin-Specific Notes
- No SegWit support — all addresses are
D...(P2PKH) - Block time ~1 minute
- Transaction version 1 (not 2)
- Default fee rate: 100 koinu/vB
- API: chain.so (primary) + blockcypher (fallback)
Related Packages
@erudite-intelligence/x402-btc— Bitcoin@erudite-intelligence/x402-ltc— Litecoin@erudite-intelligence/x402-xrp— XRP Ledger@erudite-intelligence/x402-tron-v2— Tron USDT@erudite-intelligence/x402-kaspa— Kaspa
Erudite Intelligence LLC — Building the x402 ecosystem beyond EVM and Solana.
