UNPKG

@dappnode/dappnodesdk

Version:

dappnodesdk is a tool to make the creation of new dappnode packages as simple as possible. It helps to initialize and publish in ethereum blockchain

30 lines (29 loc) 1.09 kB
export declare function getShortDnpName(dnpName: string): string; /** * Adds a variant suffix to a DAppNode package (DNP) name, ensuring the variant is inserted * right before the domain part of the DNP name. * * @param {Object} params - The function parameters. * @param {string} params.dnpName - The original DNP name. * @param {string} params.variant - The variant to be added to the DNP name. * @returns {string} - The modified DNP name including the variant. * * @example * * --> Adds the 'mainnet' variant to the DNP name * * const modifiedDnpName = addVariantToDnpName({ dnpName: "geth.dnp.dappnode.eth", variant: "mainnet" }); * console.log(modifiedDnpName); * * --> Output: "geth-mainnet.dnp.dappnode.eth" */ export declare function addVariantToDnpName({ dnpName, variant }: { dnpName: string; variant: string; }): string; /** * Parses a directory or generic package name and returns a full ENS guessed name * @param name "DAppNodePackage-vipnode" * @return "vipnode.public.dappnode.eth" */ export declare function getDnpName(name: string): string;