Skip to content

Commit

Permalink
feat: PaymentProof constructor. (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
x1m3 authored Nov 11, 2024
1 parent c19fef9 commit fcd1e66
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions protocol/payment.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ type PaymentProof struct {
eip712Signature []EthereumEip712Signature2021
}

// NewPaymentProofEip712Signature creates a new PaymentProof with EthereumEip712Signature2021 data.
func NewPaymentProofEip712Signature(data []EthereumEip712Signature2021) PaymentProof {
return PaymentProof{
dataType: Eip712SignatureProofType,
eip712Signature: data,
}
}

// UnmarshalJSON unmarshal the PaymentRequestInfoData from JSON.
func (p *PaymentProof) UnmarshalJSON(data []byte) error {
p.dataType = Eip712SignatureProofType
Expand Down

0 comments on commit fcd1e66

Please sign in to comment.