Module: protocol/policy

Members

(static, constant) BARE_MULTISIG :Boolean

Whether bare multisig outputs should be relayed (policy).

Type:
  • Boolean
Default Value:
  • true
Source:

(static, constant) BYTES_PER_SIGOP :Number

How much weight a sigop should add to virtual size (policy).

Type:
  • Number
Default Value:
  • 20
Source:

(static, constant) FREE_THRESHOLD :Number

Priority threshold for free transactions (policy).

Type:
  • Number
Source:

(static, constant) MAX_BLOCK_WEIGHT :Number

Maximum block weight to be mined.

Type:
  • Number
Source:

(static, constant) MAX_OP_RETURN :Number

Max pushdata size in nulldata (policy).

Type:
  • Number
Default Value:
  • 80
Source:

(static, constant) MAX_OP_RETURN_BYTES :Number

Max serialized nulldata size (policy).

Type:
  • Number
Default Value:
  • 83
Source:

(static, constant) MAX_P2SH_SIGOPS :Number

Max sigops per redeem script (policy).

Type:
  • Number
Default Value:
  • 15
Source:

(static, constant) MAX_P2WSH_PUSH :Number

Max p2wsh push size. Used for witness malleation checks (policy).

Type:
  • Number
Default Value:
  • 80
Source:

(static, constant) MAX_P2WSH_SIZE :Number

Max serialized p2wsh size. Used for witness malleation checks (policy).

Type:
  • Number
Default Value:
  • 3600
Source:

(static, constant) MAX_P2WSH_STACK :Number

Max p2wsh stack size. Used for witness malleation checks (policy).

Type:
  • Number
Default Value:
  • 100
Source:

(static, constant) MAX_TX_SIGOPS :Number

Maximum number of transaction sigops (policy).

Type:
  • Number
Source:

(static, constant) MAX_TX_SIGOPS_COST :Number

Maximum cost of transaction sigops (policy).

Type:
  • Number
Source:

(static, constant) MAX_TX_SIZE :Number

Maximum transaction base size (policy).

Type:
  • Number
Source:

(static, constant) MAX_TX_VERSION :Number

Maximum transaction version (policy).

Type:
  • Number
Default Value:
  • 2
Source:

(static, constant) MAX_TX_WEIGHT :Number

Maximum transaction weight (policy).

Type:
  • Number
Source:

(static, constant) MEMPOOL_EXPIRY_TIME :Number

Time at which transactions fall out of the mempool.

Type:
  • Number
Source:

(static, constant) MEMPOOL_MAX_ANCESTORS :Number

Default ancestor limit.

Type:
  • Number
Default Value:
  • 25
Source:

(static, constant) MEMPOOL_MAX_ORPHANS :Number

Maximum number of orphan transactions.

Type:
  • Number
Default Value:
  • 100
Source:

(static, constant) MEMPOOL_MAX_SIZE :Number

Default maximum mempool size in bytes.

Type:
  • Number
Source:

(static, constant) MIN_BLOCK_PRIORITY :Number

Bottom priority threshold to be seen before ignoring priority transactions during mining.

Type:
  • Number
Source:

(static, constant) MIN_BLOCK_WEIGHT :Number

Block weight to be reached before rejecting priority transactions during mining.

Type:
  • Number
Source:

(static, constant) MIN_RELAY :Rate

Minimum relay fee rate (policy).

Type:
Source:

(static, constant) PRIORITY_BLOCK_WEIGHT :Number

Weight to be reached before ignoring priority transactions during mining.

Type:
  • Number
Source:

Methods

(static) getMinFee(sizenullable, ratenullable) → {Amount}

Calculate minimum fee based on rate and size.

Parameters:
Name Type Attributes Description
size Number <nullable>
rate Rate <nullable>

Rate of satoshi per kB.

Source:
Returns:

fee

Type
Amount

(static) getRate(size, fee) → {Rate}

Calculate a fee rate based on size and fees.

Parameters:
Name Type Description
size Number
fee Amount
Source:
Returns:
Type
Rate

(static) getRoundFee(sizenullable, ratenullable) → {Amount}

Calculate the minimum fee in order for the transaction to be relayable, but _round to the nearest kilobyte when taking into account size.

Parameters:
Name Type Attributes Description
size Number <nullable>
rate Rate <nullable>

Rate of satoshi per kB.

Source:
Returns:

fee

Type
Amount