-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
1,430 additions
and
122 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
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,27 @@ | ||
#ifndef H_CARDANO_APP_CARDANO_CERTIFICATES | ||
#define H_CARDANO_APP_CARDANO_CERTIFICATES | ||
|
||
#include "cardano.h" | ||
|
||
// there are other types we do not support | ||
enum { | ||
CERTIFICATE_TYPE_STAKE_REGISTRATION = 0, | ||
CERTIFICATE_TYPE_STAKE_DEREGISTRATION = 1, | ||
CERTIFICATE_TYPE_STAKE_DELEGATION = 2, | ||
CERTIFICATE_TYPE_STAKE_POOL_REGISTRATION = 3 | ||
}; | ||
|
||
typedef struct { | ||
uint8_t operatorHash[POOL_KEY_HASH_LENGTH]; | ||
uint8_t vrfKeyHash[VRF_KEY_HASH_LENGTH]; | ||
uint64_t pledge; | ||
uint64_t cost; | ||
uint64_t marginNumerator; | ||
uint64_t marginDenominator; | ||
uint8_t rewardAccount[1 + ADDRESS_KEY_HASH_LENGTH]; | ||
} pool_registration_params_t; | ||
|
||
// see the calculation in ui_displayMarginScreen() in uiScreens.c | ||
#define MARGIN_DENOMINATOR_MAX 1000000000000000ul // 10^15 | ||
|
||
#endif // H_CARDANO_APP_CARDANO_CERTIFICATES |
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
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
Oops, something went wrong.