Skip to content

Commit

Permalink
Add owner policy
Browse files Browse the repository at this point in the history
  • Loading branch information
AurelienFT committed Nov 19, 2024
1 parent de3ed12 commit 8f83755
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/tx-format/policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ enum PolicyType : uint32 {
Maturity = 4,
MaxFee = 8,
Expiration = 16,
Owner = 32,
}
```

| name | type | description |
|--------|-----------------------------------------------------------------------------------|--------------|
| `data` | One of [`Tip`](#tip), [`WitnessLimit`](#witnesslimit), [`Maturity`](#maturity) or [`Expiration`](#expiration) | Policy data. |
| `data` | One of [`Tip`](#tip), [`WitnessLimit`](#witnesslimit), [`Maturity`](#maturity), [`Expiration`](#expiration) or [`Owner`](#owner) | Policy data. |

## `Tip`

Expand Down Expand Up @@ -63,3 +64,13 @@ Transaction is invalid if:

- `max_fee > sum_inputs(tx, BASE_ASSET_ID) - sum_outputs(tx, BASE_ASSET_ID)`
- `max_fee < max_fee(tx, BASE_ASSET_ID, gas_price)`

## `Owner`

| name | type | description |
|---------|----------|----------------------------------------------------------|
| `owner` | `uint64` | Index of the transaction input that we nominate as owner |

Transaction is invalid if:

- `owner >= inputs.len()`

0 comments on commit 8f83755

Please sign in to comment.