区块链服务 BCS-Chaincode库接口:ValidateTxInfo
ValidateTxInfo
- 接口原型
ValidateTxInfo(txInfo, cipherBalanceA, cipherBalanceB string) (newCipherBalanceA,newCipherBalanceB,newCipherTxA,newCipherTxB string,err error)
- 功能描述
校验PrepareTxInfo生成的Txinfo中交易证明的有效性。
- 输入说明
参数名
类型
描述
是否必须
txinfo
string
交易证明数据
说明:交易信息数据包含有交易密文数据和交易证明数据,该信息来源于sdk.PrepareTxInfo返回的txinfo信息。
是
cipherBalanceA
string
A当前的交易余额(密文)
是
cipherBalanceB
string
B当前的交易余额(密文)
是
- 输出说明
参数名
类型
描述
newCipherBalanceA
string
交易后待更新的A的余额
newCipherBalanceB
string
交易后待更新的B的余额
newCipherTxA
string
交易金额(A的同态加密公钥加密)
newCipherTxB
string
交易金额(B的同态加密公钥加密)
err
error
错误
- 注意事项
这里A是转账方,B是收款方。