如何使用rpc解析操作端点
1 个回答
- 投票数
-
- 2019-05-10
问题在于/parse/operations需要签名的操作.您可以只在末尾添加64个零字节:
{ "operations": [ { "data": "0800002122d44d997e158c36c60649d198c4175dad425efa09d2a405f44e00f6f0b40201420eaa410ac21addf427211cddd6115cba385a94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "branch": "BLpcXF8ADJbGuyUKNv7TypXRd5rqnoPn3PMqJLNBeRSr4VFeUuK" } ] }
请注意,如果您信任这些RPC的输出,则您信任节点.
还请注意,/parse/operations的" check_signature"选项无效,如您将其设置为true所见...
The problem is that /parse/operations expects signed operations. You can just add 64 zero bytes to the end:
{ "operations": [ { "data": "0800002122d44d997e158c36c60649d198c4175dad425efa09d2a405f44e00f6f0b40201420eaa410ac21addf427211cddd6115cba385a94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "branch": "BLpcXF8ADJbGuyUKNv7TypXRd5rqnoPn3PMqJLNBeRSr4VFeUuK" } ] }
Be warned that if you trust the output of these RPCs, you are trusting the node.
Also notice that the "check_signature" option for /parse/operations has no effect, as you can see by setting it to true...
-
您能举一个完整的例子,先进行伪造,签名然后解析吗?即使加上0后,我仍然无法解析工作.Could you give a complete example of this, doing a forge, sign, then parse? Even after adding the 0's, I still cannot get parse to work.
- 0
- 2019-09-17
- utdrmac
-
我想问题+答案给出了一个完整的例子,我可能会在以后的某个时间扩展答案.快速检查两次:您添加了128个零(=64个零字节)?您从伪造中剥离了前32个字节(64个字符),这是分支/块哈希?(我没有在回答中提及这一点.)I guess the question + answer gives a complete example, I might expand the answer sometime later. Two quick checks: You added 128 zeros (= 64 zero bytes)? You stripped off the first 32 bytes (64 characters) from forge, which are the branch / block hash? (I failed to mention that in my answer.)
- 0
- 2019-09-18
- Tom
-
上面的示例都涉及转移操作,我正在尝试对背书进行解码.它们有些不同.阅读其他文章和ocaml代码后,我可以使它工作.谢谢The above examples all deal with transfer operations and I was trying to decode an endorsement. They are a bit different. I was able to get it working after reading some other posts and ocaml code. Thanks
- 0
- 2019-09-19
- utdrmac
我正在尝试查询RPC 解析操作端点
RPC文档仅声明此端点
Parse operations
,我似乎找不到在网络上使用它的示例.我的目标是基本上扭转伪造端点 以便从十六进制编码操作中获取JSON.
这是我用来查询端点的步骤:
伪造操作
查询:
身体:
响应:
现在尝试反转伪造操作
查询:
身体:
响应:
解析操作终结点是否确实在按照我的期望进行? 如果是这样,应该如何查询该端点以反转伪造端点?