@junobuild/core-peer 0.0.26 → 0.0.27
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.
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/api/actor.api.d.ts +7 -1
- package/dist/types/index.d.ts +7 -6
- package/dist/types/services/factory.services.d.ts +8 -0
- package/dist/types/stores/actor.store.d.ts +21 -0
- package/dist/types/stores/agent.store.d.ts +13 -0
- package/dist/types/types/build.types.d.ts +5 -0
- package/package.json +1 -1
- package/dist/types/utils/actor.utils.d.ts +0 -6
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import type { ActorSubclass } from '@dfinity/agent';
|
|
2
|
+
import type { ActorMethod } from '@dfinity/agent/lib/esm/actor';
|
|
3
|
+
import type { IDL } from '@dfinity/candid';
|
|
1
4
|
import type { _SERVICE as SatelliteActor } from '../../declarations/satellite/satellite.did';
|
|
2
5
|
import type { Satellite } from '../types/satellite.types';
|
|
3
|
-
export declare const getSatelliteActor: (
|
|
6
|
+
export declare const getSatelliteActor: (satellite: Satellite) => Promise<SatelliteActor>;
|
|
7
|
+
export declare const getSatelliteExtendedActor: <T = Record<string, ActorMethod<unknown[], unknown>>>({ idlFactory, ...rest }: Satellite & {
|
|
8
|
+
idlFactory: IDL.InterfaceFactory;
|
|
9
|
+
}) => Promise<ActorSubclass<T>>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,14 +5,15 @@ import type { Unsubscribe } from './types/subscription.types';
|
|
|
5
5
|
export * from './providers/auth.providers';
|
|
6
6
|
export { signIn, signOut, unsafeIdentity } from './services/auth.services';
|
|
7
7
|
export * from './services/doc.services';
|
|
8
|
+
export * from './services/factory.services';
|
|
8
9
|
export * from './services/storage.services';
|
|
9
|
-
export * from './types/auth.types';
|
|
10
|
-
export * from './types/doc.types';
|
|
11
|
-
export * from './types/env.types';
|
|
10
|
+
export type * from './types/auth.types';
|
|
11
|
+
export type * from './types/doc.types';
|
|
12
|
+
export type * from './types/env.types';
|
|
12
13
|
export { ListOrder, ListPaginate, ListParams, ListResults } from './types/list.types';
|
|
13
|
-
export * from './types/satellite.types';
|
|
14
|
-
export * from './types/storage.types';
|
|
15
|
-
export * from './types/subscription.types';
|
|
14
|
+
export type * from './types/satellite.types';
|
|
15
|
+
export type * from './types/storage.types';
|
|
16
|
+
export type * from './types/subscription.types';
|
|
16
17
|
export type { Asset, AssetEncoding, AssetKey, ENCODING_TYPE, Storage };
|
|
17
18
|
/**
|
|
18
19
|
* Initializes Juno with the provided optional environment parameters.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ActorSubclass } from '@dfinity/agent';
|
|
2
|
+
import type { ActorMethod } from '@dfinity/agent/lib/esm/actor';
|
|
3
|
+
import type { IDL } from '@dfinity/candid';
|
|
4
|
+
import type { SatelliteOptions } from '../types/satellite.types';
|
|
5
|
+
export declare const getSatelliteExtendedActor: <T = Record<string, ActorMethod<unknown[], unknown>>>({ idlFactory, satellite }: {
|
|
6
|
+
idlFactory: IDL.InterfaceFactory;
|
|
7
|
+
satellite?: SatelliteOptions;
|
|
8
|
+
}) => Promise<ActorSubclass<T>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ActorSubclass } from '@dfinity/agent';
|
|
2
|
+
import type { ActorMethod } from '@dfinity/agent/lib/esm/actor';
|
|
3
|
+
import type { IDL } from '@dfinity/candid';
|
|
4
|
+
import type { BuildType } from '../types/build.types';
|
|
5
|
+
import type { Satellite } from '../types/satellite.types';
|
|
6
|
+
type ActorParams = {
|
|
7
|
+
idlFactory: IDL.InterfaceFactory;
|
|
8
|
+
} & Required<Pick<Satellite, 'satelliteId' | 'identity'>> & Pick<Satellite, 'fetch' | 'container'>;
|
|
9
|
+
type ActorRecord = Record<string, ActorMethod>;
|
|
10
|
+
export declare class ActorStore {
|
|
11
|
+
#private;
|
|
12
|
+
private static instance;
|
|
13
|
+
private constructor();
|
|
14
|
+
static getInstance(): ActorStore;
|
|
15
|
+
getActor<T = ActorRecord>({ satelliteId, identity, buildType, ...rest }: ActorParams & {
|
|
16
|
+
buildType: BuildType;
|
|
17
|
+
}): Promise<ActorSubclass<T>>;
|
|
18
|
+
reset(): void;
|
|
19
|
+
private createActor;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Agent } from '@dfinity/agent';
|
|
2
|
+
import type { Satellite } from '../types/satellite.types';
|
|
3
|
+
type AgentParams = Required<Pick<Satellite, 'identity'>> & Pick<Satellite, 'fetch' | 'container'>;
|
|
4
|
+
export declare class AgentStore {
|
|
5
|
+
#private;
|
|
6
|
+
private static instance;
|
|
7
|
+
private constructor();
|
|
8
|
+
static getInstance(): AgentStore;
|
|
9
|
+
getAgent({ identity, ...rest }: AgentParams): Promise<Agent>;
|
|
10
|
+
reset(): void;
|
|
11
|
+
private createAgent;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ActorMethod, ActorSubclass } from '@dfinity/agent';
|
|
2
|
-
import type { IDL } from '@dfinity/candid';
|
|
3
|
-
import type { Satellite } from '../types/satellite.types';
|
|
4
|
-
export declare const createActor: <T = Record<string, ActorMethod<unknown[], unknown>>>({ satelliteId: canisterId, idlFactory, identity, fetch, container }: {
|
|
5
|
-
idlFactory: IDL.InterfaceFactory;
|
|
6
|
-
} & Required<Pick<Satellite, 'satelliteId' | 'identity'>> & Pick<Satellite, 'fetch' | 'container'>) => Promise<ActorSubclass<T>>;
|