- Source:
Classes
- Ack
- DirectTransfer
- Hashable
- Lock
- LockedTransfer
- MediatedTransfer
- OpenLock
- Proof
- ProofMessage
- RequestSecret
- RevealSecret
- SecretToProof
- SignedMessage
Members
(static, constant) EMPTY_20BYTE_BUFFER :Buffer
Type:
- Buffer
- Source:
(static, constant) EMPTY_32BYTE_BUFFER :Buffer
Type:
- Buffer
- Source:
Methods
(static) checkMerkleProofOrdered()
Deprectated
- Source:
(static) DESERIALIZE(data)
Deserialize message object
Parameters:
Name | Type | Description |
---|---|---|
data |
string | serialized value |
- Source:
(static) DESERIALIZE_AND_DECODE_MESSAGE(data) → {SignedMessage}
Deserialize a received message and create the appropriate object type based on classType property
Parameters:
Name | Type | Description |
---|---|---|
data |
string | serialized value |
- Source:
Returns:
- message type
- Type
- SignedMessage
(static) GenerateRandomSecretHashPair() → {SecretHashPair}
Generate random secret and corresponding keccak256 hash
- Source:
Returns:
- Type
- SecretHashPair
(static) JSON_REVIVER_FUNC(k, v)
A reviver function to be sent to JSON.parse to handle buffer serialization and deserialization
Parameters:
Name | Type | Description |
---|---|---|
k |
||
v |
- Source:
Returns:
- deserialized value
(static) SERIALIZE(msg) → {string}
Serialize message object
Parameters:
Name | Type | Description |
---|---|---|
msg |
SignedMessage | message.SignedMessage base class type |
- Source:
Returns:
- serialized value
- Type
- string
(static) StartEntropyCollector()
Entropy collector for SJCL when generating random secrets. Currently, this is broken on mobile platforms and seeding should be done manually.
Refer to: https://github.com/bitwiseshiftleft/sjcl/wiki/Symmetric-Crypto#seeding-the-generator
- Source:
(static) TO_BN(value) → {BN}
Convert a base 16 int to a BN
Parameters:
Name | Type | Description |
---|---|---|
value |
int | convert base 16 value to bn |
- Source:
Returns:
- Type
- BN