Skip to content

Commit

Permalink
Update tx builder example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
cffls committed Mar 21, 2022
1 parent 883af3a commit 2ca685a
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,8 @@ builder.add_output(
)
)

# Build a finalized transaction body with the change returning to the address we own
tx_body = builder.build(change_address=address)

# Sign the transaction body hash using the payment signing key
signature = psk.sign(tx_body.hash())

# Add verification key and the signature to the witness set
vk_witnesses = [VerificationKeyWitness(pvk, signature)]

# Create final signed transaction
signed_tx = Transaction(tx_body, TransactionWitnessSet(vkey_witnesses=vk_witnesses))
signed_tx = builder.build_and_sign([psk], change_address=address)

# Submit signed transaction to the network
context.submit_tx(signed_tx.to_cbor())
Expand Down

0 comments on commit 2ca685a

Please sign in to comment.