UNPKG

@opendatalabs/vana-sdk

Version:

A TypeScript library for interacting with Vana Network smart contracts.

14 lines (13 loc) 576 B
import { z } from "zod"; export declare const ScopeSchema: z.ZodString; export type Scope = z.infer<typeof ScopeSchema>; export interface ParsedScope { source: string; category: string; subcategory?: string; raw: string; } export declare function parseScope(scope: string): ParsedScope; export declare function scopeToPathSegments(scope: string): string[]; export declare function scopeMatchesPattern(requestedScope: string, grantPattern: string): boolean; export declare function scopeCoveredByGrant(requestedScope: string, grantedScopes: string[]): boolean;