5.7.1 Java  Script
5.7.1.1 Types
5.7.1.2 loader.mjs
5.7.1.3 Account Handles
5.7.1.4 Contract Handles
5.7.1.5 Network Utilities
5.7.1.6 Provider Selection
5.7.1.7 Utilities
5.7.1.8 ask.mjs
On this page:
Contract
Connector
5.7.1.1 Types

The table below shows the JavaScript representation of each of the Reach types:

// Reach  => JavaScript
Null      => null
Bool      => 'boolean'
UInt      => 'BigNumber' or 'number'
Bytes     => 'string'
Digest    => 'BigNumber'
Address   => NetworkAccount
Contract  => Address on ETH; UInt on ALGO
Token     => Address on ETH; UInt on ALGO
Array     => array
Tuple     => array
Object    => object
Data      => ['variant', value]
Struct    => object

For example, the Reach type MInt = Data({None: Null, Some: UInt}) inhabitant MInt.Some(42) is represented as ['Some', 42] in JavaScript.

type Connector = 'ETH' | 'ALGO' | 'CFX'

A Connector is the abbreviated name of the network being connected to.