Space Operator
  • Welcome
  • Visual Builder
    • Flows
      • API Key & POST Request
      • WebSocket
        • Signature Requests
      • Nested Flows
      • Learn Solana
      • Add flows to your websites
      • Iterate with Localhost
    • Nodes
      • Web Assembly Nodes
        • space-cli
        • space-lib
        • Examples in Rust
          • Rectangle
          • Filter
          • Regex
        • Uploading WASM binary via UI
      • Native Nodes
        • Code Template
        • Node Definition
        • ValueSet
        • Submitting Native Nodes
        • Tracing
      • Mock Nodes
      • JS Node
      • API Input Node
  • Self-hosting
    • Docker Compose
    • Serving HTTPS
    • Lightsail Instance
    • Export data to your instance
  • FAQ
    • Servers
  • References
    • Flows
    • Flow Deployment
Powered by GitBook
On this page
  • Null
  • String
  • Boolean
  • Numbers
  • U64
  • I64
  • U128
  • I128
  • F64
  • Decimal
  • Binary data
  • 32-bytes binary
  • 64-bytes binary
  • Other length
  • Array
  • Map

Was this helpful?

  1. Visual Builder
  2. Nodes
  3. Native Nodes

ValueSet

PreviousNode DefinitionNextSubmitting Native Nodes

Last updated 1 year ago

Was this helpful?

Values for flow inputs and outputs are stored as JSONB in the database.

Values are always JSON objects with exactly 1 key. The key describes that value’s data type.

Schema:

Null

{
	"N": 0
}

String

{
	"S": "<content of string>"
}

Boolean

{
	// `true` or `false`
	"B": true
}

Numbers

There are many types of numbers. All numbers are encoded as JSON string to avoid losing precision when reading in JavaScript.

U64

Unsigned 64-bit integer.

{
	"U": "1234"
}

I64

Signed 64-bit integer.

{
	"I": "-123456"
}

U128

Unsigned 128-bit integer.

{
	"U1": "340282366920938463463374607431768211455"
}

I128

Signed 128-bit integer.

{
	"I1": "-170141183460469231731687303715884105728"
}

F64

64-bit floating-point value. Support writing with scientific notation (e.g. 1e10).

{
	"F": "1e-10"
}

Decimal

{
	"D": "3.1415926535897932384626433832"
}

Binary data

Binary values containing 32 or 64 bytes are encoded as base-58 string, because they are usually Solana’s pubkey or keypair. Other lengths are encoded with base-64.

32-bytes binary

A binary sequence, exactly 32-bytes long. Encoded as a base-58 string.

{
	"B3": "4pLoLKNMFNLebHQ91vHm9YqspPzpCughUfooGPPzUA6d"
}

64-bytes binary

A binary sequence, exactly 64-bytes long. Encoded as a base-58 string.

{
	"B6": "2FEonhUn96e31GtW2DNRnoeGSUfozrEVTT7JwGfQfXmDYkNSXgGSBCAzb4BPLnQXZ4y1oL4qxAa825LVtd9nyZLk"
}

Other length

Binary values with other length are encoded as base-64 strings.

{
	"BY": "U3Vubnk="
}

Array

Array contains zero or more elements, each element is another value.

e.g. an array contains an integer 10 and a string "Hello":

{
	"A": [
		{ "I": "10" },
		{ "S": "Hello" }
	]
}

Map

{
	"M": {
		"pubkey": { "B3": "4pLoLKNMFNLebHQ91vHm9YqspPzpCughUfooGPPzUA6d" },
		"memo": { "S": "Hello" }
	}
}

A Decimal in library.

https://assets.spaceoperator.com/json-schemas/value.json
rust_decimal