-
-
Notifications
You must be signed in to change notification settings - Fork 262
Implement Stellar support #127
Comments
@szymonlesisz - Hello, any chance you've had some time to write up some instructions or should I wait until the next version of the firmware is officially released to implement this? |
hi @zulucrypto, |
That's great @szymonlesisz , thanks! |
@szymonlesisz - It looks like many of the messages are changing to use a string for the addresses instead of raw bytes: trezor/trezor-common#135 I'm guessing this will change your implementation a bit, could you let me know if that's the case? |
Sure, if anything change i will let you know. |
@szymonlesisz it's not 2 different types, it's the same type, just a filter when fetching transaction history. |
I've just wrote a proposition of types for Stellar Transaction object. Few fields are named differently comparing to Trezor protobuf messages that's why needs to be mapped inside trezor-connect. I've wrote a comments for each field with corresponding protobuf field value. I've merged "LedgerRecord" and "TransactionRecord" into one "Transaction" type but i have few unknown fields in there: Transaction: timebounds_start: number, // IDK this field from stellar API? Is it from "TransactionRecord" "created_at"? timebounds_end: number, // IDK this field from stellar API ? memo: string; // Stellar API has only "memo_text" type? Because in protobuf i can declare "memo_type", "memo_id", "memo_id" and "memo_text" max_fee: number; // from "TransactionRecord"? When we solve this we can discuss unknown/missing fields in Operations. Please let me know what you think about it |
@szymonlesisz have you seen my comment above? You're looking at the wrong class TransactionRecord and LedgerRecord are not relevant, they are used to fetch transactions from history. It has sequence, timebounds, memo (defined here), fee |
@s-a-y, sorry my bad, somehow i've missed that. so final call for signing transaction will look like: TrezorConnect.stellarSignTransaction({ Now i'm left with only one issue:
any thoughts? |
Those two were discussed here: trezor/trezor-core#202 (comment) |
@szymonlesisz "signer type" will be one of these constants:
Some background is available here: https://www.stellar.org/developers/guides/concepts/multi-sig.html#additional-signing-keys |
Hey, any update? Anything I can help with? |
Hi @szymonlesisz - is there anything you're waiting on me for or anything I can help with? |
Hi @zulucrypto, It's already implemented in version 5: https://github.com/trezor/connect/blob/develop/docs/methods/stellarGetAddress.md you can give it a try here: https://trezor.github.io/connect-explorer/#/stellar-getaddress or |
@szymonlesisz - Great news! One minor issue that I noticed is that the I'll give it a closer look as soon as I can, thanks for getting it together! |
Hi @szymonlesisz - I just tried it out with the latest firmware from master and "get address" works great! I did get an error when trying to submit a transaction:
I'm guessing this is because The addresses were also changed to be strings instead of the raw bytes, so you may need to update the code to directly pass them instead of using base64. As an example: Before
After
Thanks again for working on this! |
fixed in 5.0.30 |
Looks like it's working now! I'll be traveling over the next couple weeks, but I'll start on integrating this with Stellar's account viewer in early September and let you know if I run into anything. |
I've also removed StellarGetPublicKey message. I think i can close this issue now since everything is working correctly |
Hi @szymonlesisz - I'm working on integrating this with Stellar's account viewer by importing https://connect.trezor.io/5/trezor-connect.js and building a custom firmware. When I try to call I'm getting the same error when I try using the connect explorer: https://trezor.github.io/connect-explorer/#/stellar-getaddress |
You need to set the firmware version to 1.7.0 for T1 (or use branch next
from trezor-mcu) or 2.0.8 for T2 (or use master from trezor-core).
|
@prusnak - Thanks for the quick response! https://wallet.trezor.io reports that the device is running firmware 1.7.0 after I build the emulator with However, I'm still getting the same error. I dug through the code a little and saw this in the trezor connect source:
I've tried building trezor connect and connect-explorer locally to see if changing this parameter fixes anything, but I haven't had any luck getting them to talk to each other, so I want to double check with you that it's expected to work with |
Hi @zulucrypto , |
Can we have back |
@vlddm Just use GetPublicKey |
Thx, it works, but I bumped into another issue: looks like trezor using hardened path for stellar accounts, like Also seems like trezor does not support custom paths like Any ideas how can I use public keys for Stellar address deriving? |
@vlddm You are right. Please check this document: https://github.com/trezor/trezor-firmware/blob/master/docs/misc/coins-bip44-paths.md - you are supposed to use |
Stellar has an Account Viewer, which is basically a very thin web wallet, which supports Ledger. It's a great place to implement Trezor Connect to add Trezor support.
@szymonlesisz - @zulucrypto would like to implement this. Do you think you could provide him with some high-level instructions what has to be done to make this happen?
The text was updated successfully, but these errors were encountered: