0

ı create public key with stellar sdk with node js;

StellarSdk.Networks.TESTNET; const server = new StellarSdk.Server('http://10.5.0.6:8000',{allowHttp:true}); //const server = new StellarSdk.Server('https://horizon-testnet.stellar.org');

var pair=StellarSdk.Keypair.random();

console.log("Public:"+pair.publicKey()+"\n"); console.log("Private:"+pair.secret()+"\n"); console.log("Encode:"+encodeURIComponent(pair.publicKey())+"\n") CreateAccountFunc(pair.publicKey());

async function CreateAccountFunc(pubkey) { try { const response = await fetch( https://friendbot.stellar.org?addr=${encodeURIComponent(pubkey)} ); const responseJSON = await response.json(); console.log("SUCCESS! yeni hesap oluştu \n", responseJSON); const account=await server.loadAccount(pubkey); console.log("aaaaa "+JSON.stringify(account));

But when ı send request: http://10.5.0.6:8000/accounts/GDIENGIXEVPRMXIN4ZQAGQ7CQV24OU5N37QWRHSU56ZHQ6DMZXOOZQWH

My response:

{ "type": "https://stellar.org/horizon-errors/not_found", "title": "Resource Missing", "status": 404, "detail": "The resource at the url requested was not found. This usually occurs for one of two reasons: The url requested is not valid, or no data in our database could be found with the parameters provided." }

what can I do help me please.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.