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: PreImage issues #3797

Closed
enriquesouza opened this issue Apr 16, 2024 · 5 comments · Fixed by #3995
Closed

TON: PreImage issues #3797

enriquesouza opened this issue Apr 16, 2024 · 5 comments · Fixed by #3995
Labels
bug Something isn't working

Comments

@enriquesouza
Copy link

When I am building a transaction input it asks for the private key, it has no sender, but the transfer.

I am not passing the private key, since we sign it externally using TSS, so I call the preImage method, therefore it returns it empty.

Do we have support for preImage TransactionCompiler.preImageHashes for TON?


public struct TW_TheOpenNetwork_Proto_SigningInput {

    /// The secret private key used for signing (32 bytes).
    public var privateKey: Data

    /// The payload transfer
    public var actionOneof: WalletCore.TW_TheOpenNetwork_Proto_SigningInput.OneOf_ActionOneof?

    public var transfer: WalletCore.TW_TheOpenNetwork_Proto_Transfer

    public var jettonTransfer: WalletCore.TW_TheOpenNetwork_Proto_JettonTransfer

    /// Some formats include enough information to transport fields that were
    /// not known at generation time. When encountered, they are stored here.
    public var unknownFields: SwiftProtobuf.UnknownStorage

    /// The payload transfer
    public enum OneOf_ActionOneof : Equatable {

        case transfer(WalletCore.TW_TheOpenNetwork_Proto_Transfer)

        case jettonTransfer(WalletCore.TW_TheOpenNetwork_Proto_JettonTransfer)

        /// Returns a Boolean value indicating whether two values are equal.
        ///
        /// Equality is the inverse of inequality. For any values `a` and `b`,
        /// `a == b` implies that `a != b` is `false`.
        ///
        /// - Parameters:
        ///   - lhs: A value to compare.
        ///   - rhs: Another value to compare.
        public static func == (a: WalletCore.TW_TheOpenNetwork_Proto_SigningInput.OneOf_ActionOneof, b: WalletCore.TW_TheOpenNetwork_Proto_SigningInput.OneOf_ActionOneof) -> Bool
    }

    /// Creates a new message with all of its fields initialized to their default
    /// values.
    public init()
}
@enriquesouza enriquesouza added the bug Something isn't working label Apr 16, 2024
@trustwallet trustwallet deleted a comment Apr 17, 2024
@satoshiotomakan
Copy link
Collaborator

Hi @enriquesouza, thank you for opening the issue.
We do not support TransactionCompiler functions for TON chain yet.
Please feel free to open a PR with the preimage and compile functions.

I'll keep this issue open to keep an eye on the issue.

@enriquesouza
Copy link
Author

Thanks, I will have a look at this in a few weeks then.

@enriquesouza
Copy link
Author

This week I will start implementing it @satoshiotomakan. I can see that you use C++ and Rust, but It seems new coins are being slowly migrated to rust, is it correct?

@satoshiotomakan
Copy link
Collaborator

Hi @enriquesouza, yes that's right, we're actively working on Rust migration. Unfortunately, TON is in C++ yet, so you could either migrate TON to Rust and implement the transaction compiler there, or to implement transaction compiler functionality in C++ at Entry::compile

@10gic
Copy link
Contributor

10gic commented Aug 22, 2024

It seems that no one is fixing this issue, I am willing to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants