Skip to content

Commit

Permalink
feat(BUX-322): add decoded beef to P2PTransaction (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
pawellewandowski98 authored Nov 24, 2023
1 parent 8349e62 commit 94efda0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions p2p_send_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ Example:

// P2PTransaction is the request body for the P2P transaction request
type P2PTransaction struct {
Hex string `json:"hex"` // The raw transaction, encoded as a hexadecimal string
Beef string `json:"beef"` // The transaction in BEEF format
MetaData *P2PMetaData `json:"metadata"` // An object containing data associated with the transaction
Reference string `json:"reference"` // Reference for the payment (from previous P2P Destination request)
Hex string `json:"hex"` // The raw transaction, encoded as a hexadecimal string
Beef string `json:"beef"` // The transaction in hex BEEF format
DecodedBeef *DecodedBEEF `json:"decodedBeef"` // Decoded BEEF transaction
MetaData *P2PMetaData `json:"metadata"` // An object containing data associated with the transaction
Reference string `json:"reference"` // Reference for the payment (from previous P2P Destination request)
}

// P2PMetaData is an object containing data associated with the P2P transaction
Expand Down
1 change: 1 addition & 0 deletions server/p2p_receive_transaction_request_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func processP2pReceiveTxRequest(c *Configuration, req *http.Request, p httproute

if format == beefP2pPayload {
payload.Hex = tx.String()
payload.DecodedBeef = beefData
}

return payload, beefData, md, nil
Expand Down

0 comments on commit 94efda0

Please sign in to comment.