module OnChain
struct SignedHash
getter hash_to_sign : String
getter public_key
getter input_index
getter signature : String # In DER format.
The method should add the signatures to the transaction inputs. Then calling the to_hex method on the transaction object should return a hex representation of the tranastion signed and ready to broadcast.
This is more or less a re-write of an existing ruby method from here https://github.com/onchain/onchain-gem/blob/master/lib/onchain/transaction.rb#L373
Add a method to https://github.com/onchain/paper-wallet-spender/blob/master/src/onchain/protocol/utxo_transaction.cr such as
def sign_transaction(signatures : Array(Signature))
You'll need to create the signature model. i.e.
The method should add the signatures to the transaction inputs. Then calling the to_hex method on the transaction object should return a hex representation of the tranastion signed and ready to broadcast.