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

[TON]: Add support for TON 24-words mnemonic #3998

Merged
merged 27 commits into from
Oct 4, 2024
Merged

Conversation

satoshiotomakan
Copy link
Collaborator

@satoshiotomakan satoshiotomakan commented Aug 23, 2024

Description

Add support for TON-specific 24-words mnemonic.
Note TON mnemonic is not BIP39, so it can't be imported via HDWallet module.

How to test

Run Rust, C++, Swift, Kotlin, JavaScript

Types of changes

  • Add TWTONWalletIsValidMnemonic, TWTONWalletCreateWithMnemonic, TWTONWalletDelete, TWTONWalletGetKey
  • Add TWStoredKeyImportTONWallet, TWStoredKeyImportTONWalletWithEncryption, TWStoredKeyIsTONMnemonic, `TWStoredKeyDecryptTONMnemonic
  • Add KeyStore.importTON, KeyStore.exportTONMnemonic in Swift
  • Add IKeyStore.importTON in TypeScript

TODO

  • Add Android tests

@satoshiotomakan satoshiotomakan marked this pull request as ready for review September 9, 2024 16:49
Copy link

github-actions bot commented Sep 9, 2024

Binary size comparison

➡️ aarch64-apple-ios: 12.29 MB

➡️ aarch64-apple-ios-sim: 12.29 MB

➡️ aarch64-linux-android: 15.91 MB

➡️ armv7-linux-androideabi: 13.49 MB

➡️ wasm32-unknown-emscripten: 11.22 MB

Milerius
Milerius previously approved these changes Sep 11, 2024
Copy link
Collaborator

@Milerius Milerius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to do a pre-release for this one

rust/tw_hash/src/hmac.rs Outdated Show resolved Hide resolved
rust/tw_hd_wallet/src/ton/mnemonic.rs Outdated Show resolved Hide resolved
rust/tw_hd_wallet/src/ton/mnemonic.rs Show resolved Hide resolved
rust/tw_hd_wallet/src/ton/mod.rs Outdated Show resolved Hide resolved
@trustwallet trustwallet deleted a comment from Binancees05 Sep 16, 2024
@satoshiotomakan satoshiotomakan changed the base branch from master to dev October 4, 2024 08:17
@satoshiotomakan satoshiotomakan merged commit 0b16771 into dev Oct 4, 2024
13 checks passed
@satoshiotomakan satoshiotomakan deleted the s/ton-mnemonic branch October 4, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants