-
Notifications
You must be signed in to change notification settings - Fork 20.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* integrate #2035 via latest develop. fixes #2041 * refactor apis * fix tests for windows, add simple download test * separate dns api and chequebook api * http proxy api in separate subpackage * remove legacy rpc code partially, adding only legacy to make v2 work * TODO: add dns tests see #2048 * TODO: further refactor due to #2040
- Loading branch information
Showing
21 changed files
with
918 additions
and
1,276 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package chequebook | ||
|
||
import ( | ||
"math/big" | ||
|
||
"github.com/ethereum/go-ethereum/common" | ||
) | ||
|
||
const Version = "1.0" | ||
|
||
type Api struct { | ||
ch *Chequebook | ||
} | ||
|
||
func NewApi(ch *Chequebook) *Api { | ||
return &Api{ch} | ||
} | ||
|
||
func (self *Api) Issue(beneficiary common.Address, amount *big.Int) (cheque *Cheque, err error) { | ||
return self.ch.Issue(beneficiary, amount) | ||
} | ||
|
||
func (self *Api) Cash(cheque *Cheque) (txhash string, err error) { | ||
return self.ch.Cash(cheque) | ||
} | ||
|
||
func (self *Api) Deposit(amount *big.Int) (txhash string, err error) { | ||
return self.ch.Deposit(amount) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.