@junobuild/ic-client 0.0.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import type { IDL } from '@dfinity/candid';
2
- import type { ActorParameters, MissionControlParameters, OrbiterParameters, SatelliteParameters } from '../types/actor';
3
- import { type DeprecatedMissionControlVersionActor, type DeprecatedOrbiterVersionActor, type DeprecatedSatelliteActor, type DeprecatedSatelliteNoScopeActor, type DeprecatedSatelliteVersionActor, type MissionControlActor, type OrbiterActor, type SatelliteActor } from './actor.factory';
2
+ import type { Principal } from '@dfinity/principal';
3
+ import type { ActorParameters, ConsoleParameters, MissionControlParameters, OrbiterParameters, SatelliteParameters } from '../types/actor';
4
+ import { type ConsoleActor, type DeprecatedMissionControlVersionActor, type DeprecatedOrbiterVersionActor, type DeprecatedSatelliteActor, type DeprecatedSatelliteNoScopeActor, type DeprecatedSatelliteVersionActor, type MissionControlActor, type OrbiterActor, type SatelliteActor } from './actor.factory';
4
5
  /**
5
6
  * @deprecated TODO: for backwards compatibility - to be removed
6
7
  */
@@ -28,7 +29,10 @@ export declare const getOrbiterActor: ({ orbiterId, certified, ...rest }: Orbite
28
29
  * @deprecated TODO: for backwards compatibility - to be removed
29
30
  */
30
31
  export declare const getDeprecatedOrbiterVersionActor: ({ orbiterId, ...rest }: OrbiterParameters) => Promise<DeprecatedOrbiterVersionActor>;
32
+ export declare const getConsoleActor: ({ consoleId, certified, ...rest }: ConsoleParameters & {
33
+ certified?: boolean;
34
+ }) => Promise<ConsoleActor>;
31
35
  export declare const getActor: <T>({ canisterId, idlFactory, ...rest }: ActorParameters & {
32
- canisterId: string | undefined;
36
+ canisterId: Principal | string | undefined;
33
37
  idlFactory: IDL.InterfaceFactory;
34
38
  }) => Promise<T>;
@@ -8,6 +8,10 @@ import { idlFactory as idlDeprecatedFactoryMissionControlVersion } from '../../d
8
8
  import { idlFactory as idlDeprecatedFactorySatellite } from '../../declarations/deprecated/satellite-deprecated.factory.did.js';
9
9
  import { idlFactory as idlFactorySatellite } from '../../declarations/satellite/satellite.factory.did.js';
10
10
  import { idlFactory as idlCertifiedFactorySatellite } from '../../declarations/satellite/satellite.factory.certified.did.js';
11
+ import { idlFactory as idlFactoryConsole } from '../../declarations/console/console.factory.did.js';
12
+ import { idlFactory as idlCertifiedFactoryConsole } from '../../declarations/console/console.factory.certified.did.js';
13
+ import { idlFactory as idlFactorySputnik } from '../../declarations/sputnik/sputnik.factory.did.js';
14
+ import type { _SERVICE as ConsoleActor } from '../../declarations/console/console.did';
11
15
  import type { _SERVICE as DeprecatedMissionControlVersionActor } from '../../declarations/deprecated/mission_control-deprecated-version.did';
12
16
  import type { _SERVICE as DeprecatedOrbiterVersionActor } from '../../declarations/deprecated/orbiter-deprecated-version.did';
13
17
  import type { _SERVICE as DeprecatedSatelliteNoScopeActor } from '../../declarations/deprecated/satellite-deprecated-no-scope.did';
@@ -16,4 +20,4 @@ import type { _SERVICE as DeprecatedSatelliteActor } from '../../declarations/de
16
20
  import type { _SERVICE as MissionControlActor } from '../../declarations/mission_control/mission_control.did';
17
21
  import type { _SERVICE as OrbiterActor } from '../../declarations/orbiter/orbiter.did';
18
22
  import type { _SERVICE as SatelliteActor } from '../../declarations/satellite/satellite.did';
19
- export { idlCertifiedFactoryOrbiter, idlCertifiedFactorySatellite, idlDeprecatedFactoryMissionControlVersion, idlDeprecatedFactoryOrbiterVersion, idlDeprecatedFactorySatellite, idlDeprecatedFactorySatelliteNoScope, idlDeprecatedFactorySatelliteVersion, idlFactoryMissionControl, idlFactoryOrbiter, idlFactorySatellite, type DeprecatedMissionControlVersionActor, type DeprecatedOrbiterVersionActor, type DeprecatedSatelliteActor, type DeprecatedSatelliteNoScopeActor, type DeprecatedSatelliteVersionActor, type MissionControlActor, type OrbiterActor, type SatelliteActor };
23
+ export { idlCertifiedFactoryConsole, idlCertifiedFactoryOrbiter, idlCertifiedFactorySatellite, idlDeprecatedFactoryMissionControlVersion, idlDeprecatedFactoryOrbiterVersion, idlDeprecatedFactorySatellite, idlDeprecatedFactorySatelliteNoScope, idlDeprecatedFactorySatelliteVersion, idlFactoryConsole, idlFactoryMissionControl, idlFactoryOrbiter, idlFactorySatellite, idlFactorySputnik, type ConsoleActor, type DeprecatedMissionControlVersionActor, type DeprecatedOrbiterVersionActor, type DeprecatedSatelliteActor, type DeprecatedSatelliteNoScopeActor, type DeprecatedSatelliteVersionActor, type MissionControlActor, type OrbiterActor, type SatelliteActor };
@@ -1,2 +1,14 @@
1
1
  export * from './api/actor.api';
2
2
  export * from './api/actor.factory';
3
+ export * from './api/agent.api';
4
+ export type * from './types/actor';
5
+ export * from './utils/principal.utils';
6
+ export type * as ConsoleDid from '../declarations/console/console.did';
7
+ export type * as DeprecatedMissionControlVersionDid from '../declarations/deprecated/mission_control-deprecated-version.did';
8
+ export type * as DeprecatedOrbiterVersionDid from '../declarations/deprecated/orbiter-deprecated-version.did';
9
+ export type * as DeprecatedSatelliteNoScopeDid from '../declarations/deprecated/satellite-deprecated-no-scope.did';
10
+ export type * as DeprecatedSatelliteVersionDid from '../declarations/deprecated/satellite-deprecated-version.did';
11
+ export type * as DeprecatedSatelliteDid from '../declarations/deprecated/satellite-deprecated.did';
12
+ export type * as MissionControlDid from '../declarations/mission_control/mission_control.did';
13
+ export type * as OrbiterDid from '../declarations/orbiter/orbiter.did';
14
+ export type * as SatelliteDid from '../declarations/satellite/satellite.did';
@@ -1,4 +1,5 @@
1
1
  import type { HttpAgent, Identity } from '@dfinity/agent';
2
+ import type { Principal } from '@dfinity/principal';
2
3
  /**
3
4
  * Represents the parameters for an actor.
4
5
  * @interface
@@ -31,7 +32,7 @@ export interface SatelliteParameters extends ActorParameters {
31
32
  * @type {string}
32
33
  * @optional
33
34
  */
34
- satelliteId?: string;
35
+ satelliteId?: string | Principal;
35
36
  }
36
37
  /**
37
38
  * Represents the parameters for a Mission Control actor.
@@ -44,7 +45,7 @@ export interface MissionControlParameters extends ActorParameters {
44
45
  * @type {string}
45
46
  * @optional
46
47
  */
47
- missionControlId?: string;
48
+ missionControlId?: string | Principal;
48
49
  }
49
50
  /**
50
51
  * Represents the parameters for a Console actor.
@@ -57,7 +58,7 @@ export interface ConsoleParameters extends ActorParameters {
57
58
  * @type {string}
58
59
  * @optional
59
60
  */
60
- consoleId?: string;
61
+ consoleId?: string | Principal;
61
62
  }
62
63
  /**
63
64
  * Represents the parameters for an Orbiter actor.
@@ -70,5 +71,5 @@ export interface OrbiterParameters extends ActorParameters {
70
71
  * @type {string}
71
72
  * @optional
72
73
  */
73
- orbiterId?: string;
74
+ orbiterId?: string | Principal;
74
75
  }
@@ -0,0 +1,2 @@
1
+ import { Principal } from '@dfinity/principal';
2
+ export declare const toPrincipal: (id: string | Principal) => Principal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/ic-client",
3
- "version": "0.0.1",
3
+ "version": "1.0.0",
4
4
  "description": "Agent and actor with generated bindings for Juno on the Internet Computer",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",