Liking cljdoc? Tell your friends :D

convex.cell

Constructors for CVM cells and related type predicate functions.

Constructors for CVM cells and related type predicate functions.
raw docstring

addressclj

(address long)

Creates a CVM address from a long.

Creates a CVM address from a long.
sourceraw docstring

address?clj

(address? x)

Is x an address?

Is `x` an address?
sourceraw docstring

blobclj

(blob byte-array)

Creates a CVM blob from a byte array.

Creates a CVM blob from a byte array.
sourceraw docstring

blob<-hexclj

(blob<-hex hex-string)

Creates a CVM blob from a hex string.

Creates a CVM blob from a hex string.
sourceraw docstring

blob?clj

(blob? x)

Is x a blob?

Is `x` a blob?
sourceraw docstring

booleanclj

(boolean x)

Creates a CVM boolean given a falsy or truthy value.

Creates a CVM boolean given a falsy or truthy value.
sourceraw docstring

boolean?clj

(boolean? x)

Is x a CVM boolean?

Is `x` a CVM boolean?
sourceraw docstring

byteclj

(byte b)

Creates a CVM byte from a value between 0 and 255 inclusive.

Creates a CVM byte from a value between 0 and 255 inclusive.
sourceraw docstring

byte?clj

(byte? x)

Is x a CVM byte?

Is `x` a CVM byte?
sourceraw docstring

callclj

(call address sequence address-callable function-name args)
(call address sequence address-callable offer function-name args)

Creates a transaction for invoking a callable function.

Creates a transaction for invoking a callable function.
sourceraw docstring

charclj

(char ch)

Creates a CVM character from a regular character.

Creates a CVM character from a regular character.
sourceraw docstring

char?clj

(char? x)

Is x a CVM char?

Is `x` a CVM char?
sourceraw docstring

code-std*cljmacro

(code-std* kw)

Given a Clojure keyword, returns the corresponding standard error code (any of the Convex keyword the CVM itself uses):

  • :ARGUMENT
  • :ARITY
  • :ASSERT
  • :BOUNDS
  • :CAST
  • :COMPILE
  • :DEPTH
  • :EXCEPTION
  • :EXPAND
  • :FATAL
  • :FUNDS
  • :HALT
  • :JUICE
  • :MEMORY
  • :NOBODY
  • :RECUR
  • :REDUCED
  • :RETURN
  • :ROLLBACK
  • :SEQUENCE
  • :SIGNATURE
  • :STATE
  • :TAILCALL
  • :TODO
  • :TRUST
  • :UNDECLARED
  • :UNEXPECTED

Throws if keyword does not match any of those.

Note that in user functions, codes can be anything, any type, using those codes is not at all mandatory.

Given a Clojure keyword, returns the corresponding standard error code (any of the Convex keyword the CVM itself
uses):

- `:ARGUMENT`
- `:ARITY`
- `:ASSERT`
- `:BOUNDS`
- `:CAST`
- `:COMPILE`
- `:DEPTH`
- `:EXCEPTION`
- `:EXPAND`
- `:FATAL`
- `:FUNDS`
- `:HALT`
- `:JUICE`
- `:MEMORY`
- `:NOBODY`
- `:RECUR`
- `:REDUCED`
- `:RETURN`
- `:ROLLBACK`
- `:SEQUENCE`
- `:SIGNATURE`
- `:STATE`
- `:TAILCALL`
- `:TODO`
- `:TRUST`
- `:UNDECLARED`
- `:UNEXPECTED`

Throws if keyword does not match any of those.

Note that in user functions, codes can be anything, any type, using those codes is not at all mandatory.
sourceraw docstring

cvm-value?clj

(cvm-value? cell)

Is cell a CVM value?

Returns false if x is not accessible in the CVM and meant to be used outside (eg. networking).

Is `cell` a CVM value?

Returns false if `x` is not accessible in the CVM and meant to be used outside (eg. networking).
sourceraw docstring

doubleclj

(double x)

Creates a CVM double.

Creates a CVM double.
sourceraw docstring

double?clj

(double? x)

Is x a CVM double?

Is `x` a CVM double?
sourceraw docstring

encodingclj

(encoding cell)

Returns a blob representing the encoding of the given cell.

Returns a [[blob]] representing the encoding of the given `cell`.
sourceraw docstring

errorclj

(error message)
(error code message)
(error code message trace)

An error value as Convex data.

code is often a CVM keyword (:ASSERT by default), message could be any CVM value (albeit often a human-readable string), and trace is an optional stacktrace (CVM vector of CVM strings).

An error value as Convex data.

`code` is often a CVM keyword (`:ASSERT` by default), `message` could be any CVM value (albeit often a human-readable
string), and `trace` is an optional stacktrace (CVM vector of CVM strings).
sourceraw docstring

hashclj

(hash cell)

Returns the hash of the given cell.

A hash is a specialized 32-byte blob.

Returns the hash of the given `cell`.

A hash is a specialized 32-byte [[blob]].
sourceraw docstring

hash<-blobclj

(hash<-blob blob)

Converts a 32-byte blob to a hash.

Converts a 32-byte [[blob]] to a hash.
sourceraw docstring

hash<-hexclj

(hash<-hex hex-string)

Creates a hash from a hex string.

Returns nil if hex string is of wrong format.

Creates a [[hash]] from a hex string.

Returns nil if hex string is of wrong format.
sourceraw docstring

invokeclj

(invoke address sequence cell)

Creates a transaction for invoking code (a cell).

Creates a transaction for invoking code (a cell).
sourceraw docstring

keyclj

(key blob)

Creates an account key from a 32-byte blob.

Returns nil if the given blob is of wrong size.

Creates an account key from a 32-byte [[blob]].

Returns nil if the given [[blob]] is of wrong size.
sourceraw docstring

key-fakeclj

Zeroed key that can be used during dev and testing so that an account is considered as a user, not an actor.

Zeroed [[key]] that can be used during dev and testing so that an account is considered as a user, not an actor.
sourceraw docstring

keywordclj

(keyword string)

Creates a CVM keyword from a string.

Creates a CVM keyword from a string.
sourceraw docstring

keyword?clj

(keyword? x)

Is x a CVM keyword?

Is `x` a CVM keyword?
sourceraw docstring

listclj

(list)
(list x)

Creates a CVM list from a collection of CVM items.

Creates a CVM list from a collection of CVM items.
sourceraw docstring

list?clj

(list? x)

Is x a CVM list?

Is `x` a CVM list?
sourceraw docstring

longclj

(long x)

Creates a CVM long.

Creates a CVM long.
sourceraw docstring

long?clj

(long? x)

Is x a CVM long?

Is `x` a CVM long?
sourceraw docstring

mapclj

(map)
(map x)

Creates a CVM map from a collection of [key value].

Creates a CVM map from a collection of `[key value]`.
sourceraw docstring

map?clj

(map? x)

Is x a CVM map?

Is `x` a CVM map?
sourceraw docstring

setclj

(set)
(set x)

Creates a CVM set from a collection of CVM items.

Creates a CVM set from a collection of CVM items.
sourceraw docstring

set?clj

(set? x)

Is x a CVM set?

Is `x` a CVM set?
sourceraw docstring

stringclj

(string string)

Creates a CVM string from a regular string.

Creates a CVM string from a regular string.
sourceraw docstring

string?clj

(string? x)

Is x a CVM string?

Is `x` a CVM string?
sourceraw docstring

symbolclj

(symbol string)

Creates a CVM symbol from a string.

Creates a CVM symbol from a string.
sourceraw docstring

symbol?clj

(symbol? x)

Is x a CVM symbol?

Is `x` a CVM symbol?
sourceraw docstring

transferclj

(transfer address sequence address-receiver amount)

Creates a transaction for transferring Convex Coins.

Creates a transaction for transferring Convex Coins.
sourceraw docstring

vectorclj

(vector)
(vector x)

Creates a CVM vector from a collection of CVM items.

Creates a CVM vector from a collection of CVM items.
sourceraw docstring

vector?clj

(vector? x)

Is x a CVM vector?

Is `x` a CVM vector?
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close