Release v2.2.1

This commit is contained in:
Juan Pablo Civile 2022-03-16 11:14:47 -03:00
parent 58d843ad79
commit 6425a5b0da
18 changed files with 113 additions and 89 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -18,11 +18,11 @@ and follow the instructions below.
| System | Checksum | Link | | System | Checksum | Link |
| --- | --- | --- | | --- | --- | --- |
| Linux 32-bit | `7b6de37a2c05635ddeaa77654805e6a94e7a596d4de7b54e3906d1dfe881f0de` | [Download](https://raw.githubusercontent.com/muun/recovery/master/bin/recovery-tool-linux32) | | Linux 32-bit | `62ad190a48e56a7f54341fe89456622c233c3d9f9f1e536ae768014665b0ffad` | [Download](https://raw.githubusercontent.com/muun/recovery/master/bin/recovery-tool-linux32) |
| Linux 64-bit | `dd298ce92e05660363959ee1e5a1af5fa7f111957764623b8a187e07b1c86159` | [Download](https://raw.githubusercontent.com/muun/recovery/master/bin/recovery-tool-linux64) | | Linux 64-bit | `4d413acabbbd4d9be614edb8e492a5100daae8b8ff88beb5db9e862d1bd17b70` | [Download](https://raw.githubusercontent.com/muun/recovery/master/bin/recovery-tool-linux64) |
| Windows 32-bit | `2388bf2d6d024c81fc99245ed79cfd2edb3118ad926d07129c8d3fadebe44f91` | [Download](https://raw.githubusercontent.com/muun/recovery/master/bin/recovery-tool-windows32.exe) | | Windows 32-bit | `82d5becec90c145cc01cce819cca7a53ebd5a16be76f5e4619be840dcc0f2b1a` | [Download](https://raw.githubusercontent.com/muun/recovery/master/bin/recovery-tool-windows32.exe) |
| Windows 64-bit | `6050d6226b26516365206e012acd1e6edc0365b29d4c585e0fc8968a7fcd06b6` | [Download](https://raw.githubusercontent.com/muun/recovery/master/bin/recovery-tool-windows64.exe) | | Windows 64-bit | `a8d668a05006899dfd5e43c69871ddf40c126fb2f578865a92f9fd32f77824c1` | [Download](https://raw.githubusercontent.com/muun/recovery/master/bin/recovery-tool-windows64.exe) |
| MacOS 64-bit | `b842569fb380aa64a3ba5696f097f0512c2c4c8a8ea5da0ef9128eea80404af8` | [Download](https://raw.githubusercontent.com/muun/recovery/master/bin/recovery-tool-macos64) | | MacOS 64-bit | `ef801b78b4989b0028161386c69def5dffeeea7b9d167fc94c665a06b8fc00fd` | [Download](https://raw.githubusercontent.com/muun/recovery/master/bin/recovery-tool-macos64) |
### Windows ### Windows

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -29,70 +29,73 @@ func (p *ServerProvider) NextServer() string {
// See `cmd/survey/main.go` // See `cmd/survey/main.go`
// //
var PublicServers = []string{ var PublicServers = []string{
// With batch support: // Fast servers with batching
"electrum.hsmiths.com:50002", "blackie.c3-soft.com:57002", // impl: Fulcrum 1.6.0, batching: true, ttc: 0.72, speed: 97, from: fortress.qtornado.com:443
"E-X.not.fyi:50002", "fullnode.titanconnect.ca:50002", // impl: Fulcrum 1.6.0, batching: true, ttc: 0.66, speed: 86, from: fortress.qtornado.com:443
"VPS.hsmiths.com:50002", "de.poiuty.com:50002", // impl: Fulcrum 1.6.0, batching: true, ttc: 0.76, speed: 78, from: fortress.qtornado.com:443
"btc.cihar.com:50002", "2ex.digitaleveryware.com:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.68, speed: 68, from: fortress.qtornado.com:443
"e.keff.org:50002", "fortress.qtornado.com:443", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.77, speed: 67, from:
"electrum.qtornado.com:50002", "hodlers.beer:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.74, speed: 64, from: fortress.qtornado.com:443
"electrum.emzy.de:50002", "f.keff.org:50002", // impl: Fulcrum 1.6.0, batching: true, ttc: 0.76, speed: 60, from: fortress.qtornado.com:443
"tardis.bauerj.eu:50002", "e2.keff.org:50002", // impl: Fulcrum 1.6.0, batching: true, ttc: 0.75, speed: 58, from:
"electrum.hodlister.co:50002", "electrum.stippy.com:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.75, speed: 56, from: fortress.qtornado.com:443
"electrum3.hodlister.co:50002", "electrum.privateservers.network:50002", // impl: ElectrumX 1.15.0, batching: true, ttc: 0.83, speed: 52, from: fortress.qtornado.com:443
"electrum5.hodlister.co:50002", "fulcrum.grey.pw:51002", // impl: Fulcrum 1.6.0, batching: true, ttc: 0.79, speed: 49, from: fortress.qtornado.com:443
"fortress.qtornado.com:443", "btc.electroncash.dk:60002", // impl: Fulcrum 1.6.0, batching: true, ttc: 0.79, speed: 49, from: fortress.qtornado.com:443
"electrumx.erbium.eu:50002", "node.degga.net:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.59, speed: 46, from: fortress.qtornado.com:443
"bitcoin.lukechilds.co:50002", "e.keff.org:50002", // impl: ElectrumX 1.10.0, batching: true, ttc: 0.76, speed: 45, from:
"electrum.bitkoins.nl:50512", "bitcoin.aranguren.org:50002", // impl: Fulcrum 1.6.0, batching: true, ttc: 1.25, speed: 41, from:
"electrum.helali.me:50002", // impl: Fulcrum 1.6.0, batching: true, ttc: 1.20, speed: 38, from: fortress.qtornado.com:443
"node1.btccuracao.com:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.79, speed: 33, from: fortress.qtornado.com:443
"ASSUREDLY.not.fyi:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.66, speed: 20, from: electrumx.erbium.eu:50002
"assuredly.not.fyi:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.74, speed: 20, from: fortress.qtornado.com:443
// Without batch support: // Other servers
"electrum.aantonop.com:50002", "smmalis37.ddns.net:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.56, speed: 19, from: fortress.qtornado.com:443
"electrum.blockstream.info:50002", "electrumx.papabyte.com:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.95, speed: 19, from: fortress.qtornado.com:443
"blockstream.info:700", "electrum.bitaroo.net:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.98, speed: 19, from: fortress.qtornado.com:443
"electrum.exan.tech:443", // impl: ElectrumX 1.16.0, batching: true, ttc: 1.08, speed: 19, from: fortress.qtornado.com:443
// Unclassified: "electrum-fulcrum.toggen.net:50002", // impl: Fulcrum 1.6.0, batching: true, ttc: 1.47, speed: 16, from: fortress.qtornado.com:443
"81-7-10-251.blue.kundencontroller.de:50002", "vmd84592.contaboserver.net:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.79, speed: 14, from: fortress.qtornado.com:443
"b.ooze.cc:50002", "gd42.org:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.50, speed: 12, from: fortress.qtornado.com:443
"bitcoin.corgi.party:50002", "vmd63185.contaboserver.net:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.75, speed: 12, from: fortress.qtornado.com:443
"bitcoins.sk:50002", "alfa.cryptotrek.online:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.75, speed: 12, from: fortress.qtornado.com:443
"btc.xskyx.net:50002", "electrumx.ultracloud.tk:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.76, speed: 12, from: fortress.qtornado.com:443
"electrum.jochen-hoenicke.de:50005", "electrum.brainshome.de:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.89, speed: 12, from: fortress.qtornado.com:443
"dragon085.startdedicated.de:50002", "ragtor.duckdns.org:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.91, speed: 12, from: bitcoin.aranguren.org:50002
"e-1.claudioboxx.com:50002", "94.23.247.135:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 6.80, speed: 12, from: fortress.qtornado.com:443
"electrum-server.ninja:50002", "eai.coincited.net:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.12, speed: 11, from: electrumx.erbium.eu:50002
"electrum-unlimited.criptolayer.net:50002", "142.93.6.38:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.56, speed: 11, from: fortress.qtornado.com:443
"electrum.eff.ro:50002", "157.245.172.236:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.62, speed: 11, from: fortress.qtornado.com:443
"electrum.festivaldelhumor.org:50002", "electrum.kendigisland.xyz:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.68, speed: 11, from: fortress.qtornado.com:443
"electrum.leblancnet.us:50002", "btc.lastingcoin.net:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.74, speed: 11, from: fortress.qtornado.com:443
"electrum.mindspot.org:50002", "xtrum.com:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.75, speed: 11, from: electrumx.erbium.eu:50002
"electrum.taborsky.cz:50002", "blkhub.net:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.76, speed: 11, from: fortress.qtornado.com:443
"electrum.villocq.com:50002", "electrumx.erbium.eu:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.78, speed: 11, from:
"electrum2.eff.ro:50002", "185.64.116.15:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.79, speed: 11, from: bitcoin.aranguren.org:50002
"electrum2.villocq.com:50002", "188.165.206.215:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.81, speed: 11, from: fortress.qtornado.com:443
"electrumx.bot.nu:50002", "ex03.axalgo.com:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.92, speed: 11, from: fortress.qtornado.com:443
"electrumx.ddns.net:50002", "electrum.bitcoinlizard.net:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.98, speed: 11, from: fortress.qtornado.com:443
"electrumx.ftp.sh:50002", "btce.iiiiiii.biz:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 1.02, speed: 11, from: fortress.qtornado.com:443
"electrumx.soon.it:50002", "btc.ocf.sh:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 1.15, speed: 11, from: fortress.qtornado.com:443
"elx01.knas.systems:50002", "68.183.188.105:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 1.36, speed: 11, from: fortress.qtornado.com:443
"fedaykin.goip.de:50002", "vmd71287.contaboserver.net:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.60, speed: 10, from: fortress.qtornado.com:443
"fn.48.org:50002", "2electrumx.hopto.me:56022", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.89, speed: 10, from: fortress.qtornado.com:443
"ndnd.selfhost.eu:50002", "electrum.emzy.de:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 1.15, speed: 10, from:
"orannis.com:50002", "electrumx.electricnewyear.net:50002", // impl: ElectrumX 1.15.0, batching: true, ttc: 0.66, speed: 9, from:
"rbx.curalle.ovh:50002", "walle.dedyn.io:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.76, speed: 8, from: fortress.qtornado.com:443
"technetium.network:50002", "caleb.vegas:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.80, speed: 8, from: fortress.qtornado.com:443
"tomscryptos.com:50002", "electrum.neocrypto.io:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.69, speed: 7, from: fortress.qtornado.com:443
"ulrichard.ch:50002", "guichet.centure.cc:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.71, speed: 7, from: fortress.qtornado.com:443
"vmd27610.contaboserver.net:50002", "167.172.42.31:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.75, speed: 7, from: fortress.qtornado.com:443
"vmd30612.contaboserver.net:50002", "2AZZARITA.hopto.org:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.77, speed: 7, from: fortress.qtornado.com:443
"xray587.startdedicated.de:50002", "jonas.reptiles.se:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.95, speed: 7, from: fortress.qtornado.com:443
"yuio.top:50002", "167.172.226.175:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.61, speed: 6, from: fortress.qtornado.com:443
"bitcoin.dragon.zone:50004", "electrum-btc.leblancnet.us:50002", // impl: ElectrumX 1.15.0, batching: true, ttc: 0.64, speed: 6, from: fortress.qtornado.com:443
"ecdsa.net:110", "104.248.139.211:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 0.90, speed: 6, from: fortress.qtornado.com:443
"btc.usebsv.com:50006", "elx.bitske.com:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 1.01, speed: 6, from: fortress.qtornado.com:443
"e2.keff.org:50002", "kareoke.qoppa.org:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 1.18, speed: 6, from: electrumx.erbium.eu:50002
"electrumx.electricnewyear.net:50002", "ex.btcmp.com:50002", // impl: ElectrumX 1.16.0, batching: true, ttc: 1.12, speed: 5, from: fortress.qtornado.com:443
"green-gold.westeurope.cloudapp.azure.com:56002", "bitcoins.sk:56002", // impl: ElectrumX 1.14.0, batching: true, ttc: 0.77, speed: 3, from: fortress.qtornado.com:443
"electrumx-core.1209k.com:50002", "73.92.198.54:50002", // impl: ElectrumX 1.15.0, batching: true, ttc: 5.57, speed: 0, from: fortress.qtornado.com:443
"bitcoin.aranguren.org:50002",
} }

2
go.mod
View File

@ -6,7 +6,7 @@ require (
github.com/btcsuite/btcd v0.21.0-beta github.com/btcsuite/btcd v0.21.0-beta
github.com/btcsuite/btcutil v1.0.2 github.com/btcsuite/btcutil v1.0.2
github.com/gookit/color v1.4.2 github.com/gookit/color v1.4.2
github.com/muun/libwallet v0.9.0 github.com/muun/libwallet v0.10.0
) )
replace github.com/lightninglabs/neutrino => github.com/muun/neutrino v0.0.0-20190914162326-7082af0fa257 replace github.com/lightninglabs/neutrino => github.com/muun/neutrino v0.0.0-20190914162326-7082af0fa257

5
go.sum
View File

@ -201,8 +201,8 @@ github.com/miekg/dns v0.0.0-20171125082028-79bfde677fa8/go.mod h1:W1PPwlIAgtquWB
github.com/miekg/dns v1.1.29 h1:xHBEhR+t5RzcFJjBLJlax2daXOrTYtr9z4WdKEfWFzg= github.com/miekg/dns v1.1.29 h1:xHBEhR+t5RzcFJjBLJlax2daXOrTYtr9z4WdKEfWFzg=
github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/muun/libwallet v0.9.0 h1:WB2nS6flxPnPhNxDQssUki2wcBU1OaHfuNPXS9Hcb64= github.com/muun/libwallet v0.10.0 h1:77/TRraIF/F5eaNAqvprUafvPcsn5TJiYTH19oWNluY=
github.com/muun/libwallet v0.9.0/go.mod h1:txe/67yKJJ7F2Y5ZuSBovk7eljmYibLRp78Kkqw2yi0= github.com/muun/libwallet v0.10.0/go.mod h1:zlqp9DirR4xuW3AxDmaStTBQzvNyijRex8yoPnmQF68=
github.com/muun/neutrino v0.0.0-20190914162326-7082af0fa257 h1:NW17wq2gZlEFeW3/Zx3wSmqlD0wKGf7YvhpP+CNCsbE= github.com/muun/neutrino v0.0.0-20190914162326-7082af0fa257 h1:NW17wq2gZlEFeW3/Zx3wSmqlD0wKGf7YvhpP+CNCsbE=
github.com/muun/neutrino v0.0.0-20190914162326-7082af0fa257/go.mod h1:awTrhbCWjWNH4yVwZ4IE7nZbvpQ27e7OyD+jao7wRxA= github.com/muun/neutrino v0.0.0-20190914162326-7082af0fa257/go.mod h1:awTrhbCWjWNH4yVwZ4IE7nZbvpQ27e7OyD+jao7wRxA=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
@ -232,6 +232,7 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=

View File

@ -33,8 +33,8 @@ type MuunPaymentURI struct {
Label string Label string
Message string Message string
Amount string Amount string
URI string Uri string
BIP70Url string Bip70Url string
CreationTime string CreationTime string
ExpiresTime string ExpiresTime string
Invoice *Invoice Invoice *Invoice
@ -92,6 +92,16 @@ func GetPaymentURI(rawInput string, network *Network) (*MuunPaymentURI, error) {
} }
} }
// legacy Apollo P2P/contacts check
if (strings.Contains(rawInput, "contacts/")) {
return &MuunPaymentURI{
Label: label,
Message: message,
Amount: amount,
Uri: bitcoinUri,
}, nil
}
//BIP70 check //BIP70 check
if len(queryValues["r"]) != 0 { if len(queryValues["r"]) != 0 {
if len(address) > 0 { if len(address) > 0 {
@ -100,16 +110,17 @@ func GetPaymentURI(rawInput string, network *Network) (*MuunPaymentURI, error) {
Label: label, Label: label,
Message: message, Message: message,
Amount: amount, Amount: amount,
URI: bitcoinUri, Uri: bitcoinUri,
BIP70Url: queryValues["r"][0], Bip70Url: queryValues["r"][0],
}, nil }, nil
} }
return &MuunPaymentURI{ return &MuunPaymentURI{
Label: label, Label: label,
Message: message, Message: message,
Amount: amount, Amount: amount,
URI: bitcoinUri, Uri: bitcoinUri,
BIP70Url: queryValues["r"][0], Bip70Url: queryValues["r"][0],
}, nil }, nil
} }
@ -128,7 +139,7 @@ func GetPaymentURI(rawInput string, network *Network) (*MuunPaymentURI, error) {
Label: label, Label: label,
Message: message, Message: message,
Amount: amount, Amount: amount,
URI: bitcoinUri, Uri: bitcoinUri,
}, nil }, nil
} }
@ -176,11 +187,13 @@ func DoPaymentRequestCall(url string, network *Network) (*MuunPaymentURI, error)
return nil, fmt.Errorf("failed to get address: %w", err) return nil, fmt.Errorf("failed to get address: %w", err)
} }
amount := float64(payDetails.Outputs[0].Amount) / 100_000_000
return &MuunPaymentURI{ return &MuunPaymentURI{
Address: address, Address: address,
Message: payDetails.Memo, Message: payDetails.Memo,
Amount: strconv.FormatUint(payDetails.Outputs[0].Amount, 10), Amount: strconv.FormatFloat(amount, 'f', -1, 64),
BIP70Url: url, Bip70Url: url,
CreationTime: strconv.FormatUint(payDetails.Time, 10), CreationTime: strconv.FormatUint(payDetails.Time, 10),
ExpiresTime: strconv.FormatUint(payDetails.Expires, 10), ExpiresTime: strconv.FormatUint(payDetails.Expires, 10),
}, nil }, nil
@ -199,10 +212,7 @@ func getAddressFromScript(script []byte, network *Network) (string, error) {
} }
func buildUriFromString(rawInput string, targetScheme string) (string, *url.URL) { func buildUriFromString(rawInput string, targetScheme string) (string, *url.URL) {
newUri := rawInput newUri := strings.Replace(rawInput, muunScheme, targetScheme, 1)
newUri = strings.Replace(newUri, muunScheme, targetScheme, 1)
if !strings.HasPrefix(strings.ToLower(newUri), targetScheme) { if !strings.HasPrefix(strings.ToLower(newUri), targetScheme) {
newUri = targetScheme + rawInput newUri = targetScheme + rawInput
} }

View File

@ -42,6 +42,8 @@ func Create(version int, userKey, muunKey *hdkeychain.ExtendedKey, path string,
return CreateAddressV3(userKey, muunKey, path, network) return CreateAddressV3(userKey, muunKey, path, network)
case V4: case V4:
return CreateAddressV4(userKey, muunKey, path, network) return CreateAddressV4(userKey, muunKey, path, network)
case V5:
return CreateAddressV5(userKey, muunKey, path, network)
default: default:
return nil, fmt.Errorf("unknown or unsupported version %v", version) return nil, fmt.Errorf("unknown or unsupported version %v", version)
} }

View File

@ -8,7 +8,7 @@ func NewStringList() *StringList {
return &StringList{} return &StringList{}
} }
func newStringList(elems []string) *StringList { func NewStringListWithElements(elems []string) *StringList {
return &StringList{elems} return &StringList{elems}
} }

View File

@ -15,6 +15,7 @@ require (
github.com/miekg/dns v1.1.29 // indirect github.com/miekg/dns v1.1.29 // indirect
github.com/pdfcpu/pdfcpu v0.3.11 github.com/pdfcpu/pdfcpu v0.3.11
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
github.com/shopspring/decimal v1.2.0
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/mobile v0.0.0-20210220033013-bdb1ca9a1e08 // indirect golang.org/x/mobile v0.0.0-20210220033013-bdb1ca9a1e08 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect

View File

@ -297,6 +297,8 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=

View File

@ -224,7 +224,7 @@ func CreateInvoice(net *Network, userKey *HDPrivateKey, routeHints *RouteHints,
iopts = append(iopts, zpay32.Features(features)) iopts = append(iopts, zpay32.Features(features))
iopts = append(iopts, zpay32.CLTVExpiry(72)) // ~1/2 day iopts = append(iopts, zpay32.CLTVExpiry(72)) // ~1/2 day
iopts = append(iopts, zpay32.Expiry(1*time.Hour)) iopts = append(iopts, zpay32.Expiry(24*time.Hour))
var paymentAddr [32]byte var paymentAddr [32]byte
copy(paymentAddr[:], dbInvoice.PaymentSecret) copy(paymentAddr[:], dbInvoice.PaymentSecret)

View File

@ -28,3 +28,8 @@ func Regtest() *Network {
func (n *Network) Name() string { func (n *Network) Name() string {
return n.network.Name return n.network.Name
} }
// ToParams returns the chaincfg.Params associated with this network (only available via Go code)
func (n *Network) ToParams() *chaincfg.Params {
return n.network
}

2
vendor/modules.txt vendored
View File

@ -134,7 +134,7 @@ github.com/ltcsuite/ltcd/wire
github.com/mattn/go-sqlite3 github.com/mattn/go-sqlite3
# github.com/miekg/dns v1.1.29 # github.com/miekg/dns v1.1.29
github.com/miekg/dns github.com/miekg/dns
# github.com/muun/libwallet v0.9.0 # github.com/muun/libwallet v0.10.0
github.com/muun/libwallet github.com/muun/libwallet
github.com/muun/libwallet/addresses github.com/muun/libwallet/addresses
github.com/muun/libwallet/aescbc github.com/muun/libwallet/aescbc