diff --git a/_core/smart/clarityRef.md b/_core/smart/clarityRef.md index acfb8103..f384bd2f 100644 --- a/_core/smart/clarityRef.md +++ b/_core/smart/clarityRef.md @@ -61,7 +61,9 @@ Supports values of `'true` or `'false`. ### Buffer type -Buffer types represent fixed-length byte buffers. Currently, the only way to construct a Buffer is using string literals, for example `"alice.id"` or `hash160("bob.id")` +Buffer types represent fixed-length byte buffers. A Buffer can either be constructed using: +- String literals, for example `"alice.id"` or `hash160("bob.id")`, +- Hexadecimals literals, for example `0xABCDEF`. All of the hash functions return buffers: @@ -73,7 +75,7 @@ The block properties `header-hash`, `burnchain-header-hash`, and `vrf-seed` are ### List type -Clarity supports lists of the atomic types. However, the only variable length lists in the language appear as function inputs; there is no support for list operations like append or join. +Clarity supports lists of the atomic types. However, the only variable length lists in the language appear as function inputs. ### Principal type @@ -100,19 +102,19 @@ This allows for creating named tuples on the fly, which is useful for data maps Description - (fetch-entry map-name key-tuple) + (map-get map-name key-tuple) Fetches the value associated with a given key in the map, or returns none if there is no such value. - (set-entry! map-name key-tuple value-tuple) + (map-set! map-name key-tuple value-tuple) Sets the value of key-tuple in the data map - (insert-entry! map-name key-tuple value-tuple) + (map-insert! map-name key-tuple value-tuple) Sets the value of key-tuple in the data map if and only if an entry does not already exist. - (delete-entry! map-name key-tuple) + (map-delete! map-name key-tuple) Deletes key-tuple from the data map.