Skip to content

Core

Bool

Bytes

Construction Examples:

  • 0xC0FFEE (hex)
  • 0zSGVsbG8gV29ybGQ= (base64, = is optional)
  • bytes("Hello")
  • bytes($tx)
  • bytes(xpub661MyMwAZ92K…cotpLmSkMxrp99L)

Coercion – any function taking Bytes will also accept:

Underlying type: Vec<u8>

Rust source code: src/stdlib/mod.rs:N/A

String

str()

str(Any) -> String

Rust source code: src/stdlib/mod.rs:N/A

Int

int()

int(Int|Float|String) -> Int

Rust source code: src/stdlib/mod.rs:N/A

Float

float()

float(Int|Float|String) -> Float

Rust source code: src/stdlib/mod.rs:N/A

Array

(𝘢𝘯𝘺)

Symbol

symbol()

symbol(name: String = None) -> Symbol

Rust source code: src/stdlib/mod.rs:N/A

Function

General

typeof()

typeof(Any) -> String

Rust source code: src/stdlib/mod.rs:N/A

Rust source code: src/stdlib/mod.rs:N/A

throw()

throw(msg: ...String)

Rust source code: src/stdlib/mod.rs:N/A

concat()

concat(Array<Array|Bytes|String|Number|Psbt>) -> Array|Bytes|String|Number|Psbt|null

Minsc source code: src/stdlib/stdlib.minsc:N/A

Numeric

abs()

abs(Int|Float) -> Int|Float

Minsc source code: src/stdlib/stdlib.minsc:N/A

min()

min(a: Int|Float, b: Int|Float) -> Int|Float

Minsc source code: src/stdlib/stdlib.minsc:N/A

max()

max(a: Int|Float, b: Int|Float) -> Int|Float

Minsc source code: src/stdlib/stdlib.minsc:N/A

sum()

sum(Array<Int|Float>) -> Int|Float

Minsc source code: src/stdlib/stdlib.minsc:N/A

MAX_INTEGER Int

MAX_INTEGER = 9223372036854775807

MIN_INTEGER Int

MIN_INTEGER = -9223372036854775808

NaN Float

NaN = NaN_f64

Not a Number. Returned by some floating-point operations, like 0.0/0.0.

inf Float

inf = +Inf_f64

Point at Infinity. Returned by some floating-point operations, like 1.0/0.0.

String

join()

join(strs: Array<String>, separator: String) -> String

Minsc source code: src/stdlib/stdlib.minsc:N/A

Array

map()

map(arr: Array, fn: Function) -> Array

Minsc source code: src/stdlib/stdlib.minsc:N/A

flatMap()

flatMap(arr: Array, fn: Function) -> Array

Minsc source code: src/stdlib/stdlib.minsc:N/A

filter()

filter(arr: Array, predicate: Function) -> Array

Minsc source code: src/stdlib/stdlib.minsc:N/A

filterMap()

filterMap(arr: Array, fn: Function) -> Array

Minsc source code: src/stdlib/stdlib.minsc:N/A

filterMap::skip Symbol

each()

each(arr: Array, fn: Function)

Minsc source code: src/stdlib/stdlib.minsc:N/A

reduce()

reduce(arr: Array, fn: Function) -> Any

Minsc source code: src/stdlib/stdlib.minsc:N/A

fold()

fold(arr: Array, initial: Any, fn: Function) -> Any

Rust source code: src/stdlib/mod.rs:N/A

foldUntil()

foldUntil(arr: Array, initial: Any, fn: Function) -> Any

Rust source code: src/stdlib/mod.rs:N/A

slice()

slice(arr: Array<T>, start: Int, len: Int = {ALL}) -> Array<T>

Minsc source code: src/stdlib/stdlib.minsc:N/A

tail()

tail(Array<T>) -> Array<T>

Minsc source code: src/stdlib/stdlib.minsc:N/A

initial()

initial(Array<T>) -> Array<T>

Minsc source code: src/stdlib/stdlib.minsc:N/A

last()

last(Array<T>) -> T

Minsc source code: src/stdlib/stdlib.minsc:N/A

find()

find(arr: Array<T>, predicate: Function) -> T|null

Minsc source code: src/stdlib/stdlib.minsc:N/A

some()

some(arr: Array<T>, predicate: Function) -> Bool

Minsc source code: src/stdlib/stdlib.minsc:N/A

every()

every(arr: Array<T>, predicate: Function) -> Bool

Minsc source code: src/stdlib/stdlib.minsc:N/A

contains()

contains(arr: Array<T>, needle: T) -> Bool

Minsc source code: src/stdlib/stdlib.minsc:N/A

startsWith()

startsWith(arr: Array<T>, prefix: Array<T>) -> Bool

Minsc source code: src/stdlib/stdlib.minsc:N/A

indices()

indices(Array) -> Array<Int>

Minsc source code: src/stdlib/stdlib.minsc:N/A

enumerated()

enumerated(Array<T>) -> Array<Int:T>

Minsc source code: src/stdlib/stdlib.minsc:N/A

reverse()

reverse(Array<T>) -> Array<T>

Minsc source code: src/stdlib/stdlib.minsc:N/A

flatten()

flatten(Array<Array<T>>) -> Array<T>

Minsc source code: src/stdlib/stdlib.minsc:N/A

fillArray()

fillArray(size: Int, value: Any|Function) -> Array

Rust source code: src/stdlib/mod.rs:N/A

range()

range(start: Int, end: Int) -> Array<Int>

Minsc source code: src/stdlib/stdlib.minsc:N/A

Tagged Arrays

keys()

keys(Array<Key:Val>) -> Array<Key>

Minsc source code: src/stdlib/stdlib.minsc:N/A

values()

values(Array<Key:Val>) -> Array<Val>

Minsc source code: src/stdlib/stdlib.minsc:N/A

set()

set(original: Array<Key:Val>, fields: Array<Key:Val>) -> Array<Key:Val>

Minsc source code: src/stdlib/stdlib.minsc:N/A

set::UNSET Symbol

unset()

unset(original: Array<Key:Val>, keys: Array<Key>) -> Array<Key:Val>

Minsc source code: src/stdlib/stdlib.minsc:N/A

Encoding

hex()

hex(Bytes) -> String

base64()

base64(Bytes) -> String

debug()

debug(Any) -> String

Get the debug representation of the given value in Rust's std::fmt::Debug formatting

Rust source code: src/stdlib/mod.rs:N/A

repr()

repr(Any) -> String

Rust source code: src/stdlib/mod.rs:N/A

pretty()

pretty(Any) -> String

Rust source code: src/stdlib/mod.rs:N/A

le64()

le64(Int) -> Bytes

Rust source code: src/stdlib/mod.rs:N/A

Logging

print()

print(...String)

Rust source code: src/stdlib/mod.rs:N/A

log()

log(...String)

Rust source code: src/stdlib/mod.rs:N/A

warn()

warn(...String)

Rust source code: src/stdlib/mod.rs:N/A

Symbols

null Symbol

default Symbol

BOO Symbol

Boo, The Miniature Giant Space Hamster

Dev Utils

env()

env(depth: Int = -1) -> Array<Key:Value>

Rust source code: src/stdlib/mod.rs:N/A

env::debug()

env::debug(depth: Int = -1) -> Symbol

Minsc source code: src/stdlib/stdlib.minsc:N/A

env::repr()

env::repr(depth: Int = -1) -> Symbol

Minsc source code: src/stdlib/stdlib.minsc:N/A

env::pretty()

env::pretty(depth: Int = -1) -> Symbol

Minsc source code: src/stdlib/stdlib.minsc:N/A