OSDN Git Service

update
[bytom/shuttle.git] / swap / common.go
1 package swap
2
3 // var (
4 //      localURL = "http://127.0.0.1:9888/"
5
6 //      buildTransactionURL     = localURL + "build-transaction"
7 //      getTransactionURL       = localURL + "get-transaction"
8 //      signTransactionURL      = localURL + "sign-transaction"
9 //      decodeRawTransactionURL = localURL + "decode-raw-transaction"
10 //      submitTransactionURL    = localURL + "submit-transaction"
11 //      compileURL              = localURL + "compile"
12 //      decodeProgramURL        = localURL + "decode-program"
13 //      signMessageURl          = localURL + "sign-message"
14 //      listAccountsURL         = localURL + "list-accounts"
15 //      listAddressesURL        = localURL + "list-addresses"
16 //      listBalancesURL         = localURL + "list-balances"
17 //      listPubkeysURL          = localURL + "list-pubkeys"
18 //      listUnspentOutputsURL   = localURL + "list-unspent-outputs"
19 // )
20
21 var (
22         // localURL = "http://127.0.0.1:9888/"
23
24         buildTransactionURL     = "build-transaction"
25         getTransactionURL       = "get-transaction"
26         signTransactionURL      = "sign-transaction"
27         decodeRawTransactionURL = "decode-raw-transaction"
28         submitTransactionURL    = "submit-transaction"
29         compileURL              = "compile"
30         decodeProgramURL        = "decode-program"
31         signMessageURl          = "sign-message"
32         listAccountsURL         = "list-accounts"
33         listAddressesURL        = "list-addresses"
34         listBalancesURL         = "list-balances"
35         listPubkeysURL          = "list-pubkeys"
36         listUnspentOutputsURL   = "list-unspent-outputs"
37 )
38
39 type AccountInfo struct {
40         AccountID string
41         Password  string
42         Receiver  string
43         TxFee     uint64
44 }
45
46 type AssetAmount struct {
47         Asset  string
48         Amount uint64
49 }
50
51 type ContractArgs struct {
52         AssetAmount
53         Seller    string
54         CancelKey string
55 }