Hello, lumenauts, Astrograph team here!
We've got a couple of updates for you today
Protocol 13 support
First of all, Astrograph and Astrologer support Stellar protocol 13 now. Fee bump probably is the most exciting feature, and here is how we deal with it. We decided to serve fee bumps as a regular transactions, but with an additional new feeAccount
attribute. Fees are also taken from fee bump, not from the inner transaction. You can run the next query on testnet.astrograph.io to get a fee bump transaction (here's Horizon response for the reference):
{
transaction(id: "427ddcd4aabe3f7bce23f827d66fe1bbe546178edaa5edca44a34df4096f083a") {
sourceAccount { id }
feeAccount { id }
ledger {
seq
}
feeAmount
feeCharged
operations(first: 5) {
nodes {
type
... on PaymentOperation {
amount
asset { code }
sourceAccount { id }
destination { id }
}
}
}
}
}
Sending transactions
You can now submit transactions via Astrograph, using GraphQL mutation. Astrograph accepts base64-encoded envelopes, and you can build them using an SDK of your choice or Stellar Laboratory. Note that unlike Horizon, Astrograph submits a transaction directly to the stellar-core, which handles it asynchronously. So a transaction may not be included in a ledger immediately after the mutation is executed. To leverage this feature we implemented transactions subscription, which we overlooked for unknown reason 🙂 Here is how GraphQL queries look like:
mutation submitTx {
submitTransaction(envelopeBase64: <base64-encoded-txe>) {
status
hash
error
}
}
subscription waitForTx {
transactions(id: <tx-hash>) {
ledger {
seq
}
}
}
So the subscription will return you any data you need as soon as your transaction makes it to the ledger. GraphQL magic ✨
That's all for now! Any feedback is welcome.
If you have any questions or issues, we have the public Keybase chat, dedicated to Astrograph. Shoot a message there or file an issue on the Github