/** Mirror vetra-access-codes `callerDid` so the attached-key lookup matches the redemption. */
function callerDid(u) {
    return `did:pkh:${u.networkId}:${u.chainId}:${u.address.toLowerCase()}`;
}
export function createResolvers(deps) {
    return {
        Query: {
            VetraStudioPool: () => ({}),
        },
        VetraStudioPoolQueries: {
            config: () => ({ version: deps.version }),
        },
        Mutation: {
            VetraStudioPool: () => ({}),
        },
        VetraStudioPoolMutations: {
            claimStudioEnvironment: async (_p, _a, ctx) => {
                if (!ctx.user)
                    throw new Error("UNAUTHENTICATED");
                return deps.claim(callerDid(ctx.user));
            },
        },
    };
}
