UNPKG

@mora-light/core

Version:
35 lines (26 loc) 1.07 kB
'use strict'; require('@dfinity/agent'); // basic candid type // https://internetcomputer.org/docs/current/references/candid-ref/#type-principal // type with subtype // https://internetcomputer.org/docs/current/references/candid-ref/#type-opt-t // type with subitems // JavaScript array value // special type // https://internetcomputer.org/docs/current/references/candid-ref/#type-service- // all supported candid type // recursion type // unknown type // empty type, should never see this type // reserved type, don't care // function type // service type // candid type // candid type list const CANDID_TYPE_LIST = ['bool', 'nat', 'int', 'nat8', 'nat16', 'nat32', 'nat64', 'int8', 'int16', 'int32', 'int64', 'float32', 'float64', 'null', 'text', 'principal', 'blob', 'vec', 'opt', 'record', 'variant', 'tuple', 'rec', 'unknown', 'empty', 'reserved', 'func', 'service']; // some supported custom type // value // some custom type const CUSTOM_TYPE_LIST = ['identity']; exports.CANDID_TYPE_LIST = CANDID_TYPE_LIST; exports.CUSTOM_TYPE_LIST = CUSTOM_TYPE_LIST;