rpc

package
v0.3.17 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2017 License: ISC Imports: 21 Imported by: 3

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 AssetGetArguments

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

type AssetGetReply

type AssetGetReply struct {
	Assets []AssetRecord `json:"assets"`
}

type AssetRecord added in v0.2.3

type AssetRecord struct {
	Record     string      `json:"record"`
	Confirmed  bool        `json:"confirmed"`
	AssetIndex interface{} `json:"index,omitempty"`
	Data       interface{} `json:"data"`
}

type AssetStatus added in v0.2.0

type AssetStatus struct {
	AssetIndex *transactionrecord.AssetIndex `json:"index"`
	Duplicate  bool                          `json:"duplicate"`
}

Assets registration -------------------

type Assets

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

func (*Assets) Get

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

type AssetsRegisterReply added in v0.2.0

type AssetsRegisterReply struct {
	Assets []AssetStatus `json:"assets"`
}

type Bitmark

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

func (*Bitmark) Provenance

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

func (*Bitmark) Transfer

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

type BitmarkTransferReply

type BitmarkTransferReply struct {
	TxId     merkle.Digest                `json:"txId"`
	PayId    reservoir.PayId              `json:"payId"`
	Payments []*transactionrecord.Payment `json:"payments"`
}

type Bitmarks

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

func (*Bitmarks) Create added in v0.2.6

func (bitmarks *Bitmarks) Create(arguments *CreateArguments, reply *CreateReply) error

func (*Bitmarks) Pay added in v0.2.0

func (bitmarks *Bitmarks) Pay(arguments *PayArguments, reply *PayReply) error

func (*Bitmarks) Proof added in v0.2.0

func (bitmarks *Bitmarks) Proof(arguments *ProofArguments, reply *ProofReply) error

type BitmarksIssueReply added in v0.2.0

type BitmarksIssueReply struct {
	Issues     []IssueStatus    `json:"issues"`
	PayId      reservoir.PayId  `json:"payId"`
	PayNonce   payment.PayNonce `json:"payNonce"`
	Difficulty string           `json:"difficulty"`
}

type BitmarksRecord added in v0.1.2

type BitmarksRecord struct {
	Record     string      `json:"record"`
	TxId       interface{} `json:"txId,omitempty"`
	AssetIndex interface{} `json:"index,omitempty"`
	Data       interface{} `json:"data"`
}

can be any of the transaction records

type Counters added in v0.3.5

type Counters struct {
	Pending  int   `json:"pending"`
	Verified int   `json:"verified"`
	Others   []int `json:"others"`
}

type CreateArguments added in v0.2.6

type CreateArguments struct {
	Assets []*transactionrecord.AssetData    `json:"assets"`
	Issues []*transactionrecord.BitmarkIssue `json:"issues"`
}

type CreateReply added in v0.2.6

type CreateReply struct {
	Assets     []AssetStatus    `json:"assets"`
	Issues     []IssueStatus    `json:"issues"`
	PayId      reservoir.PayId  `json:"payId"`
	PayNonce   payment.PayNonce `json:"payNonce"`
	Difficulty string           `json:"difficulty"`
}

type InfoArguments

type InfoArguments struct{}

type InfoReply

type InfoReply struct {
	Chain               string   `json:"chain"`
	Mode                string   `json:"mode"`
	Blocks              uint64   `json:"blocks"`
	RPCs                uint64   `json:"rpcs"`
	TransactionCounters Counters `json:"transactionCounters"`
	Difficulty          float64  `json:"difficulty"`
	Version             string   `json:"version"`
	Uptime              string   `json:"uptime"`
}

type IssueStatus added in v0.2.5

type IssueStatus struct {
	TxId merkle.Digest `json:"txId"`
}

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

type NodeArguments

type NodeArguments struct {
	Start uint64 `json:"start,string"`
	Count int    `json:"count"`
}

type NodeReply

type NodeReply struct {
	Nodes     []announce.RPCEntry `json:"nodes"`
	NextStart uint64              `json:"nextStart,string"`
}

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 *account.Account `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 []block.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 {
	PayId   reservoir.PayId `json:"payId"`   // id from the issue/transfer request
	Receipt string          `json:"receipt"` // hex id from payment process
}

type PayReply

type PayReply struct {
	Status payment.TrackingStatus `json:"status"`
}

type ProofArguments added in v0.2.0

type ProofArguments struct {
	PayId reservoir.PayId `json:"payId"`
	Nonce string          `json:"nonce"`
}

type ProofReply added in v0.2.0

type ProofReply struct {
	Status payment.TrackingStatus `json:"status"`
}

type ProvenanceArguments

type ProvenanceArguments struct {
	TxId  merkle.Digest `json:"txId"`
	Count int           `json:"count"`
}

type ProvenanceRecord

type ProvenanceRecord struct {
	Record     string      `json:"record"`
	IsOwner    bool        `json:"isOwner"`
	TxId       interface{} `json:"txId,omitempty"`
	AssetIndex interface{} `json:"index,omitempty"`
	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
	StartTime time.Time
}

the argument passed to the callback

Jump to

Keyboard shortcuts

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