Class: PaymentDetails

bip70.PaymentDetails

new PaymentDetails(optionsnullable)

Represents BIP70 payment details.

Parameters:
Name Type Attributes Description
options Object <nullable>
Properties:
Name Type Description
network String | null
outputs Array:.<Output:>
time Number
expires Number
memo String | null
paymentUrl String | null
merchantData Buffer | null
Source:

Methods

(static) fromOptions(options) → {PaymentDetails}

Instantiate payment details from options.

Parameters:
Name Type Description
options Object
Source:
Returns:
Type
PaymentDetails

(static) fromRaw(data) → {PaymentDetails}

Instantiate payment details from serialized data.

Parameters:
Name Type Description
data Buffer
Source:
Returns:
Type
PaymentDetails

(private) fromOptions(options) → {PaymentDetails}

Inject properties from options.

Parameters:
Name Type Description
options Object
Source:
Returns:
Type
PaymentDetails

(private) fromRaw(data) → {PaymentDetails}

Inject properties from serialized data.

Parameters:
Name Type Description
data Buffer
Source:
Returns:
Type
PaymentDetails

getData(encnullable) → {String|Object|null}

Get payment details.

Parameters:
Name Type Attributes Description
enc String <nullable>
Source:
Returns:
Type
String | Object | null

isExpired() → {Boolean}

Test whether the payment is expired.

Source:
Returns:
Type
Boolean

setData(data, encnullable)

Set payment details.

Parameters:
Name Type Attributes Description
data Object
enc String <nullable>
Source:

toRaw() → {Buffer}

Serialize the payment details (protobuf).

Source:
Returns:
Type
Buffer