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

[UI]: How to sign string messages? #313

Open
1 task done
0xBeycan opened this issue Jan 14, 2025 · 3 comments
Open
1 task done

[UI]: How to sign string messages? #313

0xBeycan opened this issue Jan 14, 2025 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@0xBeycan
Copy link

Your Question

How can I sign string messages on TONConnect UI like ethereum personal_sign.

Context

No response

What have you tried so far?

No response

Relevant Code or Commands

No response

Documentation Check

  • Yes, I have checked the documentation.
@0xBeycan 0xBeycan added the question Further information is requested label Jan 14, 2025
@b1ender10
Copy link

const { state, open: openTon, close: closeTon } = useTonConnectModal(); 
const [tonConnectUI, setOptions] = useTonConnectUI();

  const connectTon = async () => {
    tonConnectUI.setConnectRequestParameters({ state: 'ready', value: { tonProof: "your string to sign" } });
    openTon();
  }


// after connect your can access ton_proof
const tonProof = (walletTon?.connectItems?.tonProof as any)?.proof;

@0xBeycan
Copy link
Author

Is there no way like sendTransaction?

@b1ender10
Copy link

I didn’t find

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants