diff --git a/bsip-0040.md b/bsip-0040.md index 2d27915..a62ba5f 100644 --- a/bsip-0040.md +++ b/bsip-0040.md @@ -82,6 +82,7 @@ List of possible asserts are: | `length` | [`min`, `max`] | stateless | | `limit` | [`max_cumsum`, `interval_in_sec`] | [`current_cumsum`, `interval_began`] | | `limit_monthly` | [`max_cumsum`, `interval_in_months`] | [`current_cumsum`, `interval_began`] | +| `contains` | [`list`, `of`, `allowed`, `fields`] | stateless | All asserts apply to `int`, `string` and `object_ids`. There is no type converstion, incompatible type means assert failure. Any more sophisticated data types are not included yet. @@ -111,6 +112,9 @@ The assert that needs to pass is now `current_cumsum + incoming value <= max_cum #### `limit_monthly` Statefull assert, only `int` type arguments. Analogue to `limit`, but `interval_began` is initially set to `month(valid_from)` and set to `month(now)` on update, additionally the time assert is `month(now) >= interval_began + interval_in_months` (include logic for month overflow when year changes). +#### `contains_only` +Stateless assert, only for dictionary type objects like `options`. The `argument` of the operation is a dictionary type objects and is only allowed to contain the attributes in the data list. + ### Simple Example Assume account A and B and some unrelated key K. Furthermore A has a custom active authority in the following way: ```