diff --git a/types.go b/types.go index da04e7f..2929019 100644 --- a/types.go +++ b/types.go @@ -504,6 +504,7 @@ type keybase interface { username() string version() string RequestPayment(user string, amount float64, memo ...string) + CancelRequest(requestID string) error } type status struct { diff --git a/wallet.go b/wallet.go index 24c749f..cfc11a6 100644 --- a/wallet.go +++ b/wallet.go @@ -59,3 +59,9 @@ func (k *Keybase) RequestPayment(user string, amount float64, memo ...string) er _, err := k.Exec("wallet", "request", user, fmt.Sprintf("%f", amount)) return err } + +// CancelRequest cancels a request for payment previously sent to a user +func (k *Keybase) CancelRequest(requestID string) error { + _, err := k.Exec("wallet", "cancel-request", requestID) + return err +}