bitmark

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: ISC Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitmark

type Bitmark struct {
	Log              *logger.L
	Limiter          *rate.Limiter
	IsNormalMode     func(mode.Mode) bool
	IsTestingChain   func() bool
	Rsvr             reservoir.Reservoir
	PoolTransactions storage.Handle
	PoolAssets       storage.Handle
	PoolOwnerTxIndex storage.Handle
}

Bitmark - type for the RPC

func New

func New(log *logger.L, pools reservoir.Handles, isNormalMode func(mode.Mode) bool, isTestingChain func() bool, rsvr reservoir.Reservoir) *Bitmark

func (*Bitmark) Provenance

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

Provenance - list the provenance from s transaction id

func (*Bitmark) Transfer

func (bitmark *Bitmark) Transfer(arguments *transactionrecord.BitmarkTransferCountersigned, reply *TransferReply) error

Transfer - transfer a bitmark

type ProvenanceArguments

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

ProvenanceArguments - arguments for provenance RPC

type ProvenanceRecord

type ProvenanceRecord struct {
	Record  string      `json:"record"`
	IsOwner bool        `json:"isOwner"`
	TxId    interface{} `json:"txId,omitempty"`
	InBlock uint64      `json:"inBlock"`
	AssetId interface{} `json:"assetId,omitempty"`
	Data    interface{} `json:"data"`
}

ProvenanceRecord - can be any of the transaction records

type ProvenanceReply

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

ProvenanceReply - results from provenance RPC

type TransferReply

type TransferReply struct {
	TxId      merkle.Digest                                   `json:"txId"`
	BitmarkId merkle.Digest                                   `json:"bitmarkId"`
	PayId     pay.PayId                                       `json:"payId"`
	Payments  map[string]transactionrecord.PaymentAlternative `json:"payments"`
}

TransferReply - result from transfer RPC

Jump to

Keyboard shortcuts

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