Last active
December 27, 2015 17:09
-
-
Save justmoon/7359988 to your computer and use it in GitHub Desktop.
Ripple: Example federated bridge dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User enters: [email protected] | |
// https://bitcoin.example.com/ripple.txt | |
[federation_url] | |
https://alipay.ripple.com/alipaybridge | |
// https://bitcoin.example.com/bridge?type=federation&domain=bitcoin.example.com&destination=1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW | |
{ | |
"result":"success", | |
"federation_json":{ | |
"currencies":[ | |
{ | |
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q", | |
"currency": "BTC" | |
} | |
], | |
"domain": "bitcoin.example.com", | |
"type": "federation_record", | |
"quote_url": "https://bitcoin.example.com/bridge", | |
"destination": "1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW" | |
} | |
} | |
// https://bitcoin.example.com/bridge?type=quote&amount=1%2FBTC&destination=1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW | |
{ | |
"timestamp": 1383850388, | |
"quote": { | |
// recommended: dt should be the same for all bridge transactions | |
"destination_tag": 2147483647, | |
// invoice id can be whatever you like | |
"invoice_id": "53b9d13866be28519870e699177080f614ded7f124c2662304e4054c2cbc90a9", | |
"send": [ | |
{ | |
"issuer":"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q", | |
"value":"1.0", | |
"currency":"BTC" | |
} | |
], | |
"address": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q", | |
"expires": 1383853988 | |
}, | |
"result": "success" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment