Skip to content

Commit 9a73241

Browse files
feat: Constellation generate pubkey and address
1 parent f9bcffd commit 9a73241

File tree

3 files changed

+527
-4
lines changed

3 files changed

+527
-4
lines changed

apps/constellation_app/constellation_context.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@
2828
#define CONSTELLATION_ACCOUNT_INDEX 0x80000000 // 0'
2929
#define CONSTELLATION_CHANGE_INDEX 0x00000000 // 0
3030

31-
3231
#define CONSTELLATION_PUB_KEY_SIZE 33
33-
#define CONSTELLATION_UNCOMPRESSED_PUB_KEY_SIZE 65
34-
#define CONSTELLATION_ACCOUNT_ADDRESS_LENGTH 40
32+
#define CONSTELLATION_UNCOMPRESSED_PUBKEY_SIZE 65
33+
#define CONSTELLATION_ACCOUNT_ADDRESS_SIZE 40
34+
#define PKCS_PREFIX_SIZE 23
35+
#define PKCS_PREFIXED_PUBKEY_SIZE PKCS_PREFIX_SIZE + CONSTELLATION_UNCOMPRESSED_PUBKEY_SIZE
36+
#define SHA256_DIGEST_SIZE 32
37+
#define BS58_ENCODED_SIZE 45
3538

3639
/*****************************************************************************
3740
* TYPEDEFS

apps/constellation_app/constellation_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void constellation_main(usb_event_t usb_evt, const void *constellation_app_confi
125125
switch ((uint8_t)query.which_request) {
126126
case CONSTELLATION_QUERY_GET_PUBLIC_KEYS_TAG:
127127
case CONSTELLATION_QUERY_GET_USER_VERIFIED_PUBLIC_KEY_TAG: {
128-
// constellation_get_pub_keys(&query);
128+
constellation_get_pub_keys(&query);
129129
break;
130130
}
131131
case CONSTELLATION_QUERY_SIGN_TXN_TAG: {

0 commit comments

Comments
 (0)