public class Proofs extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected CommitmentType |
type |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
addCommitment(PedersenCommitment commitment)
Add commitment boolean.
|
boolean |
addRangeProof(List<Long> values,
List<Long> minValues,
List<byte[]> blindValues,
List<Integer> commitments)
Add range proof boolean.
|
boolean |
addRangeProof(List<Long> values,
long minValue,
List<byte[]> blindValues,
List<Integer> commitments)
Add range proof boolean.
|
static void |
cancelPreVerify(String txHash)
Cancel pre verify.
|
static Proofs |
createProofs(byte[] proofs,
String txHash)
Create proofs proofs.
|
void |
destory()
Destory.
|
static void |
destroyProofs(String txHash)
Destroy proofs.
|
boolean |
formBytes(byte[] proofs)
Form bytes boolean.
|
long |
getPtr()
Getter method for property ptr.
|
boolean |
nativeAddRangeProof(long[] values,
long[] minValues,
byte[][] blindValues,
int[] commitments)
Native add range proof boolean.
|
static void |
nativeCancelPreVerify(String txHash)
Native cancel pre verify.
|
static long |
nativeCreateProofs(byte[] proofs,
String txHash)
Native create proofs long.
|
boolean |
nativeFormBytes(byte[] proofs)
Native form bytes boolean.
|
protected static long |
nativeGetProofs(String txHash) |
void |
nativeSetBlindDelta(byte[] delta)
Native set blind delta.
|
boolean |
nativeVerifyBalance()
Native verify balance boolean.
|
boolean |
nativeVerifyCommitment(int type,
int index,
byte[] pubkey,
byte[] valueEnc)
Native verify commitment boolean.
|
boolean |
nativeVerifyRange(int index,
long minValue)
Native verify range boolean.
|
boolean |
nativeVerifyRange(int index,
long[] minValues)
Native verify range boolean.
|
void |
setBlindDelta(byte[] delta)
Sets blind delta.
|
byte[] |
toBytes()
To bytes byte [ ].
|
boolean |
verifyBalance()
Verify balance boolean.
|
static boolean |
verifyBalance(String txHash,
int index)
Verify balance boolean.
|
boolean |
verifyCommitment(CommitmentType type,
int index,
byte[] pubkey,
byte[] valueEnc)
Verify commitment boolean.
|
static boolean |
verifyCommitment(String txHash,
CommitmentType type,
int index,
byte[] pubkey,
byte[] valueEnc)
Verify commitment boolean.
|
boolean |
verifyRange(int index,
List<Long> minValues)
Verify range boolean.
|
boolean |
verifyRange(int index,
long minValue)
Verify range boolean.
|
static boolean |
verifyRange(String txHash,
int index,
long minValue)
Verify range boolean.
|
protected final CommitmentType type
public Proofs()
public Proofs(long ptr)
ptr - the ptrpublic static Proofs createProofs(byte[] proofs, String txHash)
proofs - the proofstxHash - the tx hashpublic static long nativeCreateProofs(byte[] proofs,
String txHash)
proofs - the proofstxHash - the tx hashpublic static void destroyProofs(String txHash)
txHash - the tx hashpublic static boolean verifyCommitment(String txHash, CommitmentType type, int index, byte[] pubkey, byte[] valueEnc)
txHash - the tx hashtype - the typeindex - the indexpubkey - the pubkeyvalueEnc - the value encpublic static boolean verifyRange(String txHash, int index, long minValue)
txHash - the tx hashindex - the indexminValue - the min valuepublic static boolean verifyBalance(String txHash, int index)
txHash - the tx hashindex - the indexpublic static void cancelPreVerify(String txHash)
txHash - the tx hashpublic static void nativeCancelPreVerify(String txHash)
txHash - the tx hashprotected static long nativeGetProofs(String txHash)
public void destory()
public boolean addCommitment(PedersenCommitment commitment)
commitment - the commitmentpublic void setBlindDelta(byte[] delta)
delta - the deltapublic void nativeSetBlindDelta(byte[] delta)
delta - the deltapublic boolean addRangeProof(List<Long> values, long minValue, List<byte[]> blindValues, List<Integer> commitments)
values - the valuesminValue - the min valueblindValues - the blind valuescommitments - the commitmentspublic boolean addRangeProof(List<Long> values, List<Long> minValues, List<byte[]> blindValues, List<Integer> commitments)
values - the valuesminValues - the min valuesblindValues - the blind valuescommitments - the commitmentspublic boolean nativeAddRangeProof(long[] values,
long[] minValues,
byte[][] blindValues,
int[] commitments)
values - the valuesminValues - the min valuesblindValues - the blind valuescommitments - the commitmentspublic boolean verifyCommitment(CommitmentType type, int index, byte[] pubkey, byte[] valueEnc)
type - the typeindex - the indexpubkey - the pubkeyvalueEnc - the value encpublic boolean nativeVerifyCommitment(int type,
int index,
byte[] pubkey,
byte[] valueEnc)
type - the typeindex - the indexpubkey - the pubkeyvalueEnc - the value encpublic boolean verifyBalance()
public boolean nativeVerifyBalance()
public boolean verifyRange(int index,
long minValue)
index - the indexminValue - the min valuepublic boolean nativeVerifyRange(int index,
long minValue)
index - the indexminValue - the min valuepublic boolean verifyRange(int index,
List<Long> minValues)
index - the indexminValues - the min valuespublic boolean nativeVerifyRange(int index,
long[] minValues)
index - the indexminValues - the min valuespublic boolean formBytes(byte[] proofs)
proofs - the proofspublic boolean nativeFormBytes(byte[] proofs)
proofs - the proofspublic final byte[] toBytes()
public long getPtr()
Copyright © 2022. All rights reserved.