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

How can I solve the ton proof type? #336

Open
congmucc opened this issue Feb 18, 2025 · 0 comments
Open

How can I solve the ton proof type? #336

congmucc opened this issue Feb 18, 2025 · 0 comments

Comments

@congmucc
Copy link

congmucc commented Feb 18, 2025

Hi, I have a problem about proof type.

Image

Image

This is my test out, It contains connectItems and has proof, but its type is different from the Proof type of the current library.

like

type Proof struct {
	Address string    `json:"address"`
	Proof   ProofData `json:"proof"`
}

type ProofData struct {
	Timestamp int64  `json:"timestamp"`
	Domain    string `json:"domain"`
	Signature string `json:"signature"`
	Payload   string `json:"payload"`
	StateInit string `json:"state_init"`
}

from https://github.com/tonkeeper/tongo/blob/master/tonconnect/server.go#L98
Proof haven't address, not StateInit, Do I have to construct it myself? because checkProof needs type.

like

func (s *Server) CheckProof(ctx context.Context, tp *Proof, checkPayload, checkDomain checkFunc)

from https://github.com/tonkeeper/tongo/blob/master/tonconnect/server.go#L172
Does the frontend only need to pass the variable proof to the backend? like https://github.com/ton-connect/demo-dapp-with-react-ui/blob/master/src/components/TonProofDemo/TonProofDemo.tsx#L47

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

No branches or pull requests

1 participant