// Specifying a fee overrides either not being connected, or the current fee.
// Params:
//   key (limit printout to this key)
//   fee (specify the transation fee)
func GetTransactionsj(ctx *web.Context) (string, error) {
	connected := true

	var _ = connected

	keys, transactions, _ := Wallet.GetTransactions()
	type pair struct {
		Key     string
		TransID string
	}
	var trans []*pair
	for i, t := range transactions {
		p := new(pair)
		p.Key = strings.TrimRight(string(keys[i]), "\u0000")
		p.TransID = t.GetSigHash().String()
		trans = append(trans, p)
	}

	return common.EncodeJSONString(trans)

}
Exemple #2
0
func (e *DBlock) JSON() (string, error) {
	return common.EncodeJSONString(e)
}
Exemple #3
0
func (e *Entry) JSON() (string, error) {
	return common.EncodeJSONString(e)
}