diff --git a/src/lib_functional/candid/index.ts b/src/lib_functional/candid/index.ts index 6c66177e04..ae995ebcbe 100644 --- a/src/lib_functional/candid/index.ts +++ b/src/lib_functional/candid/index.ts @@ -37,13 +37,12 @@ import { AzleBool, bool, Principal, - AzleResult, - Result, AzleTuple, AzleText, AzleVoid, Opt -} from '../../lib_new'; +} from '../candid/reference/primitives'; +import { AzleResult, Result } from './reference/result'; export type TypeMapping = RecursionLevel extends 10 ? T diff --git a/src/lib_functional/candid/reference/service.ts b/src/lib_functional/candid/reference/service.ts index da4c8488aa..c58c6062b8 100644 --- a/src/lib_functional/candid/reference/service.ts +++ b/src/lib_functional/candid/reference/service.ts @@ -1,5 +1,5 @@ import { IDL, Principal, TypeMapping } from '../..'; -import { ic, IDL, ServiceFunctionInfo } from '../../../lib_new'; +import { ic } from '../../'; import { Parent, toParamIDLTypes, toReturnIDLType } from '../../utils'; import { CanisterMethodInfo } from '../../canister_methods'; import { decode, encodeMultiple } from '../serde'; diff --git a/src/lib_functional/candid/serde.ts b/src/lib_functional/candid/serde.ts index 0fa2508a38..a011dfbd4a 100644 --- a/src/lib_functional/candid/serde.ts +++ b/src/lib_functional/candid/serde.ts @@ -1,6 +1,6 @@ import { IDL } from '@dfinity/candid'; -import { AzleVec, AzleOpt, AzleTuple } from '../../lib_new'; +import { AzleVec, AzleOpt, AzleTuple } from '../candid/reference/primitives'; import { toIDLType } from '../utils'; import { DecodeVisitor, EncodeVisitor } from '../visitors/encode_decode'; import { CandidType } from '../'; diff --git a/src/lib_functional/index.ts b/src/lib_functional/index.ts index 5968fe0908..c7a80e7fe6 100644 --- a/src/lib_functional/index.ts +++ b/src/lib_functional/index.ts @@ -1,7 +1,8 @@ +import '../lib_new/globals'; export * from './canister_methods'; export * from './candid'; export * from './candid/reference/primitives'; export * from './ic'; -export * from '../lib_new/stable_b_tree_map'; +export * from './stable_b_tree_map'; export * from './candid/reference/result'; export { IDL } from '@dfinity/candid'; diff --git a/src/lib_new/stable_b_tree_map.ts b/src/lib_functional/stable_b_tree_map.ts similarity index 96% rename from src/lib_new/stable_b_tree_map.ts rename to src/lib_functional/stable_b_tree_map.ts index 44bdb99f7d..d11321b3e8 100644 --- a/src/lib_new/stable_b_tree_map.ts +++ b/src/lib_functional/stable_b_tree_map.ts @@ -1,15 +1,7 @@ -import { - CandidType, - None, - Opt, - Some, - TypeMapping, - nat64, - nat8 -} from '../lib_functional'; +import { CandidType, None, Opt, Some, TypeMapping, nat64, nat8 } from '.'; import { IDL } from './index'; -import { toIDLType } from '../lib_functional/utils'; -import { encode, decode } from '../lib_functional/candid/serde'; +import { toIDLType } from './utils'; +import { encode, decode } from './candid/serde'; export function StableBTreeMap< Key extends CandidType, diff --git a/src/lib_functional/visitors/encode_decode/decode_visitor.ts b/src/lib_functional/visitors/encode_decode/decode_visitor.ts index 5cb580dcac..bb7bb2e76e 100644 --- a/src/lib_functional/visitors/encode_decode/decode_visitor.ts +++ b/src/lib_functional/visitors/encode_decode/decode_visitor.ts @@ -9,7 +9,7 @@ import { visitVariant, visitVec } from '.'; -import { Opt } from '../../primitives'; +import { Opt } from '../../candid/reference/primitives'; /** * When we decode a Service we are given a principal. We need to use that diff --git a/src/lib_new/index.ts b/src/lib_new/index.ts index f58471cc3b..53521e8aa7 100644 --- a/src/lib_new/index.ts +++ b/src/lib_new/index.ts @@ -1,5 +1 @@ import './globals'; -export { Principal } from '@dfinity/principal'; -export { IDL } from '@dfinity/candid'; - -export * from './stable_b_tree_map';