add python example for secure signing

This commit is contained in:
Ryan G. Young
2021-03-28 23:15:07 -07:00
parent 7001b01ff0
commit 701a95ca53
2 changed files with 50 additions and 2 deletions

View File

@@ -74,14 +74,27 @@ If you use a client library not published by Ripple, make sure it uses proper, s
For best security, be sure to keep your client library updated to the latest stable version.
### Example Local Signing with RippleAPI
### Local Signing Example
The following code sample shows how to sign transaction instructions locally with RippleAPI for JavaScript:
The following code sample shows how to sign transaction instructions locally with [`ripple-lib`](https://github.com/ripple/ripple-lib) for JavaScript and [`xrpl-py`](https://github.com/XRPLF/xrpl-py) for Python:
<!-- MULTICODE_BLOCK_START -->
*JavaScript*
```js
{% include '_code-samples/secure-signing/js/signPayment.js' %}
```
*Python*
```py
{% include '_code-samples/secure-signing/py/sign-payment.py' %}
```
<!-- MULTICODE_BLOCK_END -->
For greater security, you can load your secret keys from a management tool such as [Vault](https://www.vaultproject.io/).
@@ -117,6 +130,7 @@ To use this configuration, follow the steps for [running `rippled` on a private
- [sign method][]
- [submit method][]
- [RippleAPI Reference](rippleapi-reference.html)
- [xrpl-py Reference](https://xrpl-py.readthedocs.io/en/latest/index.html)