@opendatalabs/vana-sdk 0.1.0-alpha.81526eb → 0.1.0-alpha.82bbb39

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.
@@ -48,7 +48,7 @@ var vanaMainnet = {
48
48
  url: "https://vanascan.io"
49
49
  }
50
50
  },
51
- subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.5/gn"
51
+ subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.6/gn"
52
52
  };
53
53
  var moksha = {
54
54
  id: 14800,
@@ -69,7 +69,7 @@ var moksha = {
69
69
  url: "https://moksha.vanascan.io"
70
70
  }
71
71
  },
72
- subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.5/gn"
72
+ subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.6/gn"
73
73
  };
74
74
  function getChainConfig(chainId) {
75
75
  switch (chainId) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chains.browser.ts","../src/chains/definitions.ts"],"sourcesContent":["/**\n * Browser-specific chains entry point\n *\n * This is identical to the base chains export since chain configurations\n * are environment-agnostic.\n */\n\nexport type { VanaChainConfig } from \"./chains/definitions\";\nexport {\n vanaMainnet,\n moksha,\n mokshaTestnet,\n getChainConfig,\n getAllChains,\n} from \"./chains/definitions\";\n","/**\n * Chain configuration definitions for Vana networks\n *\n * These provide default configurations for known Vana chains.\n * Applications can use these as-is or override specific values.\n */\n\nimport type { Chain } from \"viem\";\n\nexport interface VanaChainConfig extends Chain {\n /** URL for the subgraph API endpoint used to query on-chain data */\n subgraphUrl: string;\n}\n\n/**\n * Vana Mainnet configuration\n */\nexport const vanaMainnet: VanaChainConfig = {\n id: 1480,\n name: \"Vana\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan\",\n url: \"https://vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.5/gn\",\n} as const;\n\n/**\n * Moksha Testnet configuration\n */\nexport const moksha: VanaChainConfig = {\n id: 14800,\n name: \"Moksha Testnet\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.moksha.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan - Moksha\",\n url: \"https://moksha.vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.5/gn\",\n} as const;\n\n/**\n * Retrieves the chain configuration for a given chain ID.\n *\n * @param chainId - The numeric chain ID to look up\n * @returns The chain configuration if found, undefined otherwise\n * @example\n * ```typescript\n * const config = getChainConfig(1480);\n * if (config) {\n * console.log('Chain name:', config.name);\n * console.log('Subgraph URL:', config.subgraphUrl);\n * }\n * ```\n */\nexport function getChainConfig(chainId: number): VanaChainConfig | undefined {\n switch (chainId) {\n case 1480:\n return vanaMainnet;\n case 14800:\n return moksha;\n default:\n return undefined;\n }\n}\n\n// Backwards compatibility alias\nexport const mokshaTestnet = moksha;\n\n/**\n * Retrieves all available Vana chain configurations.\n *\n * @returns Array of all supported Vana chain configurations\n * @example\n * ```typescript\n * const chains = getAllChains();\n * console.log('Supported chains:');\n * chains.forEach(chain => {\n * console.log(`- ${chain.name} (ID: ${chain.id})`);\n * });\n * ```\n */\nexport function getAllChains(): VanaChainConfig[] {\n return [vanaMainnet, moksha];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiBO,IAAM,cAA+B;AAAA,EAC1C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,sBAAsB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAKO,IAAM,SAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,6BAA6B;AAAA,IACtC;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAgBO,SAAS,eAAe,SAA8C;AAC3E,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,gBAAgB;AAetB,SAAS,eAAkC;AAChD,SAAO,CAAC,aAAa,MAAM;AAC7B;","names":[]}
1
+ {"version":3,"sources":["../src/chains.browser.ts","../src/chains/definitions.ts"],"sourcesContent":["/**\n * Browser-specific chains entry point\n *\n * This is identical to the base chains export since chain configurations\n * are environment-agnostic.\n */\n\nexport type { VanaChainConfig } from \"./chains/definitions\";\nexport {\n vanaMainnet,\n moksha,\n mokshaTestnet,\n getChainConfig,\n getAllChains,\n} from \"./chains/definitions\";\n","/**\n * Chain configuration definitions for Vana networks\n *\n * These provide default configurations for known Vana chains.\n * Applications can use these as-is or override specific values.\n */\n\nimport type { Chain } from \"viem\";\n\nexport interface VanaChainConfig extends Chain {\n /** URL for the subgraph API endpoint used to query on-chain data */\n subgraphUrl: string;\n}\n\n/**\n * Vana Mainnet configuration\n */\nexport const vanaMainnet: VanaChainConfig = {\n id: 1480,\n name: \"Vana\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan\",\n url: \"https://vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.6/gn\",\n} as const;\n\n/**\n * Moksha Testnet configuration\n */\nexport const moksha: VanaChainConfig = {\n id: 14800,\n name: \"Moksha Testnet\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.moksha.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan - Moksha\",\n url: \"https://moksha.vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.6/gn\",\n} as const;\n\n/**\n * Retrieves the chain configuration for a given chain ID.\n *\n * @param chainId - The numeric chain ID to look up\n * @returns The chain configuration if found, undefined otherwise\n * @example\n * ```typescript\n * const config = getChainConfig(1480);\n * if (config) {\n * console.log('Chain name:', config.name);\n * console.log('Subgraph URL:', config.subgraphUrl);\n * }\n * ```\n */\nexport function getChainConfig(chainId: number): VanaChainConfig | undefined {\n switch (chainId) {\n case 1480:\n return vanaMainnet;\n case 14800:\n return moksha;\n default:\n return undefined;\n }\n}\n\n// Backwards compatibility alias\nexport const mokshaTestnet = moksha;\n\n/**\n * Retrieves all available Vana chain configurations.\n *\n * @returns Array of all supported Vana chain configurations\n * @example\n * ```typescript\n * const chains = getAllChains();\n * console.log('Supported chains:');\n * chains.forEach(chain => {\n * console.log(`- ${chain.name} (ID: ${chain.id})`);\n * });\n * ```\n */\nexport function getAllChains(): VanaChainConfig[] {\n return [vanaMainnet, moksha];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiBO,IAAM,cAA+B;AAAA,EAC1C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,sBAAsB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAKO,IAAM,SAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,6BAA6B;AAAA,IACtC;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAgBO,SAAS,eAAe,SAA8C;AAC3E,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,gBAAgB;AAetB,SAAS,eAAkC;AAChD,SAAO,CAAC,aAAa,MAAM;AAC7B;","names":[]}
@@ -18,7 +18,7 @@ var vanaMainnet = {
18
18
  url: "https://vanascan.io"
19
19
  }
20
20
  },
21
- subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.5/gn"
21
+ subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.6/gn"
22
22
  };
23
23
  var moksha = {
24
24
  id: 14800,
@@ -39,7 +39,7 @@ var moksha = {
39
39
  url: "https://moksha.vanascan.io"
40
40
  }
41
41
  },
42
- subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.5/gn"
42
+ subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.6/gn"
43
43
  };
44
44
  function getChainConfig(chainId) {
45
45
  switch (chainId) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chains/definitions.ts"],"sourcesContent":["/**\n * Chain configuration definitions for Vana networks\n *\n * These provide default configurations for known Vana chains.\n * Applications can use these as-is or override specific values.\n */\n\nimport type { Chain } from \"viem\";\n\nexport interface VanaChainConfig extends Chain {\n /** URL for the subgraph API endpoint used to query on-chain data */\n subgraphUrl: string;\n}\n\n/**\n * Vana Mainnet configuration\n */\nexport const vanaMainnet: VanaChainConfig = {\n id: 1480,\n name: \"Vana\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan\",\n url: \"https://vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.5/gn\",\n} as const;\n\n/**\n * Moksha Testnet configuration\n */\nexport const moksha: VanaChainConfig = {\n id: 14800,\n name: \"Moksha Testnet\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.moksha.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan - Moksha\",\n url: \"https://moksha.vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.5/gn\",\n} as const;\n\n/**\n * Retrieves the chain configuration for a given chain ID.\n *\n * @param chainId - The numeric chain ID to look up\n * @returns The chain configuration if found, undefined otherwise\n * @example\n * ```typescript\n * const config = getChainConfig(1480);\n * if (config) {\n * console.log('Chain name:', config.name);\n * console.log('Subgraph URL:', config.subgraphUrl);\n * }\n * ```\n */\nexport function getChainConfig(chainId: number): VanaChainConfig | undefined {\n switch (chainId) {\n case 1480:\n return vanaMainnet;\n case 14800:\n return moksha;\n default:\n return undefined;\n }\n}\n\n// Backwards compatibility alias\nexport const mokshaTestnet = moksha;\n\n/**\n * Retrieves all available Vana chain configurations.\n *\n * @returns Array of all supported Vana chain configurations\n * @example\n * ```typescript\n * const chains = getAllChains();\n * console.log('Supported chains:');\n * chains.forEach(chain => {\n * console.log(`- ${chain.name} (ID: ${chain.id})`);\n * });\n * ```\n */\nexport function getAllChains(): VanaChainConfig[] {\n return [vanaMainnet, moksha];\n}\n"],"mappings":";AAiBO,IAAM,cAA+B;AAAA,EAC1C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,sBAAsB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAKO,IAAM,SAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,6BAA6B;AAAA,IACtC;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAgBO,SAAS,eAAe,SAA8C;AAC3E,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,gBAAgB;AAetB,SAAS,eAAkC;AAChD,SAAO,CAAC,aAAa,MAAM;AAC7B;","names":[]}
1
+ {"version":3,"sources":["../src/chains/definitions.ts"],"sourcesContent":["/**\n * Chain configuration definitions for Vana networks\n *\n * These provide default configurations for known Vana chains.\n * Applications can use these as-is or override specific values.\n */\n\nimport type { Chain } from \"viem\";\n\nexport interface VanaChainConfig extends Chain {\n /** URL for the subgraph API endpoint used to query on-chain data */\n subgraphUrl: string;\n}\n\n/**\n * Vana Mainnet configuration\n */\nexport const vanaMainnet: VanaChainConfig = {\n id: 1480,\n name: \"Vana\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan\",\n url: \"https://vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.6/gn\",\n} as const;\n\n/**\n * Moksha Testnet configuration\n */\nexport const moksha: VanaChainConfig = {\n id: 14800,\n name: \"Moksha Testnet\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.moksha.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan - Moksha\",\n url: \"https://moksha.vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.6/gn\",\n} as const;\n\n/**\n * Retrieves the chain configuration for a given chain ID.\n *\n * @param chainId - The numeric chain ID to look up\n * @returns The chain configuration if found, undefined otherwise\n * @example\n * ```typescript\n * const config = getChainConfig(1480);\n * if (config) {\n * console.log('Chain name:', config.name);\n * console.log('Subgraph URL:', config.subgraphUrl);\n * }\n * ```\n */\nexport function getChainConfig(chainId: number): VanaChainConfig | undefined {\n switch (chainId) {\n case 1480:\n return vanaMainnet;\n case 14800:\n return moksha;\n default:\n return undefined;\n }\n}\n\n// Backwards compatibility alias\nexport const mokshaTestnet = moksha;\n\n/**\n * Retrieves all available Vana chain configurations.\n *\n * @returns Array of all supported Vana chain configurations\n * @example\n * ```typescript\n * const chains = getAllChains();\n * console.log('Supported chains:');\n * chains.forEach(chain => {\n * console.log(`- ${chain.name} (ID: ${chain.id})`);\n * });\n * ```\n */\nexport function getAllChains(): VanaChainConfig[] {\n return [vanaMainnet, moksha];\n}\n"],"mappings":";AAiBO,IAAM,cAA+B;AAAA,EAC1C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,sBAAsB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAKO,IAAM,SAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,6BAA6B;AAAA,IACtC;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAgBO,SAAS,eAAe,SAA8C;AAC3E,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,gBAAgB;AAetB,SAAS,eAAkC;AAChD,SAAO,CAAC,aAAa,MAAM;AAC7B;","names":[]}
package/dist/chains.cjs CHANGED
@@ -48,7 +48,7 @@ var vanaMainnet = {
48
48
  url: "https://vanascan.io"
49
49
  }
50
50
  },
51
- subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.5/gn"
51
+ subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.6/gn"
52
52
  };
53
53
  var moksha = {
54
54
  id: 14800,
@@ -69,7 +69,7 @@ var moksha = {
69
69
  url: "https://moksha.vanascan.io"
70
70
  }
71
71
  },
72
- subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.5/gn"
72
+ subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.6/gn"
73
73
  };
74
74
  function getChainConfig(chainId) {
75
75
  switch (chainId) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chains.ts","../src/chains/definitions.ts"],"sourcesContent":["/**\n * Chains entry point for SSR-safe chain configuration exports\n *\n * This module exports only chain configurations without any platform-specific\n * dependencies, making it safe for server-side rendering.\n */\n\nexport type { VanaChainConfig } from \"./chains/definitions\";\nexport {\n vanaMainnet,\n moksha,\n mokshaTestnet,\n getChainConfig,\n getAllChains,\n} from \"./chains/definitions\";\n","/**\n * Chain configuration definitions for Vana networks\n *\n * These provide default configurations for known Vana chains.\n * Applications can use these as-is or override specific values.\n */\n\nimport type { Chain } from \"viem\";\n\nexport interface VanaChainConfig extends Chain {\n /** URL for the subgraph API endpoint used to query on-chain data */\n subgraphUrl: string;\n}\n\n/**\n * Vana Mainnet configuration\n */\nexport const vanaMainnet: VanaChainConfig = {\n id: 1480,\n name: \"Vana\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan\",\n url: \"https://vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.5/gn\",\n} as const;\n\n/**\n * Moksha Testnet configuration\n */\nexport const moksha: VanaChainConfig = {\n id: 14800,\n name: \"Moksha Testnet\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.moksha.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan - Moksha\",\n url: \"https://moksha.vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.5/gn\",\n} as const;\n\n/**\n * Retrieves the chain configuration for a given chain ID.\n *\n * @param chainId - The numeric chain ID to look up\n * @returns The chain configuration if found, undefined otherwise\n * @example\n * ```typescript\n * const config = getChainConfig(1480);\n * if (config) {\n * console.log('Chain name:', config.name);\n * console.log('Subgraph URL:', config.subgraphUrl);\n * }\n * ```\n */\nexport function getChainConfig(chainId: number): VanaChainConfig | undefined {\n switch (chainId) {\n case 1480:\n return vanaMainnet;\n case 14800:\n return moksha;\n default:\n return undefined;\n }\n}\n\n// Backwards compatibility alias\nexport const mokshaTestnet = moksha;\n\n/**\n * Retrieves all available Vana chain configurations.\n *\n * @returns Array of all supported Vana chain configurations\n * @example\n * ```typescript\n * const chains = getAllChains();\n * console.log('Supported chains:');\n * chains.forEach(chain => {\n * console.log(`- ${chain.name} (ID: ${chain.id})`);\n * });\n * ```\n */\nexport function getAllChains(): VanaChainConfig[] {\n return [vanaMainnet, moksha];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiBO,IAAM,cAA+B;AAAA,EAC1C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,sBAAsB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAKO,IAAM,SAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,6BAA6B;AAAA,IACtC;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAgBO,SAAS,eAAe,SAA8C;AAC3E,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,gBAAgB;AAetB,SAAS,eAAkC;AAChD,SAAO,CAAC,aAAa,MAAM;AAC7B;","names":[]}
1
+ {"version":3,"sources":["../src/chains.ts","../src/chains/definitions.ts"],"sourcesContent":["/**\n * Chains entry point for SSR-safe chain configuration exports\n *\n * This module exports only chain configurations without any platform-specific\n * dependencies, making it safe for server-side rendering.\n */\n\nexport type { VanaChainConfig } from \"./chains/definitions\";\nexport {\n vanaMainnet,\n moksha,\n mokshaTestnet,\n getChainConfig,\n getAllChains,\n} from \"./chains/definitions\";\n","/**\n * Chain configuration definitions for Vana networks\n *\n * These provide default configurations for known Vana chains.\n * Applications can use these as-is or override specific values.\n */\n\nimport type { Chain } from \"viem\";\n\nexport interface VanaChainConfig extends Chain {\n /** URL for the subgraph API endpoint used to query on-chain data */\n subgraphUrl: string;\n}\n\n/**\n * Vana Mainnet configuration\n */\nexport const vanaMainnet: VanaChainConfig = {\n id: 1480,\n name: \"Vana\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan\",\n url: \"https://vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.6/gn\",\n} as const;\n\n/**\n * Moksha Testnet configuration\n */\nexport const moksha: VanaChainConfig = {\n id: 14800,\n name: \"Moksha Testnet\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.moksha.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan - Moksha\",\n url: \"https://moksha.vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.6/gn\",\n} as const;\n\n/**\n * Retrieves the chain configuration for a given chain ID.\n *\n * @param chainId - The numeric chain ID to look up\n * @returns The chain configuration if found, undefined otherwise\n * @example\n * ```typescript\n * const config = getChainConfig(1480);\n * if (config) {\n * console.log('Chain name:', config.name);\n * console.log('Subgraph URL:', config.subgraphUrl);\n * }\n * ```\n */\nexport function getChainConfig(chainId: number): VanaChainConfig | undefined {\n switch (chainId) {\n case 1480:\n return vanaMainnet;\n case 14800:\n return moksha;\n default:\n return undefined;\n }\n}\n\n// Backwards compatibility alias\nexport const mokshaTestnet = moksha;\n\n/**\n * Retrieves all available Vana chain configurations.\n *\n * @returns Array of all supported Vana chain configurations\n * @example\n * ```typescript\n * const chains = getAllChains();\n * console.log('Supported chains:');\n * chains.forEach(chain => {\n * console.log(`- ${chain.name} (ID: ${chain.id})`);\n * });\n * ```\n */\nexport function getAllChains(): VanaChainConfig[] {\n return [vanaMainnet, moksha];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiBO,IAAM,cAA+B;AAAA,EAC1C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,sBAAsB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAKO,IAAM,SAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,6BAA6B;AAAA,IACtC;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAgBO,SAAS,eAAe,SAA8C;AAC3E,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,gBAAgB;AAetB,SAAS,eAAkC;AAChD,SAAO,CAAC,aAAa,MAAM;AAC7B;","names":[]}
package/dist/chains.js CHANGED
@@ -18,7 +18,7 @@ var vanaMainnet = {
18
18
  url: "https://vanascan.io"
19
19
  }
20
20
  },
21
- subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.5/gn"
21
+ subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.6/gn"
22
22
  };
23
23
  var moksha = {
24
24
  id: 14800,
@@ -39,7 +39,7 @@ var moksha = {
39
39
  url: "https://moksha.vanascan.io"
40
40
  }
41
41
  },
42
- subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.5/gn"
42
+ subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.6/gn"
43
43
  };
44
44
  function getChainConfig(chainId) {
45
45
  switch (chainId) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chains/definitions.ts"],"sourcesContent":["/**\n * Chain configuration definitions for Vana networks\n *\n * These provide default configurations for known Vana chains.\n * Applications can use these as-is or override specific values.\n */\n\nimport type { Chain } from \"viem\";\n\nexport interface VanaChainConfig extends Chain {\n /** URL for the subgraph API endpoint used to query on-chain data */\n subgraphUrl: string;\n}\n\n/**\n * Vana Mainnet configuration\n */\nexport const vanaMainnet: VanaChainConfig = {\n id: 1480,\n name: \"Vana\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan\",\n url: \"https://vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.5/gn\",\n} as const;\n\n/**\n * Moksha Testnet configuration\n */\nexport const moksha: VanaChainConfig = {\n id: 14800,\n name: \"Moksha Testnet\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.moksha.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan - Moksha\",\n url: \"https://moksha.vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.5/gn\",\n} as const;\n\n/**\n * Retrieves the chain configuration for a given chain ID.\n *\n * @param chainId - The numeric chain ID to look up\n * @returns The chain configuration if found, undefined otherwise\n * @example\n * ```typescript\n * const config = getChainConfig(1480);\n * if (config) {\n * console.log('Chain name:', config.name);\n * console.log('Subgraph URL:', config.subgraphUrl);\n * }\n * ```\n */\nexport function getChainConfig(chainId: number): VanaChainConfig | undefined {\n switch (chainId) {\n case 1480:\n return vanaMainnet;\n case 14800:\n return moksha;\n default:\n return undefined;\n }\n}\n\n// Backwards compatibility alias\nexport const mokshaTestnet = moksha;\n\n/**\n * Retrieves all available Vana chain configurations.\n *\n * @returns Array of all supported Vana chain configurations\n * @example\n * ```typescript\n * const chains = getAllChains();\n * console.log('Supported chains:');\n * chains.forEach(chain => {\n * console.log(`- ${chain.name} (ID: ${chain.id})`);\n * });\n * ```\n */\nexport function getAllChains(): VanaChainConfig[] {\n return [vanaMainnet, moksha];\n}\n"],"mappings":";AAiBO,IAAM,cAA+B;AAAA,EAC1C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,sBAAsB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAKO,IAAM,SAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,6BAA6B;AAAA,IACtC;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAgBO,SAAS,eAAe,SAA8C;AAC3E,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,gBAAgB;AAetB,SAAS,eAAkC;AAChD,SAAO,CAAC,aAAa,MAAM;AAC7B;","names":[]}
1
+ {"version":3,"sources":["../src/chains/definitions.ts"],"sourcesContent":["/**\n * Chain configuration definitions for Vana networks\n *\n * These provide default configurations for known Vana chains.\n * Applications can use these as-is or override specific values.\n */\n\nimport type { Chain } from \"viem\";\n\nexport interface VanaChainConfig extends Chain {\n /** URL for the subgraph API endpoint used to query on-chain data */\n subgraphUrl: string;\n}\n\n/**\n * Vana Mainnet configuration\n */\nexport const vanaMainnet: VanaChainConfig = {\n id: 1480,\n name: \"Vana\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan\",\n url: \"https://vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.6/gn\",\n} as const;\n\n/**\n * Moksha Testnet configuration\n */\nexport const moksha: VanaChainConfig = {\n id: 14800,\n name: \"Moksha Testnet\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.moksha.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan - Moksha\",\n url: \"https://moksha.vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.6/gn\",\n} as const;\n\n/**\n * Retrieves the chain configuration for a given chain ID.\n *\n * @param chainId - The numeric chain ID to look up\n * @returns The chain configuration if found, undefined otherwise\n * @example\n * ```typescript\n * const config = getChainConfig(1480);\n * if (config) {\n * console.log('Chain name:', config.name);\n * console.log('Subgraph URL:', config.subgraphUrl);\n * }\n * ```\n */\nexport function getChainConfig(chainId: number): VanaChainConfig | undefined {\n switch (chainId) {\n case 1480:\n return vanaMainnet;\n case 14800:\n return moksha;\n default:\n return undefined;\n }\n}\n\n// Backwards compatibility alias\nexport const mokshaTestnet = moksha;\n\n/**\n * Retrieves all available Vana chain configurations.\n *\n * @returns Array of all supported Vana chain configurations\n * @example\n * ```typescript\n * const chains = getAllChains();\n * console.log('Supported chains:');\n * chains.forEach(chain => {\n * console.log(`- ${chain.name} (ID: ${chain.id})`);\n * });\n * ```\n */\nexport function getAllChains(): VanaChainConfig[] {\n return [vanaMainnet, moksha];\n}\n"],"mappings":";AAiBO,IAAM,cAA+B;AAAA,EAC1C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,sBAAsB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAKO,IAAM,SAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,6BAA6B;AAAA,IACtC;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAgBO,SAAS,eAAe,SAA8C;AAC3E,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,gBAAgB;AAetB,SAAS,eAAkC;AAChD,SAAO,CAAC,aAAa,MAAM;AAC7B;","names":[]}
@@ -48,7 +48,7 @@ var vanaMainnet = {
48
48
  url: "https://vanascan.io"
49
49
  }
50
50
  },
51
- subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.5/gn"
51
+ subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.6/gn"
52
52
  };
53
53
  var moksha = {
54
54
  id: 14800,
@@ -69,7 +69,7 @@ var moksha = {
69
69
  url: "https://moksha.vanascan.io"
70
70
  }
71
71
  },
72
- subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.5/gn"
72
+ subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.6/gn"
73
73
  };
74
74
  function getChainConfig(chainId) {
75
75
  switch (chainId) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chains.node.ts","../src/chains/definitions.ts"],"sourcesContent":["/**\n * Node.js-specific chains entry point\n *\n * This is identical to the base chains export since chain configurations\n * are environment-agnostic.\n */\n\nexport type { VanaChainConfig } from \"./chains/definitions\";\nexport {\n vanaMainnet,\n moksha,\n mokshaTestnet,\n getChainConfig,\n getAllChains,\n} from \"./chains/definitions\";\n","/**\n * Chain configuration definitions for Vana networks\n *\n * These provide default configurations for known Vana chains.\n * Applications can use these as-is or override specific values.\n */\n\nimport type { Chain } from \"viem\";\n\nexport interface VanaChainConfig extends Chain {\n /** URL for the subgraph API endpoint used to query on-chain data */\n subgraphUrl: string;\n}\n\n/**\n * Vana Mainnet configuration\n */\nexport const vanaMainnet: VanaChainConfig = {\n id: 1480,\n name: \"Vana\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan\",\n url: \"https://vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.5/gn\",\n} as const;\n\n/**\n * Moksha Testnet configuration\n */\nexport const moksha: VanaChainConfig = {\n id: 14800,\n name: \"Moksha Testnet\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.moksha.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan - Moksha\",\n url: \"https://moksha.vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.5/gn\",\n} as const;\n\n/**\n * Retrieves the chain configuration for a given chain ID.\n *\n * @param chainId - The numeric chain ID to look up\n * @returns The chain configuration if found, undefined otherwise\n * @example\n * ```typescript\n * const config = getChainConfig(1480);\n * if (config) {\n * console.log('Chain name:', config.name);\n * console.log('Subgraph URL:', config.subgraphUrl);\n * }\n * ```\n */\nexport function getChainConfig(chainId: number): VanaChainConfig | undefined {\n switch (chainId) {\n case 1480:\n return vanaMainnet;\n case 14800:\n return moksha;\n default:\n return undefined;\n }\n}\n\n// Backwards compatibility alias\nexport const mokshaTestnet = moksha;\n\n/**\n * Retrieves all available Vana chain configurations.\n *\n * @returns Array of all supported Vana chain configurations\n * @example\n * ```typescript\n * const chains = getAllChains();\n * console.log('Supported chains:');\n * chains.forEach(chain => {\n * console.log(`- ${chain.name} (ID: ${chain.id})`);\n * });\n * ```\n */\nexport function getAllChains(): VanaChainConfig[] {\n return [vanaMainnet, moksha];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiBO,IAAM,cAA+B;AAAA,EAC1C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,sBAAsB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAKO,IAAM,SAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,6BAA6B;AAAA,IACtC;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAgBO,SAAS,eAAe,SAA8C;AAC3E,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,gBAAgB;AAetB,SAAS,eAAkC;AAChD,SAAO,CAAC,aAAa,MAAM;AAC7B;","names":[]}
1
+ {"version":3,"sources":["../src/chains.node.ts","../src/chains/definitions.ts"],"sourcesContent":["/**\n * Node.js-specific chains entry point\n *\n * This is identical to the base chains export since chain configurations\n * are environment-agnostic.\n */\n\nexport type { VanaChainConfig } from \"./chains/definitions\";\nexport {\n vanaMainnet,\n moksha,\n mokshaTestnet,\n getChainConfig,\n getAllChains,\n} from \"./chains/definitions\";\n","/**\n * Chain configuration definitions for Vana networks\n *\n * These provide default configurations for known Vana chains.\n * Applications can use these as-is or override specific values.\n */\n\nimport type { Chain } from \"viem\";\n\nexport interface VanaChainConfig extends Chain {\n /** URL for the subgraph API endpoint used to query on-chain data */\n subgraphUrl: string;\n}\n\n/**\n * Vana Mainnet configuration\n */\nexport const vanaMainnet: VanaChainConfig = {\n id: 1480,\n name: \"Vana\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan\",\n url: \"https://vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.6/gn\",\n} as const;\n\n/**\n * Moksha Testnet configuration\n */\nexport const moksha: VanaChainConfig = {\n id: 14800,\n name: \"Moksha Testnet\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.moksha.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan - Moksha\",\n url: \"https://moksha.vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.6/gn\",\n} as const;\n\n/**\n * Retrieves the chain configuration for a given chain ID.\n *\n * @param chainId - The numeric chain ID to look up\n * @returns The chain configuration if found, undefined otherwise\n * @example\n * ```typescript\n * const config = getChainConfig(1480);\n * if (config) {\n * console.log('Chain name:', config.name);\n * console.log('Subgraph URL:', config.subgraphUrl);\n * }\n * ```\n */\nexport function getChainConfig(chainId: number): VanaChainConfig | undefined {\n switch (chainId) {\n case 1480:\n return vanaMainnet;\n case 14800:\n return moksha;\n default:\n return undefined;\n }\n}\n\n// Backwards compatibility alias\nexport const mokshaTestnet = moksha;\n\n/**\n * Retrieves all available Vana chain configurations.\n *\n * @returns Array of all supported Vana chain configurations\n * @example\n * ```typescript\n * const chains = getAllChains();\n * console.log('Supported chains:');\n * chains.forEach(chain => {\n * console.log(`- ${chain.name} (ID: ${chain.id})`);\n * });\n * ```\n */\nexport function getAllChains(): VanaChainConfig[] {\n return [vanaMainnet, moksha];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiBO,IAAM,cAA+B;AAAA,EAC1C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,sBAAsB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAKO,IAAM,SAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,6BAA6B;AAAA,IACtC;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAgBO,SAAS,eAAe,SAA8C;AAC3E,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,gBAAgB;AAetB,SAAS,eAAkC;AAChD,SAAO,CAAC,aAAa,MAAM;AAC7B;","names":[]}
@@ -18,7 +18,7 @@ var vanaMainnet = {
18
18
  url: "https://vanascan.io"
19
19
  }
20
20
  },
21
- subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.5/gn"
21
+ subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.6/gn"
22
22
  };
23
23
  var moksha = {
24
24
  id: 14800,
@@ -39,7 +39,7 @@ var moksha = {
39
39
  url: "https://moksha.vanascan.io"
40
40
  }
41
41
  },
42
- subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.5/gn"
42
+ subgraphUrl: "https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.6/gn"
43
43
  };
44
44
  function getChainConfig(chainId) {
45
45
  switch (chainId) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chains/definitions.ts"],"sourcesContent":["/**\n * Chain configuration definitions for Vana networks\n *\n * These provide default configurations for known Vana chains.\n * Applications can use these as-is or override specific values.\n */\n\nimport type { Chain } from \"viem\";\n\nexport interface VanaChainConfig extends Chain {\n /** URL for the subgraph API endpoint used to query on-chain data */\n subgraphUrl: string;\n}\n\n/**\n * Vana Mainnet configuration\n */\nexport const vanaMainnet: VanaChainConfig = {\n id: 1480,\n name: \"Vana\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan\",\n url: \"https://vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.5/gn\",\n} as const;\n\n/**\n * Moksha Testnet configuration\n */\nexport const moksha: VanaChainConfig = {\n id: 14800,\n name: \"Moksha Testnet\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.moksha.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan - Moksha\",\n url: \"https://moksha.vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.5/gn\",\n} as const;\n\n/**\n * Retrieves the chain configuration for a given chain ID.\n *\n * @param chainId - The numeric chain ID to look up\n * @returns The chain configuration if found, undefined otherwise\n * @example\n * ```typescript\n * const config = getChainConfig(1480);\n * if (config) {\n * console.log('Chain name:', config.name);\n * console.log('Subgraph URL:', config.subgraphUrl);\n * }\n * ```\n */\nexport function getChainConfig(chainId: number): VanaChainConfig | undefined {\n switch (chainId) {\n case 1480:\n return vanaMainnet;\n case 14800:\n return moksha;\n default:\n return undefined;\n }\n}\n\n// Backwards compatibility alias\nexport const mokshaTestnet = moksha;\n\n/**\n * Retrieves all available Vana chain configurations.\n *\n * @returns Array of all supported Vana chain configurations\n * @example\n * ```typescript\n * const chains = getAllChains();\n * console.log('Supported chains:');\n * chains.forEach(chain => {\n * console.log(`- ${chain.name} (ID: ${chain.id})`);\n * });\n * ```\n */\nexport function getAllChains(): VanaChainConfig[] {\n return [vanaMainnet, moksha];\n}\n"],"mappings":";AAiBO,IAAM,cAA+B;AAAA,EAC1C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,sBAAsB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAKO,IAAM,SAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,6BAA6B;AAAA,IACtC;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAgBO,SAAS,eAAe,SAA8C;AAC3E,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,gBAAgB;AAetB,SAAS,eAAkC;AAChD,SAAO,CAAC,aAAa,MAAM;AAC7B;","names":[]}
1
+ {"version":3,"sources":["../src/chains/definitions.ts"],"sourcesContent":["/**\n * Chain configuration definitions for Vana networks\n *\n * These provide default configurations for known Vana chains.\n * Applications can use these as-is or override specific values.\n */\n\nimport type { Chain } from \"viem\";\n\nexport interface VanaChainConfig extends Chain {\n /** URL for the subgraph API endpoint used to query on-chain data */\n subgraphUrl: string;\n}\n\n/**\n * Vana Mainnet configuration\n */\nexport const vanaMainnet: VanaChainConfig = {\n id: 1480,\n name: \"Vana\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan\",\n url: \"https://vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/vana/7.0.6/gn\",\n} as const;\n\n/**\n * Moksha Testnet configuration\n */\nexport const moksha: VanaChainConfig = {\n id: 14800,\n name: \"Moksha Testnet\",\n nativeCurrency: {\n name: \"VANA\",\n symbol: \"VANA\",\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.moksha.vana.org\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Vanascan - Moksha\",\n url: \"https://moksha.vanascan.io\",\n },\n },\n subgraphUrl:\n \"https://api.goldsky.com/api/public/project_cm168cz887zva010j39il7a6p/subgraphs/moksha/7.0.6/gn\",\n} as const;\n\n/**\n * Retrieves the chain configuration for a given chain ID.\n *\n * @param chainId - The numeric chain ID to look up\n * @returns The chain configuration if found, undefined otherwise\n * @example\n * ```typescript\n * const config = getChainConfig(1480);\n * if (config) {\n * console.log('Chain name:', config.name);\n * console.log('Subgraph URL:', config.subgraphUrl);\n * }\n * ```\n */\nexport function getChainConfig(chainId: number): VanaChainConfig | undefined {\n switch (chainId) {\n case 1480:\n return vanaMainnet;\n case 14800:\n return moksha;\n default:\n return undefined;\n }\n}\n\n// Backwards compatibility alias\nexport const mokshaTestnet = moksha;\n\n/**\n * Retrieves all available Vana chain configurations.\n *\n * @returns Array of all supported Vana chain configurations\n * @example\n * ```typescript\n * const chains = getAllChains();\n * console.log('Supported chains:');\n * chains.forEach(chain => {\n * console.log(`- ${chain.name} (ID: ${chain.id})`);\n * });\n * ```\n */\nexport function getAllChains(): VanaChainConfig[] {\n return [vanaMainnet, moksha];\n}\n"],"mappings":";AAiBO,IAAM,cAA+B;AAAA,EAC1C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,sBAAsB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAKO,IAAM,SAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,6BAA6B;AAAA,IACtC;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,aACE;AACJ;AAgBO,SAAS,eAAe,SAA8C;AAC3E,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,gBAAgB;AAetB,SAAS,eAAkC;AAChD,SAAO,CAAC,aAAa,MAAM;AAC7B;","names":[]}
@@ -1284,6 +1284,13 @@ interface BaseConfig {
1284
1284
  * @example ['https://gateway.pinata.cloud', 'https://ipfs.io']
1285
1285
  */
1286
1286
  ipfsGateways?: string[];
1287
+ /**
1288
+ * Default personal server base URL for server operations.
1289
+ * Required for ServerController methods like getIdentity(), createOperation(), etc.
1290
+ *
1291
+ * @example 'https://my-personal-server.example.com'
1292
+ */
1293
+ defaultPersonalServerUrl?: string;
1287
1294
  }
1288
1295
  /**
1289
1296
  * Base configuration interface that requires storage for storage-dependent operations
@@ -1312,6 +1319,13 @@ interface BaseConfigWithStorage {
1312
1319
  * @example ['https://gateway.pinata.cloud', 'https://ipfs.io']
1313
1320
  */
1314
1321
  ipfsGateways?: string[];
1322
+ /**
1323
+ * Default personal server base URL for server operations.
1324
+ * Required for ServerController methods like getIdentity(), createOperation(), etc.
1325
+ *
1326
+ * @example 'https://my-personal-server.example.com'
1327
+ */
1328
+ defaultPersonalServerUrl?: string;
1315
1329
  }
1316
1330
  /**
1317
1331
  * Configuration with wallet client
@@ -30408,6 +30422,8 @@ interface ControllerContext$1 {
30408
30422
  hasStorage?: () => boolean;
30409
30423
  /** Default IPFS gateways to use for fetching files. */
30410
30424
  ipfsGateways?: string[];
30425
+ /** Default personal server base URL for server operations. */
30426
+ defaultPersonalServerUrl?: string;
30411
30427
  }
30412
30428
  /**
30413
30429
  * Manages gasless data access permissions and trusted server registry operations.
@@ -30705,10 +30721,19 @@ declare class PermissionsController {
30705
30721
  /**
30706
30722
  * Retrieves the user's current nonce from the DataPortabilityServers contract.
30707
30723
  *
30708
- * @returns Promise resolving to the user's current nonce value
30724
+ * The nonce is used to prevent replay attacks in signed transactions and must
30725
+ * be incremented with each transaction to maintain security.
30726
+ *
30727
+ * @returns Promise resolving to the user's current nonce value as a bigint
30709
30728
  * @throws {Error} When wallet account is not available
30710
30729
  * @throws {Error} When chain ID is not available
30711
30730
  * @throws {NonceError} When reading nonce from contract fails
30731
+ * @private
30732
+ * @example
30733
+ * ```typescript
30734
+ * const nonce = await this.getUserNonce();
30735
+ * console.log(`Current nonce: ${nonce}`);
30736
+ * ```
30712
30737
  */
30713
30738
  private getUserNonce;
30714
30739
  /**
@@ -30820,23 +30845,37 @@ declare class PermissionsController {
30820
30845
  */
30821
30846
  private normalizeGrantId;
30822
30847
  /**
30823
- * Adds and trusts a server for data processing.
30848
+ * Registers a new server and immediately trusts it in the DataPortabilityServers contract.
30849
+ *
30850
+ * This is a combined operation that both registers a new data portability server
30851
+ * and adds it to the user's trusted servers list in a single transaction.
30852
+ * Trusted servers can handle data export and portability requests from the user.
30824
30853
  *
30825
30854
  * @param params - Parameters for adding and trusting the server
30855
+ * @param params.owner - Ethereum address that will own this server registration
30856
+ * @param params.serverAddress - Ethereum address of the server
30857
+ * @param params.serverUrl - HTTPS URL where the server can be reached
30858
+ * @param params.publicKey - Server's public key for encryption (hex string)
30826
30859
  * @returns Promise resolving to transaction hash
30827
30860
  * @throws {UserRejectedRequestError} When user rejects the transaction
30828
30861
  * @throws {BlockchainError} When chain ID is unavailable or transaction fails
30862
+ * @throws {ServerAlreadyRegisteredError} When server address is already registered
30829
30863
  * @throws {Error} When wallet account is not available
30864
+ *
30830
30865
  * @example
30831
30866
  * ```typescript
30832
30867
  * // Add and trust a server by providing all required details
30833
30868
  * const txHash = await vana.permissions.addAndTrustServer({
30834
- * owner: '0x1234...',
30869
+ * owner: '0x1234567890abcdef1234567890abcdef12345678',
30835
30870
  * serverAddress: '0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6',
30836
30871
  * serverUrl: 'https://myserver.example.com',
30837
- * publicKey: '0x456...'
30872
+ * publicKey: '0x456789abcdef456789abcdef456789abcdef456789abcdef'
30838
30873
  * });
30839
30874
  * console.log('Server added and trusted in transaction:', txHash);
30875
+ *
30876
+ * // Verify the server is now trusted
30877
+ * const trustedServers = await vana.permissions.getTrustedServers();
30878
+ * console.log('Now trusting servers:', trustedServers);
30840
30879
  * ```
30841
30880
  */
30842
30881
  addAndTrustServer(params: AddAndTrustServerParams): Promise<Hash>;
@@ -30877,15 +30916,32 @@ declare class PermissionsController {
30877
30916
  */
30878
30917
  private submitDirectUntrustTransaction;
30879
30918
  /**
30880
- * Untrusts a server.
30919
+ * Removes a server from the user's trusted servers list in the DataPortabilityServers contract.
30920
+ *
30921
+ * This revokes the server's authorization to handle data portability requests for the user.
30922
+ * The server remains registered in the system but will no longer be trusted by this user.
30881
30923
  *
30882
30924
  * @param params - Parameters for untrusting the server
30883
- * @param params.serverId - The server's Ethereum address to untrust
30925
+ * @param params.serverId - The numeric ID of the server to untrust
30884
30926
  * @returns Promise resolving to transaction hash
30885
30927
  * @throws {Error} When wallet account is not available
30886
30928
  * @throws {NonceError} When retrieving user nonce fails
30887
30929
  * @throws {UserRejectedRequestError} When user rejects the transaction
30930
+ * @throws {ServerNotTrustedError} When the server is not currently trusted
30888
30931
  * @throws {BlockchainError} When untrust transaction fails
30932
+ *
30933
+ * @example
30934
+ * ```typescript
30935
+ * // Untrust a specific server
30936
+ * const txHash = await vana.permissions.untrustServer({
30937
+ * serverId: 1
30938
+ * });
30939
+ * console.log('Server untrusted in transaction:', txHash);
30940
+ *
30941
+ * // Verify the server is no longer trusted
30942
+ * const trustedServers = await vana.permissions.getTrustedServers();
30943
+ * console.log('Still trusting servers:', trustedServers);
30944
+ * ```
30889
30945
  */
30890
30946
  untrustServer(params: UntrustServerParams): Promise<Hash>;
30891
30947
  /**
@@ -30902,26 +30958,73 @@ declare class PermissionsController {
30902
30958
  */
30903
30959
  untrustServerWithSignature(params: UntrustServerParams): Promise<Hash>;
30904
30960
  /**
30905
- * Gets all servers trusted by a user.
30961
+ * Retrieves all servers trusted by a user from the DataPortabilityServers contract.
30906
30962
  *
30907
- * @param userAddress - Optional user address (defaults to current user)
30963
+ * Returns an array of server IDs that the specified user has explicitly trusted.
30964
+ * Trusted servers are those that users have authorized to handle their data portability requests.
30965
+ *
30966
+ * @param userAddress - Optional user address to query (defaults to current wallet user)
30908
30967
  * @returns Promise resolving to array of trusted server IDs (numeric)
30909
30968
  * @throws {BlockchainError} When reading from contract fails or chain is unavailable
30969
+ * @throws {NetworkError} When unable to connect to the blockchain network
30970
+ *
30971
+ * @example
30972
+ * ```typescript
30973
+ * // Get trusted servers for current user
30974
+ * const myServers = await vana.permissions.getTrustedServers();
30975
+ * console.log(`I trust ${myServers.length} servers: ${myServers.join(', ')}`);
30976
+ *
30977
+ * // Get trusted servers for another user
30978
+ * const userServers = await vana.permissions.getTrustedServers("0x1234...");
30979
+ * console.log(`User trusts servers: ${userServers.join(', ')}`);
30980
+ * ```
30910
30981
  */
30911
30982
  getTrustedServers(userAddress?: Address): Promise<number[]>;
30912
30983
  /**
30913
- * Gets server information by server ID.
30984
+ * Retrieves detailed information about a specific server from the DataPortabilityServers contract.
30914
30985
  *
30915
- * @param serverId - Server ID (numeric)
30916
- * @returns Promise resolving to server information
30986
+ * Returns complete server information including owner, address, public key, and URL.
30987
+ * This information is used to establish secure connections and verify server identity.
30988
+ *
30989
+ * @param serverId - The unique numeric ID of the server to query
30990
+ * @returns Promise resolving to complete server information
30917
30991
  * @throws {BlockchainError} When reading from contract fails or chain is unavailable
30992
+ * @throws {NetworkError} When unable to connect to the blockchain network
30993
+ * @throws {ServerNotFoundError} When the server ID does not exist
30994
+ *
30995
+ * @example
30996
+ * ```typescript
30997
+ * const server = await vana.permissions.getServerInfo(1);
30998
+ *
30999
+ * console.log(`Server ${server.id}:`);
31000
+ * console.log(` Owner: ${server.owner}`);
31001
+ * console.log(` Address: ${server.serverAddress}`);
31002
+ * console.log(` URL: ${server.url}`);
31003
+ * console.log(` Public Key: ${server.publicKey}`);
31004
+ * ```
30918
31005
  */
30919
31006
  getServerInfo(serverId: number): Promise<Server>;
30920
31007
  /**
30921
- * Checks if a server is active.
31008
+ * Checks if a specific server is active in the DataPortabilityServers contract.
30922
31009
  *
30923
- * @param serverId - Server ID (numeric)
30924
- * @returns Promise resolving to boolean indicating if server is active
31010
+ * An active server is one that is properly registered and operational, meaning
31011
+ * it can receive and process data portability requests from users.
31012
+ *
31013
+ * @param serverId - The unique numeric ID of the server to check
31014
+ * @returns Promise resolving to true if server is active, false otherwise
31015
+ * @throws {BlockchainError} When reading from contract fails or chain is unavailable
31016
+ * @throws {NetworkError} When unable to connect to the blockchain network
31017
+ *
31018
+ * @example
31019
+ * ```typescript
31020
+ * const isActive = await vana.permissions.isActiveServer(1);
31021
+ *
31022
+ * if (isActive) {
31023
+ * console.log('Server 1 is active and ready to process requests');
31024
+ * } else {
31025
+ * console.log('Server 1 is inactive or not found');
31026
+ * }
31027
+ * ```
30925
31028
  */
30926
31029
  isActiveServer(serverId: number): Promise<boolean>;
30927
31030
  /**
@@ -31032,10 +31135,19 @@ declare class PermissionsController {
31032
31135
  */
31033
31136
  private submitSignedUntrustTransaction;
31034
31137
  /**
31035
- * Registers a new grantee
31138
+ * Registers a new grantee in the DataPortabilityGrantees contract.
31139
+ *
31140
+ * A grantee is an entity (like an application) that can receive data permissions
31141
+ * from users. Once registered, users can grant the grantee access to their data.
31036
31142
  *
31037
31143
  * @param params - Parameters for registering the grantee
31144
+ * @param params.owner - The Ethereum address that will own this grantee registration
31145
+ * @param params.granteeAddress - The Ethereum address of the grantee (application)
31146
+ * @param params.publicKey - The public key used for data encryption/decryption (hex string)
31038
31147
  * @returns Promise resolving to the transaction hash
31148
+ * @throws {BlockchainError} When the grantee registration transaction fails
31149
+ * @throws {UserRejectedRequestError} When user rejects the transaction
31150
+ * @throws {ContractError} When grantee is already registered
31039
31151
  *
31040
31152
  * @example
31041
31153
  * ```typescript
@@ -31044,6 +31156,7 @@ declare class PermissionsController {
31044
31156
  * granteeAddress: "0xApp1234567890123456789012345678901234567890",
31045
31157
  * publicKey: "0x1234567890abcdef..."
31046
31158
  * });
31159
+ * console.log(`Grantee registered in transaction: ${txHash}`);
31047
31160
  * ```
31048
31161
  */
31049
31162
  registerGrantee(params: RegisterGranteeParams): Promise<Hash>;
@@ -31077,41 +31190,88 @@ declare class PermissionsController {
31077
31190
  */
31078
31191
  submitSignedRegisterGrantee(typedData: RegisterGranteeTypedData, signature: Hash): Promise<Hash>;
31079
31192
  /**
31080
- * Gets all grantees
31193
+ * Retrieves all registered grantees from the DataPortabilityGrantees contract.
31081
31194
  *
31082
- * @param options - Query options
31083
- * @returns Promise resolving to paginated grantees
31195
+ * Returns a paginated list of all grantees (applications) that have been registered
31196
+ * in the system and can receive data permissions from users.
31197
+ *
31198
+ * @param options - Query options for pagination and filtering
31199
+ * @param options.limit - Maximum number of grantees to return (default: 50)
31200
+ * @param options.offset - Number of grantees to skip for pagination (default: 0)
31201
+ * @returns Promise resolving to paginated grantees with metadata
31202
+ * @throws {BlockchainError} When contract read operation fails
31203
+ * @throws {NetworkError} When unable to connect to the blockchain network
31084
31204
  *
31085
31205
  * @example
31086
31206
  * ```typescript
31207
+ * // Get first 10 grantees
31087
31208
  * const result = await vana.permissions.getGrantees({
31088
31209
  * limit: 10,
31089
31210
  * offset: 0
31090
31211
  * });
31212
+ *
31213
+ * console.log(`Found ${result.total} total grantees`);
31214
+ * result.grantees.forEach(grantee => {
31215
+ * console.log(`Grantee ${grantee.id}: ${grantee.granteeAddress}`);
31216
+ * });
31217
+ *
31218
+ * // Check if there are more results
31219
+ * if (result.hasMore) {
31220
+ * console.log('More grantees available');
31221
+ * }
31091
31222
  * ```
31092
31223
  */
31093
31224
  getGrantees(options?: GranteeQueryOptions): Promise<PaginatedGrantees>;
31094
31225
  /**
31095
- * Gets a grantee by their address
31226
+ * Retrieves a specific grantee by their Ethereum address from the DataPortabilityGrantees contract.
31096
31227
  *
31097
- * @param granteeAddress - The grantee's address
31098
- * @returns Promise resolving to the grantee info or null if not found
31228
+ * Looks up a registered grantee (application) using their Ethereum address
31229
+ * and returns their complete registration information including permissions.
31230
+ *
31231
+ * @param granteeAddress - The Ethereum address of the grantee to look up
31232
+ * @returns Promise resolving to the grantee information, or null if not found
31233
+ * @throws {BlockchainError} When contract read operation fails
31234
+ * @throws {NetworkError} When unable to connect to the blockchain network
31099
31235
  *
31100
31236
  * @example
31101
31237
  * ```typescript
31102
- * const grantee = await vana.permissions.getGranteeByAddress("0x1234...");
31238
+ * const granteeAddress = "0xApp1234567890123456789012345678901234567890";
31239
+ * const grantee = await vana.permissions.getGranteeByAddress(granteeAddress);
31240
+ *
31241
+ * if (grantee) {
31242
+ * console.log(`Found grantee ${grantee.id}`);
31243
+ * console.log(`Owner: ${grantee.owner}`);
31244
+ * console.log(`Public Key: ${grantee.publicKey}`);
31245
+ * console.log(`Permissions: ${grantee.permissionIds.join(', ')}`);
31246
+ * } else {
31247
+ * console.log('Grantee not found');
31248
+ * }
31103
31249
  * ```
31104
31250
  */
31105
31251
  getGranteeByAddress(granteeAddress: Address): Promise<Grantee | null>;
31106
31252
  /**
31107
- * Gets a grantee by their ID
31253
+ * Retrieves a specific grantee by their unique ID from the DataPortabilityGrantees contract.
31254
+ *
31255
+ * Looks up a registered grantee (application) using their numeric ID assigned during
31256
+ * registration and returns their complete information including permissions.
31108
31257
  *
31109
- * @param granteeId - The grantee's ID
31110
- * @returns Promise resolving to the grantee info or null if not found
31258
+ * @param granteeId - The unique numeric ID of the grantee (1-indexed)
31259
+ * @returns Promise resolving to the grantee information, or null if not found
31260
+ * @throws {BlockchainError} When contract read operation fails
31261
+ * @throws {NetworkError} When unable to connect to the blockchain network
31111
31262
  *
31112
31263
  * @example
31113
31264
  * ```typescript
31114
31265
  * const grantee = await vana.permissions.getGranteeById(1);
31266
+ *
31267
+ * if (grantee) {
31268
+ * console.log(`Grantee ID: ${grantee.id}`);
31269
+ * console.log(`Address: ${grantee.granteeAddress}`);
31270
+ * console.log(`Owner: ${grantee.owner}`);
31271
+ * console.log(`Total permissions: ${grantee.permissionIds.length}`);
31272
+ * } else {
31273
+ * console.log('Grantee with ID 1 not found');
31274
+ * }
31115
31275
  * ```
31116
31276
  */
31117
31277
  getGranteeById(granteeId: number): Promise<Grantee | null>;
@@ -34592,8 +34752,8 @@ declare class DataController {
34592
34752
  */
34593
34753
  declare class ServerController {
34594
34754
  private readonly context;
34595
- readonly PERSONAL_SERVER_BASE_URL: string | undefined;
34596
34755
  constructor(context: ControllerContext$1);
34756
+ private get personalServerBaseUrl();
34597
34757
  /**
34598
34758
  * Retrieves the cryptographic identity of a personal server.
34599
34759
  *
@@ -35064,6 +35224,7 @@ declare class VanaCore {
35064
35224
  private readonly storageManager?;
35065
35225
  private readonly hasRequiredStorage;
35066
35226
  private readonly ipfsGateways?;
35227
+ private readonly defaultPersonalServerUrl?;
35067
35228
  /**
35068
35229
  * Initializes a new VanaCore client instance with the provided configuration.
35069
35230
  *