tonutils-go icon indicating copy to clipboard operation
tonutils-go copied to clipboard

How do we get user wallet from this backend ?

Open jktan0504 opened this issue 1 year ago • 4 comments

func getWallet(api *ton.APIClient) *wallet.Wallet {
	words := strings.Split("birth pattern then forest walnut then phrase walnut fan pumpkin pattern then cluster blossom verify then forest velvet pond fiction pattern collect then then", " ")
	w, err := wallet.FromSeed(api, words, wallet.V3)
	if err != nil {
		panic(err)
	}
	return w
}

any correct flow for this ? How do I get user wallet without user insert this seed

jktan0504 avatar Mar 21 '24 11:03 jktan0504

Hi, if you want to authorize user with his wallet and request transaction, you need tonconnect

xssnick avatar Mar 21 '24 17:03 xssnick

@xssnick thanks =).

I am thinking the correct authentication flow for my backend API which is able to know user wallet without getting user private key or seeds.

are we able to handle this from our backend, lets say my backend api service, so my frontend can just hit my endpoint for /mint-nft

jktan0504 avatar Mar 22 '24 05:03 jktan0504

Maybe you need this: https://docs.ton.org/develop/dapps/ton-connect/developers#ton-connect-go

You can build message using tonutils-go and pass serialized binary boc to tonconnect to execute transaction

xssnick avatar Mar 22 '24 08:03 xssnick

@xssnick thanks for your replied.

Would you like to share me more detail about this ? Can I drop you email or something ?

jktan0504 avatar Mar 28 '24 02:03 jktan0504