bitmarks

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: ISC Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitmarks

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

Bitmarks - type for the RPC

func New

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

func (*Bitmarks) Create

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

Create - create assets and issues

func (*Bitmarks) Proof

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

Proof - supply proof that client-side hashing to confirm free issue was done

type CreateArguments

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

CreateArguments - arguments for creating a bitmark

type CreateReply

type CreateReply struct {
	Assets     []assets.Status                                 `json:"assets"`
	Issues     []IssueStatus                                   `json:"issues"`
	PayId      pay.PayId                                       `json:"payId"`
	PayNonce   reservoir.PayNonce                              `json:"payNonce"`
	Difficulty string                                          `json:"difficulty,omitempty"`
	Payments   map[string]transactionrecord.PaymentAlternative `json:"payments,omitempty"`
}

CreateReply - results from create RPC

type IssueStatus

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

IssueStatus - results from an issue

type ProofArguments

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

ProofArguments - arguments for RPC

type ProofReply

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

ProofReply - results from a proof RPC

Jump to

Keyboard shortcuts

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