diff --git a/cli/init/mod.ts b/cli/init/mod.ts index ebd8e46..e9251b5 100644 --- a/cli/init/mod.ts +++ b/cli/init/mod.ts @@ -13,13 +13,14 @@ import { transferHandler } from "./handlers/transfer.ts"; const manifest = new Manifest("my-arkive"); manifest - .addEntity(Balance) - .addChain("avalanche") - .addContract(erc20) - .addSource("0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664", 27347402n) - .addEventHandler("Transfer", transferHandler); + .chain("avalanche") + .contract(erc20) + .addSources({ "0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664": 27347402n }) + .addEventHandlers({ "Transfer": transferHandler }); -export default manifest.build();`; +export default manifest + .addEntity(Balance) + .build();`; writeFile(newDir, "manifest.ts", manifest, options.overwrite); diff --git a/docs/docs/reference/manifest.md b/docs/docs/reference/manifest.md index ba968be..36825d1 100644 --- a/docs/docs/reference/manifest.md +++ b/docs/docs/reference/manifest.md @@ -4,7 +4,11 @@ sidebar_position: 2 # Manifest -The `Manifest` class serves as the central configuration for your Arkive, allowing you to define data sources from various blockchains, map them to their respective handler functions, and set up your database schema using entity classes. By chaining method calls, you can create a comprehensive, easy-to-read manifest that outlines your entire Arkive configuration. +The `Manifest` class serves as the central configuration for your Arkive, +allowing you to define data sources from various blockchains, map them to their +respective handler functions, and set up your database schema using entity +classes. By chaining method calls, you can create a comprehensive, easy-to-read +manifest that outlines your entire Arkive configuration. ## Example manifest @@ -16,11 +20,12 @@ import { transfer } from "./handlers/transfer.ts"; const manifest = new Manifest("my-arkive"); manifest - .addEntity(Balance) - .addChain("avalanche") - .addContract(erc20) - .addSource("0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664", 27347402n) - .addEventHandler("Transfer", transferHandler); + .chain("avalanche") + .contract(erc20) + .addSources({ "0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664": 27347402n }) + .addEventHandlers({ "Transfer": transferHandler }); -export default manifest.build(); -``` \ No newline at end of file +export default manifest + .addEntity(Balance) + .build(); +```