Methods
(static) check(tx, view, flags) → {CheckResultPacket}
Execute tx.check() on worker.
Parameters:
Name | Type | Description |
---|---|---|
tx |
TX | |
view |
CoinView | |
flags |
VerifyFlags |
- Source:
- See:
-
- TX#check
Returns:
- Type
- CheckResultPacket
(static) checkInput(tx, index, coin, flags) → {CheckInputResultPacket}
Execute tx.checkInput() on worker.
Parameters:
Name | Type | Description |
---|---|---|
tx |
TX | |
index |
Number | |
coin |
Output | |
flags |
VerifyFlags |
- Source:
- See:
-
- TX#checkInput
Returns:
- Type
- CheckInputResultPacket
(static) ecSign(tx, index, flags) → {Boolean}
Execute secp256k1.sign() on worker.
Parameters:
Name | Type | Description |
---|---|---|
tx |
TX | |
index |
Number | |
flags |
VerifyFlags |
- Source:
- See:
-
- secp256k1.sign
Returns:
- Type
- Boolean
(static) ecVerify(tx, flags) → {Boolean}
Execute secp256k1.verify() on worker.
Parameters:
Name | Type | Description |
---|---|---|
tx |
TX | |
flags |
VerifyFlags |
- Source:
- See:
-
- secp256k1.verify
Returns:
- Type
- Boolean
(static) execute(cmd, args) → {Object}
Execute a job on the worker.
Parameters:
Name | Type | Description |
---|---|---|
cmd |
String | |
args |
Array |
- Source:
Throws:
on unknown command
Returns:
- Type
- Object
(static) handle(cmd, args) → {Object}
Execute a job on the worker.
Parameters:
Name | Type | Description |
---|---|---|
cmd |
String | |
args |
Array |
- Source:
Throws:
on unknown command
Returns:
- Type
- Object
(static) mine(data, target, min, max) → {Number}
Mine a block on worker.
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer | |
target |
Buffer | |
min |
Number | |
max |
Number |
- Source:
Returns:
- Type
- Number
(static) scrypt(passwd, salt, N, r, p, len) → {Buffer}
Execute scrypt() on worker.
Parameters:
Name | Type | Description |
---|---|---|
passwd |
Buffer | |
salt |
Buffer | |
N |
Number | |
r |
Number | |
p |
Number | |
len |
Number |
- Source:
- See:
-
- scrypt
Returns:
- Type
- Buffer
(static) sign(tx, ring, type)
Execute tx.sign() on worker.
Parameters:
Name | Type | Description |
---|---|---|
tx |
MTX | |
ring |
Array.<KeyRing> | |
type |
SighashType |
- Source:
- See:
-
- MTX#sign
(static) signInput(tx, index, coin, ring, type)
Execute tx.signInput() on worker.
Parameters:
Name | Type | Description |
---|---|---|
tx |
MTX | |
index |
Number | |
coin |
Output | |
ring |
KeyRing | |
type |
SighashType |
- Source:
- See:
-
- MTX#signInput