/** * `vana app claim` - hand the app's owner one link that adds this app to * their Vana Account, so they can fund its escrow there. * * An app registered from the CLI has its own key and is in nobody's Apps * list, and Account's Fund page only serves apps in the signed-in Account. * This signs a BuilderClaimLink with the app key and prints a link to * Account; whoever opens it while signed in adds the app with one click and * lands on its Fund page. The key never leaves this machine and nothing has * to call back into it, so it works from a sandbox or another machine too. */ import { type GatewayClient } from "@opendatalabs/vana-sdk"; import { readAppProfile, saveAppProfile } from "../../core/app-profile.js"; import { resolveAppKey } from "../../core/app-key.js"; import { type ResolvedNetwork } from "../../core/network.js"; import { type AppCommandOptions } from "./outcome.js"; /** * Must match Account's BUILDER_CLAIM_LINK_TYPES. The app name is signed so * nobody can relabel the link; Account shows it instead of the URL's host. */ export declare const BUILDER_CLAIM_LINK_TYPES: { readonly BuilderClaimLink: readonly [{ readonly name: "granteeAddress"; readonly type: "address"; }, { readonly name: "network"; readonly type: "string"; }, { readonly name: "nonce"; readonly type: "bytes32"; }, { readonly name: "expiry"; readonly type: "uint64"; }, { readonly name: "appName"; readonly type: "string"; }]; }; /** Account's limit for an app name. */ export declare const CLAIM_LINK_APP_NAME_MAX_LENGTH = 64; /** Account accepts links up to an hour out; stay inside it with room for clock skew. */ export declare const CLAIM_LINK_TTL_SEC: number; export interface ClaimLink { url: string; expiry: number; } export declare function buildClaimLink(input: { privateKey: `0x${string}`; network: ResolvedNetwork; appName?: string; nowSec?: number; nonce?: `0x${string}`; }): Promise; export interface ClaimOptions extends AppCommandOptions { /** Name to show in the owner's Account; remembered like `register --app-name`. */ appName?: string; } export interface ClaimDeps { createClient?: (gatewayUrl: string) => GatewayClient; readProfile?: typeof readAppProfile; saveProfile?: typeof saveAppProfile; resolveKey?: typeof resolveAppKey; openUrl?: (url: string) => void; isTty?: boolean; } export declare function runAppClaim(options: ClaimOptions, deps?: ClaimDeps): Promise; //# sourceMappingURL=claim.d.ts.map