Authorization operators
authorized-by
Use authorized-by
to check whether the transaction is signed by an authorized keyset guard.
Basic syntax
(authorized-by keyset)
(authorized-by keyset)
Parameters
Parameter | Type | Description |
---|---|---|
keyset | string | Specifies the keyset string. |
Return type
Returns a bool
type that indicates whether the specified keyset guard is satisfied by the executing transaction.
Example
(authorized-by "bbccc99ec9eeed17d60159fbb88b09e30ec5e63226c34544e64e750ba424d35e")
(authorized-by "bbccc99ec9eeed17d60159fbb88b09e30ec5e63226c34544e64e750ba424d35e")
Support
Supported in properties only.
row-enforced
Use row-enforced
to check whether the keyset in the row is enforced by the function under analysis.
Basic syntax
(row-enforced t c r)
(row-enforced t c r)
- takes
t
: a - takes
c
: b - takes
r
:string
- produces
bool
- where a is of type
table
orstring
- where b is of type
column
orstring
Support
Supported in properties only.
is-principal
Use is-principal
to check whether the specified string conforms to the principal format without proving validity.
Basic syntax
(is-principal s)
(is-principal s)
Parameters
Parameter | Type | Description |
---|---|---|
s | string | Specifies the string to check the formatting for. |
Return type
Returns a bool
type that indicates whether the specified string s
has the format of a principal.
Support
Supported in either invariants or properties.
typeof-principal
Use typeof-principal
to check the protocol type of the specified string s
value.
If input value is not a principal
data type, then the empty string is returned.
Basic syntax
(typeof-principal s)
(typeof-principal s)
Parameters
Parameter | Type | Description |
---|---|---|
s | string | Specifies the string to check the protocol type of. |
Return type
If input value is not a principal
data type, then the empty string is returned.
Support
Supported in either invariants or properties.