1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-03 04:58:25 +00:00
trezor-firmware/core/src/apps/ripple
matejcik e629a72c3a refactor(core): move app registrations to a single handler function
apps.webauthn.boot() does not need an if-condition because it's only
called from session.py when the usb interface is enabled

This means that they do not need to be stored in RAM at all. The obvious
drawback is that we need to hand-edit the if/elif sequence, but we don't
register new handlers all that often so 🤷
2021-05-06 13:14:21 +02:00
..
__init__.py refactor(core): move app registrations to a single handler function 2021-05-06 13:14:21 +02:00
base58_ripple.py MONOREPO CREATE FROM trezor-core 2019-04-15 19:14:40 +02:00
get_address.py refactor(core): turn show_address, show_pubkey, show_xpub into layouts 2021-02-10 13:57:19 +01:00
helpers.py style(core): use PEP515 Underscores in Numeric Literals 2020-11-23 14:30:16 +01:00
layout.py refactor(core): model-dependent UI component directories 2021-02-10 13:57:19 +01:00
README.md MONOREPO CREATE FROM trezor-core 2019-04-15 19:14:40 +02:00
serialize.py style(core): use PEP515 Underscores in Numeric Literals 2020-11-23 14:30:16 +01:00
sign_tx.py feat(core): update most apps to use path schemas 2020-11-05 14:30:11 +01:00

Ripple

MAINTAINER = Tomas Susanka tomas.susanka@satoshilabs.com

AUTHOR = Tomas Susanka tomas.susanka@satoshilabs.com

REVIEWER = Jan Pochyla jan.pochyla@satoshilabs.com


Documentation

Ripple's documentation can be found here and on the deprecated wiki.

Transactions

Ripple has different transaction types, see the documentation for the structure and the list of all transaction types. The concept is somewhat similar to Stellar. However, Stellar's transaction is composed of operations, whereas in Ripple each transaction is simply of some transaction type.

We do not support transaction types other than the Payment transaction, which represents the simple "A pays to B" scenario. Other transaction types might be added later on.

We currently sign transactions using ECDSA and the secp256k1 curve same as in Bitcoin. Ripple also supports ed25519, which is currently not supported by Trezor, although the implementation would be quite straightforward.

Non-XRP currencies are not supported. Float and negative amounts are not supported.

Transactions Explorer

Bithomp seems to work fine.

Submitting a transaction

You can use ripple-lib and its submit method to publish a transaction into the Ripple network. Python-trezor returns a serialized signed transaction, which is exactly what you provide as an argument into the submit function.

Serialization format

Ripple uses its own serialization format. In a simple case, the first nibble of a first byte denotes the type and the second nibble the field. The actual data follow.

Our implementation in serialize.py is a simplification of the protocol tailored for the support of the Payment type exclusively.

Tests

Unit tests are located in the tests directory, device tests are in the python-trezor repository.