Skip to content

Commit

Permalink
Merge pull request #17 from tonutils/test
Browse files Browse the repository at this point in the history
Tonutils-go update with rldp improvements + domain tx url flag
  • Loading branch information
xssnick authored Jul 26, 2024
2 parents a547faa + 4f13f70 commit b082624
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
10 changes: 8 additions & 2 deletions cmd/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}

Expand Down Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit b082624

Please sign in to comment.