Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

WalletCore is also available in Rust #280

Closed

Description

@Milerius

Hey Gem team, great job with your project and thanks for using wallet-core! I'd like to point out that most of the important coins you use are also available in Rust from WalletCore with V2 features, such as Bitcoin, FFI generation, and more (such as protobuf access from Rust as well)

https://github.com/trustwallet/wallet-core/tree/master/rust

Note that for crate like SUI: https://github.com/trustwallet/wallet-core/tree/master/rust/chains/tw_sui we do not depends on big dependencies like Mysten Labs SUI which make us more optimized for low size binary (mobile platforms) and less security dependencies risk.

Note that also all crypto generation (not yet HDWallet, but at some point will be available as well) is available in Rust

All the interfaces also have FFI generations: https://github.com/trustwallet/wallet-core/tree/master/rust/wallet_core_rs

Activity

  1. gemcoder21 commented on Oct 12, 2024

    @gemcoder21
    Contributor

    @Milerius thank you for the reaching out.

    Do you plan to support split and stake functionality? https://github.com/gemwalletcom/core/blob/main/gemstone/src/sui/mod.rs#L27 to avoid having two separate transactions to perform a stake? Happy to use WalletCore for Sui, once this feature becomes available.

  2. 0xh3rman commented on Oct 13, 2024

    @0xh3rman
    Collaborator

    @Milerius could you guys please add custom cosmos network support? we'd like to fully use Wallet Core if it can support sign arbitrary cosmos sdk tx. One user case is to support skipprotocol

  3. 0xh3rman commented on Oct 13, 2024

    @0xh3rman
    Collaborator

    @Milerius Another feature request: Add script to publish Wallet Core Android to Maven Central or Local, F-droid needs all the components being compiled on their build server to get listed.

  4. satoshiotomakan commented on Oct 14, 2024

    @satoshiotomakan

    Hi @gemcoder21 , no we don't support split and stake operations per one transaction. We'll consider adding support for it in the future, thank you for the good point.

    @Milerius thank you for the reaching out.

    Do you plan to support split and stake functionality? https://github.com/gemwalletcom/core/blob/main/gemstone/src/sui/mod.rs#L27 to avoid having two separate transactions to perform a stake? Happy to use WalletCore for Sui, once this feature becomes available.

  5. satoshiotomakan commented on Oct 14, 2024

    @satoshiotomakan

    You can use SignDirect Protobuf message to sign an arbitrary transaction
    https://github.com/trustwallet/wallet-core/blob/7523c9805ce094639dfbda6d643e439f5ef1705e/src/proto/Cosmos.proto#L240-L246

    @Milerius could you guys please add custom cosmos network support? we'd like to fully use Wallet Core if it can support sign arbitrary cosmos sdk tx. One user case is to support skipprotocol

    Rust example:
    https://github.com/trustwallet/wallet-core/blob/7523c9805ce094639dfbda6d643e439f5ef1705e/rust/tw_cosmos_sdk/tests/sign.rs#L247-L286

    Please note you can specify any chain_info as well as tx_hasher and signer_info for custom chain support:
    https://github.com/trustwallet/wallet-core/blob/7523c9805ce094639dfbda6d643e439f5ef1705e/src/proto/Cosmos.proto#L424-L427

  6. satoshiotomakan commented on Oct 14, 2024

    @satoshiotomakan

    Consider using tools/android-release script.
    To publish to the local Maven registry, you should replace publish command with publishToMavenLocal here:
    https://github.com/trustwallet/wallet-core/blob/a60033f797e33628e557af7c66be539c8d78bc61/tools/android-release#L19

    @Milerius Another feature request: Add script to publish Wallet Core Android to Maven Central or Local, F-droid needs all the components being compiled on their build server to get listed.

  7. 0xh3rman commented on Oct 14, 2024

    @0xh3rman
    Collaborator

    @satoshiotomakan Thanks for the replies, Wallet Core validates hrp inside, if a new chain hrp is not registered in the registry, it will throw an error saying invalid address or something, we did try to use Wallet Core to support https://www.saga.xyz/ but failed

  8. 0xh3rman commented on Oct 15, 2024

    @0xh3rman
    Collaborator

    @satoshiotomakan sure, we do can publishToMavenLocal, but it would be nice to host it on maven central, hate to use github token to download a package

  9. satoshiotomakan commented on Oct 15, 2024

    @satoshiotomakan

    Hi @0xh3rman, which version of WalletCore did you try? We added support for custom Cosmos chains at the 4.0.21 release: trustwallet/wallet-core#3669
    I have one more example: https://github.com/trustwallet/wallet-core/blob/bbb99135847aa71898f085a6c681e3fbb162e530/rust/tw_tests/tests/chains/cosmos/cosmos_sign.rs#L65-L128

    @satoshiotomakan Thanks for the replies, Wallet Core validates hrp inside, if a new chain hrp is not registered in the registry, it will throw an error saying invalid address or something, we did try to use Wallet Core to support https://www.saga.xyz/ but failed

  10. 0xh3rman commented on Oct 15, 2024

    @0xh3rman
    Collaborator

    @satoshiotomakan Thanks for the reference, I probably used old version version

  11. 0xh3rman commented on Nov 1, 2024

    @0xh3rman
    Collaborator

    Close for now

  12. locked and limited conversation to collaborators on Nov 17, 2024
  13. converted this issue into a discussion #306 on Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions