Documentation ¶
Index ¶
- Constants
- func Finalise()
- func Initialise(configuration *Configuration) error
- func ScaledDifficulty(count int) *difficulty.Difficulty
- func Store(currencyName currency.Currency, transactions []byte, count int, canProof bool) (PayId, PayNonce, *difficulty.Difficulty)
- func TrackPayment(payId PayId, receipt string, confirmations uint64) bool
- func TryProof(payId PayId, clientNonce []byte) bool
- type Configuration
- type PayId
- type PayNonce
Constants ¶
const ( ReceiptLength = 64 // hex bytes NonceLength = 64 // hex bytes RequiredConfirmations = 3 )
maximum values
Variables ¶
This section is empty.
Functions ¶
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
func Store ¶ added in v0.2.0
func Store(currencyName currency.Currency, transactions []byte, count int, canProof bool) (PayId, PayNonce, *difficulty.Difficulty)
store an incoming record for payment
func TrackPayment ¶ added in v0.2.0
start payment tracking on an receipt
Types ¶
type Configuration ¶ added in v0.2.0
type Configuration struct {
Bitcoin *bitcoin.Configuration
}
configuration for each sub-module
type PayId ¶ added in v0.2.0
type PayId [48]byte
type to represent a payment identifier this is considered as a big endian value for difficulty comparison Note: no reversal is required for this
func (PayId) GoString ¶ added in v0.2.0
convert a binary pay id to big endian hex string for use by the fmt package (for %#v)
func (PayId) MarshalText ¶ added in v0.2.0
convert pay id to big endian hex text
func (PayId) String ¶ added in v0.2.0
convert a binary pay id to big endian hex string for use by the fmt package (for %s)
func (*PayId) UnmarshalText ¶ added in v0.2.0
convert little endian hex text into a pay id
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 (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
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. |