rpc

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2016 License: ISC Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const MaximumGetSize = 100

limit the number of gets

Variables

This section is empty.

Functions

func Callback

func Callback(conn io.ReadWriteCloser, argument interface{})

listener callback

Types

type Asset

type Asset struct {
	// contains filtered or unexported fields
}

func (*Asset) Register

func (asset *Asset) Register(arguments *transaction.AssetData, reply *AssetRegisterReply) error

type AssetGetArguments

type AssetGetArguments struct {
	Fingerprints []string `json:"fingerprints"`
}

type AssetGetReply

type AssetGetReply struct {
	Assets []transaction.Decoded `json:"assets"`
}

type AssetIndexesArguments

type AssetIndexesArguments struct {
	Indexes []transaction.AssetIndex `json:"indexes"`
}

type AssetIndexesReply

type AssetIndexesReply struct {
	Assets []transaction.Decoded `json:"assets"`
}

type AssetRegisterReply

type AssetRegisterReply struct {
	TxId           transaction.Link       `json:"txid"`
	AssetIndex     transaction.AssetIndex `json:"asset"`
	PaymentAddress []block.MinerAddress   `json:"paymentAddress"`
	Duplicate      bool                   `json:"duplicate"`
	Err            string                 `json:"error,omitempty"`
}

type Assets

type Assets struct {
	// contains filtered or unexported fields
}

func (*Assets) Get

func (assets *Assets) Get(arguments *AssetGetArguments, reply *AssetGetReply) error

func (*Assets) Index

func (assets *Assets) Index(arguments *AssetIndexesArguments, reply *AssetIndexesReply) error

func (*Assets) Register

func (assets *Assets) Register(arguments *[]transaction.AssetData, reply *[]AssetRegisterReply) error

type Bitmark

type Bitmark struct {
	// contains filtered or unexported fields
}

func (*Bitmark) Issue

func (bitmark *Bitmark) Issue(arguments *transaction.BitmarkIssue, reply *BitmarkIssueReply) error

func (*Bitmark) Provenance

func (bitmark *Bitmark) Provenance(arguments *ProvenanceArguments, reply *ProvenanceReply) error

func (*Bitmark) Transfer

func (bitmark *Bitmark) Transfer(arguments *transaction.BitmarkTransfer, reply *BitmarkTransferReply) error

type BitmarkIssueReply

type BitmarkIssueReply struct {
	TxId           transaction.Link     `json:"txid"`
	PaymentAddress []block.MinerAddress `json:"paymentAddress"`
	Duplicate      bool                 `json:"duplicate"`
	Err            string               `json:"error,omitempty"`
}

type BitmarkTransferReply

type BitmarkTransferReply struct {
	TxId           transaction.Link     `json:"txid"`
	PaymentAddress []block.MinerAddress `json:"paymentAddress"`
	Duplicate      bool                 `json:"duplicate"`
	Err            string               `json:"error,omitempty"`
}

type Bitmarks

type Bitmarks struct {
	// contains filtered or unexported fields
}

func (*Bitmarks) Issue

func (bitmarks *Bitmarks) Issue(arguments *[]transaction.BitmarkIssue, reply *[]BitmarkIssueReply) error

func (*Bitmarks) Transfer

func (bitmarks *Bitmarks) Transfer(arguments *[]transaction.BitmarkTransfer, reply *[]BitmarkTransferReply) error

type BitmarksRecord added in v0.1.2

type BitmarksRecord struct {
	Record string            `json:"record"`
	TxId   transaction.Link  `json:"txid"`
	State  transaction.State `json:"state"`
	Data   interface{}       `json:"data"`
}

can be any of the transaction records

type Block

type Block struct {
	// contains filtered or unexported fields
}

func (*Block) Get

func (blk *Block) Get(arguments *BlockGetArguments, reply *BlockGetReply) error

func (*Block) Number

func (blk *Block) Number(arguments *NumberArguments, reply *NumberReply) error

Block.Number function

type BlockGetArguments

type BlockGetArguments struct {
	Number uint64 `json:"number"`
}

type BlockGetReply

type BlockGetReply struct {
	Digest       block.Digest          `json:"digest"`
	Number       uint64                `json:"number"`
	Timestamp    time.Time             `json:"timestamp"`
	Transactions []transaction.Decoded `json:"transactions"`
}

type InfoArguments

type InfoArguments struct{}

type InfoReply

type InfoReply struct {
	Chain    string  `json:"chain"`
	Mode     string  `json:"mode"`
	Blocks   uint64  `json:"blocks"`
	Peers    int     `json:"peers"`
	RPCs     uint64  `json:"rpcs"`
	Miners   uint64  `json:"miners"`
	Pdiff    float64 `json:"pdiff"`
	Pending  uint64  `json:"pending"`
	Verified uint64  `json:"verified"`
	Version  string  `json:"version"`
	Uptime   string  `json:"uptime"`
}

type Node

type Node struct {
	// contains filtered or unexported fields
}

func (*Node) Info

func (node *Node) Info(arguments *InfoArguments, reply *InfoReply) error

func (*Node) List

func (node *Node) List(arguments *NodeArguments, reply *NodeReply) error

func (*Node) Peers

func (node *Node) Peers(arguments *NodeArguments, reply *NodeReply) error

p2p peers for DEBUGGING

type NodeArguments

type NodeArguments struct {
	Start *gnomon.Cursor `json:"start"`
	Count int            `json:"count"`
}

type NodeReply

type NodeReply struct {
	Addresses []string       `json:"addresses"`
	NextStart *gnomon.Cursor `json:"nextStart"`
}

type NumberArguments

type NumberArguments struct {
}

number arguments

type NumberReply

type NumberReply struct {
	Number uint64 `json:"number"`
}

number reply

type Owner added in v0.1.2

type Owner struct {
	// contains filtered or unexported fields
}

func (*Owner) Bitmarks added in v0.1.2

func (owner *Owner) Bitmarks(arguments *OwnerBitmarksArguments, reply *OwnerBitmarksReply) error

type OwnerBitmarksArguments added in v0.1.2

type OwnerBitmarksArguments struct {
	Owner *transaction.Address `json:"owner"`        // base58
	Start uint64               `json:"start,string"` // first record number
	Count int                  `json:"count"`        // number of records
}

type OwnerBitmarksReply added in v0.1.2

type OwnerBitmarksReply struct {
	Next uint64                    `json:"next,string"` // start value for the next call
	Data []transaction.Ownership   `json:"data"`        // list of bitmarks either issue or transfer
	Tx   map[string]BitmarksRecord `json:"tx"`          // table of tx records
}

type PayArguments

type PayArguments struct {
	Count    int    `json:"count"` // expected Bitmark transactions in payment, 0 => disable check
	Currency string `json:"currency"`
	Payment  string `json:"payment"`
}

type PayReply

type PayReply struct {
	PaymentId string `json:"id"`
}

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

func (*Pool) List

func (pool *Pool) List(arguments *PoolArguments, reply *PoolReply) error

type PoolArguments

type PoolArguments struct {
	Index *transaction.IndexCursor `json:"index"`
	Count int                      `json:"count"`
}

type PoolReply

type PoolReply struct {
	Transactions []transaction.Decoded   `json:"transactions"`
	NextIndex    transaction.IndexCursor `json:"nextIndex"`
}

type ProvenanceArguments

type ProvenanceArguments struct {
	TxId  transaction.Link `json:"txid"`
	Count int              `json:"count"`
}

type ProvenanceRecord

type ProvenanceRecord struct {
	Record string            `json:"record"`
	TxId   transaction.Link  `json:"txid"`
	State  transaction.State `json:"state"`
	Data   interface{}       `json:"data"`
}

can be any of the transaction records

type ProvenanceReply

type ProvenanceReply struct {
	Data []ProvenanceRecord `json:"data"`
}

type ServerArgument

type ServerArgument struct {
	Log *logger.L
}

the argument passed to the callback

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

func (*Transaction) Get

func (t *Transaction) Get(arguments *TransactionGetArguments, reply *TransactionGetReply) error

func (*Transaction) Pay

func (t *Transaction) Pay(arguments *PayArguments, reply *PayReply) error

func (*Transaction) Pending

type TransactionGetArguments

type TransactionGetArguments struct {
	TxIds []transaction.Link `json:"txids"`
}

type TransactionGetReply

type TransactionGetReply struct {
	Transactions []transaction.Decoded `json:"transactions"`
}

type TransactionPendingArguments

type TransactionPendingArguments struct {
}

type TransactionPendingReply

type TransactionPendingReply struct {
	Transactions []transaction.Decoded `json:"transactions"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL