From bcfa32f90ca55d717048ce9b9a70cf1ccf2309e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schie=C3=9Fl?= Date: Sat, 28 Jul 2018 23:38:48 +0200 Subject: [PATCH] Update bsip-0040.md --- bsip-0040.md | 4 ++++ 1 file changed, 4 insertions(+) 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: ```