Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions docs/protocol-ref/address-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ Platform addresses are derived from standard Bitcoin/Dash address formats and en

**Encoding:**

- **Mainnet HRP:** `evo`
- **Testnet HRP:** `tevo`
- **Mainnet HRP:** `dash`
- **Testnet HRP:** `tdash` (also used for Devnet and Regtest)

**Derivation:** Standard Bitcoin derivation using `Hash160(compressed_pubkey)` where Hash160 = RIPEMD160(SHA256(x)).

See the [Platform address implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.0.0/packages/rs-dpp/src/address_funds/platform_address.rs).
See the [Platform address implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/address_funds/platform_address.rs).

### Address Witness

Expand All @@ -63,10 +63,10 @@ Witnesses provide cryptographic proof of address ownership. Each input in an add

1. Verify redeem script hashes to address
2. Parse script for threshold (M) and public keys (N)
3. Hash signable bytes once (reused for all signatures)
3. Double-SHA256 hash the signable bytes (reused for all signatures)
4. Match M signatures to N public keys in order

See the [witness implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.0.0/packages/rs-dpp/src/address_funds/witness.rs).
See the [witness implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/address_funds/witness.rs).

### Fee Strategy

Expand All @@ -81,7 +81,7 @@ The fee strategy specifies how transaction fees are deducted from inputs or outp
Fee strategy cannot be empty. Maximum steps: 4 (`max_address_fee_strategies`). No duplicate steps allowed. Steps are processed in sequence until the fee is fully covered.
:::

See the [fee strategy implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.0.0/packages/rs-dpp/src/address_funds/fee_strategy/mod.rs).
See the [fee strategy implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/address_funds/fee_strategy/mod.rs).

### Common Type Aliases

Expand Down Expand Up @@ -110,7 +110,7 @@ Transfer credits from an existing identity to one or more Platform addresses.
Minimum recipients: 1. Maximum recipients: `max_address_outputs`. Minimum per recipient: 500,000 credits. Minimum fee: 500,000 credits.
:::

See the [implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.0.0/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_to_addresses_transition/).
See the [implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_to_addresses_transition/).

### Identity Create from Addresses

Expand All @@ -131,7 +131,7 @@ Create a new identity funded from Platform address balances.
**Cost:** Base cost 2,000,000 + 6,500,000 per key. Example: 2 keys = 15,000,000 credits.
:::

See the [implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.0.0/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_create_from_addresses_transition/).
See the [implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_create_from_addresses_transition/).

### Identity Top-Up from Addresses

Expand All @@ -152,7 +152,7 @@ Add credits to an existing identity from Platform address balances.
**Fee:** Base top-up cost: 500,000 credits.
:::

See the [implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.0.0/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_topup_from_addresses_transition/).
See the [implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_topup_from_addresses_transition/).

### Address Funds Transfer

Expand All @@ -176,7 +176,7 @@ Unlike other address transitions, fund transfers enforce strict balance preserva
**Fee:** 500,000 credits per input + 6,000,000 credits per output.
:::

See the [implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.0.0/packages/rs-dpp/src/state_transition/state_transitions/address_funds/address_funds_transfer_transition/).
See the [implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transitions/address_funds/address_funds_transfer_transition/).

### Address Funding from Asset Lock

Expand All @@ -202,7 +202,7 @@ Exactly one output must have a `None` value. This remainder output receives what
**Constraints:** Minimum outputs: 1. Maximum inputs: `max_address_inputs`. Maximum outputs: `max_address_outputs`. Minimum per input: 100,000 credits. Minimum per explicit output: 500,000 credits. No output can also be an input.
:::

See the [implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.0.0/packages/rs-dpp/src/state_transition/state_transitions/address_funds/address_funding_from_asset_lock_transition/).
See the [implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transitions/address_funds/address_funding_from_asset_lock_transition/).

### Address Credit Withdrawal

Expand All @@ -225,7 +225,7 @@ Withdraw credits from Platform addresses back to the Core chain.
**Fee:** 400,000,000 credits. Withdrawal fees are significantly higher due to the complexity and finality of moving funds back to the Core chain.
:::

See the [implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.0.0/packages/rs-dpp/src/state_transition/state_transitions/address_funds/address_credit_withdrawal_transition/).
See the [implementation in rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transitions/address_funds/address_credit_withdrawal_transition/).

### Address State Transition Signing

Expand All @@ -246,8 +246,8 @@ For complete constants reference, see [Protocol Constants](protocol-constants.md
| `min_input_amount` | 100,000 credits | 64 bits | Minimum per input |
| `min_output_amount` | 500,000 credits | 64 bits | Minimum per output |
| `min_identity_funding_amount`| 200,000 credits | 64 bits | Minimum for identity creation/top-up |
| `max_address_inputs` | 0 (unlimited) | 16 bits | Maximum inputs per transition |
| `max_address_outputs` | 0 (unlimited) | 16 bits | Maximum outputs per transition |
| `max_address_fee_strategies` | 4 | 8 bits | Maximum fee strategy steps |
| `max_address_inputs` | 16 | 16 bits | Maximum inputs per transition (Protocol Version 11+) |
| `max_address_outputs` | 128 | 16 bits | Maximum outputs per transition (Protocol Version 11+) |
| `max_address_fee_strategies` | 4 | 16 bits | Maximum fee strategy steps |

For related identity operations, see [Identity](identity.md) and [State Transitions](state-transition.md).
Loading