payment

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2016 License: ISC Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReceiptLength         = 64 // hex bytes
	NonceLength           = 64 // hex bytes
	RequiredConfirmations = 3
)

maximum values

Variables

This section is empty.

Functions

func Finalise added in v0.2.0

func Finalise()

stop all payment handlers

func GetPayments added in v0.3.5

func GetPayments(ownerData []byte, previousTransfer *transactionrecord.BitmarkTransfer) []*transactionrecord.Payment

get payment record from a specific block given the blocks 8 byte big endian key

func Initialise added in v0.2.0

func Initialise(configuration *Configuration) error

create the tables

func ScaledDifficulty added in v0.2.0

func ScaledDifficulty(count int) *difficulty.Difficulty

produce a scaled difficulty based on the number of items in a block to be processed and include a quantity discount

Types

type Configuration added in v0.2.0

type Configuration struct {
	Bitcoin *bitcoin.Configuration
}

configuration for each sub-module

type PayNonce added in v0.2.0

type PayNonce [8]byte

type to represent a payment nonce Note: no reversal is required for this

func NewPayNonce added in v0.2.0

func NewPayNonce() PayNonce

create a random pay nonce

func Store added in v0.2.0

func Store(payments []*transactionrecord.Payment, payId reservoir.PayId, count int, canProof bool) (PayNonce, *difficulty.Difficulty, error)

store an incoming record for payment

func (PayNonce) GoString added in v0.2.0

func (paynonce PayNonce) GoString() string

convert a binary pay nonce to big endian hex string for use by the fmt package (for %#v)

func (PayNonce) MarshalText added in v0.2.0

func (paynonce PayNonce) MarshalText() ([]byte, error)

convert pay nonce to big endian hex text

func (PayNonce) String added in v0.2.0

func (paynonce PayNonce) String() string

convert a binary pay nonce to big endian hex string for use by the fmt package (for %s)

func (*PayNonce) UnmarshalText added in v0.2.0

func (paynonce *PayNonce) UnmarshalText(s []byte) error

convert little endian hex text into a pay nonce

type TrackingStatus added in v0.2.9

type TrackingStatus int

result of track payment/try proof

const (
	TrackingNotFound  TrackingStatus = iota
	TrackingAccepted  TrackingStatus = iota
	TrackingProcessed TrackingStatus = iota
	TrackingInvalid   TrackingStatus = iota
)

possible status values

func TrackPayment added in v0.2.0

func TrackPayment(payId reservoir.PayId, receipt string, confirmations uint64) TrackingStatus

start payment tracking on an receipt

func TryProof added in v0.2.0

func TryProof(payId reservoir.PayId, clientNonce []byte) TrackingStatus

instead of paying, try a proof from the client nonce

func (TrackingStatus) MarshalText added in v0.2.9

func (ts TrackingStatus) MarshalText() ([]byte, error)

convert the tracking value for JSON

func (TrackingStatus) String added in v0.2.9

func (ts TrackingStatus) String() string

convert the tracking value for printf

func (*TrackingStatus) UnmarshalText added in v0.3.0

func (ts *TrackingStatus) UnmarshalText(s []byte) error

convert the tracking value from JSON to enumeration

Directories

Path Synopsis
Detect payment records in the Bitcoin Block Chain Payments are indicated by OP_RETURN embedded data, this is compressed to fit it within the 80 byte Bitcoin limit.
Detect payment records in the Bitcoin Block Chain Payments are indicated by OP_RETURN embedded data, this is compressed to fit it within the 80 byte Bitcoin limit.

Jump to

Keyboard shortcuts

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