3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Stellar raw transaction

Last updated at Posted at 2018-08-10

Stellarで、署名済みトランザクションを生成して、別のマシンからトランザクションを送信する方法について。

参考 https://www.stellar.org/developers/horizon/reference/resources/transaction.html

XDR

XDRとは、External Data Representationの略で、別のstellar coreでトランザクションを扱うためのデータ形式。JSONなどではなくバイナリで、stellar SDKにデータ構造の処理が含まれている。

Transactionに、xdrが入っている。

Attribute Type comment
envelope_xdr string A base64 encoded string of the raw TransactionEnvelope xdr struct for this transaction
result_xdr string A base64 encoded string of the raw TransactionResultPair xdr struct for this transaction
result_meta_xdr string A base64 encoded string of the raw TransactionMeta xdr struct for this transaction
fee_meta_xdr string A base64 encoded string of the raw LedgerEntryChanges xdr struct produced by taking fees for this transaction.

Post Transaction

参考 Post Transaction
/transactions
パラメータtxにBase64エンコードしたenvelope_xdrを指定する。(例:"AAAAAO…f4yDBA==")

name loc notes example description
tx body required AAAAAO…f4yDBA== Base64 representation of transaction envelope XDR

Response

Name Type
hash string A hex-encoded hash of the submitted transaction.
ledger number The ledger number that the submitted transaction was included in.
envelope_xdr string A base64 encoded TransactionEnvelope XDR object.
result_xdr string A base64 encoded TransactionResult XDR object.
result_meta_xdr string A base64 encoded TransactionMeta XDR object.
3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?