Argument validation procedures.
- Source:
Methods
(static) Address(arg) → {undefined}
Confirm argument is Address.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
module:primitives/address.Address | * | Argument. |
- Source:
Throws:
-
If arg is not an Address.
- Type
- Error
Returns:
- Type
- undefined
(static) addressHex(arg) → {undefined}
Confirm argument is address hex.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
string | * | Argument. |
- Source:
Throws:
-
If arg is not an address hex.
- Type
- Error
Returns:
- Type
- undefined
(static) Amount(arg) → {undefined}
Confirm argument is Amount.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
module:primitives/amount.Amount | * | Argument. |
- Source:
Throws:
-
If arg is not an Amount.
- Type
- Error
Returns:
- Type
- undefined
(static) BigNumber(arg) → {undefined}
Confirm argument is BigNumber.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
BigNumber | * | Argument. |
- Source:
Throws:
-
If arg is not a BigNumber.
- Type
- Error
Returns:
- Type
- undefined
(static) Block(arg) → {undefined}
Confirm argument is Block.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
module:primitives/block.Block | * | Argument. |
- Source:
Throws:
-
If arg is not a Block.
- Type
- Error
Returns:
- Type
- undefined
(static) integer(arg) → {undefined}
Confirm argument is integer literal.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
number | * | Argument. |
- Source:
Throws:
-
If arg is not an integer literal.
- Type
- Error
Returns:
- Type
- undefined
(static) number(arg) → {undefined}
Confirm argument is number literal.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
number | * | Argument. |
- Source:
Throws:
-
If arg is not a number literal.
- Type
- Error
Returns:
- Type
- undefined
(static) string(arg) → {undefined}
Confirm argument is string literal.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
string | * | Argument. |
- Source:
Throws:
-
If arg is not a string literal.
- Type
- Error
Returns:
- Type
- undefined
(static) Taint(arg) → {undefined}
Confirm argument is Taint.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
module:primitives/taint.Taint | * | Argument. |
- Source:
Throws:
-
If arg is not a Taint.
- Type
- Error
Returns:
- Type
- undefined
(static) Transaction(arg) → {undefined}
Confirm argument is Transaction.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
module:primitives/transaction.Transaction | * | Argument. |
- Source:
Throws:
-
If arg is not a Transaction.
- Type
- Error
Returns:
- Type
- undefined
(static) transactionHash(arg) → {undefined}
Confirm argument is transaction hash.
Parameters:
| Name | Type | Description |
|---|---|---|
arg |
string | * | Argument. |
- Source:
- To Do:
-
- Validate transaction hash format.
Throws:
-
If arg is not a string literal.
- Type
- Error
Returns:
- Type
- undefined