From 4f13f709be1227eec5f5833667f2ca223d3abd12 Mon Sep 17 00:00:00 2001 From: Oleg Baranov Date: Fri, 26 Jul 2024 23:01:38 +0400 Subject: [PATCH] Tonutils-go update with rldp improvements + domain tx url flag --- cmd/proxy/main.go | 10 ++++++++-- go.mod | 2 +- go.sum | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/cmd/proxy/main.go b/cmd/proxy/main.go index c80035c..7aedf21 100644 --- a/cmd/proxy/main.go +++ b/cmd/proxy/main.go @@ -39,6 +39,7 @@ type Config struct { var FlagDomain = flag.String("domain", "", "domain to configure") var FlagDebug = flag.Bool("debug", false, "more logs") +var FlagTxURL = flag.Bool("tx-url", false, "show set domain record url instead of qr") type Handler struct { h http.Handler @@ -56,7 +57,7 @@ func (h Handler) ServeHTTP(writer http.ResponseWriter, request *http.Request) { log.Println("request:", request.Method, request.Host, request.RequestURI) - writer.Header().Set("Ton-Reverse-Proxy", "Tonutils Reverse Proxy v0.3.0") + writer.Header().Set("Ton-Reverse-Proxy", "Tonutils Reverse Proxy v0.3.1") h.h.ServeHTTP(writer, request) } @@ -237,7 +238,12 @@ func setupDomain(client *liteclient.ConnectionPool, domain string, adnlAddr []by return } - qrterminal.GenerateHalfBlock("ton://transfer/"+domainInfo.GetNFTAddress().String()+args, qrterminal.L, os.Stdout) + txUrl := "ton://transfer/" + domainInfo.GetNFTAddress().String() + args + if *FlagTxURL { + fmt.Println(txUrl) + } else { + qrterminal.GenerateHalfBlock(txUrl, qrterminal.L, os.Stdout) + } fmt.Println("Execute this transaction from the domain owner's wallet to setup site records.") fmt.Println("Execute transaction from wallet:", nftData.OwnerAddress.String()) fmt.Println("When you've done, configuration will automatically proceed in ~10 seconds.") diff --git a/go.mod b/go.mod index 652ac12..580e065 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.19 require ( github.com/mdp/qrterminal/v3 v3.0.0 github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3 - github.com/xssnick/tonutils-go v1.8.9-0.20240125180557-86af89e735af + github.com/xssnick/tonutils-go v1.9.9-0.20240726185310-b76c122b8cd6 ) require ( diff --git a/go.sum b/go.sum index e959a91..bd980e2 100644 --- a/go.sum +++ b/go.sum @@ -9,6 +9,12 @@ github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3 h1:aQKxg3+2p+IFXXg97M github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3/go.mod h1:9/etS5gpQq9BJsJMWg1wpLbfuSnkm8dPF6FdW2JXVhA= github.com/xssnick/tonutils-go v1.8.9-0.20240125180557-86af89e735af h1:gWcFk6S4bY1ypuVB+W4YTlaHYpOYgdlps86QQvRoU1E= github.com/xssnick/tonutils-go v1.8.9-0.20240125180557-86af89e735af/go.mod h1:p1l1Bxdv9sz6x2jfbuGQUGJn6g5cqg7xsTp8rBHFoJY= +github.com/xssnick/tonutils-go v1.9.2 h1:70s1oqcJ4jOOmqjSik0TmZR05JySfk/PeVuPeXmr+ho= +github.com/xssnick/tonutils-go v1.9.2/go.mod h1:p1l1Bxdv9sz6x2jfbuGQUGJn6g5cqg7xsTp8rBHFoJY= +github.com/xssnick/tonutils-go v1.9.9-0.20240726185310-b76c122b8cd6 h1:po4uMNWZTLZxO0Xms4BEHB8TCar3gLFMUAGgmvDsN9E= +github.com/xssnick/tonutils-go v1.9.9-0.20240726185310-b76c122b8cd6/go.mod h1:p1l1Bxdv9sz6x2jfbuGQUGJn6g5cqg7xsTp8rBHFoJY= +github.com/xssnick/tonutils-go v1.9.9 h1:J0hVJI4LNEFHqgRHzpWTjFuv/Ga89OqLRUc9gxmjCoc= +github.com/xssnick/tonutils-go v1.9.9/go.mod h1:p1l1Bxdv9sz6x2jfbuGQUGJn6g5cqg7xsTp8rBHFoJY= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=