@ckb-lumos/config-manager
Example
import { initializeConfig, predefined } from "@ckb-lumos/config-manager"
import { initializeConfig, predefined } from "@ckb-lumos/lumos/config"
import { encodeToAddress } from '@ckb-lumos/helper'
initializeConfig(predefined.AGGRON);
encodeToAddress({...})
initializeConfig(predefined.LINA);
encodeToAddress({...})
Refreshing Config
import { refreshScriptConfigs } from "@ckb-lumos/config-manager"
import { refreshScriptConfigs } from "@ckb-lumos/lumos/config"
import { RPC } from "@ckb-lumos/rpc";
const rpc = new RPC("http://localhost:8114");
const refreshed = await refreshScriptConfigs(predefined.AGGRON4.SCRIPTS, {
resolve: createRpcResolver(rpc),
});