Skip to content

Commit

Permalink
Added basic Dime.ly detection
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed May 14, 2020
1 parent 71f2a30 commit f1ca9b6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ paymail

**Install using a [compiled binary](https://github.com/mrz1836/paymail-inspector/releases)** on Linux, Mac or Windows _(Mac example)_
```shell script
curl -LkSs https://github.com/mrz1836/paymail-inspector/releases/download/v0.1.9/paymail-inspector_macOS_64-bit.tar.gz -o app.tar.gz
curl -LkSs https://github.com/mrz1836/paymail-inspector/releases/download/v0.1.10/paymail-inspector_macOS_64-bit.tar.gz -o app.tar.gz
tar -zxf app.tar.gz && cd ./app/
./paymail
```
Expand Down Expand Up @@ -199,6 +199,7 @@ Additional paymail information can also be found via [MoneyButton's documentatio

- Unwriter's [bitpic](https://bitpic.network/)
- Deggen's [Roundesk](https://roundesk.co/)
- RelayX's [Dime.ly](https://dimely.io)
- [2paymail](https://2paymail.com/)
</details>

Expand Down
11 changes: 11 additions & 0 deletions cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,12 @@ func (p *PaymailDetails) GetPublicInfo(capabilities *paymail.CapabilitiesRespons
}
}

// Shim for Dime.ly detection (only available to RelayX paymails)
if p.Provider.Domain == "relayx.io" {
// todo: integration with dime.ly api if it exists or on-chain records?
p.Dimely = fmt.Sprintf("https://dimely.io/profile/%s@%s", p.Handle, p.Provider.Domain)
}

return
}

Expand Down Expand Up @@ -661,6 +667,11 @@ func (p *PaymailDetails) Display() {
chalker.Log(chalker.DEFAULT, fmt.Sprintf("Bitpic : %s", chalk.Cyan.Color(p.Bitpic)))
}

// Display dime.ly if found
if len(p.Dimely) > 0 {
chalker.Log(chalker.DEFAULT, fmt.Sprintf("Dime.ly : %s", chalk.Cyan.Color(p.Dimely)))
}

// Display 2paymail if found
if p.TwoPaymail != nil && len(p.TwoPaymail.URL) > 0 {
chalker.Log(chalker.DEFAULT, fmt.Sprintf("2paymail : %s", chalk.Cyan.Color(p.TwoPaymail.URL)))
Expand Down
3 changes: 2 additions & 1 deletion cmd/definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// Version is set manually (also make:build overwrites this value from Github's latest tag)
var Version = "v0.1.9"
var Version = "v0.1.10"

// Default flag values for various commands
var (
Expand Down Expand Up @@ -92,6 +92,7 @@ func getProvider(domain string) *Provider {
// PaymailDetails is all the info about one paymail address
type PaymailDetails struct {
Bitpic string `json:"bitpic"`
Dimely string `json:"dimely"`
Handle string `json:"handle"`
PKI *paymail.PKIResponse `json:"pki"`
Provider *Provider `json:"provider"`
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/paymail.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ __________ .__.__ .___
| ___/\__ \< | |/ \\__ \ | | | | |/ \ / ___/\____ \_/ __ \_/ ___\ __\/ _ \_ __ \
| | / __ \\___ | Y Y \/ __ \| | |__ | | | \\___ \ | |_> > ___/\ \___| | ( <_> ) | \/
|____| (____ / ____|__|_| (____ /__|____/ |___|___| /____ >| __/ \___ >\___ >__| \____/|__|
\/\/ \/ \/ \/ \/ |__| \/ \/ v0.1.9
\/\/ \/ \/ \/ \/ |__| \/ \/ v0.1.10
```
Author: MrZ © 2020 github.com/mrz1836/paymail-inspector

Expand Down

0 comments on commit f1ca9b6

Please sign in to comment.