Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some transactions fail to sign with appkit, succeed with node #173

Open
Luivatra opened this issue Jun 27, 2022 · 4 comments
Open

Some transactions fail to sign with appkit, succeed with node #173

Luivatra opened this issue Jun 27, 2022 · 4 comments

Comments

@Luivatra
Copy link

Some of my pure p2s transactions reduce to false with the appkit but sign fine using the node.

Testnet example:
UnsignedTx:
{'inputs': [{'boxId': '6ee4d5d0dc518d52386cef251efa732680a8600ecac87ee3ad95c7aa1d8282b3', 'value': '1000000', 'ergoTree': '104e0402040004020400040204000400040204020404040404060406040004000408040404080e20ec7db8b46327614a657fe8f7391a9c264d86b7aca5832d52148ce1e38436dc6b0e20b64a4682c11a4f02a50ba8f7d6587daebb93e55199f33a108c987ffb2cbd16f30500040204000406040404020404040005020502040004020580dddb01050205d00f040205020402040204020404040004000502040404000402050201000e208557834f67bdc177ee9528d7d0faf33ef025666f1f45a70e7e57d32f327dcec40404050204000e2083759b1a3d080d043db81acd10e1a6cb5b6fff8815b32c0ccc3380a9691ad909040205020404050001000402040204000500040404000502050005020500050004000402040004020402040205d00f0100d829d601b2a5730000d602db63087201d603b27202730100d6048c720301d605db6308a7d606b27205730200d6078c720601d6089372047207d609b2a5730300d60adb63087209d60bb2720a730400d60c8c720b02d60d8c720602d60ee4c6a70411d60fb2720e730500d610e4c672090411d611b27210730600d612b27210730700d613b2720e730800d614b2720e730900d615b27210730a00d616b27210730b00d617b2720e730c00d618b2720a730d00d619b27205730e00d61ab2720e730f00d61b9683070193c17209c1a793c27209c2a7938c7218018c721901938c7218028c721902938c720b01720793b1720a731093b27210731100721ad61c7312d61ddb6903db6503fed61e8c720302d61f7313d62086028300027314d621b2a4731500d622db63087221d623b27222731600d6248c722301d62592b1a47317d626e4c672210411d627e4c67221050ed628b2a5731800d629db63087228d1ecec957208958f720c720dd806d62ab27202731900d62b8c722a02d62ce4c672010411d62de4c67201050ed62eb2a5731a00d62fb2db6308722e731b009683030196830601721b9372119a720f722b93721272139372159a7214731c937216721793720c99720d731d9683080193cbc27201721c93b2722c731e00721392b2722c731f0099721d732093722dc5a7720893721e7321938c722a01721f92722b73229683030193c2722ee4c6b2a4732300050e938c722f01722d938c722f027324d807d62ab27202732500d62b8c722a02d62cb2a4732600d62d8cb2db6308722c732701722002d62ee4c672010411d62fe4c67201050ed630b2db6308b2a57328007329009683030196830601721b9372119a720f99722b722d93721272139372157214937216721793720c720d96830a0193c17201c1722c93cbc27201721c93cbc2722c721c93b2722e732a00721393722ee4c6722c041193722fe4c6722c050e720893721e732b938c722a01721f93722b9a722d8cb2db6308b2a4732c01b2a4732d00732e000296830201938c723001722f938c723002732f7330959683020193722473317225d802d62ab2a4733200d62be4c6722a04119683020196830601721b9372129a7213733393721572149372169a7217721a8f7216721d93720c720d96830301938cb2db6308722a73340001733593b2722b733600997213733793b2722b7338007339733a959683030191720f7211722591b17222733bd807d62ab27222733c00d62b99720f7211d62c998c722a02722bd62d8c722a01d62eb27226733d00d62f90722c733ed6309683040196830201937224720793722e7213938cb2db6308b2a4733f0073400001722796830601721b93721199720f722b937212721393721599721495722f73417342937216721793720c9a720d95722f7343734496830201937204722d93721e722b9591722c7345d803d631b272297346017220d632b27229734700d633e4c672280411968303017230968302019683080193c17228c1722193c27228c27221938c7231017224938c7231028c722302938c723201722d938c723202722c93b27233734800722e93b27233734900b27226734a00938cb27202734b01722001722792722c734c7230734d', 'creationHeight': 257321, 'assets': [{'tokenId': '99272858f97ca9c1e6a313f1fb4c5e27912e0a7a5a76ceb065e52c3c11b6e647', 'amount': '1'}, {'tokenId': '21038855e00a9e767ffbeb9bbc1f59c39555e9e11652dcb5a0f689b53d78b197', 'amount': '999999999988'}], 'additionalRegisters': {'R4': '110580d30e00188098fe96a56080f0b252'}, 'transactionId': '423909c8e0f1354694bc7a74711cc41e10b577f36d1608e89454983ed389276e', 'index': 0, 'extension': {}}, {'boxId': 'a9322bc7e71916285855645ef65bd873c48e840ca4ca0e341fdb50721ced1375', 'value': '1000000', 'ergoTree': '101d040004000e2099272858f97ca9c1e6a313f1fb4c5e27912e0a7a5a76ceb065e52c3c11b6e6470402040204020404040404020500040005c80104060400040004020402040004000400040204000e240008cd02189359b825e96aa3c7af90c9958d85daf8f86358382db3306e024c5aeea1e8ec0580897a01010100040004000100d802d601b2a4730000d602c5a7d1ec9596830201938cb2db6308720173010001730293c5b2a47303007202d80cd603b2a5730400d604db63087203d605db6308a7d606b27205730500d607db6308b2a4730600d6089592b1720773078cb27207730800027309d6099a8c7206027208d60ae4c6a70411d60bb2720a730a00d60c8c720601d60d9d720b730bd60eb2a5730c00968302019683070193c17203c1a793c27203c2a7938cb27204730d00018cb27205730e000195917209720bd801d60fb27204730f0096830201938c720f01720c938c720f02997209720b93b17204731093e4c672030411720a93e4c67203050ee4c6a7050e93b2e4c6b2a57311000411731200999ab2e4c67201041173130099720b720d72089591b172047314d801d60fb2db6308720e7315009683040193c2720e731693c1720e7317938c720f01720c938c720f02720d731873199593c572017202938cb2db6308b2a5731a00731b0001e4c6a7050e731c', 'creationHeight': 257244, 'assets': [{'tokenId': '8557834f67bdc177ee9528d7d0faf33ef025666f1f45a70e7e57d32f327dcec4', 'amount': '1'}, {'tokenId': 'b64a4682c11a4f02a50ba8f7d6587daebb93e55199f33a108c987ffb2cbd16f3', 'amount': '50000000000'}], 'additionalRegisters': {'R4': '1101a0cda38502', 'R5': '0e2014d5b543223eb8e67ea70c1884118122c77dfb0020140fc93cedded89186e582'}, 'transactionId': '70201e1fbd3067905ac77b7a3e58076b78995e1e9a347a303fd7d0bef2d7e7af', 'index': 1, 'extension': {}}, {'boxId': '0361723110b35154298317f604d645af873060970067b9867c4b835225063a3a', 'value': '1000000', 'ergoTree': '102d0400040404020e20b64a4682c11a4f02a50ba8f7d6587daebb93e55199f33a108c987ffb2cbd16f3040004000e2099272858f97ca9c1e6a313f1fb4c5e27912e0a7a5a76ceb065e52c3c11b6e6470404040604000402040205000402040004060400040605c8010400040001000402040004000e2021038855e00a9e767ffbeb9bbc1f59c39555e9e11652dcb5a0f689b53d78b197040004020100040606010004020400040004000402040204000404040004040404040404060100d807d601b2a4730000d602c5a7d603b2a5730100d604b2a4730200d6057303d606b2a5730400d607db6308a7d1ec9596830201938cb2db6308720173050001730693c5b2a47307007202d807d608e4c672030411d609b27208730800d60ab2e4c672040411730900d60bdb6308a7d60c9a8cb2db63087204730a00028cb2720b730b018602830002730c02d60ddb63087203d60eb2720d730d009683070193c17203c1a793c27203c2a793b47208730e730fb4e4c67201041173107311937209958f720a720c99720a9d720a7312720c938cb2720d731300018cb2720b73140001938c720e017205938c720e02720973159593c572017202d807d608db63087206d6097e8cb272077316000206d60ab5a4d9010a63d801d60cdb6308720a9591b1720c7317ed938cb2720c73180001731993b2e4c6720a0411731a00b2e4c6a70411731b00731cd60be4c6a70411d60cb2720b731d00d60db0720a731ed9010d42639a8c720d019d9c7e8cb2db63088c720d02731f0002067e720c067eb2720b73200006d60ee4c6720604119683070193c17206c1a793c27206c2a7938cb27208732100018cb272077322000195907209720d93b172087323d801d60fb27208732400ed938c720f017205927e8c720f0206997209720d93b4720e73257326b4720b7327732893b2720e73290099b2720b732a007eb1720a0593b2720e732b00720c732c', 'creationHeight': 257244, 'assets': [{'tokenId': '83759b1a3d080d043db81acd10e1a6cb5b6fff8815b32c0ccc3380a9691ad909', 'amount': '1'}], 'additionalRegisters': {'R4': '1104000100a0cda38502'}, 'transactionId': '70201e1fbd3067905ac77b7a3e58076b78995e1e9a347a303fd7d0bef2d7e7af', 'index': 2, 'extension': {}}, {'boxId': '33c2e2f9e6c9cbb6f3e8e9290deaee980d8c0ac202f2272cb85cb27bc6344cf1', 'value': '100000000', 'ergoTree': '102f048084af5f04060400040205c0843d04040580897a010005000e2083759b1a3d080d043db81acd10e1a6cb5b6fff8815b32c0ccc3380a9691ad9090406040004000e2099272858f97ca9c1e6a313f1fb4c5e27912e0a7a5a76ceb065e52c3c11b6e6470404040004020100040805809bee020580897a0580897a040a05809bee02040c0580897a0100040004020400040004000e2021038855e00a9e767ffbeb9bbc1f59c39555e9e11652dcb5a0f689b53d78b19704000402010005c0843d05e0a7120580897a05c09a0c040404020100040004000e2014d5b543223eb8e67ea70c1884118122c77dfb0020140fc93cedded89186e5820100d80ad601c1a7d60295968302019072017e73000593b1a57301d802d602b2a5730200d603c2a7968303019683020191c17202720193c27202720393c1b2a57303009c73047eb1b5a4d901046393c2720472030593c1b2a573050073067307d603b1a4d60486028300027308d6057309d606c2a7d6079595927203730a96830301938cb2db6308b2a4730b00730c01720401730d938cb2db6308b2a4730e00730f01720401720593c5b2a4997203731000c5a77311d801d607b2a5731200968303019683020192c17207999999720173137314731593c27207720693c1b2a5731600731793c1b2a57318007319731ad608b2a4731b00d609997203731cd60a9596830201938cb2db63087208731d01720401720593c5b2a4720900c5a7d805d60ab1b5a4d9010a63d801d60cdb6308720a9591b1720c731e96830201938cb2720c731f0001732093b2e4c6720a0411732100b2e4c6720804117322007323d60bb2a5720900d60c7e720a05d60d9a73249c7325720cd60e9a73269c7327720c968304019372039a720a73289683020192c1720b99997201720d720e93c2720b720693c1b2a5720300720d93c1b2a59a7203732900720e732ad1ececec72027207720a95efecec72027207720a938cb2db6308b2a5732b00732c0001732d732e', 'creationHeight': 257321, 'assets': [], 'additionalRegisters': {}, 'transactionId': '423909c8e0f1354694bc7a74711cc41e10b577f36d1608e89454983ed389276e', 'index': 3, 'extension': {}}], 'dataInputs': [], 'outputs': [{'value': '1000000', 'ergoTree': '104e0402040004020400040204000400040204020404040404060406040004000408040404080e20ec7db8b46327614a657fe8f7391a9c264d86b7aca5832d52148ce1e38436dc6b0e20b64a4682c11a4f02a50ba8f7d6587daebb93e55199f33a108c987ffb2cbd16f30500040204000406040404020404040005020502040004020580dddb01050205d00f040205020402040204020404040004000502040404000402050201000e208557834f67bdc177ee9528d7d0faf33ef025666f1f45a70e7e57d32f327dcec40404050204000e2083759b1a3d080d043db81acd10e1a6cb5b6fff8815b32c0ccc3380a9691ad909040205020404050001000402040204000500040404000502050005020500050004000402040004020402040205d00f0100d829d601b2a5730000d602db63087201d603b27202730100d6048c720301d605db6308a7d606b27205730200d6078c720601d6089372047207d609b2a5730300d60adb63087209d60bb2720a730400d60c8c720b02d60d8c720602d60ee4c6a70411d60fb2720e730500d610e4c672090411d611b27210730600d612b27210730700d613b2720e730800d614b2720e730900d615b27210730a00d616b27210730b00d617b2720e730c00d618b2720a730d00d619b27205730e00d61ab2720e730f00d61b9683070193c17209c1a793c27209c2a7938c7218018c721901938c7218028c721902938c720b01720793b1720a731093b27210731100721ad61c7312d61ddb6903db6503fed61e8c720302d61f7313d62086028300027314d621b2a4731500d622db63087221d623b27222731600d6248c722301d62592b1a47317d626e4c672210411d627e4c67221050ed628b2a5731800d629db63087228d1ecec957208958f720c720dd806d62ab27202731900d62b8c722a02d62ce4c672010411d62de4c67201050ed62eb2a5731a00d62fb2db6308722e731b009683030196830601721b9372119a720f722b93721272139372159a7214731c937216721793720c99720d731d9683080193cbc27201721c93b2722c731e00721392b2722c731f0099721d732093722dc5a7720893721e7321938c722a01721f92722b73229683030193c2722ee4c6b2a4732300050e938c722f01722d938c722f027324d807d62ab27202732500d62b8c722a02d62cb2a4732600d62d8cb2db6308722c732701722002d62ee4c672010411d62fe4c67201050ed630b2db6308b2a57328007329009683030196830601721b9372119a720f99722b722d93721272139372157214937216721793720c720d96830a0193c17201c1722c93cbc27201721c93cbc2722c721c93b2722e732a00721393722ee4c6722c041193722fe4c6722c050e720893721e732b938c722a01721f93722b9a722d8cb2db6308b2a4732c01b2a4732d00732e000296830201938c723001722f938c723002732f7330959683020193722473317225d802d62ab2a4733200d62be4c6722a04119683020196830601721b9372129a7213733393721572149372169a7217721a8f7216721d93720c720d96830301938cb2db6308722a73340001733593b2722b733600997213733793b2722b7338007339733a959683030191720f7211722591b17222733bd807d62ab27222733c00d62b99720f7211d62c998c722a02722bd62d8c722a01d62eb27226733d00d62f90722c733ed6309683040196830201937224720793722e7213938cb2db6308b2a4733f0073400001722796830601721b93721199720f722b937212721393721599721495722f73417342937216721793720c9a720d95722f7343734496830201937204722d93721e722b9591722c7345d803d631b272297346017220d632b27229734700d633e4c672280411968303017230968302019683080193c17228c1722193c27228c27221938c7231017224938c7231028c722302938c723201722d938c723202722c93b27233734800722e93b27233734900b27226734a00938cb27202734b01722001722792722c734c7230734d', 'assets': [{'tokenId': '99272858f97ca9c1e6a313f1fb4c5e27912e0a7a5a76ceb065e52c3c11b6e647', 'amount': '1'}, {'tokenId': '21038855e00a9e767ffbeb9bbc1f59c39555e9e11652dcb5a0f689b53d78b197', 'amount': '999999999988'}], 'additionalRegisters': {'R4': '1105b8e8e3820202188088b1e9a56080f0b252'}, 'creationHeight': 257330}, {'value': '1000000', 'ergoTree': '101d040004000e2099272858f97ca9c1e6a313f1fb4c5e27912e0a7a5a76ceb065e52c3c11b6e6470402040204020404040404020500040005c80104060400040004020402040004000400040204000e240008cd02189359b825e96aa3c7af90c9958d85daf8f86358382db3306e024c5aeea1e8ec0580897a01010100040004000100d802d601b2a4730000d602c5a7d1ec9596830201938cb2db6308720173010001730293c5b2a47303007202d80cd603b2a5730400d604db63087203d605db6308a7d606b27205730500d607db6308b2a4730600d6089592b1720773078cb27207730800027309d6099a8c7206027208d60ae4c6a70411d60bb2720a730a00d60c8c720601d60d9d720b730bd60eb2a5730c00968302019683070193c17203c1a793c27203c2a7938cb27204730d00018cb27205730e000195917209720bd801d60fb27204730f0096830201938c720f01720c938c720f02997209720b93b17204731093e4c672030411720a93e4c67203050ee4c6a7050e93b2e4c6b2a57311000411731200999ab2e4c67201041173130099720b720d72089591b172047314d801d60fb2db6308720e7315009683040193c2720e731693c1720e7317938c720f01720c938c720f02720d731873199593c572017202938cb2db6308b2a5731a00731b0001e4c6a7050e731c', 'assets': [{'tokenId': '8557834f67bdc177ee9528d7d0faf33ef025666f1f45a70e7e57d32f327dcec4', 'amount': '1'}, {'tokenId': 'b64a4682c11a4f02a50ba8f7d6587daebb93e55199f33a108c987ffb2cbd16f3', 'amount': '49726030000'}], 'additionalRegisters': {'R4': '1101a0cda38502', 'R5': '0e2014d5b543223eb8e67ea70c1884118122c77dfb0020140fc93cedded89186e582'}, 'creationHeight': 257330}, {'value': '1000000', 'ergoTree': '102d0400040404020e20b64a4682c11a4f02a50ba8f7d6587daebb93e55199f33a108c987ffb2cbd16f3040004000e2099272858f97ca9c1e6a313f1fb4c5e27912e0a7a5a76ceb065e52c3c11b6e6470404040604000402040205000402040004060400040605c8010400040001000402040004000e2021038855e00a9e767ffbeb9bbc1f59c39555e9e11652dcb5a0f689b53d78b197040004020100040606010004020400040004000402040204000404040004040404040404060100d807d601b2a4730000d602c5a7d603b2a5730100d604b2a4730200d6057303d606b2a5730400d607db6308a7d1ec9596830201938cb2db6308720173050001730693c5b2a47307007202d807d608e4c672030411d609b27208730800d60ab2e4c672040411730900d60bdb6308a7d60c9a8cb2db63087204730a00028cb2720b730b018602830002730c02d60ddb63087203d60eb2720d730d009683070193c17203c1a793c27203c2a793b47208730e730fb4e4c67201041173107311937209958f720a720c99720a9d720a7312720c938cb2720d731300018cb2720b73140001938c720e017205938c720e02720973159593c572017202d807d608db63087206d6097e8cb272077316000206d60ab5a4d9010a63d801d60cdb6308720a9591b1720c7317ed938cb2720c73180001731993b2e4c6720a0411731a00b2e4c6a70411731b00731cd60be4c6a70411d60cb2720b731d00d60db0720a731ed9010d42639a8c720d019d9c7e8cb2db63088c720d02731f0002067e720c067eb2720b73200006d60ee4c6720604119683070193c17206c1a793c27206c2a7938cb27208732100018cb272077322000195907209720d93b172087323d801d60fb27208732400ed938c720f017205927e8c720f0206997209720d93b4720e73257326b4720b7327732893b2720e73290099b2720b732a007eb1720a0593b2720e732b00720c732c', 'assets': [{'tokenId': '83759b1a3d080d043db81acd10e1a6cb5b6fff8815b32c0ccc3380a9691ad909', 'amount': '1'}, {'tokenId': 'b64a4682c11a4f02a50ba8f7d6587daebb93e55199f33a108c987ffb2cbd16f3', 'amount': '271230300'}], 'additionalRegisters': {'R4': '110480d30e0018b895d58202'}, 'creationHeight': 257330}, {'value': '1000000', 'ergoTree': '0008cd02189359b825e96aa3c7af90c9958d85daf8f86358382db3306e024c5aeea1e8ec', 'assets': [{'tokenId': 'b64a4682c11a4f02a50ba8f7d6587daebb93e55199f33a108c987ffb2cbd16f3', 'amount': '2739700'}], 'additionalRegisters': {}, 'creationHeight': 257330}, {'value': '95000000', 'ergoTree': '102f048084af5f04060400040205c0843d04040580897a010005000e2083759b1a3d080d043db81acd10e1a6cb5b6fff8815b32c0ccc3380a9691ad9090406040004000e2099272858f97ca9c1e6a313f1fb4c5e27912e0a7a5a76ceb065e52c3c11b6e6470404040004020100040805809bee020580897a0580897a040a05809bee02040c0580897a0100040004020400040004000e2021038855e00a9e767ffbeb9bbc1f59c39555e9e11652dcb5a0f689b53d78b19704000402010005c0843d05e0a7120580897a05c09a0c040404020100040004000e2014d5b543223eb8e67ea70c1884118122c77dfb0020140fc93cedded89186e5820100d80ad601c1a7d60295968302019072017e73000593b1a57301d802d602b2a5730200d603c2a7968303019683020191c17202720193c27202720393c1b2a57303009c73047eb1b5a4d901046393c2720472030593c1b2a573050073067307d603b1a4d60486028300027308d6057309d606c2a7d6079595927203730a96830301938cb2db6308b2a4730b00730c01720401730d938cb2db6308b2a4730e00730f01720401720593c5b2a4997203731000c5a77311d801d607b2a5731200968303019683020192c17207999999720173137314731593c27207720693c1b2a5731600731793c1b2a57318007319731ad608b2a4731b00d609997203731cd60a9596830201938cb2db63087208731d01720401720593c5b2a4720900c5a7d805d60ab1b5a4d9010a63d801d60cdb6308720a9591b1720c731e96830201938cb2720c731f0001732093b2e4c6720a0411732100b2e4c6720804117322007323d60bb2a5720900d60c7e720a05d60d9a73249c7325720cd60e9a73269c7327720c968304019372039a720a73289683020192c1720b99997201720d720e93c2720b720693c1b2a5720300720d93c1b2a59a7203732900720e732ad1ececec72027207720a95efecec72027207720a938cb2db6308b2a5732b00732c0001732d732e', 'assets': [], 'additionalRegisters': {}, 'creationHeight': 257330}, {'value': '3000000', 'ergoTree': '0008cd03d9d11f15c9564a310361e6c0edd34be6838d3cd811ec449f1bbce334599e0d01', 'assets': [], 'additionalRegisters': {}, 'creationHeight': 257330}, {'value': '1000000', 'ergoTree': '1005040004000e36100204900108cd0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ea02d192a39a8cc7a701730073011001020402d19683030193a38cc7b2a57300000193c2b2a57301007473027303830108cdeeac93b1a57304', 'assets': [], 'additionalRegisters': {}, 'creationHeight': 257330}]}

@Luivatra
Copy link
Author

UnsignedTransaction is created with:
`@JImplements(java.util.function.Function)
class BuildUnsignedTransactionExecutor(object):

    def __init__(self,  inputs: List[InputBox], outputs: List[OutBox], fee: int, sendChangeTo: ErgoAddress, tokensToBurn: Dict[str,int] = None, dataInputs: List[InputBox] = None, preHeader: PreHeader = None):
        self._inputs = inputs
        self._outputs = outputs
        self._fee = fee
        self._sendChangeTo = sendChangeTo
        self._tokensToBurn = tokensToBurn
        self._dataInputs = dataInputs
        self._preHeader = preHeader

    @JOverride
    def apply(self, ctx: BlockchainContextImpl) -> UnsignedTransaction:
        tb = ctx.newTxBuilder()
        if self._preHeader is not None:
            tb = tb.preHeader(self._preHeader)
        if self._dataInputs is not None:
            tb = tb.withDataInputs(java.util.ArrayList(self._dataInputs))
        if self._tokensToBurn is not None:
            tb = tb.tokensToBurn(ErgoAppKit.mapToErgoTokenList(self._tokensToBurn))
        tb = tb.boxesToSpend(java.util.ArrayList(self._inputs)).fee(self._fee).outputs(self._outputs).sendChangeTo(self._sendChangeTo)
        return tb.build()

def buildUnsignedTransaction(self, inputs: List[InputBox], outputs: List[OutBox], fee: int, sendChangeTo: ErgoAddress, tokensToBurn: Dict[str,int] = None, dataInputs: List[InputBox] = None, preHeader: PreHeader = None) -> UnsignedTransaction:
    return self._ergoClient.execute(ErgoAppKit.BuildUnsignedTransactionExecutor(inputs,outputs,fee,sendChangeTo,tokensToBurn,dataInputs,preHeader))`

@Luivatra
Copy link
Author

Signing is done like this:
`@JImplements(java.util.function.Function)
class SignTransactionExecutor(object):

    def __init__(self, unsignedTx: UnsignedTransaction):
        self._unsignedTx = unsignedTx

    @JOverride
    def apply(self, ctx: BlockchainContextImpl) -> SignedTransaction:
        prover = ctx.newProverBuilder().build()
        return prover.sign(self._unsignedTx)

def signTransaction(self, unsignedTx: UnsignedTransaction) -> SignedTransaction:
    try:
        return self._ergoClient.execute(ErgoAppKit.SignTransactionExecutor(unsignedTx))
    except UndeclaredThrowableException as e:
        raise e.getCause()`

@Luivatra
Copy link
Author

Recreated the issue in java: https://github.com/Luivatra/appkit-sign-problem

@MrStahlfelge
Copy link
Member

Unfortunately we can't see the contract's code in your repo. I assume there is a problem with the blockchain context in appkit slightly different than on node. I noticed that for example preheader contains values that might make signing impossible (#195).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants