Skip to content

Commit

Permalink
add json-rps stellar
Browse files Browse the repository at this point in the history
  • Loading branch information
shiny-mountain committed Aug 11, 2021
1 parent a97c4b0 commit 6d886a4
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
- [Ethereum](json-rpc/ethereum.md)
- [Cosmos](json-rpc/cosmos.md)
- [Polkadot](json-rpc/polkadot.md)
- [Stellar](json-rpc/stellar.md)
- [Client API Reference](client-api.md)
- [Relay Server API Reference](relay-server.md)
43 changes: 43 additions & 0 deletions json-rpc/stellar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
description: Stellar JSON-RPC Methods
---

# Stellar

## stellar_signAndSubmitXDR

This method sends the Stellar transaction encoded as [XDR](https://developers.stellar.org/api/introduction/xdr/) to the wallet. The wallet is expected to sign the transaction and submit it to the Stellar network. For accounts protected with [multisig](https://developers.stellar.org/docs/glossary/multisig/), the wallet should also handle the collection of signatures and submission of the transaction at a later time.
The method returns the transaction status: `success` - if the transaction was successfully confirmed in the Stellar network, `pending` - if the transaction requires additional signatures

### Parameters

1. `Object` - Signing parameters:
1.1. `xdr` : `STRING` - stellar transaction encoded as XDR

### Returns

1. `Object` - Signing parameters:
1.1. `status` : `success` or `pending`

### Example

```javascript
// Request
{
"id": 1,
"jsonrpc": "2.0",
"method": "stellar_signAndSubmitXDR",
"params": {
"xdr": "AAAAAPewD+/6X8o0bx3bp49Wf+mUhG3o+TUrcjcst717DWJVAAAAyAFvzscADTkNAAAAAAAAAAAAAAACAAAAAAAAAAYAAAACWE1BVEsAAAAAAAAAAAAAAAPvNOuztX4IjvV8pztsEc1/ZnTz0G3p5Cx4vcf04+xUAAONfqTGgAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAD2NyeXB0b21hcmluZS5ldQAAAAAAAAAAAAAAAAF7DWJVAAAAQK3vfUCZ8mbjW3ssMd0n1tJTF9Fv6EbuJ6cWKkYXBqG5itqanPbFzIQoZEHbPS8nr2vo4dROvKI0uQzNcfExKwM="
}
}

// Result
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"status": "success"
}
}
```

0 comments on commit 6d886a4

Please sign in to comment.