So I am trying to do a transaction in the private network, I have named it standalone, I am using SSL. I started the network using docker, then created a keypair, then in another terminal ran node to use javascript, below is my code:

var StellarSdk = require('stellar-sdk');

var server = new StellarSdk.Server('https://localhost:8000/tx?blob=Base64');

var kp = StellarSdk.Keypair.fromRawEd25519Seed(StellarSdk.hash("Standalone Network ; February 2017"))

var sourcePublicKey = kp.publicKey();



.then(function(account) {
   var transaction = new StellarSdk.TransactionBuilder(account)
        destination: receiverPublicKey,
        asset: StellarSdk.Asset.native(),
        amount: '350.1234567',
     {console.log(JSON.stringify(transactionResult, null, 2));
      console.log('\nSuccess! View the transaction at: ');
   .catch(function(err) {
      console.log('An error has occured:');

After running the above lines of code, I get a result:

Promise {
   Domain {
     domain: null,
     _events: { error: [Function: debugDomainError] },
     _eventsCount: 1,
     _maxListeners: undefined,
     members: [] } }

Error: Error: write EPROTO 139644081280832:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:827:

    at _handleNetworkError (/home/ec2-user/node_modules/stellar-sdk/lib/call_builder.js:273:31)
    at <anonymous>

P.S.: I have modified the Network.js file inside the node_modules folder and added a new passphrase for the standalone network and then modified the useTestNetwork Function to use the standalone network passphrase, not the testnetwork passphrase. Please let me know, what changes do I have to make in order to make this work.

1 Answer 1


Your var server = new StellarSdk.Server('https://localhost:8000/tx?blob=Base64'); is wrong, and should point at the server, not a specific endpoint.

  • I tried localhost:8000, still got the below response: Promise { <pending>, domain: Domain { domain: null, _events: { error: [Function: debugDomainError] }, _eventsCount: 1, _maxListeners: undefined, members: [] } } > Error: Error: write EPROTO 140423567779648:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:827: at _handleNetworkError (/home/ec2-user/node_modules/stellar-sdk/lib/call_builder.js:273:31) at <anonymous>
    – Deb
    Sep 10, 2018 at 11:04
  • 1
    The error was because of SSL certificate, I used var server = new StellarSdk.Server('', {allowHttp: true}); and that error got resolved.
    – Deb
    Sep 10, 2018 at 20:07
  • "{allowHttp: true}" helps, which let u try the functionality with HTTP. Try HTTPS later after things work.
    – cesarm
    Sep 12, 2018 at 1:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.