Documentation ¶
Overview ¶
control of payment verification
Index ¶
- Constants
- func Finalise()
- func GetPayments(ownerData []byte, previousTransfer *transactionrecord.BitmarkTransfer) []*transactionrecord.Payment
- func Initialise(configuration *Configuration) error
- func ScaledDifficulty(count int) *difficulty.Difficulty
- type Configuration
- type PayNonce
- type TrackingStatus
Constants ¶
const ( ReceiptLength = 64 // hex bytes NonceLength = 64 // hex bytes RequiredConfirmations = 3 )
maximum values
Variables ¶
This section is empty.
Functions ¶
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 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
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
convert pay nonce to big endian hex text
func (PayNonce) String ¶ added in v0.2.0
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
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
Source Files ¶
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. |