- Source:
Methods
(static) initTxn(from, to, amount) → {object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
from |
string
|
Sender address |
to |
string
|
Receiver address |
amount |
number
|
Send amount |
Returns:
- Type:
-
object
transaction object
Example
signature.initTxn()
// returns
(static) signMsg(prikey, msg) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
prikey |
string
|
Privatekey used to sign message |
msg |
string
|
Message to be signed |
Returns:
- Type:
-
string
String signature
Example
signature.signMsg()
// returns
(static) signTxn(prikey, tx) → {object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
prikey |
string
|
Privatekey used to sign transaction |
tx |
object
|
Transaction object to be signed |
Returns:
- Type:
-
object
Signed transaction object
Example
signature.signTxn()
// returns
(static) tellMsg(sign, msg) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sign |
string
|
Signature of signed message |
msg |
string
|
Signed message |
Returns:
- Type:
-
string
Address string
Example
signature.tellMsg()
// returns
(static) tellTxn(sign, hash) → {string}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sign |
string
|
Signature of signed transaction |
hash |
string
|
Hash of transaction |
Returns:
- Type:
-
string
Address string
Example
signature.tellTxn()
// returns