双签名过程 #5
pfcoder
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
参数签名使用APP用户账户和授信服务端账户共同签名方式,对同一个参数结构体进行签名,以保证该结构体成员值得到双方确认。
内部流程:结构体编码成统一字节流(Parity Scale Codec), 该字节流可保证在JS code和链代码(Rust code)一致性。
JS侧: 调用paramsSign 进行结构编码及签名
链侧:调用encode 和 verifySign 进行结构编码及签名校验
具体到APP端,各接口需要签名的会封装单独接口,以评论接口为例:
该接口返回对参数的字节流签名
服务端接口,采用统一封装:
Beta Was this translation helpful? Give feedback.
All reactions