Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/core framework #221

Merged
merged 1,036 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1036 commits
Select commit Hold shift + click to select a range
47e08ea
chore: Move transaction_size to proto struct
Ujjwal0501 Aug 25, 2023
801529f
refactor (app): Improvement and fixes
Ujjwal0501 Aug 25, 2023
f5bc411
test (app): Add evm txn test
Ujjwal0501 Aug 25, 2023
cf3e308
chore: Add support for stitching transaction
Ujjwal0501 Aug 25, 2023
daf4f70
chore: Cleanup old wallet menu and add coin flow
kartikCypherock Aug 26, 2023
a88de78
chore: Remove level one initial to fix build issues
kartikCypherock Aug 26, 2023
6d5448c
chore: Cleanup old wallet menu and add coin flow (#395)
kartikCypherock Aug 28, 2023
b2b5488
fix: Correct file name in comment
Ujjwal0501 Aug 28, 2023
63de7da
chore: Rename struct name prefix to evm_
Ujjwal0501 Aug 28, 2023
5aec4fb
chore: Add missing doxygen comment
Ujjwal0501 Aug 28, 2023
aa6a6ec
refactor (app): Add evm basic transaction support (#390)
ujjwal-cyph Aug 28, 2023
5075f4b
refactor(app): Added sign msg untested changes
amanCypherock Aug 25, 2023
e05628f
fix: Updates based on review comments
kartikCypherock Aug 28, 2023
1b6b77a
chore(app): Added comments for helper functions
amanCypherock Aug 28, 2023
b977c3f
fix: Update user facing message to clear device data
kartikCypherock Aug 28, 2023
c198030
chore(app): Minor changes
amanCypherock Aug 28, 2023
2be9404
feat: Implement clear user data to delete wallets, pairing & user con…
ujjwal-cyph Aug 28, 2023
381706a
refactor(app): Added msg size to init req
amanCypherock Aug 28, 2023
c912a70
fix(app): Duplicate function prototype removed
amanCypherock Aug 28, 2023
22c8fd7
fix: Refresh timeout counter in case joystick movement is detected (#…
kartikCypherock Aug 28, 2023
e1486ba
fix: Allow exporting logs in case of restricted app mode
kartikCypherock Aug 28, 2023
13c5f3b
feat: Implement 'NEAR' sign txn for transfer and add account fn call
kartikCypherock Aug 17, 2023
5c42719
fix: Use confirmation screen for value for better readability
kartikCypherock Aug 21, 2023
4e7f137
chore: Add test case for transfer action to custom account
kartikCypherock Aug 21, 2023
f90b1c7
fix: Update call to flow status api in 'NEAR' sign txn flow
kartikCypherock Aug 24, 2023
8185286
fix: Update user confirmations to unify sign txn flow for diff actions
kartikCypherock Aug 25, 2023
2f828a8
fix: Update invocation to core apis as interfaces are changed
kartikCypherock Aug 25, 2023
6c56c72
fix: Remove reference for btc in near file
kartikCypherock Aug 29, 2023
9f7999f
chore: Fix build issues after rebasing evm sign txn
kartikCypherock Aug 29, 2023
26dd8bd
fix(app): Submodule update
amanCypherock Aug 29, 2023
4097187
feat (test): Enable testing of static functions
Ujjwal0501 Aug 7, 2023
ad8a9dd
feat (test): Enable testing of static functions (#397)
amanCypherock Aug 29, 2023
6535a58
chore: Remove stale comment as per review feedback
kartikCypherock Aug 29, 2023
a051d0a
feat: Implement 'NEAR' sign txn for transfer and add account fn call …
kartikCypherock Aug 29, 2023
ed7adbb
feat: Implement restricted app, host interface and enable startup che…
kartikCypherock Aug 29, 2023
f0bac87
fix: Update user facing error message to indicate wallet locked
kartikCypherock Aug 29, 2023
37d25e0
refactor: Core functionality to allow apps to send response to host
kartikCypherock Aug 29, 2023
085aa40
feat: Convey core error msg to host
kartikCypherock Aug 29, 2023
91909e9
fix: Update user facing error message to indicate wallet locked (#398)
kartikCypherock Aug 29, 2023
ae26dd6
chore: Update function invocation to fix 'USB' unit tests
kartikCypherock Aug 29, 2023
60ced9f
refactor(flow): Unlock flow refactored
amanCypherock Aug 17, 2023
2605130
fix(flow): Updated function call for fetch challenge
amanCypherock Aug 19, 2023
c1217bf
fix(nfc): Updated acc to review comments
amanCypherock Aug 30, 2023
0ee153b
chore: Pull submodule
kartikCypherock Aug 30, 2023
ceec0e9
chore: Cleanup level one and unreachable near flows
kartikCypherock Aug 30, 2023
f77a9fe
Feat: Convey core msgs to host (#399)
kartikCypherock Aug 30, 2023
631e71e
fix(nfc): Sound buzzer on nfc only
amanCypherock Jul 30, 2023
926d37b
refactor: Add configuration to ring buzzer in core error screen
kartikCypherock Aug 29, 2023
36f5f9c
chore: Update function calls to mark error screen with correct config
kartikCypherock Aug 29, 2023
d8a9b45
fix: Remove call to 'card_handle_error' in 'read_card_version' operation
kartikCypherock Aug 29, 2023
b03efed
fix: Allow retry of card operations in between 'NFC' teardown
kartikCypherock Aug 30, 2023
64fee80
chore(nfc): Add comments in flash api
amanCypherock Aug 30, 2023
f96a5bc
fix: Handle '00' padding while decoding der signature
kartikCypherock Aug 31, 2023
06066f0
chore: Update test vector for der decoder with real test data
kartikCypherock Aug 31, 2023
bbe0a5f
fix: Handle '00' padding while decoding der signature (#401)
kartikCypherock Aug 31, 2023
cacceb3
chore: Cleanup level one and unreachable near flows (#400)
kartikCypherock Aug 31, 2023
7b5a8f9
refactor(app): Added polygon chain configuration
vnksnkr Sep 2, 2023
c5ca4d7
refactor(app): Added bsc chain configuration
vnksnkr Sep 2, 2023
cc5af07
refactor(app): Added fantom chain configuration
vnksnkr Sep 2, 2023
a077818
refactor(app): Added optimism chain configuration
vnksnkr Sep 2, 2023
36da5b7
refactor(app): Added avalanche chain configuration
vnksnkr Sep 2, 2023
11fc013
refactor(app): Added arbitrum chain configuration
vnksnkr Sep 2, 2023
d1261af
refactor(app): Added evm chains to host interface
vnksnkr Sep 2, 2023
76cdc1c
refactor(app): Integrated evm chains
vnksnkr Sep 2, 2023
a108e91
refactor(app): Fix formatting errors
vnksnkr Sep 2, 2023
4d00cb7
refactor(app): Fix formatting errors
vnksnkr Sep 2, 2023
9c1aa56
refactor(app): Undo typo
vnksnkr Sep 2, 2023
bbdca89
refactor(app): Increase evm long name size
vnksnkr Sep 2, 2023
b7fe93a
refactor(flow): Unlock flow refactored (#377)
amanCypherock Sep 2, 2023
9a86e7e
refactor(app) : Integrate EVM chains (#402)
amanCypherock Sep 4, 2023
1981ebd
feat(app): Added skeleton for solana app proto decoding
amanCypherock Aug 18, 2023
bffd801
fix(app): Updated submodule and app id
amanCypherock Aug 29, 2023
969cd41
Merge remote-tracking branch 'origin/refactor/core-framework' into fe…
amanCypherock Sep 4, 2023
33c221c
fix(build): Updated api used for send
amanCypherock Sep 4, 2023
b3f6ac7
feat(app): Added skeleton for solana app proto decoding (#378)
amanCypherock Sep 4, 2023
bd0580d
chore(build): Update firmware version and pull submodule
amanCypherock Sep 4, 2023
4d57a1f
chore(build): Update firmware version and pull submodule (#404)
ujjwal-cyph Sep 4, 2023
5bb8adb
fix: Set core & app status in restricted mode
Ujjwal0501 Sep 4, 2023
4d77c35
fix: Reset core engine for handling unauthenticated device
Ujjwal0501 Sep 4, 2023
0cbc2df
fix: Set core & app status in restricted mode (#405)
amanCypherock Sep 5, 2023
95bf6d8
fix(nfc): Sound buzzer on nfc only (#356)
amanCypherock Sep 5, 2023
4b1b9f4
chore(build): Version bumped to 0.5.512
amanCypherock Sep 5, 2023
641451e
fix(build): Build fixed due to mark core error screen
amanCypherock Sep 5, 2023
c2be808
chore(build): Version bumped to 0.5.512 (#406)
amanCypherock Sep 5, 2023
0b90c99
fix(app): Changes acc to review suggestion
amanCypherock Sep 5, 2023
75d6b7f
fix(app): Updated chunk stiching acc to review suggestions
amanCypherock Sep 5, 2023
0e46fe4
chore(app): Added todo for improvement on msg display
amanCypherock Sep 5, 2023
967fa11
refactor(solana): Updated submodule
vnksnkr Sep 7, 2023
beaf5ed
refactor(app): Implement solana add account function
vnksnkr Sep 7, 2023
1474c52
refactor(app): Fixed typo in comments
vnksnkr Sep 7, 2023
d5a2add
refactor(app): Fixed typo in comments
vnksnkr Sep 7, 2023
0d08bbf
refactor(app): Fixed typo in comments
vnksnkr Sep 12, 2023
b26cbc0
refactor(app): Added unit tests for solana add and recieve flows
vnksnkr Sep 12, 2023
1d8b92b
refactor(app): Updated max count to 4 for solana
vnksnkr Sep 12, 2023
9135fd4
refactor(app): Changed sol_fill_public_keys to fill_public_keys
vnksnkr Sep 12, 2023
3423043
refactor(app): Added macros for solana lunit and name
vnksnkr Sep 13, 2023
c3f9343
refactor(app): Renamed solana add account unit tests
vnksnkr Sep 13, 2023
0d9f19b
refactor(app): Removed typecasting before b58enc
vnksnkr Sep 13, 2023
77fe9fd
refactor(app): Uncommented remaining tests
vnksnkr Sep 14, 2023
390b5e9
feat(core): Added app descriptors and version with core request handling
amanCypherock Sep 14, 2023
21baf70
refactor(app): Updated cypherock-common submodule
vnksnkr Sep 15, 2023
da15568
Refactor/solana add account/prf 4960 (#408)
vnksnkr Sep 15, 2023
b6574e4
chore(app): Updated acc to review comments
amanCypherock Sep 15, 2023
2a041b5
fix(app): Updated acc to review suggestions
amanCypherock Sep 19, 2023
a1f702c
refactor(app): Added sign msg untested changes
amanCypherock Aug 25, 2023
4233c98
refactor(app): Added typed data sign msg for evm
amanCypherock Aug 26, 2023
c9d2206
test(app): Evm sign message tests added
amanCypherock Sep 5, 2023
a05df71
chore(app): Added comments for evm helpers
amanCypherock Sep 5, 2023
c8ef57d
fix(app): Updated typed data display logic
amanCypherock Sep 5, 2023
c70837f
fix(app): Added error for decoding failure
amanCypherock Sep 5, 2023
7ed94d5
chore(app): Updated acc to review comments
amanCypherock Sep 15, 2023
4a535db
chore(app): Updated acc to review changes
amanCypherock Sep 19, 2023
32daf74
chore(app): Updated acc to review suggestions
amanCypherock Sep 19, 2023
b316976
Merge remote-tracking branch 'origin/refactor/core-framework' into fe…
amanCypherock Sep 19, 2023
34d5d1d
fix(build): Simulator test build failure fixed
amanCypherock Sep 19, 2023
496c0ce
fix(build): Build failures for test cases fixed
amanCypherock Sep 19, 2023
ba085e0
chore(app): Added comment for extra null character
amanCypherock Sep 19, 2023
b0fd332
fix(app): Updated acc to review suggestion
amanCypherock Sep 19, 2023
341d06f
Refactor/evm sign msg/prf 5020 (#396)
amanCypherock Sep 19, 2023
9334e73
Merge remote-tracking branch 'origin/refactor/core-framework' into re…
amanCypherock Sep 19, 2023
89e731f
Refactor/evm sign typed data/prf 5028 (#407)
amanCypherock Sep 19, 2023
7c693c3
feat(core): Added app descriptors and version with core request handl…
amanCypherock Sep 19, 2023
cd2801f
chore: Add test for token transactions
Ujjwal0501 Aug 29, 2023
e993e99
refactor: Add support for token transactions
Ujjwal0501 Aug 29, 2023
44159b5
chore: Update tests for new struct
Ujjwal0501 Aug 29, 2023
65269eb
chore: Add non-whitelisted contract test
Ujjwal0501 Aug 29, 2023
d790f14
test: Add unit test for blind signing
Ujjwal0501 Aug 31, 2023
714d254
chore: Update function name and comments
Ujjwal0501 Sep 12, 2023
974730b
chore: Fix unit tests
Ujjwal0501 Sep 19, 2023
3ee113f
fix(ui): Timeout not updated on joystick inactivity
amanCypherock Sep 22, 2023
8df4454
fix(build): Simulator build failure fixed
amanCypherock Sep 22, 2023
de5bb26
fix(ui): Timeout not updated on joystick activity (#410)
ujjwal-cyph Sep 22, 2023
decb0cb
Merge branch 'refactor/core-framework' into refactor/evm-token-transa…
ujjwal-cyph Sep 22, 2023
83a44e8
chore (app): Remove unreliable details from txn meta
Ujjwal0501 Sep 2, 2023
4674ba1
fix(core): Onboarding skipped for devices with wallets or paired cards
amanCypherock Sep 26, 2023
3efd5ce
fix(core): Onboarding skipped for devices with wallets or paired card…
amanCypherock Sep 26, 2023
d590bf2
chore(build): Version bumped to 0.5.768
amanCypherock Sep 26, 2023
e55aa98
chore(build): Version bumped to 0.5.768 (#414)
amanCypherock Sep 26, 2023
5f51724
chore: Rename macros & add comments
Ujjwal0501 Sep 29, 2023
d395b8e
refactor: Add support for transaction types (#403)
ujjwal-cyph Sep 29, 2023
7bd3a01
refactor: Remove unreliable info from txn meta (#411)
ujjwal-cyph Sep 29, 2023
48f476b
chore(build): Version bumped to 0.5.1024
ujjwal-cyph Oct 5, 2023
a844e8b
Merge pull request #417 from Cypherock/version-bump
amanCypherock Oct 5, 2023
2f6360d
fix(nfc): Added retry attempt for card sign exception
amanCypherock Oct 9, 2023
c99171f
fix(ui): Updated text acc to suggestion
amanCypherock Oct 10, 2023
126c262
fix(nfc): Error text updated for already tapped card
amanCypherock Oct 10, 2023
1aaf1f3
fix(ui): Fixed 2 characters being skipped from input screen
amanCypherock Oct 12, 2023
3e2176b
fix(nfc): Send correct nfc error status to cysync
amanCypherock Oct 14, 2023
e68f6d0
fix(core): Handle wallet creation failure for creation failure
amanCypherock Oct 18, 2023
e17e717
fix(nfc): Report card error type on card errors during reconstruction
amanCypherock Oct 18, 2023
e848cdf
Merge pull request #422 from Cypherock/fix/incorrect-error-to-cysync/…
amanCypherock Oct 18, 2023
0a751da
Merge pull request #419 from Cypherock/fix/text-wrong-pin/PRF-6168
amanCypherock Oct 18, 2023
a18ccb2
chore(nfc): Update comment text
amanCypherock Oct 18, 2023
31dbbe8
fix(ui): Text updated acc to suggestion
amanCypherock Oct 19, 2023
f901b96
Merge pull request #418 from Cypherock/fix/card-sign-exception/PRF-6294
amanCypherock Oct 19, 2023
fa646af
fix(core): Updated acc to review suggestions
amanCypherock Oct 19, 2023
5cd2fa2
fix(ui): Remove check for pairing in factory reset and clear data
amanCypherock Oct 19, 2023
5d2dc25
fix(ui): Reverted logical changes and added buffer size
amanCypherock Oct 20, 2023
db23e8f
Merge pull request #420 from Cypherock/fix/text-already-tapped-card
amanCypherock Oct 20, 2023
9c5cec4
fix(core): Updated according to review suggestions
amanCypherock Oct 20, 2023
456058b
Merge pull request #426 from Cypherock/fix/remove-check-for-pairing/P…
amanCypherock Oct 20, 2023
94f40b9
chore(ui): Updated comment acc to review suggestion
amanCypherock Oct 20, 2023
dccaa58
Merge pull request #424 from Cypherock/fix/delete-after-wallet-create…
amanCypherock Oct 20, 2023
b28a044
Merge pull request #421 from Cypherock/fix/incorrect-input-text-len-r…
amanCypherock Oct 20, 2023
e528279
fix(nfc): Removed p0 from card error reporting and updated comment
amanCypherock Oct 21, 2023
f7504a0
fix(nfc): Error code variable is incorrect
amanCypherock Oct 23, 2023
adb6b20
Merge pull request #425 from Cypherock/fix/card-error-type-not-commun…
amanCypherock Oct 23, 2023
d35675a
Merge pull request #428 from Cypherock/fix/wrong-var-for-card-error/P…
amanCypherock Oct 23, 2023
0116c77
fix(core): Menu being rerendered on invalid applet requests
amanCypherock Oct 25, 2023
089fff7
chore(build): Version bumped to 0.4.1280
amanCypherock Oct 25, 2023
6f3b5fe
Merge pull request #430 from Cypherock/chore/version-bump-0.5.1280
amanCypherock Oct 25, 2023
eaddf0a
chore(core): Remove obsolete todo
amanCypherock Oct 25, 2023
2655f1d
fix(nfc): Skip card removal on last card tap in pair operation
amanCypherock Oct 25, 2023
57c7aae
fix (evm): Send missing status updates to host
Ujjwal0501 Oct 25, 2023
6dead59
feat(core): Added flow for verifying unverified wallets
amanCypherock Oct 26, 2023
333acae
fix(core): Reject callback sanity check causing unintended ui
amanCypherock Oct 26, 2023
74e09ac
Merge pull request #434 from Cypherock/fix/sanity-check-for-cb/PRF-6444
amanCypherock Oct 26, 2023
c4d1859
chore(core): Added comment acc to review suggestion
amanCypherock Oct 26, 2023
d533b88
Merge pull request #432 from Cypherock/fix/evm-flow-status
ujjwal-cyph Oct 26, 2023
749f3c9
Merge pull request #429 from Cypherock/fix/menu-render-on-invalid-app…
amanCypherock Oct 26, 2023
9c40e55
Merge pull request #431 from Cypherock/fix/skip-card-removal-on-last-…
amanCypherock Oct 26, 2023
7647cf7
chore(build): Version bump to v0.5.1536
amanCypherock Oct 26, 2023
16be0c8
Merge pull request #435 from Cypherock/chore/version-bump-v0.5.1536
amanCypherock Oct 26, 2023
a47469c
fix(ui): Updated ellipsis with processing... text
amanCypherock Oct 27, 2023
e2e296f
feat(ui): Updated image of just logo 40x46px
amanCypherock Oct 27, 2023
d486b1f
Merge pull request #436 from Cypherock/fix/ui-text-updates/PRF-6443
amanCypherock Nov 2, 2023
a1af72f
fix(ui): Update texts to prevent overlap
amanCypherock Nov 2, 2023
170889c
fix(core): Updated acc to review suggestions
amanCypherock Nov 2, 2023
e36bf2b
Merge pull request #438 from Cypherock/fix/ui-overlap-text/PRF-6386
amanCypherock Nov 2, 2023
17946a0
Merge pull request #433 from Cypherock/feat/wallet-verification/PRF-4971
amanCypherock Nov 2, 2023
1846e58
fix(ui): Updated image and other fixes
amanCypherock Nov 3, 2023
8cbeafd
chore(build): Version bump v0.5.1792
amanCypherock Nov 3, 2023
3853f46
Merge pull request #437 from Cypherock/feat/update-logo-image/PRF-6316
amanCypherock Nov 3, 2023
d06ddc6
Merge pull request #439 from Cypherock/chore/version-bump-v0.5.1792
amanCypherock Nov 3, 2023
bcb3385
fix(ui): Delete flow triggered in creation if card not paired
amanCypherock Nov 3, 2023
acc5e8f
Merge pull request #440 from Cypherock/fix/incorrect-delete-after-cre…
amanCypherock Nov 3, 2023
f4f3e66
chore(build): Version bump v0.5.2048
amanCypherock Nov 3, 2023
54ad7ba
Merge pull request #441 from Cypherock/chore/version-bump-v0.5.2048
amanCypherock Nov 3, 2023
73270d5
chore: Remove dead code
Ujjwal0501 Sep 21, 2023
00d4686
chore: Remove test vectors for `EVM` xpub & `BTC` testnet
Ujjwal0501 Nov 23, 2023
f222714
feat(core): Verify wallet id on reconstruction added
amanCypherock Nov 25, 2023
f249df3
feat(core): Save wallet nonce while creation
amanCypherock Nov 25, 2023
d9434c4
fix(ui): Verification failure message updated
amanCypherock Nov 27, 2023
9766404
fix(core): Nonce not saved during sync flow
amanCypherock Dec 1, 2023
15ae889
refactor(app): Solana send transaction support
vnksnkr Sep 26, 2023
eb50208
refactor(app): Updated cypherock common submodule
vnksnkr Sep 26, 2023
5b50ba5
fix(build): Removed duplicate functions and updated submodule
amanCypherock Dec 7, 2023
413d9f2
fix(app): Updated renamed macro after rebase
amanCypherock Dec 7, 2023
066c61c
refactor(core): Refactored redundant code
amanCypherock Dec 7, 2023
d4aca9a
fix(app): Refactor and improvements on solana sign txn
amanCypherock Dec 8, 2023
3f1c4c0
fix(core): Fixed empty mnemonics issue
amanCypherock Dec 8, 2023
371e5bd
chore(core): Updated comments and error codes updated
amanCypherock Dec 8, 2023
516f8fc
fix(ui): Updated skipped pairing warnings check
amanCypherock Dec 13, 2023
70b6913
Merge pull request #447 from Cypherock/fix/skipped-wallet-checks/PRF-…
amanCypherock Dec 14, 2023
39e4fdc
Merge pull request #415 from Cypherock/refactor/solana-send-txn/PRF-4965
amanCypherock Dec 14, 2023
c236915
fix(core): Review suggestions
amanCypherock Dec 15, 2023
22b2d7d
Merge pull request #443 from Cypherock/feat/verify-wallet-id/PRF-6555
amanCypherock Dec 15, 2023
1c5a95c
Merge branch 'refactor/core-framework' into source-clean-up
ujjwal-cyph Dec 15, 2023
64200bc
chore: Remove some more dead code
Ujjwal0501 Dec 15, 2023
7f93bc2
chore(build): Version bump 0.5.2304
amanCypherock Dec 15, 2023
c80e232
Merge pull request #448 from Cypherock/chore/version-bump-v0.5.2304
amanCypherock Dec 15, 2023
f802522
Merge branch 'refactor/core-framework' into source-clean-up
ujjwal-cyph Dec 15, 2023
8c23cb0
fix(ci): Update download artifact run version in a workflow
amanCypherock Dec 15, 2023
d11ca43
Merge branch 'refactor/core-framework' into feat/save-wallet-nonce-on…
ujjwal-cyph Dec 16, 2023
5a66284
Merge branch 'refactor/core-framework' into source-clean-up
ujjwal-cyph Dec 16, 2023
4a9dbbb
Merge pull request #412 from Cypherock/source-clean-up
ujjwal-cyph Dec 16, 2023
062ae98
refactor(core): Refactored wallet nonce derivation and size macro rename
amanCypherock Dec 19, 2023
6c82ad8
fix(core): Updated acc to review suggestions
amanCypherock Dec 20, 2023
73979c7
feat(core): Verify fetched wallets
amanCypherock Nov 27, 2023
da01995
fix(ui): Verification failure message updated
amanCypherock Nov 27, 2023
ddbb03d
fix(core): Added log and error code for verification failures
amanCypherock Dec 11, 2023
0efecdc
fix(nfc): Updated acc to review suggestions
amanCypherock Dec 19, 2023
2db29ea
feat(core): Record card write attempt
amanCypherock Nov 27, 2023
06c299a
fix(core): Verify before delete changes
amanCypherock Dec 1, 2023
053a609
fix(core): Updated factory reset wallet checks condition
amanCypherock Dec 6, 2023
fd11071
refactor(core): Refactored acc to review suggestions
amanCypherock Dec 20, 2023
ee796b6
Merge branch 'refactor/core-framework' into feat/save-wallet-nonce-on…
ujjwal-cyph Dec 20, 2023
ea971c0
fix(core): Updated acc to review suggestions
amanCypherock Dec 20, 2023
1747f42
Merge pull request #445 from Cypherock/feat/verify-fetched-wallet/PRF…
amanCypherock Dec 20, 2023
1d6e70c
Merge pull request #446 from Cypherock/feat/verify-before-delete/PRF-…
ujjwal-cyph Dec 20, 2023
0b3ed3e
fix(core): Treat unverified wallets as non existant
amanCypherock Dec 22, 2023
4e391d9
fix(core): Changes acc to review suggestions
amanCypherock Dec 23, 2023
7d8bd84
Merge pull request #450 from Cypherock/fix/handle-unverified-wallet-b…
ujjwal-cyph Dec 26, 2023
4c01c1c
chore: Update cmake required version
Ujjwal0501 Dec 27, 2023
68bae40
fix(core): Update factory reset condition to ignore write attempt
amanCypherock Dec 27, 2023
2855967
fix(core): Hard fault after wrong pin entry
amanCypherock Dec 27, 2023
f88f382
Merge pull request #452 from Cypherock/update-cmake-version
amanCypherock Dec 27, 2023
be0afc5
Merge pull request #451 from Cypherock/fix/factory-reset-condiiton-up…
ujjwal-cyph Dec 27, 2023
e80e581
Merge branch 'refactor/core-framework' into feat/save-wallet-nonce-on…
ujjwal-cyph Dec 27, 2023
1eb7daf
Merge pull request #444 from Cypherock/feat/save-wallet-nonce-on-crea…
amanCypherock Dec 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@master
uses: actions/download-artifact@v3
with:
path: ./
- name: Publish a release
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,25 @@ jobs:
path: arm-gcc
key: arm-gcc

- name: Restore proto-tools
id: cache-proto-tools
uses: actions/cache@v3
with:
path: proto-tools
key: proto-tools

- name: Install target dependencies
if: matrix.platform == 'device'
env:
CACHED: ${{ steps.cache-arm-gcc.outputs.cache-hit }}
PROTO_CACHED: ${{ steps.cache-proto-tools.outputs.cache-hit }}
run: |
if [ ! "${CACHED}" = "true" ]; then
bash ./utilities/ci/setup-arm-gcc.sh;
fi
if [ ! "${PROTO_CACHED}" = "true" ]; then
bash ./utilities/ci/setup-protoc.sh;
fi
pip install -r utilities/script/requirements.txt

- name: Install simulator dependencies
Expand All @@ -139,7 +150,8 @@ jobs:
if [ ! "${CACHED}" = "true" ]; then
bash ./utilities/ci/setup-build-tools.sh;
fi
PATH="$PATH:$(pwd)/build-tools:$(pwd)/arm-gcc/bin"
pip install -r vendor/nanopb/extra/requirements.txt
PATH="$PATH:$(pwd)/build-tools:$(pwd)/arm-gcc/bin:$(pwd)/proto-tools/bin"
./utilities/build.sh -f ${{ matrix.firmware }} -t ${{ matrix.target }} -p ${{ matrix.platform }}

run-unit-tests:
Expand Down Expand Up @@ -176,6 +188,7 @@ jobs:
bash ./utilities/ci/setup-build-tools.sh;
fi
PATH="$PATH:$(pwd)/build-tools"
pip install -r vendor/nanopb/extra/requirements.txt
# Ignore any non-zero exits from simulator run using '|| true'
bash ./utilities/run_unit_tests.sh -f ${{ matrix.firmware }} -p ${{ matrix.platform }} > test_results.txt || true
cat test_results.txt
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Debug
!/.vscode/c_cpp_properties.json
!/.vscode/launch.json
!/.vscode/tasks.json
cmake-build-debug*
cmake-build-release*
cmake-build-dev*
cmake-build-*
.idea
*.ioc
*.bak
*.launch
html
.DS_Store
private_key*.?
private_key*.?
*.pb.*
generated
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "stm32-hal"]
path = stm32-hal
url = ../x1_wallet_hal_stm32
[submodule "cypherock-common"]
path = common/cypherock-common
url = ../cypherock-common
[submodule "nanopb"]
path = vendor/nanopb
url = ../nanopb
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

{
"cmake.configureSettings": {
"CMAKE_BUILD_PLATFORM":"Device"
"CMAKE_BUILD_PLATFORM":"Device",
"FIRMWARE_TYPE":"Main",
},
"files.associations": {
"*.html": "html",
Expand Down
26 changes: 24 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15.3)
cmake_minimum_required(VERSION 3.19.0)
set(CMAKE_MESSAGE_LOG_LEVEL debug)

if("${CMAKE_BUILD_PLATFORM}" STREQUAL "Device")
Expand All @@ -15,12 +15,27 @@ endif()

project(${PROJECT})

# python is needed for compiling proto files using nanopb
# also for generating & appending firmware signature headers
find_package( Python3 REQUIRED COMPONENTS Interpreter )
execute_process(COMMAND sh utilities/proto/generate-protob.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND_ERROR_IS_FATAL ANY )

# Populate version.c
include(utilities/cmake/version.cmake)

file(GLOB_RECURSE PROTO_SRCS "generated/proto/*.*")
list(APPEND PROTO_SRCS "vendor/nanopb/pb_common.c" "vendor/nanopb/pb_decode.c" "vendor/nanopb/pb_encode.c" "vendor/nanopb/pb_common.h" "vendor/nanopb/pb_decode.h" "vendor/nanopb/pb_encode.h" "vendor/nanopb/pb.h")

OPTION(DEV_SWITCH "Additional features/logs to aid developers" OFF)
OPTION(UNIT_TESTS_SWITCH "Compile build for main firmware or unit tests" OFF)

# Make static functions testable via unit-tests
IF(UNIT_TESTS_SWITCH)
add_compile_definitions( STATIC= )
ELSE()
add_compile_definitions( STATIC=static )
ENDIF(UNIT_TESTS_SWITCH)

if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
add_compile_definitions(FIRMWARE_HASH_CALC=1)
else()
Expand All @@ -31,4 +46,11 @@ if("${CMAKE_BUILD_PLATFORM}" STREQUAL "Device")
include(utilities/cmake/firmware/firmware.cmake)
else()
include(utilities/cmake/simulator/simulator.cmake)
endif()
endif()

# Include nanopb source headers
target_include_directories( ${EXECUTABLE} PRIVATE vendor/nanopb generated/proto )

# Enable support for dynamically allocated fields in nanopb
# Ref: vendor/nanopb/pb.h
add_compile_definitions(PB_ENABLE_MALLOC=1 PB_NO_ERRMSG=1)
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@
FROM alpine:3.14 as build-stage

# Add dependencies
RUN apk add --no-cache gcc-arm-none-eabi newlib-arm-none-eabi ninja cmake bash git python3 py-pip
RUN apk add --no-cache gcc-arm-none-eabi newlib-arm-none-eabi ninja cmake bash git python3 py-pip protoc
RUN apk add --no-cache g++

# Copy files and create folders
COPY . /home
RUN mkdir -p /home/build/Debug /home/build/Release
RUN mkdir -p /dist/Debug/plain /dist/Debug/dev /dist/Debug/debug /dist/Release/
RUN pip3 install -r /home/utilities/script/requirements.txt
RUN mkdir -p /pcache

ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache-dir ecdsa==0.16.1
RUN pip3 install --no-cache-dir wheel
RUN pip3 install --no-cache-dir --upgrade pip setuptools
RUN pip3 install --no-cache-dir protobuf grpcio-tools==1.47.0

# Set working directory
WORKDIR /home/build/Debug
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The X1Wallet ships with a firmware to take the user through the device setup flo
Website link for getting started with new device: [cypherock.com/gs](https://www.cypherock.com/get-started/)

## Functionality of X1Wallet
After the device is setup ([steps to setup device](#device-setup-flow)), the X1Wallet is ready to use by the end-users. To use the functionality, the user must have access to the X1Wallet and CyCards; CySync is required for on-chain operations such as send operations and balance viewing.
After the device is setup ([steps to setup device](#device-setup-flow)), the X1Wallet is ready to use by the end-users. To use the functionality, the user must have access to the X1Wallet and CyCards; cySync is required for on-chain operations such as send operations and balance viewing.

### List of features:
#### 1. Create wallet (on CyCards)
Expand Down Expand Up @@ -43,18 +43,18 @@ A user or owner of X1Wallet has an option to view the critical information of th

To view the word-list, a user needs to have one CyCard (and knowledge of PIN, if the wallet is PIN protected).

#### 4. Import wallet to CySync (Desktop application)
Since, the X1Wallet is a cold storage, it cannot directly interact with Blockchain on the internet to view the balances. To facilitate this, the desktop application, enables users to view their account balances and funds on their wallet/accounts. In order to enable the tracking of funds for any particular wallet (for a particular type of crypto), users have to sync their X1Wallet with CySync and then [enable coin support](#5-enable-coin-support-for-a-wallet-on-cysync-desktop-application) of that particular cryptocurrency. To sync a wallet with CySync, user will trigger the request via CySync and confirm the request on the X1Wallet.
#### 4. Import wallet to cySync (Desktop application)
Since, the X1Wallet is a cold storage, it cannot directly interact with Blockchain on the internet to view the balances. To facilitate this, the desktop application, enables users to view their account balances and funds on their wallet/accounts. In order to enable the tracking of funds for any particular wallet (for a particular type of crypto), users have to sync their X1Wallet with cySync and then [enable coin support](#5-enable-coin-support-for-a-wallet-on-cysync-desktop-application) of that particular cryptocurrency. To sync a wallet with cySync, user will trigger the request via cySync and confirm the request on the X1Wallet.

***NOTE: This process only sends the public information about the wallet. No private critical information leaves the X1Wallet.***

#### 5. Enable coin support for a wallet on CySync (Desktop application)
X1Wallet allows tracking a cryptocurrency balances linked to a users wallet. This is possible via CySync interface. To enable a coin tracking support, the user will require to have one CyCard with the wallet. To enable coin tracking support (make sure that the desired wallet is [synced with CySync](#4-import-wallet-to-cysync-desktop-application)), user will trigger the request via CySync and confirm the request on the X1Wallet.
#### 5. Enable coin support for a wallet on cySync (Desktop application)
X1Wallet allows tracking a cryptocurrency balances linked to a users wallet. This is possible via cySync interface. To enable a coin tracking support, the user will require to have one CyCard with the wallet. To enable coin tracking support (make sure that the desired wallet is [synced with cySync](#4-import-wallet-to-cysync-desktop-application)), user will trigger the request via cySync and confirm the request on the X1Wallet.

***NOTE: This process only sends the public information about the accounts for the selected crypto. No private critical information leaves the X1Wallet.***

#### 6. Receive funds into wallet address present on CyCards
To receive funds into their X1Wallet, first the user must have at least one active wallet on their X1Wallet device ([create a wallet](#1-create-wallet-on-cycards) if you do not have one). If you already have a wallet, then make sure to have access to one CyCard for receiving funds. Now make sure the [wallet is synced with CySync](#4-import-wallet-to-cysync-desktop-application) and [coin tracking support](#5-enable-coin-support-for-a-wallet-on-cysync-desktop-application) is enabled for the preferred coin.
To receive funds into their X1Wallet, first the user must have at least one active wallet on their X1Wallet device ([create a wallet](#1-create-wallet-on-cycards) if you do not have one). If you already have a wallet, then make sure to have access to one CyCard for receiving funds. Now make sure the [wallet is synced with cySync](#4-import-wallet-to-cysync-desktop-application) and [coin tracking support](#5-enable-coin-support-for-a-wallet-on-cysync-desktop-application) is enabled for the preferred coin.

Trigger the request to generate a receiving public address for your wallet. ***It is recommended to verify the address on the X1Wallet and never skip this step for security reasons.***

Expand All @@ -64,9 +64,9 @@ To enable transfer of funds from user's wallet to a different wallet, following
- Access to one CyCard
- Wallets with sufficient funds ([create a wallet](#1-create-wallet-on-cycards) if you do not have one and [receive funds](#6-receive-funds-into-wallet-address-present-on-cycards) before proceeding)
- Knowledge of PIN in case of PIN protected wallets
- Wallet synced with CySync ([sync wallet with CySync](#4-import-wallet-to-cysync-desktop-application)) and coin tracking support enabled on CySync ([enabled coin tracking support](#5-enable-coin-support-for-a-wallet-on-cysync-desktop-application))
- Wallet synced with cySync ([sync wallet with cySync](#4-import-wallet-to-cysync-desktop-application)) and coin tracking support enabled on cySync ([enabled coin tracking support](#5-enable-coin-support-for-a-wallet-on-cysync-desktop-application))

The operation can be started from CySync and confirm the request on X1Wallet to continue. The user is expected to verify the transaction details such as receiver's address and amount being transferred along with a required fee used by the network for processing the transaction. If any descrepancy is observed by the user, the transaction should not be signed and cancelled immediately.
The operation can be started from cySync and confirm the request on X1Wallet to continue. The user is expected to verify the transaction details such as receiver's address and amount being transferred along with a required fee used by the network for processing the transaction. If any descrepancy is observed by the user, the transaction should not be signed and cancelled immediately.

***NOTE: The transaction signing starts once the user has tapped the CyCard. It is recommended to not tap the CyCard if any descrepancy is observed by the user.***

Expand Down
154 changes: 154 additions & 0 deletions apps/btc_family/btc/btc_app.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
/**
* @file btc_app.c
* @author Cypherock X1 Team
* @brief Bitcoin app configuration
* @copyright Copyright (c) 2023 HODL TECH PTE LTD
* <br/> You may obtain a copy of license at <a href="https://mitcc.org/"
*target=_blank>https://mitcc.org/</a>
*
******************************************************************************
* @attention
*
* (c) Copyright 2023 by HODL TECH PTE LTD
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
* "Commons Clause" License Condition v1.0
*
* The Software is provided to you by the Licensor under the License,
* as defined below, subject to the following condition.
*
* Without limiting other conditions in the License, the grant of
* rights under the License will not include, and the License does not
* grant to you, the right to Sell the Software.
*
* For purposes of the foregoing, "Sell" means practicing any or all
* of the rights granted to you under the License to provide to third
* parties, for a fee or other consideration (including without
* limitation fees for hosting or consulting/ support services related
* to the Software), a product or service whose value derives, entirely
* or substantially, from the functionality of the Software. Any license
* notice or attribution required by the License must also include
* this Commons Clause License Condition notice.
*
* Software: All X1Wallet associated files.
* License: MIT
* Licensor: HODL TECH PTE LTD
*
******************************************************************************
*/

/*****************************************************************************
* INCLUDES
*****************************************************************************/

#include "btc_app.h"

#include "btc_helpers.h"
#include "btc_main.h"

/*****************************************************************************
* EXTERN VARIABLES
*****************************************************************************/

/*****************************************************************************
* PRIVATE MACROS AND DEFINES
*****************************************************************************/

/*****************************************************************************
* PRIVATE TYPEDEFS
*****************************************************************************/

/*****************************************************************************
* STATIC FUNCTION PROTOTYPES
*****************************************************************************/

/**
* @brief Check if the purpose index is supported by the Bitcoin app.
*
* @param purpose_index The purpose index to be checked
*
* @return bool Indicates if the provided purpose index is supported
* @retval true The provided purpose index is supported
* @retval false The provided purpose index is not supported
*/
static bool is_purpose_supported(uint32_t purpose_index);

/*****************************************************************************
* STATIC VARIABLES
*****************************************************************************/

// Secondary reference for aggregated coin info:
// https://github.com/trezor/trezor-firmware/blob/f5983e7843f381423f30b8bc2ffc46e496775e5a/common/defs/bitcoin/bitcoin.json
const btc_config_t btc_app = {
// coin specific data
.coin_type = COIN_BTC,
.p2pkh_addr_ver = 0x00,
.p2sh_addr_ver = 0x05,
.legacy_xpub_ver = 0x0488b21e,
.segwit_xpub_ver = 0x049d7cb2,
.nsegwit_xpub_ver = 0x04b24746,
.bech32_hrp = "bc",
.lunit_name = "BTC",
.name = "Bitcoin",

// Refer public issues:
// https://github.com/trezor/trezor-firmware/issues/1087
// https://github.com/trezor/trezor-firmware/issues/1192
.max_fee = 2000000,

// action handlers
.is_purpose_supported = is_purpose_supported,
};

static const cy_app_desc_t btc_app_desc = {.id = 2,
.version =
{
.major = 1,
.minor = 0,
.patch = 0,
},
.app = btc_main,
.app_config = &btc_app};

/*****************************************************************************
* GLOBAL VARIABLES
*****************************************************************************/

/*****************************************************************************
* STATIC FUNCTIONS
*****************************************************************************/

static bool is_purpose_supported(uint32_t purpose_index) {
if (PURPOSE_LEGACY != purpose_index && PURPOSE_SEGWIT != purpose_index &&
PURPOSE_NSEGWIT != purpose_index && PURPOSE_TAPROOT != purpose_index) {
return false;
}
return true;
}

/*****************************************************************************
* GLOBAL FUNCTIONS
*****************************************************************************/

const cy_app_desc_t *get_btc_app_desc() {
return &btc_app_desc;
}
Loading
Loading