0

I'm trying to broadcast an operation using the following method in pytezos as a backend for a dapp: forge -> receive signature (from thanos) -> reconstruct operation group -> inject

this method works, with beacon (which broadcasts immediatly) and tezbridge. some other methods as magic or taquito might happen by other means. now I'm getting invalid signature ;< but I might not be foreseeing something. there are other methods for such? to append the signature for example to a byte string?

op = pytezos.operation_group(
     protocol=payload['op']['protocol'],
     branch=payload['op']['branch'],
     contents=payload['op']['contents'],
     signature=signature
            )

forge :

[
'd4b5d8500a915baedd9ceef64ff06cb835522181d0cdc0e45f4064d63686eb656c00096727d05e96b8b4806d1414b5c99a1bee604053efae06a685ba0180bd3fe0d403000196a984821b3bc1ece36dc30bf77ceb9f3034b40e00ffff116f70656e736f757263655f6f726967696e0000000c070700a03e01000000025164', 
{'protocol': 'PsCARTHAGazKbHtnKfLzQg3kms52kSRpgnDY982a9oYsSXRLQEb', 'branch': 'BMKxjceCvX2YaRJcdmKhphiZSdvSaBZ5VUiJbGDBnx26VjhTXWP', 'contents': [{'kind': 'transaction', 'source': 'tz1LVkMDYV4AqLEgPDjd2c9zwZ2Wq76dqRYC', 'fee': '104303', 'counter': '3048102', 'gas_limit': '1040000', 'storage_limit': '60000', 'amount': '0', 'destination': 'KT1NKPzq6Rz1Kv5L4MbXdh5hE7rmV2NGbYkH', 'parameters': {'entrypoint': 'opensource_origin', 'value': {'prim': 'Pair', 'args': [{'int': '4000'}, {'string': 'Qd'}]}}}], 'signature': None}
]

operation group with signature:

{'protocol': 'PsCARTHAGazKbHtnKfLzQg3kms52kSRpgnDY982a9oYsSXRLQEb', 'branch': 'BMKxjceCvX2YaRJcdmKhphiZSdvSaBZ5VUiJbGDBnx26VjhTXWP', 'contents': [{'kind': 'transaction', 'source': 'tz1LVkMDYV4AqLEgPDjd2c9zwZ2Wq76dqRYC', 'fee': '104303', 'counter': '3048102', 'gas_limit': '1040000', 'storage_limit': '60000', 'amount': '0', 'destination': 'KT1NKPzq6Rz1Kv5L4MbXdh5hE7rmV2NGbYkH', 'parameters': {'entrypoint': 'opensource_origin', 'value': {'prim': 'Pair', 'args': [{'int': '4000'}, {'string': 'Qm'}]}}}], 'signature': 'sigqaQTU6JaDGog3g2Th3ppRjtDVETzSmTvM1vHMBGEpvwpsR9mP2ZZAhJqBhPTyHgGwQzXqZej7W3R3yfkV2Q58EhiHFK6U'}

error:

rpc.node.RpcError: ({'id': 'proto.006-PsCARTHA.operation.invalid_signature', 'kind': 'permanent'}

any help debugging it is welcome.

I'm also aware that there's the possibility of broadcasting from a smart contract, anyone has references on that?

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.