Open davisdevs opened 6 years ago
Problem: For Stellar, the transaction history will only show the first 10 records. Solution: Add parameters to the request to get more customized transaction history. Ref The cursor does not include itself (in the history returned) [UPDATE 26 OCT] This is not solved yet.
The largest part not done in my development is the integration of hardware wallet.
First, the integration of hardware wallet into Account.js
need to redo. The proposed architecture is to create a separate hardwareNative.js
class (or a more proper name), that holds the hardware-backed accounts (currently Ledger and Trezor); the setAccount
method will set account.nativeAccount
to a hardwareNative
object, which is created prior to it, with fields denoting the brand of the hardware, and the derivation path. It will also include methods like getAddress()
, signTransactions()
, which basically calls respective methods in Trezor.js
and Ledger.js
. And the function calls in Account.js
for hardware-backed accounts are similar to those with Stellar and Ethereum native accounts.
Second, some functions in Account.js
and WalletManager.js
do not support hardware wallet backed accounts, for example, encryption and decryption (because private keys cannot be retrieved and encrypted). There should be a checkHardware()
method to determine if the account is using a hardware native account and handle properly when the method does not support that.
Third, testing for the entire hardware integration is not done, including Trezor.js
and Ledger.js
.
Next, there are some other fixes to do.
jest.setTimeout(99999);
in the testsJSDoc
should be updated.getMultipleAccounts()
in WalletManager.js
contains await
inside loops, which can significantly slow the program.
Simple Summary
A JS API library that provides a consistent interface to manage Ethereum and Stellar accounts through the use of respective blockchain API. Storage of data is not handled by this library.
Motivation
The creation of demos and PoCs will most likely require blockchain account management as accounts will be used to sign transactions (move tokens, smart contracts operations, etc)
The proposed API will accelerate development as it is a single package for developers to interact with Stellar and Ethereum APIs for multichain wallet management. This reduces the overhead to understand multiple APIs to implement blockchain wallet management, a core basic functionality required in any dApp.
In the future, this can be expanded to other blockchains that Rate3 Protocol is supported on.
Key Specifications
Unless otherwise stated, the follow specifications apply to supported blockchains:
Highlighted here are key functionalities that should be supported. Other utility functions are not shown here.
Phase 1: HD Wallet management
Phase 2: Allow for delegated signing
Phase 3: Anchor-Client Bridge (Stellar SEP-0006)
GET /deposit
GET /withdraw
GET /info
GET /transactions
Phase 4 Ethereum-Stellar Bridge (TBD)
Phase 5 Decentralized Trading
Phase 6 Decentralized Identity
References
https://github.com/stellar/stellar-protocol/blob/master/ecosystem https://github.com/stellar/bifrost-js-sdk https://github.com/ethereumjs/ethereumjs-wallet