Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

213
Vistas
No se puede enviar Ripple (Cryptocurrency Coin - XRP) a Wallet

Estoy tratando de usar el siguiente código para enviar ripple (Cryptocurrency Coin) - XRP a otra dirección, pero recibo el siguiente error:

"Error no detectado (en promesa): la URL del grifo no está definida o no se puede inferir".

Incluida la siguiente referencia JS en el archivo HTML,

script src="https://unpkg.com/xrpl@2.0.0/build/xrpl-latest-min.js" script type="aplicación/javascript" src="enviar-xrp.js"

¿¿¿Qué me estoy perdiendo???

enviar-xrp.js ===========

 // Dependencies for Node.js. // In browsers, use a <script> tag instead. if (typeof module !== "undefined") { // Use var here because const/let are block-scoped to the if statement. var xrpl = require('xrpl') } // Example credentials const wallet = xrpl.Wallet.fromSeed("I ENTERED MY SECRET KEY HERE") console.log(wallet.address) // Connect ------------------------------------------------------------------- async function main() { console.log("Connecting to Testnet... I CHANGED BELOW TO PRODUCTION NETWORK") const client = new xrpl.Client('wss://xrplcluster.com') await client.connect() // Get credentials from the Testnet Faucet ----------------------------------- console.log("Getting a wallet from the Testnet faucet...") const {wallet, balance} = await client.fundWallet() // Prepare transaction ------------------------------------------------------- const prepared = await client.autofill({ "TransactionType": "Payment", "Account": wallet.address, "Amount": xrpl.xrpToDrops("35"), "Destination": "ENTERED MY DESTINATION KEY HERE" }) const max_ledger = prepared.LastLedgerSequence console.log("Prepared transaction instructions:", prepared) console.log("Transaction cost:", xrpl.dropsToXrp(prepared.Fee), "XRP") console.log("Transaction expires after ledger:", max_ledger) // Sign prepared instructions ------------------------------------------------ const signed = wallet.sign(prepared) console.log("Identifying hash:", signed.hash) console.log("Signed blob:", signed.tx_blob) // Submit signed blob -------------------------------------------------------- const tx = await client.submitAndWait(signed.tx_blob) // Wait for validation ------------------------------------------------------- // submitAndWait() handles this automatically, but it can take 4-7s. // Check transaction results ------------------------------------------------- console.log("Transaction result:", tx.result.meta.TransactionResult) console.log("Balance changes:", JSON.stringify(xrpl.getBalanceChanges(tx.result.meta), null, 2)) // End of main() client.disconnect() } main()
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

La "Clave secreta" o privateKey es para firmar que es un animal diferente a la seed . Además, parece que se está conectando a Mainnet, no a Testnet, intente:

 const wallet = xrpl.Wallet.fromSeed(seed) const client = new xrpl.Client(`wss://s.altnet.rippletest.net:51233`)
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda