-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #349 from keepkey/mayachain-integration
feat: mayachain integration
- Loading branch information
Showing
18 changed files
with
927 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule device-protocol
updated
4 files
+53 −52 | .circleci/config.yml | |
+85 −0 | messages-mayachain.proto | |
+442 −403 | messages.proto | |
+3 −3 | package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef KEEPKEY_FIRMWARE_MAYACHAIN_H | ||
#define KEEPKEY_FIRMWARE_MAYACHAIN_H | ||
|
||
#include "messages.pb.h" | ||
#include "trezor/crypto/bip32.h" | ||
|
||
#include <stdbool.h> | ||
#include <stdint.h> | ||
|
||
typedef struct _MayachainSignTx MayachainSignTx; | ||
typedef struct _MayachainMsgDeposit MayachainMsgDeposit; | ||
|
||
bool mayachain_signTxInit(const HDNode *_node, const MayachainSignTx *_msg); | ||
bool mayachain_signTxUpdateMsgSend(const uint64_t amount, const char *to_address); | ||
bool mayachain_signTxUpdateMsgDeposit(const MayachainMsgDeposit *depmsg); | ||
bool mayachain_signTxFinalize(uint8_t *public_key, uint8_t *signature); | ||
bool mayachain_signingIsInited(void); | ||
bool mayachain_signingIsFinished(void); | ||
void mayachain_signAbort(void); | ||
const MayachainSignTx *mayachain_getMayachainSignTx(void); | ||
|
||
// Mayachain swap data parse and confirm | ||
// input: | ||
// swapStr - string in mayachain swap format | ||
// size - size of input string (must be <= 256) | ||
// output: | ||
// true if mayachain data parsed and confirmed by user, false otherwise | ||
bool mayachain_parseConfirmMemo(const char *swapStr, size_t size); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
MayachainGetAddress.address_n max_count:10 | ||
|
||
MayachainAddress.address max_size:46 | ||
|
||
MayachainSignTx.address_n max_count:10 | ||
MayachainSignTx.chain_id max_size:32 | ||
MayachainSignTx.memo max_size:256 | ||
|
||
MayachainMsgSend.from_address max_size:46 | ||
MayachainMsgSend.to_address max_size:46 | ||
|
||
MayachainMsgDeposit.asset max_size:20 | ||
MayachainMsgDeposit.memo max_size:256 | ||
MayachainMsgDeposit.signer max_size:46 | ||
|
||
MayachainSignedTx.public_key max_size:33 | ||
MayachainSignedTx.signature max_size:64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ set(sources | |
ethereum_tokens.c | ||
fsm.c | ||
home_sm.c | ||
mayachain.c | ||
nano.c | ||
osmosis.c | ||
passphrase_sm.c | ||
|
Oops, something went wrong.