@the_library/web3-registry-addresses 1.1.0 → 1.2.0

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.
package/README.md CHANGED
@@ -1,10 +1,6 @@
1
1
  # @the_library/web3-registry-addresses
2
2
 
3
- This package provides the essential address resolution and caching sessions for the decentralized **D-Library** project located at [https://datapond.earth](https://datapond.earth).
4
-
5
- ## Overview
6
-
7
- The `web3-registry-addresses` module acts as the canonical bridge to our immutable blockchain infrastructure. It is responsible for translating decentralized records and managing Web3 sessions, ensuring that clients always connect to the accurate, certified ledgers endorsed by [dsafe.us](https://dsafe.us).
3
+ Welcome to the D-Library Web3 ecosystem! This package is the crucial "bridge" that connects your frontend application to the exact, certified Smart Contracts endorsed by [dsafe.us](https://dsafe.us) for the decentralized **D-Library** project.
8
4
 
9
5
  ## Legal Notice & D-CODE OPEN SOVEREIGN LICENCE
10
6
 
@@ -21,68 +17,83 @@ As defined in **Section 3: Technical Anchors & Hard-Fork Resilience** of the lic
21
17
 
22
18
  This restriction prevents forking intended to restrict public access or bypass the D-SAFE Specification requirements.
23
19
 
24
- ## Installation
25
-
26
- ```bash
27
- npm install @the_library/web3-registry-addresses
28
- ```
20
+ ---
29
21
 
30
- ## API Surface
22
+ ## 🚀 Getting Started for Junior Developers
31
23
 
32
- The primary export of this package is the singleton instance `registryAddressLoader`. It handles querying the blockchain for deployed official contracts and managing the local browser cache to prevent redundant reads.
24
+ In the world of Web3, contract addresses can change if the developers upgrade the system.
25
+ Instead of hardcoding those addresses into your Vue.js or React application, you use this package to dynamically fetch the most up-to-date, official addresses directly from the blockchain!
33
26
 
34
- ```typescript
35
- import { registryAddressLoader } from '@the_library/web3-registry-addresses';
36
- import { AddressRegistryReadAPI, Tech } from '@the_library/web3-core';
37
- ```
27
+ Because querying the blockchain is slow, this package automatically intercepts those addresses and caches them instantly inside the user's **Browser `localStorage`** for 24 hours.
38
28
 
39
- ### Methods
29
+ ### Installation
40
30
 
41
- #### `Initialize(tech: Tech, chainId: string | number, registry: AddressRegistryReadAPI): Promise<Record<string, string>>`
42
- Bootstraps the registry by querying the on-chain Factory contract. It fetches all official contract names, resolves their addresses, and retrieves their ABIs from Arweave.
43
- - Results are cached in `localStorage` for 24 hours to accelerate sub-sequent pageloads.
44
- - Returns a normalized dictionary of contract addresses.
31
+ ```bash
32
+ npm install @the_library/web3-registry-addresses
33
+ ```
45
34
 
46
- #### `getAddress(tech: string, chainId: string | number, name: string): string | undefined`
47
- A synchronous, zero-latency lookup that retrieves the certified smart contract address from the active loader cache.
35
+ *(Note: Depending on which blockchains you want to support, you will also need the corresponding reader packages, like `@the_library/web3-evm` or `@the_library/web3-tron`).*
48
36
 
49
- #### `getAbi(tech: string, chainId: string | number, name: string): any`
50
- Synchronously retrieves the parsed Arweave ABI JSON structure from the local cache.
37
+ ### 1. Bootstrapping the Cache (Initialization)
51
38
 
52
- ### Canonical Contract Configuration (`config`)
53
- This package also actively re-exports the canonical baseline `config` from `@the_library/web3-contracts`. This allows developers to easily loop over every endorsed network and instantiate the Web3 architecture programmatically:
39
+ When your application first loads, you need to "Boot" the D-CODE registry. This reads the official configuration loop and instructs this package to go out, fetch the addresses, and save them to the browser.
54
40
 
55
41
  ```typescript
56
42
  import { config, registryAddressLoader } from '@the_library/web3-registry-addresses';
57
- import { Tech } from '@the_library/web3-core';
43
+ import { EvmRegistryReadAPI } from '@the_library/web3-evm';
44
+ import { TronRegistryReadAPI } from '@the_library/web3-tron';
58
45
 
59
46
  const loadDCODEContracts = async () => {
60
- // Iterate over all endorsed technologies (e.g. EVM, Tron)
47
+ // Iterate over all endorsed technologies (EVM, Tron, etc.)
61
48
  for (const tech of Object.keys(config)) {
49
+
62
50
  // Iterate over all official network configurations for that tech
63
- for (const network of Object.keys(config[tech as Tech])) {
64
- const networkConfig = config[tech as Tech][network];
65
-
51
+ for (const network of Object.keys(config[tech as keyof typeof config])) {
52
+ const networkConfig = config[tech as keyof typeof config][network];
66
53
  console.log(`Loading ${tech} network ${network}...`);
67
54
 
68
- // Example: Instantiate your network-specific read API
69
- // const registryApi = new EvmRegistryReadAPI(networkConfig);
70
-
71
- // Fetch and resolve the canonical smart contracts
72
- /*
73
- const addresses = await registryAddressLoader.Initialize(
74
- tech as Tech,
75
- network,
76
- registryApi
77
- );
78
-
79
- console.log(`Resolved Contracts for ${tech}:${network}:`, addresses);
80
- */
55
+ try {
56
+ // 1. Instantiate the active Read API based on the technology
57
+ const registryApi = tech === 'evm'
58
+ ? new EvmRegistryReadAPI(networkConfig)
59
+ : new TronRegistryReadAPI(networkConfig);
60
+
61
+ // 2. Fetch and resolve the canonical smart contracts!
62
+ // This checks localStorage. If there is no cache, it asks the blockchain.
63
+ const addresses = await registryAddressLoader.Initialize(
64
+ tech as any,
65
+ network,
66
+ registryApi
67
+ );
68
+
69
+ console.log(`Resolved Contracts for ${tech}:${network}:`, addresses);
70
+ } catch (e) {
71
+ console.error(`Failed to load registry for ${network}`, e);
72
+ }
81
73
  }
82
74
  }
83
75
  }
84
76
  ```
85
77
 
78
+ ### 2. Using the Cached Addresses Instantly
79
+
80
+ Once `Initialize` has finished anywhere in your app, you never have to `await` or fetch from the blockchain again for that session! You can instantly grab the certified address in any Vue component:
81
+
82
+ ```typescript
83
+ import { registryAddressLoader } from '@the_library/web3-registry-addresses';
84
+
85
+ // Example: Get the CORE Testnet address for the "Factory" contract
86
+ const getFactoryAddress = () => {
87
+ // This is synchronous and zero-latency! It reads directly from RAM/localStorage.
88
+ const address = registryAddressLoader.getAddress('evm', 1114, 'Factory');
89
+
90
+ if (!address) throw new Error("Registry Cache is not initialized!");
91
+ return address;
92
+ }
93
+ ```
94
+
95
+ By using this flow, your frontend is blazing fast, perfectly synced with the blockchain, and fully compliant with the D-SAFE architectural requirements!
96
+
86
97
  ---
87
98
  **COPYRIGHT:** © 2026 DATAPOND PUBLIC LIBRARY TRUST - Australia
88
99
  **TECHNICAL GUARDIAN:** POND ENTERPRISE PTY LTD - Australia
package/dist/index.d.ts CHANGED
@@ -1,14 +1,16 @@
1
- type Tech = 'evm' | 'tron';
2
- interface AddressRegistryContractRecord {
3
- contractAddress: string;
4
- abiUrl: string;
1
+ import { Tech, AddressRegistryReadAPI } from '@the_library/web3-core';
2
+ export * from '@the_library/web3-contracts';
3
+
4
+ interface ContractLoadingStatus {
5
+ name: string;
6
+ status: 'pending' | 'loading' | 'loaded' | 'error';
7
+ address?: string;
5
8
  }
6
- interface AddressRegistryReadAPI {
7
- getLatestContract(name: string): Promise<[address: string, abiUrl: string]>;
8
- getContractHistory(name: string): Promise<AddressRegistryContractRecord[]>;
9
- getAllContractNames(): Promise<string[]>;
9
+ interface LoadingStatus {
10
+ total: number;
11
+ loaded: number;
12
+ contracts: ContractLoadingStatus[];
10
13
  }
11
-
12
14
  interface CacheEntry {
13
15
  address: string;
14
16
  abi: any;
@@ -20,52 +22,32 @@ interface RegistryCache {
20
22
  entries: {
21
23
  [contractName: string]: CacheEntry;
22
24
  };
25
+ dataEntries?: {
26
+ [dataKey: string]: string;
27
+ };
23
28
  }
24
29
  declare class RegistryAddressLoader {
30
+ private defered;
25
31
  private memoryCache;
32
+ private listeners;
33
+ private loadingStatuses;
26
34
  private getCacheKey;
27
35
  private getFromLocalStorage;
28
36
  private saveToLocalStorage;
37
+ subscribe(listener: (tech: Tech, chainId: string | number, status: LoadingStatus) => void): () => void;
38
+ private notify;
39
+ getLoadingStatus(tech: Tech, chainId: string | number): LoadingStatus | undefined;
29
40
  private fetchAbiFromArweave;
30
- Initialize(tech: Tech, chainId: number | string, registry: AddressRegistryReadAPI): Promise<Record<string, string>>;
41
+ loadAllKeys(tech: Tech, chainId: number | string): Promise<Record<string, string>>;
42
+ Initialize(tech: Tech, chainId: number | string, registry: AddressRegistryReadAPI, registryAddress?: string): Promise<Record<string, string>>;
31
43
  getAddress(tech: string, chainId: string | number, name: string): string | undefined;
32
44
  getAbi(tech: string, chainId: string | number, name: string): any;
45
+ getData(tech: string, chainId: string | number, key: string): string | undefined;
33
46
  }
34
47
  declare const registryAddressLoader: RegistryAddressLoader;
48
+ /**
49
+ * Proxy to registryAddressLoader for backward compatibility
50
+ */
51
+ declare function getContractAbi(ecosystem: string, networkId: string | number, contractName: string): any;
35
52
 
36
- interface ProviderConfig {
37
- "chainId": number | string;
38
- "main": boolean;
39
- "symbol": string;
40
- "website": string;
41
- "rpc": string;
42
- "explorer": string;
43
- "name": string;
44
- "original": string;
45
- "shortName": string;
46
- "deployed": boolean;
47
- "addresses"?: {
48
- "addressRegistry"?: string;
49
- "factory"?: string;
50
- "bouncerStorage"?: string;
51
- "scientistStorage"?: string;
52
- "backupStorage"?: string;
53
- "projectManagerStorage"?: string;
54
- };
55
- brand: 'CORE' | 'TRON';
56
- "decimals": number;
57
- faucet?: string;
58
- faucetAmount?: number;
59
- }
60
- interface ContractConfigs {
61
- evm: {
62
- [chainId: string]: ProviderConfig;
63
- };
64
- tron: {
65
- [chainId: string]: ProviderConfig;
66
- };
67
- }
68
-
69
- declare const _default: ContractConfigs;
70
-
71
- export { type CacheEntry, RegistryAddressLoader, type RegistryCache, _default as config, registryAddressLoader };
53
+ export { type CacheEntry, type ContractLoadingStatus, type LoadingStatus, RegistryAddressLoader, type RegistryCache, getContractAbi, registryAddressLoader };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var f="dcode_registry_cache_v2_",b=1440*60*1e3,y=class{constructor(){this.memoryCache=new Map}getCacheKey(t,e){return`${f}${t}_${e}`}getFromLocalStorage(t){let e=localStorage.getItem(t);if(!e)return null;try{return JSON.parse(e)}catch(a){return console.error(`[RegistryLoader] Failed to parse cache for ${t}`,a),null}}saveToLocalStorage(t,e){localStorage.setItem(t,JSON.stringify(e))}async fetchAbiFromArweave(t){if(!t)return null;try{let e=await fetch(`https://arweave.net/${t}`);if(e.ok){let a=await e.json();return`${t}`,a}console.error(`[RegistryLoader] Arweave fetch failed for ${t}: ${e.status} ${e.statusText}`)}catch(e){console.warn(`[RegistryLoader] Failed to fetch ABI from Arweave (${t}):`,e)}return null}async Initialize(t,e,a){let s=this.getCacheKey(t,e),d=Date.now(),r=this.memoryCache.get(s)||this.getFromLocalStorage(s);if(r&&d-r.timestamp<b){`${t}${e}`,this.memoryCache.set(s,r);let n={};return Object.values(r.entries).forEach(i=>{let o=i.originalName.charAt(0).toLowerCase()+i.originalName.slice(1);n[o]=i.address}),n}`${t}${e}`;let p=await a.getAllContractNames();`${p.length}${t}${e}`;let m={},g={};for(let n of p)try{let[i,o]=await a.getLatestContract(n),c=n.toLowerCase(),h=n.charAt(0).toLowerCase()+n.slice(1),l=null;r&&r.entries[c]&&r.entries[c].txId===o?l=r.entries[c].abi:o?(`${n}${o}`,l=await this.fetchAbiFromArweave(o)):console.warn(`[RegistryLoader] No ABI URL found for ${n} on ${t}:${e}`),m[c]={address:i,abi:l,txId:o,originalName:n},g[h]=i}catch(i){console.warn(`[RegistryLoader] Failed to load contract ${n} for ${t}:${e}:`,i)}let u={timestamp:d,entries:m};return this.memoryCache.set(s,u),this.saveToLocalStorage(s,u),g}getAddress(t,e,a){let s=this.getCacheKey(t,e);return this.memoryCache.get(s)?.entries[a.toLowerCase()]?.address}getAbi(t,e,a){let s=this.getCacheKey(t,e);return this.memoryCache.get(s)?.entries[a.toLowerCase()]?.abi}},w=new y;var T={evm:{1114:{chainId:1114,main:!1,symbol:"tCORE2",shortName:"SUN",original:"Core Blockchain TestNet",faucet:"https://scan.test2.btcs.network/faucet",faucetAmount:1,decimals:18,website:"https://coredao.org/",rpc:"https://rpc.test2.btcs.network",explorer:"https://scan.test2.btcs.network",name:"Two Core Test",brand:"CORE",deployed:!0,addresses:{addressRegistry:"0x77A0Cf8a9B82dEE29ca82Bb6A773463a02E6Cf60"}},1116:{chainId:1116,main:!0,symbol:"CORE",shortName:"TREE",decimals:18,website:"https://coredao.org/",rpc:"https://rpc.coredao.org",explorer:"https://scan.coredao.org",name:"Main",original:"Core Blockchain MainNet",brand:"CORE",deployed:!0,addresses:{addressRegistry:"0xD85bED3c96F36647BE073D120bfA5E7AcE491864"}}},tron:{nile:{main:!1,website:"https://nile.trongrid.io/",chainId:"nile",symbol:"NileTRX",shortName:"WATER",decimals:6,rpc:"https://nile.trongrid.io",explorer:"https://nilescan.org",name:"Nile",original:"Nile TestNet",faucet:"https://nilescan.org/faucet",faucetAmount:2e3,brand:"TRON",deployed:!0,addresses:{addressRegistry:"419368123d6c77ae9e4a17af4e6c21dd30a79596f5"}},shasta:{main:!1,chainId:"shasta",website:"https://shasta.trongrid.io",rpc:"https://api.shasta.trongrid.io",explorer:"https://shastanet.tronscan.org",name:"Shasta",original:"Shasta TestNet",symbol:"ShastaTRX",shortName:"SUN",decimals:6,faucet:"https://shasta.tronex.io/join/getJoinPage",faucetAmount:2e3,brand:"TRON",deployed:!0,addresses:{addressRegistry:"41028907b1ca0729597624643ae939ccdb9293fc15"}},mainnet:{main:!0,chainId:"mainnet",rpc:"https://api.trongrid.io",explorer:"https://tronscan.org",name:"Tron",decimals:6,original:"Tron MainNet",symbol:"TRX",shortName:"TREE",website:"https://tron.network/",brand:"TRON",deployed:!1,addresses:{}}}},A={abi:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldAdmin",type:"address"},{indexed:!0,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"name",type:"string"},{indexed:!0,internalType:"address",name:"contractAddress",type:"address"},{indexed:!1,internalType:"string",name:"abiUrl",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ContractAdded",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"address",name:"contractAddress",type:"address"},{internalType:"string",name:"abiUrl",type:"string"}],name:"addContract",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getAllContractNames",outputs:[{internalType:"string[]",name:"",type:"string[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"name",type:"string"}],name:"getContractHistory",outputs:[{components:[{internalType:"address",name:"contractAddress",type:"address"},{internalType:"string",name:"abiUrl",type:"string"}],internalType:"struct AddressRegistry.ContractRecord[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"name",type:"string"}],name:"getLatestContract",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}]},C={abi:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldAdmin",type:"address"},{indexed:!0,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"name",type:"string"},{indexed:!0,internalType:"address",name:"contractAddress",type:"address"},{indexed:!1,internalType:"string",name:"abiUrl",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"ContractAdded",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"address",name:"contractAddress",type:"address"},{internalType:"string",name:"abiUrl",type:"string"}],name:"addContract",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getAllContractNames",outputs:[{internalType:"string[]",name:"",type:"string[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"name",type:"string"}],name:"getContractHistory",outputs:[{components:[{internalType:"address",name:"contractAddress",type:"address"},{internalType:"string",name:"abiUrl",type:"string"}],internalType:"struct AddressRegistry.ContractRecord[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"name",type:"string"}],name:"getLatestContract",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}]},N=A.abi,x=C.abi;export{y as RegistryAddressLoader,T as config,w as registryAddressLoader};
1
+ var E="dcode_registry_cache_v2_",x=1440*60*1e3,p=class{constructor(){this.defered={};this.memoryCache=new Map;this.listeners=new Set;this.loadingStatuses=new Map}getCacheKey(e,t){return`${E}${e}_${t}`}getFromLocalStorage(e){let t=localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(s){return console.error(`[RegistryLoader] Failed to parse cache for ${e}`,s),null}}saveToLocalStorage(e,t){localStorage.setItem(e,JSON.stringify(t))}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}notify(e,t,s){let a=`${e}:${t}`;this.loadingStatuses.set(a,s),this.listeners.forEach(o=>o(e,t,s))}getLoadingStatus(e,t){return this.loadingStatuses.get(`${e}:${t}`)}async fetchAbiFromArweave(e){if(!e)return null;try{let t=await fetch(`https://arweave.net/${e}`);if(t.ok){let s=await t.json();return console.log(`[RegistryLoader] Successfully fetched ABI for ${e}`),s}console.error(`[RegistryLoader] Arweave fetch failed for ${e}: ${t.status} ${t.statusText}`)}catch(t){console.warn(`[RegistryLoader] Failed to fetch ABI from Arweave (${e}):`,t)}return null}async loadAllKeys(e,t){let s={},a=this.getCacheKey(e,t),o=`${e}-${t}`;typeof this.defered[o]<"u"&&await this.defered[o];let d=this.memoryCache.get(a)||this.getFromLocalStorage(a);if(d)return this.memoryCache.set(a,d),Object.values(d.entries).forEach(u=>{let y=u.originalName.charAt(0).toLowerCase()+u.originalName.slice(1);s[y]=u.address}),s;throw new Error(`No cache found for ${e}:${t}`)}async Initialize(e,t,s,a){console.log(`[RegistryLoader] Starting Initialization for ${e}:${t} using AddressRegistry at ${a||"unknown"}`);let o=this.getCacheKey(e,t),d=Date.now(),u=`${e}-${t}`;if(typeof this.defered[u]<"u")return this.loadAllKeys(e,t);let y,v;this.defered[u]=new Promise((r,n)=>{y=r,v=n});let g=this.memoryCache.get(o)||this.getFromLocalStorage(o);if(g&&d-g.timestamp<x){console.log(`[RegistryLoader] Cache valid for ${e}:${t}`);let r=this.loadAllKeys(e,t);return y(!0),r}console.log(`[RegistryLoader] Cache expired or missing for ${e}:${t}. Performing Full Sync...`);let m=await s.getAllContractNames(),h=[];try{h=await s.getAllDataKeys()}catch{console.warn(`[RegistryLoader] Failed to fetch data keys (method may not exist yet on this network for ${e}:${t})`)}console.log(`[RegistryLoader] Retrieved ${m.length} contract names and ${h.length} data keys for ${e}:${t} (Registry at ${a}):`,m,h);let i={total:m.length+h.length,loaded:0,contracts:m.map(r=>({name:r,status:"pending"}))};this.notify(e,t,i);let w={},L={},R={},A=m.map(async r=>{let n=i.contracts.find(c=>c.name===r);n.status="loading",this.notify(e,t,{...i});try{let[c,l]=await s.getLatestContract(r);console.log(`[RegistryLoader] Found ${r} at ${c} (ABI: ${l}) for ${e}:${t}`);let f=r.toLowerCase(),K=r.charAt(0).toLowerCase()+r.slice(1),$=null;g&&g.entries[f]&&g.entries[f].txId===l?$=g.entries[f].abi:l?(console.log(`[RegistryLoader] Fetching new ABI for ${r} (${l})...`),$=await this.fetchAbiFromArweave(l)):console.warn(`[RegistryLoader] No ABI URL found for ${r} on ${e}:${t}`),w[f]={address:c,abi:$,txId:l,originalName:r},R[K]=c,n.status=$||!l?"loaded":"error",n.address=c}catch(c){console.warn(`[RegistryLoader] Failed to load contract ${r} for ${e}:${t}:`,c),n.status="error"}finally{i.loaded++,this.notify(e,t,{...i})}}),S=h.map(async r=>{try{let n=await s.getLatestData(r);L[r]=n,console.log(`[RegistryLoader] Found data ${r} = ${n} for ${e}:${t}`)}catch(n){console.warn(`[RegistryLoader] Failed to load data ${r} for ${e}:${t}:`,n)}finally{i.loaded++,this.notify(e,t,{...i})}});await Promise.all([...A,...S]);let b={timestamp:i.contracts.some(r=>r.status==="error")?g?.timestamp||0:d,entries:w,dataEntries:L};return this.memoryCache.set(o,b),this.saveToLocalStorage(o,b),y(!0),R}getAddress(e,t,s){let a=this.getCacheKey(e,t);return this.memoryCache.get(a)?.entries[s.toLowerCase()]?.address}getAbi(e,t,s){let a=this.getCacheKey(e,t);return this.memoryCache.get(a)?.entries[s.toLowerCase()]?.abi}getData(e,t,s){let a=this.getCacheKey(e,t);return this.memoryCache.get(a)?.dataEntries?.[s]}},F=new p;function P(C,e,t){return F.getAbi(C,e,t)}export*from"@the_library/web3-contracts";export{p as RegistryAddressLoader,P as getContractAbi,F as registryAddressLoader};
2
2
  //# sourceMappingURL=index.js.map