revise per Rome feedback

This commit is contained in:
Ryan G. Young
2021-04-07 13:36:09 -07:00
parent 4e42b2cac6
commit e55744a624
2 changed files with 14 additions and 24 deletions

View File

@@ -1,14 +1,14 @@
# Define signer address # Define signer address
import os import os
my_secret = os.getenv("MY_SECRET") my_secret = os.getenv("MYSECRET")
from xrpl.wallet import Wallet from xrpl.wallet import Wallet
wallet = Wallet(seed="MY_SECRET") wallet = Wallet(seed="MYSECRET", sequence=16237283)
print(wallet.classic_address) # "raaFKKmgf6CRZttTVABeTcsqzRQ51bNR6Q" print(wallet.classic_address) # "raaFKKmgf6CRZttTVABeTcsqzRQ51bNR6Q"
from xrpl.models.transactions import Payment from xrpl.models.transactions import Payment
from xrpl.utils import xrp_to_drops from xrpl.utils import xrp_to_drops
my_payment = Payment( my_payment = Payment(
account=test_wallet_1.classic_address, account=wallet.classic_address,
amount=xrp_to_drops(22), amount=xrp_to_drops(22),
fee="10", fee="10",
destination="rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe", destination="rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
@@ -18,5 +18,5 @@ print("Payment object:", my_payment)
# Sign transaction ------------------------------------------------------------- # Sign transaction -------------------------------------------------------------
import xrpl.transaction import xrpl.transaction
signed = xrpl.transaction.safe_sign_transaction(my_payment, test_wallet_1) signed = xrpl.transaction.safe_sign_transaction(my_payment, wallet)
print("Signed transaction blob:", signed) print("Signed transaction blob:", signed)

View File

@@ -64,19 +64,13 @@ As always, follow industry-standard practices for securing your machines, such a
This configuration uses a client library in the programming language you are using to sign transactions locally. You need a client library for the programming language you use. The following client libraries can sign transactions for the XRP Ledger locally: This configuration uses a client library in the programming language you are using to sign transactions locally. You need a client library for the programming language you use. The following client libraries can sign transactions for the XRP Ledger locally:
- **Python** | Language | Library Name | Get Started | API Reference | Source Code |
- `xrpl-py` |----------|--------------|-------------|---------------|-------------|
- [Repo](https://github.com/XRPLF/xrpl-py) | **Python** | `xrpl-py` | [Get Started](get-started-using-python.html) | [API Reference](https://xrpl-py.readthedocs.io/) | [Repo](https://github.com/XRPLF/xrpl-py) |
- [Get Started](get-started-using-python.html) | **JavaScript** / **TypeScript** | `ripple-lib` | [Get Started](get-started-with-rippleapi-for-javascript.html) | [API Reference](rippleapi-reference.html) | [Repo](https://github.com/ripple/ripple-lib) |
- [API Reference](https://xrpl-py.readthedocs.io/en/latest/) | **C++** | `rippled` Signing Library | [Get Started](https://github.com/ripple/rippled/tree/develop/Builds/linux#signing-library) | | (Part of [`rippled`](https://github.com/ripple/rippled/)) |
- **JavaScript** | **Java** | `xrpl4j` | [README](https://github.com/XRPLF/xrpl4j#readme) | [API Reference](https://github.com/XRPLF/xrpl4j/tree/main/xrpl4j-integration-tests) | [Repo](https://github.com/XRPLF/xrpl4j) |
- `ripple-lib`
- [Repo](https://github.com/ripple/ripple-lib)
- [Get Started](get-started-with-rippleapi-for-javascript.html)
- [API Reference](rippleapi-reference.html)
- **C++** (included with `rippled`)
- `rippled` Signing Library
- [Get Started](https://github.com/ripple/rippled/tree/develop/Builds/linux#signing-library)
### Security Best Practices for Signing Libraries ### Security Best Practices for Signing Libraries
@@ -95,15 +89,11 @@ To optimize the security of your signing library:
### Local Signing Example ### Local Signing Example
Here are examples of how to sign transaction instructions locally using the following languages: Here are examples of how to sign transaction instructions locally using the following languages and libraries:
* JavaScript * **JavaScript** / **TypeScript** - [`ripple-lib`](https://github.com/ripple/ripple-lib)
[`ripple-lib`](https://github.com/ripple/ripple-lib) * **Python** - [`xrpl-py`](https://github.com/XRPLF/xrpl-py)
* Python
[`xrpl-py`](https://github.com/XRPLF/xrpl-py)
<!-- MULTICODE_BLOCK_START --> <!-- MULTICODE_BLOCK_START -->