import { idlFactory as UserFactory } from '../canisters/users/users.utils.did';
import { createActor } from './actor.utils';
export const initUserActor = async ({ identity, host }) => {
  const userActor = await createUserActor({ identity, host });
  const ownerId = await userActor.getUserId();
  return {
    userActor,
    ownerId
  };
};
const createUserActor = ({ identity, host }) => {
  return createActor({ canisterId: process.env.USERS_CANISTER_ID, idlFactory: UserFactory, identity, host });
};
