简体   繁体   English

如何在私有恒星区块链网络中进行交易?

[英]How to do a transaction in a Private Stellar Blockchain Network?

So using docker I started a private Stellar Network by typing in the below command: 因此,我使用docker通过输入以下命令来启动一个私有的Stellar网络:
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. 我的目标是在其中一个帐户中获得333个硬币。

Stellar has a dedicated stackexchange where questions on Stellar will get more attention. Stellar具有专用的stackexchange ,有关Stellar的问题将得到更多关注。

After you have executed the steps in your question, stellar will be open to receiving transactions at localhost:8000/tx?blob=Base64 (See commands ). 执行完问题中的步骤后,stellar将在localhost:8000/tx?blob=Base64处接受交易(请参见命令 )。 You can confirm stellar is running with curl localhost:8000 . 您可以确认stellar正在使用curl localhost:8000运行。

The base64 blob is the the XDR encoded form of a transaction. base64 blob是事务的XDR编码形式。 In your case you will want that transaction to contain a CreateAccount operation. 在您的情况下,您将希望该事务包含一个CreateAccount操作。

It is possible to build this XDR for custom networks with some of the SDKs. 可以使用某些SDK为自定义网络构建此XDR。 It's possible in the Scala SDK (I'm the maintainer) and probably very easy to do in the JavaScript SDK too. 在Scala SDK(我是维护者)中有可能,而且在JavaScript SDK中也很容易做到。 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. 但是,首先,我建议通过去实验室的事务构建器手工构建XDR,在右上角选择“自定义”网络,然后从那里构建事务。

You want to populate the network passphrase with Standalone Network ; February 2017 您想用Standalone Network ; February 2017填充网络密码Standalone Network ; February 2017 Standalone Network ; February 2017 . Standalone Network ; February 2017 This is the value in the container's file stellar-core.cfg . 这是容器文件stellar-core.cfg

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM