So using docker I started a private Stellar Network by typing in the below command:

docker run --rm -it -p "8000:8000" --name stellar stellar/quickstart --standalone

Then I opened another terminal and ran the below command to interact with the private network:

docker exec -it stellar /bin/bash

Then I ran the below command to generate a keypair:

stellar-core --genseed

All commands went well. How do I do a transaction now? My objective is to get 333 coins in one of the accounts.

Can I do it from the 2nd terminal, and what would be the syntax of the tx command?


A copy of my reply from stackoverflow:

After you have executed the steps in your question, stellar will be open to receiving transactions at localhost:8000/tx?blob=Base64 (See commands). You can confirm stellar is running with curl localhost:8000.

The base64 blob is the the XDR encoded form of a transaction. In your case you will want that transaction to contain a CreateAccount operation.

It is possible to build this XDR for custom networks with some of the SDKs. It's possible in the Scala SDK (I'm the maintainer) and probably very easy to do in the JavaScript SDK too. But to start with, I suggest building XDR by hand by going to the lab's transaction builder, selecting "custom" network at the top right and building your transaction from there.

You want to populate the network passphrase with Standalone Network ; February 2017. This is the value in the container's file stellar-core.cfg.

Thanks for the help! So I am running a Windows machine, and to execute the above I am using an Amazon EC2 cloud instance and connecting with it using puTTy. So, I cannot use local host on my own operating system. So in the below example: var StellarSdk = require('stellar-sdk') var server = new StellarSdk.Server('horizon-testnet.stellar.org'); Can use the IP address of the VM instead of the URL horizon-testnet.stellar.org. If the answer to the above question is 'Yes', how should I enter the IP, which format will it be in, should I also specify the port like 8000?

Yes. The port will be 8000, as you defined -p "8000:8000" when starting the docker container. The ip address will be the address of the ec2 instance (name or number is fine), but you would need to define a security group that allows inbound TCP on port 8000.

  • 1
    As an alternative to the the stellar lab transaction builder, if you prefer a standalone non-web based solution, you can use the stellar transaction compiler: github.com/xdrpp/stc (You have to create files in $HOME/.config/stc/networks/mynetwork/ called horizon and network_id for your horizon URL and network id, respectively.) Aug 27 '18 at 4:07

To interact with stellar network or to make any transactions, Stellar horizon server is used, You can make API calls to horizon server for any transactions you wanna perform. Below is the link to Javascript SDK. Stellar Javascript sdk

Your Answer

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

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