Skip to content

Commit

Permalink
move stable b tree maps
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Oct 2, 2023
1 parent 1f547d3 commit daa1f5d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 22 deletions.
5 changes: 2 additions & 3 deletions src/lib_functional/candid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, RecursionLevel = 0> = RecursionLevel extends 10
? T
Expand Down
2 changes: 1 addition & 1 deletion src/lib_functional/candid/reference/service.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/lib_functional/candid/serde.ts
Original file line number Diff line number Diff line change
@@ -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 '../';
Expand Down
3 changes: 2 additions & 1 deletion src/lib_functional/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/lib_new/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
import './globals';
export { Principal } from '@dfinity/principal';
export { IDL } from '@dfinity/candid';

export * from './stable_b_tree_map';

0 comments on commit daa1f5d

Please sign in to comment.