{"_id":"@airstack/subgraph-generator","_rev":"17-0944356a65ba2e57205725430ee1a27f","name":"@airstack/subgraph-generator","dist-tags":{"alpha":"1.0.0-alpha.8","latest":"1.0.0-alpha.9"},"versions":{"1.0.0-alpha.0":{"name":"@airstack/subgraph-generator","version":"1.0.0-alpha.0","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"codegen":"graph codegen","build:subgraph":"graph build","build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag alpha --access public"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"0.33.0","@graphprotocol/graph-ts":"0.27.0","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0"},"gitHead":"74fbe1716502c3b03018ca48dae52ea5cbdda55e","_id":"@airstack/subgraph-generator@1.0.0-alpha.0","_nodeVersion":"12.5.0","_npmVersion":"7.5.0","dist":{"integrity":"sha512-y3+I6jTfAvbxK8g8jnF0AJL0ZCgm8/T0dYjcHEaIELEW0BZWIwJsFEpSFVWGqAK5uQriXqSRToBBwqXGyb3zYg==","shasum":"eb8e4649747add27baabd42d88724e017b84cff0","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.0-alpha.0.tgz","fileCount":111,"unpackedSize":519138,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqTyXYZvgWp46GJkKBzn4WN21XsnFrG9hOG0x0z5T0SAIhAO4ssZ/oAgBmm0l9l81f+UYHbFLU+WPE0f9bd35YaeSp"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDKTYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpMFw/8D0mAorLuq6ePK4tvJBAAWJ+GdDpaBu0Mcw2zTZ11eWLyUT6p\r\nP+O0nK8QR++kBGq0+nwU113wqw1m6YPb3lwAVVNbD1NbaBN033LKiESy+KSh\r\nukKBpwGMLvu6roLc4CneFNS3VdXUQpsxY+637uKsqM9JJLqunYq9F+Wu63KF\r\nF/tqKewuX+6jgd//y14tbLGSoDYnmFkGOYfow4Aq2k321p7uWtygUZIHRxRh\r\n5D57pmraBK/0kBQx3wONu4srJfGH4FAjmw5Rt7CT7l8nGxo2ThmQ8tZnx+U+\r\nD3XFcNEYm2A4zD4/4I5ZV6U0TaGn0lsQu0hD5XWutDPIfUcfVx626cgCBeZG\r\n/GPNlGBGog5aJY5sRAZuKPEwlvgOeJkmacrZ+CeMGcEVLgM7riacUOdKvSlc\r\n2jjyxjRQXOSxWufMXkTga843fnAN4hrCU0AB06yWfRGBpXyWFWVAlXmCXE5t\r\n7zJjMyAVKDc1I0kh/u60FiovlYaHvnB5pSlnTzdwxLef8xXqJkdxH2V5rlPp\r\nEtPzadUi+Du/HC1XusghN6BVsEb8b8Ca5IrMIqtt0l43xD5nd4fQyHJr4P3k\r\nVZ6gOvm3xrLVr2HPZlAjk1TEsWZHRVoCEnP0wbsxKCAhvg/kiFT1MW6CDDXS\r\n56lmyaUin+XNyj7/iVmHA77VmnkzZwjHq08=\r\n=3om/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"deepesh-kn","email":"deepesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.0-alpha.0_1661773016133_0.7767223523767981"},"_hasShrinkwrap":false},"1.0.0-alpha.1":{"name":"@airstack/subgraph-generator","version":"1.0.0-alpha.1","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"codegen":"graph codegen","build:subgraph":"graph build","build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag alpha --access public"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"0.33.0","@graphprotocol/graph-ts":"0.27.0","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0"},"readme":"# Airstack Subgraphs\n\n**Every day there are millions of blockchain transactions.**\n**Airstack makes sense of them.**\n\n[Here](https://app.airstack.xyz/) is a live example of how the Airstack entities are consumed.\n\n## Introduction\n\nAirstack is developing a Protocol and DAPP for browsing, discovering, and consuming on-chain data across projects and across blockchains. Our motivation for creating Airstack is to enable common ways to organize blockchain data and make it universally consumable.\n\nThis is a large and important problem to solve. On Ethereum based chains (EVMs) alone there are already more than 10 million daily transactions happening across thousands of protocols and dapps. Today those transactions exist in silos; there are no easy ways to query across projects and blockchains — to map relationship and behaviors, discover trends at the event level, and analyze product utility.\n\nAirstack is building the tooling now to enable a decentralized web3 data network that will enable easy querying of data across projects and blockchains.\n\nTo do so, Airstack is helping standardize blockchain data, aggregating it, mapping relationships, and providing protocols and APIs to access it.\n\n## What are Airstack Schema?\n\nAirstack schemas are standardized schemas to access the data across projects and blockchains.\nThese schemas are for eight initial verticals, and it is intended that any dapp/protocol within those verticals could be indexed consistently by utilizing the Airstack schemas for Subgraph.\n\nThe 8 verticals defined for Airstack schemas are:\n\n1. NFT Marketplaces (E.g. OpenSea, Looksrare)\n2. NFT Projects (E.g. ENS, POAP, Nouns, Moonbirds, Apes)\n3. Swaps (e.g. Quickswap, Uniswap, Sushiswap)\n4. Defi (e.g. Aave or Compound)\n5. Bridges (e.g. Hop)\n6. Games (e.g. Sandbox)\n7. DAOs\n8. Social (e.g. Farcaster and Lens)\n9. Catch all for Other Dapps (we anticipate that this will soon be broken out into additional verticals, e.g. Music, Publishing, Social)\n\n## Getting Started\n\n### 1. Prerequisite:\n\nYou already have a subgraph for Dapp/Protocol. And you intend to integrate Airstack schemas into the project.\n\n### 2. Install Airstack package:\n```npm\nnpm install  @airstack/subgraph-generator\n```\n\n### 3. Identify the vertical for the Dapp/Protocol:\n\nCurrently, we support eight verticals. Identify your project's vertical\n\nUse the following command to add Airstack Schemas and ABIs in your project's `subgraph.yaml`\n\n```npm\nnpx  @airstack/subgraph-generator <vertical>  --yaml <subgraph.yaml file path> --graphql <schema.graphql file path> --dataSourceNames <\"name1, name2, ...\"> --templates <\"name1, name2\"> \n```\n\n`npx airstack <vertical>`\nwill add the required Airstack entities and the ABI files in your **subgraph.yaml** file\n\n`--yaml <subgraph.yaml file path>`\nprovide the location of your project's **subgraph.yaml** file. This is an optional parameter.\n\n`--graphql <subgraph.graphql file path>`\nprovide the location of your project's **schema.graphql** file. This is an optional parameter.\n\n`--dataSourceNames <name1, name2, ...>` provide the **dataSource** name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the **dataSource** provided in the **subgraph.yaml**.\n\n`--templates <name1, name2, ...>` provide the **teamplate** name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the **teamplate** provided in the **subgraph.yaml**.\n\nExamples:\n\na. NFT Marketplace\n\n```\nnpx @airstack/subgraph-generator nft_marketplace\n```\n\nb. DEX\n\n```\nnpx @airstack/subgraph-generator dex --yaml \"./subgraph.yaml\" --dataSourceNames \"Factory, Pair\"\n```\n\nFollowing are the vertical Ids\n\nNFT Marketplace: `nft_marketplace`<br/> NFT: `nft`Swap:`dex`<br/> Bridges: `bridge`<br/> DAO: `TBD`<br/> Defi: `TBD`<br/> Games: `TBD`<br/>\n\nIntegration of the Airstack schemas is done. Now, move to the vertical-specific section for further integration.\n\n### 3. Code integration\n\n#### a. NFT Marketplace\n\nTrack actions for NFT Marketplace.\nCall the following functions from your subgraph mapping. An example implementation is [Here](https://github.com/Airstack-xyz).\n\n1. NFT sale transactions\n\n   ```ts\n   function trackNFTSaleTransactions(\n     txHash: string,\n     fromArray: Address[],\n     toArray: Address[],\n     contractAddressArray: Address[],\n     nftIdArray: BigInt[],\n     paymentTokenAddress: Address,\n     paymentAmount: BigInt,\n     timestamp: BigInt\n   ): void;\n   ```\n\n   **txHash**: Add details<br/>\n   **fromArray**: Add details<br/>\n   **toArray**: Add details<br/>\n   **contractAddressArray**: Add details<br/>\n   **nftIdArray**: Add details<br/>\n   **paymentTokenAddress**: Add details<br/>\n   **paymentAmount**: Add details<br/>\n   **timestamp**: Add details<br/>\n\n#### b. Swaps/DEX\n\nTrack actions for DEX Projects.\nCall the following functions from your subgraph mapping. An example implementation is [Here](https://github.com/Airstack-xyz).\n\n1. Creation of Pool\n\n   ```ts\n    dex.addDexPool(\n      poolAddress: string,\n      fee: BigInt,\n      inputTokens: Array<string>,\n      weights: Array<BigDecimal> | null = null,\n      outputToken: string | null = null\n    ): void;\n   ```\n\n   **poolAddress**: Dex pool address<br/>\n   **fee**: Fee amount<br/>\n   **inputTokens**: Array of address of tokens<br/>\n   **weights**: Weightage of each input token<br/>\n   **outputToken**: LP token address<br/>\n\n2. Add Liquidity\n\n   ```ts\n   function addLiquidity(\n     poolAddress: string,\n     inputAmounts: Array<BigInt>,\n     from: string,\n     to: string,\n     hash: string,\n     logIndex: BigInt,\n     timestamp: BigInt\n   ): void;\n   ```\n\n   **poolAddress**: Dex pool address<br/>\n   **inputAmounts**: Array of input token amounts<br/>\n   **from**: From wallet address<br/>\n   **to**: To wallet address<br/>\n   **hash**: Transaction hash<br/>\n   **logIndex**: Transaction log index<br/>\n   **timestamp**: Transaction timestamp<br/>\n\n3. Swap\n\n   ```ts\n   function swap(\n     poolAddress: string,\n     inputAmounts: Array<BigInt>,\n     outputAmounts: Array<BigInt>,\n     inputTokenIndex: i32,\n     outputTokenIndex: i32,\n     from: string,\n     to: string,\n     hash: string,\n     logIndex: BigInt,\n     timestamp: BigInt\n   ): void;\n   ```\n\n   **poolAddress**: Dex pool address<br/>\n   **inputAmounts**: Array of input amounts<br/>\n   **outputAmounts**: Array of output amounts<br/>\n   **inputTokenIndex**: Index of token in dex pool for input<br/>\n   **outputTokenIndex**: Index of token in dex pool for output<br/>\n   **from**: From wallet address<br/>\n   **to**: To wallet address<br/>\n   **hash**: Transaction hash<br/>\n   **logIndex**: Transaction log index<br/>\n   **timestamp**: Transaction timestamp<br/>\n\n4. Remove Liquidity\n   ```\n     TBA\n   ```\n\n### 4. Development status of each vertical\n\n⌛ = Prioritized<br/>\n💬 = In discussion<br/>\n🔨 = In progress implementation<br/>\n✅ = Completed<br/>\n\n| Vertical         | Status |\n| --------------- | :----: |\n| NFT Marketplace |   🔨   |\n| DEX             |   🔨   |\n| Bridges         |   💬   |\n| DAO             |   ⌛   |\n| Defi            |   ⌛   |\n| Games           |   ⌛   |\n","readmeFilename":"README.md","gitHead":"753354ccf33c392976527ad81d6e026116b77388","_id":"@airstack/subgraph-generator@1.0.0-alpha.1","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-tz2XYT0VVomt5lM3EwxC3DSY4Q8UyIxt06cSOBfQocT90kAsmQqhR6Sl5KLGQbJhLaOYxICnW1N6a3Keyok7bQ==","shasum":"6040ff45226dd12a4a75544015f36bc99cc507d1","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.0-alpha.1.tgz","fileCount":111,"unpackedSize":519957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHjJ9KHml+uXY1ugLKa9wX9Cm6YYSEmXyNEYXKLxp/7UAiEAkj66PbpFZFecjapHsey/bitCVpfIBnFZAz1CF2L+M/8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDM5UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZCg/9HVYxHg/dtdk4t++yPE+3xI0VoGHyCDNRbv8kzrV/zWuJlBGW\r\naS5KsT1MMDAMmn3InS7/lacjICd+BRvdAJsCoSQsiPR01aOxt4G6ayHM/PFC\r\n3ZE5123X5WRJEcIbkIVLPRgLvPN+/i+avaPBA9yOEJoghaPYbsOBgiMKliao\r\nyPX/dpZ3bCP7yyBO0PwuTqGHReCDZNLHRwszcqOz//YILKGkiPetUrQfJ8nG\r\nJ9xEc4bPwTrecpunQOAPLiXrbLtQEQXO/hNnRdC3Hrx1f2TmVlKItPeaNu7C\r\nGYHULpXw1qyqOoRDZBXSyDF7kSI/0OhUhj32NmryV4G+aSsS934a1zgEGNpV\r\n4u5B46d6tbhZfNiQ5ObYoW6x5i8Cqa5gz+rYeIaaF4RtI178AcrF5wRCGVVI\r\nP8T83Jb07ogmciq5FWFUT3n0kyP6Hhw3t3PqNK9pIddGaakcZAuA1taSsPeq\r\ngv9FihMZGK8hhGJ2Mohve/rIzwIv3ovHbQAzRdCyhrzYgNOoj4FndciCQ1Qk\r\nK0w+7cn550jjOBEbd9mzdXY/Q59+Dj8bPNLh5JQrCA26K9dq8elSUa51l4IO\r\n7xwr0lmXHLTWf44JG/Z4bCuq06RhfecGT118KsTt4ktn+vu6kuPz2HwRmlVx\r\nrQ1G+NMgdbCrFLVkXHmy5N/kGIXn5rTF/kM=\r\n=1kWy\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"deepesh-kn","email":"deepesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.0-alpha.1_1661783636675_0.8874171555976482"},"_hasShrinkwrap":false},"1.0.0-alpha.2":{"name":"@airstack/subgraph-generator","version":"1.0.0-alpha.2","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"codegen":"graph codegen","build:subgraph":"graph build","build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag alpha --access public"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"0.33.0","@graphprotocol/graph-ts":"0.27.0","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0"},"readme":"# Airstack Subgraphs\n\n**Every day there are millions of blockchain transactions.**\n**Airstack makes sense of them.**\n\n[Here](https://app.airstack.xyz/) is a live example of how the Airstack entities are consumed.\n\n## Introduction\n\nAirstack is developing a Protocol and DAPP for browsing, discovering, and consuming on-chain data across projects and across blockchains. Our motivation for creating Airstack is to enable common ways to organize blockchain data and make it universally consumable.\n\nThis is a large and important problem to solve. On Ethereum based chains (EVMs) alone there are already more than 10 million daily transactions happening across thousands of protocols and dapps. Today those transactions exist in silos; there are no easy ways to query across projects and blockchains — to map relationship and behaviors, discover trends at the event level, and analyze product utility.\n\nAirstack is building the tooling now to enable a decentralized web3 data network that will enable easy querying of data across projects and blockchains.\n\nTo do so, Airstack is helping standardize blockchain data, aggregating it, mapping relationships, and providing protocols and APIs to access it.\n\n## What are Airstack Schema?\n\nAirstack schemas are standardized schemas to access the data across projects and blockchains.\nThese schemas are for eight initial verticals, and it is intended that any dapp/protocol within those verticals could be indexed consistently by utilizing the Airstack schemas for Subgraph.\n\nThe 8 verticals defined for Airstack schemas are:\n\n1. NFT Marketplaces (E.g. OpenSea, Looksrare)\n2. NFT Projects (E.g. ENS, POAP, Nouns, Moonbirds, Apes)\n3. Swaps (e.g. Quickswap, Uniswap, Sushiswap)\n4. Defi (e.g. Aave or Compound)\n5. Bridges (e.g. Hop)\n6. Games (e.g. Sandbox)\n7. DAOs\n8. Social (e.g. Farcaster and Lens)\n9. Catch all for Other Dapps (we anticipate that this will soon be broken out into additional verticals, e.g. Music, Publishing, Social)\n\n## Getting Started\n\n### 1. Prerequisite:\n\nYou already have a subgraph for Dapp/Protocol. And you intend to integrate Airstack schemas into the project.\n\n### 2. Install Airstack package:\n```npm\nnpm install  @airstack/subgraph-generator\n```\n\n### 3. Identify the vertical for the Dapp/Protocol:\n\nCurrently, we support eight verticals. Identify your project's vertical\n\nUse the following command to add Airstack Schemas and ABIs in your project's `subgraph.yaml`\n\n```npm\nnpx  @airstack/subgraph-generator <vertical>  --yaml <subgraph.yaml file path> --graphql <schema.graphql file path> --dataSourceNames <\"name1, name2, ...\"> --templates <\"name1, name2\"> \n```\n\n`npx airstack <vertical>`\nwill add the required Airstack entities and the ABI files in your **subgraph.yaml** file\n\n`--yaml <subgraph.yaml file path>`\nprovide the location of your project's **subgraph.yaml** file. This is an optional parameter.\n\n`--graphql <subgraph.graphql file path>`\nprovide the location of your project's **schema.graphql** file. This is an optional parameter.\n\n`--dataSourceNames <name1, name2, ...>` provide the **dataSource** name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the **dataSource** provided in the **subgraph.yaml**.\n\n`--templates <name1, name2, ...>` provide the **teamplate** name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the **teamplate** provided in the **subgraph.yaml**.\n\nExamples:\n\na. NFT Marketplace\n\n```\nnpx @airstack/subgraph-generator nft_marketplace\n```\n\nb. DEX\n\n```\nnpx @airstack/subgraph-generator dex --yaml \"./subgraph.yaml\" --dataSourceNames \"Factory, Pair\"\n```\n\nFollowing are the vertical Ids\n\nNFT Marketplace: `nft_marketplace`<br/> NFT: `nft`Swap:`dex`<br/> Bridges: `bridge`<br/> DAO: `TBD`<br/> Defi: `TBD`<br/> Games: `TBD`<br/>\n\nIntegration of the Airstack schemas is done. Now, move to the vertical-specific section for further integration.\n\n### 3. Code integration\n\n#### a. NFT Marketplace\n\nTrack actions for NFT Marketplace.\nCall the following functions from your subgraph mapping. An example implementation is [Here](https://github.com/Airstack-xyz).\n\n1. NFT sale transactions\n\n   ```ts\n   function trackNFTSaleTransactions(\n     txHash: string,\n     fromArray: Address[],\n     toArray: Address[],\n     contractAddressArray: Address[],\n     nftIdArray: BigInt[],\n     paymentTokenAddress: Address,\n     paymentAmount: BigInt,\n     timestamp: BigInt\n   ): void;\n   ```\n\n   **txHash**: Add details<br/>\n   **fromArray**: Add details<br/>\n   **toArray**: Add details<br/>\n   **contractAddressArray**: Add details<br/>\n   **nftIdArray**: Add details<br/>\n   **paymentTokenAddress**: Add details<br/>\n   **paymentAmount**: Add details<br/>\n   **timestamp**: Add details<br/>\n\n#### b. Swaps/DEX\n\nTrack actions for DEX Projects.\nCall the following functions from your subgraph mapping. An example implementation is [Here](https://github.com/Airstack-xyz).\n\n1. Creation of Pool\n\n   ```ts\n    dex.addDexPool(\n      poolAddress: string,\n      fee: BigInt,\n      inputTokens: Array<string>,\n      weights: Array<BigDecimal> | null = null,\n      outputToken: string | null = null\n    ): void;\n   ```\n\n   **poolAddress**: Dex pool address<br/>\n   **fee**: Fee amount<br/>\n   **inputTokens**: Array of address of tokens<br/>\n   **weights**: Weightage of each input token<br/>\n   **outputToken**: LP token address<br/>\n\n2. Add Liquidity\n\n   ```ts\n   function addLiquidity(\n     poolAddress: string,\n     inputAmounts: Array<BigInt>,\n     from: string,\n     to: string,\n     hash: string,\n     logIndex: BigInt,\n     timestamp: BigInt\n   ): void;\n   ```\n\n   **poolAddress**: Dex pool address<br/>\n   **inputAmounts**: Array of input token amounts<br/>\n   **from**: From wallet address<br/>\n   **to**: To wallet address<br/>\n   **hash**: Transaction hash<br/>\n   **logIndex**: Transaction log index<br/>\n   **timestamp**: Transaction timestamp<br/>\n\n3. Swap\n\n   ```ts\n   function swap(\n     poolAddress: string,\n     inputAmounts: Array<BigInt>,\n     outputAmounts: Array<BigInt>,\n     inputTokenIndex: i32,\n     outputTokenIndex: i32,\n     from: string,\n     to: string,\n     hash: string,\n     logIndex: BigInt,\n     timestamp: BigInt\n   ): void;\n   ```\n\n   **poolAddress**: Dex pool address<br/>\n   **inputAmounts**: Array of input amounts<br/>\n   **outputAmounts**: Array of output amounts<br/>\n   **inputTokenIndex**: Index of token in dex pool for input<br/>\n   **outputTokenIndex**: Index of token in dex pool for output<br/>\n   **from**: From wallet address<br/>\n   **to**: To wallet address<br/>\n   **hash**: Transaction hash<br/>\n   **logIndex**: Transaction log index<br/>\n   **timestamp**: Transaction timestamp<br/>\n\n4. Remove Liquidity\n   ```\n     TBA\n   ```\n\n### 4. Development status of each vertical\n\n⌛ = Prioritized<br/>\n💬 = In discussion<br/>\n🔨 = In progress implementation<br/>\n✅ = Completed<br/>\n\n| Vertical         | Status |\n| --------------- | :----: |\n| NFT Marketplace |   🔨   |\n| DEX             |   🔨   |\n| Bridges         |   💬   |\n| DAO             |   ⌛   |\n| Defi            |   ⌛   |\n| Games           |   ⌛   |\n","readmeFilename":"README.md","gitHead":"b926a396664815a80563690df91db79d2dd724b8","_id":"@airstack/subgraph-generator@1.0.0-alpha.2","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-MVu2kQ16q4TmRihiWnivdKXoM9WFS+BDlJy1xpfMpGPHIts780qLLbvEekOQbxZ8YHWKMljBfIlawbzc9IjELg==","shasum":"33b2f2dcfcd3716053cafd550aa037d275441671","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.0-alpha.2.tgz","fileCount":111,"unpackedSize":523571,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICK476pPix8ko9aKXgJ3Sl0uKnWfWXCD0p6J1jWbVzcFAiB7TsC8sSU7V/cricWwr5HnD50a4emJ57ED3tFTHzaJmg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDNxUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrS6g/+ILV1hBOaoK/XkxPncchudNYV78eOG5o6FfczjflowDqElEs1\r\nF7wWIOs0PTd32FOzeRlKYnOowtqlmZYiU+Qi55U+RNmjxdZMezDmvQ32A7nC\r\naNgMnpct1UMIUfWZzMmWGtlm/PuSTiC7sdiZn8NRm4+VKhfQOULxoyHkmxiF\r\nndUDvb5dS1y6mSIGAFhUyKn19Rew2yBI7+JtBTpe2NiM38jgOf9hbk+w2Cta\r\nW+iGQStBUNxCi/kbWuqm05FRh+zPzRc0m/ks97B5pbRww+PIDWiU9jHFoX0m\r\netv2g/xumzQHSWbyriiVmOcK1JeXgiYGMM4LlJSIGJbjdO2IEyMay8q5f9lw\r\n8BC2jfAu+faHIznsc83b+OYTFGlF9kRG7zyr/C90m5nJP9MKow3XkuePZwcW\r\nhT0d0YTvuBabCcVBj3aXwqn6OxJVgc5DhgKiRTEsw+5Y32BDznP6aen1vZfG\r\nV1/rL0BLRnLxPQqd8RDBwcEpbn0x1TXIdg13aw/6hW3XSiiVr5EaO4aQxnww\r\naGURSRnq3T8IaHuFGizxVmB0nioiFiNLBibM4eSJsavsgVW7bcJApboIfY18\r\n0oIYTZy1uiRFqTyCaLMapNT+NVwZA37eXotb73qEaUCgTZftiS2GycTy6qm3\r\nS5xlF3RFCnnrrp1mSyO3ZkC4Ag0O60Ni+1M=\r\n=bxuj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"deepesh-kn","email":"deepesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.0-alpha.2_1661787219891_0.4110693350436798"},"_hasShrinkwrap":false},"1.0.0-alpha.3":{"name":"@airstack/subgraph-generator","version":"1.0.0-alpha.3","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"codegen":"graph codegen","build:subgraph":"graph build","build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag alpha --access public"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"0.33.0","@graphprotocol/graph-ts":"0.27.0","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0"},"readme":"# Airstack Subgraphs\n\n**Every day there are millions of blockchain transactions.**\n**Airstack makes sense of them.**\n\n[Here](https://app.airstack.xyz/) is a live example of how the Airstack entities are consumed.\n\n## Introduction\n\nAirstack is developing a Protocol and DAPP for browsing, discovering, and consuming on-chain data across projects and across blockchains. Our motivation for creating Airstack is to enable common ways to organize blockchain data and make it universally consumable.\n\nThis is a large and important problem to solve. On Ethereum based chains (EVMs) alone there are already more than 10 million daily transactions happening across thousands of protocols and dapps. Today those transactions exist in silos; there are no easy ways to query across projects and blockchains — to map relationship and behaviors, discover trends at the event level, and analyze product utility.\n\nAirstack is building the tooling now to enable a decentralized web3 data network that will enable easy querying of data across projects and blockchains.\n\nTo do so, Airstack is helping standardize blockchain data, aggregating it, mapping relationships, and providing protocols and APIs to access it.\n\n## What are Airstack Schema?\n\nAirstack schemas are standardized schemas to access the data across projects and blockchains.\nThese schemas are for eight initial verticals, and it is intended that any dapp/protocol within those verticals could be indexed consistently by utilizing the Airstack schemas for Subgraph.\n\nThe 8 verticals defined for Airstack schemas are:\n\n1. NFT Marketplaces (E.g. OpenSea, Looksrare)\n2. NFT Projects (E.g. ENS, POAP, Nouns, Moonbirds, Apes)\n3. Swaps (e.g. Quickswap, Uniswap, Sushiswap)\n4. Defi (e.g. Aave or Compound)\n5. Bridges (e.g. Hop)\n6. Games (e.g. Sandbox)\n7. DAOs\n8. Social (e.g. Farcaster and Lens)\n9. Catch all for Other Dapps (we anticipate that this will soon be broken out into additional verticals, e.g. Music, Publishing, Social)\n\n## Getting Started\n\n### 1. Prerequisite:\n\nYou already have a subgraph for Dapp/Protocol. And you intend to integrate Airstack schemas into the project.\n\n### 2. Install Airstack package:\n```npm\nnpm install  @airstack/subgraph-generator\n```\n\n### 3. Identify the vertical for the Dapp/Protocol:\n\nCurrently, we support eight verticals. Identify your project's vertical\n\nUse the following command to add Airstack Schemas and ABIs in your project's `subgraph.yaml`\n\n```npm\nnpx  @airstack/subgraph-generator <vertical>  --yaml <subgraph.yaml file path> --graphql <schema.graphql file path> --dataSourceNames <\"name1, name2, ...\"> --templates <\"name1, name2\"> \n```\n\n`npx airstack <vertical>`\nwill add the required Airstack entities and the ABI files in your **subgraph.yaml** file\n\n`--yaml <subgraph.yaml file path>`\nprovide the location of your project's **subgraph.yaml** file. This is an optional parameter.\n\n`--graphql <subgraph.graphql file path>`\nprovide the location of your project's **schema.graphql** file. This is an optional parameter.\n\n`--dataSourceNames <name1, name2, ...>` provide the **dataSource** name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the **dataSource** provided in the **subgraph.yaml**.\n\n`--templates <name1, name2, ...>` provide the **teamplate** name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the **teamplate** provided in the **subgraph.yaml**.\n\nExamples:\n\na. NFT Marketplace\n\n```\nnpx @airstack/subgraph-generator nft_marketplace\n```\n\nb. DEX\n\n```\nnpx @airstack/subgraph-generator dex --yaml \"./subgraph.yaml\" --dataSourceNames \"Factory, Pair\"\n```\n\nFollowing are the vertical Ids\n\nNFT Marketplace: `nft_marketplace`<br/> NFT: `nft`Swap:`dex`<br/> Bridges: `bridge`<br/> DAO: `TBD`<br/> Defi: `TBD`<br/> Games: `TBD`<br/>\n\nIntegration of the Airstack schemas is done. Now, move to the vertical-specific section for further integration.\n\n### 3. Code integration\n\n#### a. NFT Marketplace\n\nTrack actions for NFT Marketplace.\nCall the following functions from your subgraph mapping. An example implementation is [Here](https://github.com/Airstack-xyz).\n\n1. NFT sale transactions\n\n   ```ts\n   function trackNFTSaleTransactions(\n     txHash: string,\n     fromArray: Address[],\n     toArray: Address[],\n     contractAddressArray: Address[],\n     nftIdArray: BigInt[],\n     paymentTokenAddress: Address,\n     paymentAmount: BigInt,\n     timestamp: BigInt\n   ): void;\n   ```\n\n   **txHash**: Add details<br/>\n   **fromArray**: Add details<br/>\n   **toArray**: Add details<br/>\n   **contractAddressArray**: Add details<br/>\n   **nftIdArray**: Add details<br/>\n   **paymentTokenAddress**: Add details<br/>\n   **paymentAmount**: Add details<br/>\n   **timestamp**: Add details<br/>\n\n#### b. Swaps/DEX\n\nTrack actions for DEX Projects.\nCall the following functions from your subgraph mapping. An example implementation is [Here](https://github.com/Airstack-xyz).\n\n1. Creation of Pool\n\n   ```ts\n    dex.addDexPool(\n      poolAddress: string,\n      fee: BigInt,\n      inputTokens: Array<string>,\n      weights: Array<BigDecimal> | null = null,\n      outputToken: string | null = null\n    ): void;\n   ```\n\n   **poolAddress**: Dex pool address<br/>\n   **fee**: Fee amount<br/>\n   **inputTokens**: Array of address of tokens<br/>\n   **weights**: Weightage of each input token<br/>\n   **outputToken**: LP token address<br/>\n\n2. Add Liquidity\n\n   ```ts\n   function addLiquidity(\n     poolAddress: string,\n     inputAmounts: Array<BigInt>,\n     from: string,\n     to: string,\n     hash: string,\n     logIndex: BigInt,\n     timestamp: BigInt\n   ): void;\n   ```\n\n   **poolAddress**: Dex pool address<br/>\n   **inputAmounts**: Array of input token amounts<br/>\n   **from**: From wallet address<br/>\n   **to**: To wallet address<br/>\n   **hash**: Transaction hash<br/>\n   **logIndex**: Transaction log index<br/>\n   **timestamp**: Transaction timestamp<br/>\n\n3. Swap\n\n   ```ts\n   function swap(\n     poolAddress: string,\n     inputAmounts: Array<BigInt>,\n     outputAmounts: Array<BigInt>,\n     inputTokenIndex: i32,\n     outputTokenIndex: i32,\n     from: string,\n     to: string,\n     hash: string,\n     logIndex: BigInt,\n     timestamp: BigInt\n   ): void;\n   ```\n\n   **poolAddress**: Dex pool address<br/>\n   **inputAmounts**: Array of input amounts<br/>\n   **outputAmounts**: Array of output amounts<br/>\n   **inputTokenIndex**: Index of token in dex pool for input<br/>\n   **outputTokenIndex**: Index of token in dex pool for output<br/>\n   **from**: From wallet address<br/>\n   **to**: To wallet address<br/>\n   **hash**: Transaction hash<br/>\n   **logIndex**: Transaction log index<br/>\n   **timestamp**: Transaction timestamp<br/>\n\n4. Remove Liquidity\n   ```\n     TBA\n   ```\n\n### 4. Development status of each vertical\n\n⌛ = Prioritized<br/>\n💬 = In discussion<br/>\n🔨 = In progress implementation<br/>\n✅ = Completed<br/>\n\n| Vertical         | Status |\n| --------------- | :----: |\n| NFT Marketplace |   🔨   |\n| DEX             |   🔨   |\n| Bridges         |   💬   |\n| DAO             |   ⌛   |\n| Defi            |   ⌛   |\n| Games           |   ⌛   |\n","readmeFilename":"README.md","gitHead":"fb1f9be7056932311c4e368e17d23107641f45ee","_id":"@airstack/subgraph-generator@1.0.0-alpha.3","_nodeVersion":"12.5.0","_npmVersion":"7.5.0","dist":{"integrity":"sha512-EP92mURxnPe0XWTwov66L9NUxVqY7Km2WbqQLaGhCWCNuo5t8ihYgi8mOPNsqiLrLb1KUUxMHwWn+HxeRSPuVA==","shasum":"d5787f00df8f7ca9cb7a7645e39a084175a3d239","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.0-alpha.3.tgz","fileCount":111,"unpackedSize":523577,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB6nlu0SYv9qdi7u9yMqjA9Bvr48WgAwu/PAHsDn/GZcAiEA/C+nwC7/xgf8UXtJZVeoFRIdawT5WZVLKRSM0Gsoxc4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjFZ79ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoy0w//e0jBLHnN4I4mHzx0YTd7JmuFoZbJIZUzvQZQMYuuPfrQ7OxR\r\nZ6dtQBkqM+uPJjIA4Ll1I8O8W1qUmN4nG/KPSXpk7QaqNA96HD0oeZMpZa3T\r\nxm6+kGMUFRIE6VhNdVZa+FppBP5otuRQ4Xoudi3yU0StmUhC/guAhkU0lZjH\r\n/o1giba7Psb6qj1XGGcmkCp6/WWouNbZlu+aszry6KMwEJhx1/OsBqihjZbL\r\nLQlI8IEt6yNICIMJHN0DxeFXTadK2N3Jd/940TDAykbkaKTkRiun6quf+asb\r\n5fmXNaEgdA3VuX3vQR3xXAzKdAyszbhhTAIEJPndnOMAdc0ZyP9gOoIKEluC\r\n4WIG3ls1KaPvB3CCe5+dtGAds5pABQuPFesHhNROPAPWSkb4m58dx2GQyXfQ\r\nenk4ExrCAtIwFGIXj4t9s/8Y2VZeMnX4y0XQqmSrmy+DLKrURlj2oCvAZMz8\r\nAL01uXuO8++yRjABkpNhwRX3WyXR6uPMNQ5v3Nqy6vgg8AqAv8VZ9FMcIEka\r\nut6duo7BAb3atn4CjRfmMb7EeNhUmbnz8mFDpvG+q82dz6CejU3v+XPUvMA6\r\net/OcIaiCeA82qwCCT3r4ZgQfGxK0cOiI0B+S97umDpiu1F0mqFUTNja47xm\r\nYtWmPYA4eppKU0ylHkO0/Wine/9Mtu4zr70=\r\n=7dUV\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"deepesh-kn","email":"deepesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.0-alpha.3_1662361341756_0.27266221700217974"},"_hasShrinkwrap":false},"1.0.0-alpha.4":{"name":"@airstack/subgraph-generator","version":"1.0.0-alpha.4","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag alpha --access public","build":"npm run build:package && npm pack"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"0.33.0","@graphprotocol/graph-ts":"0.27.0","@types/inquirer":"^9.0.3","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0","readline-sync":"^1.4.10"},"readme":"# Airstack Subgraphs\n\n## Introduction\n\nAirstack is a web3 developer platform that provides powerful APIs for integrating on-chain and off-chain data into any application. With Airstack developers are able to easily connect their applications to the web3 ecosystem. \n\nAirstack enables GraphQL queries that combine on-chain and off-chain data from multiple sources in a single response. Our goal is to enable developers to query and integrate relevant web3 data, and serve it up to users without requiring heavy infrastructure or even a back-end. \n\nAirstack identity APIs map addresses and transactions across various sources, including: ENS, Farcaster, Lens, POAP, Dapps, and Marketplaces.\n\n## Airstack Substreams & Subgraphs\n\nAirstack is a pioneer in utilizing Substreams to index on-chain transactions faster than RPC-based solutions. Substreams are used for real-time indexing of on-chain events and for high volume blockchains such as Polygon. Airstack Substreams are hosted in-house on our infra.\n\nAirstack deploys Subgraphs with custom schemas for indexing historical events and sales data from specific dapps, marketplaces and protocols. Airstack subgraphs are hosted in-house on our infra.\n\nAirstack schemas for Substreams and Subgraphs define how events and transactions are indexed, aggregated, and consumed across projects in standard formats, enabling seamless querying of like data across projects and chains. Example verticals: NFT Marketplace, Social, DAOs, DeFi.\n\nAirstack augments on-chain data with off-chain metadata from IPFS, dapps and marketplaces (for example NFT images and descriptions). Wherever possible we default to on-chain data.\n\nData is stored in the Airstack backend and optimized with parallel processing for fast GraphQL querying.\n\n## Getting Started\n\n### 1. Prerequisite:\n\nYou already have a subgraph for Dapp/Protocol. And you intend to integrate Airstack schemas into the project.\n\n### 2. Install Airstack package:\n\n```npm\nnpm install @airstack/subgraph-generator\n```\n\n### 3. Identify the vertical for the Dapp/Protocol:\n\nWe support\n\n-   NFT Marketplace: `nft-marketplace`\n-   Domain Name: `domain-name`\n-   DEX: `dex`\n-   Bridges: `TBD`\n-   DAO: `TBD`\n-   Defi: `TBD`\n-   Games: `TBD`\n\nUse the following command to add Airstack Schemas and Modules in your project\n\n```npm\nnpx  @airstack/subgraph-generator <vertical>  --yaml <subgraph.yaml file path> --graphql <schema.graphql file path> --dataSourceNames <\"name1, name2, ...\"> --templates <\"name1, name2\">\n```\n\n<ul>\n<li> <b><i>npx airstack <vertical></i></b> will add the required Airstack entities and the module files in your <b>subgraph.yaml</b> file</li>\n<li> <b><i>--yaml <subgraph.yaml file path></i></b> provide the location of your project's <b>subgraph.yaml</b> file. This is an optional parameter.</li>\n<li> <b><i>--graphql <subgraph.graphql file path></i></b>provide the location of your project's <b>schema.graphql</b> file. This is an optional parameter.</li>\n<li> <b><i>--dataSourceNames <name1, name2, ...></i></b> provide the <b>dataSource</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>dataSource</b> provided in the <b>subgraph.yaml</b>.\n</li>\n<li> <b><i>--templates <name1, name2, ...></i></b> provide the <b>template</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>template</b> provided in the <b>subgraph.yaml</b>.\n</li>\n</ul>\n\n\n\n\n\n\n\n\n\n\nExamples:\n\na. NFT Marketplace\n\n```\nnpx @airstack/subgraph-generator nft-marketplace\n```\n\n#### Terminal will prompt these questions\n\n```sh\nEnter the name of the subgraph:\nEnter the version of the subgraph:\nEnter the slug of the subgraph:\n```\n\nIntegration of the Airstack schemas is done. Now, move to the vertical-specific section for further integration.\n\n### 3. Code integration\n\n#### Example: NFT Marketplace\n\n1. Import `airstack` modules\n\n```ts\nimport * as airstack from \"../modules/airstack/nft-marketplace\"\n```\n\n2. Creation of NFT object\n\n```ts\nlet nft = new airstack.nft.NFT(\n    collectionAddress, // Address\n    standard, // string \"ERC721\" or \"ERC1155\"\n    tokenId, // BigInt\n    amount // BigInt 1 for \"ERC721\" , n for \"ERC1155\"\n)\n```\n\n3. Creation of royalties array\n\n```ts\nlet royalties = new Array<airstack.nft.CreatorRoyalty>()\nlet royalty = new airstack.nft.CreatorRoyalty(\n    fee, // BigInt\n    beneficiary // Address\n)\nroyalties.push(royalty)\n```\n\n4. Creation of NFT Sales array\n\n```ts\nlet allSales = new Array<airstack.nft.Sale>()\nlet sale = new airstack.nft.Sale(\n    buyer, // Address\n    seller, // Address\n    nft, // airstack.nft.NFT\n    paymentAmount, // BigInt\n    paymentToken, // Address\n    protocolFees, // BigInt\n    protocolFeesBeneficiary, // Address\n    royalties // airstack.nft.CreatorRoyalty[]\n)\nallSales.push(sale)\n```\n\n5. Use the trackNFTSaleTransactions function to process the data and store in Airstack schema\n\n```ts\nairstack.nft.trackNFTSaleTransactions(\n    chainId, //  string eg: for mainnet: 1\n    txHash, // string eg: event.transaction.hash.toHexString()\n    txIndex, //string eg: event.transaction.index\n    allSales, // airstack.nft.Sale[]\n    isBundle, // boolean \n    protocolType, // string eg: \"NFT_MARKET_PLACE\"\n    protocolActionType, //string eg: \"SELL\"\n    timestamp, // BigInt eg: event.block.timestamp\n    blockHeight, // BigInt eg: event.block.number\n    blockHash // string eg: event.block.hash.toHexString()\n)\n```\n\n## Development status of each vertical\n\n⌛ = Prioritized<br/>\n💬 = In discussion<br/>\n🔨 = In progress implementation<br/>\n✅ = Completed<br/>\n\n| Vertical        | Status |\n| --------------- | :----: |\n| NFT Marketplace |   ✅   |\n| Domain Name     |   ✅   |\n| DEX             |   🔨   |\n| Bridges         |   💬   |\n| DAO             |   ⌛   |\n| Defi            |   ⌛   |\n| Games           |   ⌛   |\n\n## To build the module\n\nIf you want to build the module yourself, please follow there steps.\n\n1. Clone the repo\n2. Run the command\n   `npm run build`\n","readmeFilename":"README.md","gitHead":"8b1ae3dd032a943f4b10e12325181eff3a7bf4d7","_id":"@airstack/subgraph-generator@1.0.0-alpha.4","_nodeVersion":"16.13.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-+JEXNo7AfOoZdddBLZvsMOsQwJDo1/eOlBt/eR1AQ9Rp9xVeABVGK8rMQdg62/mOeMz+qYn+oFj7J8iyS3D3ng==","shasum":"5ceee0f5a2769d819011038100e5d23f61440358","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.0-alpha.4.tgz","fileCount":88,"unpackedSize":1570027,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEdNx4WeltcqjHSZxFcWg/85kqiG8DZkEX2eeuQtTWOlAiAaEIgiEJaSBk5UsFABpj5go+0/2gMtq/z+yx40fmn4zA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIzTwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpT+A/+PDndLDh+AXe4c0e8Sxz3PFi7gKWCdjWFipcn7ehbjWG49xc2\r\nAbfuK/eTgVjPPV0JqepwxaIsA7TQBpg8guO8fW148E0Hy/5iEqOiNOunsm4Q\r\nUn58cpZMBRNAIvr4NInb7AP2lTjCUo/GO45OvGtWcV+qJy8aBAebWsRW2GHn\r\nP6E1Y7cJlm2vcD6YJoQzoo4SXc65xz8/+tzM7DpJ90JeweKFIm5YLmrfRTm5\r\nrM0U3KdScSb1Y50yoxVTuC2mXDpPP/rpltM98BKvan+WnURqpB71MFfla8gE\r\ngwP7HmAV4/UIlsyWLermTDrJVv8Ygx/IZ0Iwst3bktnIL6i7+vivXEnRzZjJ\r\nSkL7+Qo+4R2zWD9B1LCFZdSm5AnNxK4hBja71AdQw0Td7Wh7azDW25Zy4vNn\r\nmVgs7H37qriAJDHpsRHLfbiqf3865Iaym6zxeTlg45YF9p49l2ixa0N/QBCD\r\nAkT8XENgE+MnimNExmipMBbKPIhZiiTbhRy7PVP6LZPkqXZcvbbf3fepPvMe\r\nmu+kl9kDDcIm2Fs/lfG8vbJyWhJ+S2qoCX/7agsMYK0E7qa0covZ31bYhOtE\r\nagvKwvpVEZRrNry/KP3YUhsqjaii/kWgza7kfpxCD9Y5ClG804vIab2N245x\r\nQrmzS/0e+I59bXC2haouCiEtethzDaGS628=\r\n=GEFP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"deepesh-kn","email":"deepesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"sharathkrml","email":"sharath@airstack.xyz"},{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.0-alpha.4_1680028912051_0.22744087195116447"},"_hasShrinkwrap":false},"1.0.0-alpha.5":{"name":"@airstack/subgraph-generator","version":"1.0.0-alpha.5","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag alpha --access public","build":"npm run build:package && npm pack"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"0.33.0","@graphprotocol/graph-ts":"0.27.0","@types/inquirer":"^9.0.3","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0","readline-sync":"^1.4.10"},"readme":"# Airstack Subgraphs\n\n## Introduction\n\nAirstack is a web3 developer platform that provides powerful APIs for integrating on-chain and off-chain data into any application. With Airstack developers are able to easily connect their applications to the web3 ecosystem. \n\nAirstack enables GraphQL queries that combine on-chain and off-chain data from multiple sources in a single response. Our goal is to enable developers to query and integrate relevant web3 data, and serve it up to users without requiring heavy infrastructure or even a back-end. \n\nAirstack identity APIs map addresses and transactions across various sources, including: ENS, Farcaster, Lens, POAP, Dapps, and Marketplaces.\n\n## Airstack Substreams & Subgraphs\n\nAirstack is a pioneer in utilizing Substreams to index on-chain transactions faster than RPC-based solutions. Substreams are used for real-time indexing of on-chain events and for high volume blockchains such as Polygon. Airstack Substreams are hosted in-house on our infra.\n\nAirstack deploys Subgraphs with custom schemas for indexing historical events and sales data from specific dapps, marketplaces and protocols. Airstack subgraphs are hosted in-house on our infra.\n\nAirstack schemas for Substreams and Subgraphs define how events and transactions are indexed, aggregated, and consumed across projects in standard formats, enabling seamless querying of like data across projects and chains. Example verticals: NFT Marketplace, Social, DAOs, DeFi.\n\nAirstack augments on-chain data with off-chain metadata from IPFS, dapps and marketplaces (for example NFT images and descriptions). Wherever possible we default to on-chain data.\n\nData is stored in the Airstack backend and optimized with parallel processing for fast GraphQL querying.\n\n## Getting Started\n\n### 1. Prerequisite:\n\nYou already have a subgraph for Dapp/Protocol. And you intend to integrate Airstack schemas into the project.\n\n### 2. Install Airstack package:\n\n```npm\nnpm install @airstack/subgraph-generator\n```\n\n### 3. Identify the vertical for the Dapp/Protocol:\n\nWe support\n\n-   NFT Marketplace: `nft-marketplace`\n-   Domain Name: `domain-name`\n-   DEX: `dex`\n-   Bridges: `TBD`\n-   DAO: `TBD`\n-   Defi: `TBD`\n-   Games: `TBD`\n\nUse the following command to add Airstack Schemas and Modules in your project\n\n```npm\nnpx  @airstack/subgraph-generator <vertical>  --yaml <subgraph.yaml file path> --graphql <schema.graphql file path> --dataSourceNames <\"name1, name2, ...\"> --templates <\"name1, name2\">\n```\n\n<ul>\n<li> <b><i>npx airstack <vertical></i></b> will add the required Airstack entities and the module files in your <b>subgraph.yaml</b> file</li>\n<li> <b><i>--yaml <subgraph.yaml file path></i></b> provide the location of your project's <b>subgraph.yaml</b> file. This is an optional parameter.</li>\n<li> <b><i>--graphql <subgraph.graphql file path></i></b>provide the location of your project's <b>schema.graphql</b> file. This is an optional parameter.</li>\n<li> <b><i>--dataSourceNames <name1, name2, ...></i></b> provide the <b>dataSource</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>dataSource</b> provided in the <b>subgraph.yaml</b>.\n</li>\n<li> <b><i>--templates <name1, name2, ...></i></b> provide the <b>template</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>template</b> provided in the <b>subgraph.yaml</b>.\n</li>\n</ul>\n\n\n\n\n\n\n\n\n\n\nExamples:\n\na. NFT Marketplace\n\n```\nnpx @airstack/subgraph-generator nft-marketplace\n```\n\n#### Terminal will prompt these questions\n\n```sh\nEnter the name of the subgraph:\nEnter the version of the subgraph:\nEnter the slug of the subgraph:\n```\n\nIntegration of the Airstack schemas is done. Now, move to the vertical-specific section for further integration.\n\n### 3. Code integration\n\n#### Example: NFT Marketplace\n\n1. Import `airstack` modules\n\n```ts\nimport * as airstack from \"../modules/airstack/nft-marketplace\"\n```\n\n2. Creation of NFT object\n\n```ts\nlet nft = new airstack.nft.NFT(\n    collectionAddress, // Address\n    standard, // string \"ERC721\" or \"ERC1155\"\n    tokenId, // BigInt\n    amount // BigInt 1 for \"ERC721\" , n for \"ERC1155\"\n)\n```\n\n3. Creation of royalties array\n\n```ts\nlet royalties = new Array<airstack.nft.CreatorRoyalty>()\nlet royalty = new airstack.nft.CreatorRoyalty(\n    fee, // BigInt\n    beneficiary // Address\n)\nroyalties.push(royalty)\n```\n\n4. Creation of NFT Sales array\n\n```ts\nlet allSales = new Array<airstack.nft.Sale>()\nlet sale = new airstack.nft.Sale(\n    buyer, // Address\n    seller, // Address\n    nft, // airstack.nft.NFT\n    paymentAmount, // BigInt\n    paymentToken, // Address\n    protocolFees, // BigInt\n    protocolFeesBeneficiary, // Address\n    royalties // airstack.nft.CreatorRoyalty[]\n)\nallSales.push(sale)\n```\n\n5. Use the trackNFTSaleTransactions function to process the data and store in Airstack schema\n\n```ts\nairstack.nft.trackNFTSaleTransactions(\n    chainId, //  string eg: for mainnet: 1\n    txHash, // string eg: event.transaction.hash.toHexString()\n    txIndex, //string eg: event.transaction.index\n    allSales, // airstack.nft.Sale[]\n    isBundle, // boolean \n    protocolType, // string eg: \"NFT_MARKET_PLACE\"\n    protocolActionType, //string eg: \"SELL\"\n    timestamp, // BigInt eg: event.block.timestamp\n    blockHeight, // BigInt eg: event.block.number\n    blockHash // string eg: event.block.hash.toHexString()\n)\n```\n\n## Development status of each vertical\n\n⌛ = Prioritized<br/>\n💬 = In discussion<br/>\n🔨 = In progress implementation<br/>\n✅ = Completed<br/>\n\n| Vertical        | Status |\n| --------------- | :----: |\n| NFT Marketplace |   ✅   |\n| Domain Name     |   ✅   |\n| DEX             |   🔨   |\n| Bridges         |   💬   |\n| DAO             |   ⌛   |\n| Defi            |   ⌛   |\n| Games           |   ⌛   |\n\n## To build the module\n\nIf you want to build the module yourself, please follow there steps.\n\n1. Clone the repo\n2. Run the command\n   `npm run build`\n","readmeFilename":"README.md","gitHead":"8b1ae3dd032a943f4b10e12325181eff3a7bf4d7","_id":"@airstack/subgraph-generator@1.0.0-alpha.5","_nodeVersion":"16.13.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-4R7cpX/KE53LZR1VaSoBiJFsqe5ZHFTa9ep33l8wALoi3m8dIwCT5WW+5Lm9HXb7FFwJG54D9lmHU2fTnPRpWw==","shasum":"7c53fc04b0e340e35fb5c47cf87225a03d9945fd","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.0-alpha.5.tgz","fileCount":89,"unpackedSize":2513274,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhxgOiNjIAQHVoA+DtXbNHl2xvBqJxgLp+I94FHWkdVwIgUpDQp35U578G4sI+2g1FK75Ad068t7SANrGaCX7nEqk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIzWMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYTBAAoT/dZMzomK0/aaapVOCP8JK4Df8RFheOXLRycL+Ib0UQGEOU\r\n9Nxzu3eIE2ivvTL4QsbORWE3U0FELGQCZil0Q7tzmkqMX/oFwaiTTsNk2REG\r\n/+FoBArXXNIrUfTJl1hfJCnKCsU/FpLHrAN1eWKuLfOyd5M1cuTOH5Zn/am3\r\nB+aNtpdTKBXlCMmoUnkwK/8KD+T7gIlrL3ATcdnyJcN6VtOz7XBMdCYDtlln\r\nXc4BjZe685x9qojZj+vo7RVErLYHiu09PpxFUI/aPIpIxT/EW/8l7rU/BFL6\r\nC5HtFumASuQD8u0EBkFXz/YJsHUMEf64mGH6PxFU5IqA7oH/zhUptquHOT36\r\n04V12eTfLc0pZWv1HZAzEzsVdJxwg5RbolZyVnAMEkV/bFCwjhs0iXrx67PP\r\nTSe6HkjiOWbui82LMUxXBpblSnkIchInxEn7JNqVGpeTb25q/fqXX/q1ilvh\r\ndai8e3bSLS8johK41E3zraQ0qkBumcBzezRS4f4wKEdaU95F/lMioyxcz/mX\r\nQsHDrTbpTzlU1s5ClHjtPU35y336toUF0FDK0aBmAOda513aDSCZrw5AjGpr\r\nS9/JIZmvG21jLy5wufPW679pPQHG7g2U4KPyuFXRqBHDNWAv88CdYWheIY1J\r\nafE7uvPIFQZ79omiIXLptM9lSW/R41M7pxw=\r\n=Ojpf\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"deepesh-kn","email":"deepesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"sharathkrml","email":"sharath@airstack.xyz"},{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.0-alpha.5_1680029068428_0.7010623584731404"},"_hasShrinkwrap":false},"1.0.1-alpha.0":{"name":"@airstack/subgraph-generator","version":"1.0.1-alpha.0","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag alpha --access public","build":"npm run build:package && npm pack"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"0.33.0","@graphprotocol/graph-ts":"0.27.0","@types/inquirer":"^9.0.3","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0","readline-sync":"^1.4.10"},"readme":"# Airstack Subgraphs\n\n## Introduction\n\nAirstack is a web3 developer platform that provides powerful APIs for integrating on-chain and off-chain data into any application. With Airstack developers are able to easily connect their applications to the web3 ecosystem. \n\nAirstack enables GraphQL queries that combine on-chain and off-chain data from multiple sources in a single response. Our goal is to enable developers to query and integrate relevant web3 data, and serve it up to users without requiring heavy infrastructure or even a back-end. \n\nAirstack identity APIs map addresses and transactions across various sources, including: ENS, Farcaster, Lens, POAP, Dapps, and Marketplaces.\n\n## Airstack Substreams & Subgraphs\n\nAirstack is a pioneer in utilizing Substreams to index on-chain transactions faster than RPC-based solutions. Substreams are used for real-time indexing of on-chain events and for high volume blockchains such as Polygon. Airstack Substreams are hosted in-house on our infra.\n\nAirstack deploys Subgraphs with custom schemas for indexing historical events and sales data from specific dapps, marketplaces and protocols. Airstack subgraphs are hosted in-house on our infra.\n\nAirstack schemas for Substreams and Subgraphs define how events and transactions are indexed, aggregated, and consumed across projects in standard formats, enabling seamless querying of like data across projects and chains. Example verticals: NFT Marketplace, Social, DAOs, DeFi.\n\nAirstack augments on-chain data with off-chain metadata from IPFS, dapps and marketplaces (for example NFT images and descriptions). Wherever possible we default to on-chain data.\n\nData is stored in the Airstack backend and optimized with parallel processing for fast GraphQL querying.\n\n## Getting Started\n\n### 1. Prerequisite:\n\nYou already have a subgraph for Dapp/Protocol. And you intend to integrate Airstack schemas into the project.\n\n### 2. Install Airstack package:\n\n```npm\nnpm install @airstack/subgraph-generator\n```\n\n### 3. Identify the vertical for the Dapp/Protocol:\n\nWe support\n\n-   NFT Marketplace: `nft-marketplace`\n-   Domain Name: `domain-name`\n-   DEX: `dex`\n-   Bridges: `TBD`\n-   DAO: `TBD`\n-   Defi: `TBD`\n-   Games: `TBD`\n\nUse the following command to add Airstack Schemas and Modules in your project\n\n```npm\nnpx  @airstack/subgraph-generator <vertical>  --yaml <subgraph.yaml file path> --graphql <schema.graphql file path> --dataSourceNames <\"name1, name2, ...\"> --templates <\"name1, name2\">\n```\n\n<ul>\n<li> <b><i>npx airstack <vertical></i></b> will add the required Airstack entities and the module files in your <b>subgraph.yaml</b> file</li>\n<li> <b><i>--yaml <subgraph.yaml file path></i></b> provide the location of your project's <b>subgraph.yaml</b> file. This is an optional parameter.</li>\n<li> <b><i>--graphql <subgraph.graphql file path></i></b>provide the location of your project's <b>schema.graphql</b> file. This is an optional parameter.</li>\n<li> <b><i>--dataSourceNames <name1, name2, ...></i></b> provide the <b>dataSource</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>dataSource</b> provided in the <b>subgraph.yaml</b>.\n</li>\n<li> <b><i>--templates <name1, name2, ...></i></b> provide the <b>template</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>template</b> provided in the <b>subgraph.yaml</b>.\n</li>\n</ul>\n\n\n\n\n\n\n\n\n\n\nExamples:\n\na. NFT Marketplace\n\n```\nnpx @airstack/subgraph-generator nft-marketplace\n```\n\n#### Terminal will prompt these questions\n\n```sh\nEnter the name of the subgraph:\nEnter the version of the subgraph:\nEnter the slug of the subgraph:\n```\n\nIntegration of the Airstack schemas is done. Now, move to the vertical-specific section for further integration.\n\n### 3. Code integration\n\n#### Example: NFT Marketplace\n\n1. Import `airstack` modules\n\n```ts\nimport * as airstack from \"../modules/airstack/nft-marketplace\"\n```\n\n2. Creation of NFT object\n\n```ts\nlet nft = new airstack.nft.NFT(\n    collectionAddress, // Address\n    standard, // string \"ERC721\" or \"ERC1155\"\n    tokenId, // BigInt\n    amount // BigInt 1 for \"ERC721\" , n for \"ERC1155\"\n)\n```\n\n3. Creation of royalties array\n\n```ts\nlet royalties = new Array<airstack.nft.CreatorRoyalty>()\nlet royalty = new airstack.nft.CreatorRoyalty(\n    fee, // BigInt\n    beneficiary // Address\n)\nroyalties.push(royalty)\n```\n\n4. Creation of NFT Sales array\n\n```ts\nlet allSales = new Array<airstack.nft.Sale>()\nlet sale = new airstack.nft.Sale(\n    buyer, // Address\n    seller, // Address\n    nft, // airstack.nft.NFT\n    paymentAmount, // BigInt\n    paymentToken, // Address\n    protocolFees, // BigInt\n    protocolFeesBeneficiary, // Address\n    royalties // airstack.nft.CreatorRoyalty[]\n)\nallSales.push(sale)\n```\n\n5. Use the trackNFTSaleTransactions function to process the data and store in Airstack schema\n\n```ts\nairstack.nft.trackNFTSaleTransactions(\n    chainId, //  string eg: for mainnet: 1\n    txHash, // string eg: event.transaction.hash.toHexString()\n    txIndex, //string eg: event.transaction.index\n    allSales, // airstack.nft.Sale[]\n    isBundle, // boolean \n    protocolType, // string eg: \"NFT_MARKET_PLACE\"\n    protocolActionType, //string eg: \"SELL\"\n    timestamp, // BigInt eg: event.block.timestamp\n    blockHeight, // BigInt eg: event.block.number\n    blockHash // string eg: event.block.hash.toHexString()\n)\n```\n\n## Development status of each vertical\n\n⌛ = Prioritized<br/>\n💬 = In discussion<br/>\n🔨 = In progress implementation<br/>\n✅ = Completed<br/>\n\n| Vertical        | Status |\n| --------------- | :----: |\n| NFT Marketplace |   ✅   |\n| Domain Name     |   ✅   |\n| DEX             |   🔨   |\n| Bridges         |   💬   |\n| DAO             |   ⌛   |\n| Defi            |   ⌛   |\n| Games           |   ⌛   |\n\n## To build the module\n\nIf you want to build the module yourself, please follow there steps.\n\n1. Clone the repo\n2. Run the command\n   `npm run build`\n","readmeFilename":"README.md","gitHead":"8b1ae3dd032a943f4b10e12325181eff3a7bf4d7","_id":"@airstack/subgraph-generator@1.0.1-alpha.0","_nodeVersion":"16.13.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-PO0f86cd6Fto4p7juQ8Kb7vGm4wx3DGt1vZRhThxE197it2uW8vNxH8ger5egp6Wa37oxcu0CvG2gCy3wrM/XA==","shasum":"2f2c8ce85185bed1b491266efe3ee1e4e3b809ec","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.1-alpha.0.tgz","fileCount":90,"unpackedSize":4398181,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCviRj5t047RjukgqJQcTCZMninAs/10kL8cpVHa88kgAIgDwsbUVzMjw2Ot94eVRdhcGhAA5XAw0QJTLzqviyvHBo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIzYiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFgA//aAqZwF4rv2yPLuotmbnbN9kEEmhJMRHYEVlie+3scI9mnvRW\r\nMwUeFDAgskfCTg/YHFQYB8YZA9odwpkcNAW6hHQiB3lBrI9ToeZNOw0rl2PR\r\n808sp0CzXogz6IW0PBYXGxhmwcD8vj4N/NWCf/XZgRfnsu7pAG0d8mss9vcZ\r\nHSkwcTBc6J+aLYVxaBVMRZw6cV6rQdqRPn7FtYSy9CRzBqBidn1VpSOE6cyl\r\nHAAcfsoNmP9jvXXkMKceu4ysQUEgnmTicBRGCdE7ZXXqPwITcMRHALy5XSFH\r\nktWSQCyPzQVFnaJ+Y24yQ0y/04Lbr3kYcZvMqG4sQulXLRMfp97ZwmJHUkER\r\niI+5O23MiKLFpdcHTrrzDe7SaKhjw9RpM/+/rktyi5Hq06NtpF0c96T/uheC\r\nNjcmZLm36m3s5O2Xq/x1bcngJsXV6+F7D+PJq5d4vn00bXMyoCnotsgDCRKY\r\nAe0Q6LHtpSe6UmSzPSdULfYBFb3VO57wHrN7oaivEE7k30RVzph83cqEW3H9\r\nFQ5Zi3CUvRQJBZJJmXbsEZJhh+fFIlJDj+yugxN1Q9VE1jd6kikVI1VYtDj3\r\nOUk71RDZSPg9c7GR7sIrVHdB9HqcgF4plD62cLBQEkkTkYy6o9QYch3n4IU2\r\niEjqvAkTSMvlZpllCP5N70mCUsb+UeaPcfI=\r\n=nKJv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"deepesh-kn","email":"deepesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"sharathkrml","email":"sharath@airstack.xyz"},{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.1-alpha.0_1680029218664_0.5543163568333558"},"_hasShrinkwrap":false},"1.0.1-alpha.1":{"name":"@airstack/subgraph-generator","version":"1.0.1-alpha.1","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag latest --access public","build":"npm run build:package && npm pack"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"0.33.0","@graphprotocol/graph-ts":"0.27.0","@types/inquirer":"^9.0.3","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0","readline-sync":"^1.4.10"},"gitHead":"8b1ae3dd032a943f4b10e12325181eff3a7bf4d7","_id":"@airstack/subgraph-generator@1.0.1-alpha.1","_nodeVersion":"16.13.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-mrTK0yDqcn9jWVR7GDsF3H66JbSoAPeZlZ0QzIO22i8Fj8Gu/EHEwi7wT4L3YoKIjxqzrilKHQC7kbrCdU3tUA==","shasum":"b88afb62161dcec800079c0ddea0b813b0ed1d7e","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.1-alpha.1.tgz","fileCount":91,"unpackedSize":8167986,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE5w7QJdJciG4vazCHH+QESAWBcudJrXfh7X0TUdYuunAiEA37NKq58NlB+p3GFXbT233ZjWSu4X3LrAMokd5wtao2w="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIze0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7cA/+PNeJrkVflTM38kqABXXEaGW7+Pl6/oXVRphz9+Fev2xghXbw\r\nEIaOCCffg4s1vEIW+IS2qCe1ih07hSm+iU74qN1ch3Jb51gTaD7ywFL3MgX7\r\n/NZVKtXjUJsJZaV2kM6aXF5BYTP2o/kxC3i3bTpoDzE+sCkKve5jsTeWS6g7\r\npX1UMy8KwxekFOKT1OAL9bfKmlcED89q2p/PP6FRjiJFKF/z39GF90Eg+ixT\r\n0co2HvmtluZP0B5jJoSFKN4u6EcsMzHFwigu7RECdIOEsfb5pMy7Q31ojB4s\r\niTWQhfHKKOO84SH4SzhQBIPAOSv+IZnqZI02I7iGJLq6KMYVCkrUTKA1Ukkv\r\nPFlArqPmfByLKCSWRdaoc0F0tkHjnKcG9+qJnVXfVvCmzM0ig4ke6BRKFS9c\r\nux67TgMvX1CXOxJn2YPVgjea01otMDhk5p6mZxObVwZSbxDw87baUqcuvUaT\r\nBgDtoaoBq3SyevgmvKW3+4EghfbLlhledtpm7S+IbfrM0P/ihE8giuPVrf4p\r\n+lsz9kXzYGd2pWQdF7B2OvixsCVv8lWPHoKuMMZwLh/zew+9tgOXHIeD+0TB\r\n+ymUfPyxouSIVYzLoXOlxFqkkR2e50dX6T+f7NnHh3ST1PgpczYCmiVEjjNx\r\n7SRzvszKETIDW/TVn3ssYhHyee8pbL7Jl0Q=\r\n=Nbpw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"deepesh-kn","email":"deepesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"sharathkrml","email":"sharath@airstack.xyz"},{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.1-alpha.1_1680029619999_0.10015532800419336"},"_hasShrinkwrap":false},"1.0.2-alpha.1":{"name":"@airstack/subgraph-generator","version":"1.0.2-alpha.1","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag alpha --access public","build":"npm run build:package && npm pack"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"^0.47.0","@graphprotocol/graph-ts":"^0.29.3","@types/inquirer":"^9.0.3","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0","readline-sync":"^1.4.10"},"readme":"# Airstack Subgraphs\n\n## Introduction\n\nAirstack is a web3 developer platform that provides powerful APIs for integrating on-chain and off-chain data into any application. With Airstack developers are able to easily connect their applications to the web3 ecosystem. \n\nAirstack enables GraphQL queries that combine on-chain and off-chain data from multiple sources in a single response. Our goal is to enable developers to query and integrate relevant web3 data, and serve it up to users without requiring heavy infrastructure or even a back-end. \n\nAirstack identity APIs map addresses and transactions across various sources, including: ENS, Farcaster, Lens, POAP, Dapps, and Marketplaces.\n\n## Airstack Substreams & Subgraphs\n\nAirstack is a pioneer in utilizing Substreams to index on-chain transactions faster than RPC-based solutions. Substreams are used for real-time indexing of on-chain events and for high volume blockchains such as Polygon. Airstack Substreams are hosted in-house on our infra.\n\nAirstack deploys Subgraphs with custom schemas for indexing historical events and sales data from specific dapps, marketplaces and protocols. Airstack subgraphs are hosted in-house on our infra.\n\nAirstack schemas for Substreams and Subgraphs define how events and transactions are indexed, aggregated, and consumed across projects in standard formats, enabling seamless querying of like data across projects and chains. Example verticals: NFT Marketplace, Social, DAOs, DeFi.\n\nAirstack augments on-chain data with off-chain metadata from IPFS, dapps and marketplaces (for example NFT images and descriptions). Wherever possible we default to on-chain data.\n\nData is stored in the Airstack backend and optimized with parallel processing for fast GraphQL querying.\n\n## Getting Started\n\n### 1. Prerequisite:\n\nYou already have a subgraph for Dapp/Protocol. And you intend to integrate Airstack schemas into the project.\n\n### 2. Install Airstack package:\n\n```npm\nnpm install @airstack/subgraph-generator\n```\n\n### 3. Identify the vertical for the Dapp/Protocol:\n\nWe support\n\n-   NFT Marketplace: `nft-marketplace`\n-   Domain Name: `domain-name`\n-   DEX: `dex`\n-   Bridges: `TBD`\n-   DAO: `TBD`\n-   Defi: `TBD`\n-   Games: `TBD`\n\nUse the following command to add Airstack Schemas and Modules in your project\n\n```npm\nnpx  @airstack/subgraph-generator <vertical>  --yaml <subgraph.yaml file path> --graphql <schema.graphql file path> --dataSourceNames <\"name1, name2, ...\"> --templates <\"name1, name2\">\n```\n\n<ul>\n<li> <b><i>npx airstack <vertical></i></b> will add the required Airstack entities and the module files in your <b>subgraph.yaml</b> file</li>\n<li> <b><i>--yaml <subgraph.yaml file path></i></b> provide the location of your project's <b>subgraph.yaml</b> file. This is an optional parameter.</li>\n<li> <b><i>--graphql <subgraph.graphql file path></i></b>provide the location of your project's <b>schema.graphql</b> file. This is an optional parameter.</li>\n<li> <b><i>--dataSourceNames <name1, name2, ...></i></b> provide the <b>dataSource</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>dataSource</b> provided in the <b>subgraph.yaml</b>.\n</li>\n<li> <b><i>--templates <name1, name2, ...></i></b> provide the <b>template</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>template</b> provided in the <b>subgraph.yaml</b>.\n</li>\n</ul>\n\n\n\n\n\n\n\n\n\n\nExamples:\n\na. NFT Marketplace\n\n```\nnpx @airstack/subgraph-generator nft-marketplace\n```\n\n#### Terminal will prompt these questions\n\n```sh\nEnter the name of the subgraph:\nEnter the version of the subgraph:\nEnter the slug of the subgraph:\n```\n\nIntegration of the Airstack schemas is done. Now, move to the vertical-specific section for further integration.\n\n### 3. Code integration\n\n#### Example: NFT Marketplace\n\n1. Import `airstack` modules\n\n```ts\nimport * as airstack from \"../modules/airstack/nft-marketplace\"\n```\n\n2. Creation of NFT object\n\n```ts\nlet nft = new airstack.nft.NFT(\n    collectionAddress, // Address\n    standard, // string \"ERC721\" or \"ERC1155\"\n    tokenId, // BigInt\n    amount // BigInt 1 for \"ERC721\" , n for \"ERC1155\"\n)\n```\n\n3. Creation of royalties array\n\n```ts\nlet royalties = new Array<airstack.nft.CreatorRoyalty>()\nlet royalty = new airstack.nft.CreatorRoyalty(\n    fee, // BigInt\n    beneficiary // Address\n)\nroyalties.push(royalty)\n```\n\n4. Creation of NFT Sales array\n\n```ts\nlet allSales = new Array<airstack.nft.Sale>()\nlet sale = new airstack.nft.Sale(\n    buyer, // Address\n    seller, // Address\n    nft, // airstack.nft.NFT\n    paymentAmount, // BigInt\n    paymentToken, // Address\n    protocolFees, // BigInt\n    protocolFeesBeneficiary, // Address\n    royalties // airstack.nft.CreatorRoyalty[]\n)\nallSales.push(sale)\n```\n\n5. Use the trackNFTSaleTransactions function to process the data and store in Airstack schema\n\n```ts\nairstack.nft.trackNFTSaleTransactions(\n    chainId, //  string eg: for mainnet: 1\n    txHash, // string eg: event.transaction.hash.toHexString()\n    txIndex, //string eg: event.transaction.index\n    allSales, // airstack.nft.Sale[]\n    isBundle, // boolean \n    protocolType, // string eg: \"NFT_MARKET_PLACE\"\n    protocolActionType, //string eg: \"SELL\"\n    timestamp, // BigInt eg: event.block.timestamp\n    blockHeight, // BigInt eg: event.block.number\n    blockHash // string eg: event.block.hash.toHexString()\n)\n```\n\n## Development status of each vertical\n\n⌛ = Prioritized<br/>\n💬 = In discussion<br/>\n🔨 = In progress implementation<br/>\n✅ = Completed<br/>\n\n| Vertical        | Status |\n| --------------- | :----: |\n| NFT Marketplace |   ✅   |\n| Domain Name     |   ✅   |\n| DEX             |   🔨   |\n| Bridges         |   💬   |\n| DAO             |   ⌛   |\n| Defi            |   ⌛   |\n| Games           |   ⌛   |\n\n## To build the module\n\nIf you want to build the module yourself, please follow there steps.\n\n1. Clone the repo\n2. Run the command\n   `npm run build`\n","readmeFilename":"README.md","gitHead":"e7970cc43c9a1053acaafd3601019d798af8c30a","_id":"@airstack/subgraph-generator@1.0.2-alpha.1","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-r9EnH4q7mZuwMYZXcNl/myap5obMjwxFkpwZw57Bjbtvf3k/JJvb2sv3H9FQD+dHbbBmkT/H5L7tqzToOFbymw==","shasum":"046d3b18d589db879b5a7c58ab45ccc51ae1ab6b","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.2-alpha.1.tgz","fileCount":92,"unpackedSize":15725623,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClEtctJUcV9Z0tvikID+58Sm6zcXmcUO5vNb6LYzpKsgIhAPRpBfyNHFjuCs8QLMdDaBrKV3m3nxphvJ3+bpy83Hsr"}]},"_npmUser":{"name":"deepesh-kn","email":"deepesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"aadil-airstack","email":"aadil@airstack.xyz"},{"name":"sharathkrml","email":"sharath@airstack.xyz"},{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.2-alpha.1_1684516248993_0.46968168302805213"},"_hasShrinkwrap":false},"1.0.2-alpha.2":{"name":"@airstack/subgraph-generator","version":"1.0.2-alpha.2","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --access public","build":"npm run build:package && npm pack"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"^0.47.0","@graphprotocol/graph-ts":"^0.29.3","@types/inquirer":"^9.0.3","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0","readline-sync":"^1.4.10"},"gitHead":"e7970cc43c9a1053acaafd3601019d798af8c30a","_id":"@airstack/subgraph-generator@1.0.2-alpha.2","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-nHTIHCKc6EnhkiIDQKwoQy05xwvdktU8/24sLdzXJ692Myjh+twH56tHqbkC4eKQ17zb/J0wHII3BdMxJgZaJA==","shasum":"6a3718ec41467aeda980bbd04e02976f6eb166ee","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.2-alpha.2.tgz","fileCount":92,"unpackedSize":15725611,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjLDmH1FQaIeNWZ2cCS1DOCNpdIax5q6xWpYL6B4JfnQIhAKVMYtUmtz10/vzee1+5wlmjfk19lB7Qq1bJnuJ09b6g"}]},"_npmUser":{"name":"deepesh-kn","email":"deepesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"aadil-airstack","email":"aadil@airstack.xyz"},{"name":"sharathkrml","email":"sharath@airstack.xyz"},{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.2-alpha.2_1684516678499_0.5750907287634579"},"_hasShrinkwrap":false},"1.0.0-alpha.6":{"name":"@airstack/subgraph-generator","version":"1.0.0-alpha.6","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag alpha --access public","build":"npm run build:package && npm pack"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"^0.47.0","@graphprotocol/graph-ts":"^0.29.3","@types/inquirer":"^9.0.3","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0","readline-sync":"^1.4.10"},"readme":"# Airstack Subgraphs\n\n## Introduction\n\nAirstack is a web3 developer platform that provides powerful APIs for integrating on-chain and off-chain data into any application. With Airstack developers are able to easily connect their applications to the web3 ecosystem. \n\nAirstack enables GraphQL queries that combine on-chain and off-chain data from multiple sources in a single response. Our goal is to enable developers to query and integrate relevant web3 data, and serve it up to users without requiring heavy infrastructure or even a back-end. \n\nAirstack identity APIs map addresses and transactions across various sources, including: ENS, Farcaster, Lens, POAP, Dapps, and Marketplaces.\n\n## Airstack Substreams & Subgraphs\n\nAirstack is a pioneer in utilizing Substreams to index on-chain transactions faster than RPC-based solutions. Substreams are used for real-time indexing of on-chain events and for high volume blockchains such as Polygon. Airstack Substreams are hosted in-house on our infra.\n\nAirstack deploys Subgraphs with custom schemas for indexing historical events and sales data from specific dapps, marketplaces and protocols. Airstack subgraphs are hosted in-house on our infra.\n\nAirstack schemas for Substreams and Subgraphs define how events and transactions are indexed, aggregated, and consumed across projects in standard formats, enabling seamless querying of like data across projects and chains. Example verticals: NFT Marketplace, Social, DAOs, DeFi.\n\nAirstack augments on-chain data with off-chain metadata from IPFS, dapps and marketplaces (for example NFT images and descriptions). Wherever possible we default to on-chain data.\n\nData is stored in the Airstack backend and optimized with parallel processing for fast GraphQL querying.\n\n## Getting Started\n\n### 1. Prerequisite:\n\nYou already have a subgraph for Dapp/Protocol. And you intend to integrate Airstack schemas into the project.\n\n### 2. Install Airstack package:\n\n```npm\nnpm install @airstack/subgraph-generator\n```\n\n### 3. Identify the vertical for the Dapp/Protocol:\n\nWe support\n\n-   NFT Marketplace: `nft-marketplace`\n-   Domain Name: `domain-name`\n-   DEX: `dex`\n-   Bridges: `TBD`\n-   DAO: `TBD`\n-   Defi: `TBD`\n-   Games: `TBD`\n\nUse the following command to add Airstack Schemas and Modules in your project\n\n```npm\nnpx  @airstack/subgraph-generator <vertical>  --yaml <subgraph.yaml file path> --graphql <schema.graphql file path> --dataSourceNames <\"name1, name2, ...\"> --templates <\"name1, name2\">\n```\n\n<ul>\n<li> <b><i>npx airstack <vertical></i></b> will add the required Airstack entities and the module files in your <b>subgraph.yaml</b> file</li>\n<li> <b><i>--yaml <subgraph.yaml file path></i></b> provide the location of your project's <b>subgraph.yaml</b> file. This is an optional parameter.</li>\n<li> <b><i>--graphql <subgraph.graphql file path></i></b>provide the location of your project's <b>schema.graphql</b> file. This is an optional parameter.</li>\n<li> <b><i>--dataSourceNames <name1, name2, ...></i></b> provide the <b>dataSource</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>dataSource</b> provided in the <b>subgraph.yaml</b>.\n</li>\n<li> <b><i>--templates <name1, name2, ...></i></b> provide the <b>template</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>template</b> provided in the <b>subgraph.yaml</b>.\n</li>\n</ul>\n\n\n\n\n\n\n\n\n\n\nExamples:\n\na. NFT Marketplace\n\n```\nnpx @airstack/subgraph-generator nft-marketplace\n```\n\n#### Terminal will prompt these questions\n\n```sh\nEnter the name of the subgraph:\nEnter the version of the subgraph:\nEnter the slug of the subgraph:\n```\n\nIntegration of the Airstack schemas is done. Now, move to the vertical-specific section for further integration.\n\n### 3. Code integration\n\n#### Example: NFT Marketplace\n\n1. Import `airstack` modules\n\n```ts\nimport * as airstack from \"../modules/airstack/nft-marketplace\"\n```\n\n2. Creation of NFT object\n\n```ts\nlet nft = new airstack.nft.NFT(\n    collectionAddress, // Address\n    standard, // string \"ERC721\" or \"ERC1155\"\n    tokenId, // BigInt\n    amount // BigInt 1 for \"ERC721\" , n for \"ERC1155\"\n)\n```\n\n3. Creation of royalties array\n\n```ts\nlet royalties = new Array<airstack.nft.CreatorRoyalty>()\nlet royalty = new airstack.nft.CreatorRoyalty(\n    fee, // BigInt\n    beneficiary // Address\n)\nroyalties.push(royalty)\n```\n\n4. Creation of NFT Sales array\n\n```ts\nlet allSales = new Array<airstack.nft.Sale>()\nlet sale = new airstack.nft.Sale(\n    buyer, // Address\n    seller, // Address\n    nft, // airstack.nft.NFT\n    paymentAmount, // BigInt\n    paymentToken, // Address\n    protocolFees, // BigInt\n    protocolFeesBeneficiary, // Address\n    royalties // airstack.nft.CreatorRoyalty[]\n)\nallSales.push(sale)\n```\n\n5. Use the trackNFTSaleTransactions function to process the data and store in Airstack schema\n\n```ts\nairstack.nft.trackNFTSaleTransactions(\n    chainId, //  string eg: for mainnet: 1\n    txHash, // string eg: event.transaction.hash.toHexString()\n    txIndex, //string eg: event.transaction.index\n    allSales, // airstack.nft.Sale[]\n    isBundle, // boolean \n    protocolType, // string eg: \"NFT_MARKET_PLACE\"\n    protocolActionType, //string eg: \"SELL\"\n    timestamp, // BigInt eg: event.block.timestamp\n    blockHeight, // BigInt eg: event.block.number\n    blockHash // string eg: event.block.hash.toHexString()\n)\n```\n\n## Development status of each vertical\n\n⌛ = Prioritized<br/>\n💬 = In discussion<br/>\n🔨 = In progress implementation<br/>\n✅ = Completed<br/>\n\n| Vertical        | Status |\n| --------------- | :----: |\n| NFT Marketplace |   ✅   |\n| Domain Name     |   ✅   |\n| DEX             |   🔨   |\n| Bridges         |   💬   |\n| DAO             |   ⌛   |\n| Defi            |   ⌛   |\n| Games           |   ⌛   |\n\n## To build the module\n\nIf you want to build the module yourself, please follow there steps.\n\n1. Clone the repo\n2. Run the command\n   `npm run build`\n","readmeFilename":"README.md","gitHead":"f38c44d8381fc0a577809d82fb5dfc7ef0c9afd3","_id":"@airstack/subgraph-generator@1.0.0-alpha.6","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-DDlxkOvU47ZiWHp9jaVO3X+YjmT0zKEosxDpWnbf6gFKNIF9sTk8dwkMRAMYXSv9K/RyEYtB4SjQtY272A8wzQ==","shasum":"11aab407fda978b356fab6f66c664affb66a3453","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.0-alpha.6.tgz","fileCount":80,"unpackedSize":293347,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICEsA+jcuskYKehEDzIwxNKGn7BQ/z/Su+AdjikNlkWbAiEA+vAvqlIPci//Yy5JGe/c0GHeQZaPSS65CI+zAtTOouo="}]},"_npmUser":{"name":"0xsarvesh","email":"sarvesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"0xsarvesh","email":"sarvesh@airstack.xyz"},{"name":"aadil-airstack","email":"aadil@airstack.xyz"},{"name":"sharathkrml","email":"sharath@airstack.xyz"},{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.0-alpha.6_1697738649971_0.9620447025105463"},"_hasShrinkwrap":false},"1.0.0-alpha.7":{"name":"@airstack/subgraph-generator","version":"1.0.0-alpha.7","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag alpha --access public","build":"npm run build:package && npm pack"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"^0.47.0","@graphprotocol/graph-ts":"^0.29.3","@types/inquirer":"^9.0.3","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0","readline-sync":"^1.4.10"},"readme":"# Airstack Subgraphs\n\n## Introduction\n\nAirstack is a web3 developer platform that provides powerful APIs for integrating on-chain and off-chain data into any application. With Airstack developers are able to easily connect their applications to the web3 ecosystem. \n\nAirstack enables GraphQL queries that combine on-chain and off-chain data from multiple sources in a single response. Our goal is to enable developers to query and integrate relevant web3 data, and serve it up to users without requiring heavy infrastructure or even a back-end. \n\nAirstack identity APIs map addresses and transactions across various sources, including: ENS, Farcaster, Lens, POAP, Dapps, and Marketplaces.\n\n## Airstack Substreams & Subgraphs\n\nAirstack is a pioneer in utilizing Substreams to index on-chain transactions faster than RPC-based solutions. Substreams are used for real-time indexing of on-chain events and for high volume blockchains such as Polygon. Airstack Substreams are hosted in-house on our infra.\n\nAirstack deploys Subgraphs with custom schemas for indexing historical events and sales data from specific dapps, marketplaces and protocols. Airstack subgraphs are hosted in-house on our infra.\n\nAirstack schemas for Substreams and Subgraphs define how events and transactions are indexed, aggregated, and consumed across projects in standard formats, enabling seamless querying of like data across projects and chains. Example verticals: NFT Marketplace, Social, DAOs, DeFi.\n\nAirstack augments on-chain data with off-chain metadata from IPFS, dapps and marketplaces (for example NFT images and descriptions). Wherever possible we default to on-chain data.\n\nData is stored in the Airstack backend and optimized with parallel processing for fast GraphQL querying.\n\n## Getting Started\n\n### 1. Prerequisite:\n\nYou already have a subgraph for Dapp/Protocol. And you intend to integrate Airstack schemas into the project.\n\n### 2. Install Airstack package:\n\n```npm\nnpm install @airstack/subgraph-generator\n```\n\n### 3. Identify the vertical for the Dapp/Protocol:\n\nWe support\n\n-   NFT Marketplace: `nft-marketplace`\n-   Domain Name: `domain-name`\n-   DEX: `dex`\n-   Bridges: `TBD`\n-   DAO: `TBD`\n-   Defi: `TBD`\n-   Games: `TBD`\n\nUse the following command to add Airstack Schemas and Modules in your project\n\n```npm\nnpx  @airstack/subgraph-generator <vertical>  --yaml <subgraph.yaml file path> --graphql <schema.graphql file path> --dataSourceNames <\"name1, name2, ...\"> --templates <\"name1, name2\">\n```\n\n<ul>\n<li> <b><i>npx airstack <vertical></i></b> will add the required Airstack entities and the module files in your <b>subgraph.yaml</b> file</li>\n<li> <b><i>--yaml <subgraph.yaml file path></i></b> provide the location of your project's <b>subgraph.yaml</b> file. This is an optional parameter.</li>\n<li> <b><i>--graphql <subgraph.graphql file path></i></b>provide the location of your project's <b>schema.graphql</b> file. This is an optional parameter.</li>\n<li> <b><i>--dataSourceNames <name1, name2, ...></i></b> provide the <b>dataSource</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>dataSource</b> provided in the <b>subgraph.yaml</b>.\n</li>\n<li> <b><i>--templates <name1, name2, ...></i></b> provide the <b>template</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>template</b> provided in the <b>subgraph.yaml</b>.\n</li>\n</ul>\n\n\n\n\n\n\n\n\n\n\nExamples:\n\na. NFT Marketplace\n\n```\nnpx @airstack/subgraph-generator nft-marketplace\n```\n\n#### Terminal will prompt these questions\n\n```sh\nEnter the name of the subgraph:\nEnter the version of the subgraph:\nEnter the slug of the subgraph:\n```\n\nIntegration of the Airstack schemas is done. Now, move to the vertical-specific section for further integration.\n\n### 3. Code integration\n\n#### Example: NFT Marketplace\n\n1. Import `airstack` modules\n\n```ts\nimport * as airstack from \"../modules/airstack/nft-marketplace\"\n```\n\n2. Creation of NFT object\n\n```ts\nlet nft = new airstack.nft.NFT(\n    collectionAddress, // Address\n    standard, // string \"ERC721\" or \"ERC1155\"\n    tokenId, // BigInt\n    amount // BigInt 1 for \"ERC721\" , n for \"ERC1155\"\n)\n```\n\n3. Creation of royalties array\n\n```ts\nlet royalties = new Array<airstack.nft.CreatorRoyalty>()\nlet royalty = new airstack.nft.CreatorRoyalty(\n    fee, // BigInt\n    beneficiary // Address\n)\nroyalties.push(royalty)\n```\n\n4. Creation of NFT Sales array\n\n```ts\nlet allSales = new Array<airstack.nft.Sale>()\nlet sale = new airstack.nft.Sale(\n    buyer, // Address\n    seller, // Address\n    nft, // airstack.nft.NFT\n    paymentAmount, // BigInt\n    paymentToken, // Address\n    protocolFees, // BigInt\n    protocolFeesBeneficiary, // Address\n    royalties // airstack.nft.CreatorRoyalty[]\n)\nallSales.push(sale)\n```\n\n5. Use the trackNFTSaleTransactions function to process the data and store in Airstack schema\n\n```ts\nairstack.nft.trackNFTSaleTransactions(\n    chainId, //  string eg: for mainnet: 1\n    txHash, // string eg: event.transaction.hash.toHexString()\n    txIndex, //string eg: event.transaction.index\n    allSales, // airstack.nft.Sale[]\n    isBundle, // boolean \n    protocolType, // string eg: \"NFT_MARKET_PLACE\"\n    protocolActionType, //string eg: \"SELL\"\n    timestamp, // BigInt eg: event.block.timestamp\n    blockHeight, // BigInt eg: event.block.number\n    blockHash // string eg: event.block.hash.toHexString()\n)\n```\n\n## Development status of each vertical\n\n⌛ = Prioritized<br/>\n💬 = In discussion<br/>\n🔨 = In progress implementation<br/>\n✅ = Completed<br/>\n\n| Vertical        | Status |\n| --------------- | :----: |\n| NFT Marketplace |   ✅   |\n| Domain Name     |   ✅   |\n| DEX             |   🔨   |\n| Bridges         |   💬   |\n| DAO             |   ⌛   |\n| Defi            |   ⌛   |\n| Games           |   ⌛   |\n\n## To build the module\n\nIf you want to build the module yourself, please follow there steps.\n\n1. Clone the repo\n2. Run command`npx @airstack/subgraph-generator <vertical> --name <subgraph_name> --slug <subgraph_slug> --version <subgraph_version>`\n3. Run the command\n   `npm run build`","readmeFilename":"README.md","gitHead":"e5451ce30aa9bca2217ee5783d36233211c8fa72","_id":"@airstack/subgraph-generator@1.0.0-alpha.7","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-8qVNvdqkbqd3Q6EPkQ8K2VUbLYecZxFTZ7Awugspkcr8YiHVs94y/DBTWcZpBbOLZvvqaedbhwx4T1Cl05Ahbw==","shasum":"01150b8790d2d69e3737229d773e5dd14bd1eab8","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.0-alpha.7.tgz","fileCount":84,"unpackedSize":293255,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlG+8I6xZutxGK+J8sVvFyIZrcrDTBNRB/aM8OWJDe9wIhAJooylAcAcadN3RafrvO2AtP8xwYDdGxnb/euWWkGpRy"}]},"_npmUser":{"name":"0xsarvesh","email":"sarvesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"0xsarvesh","email":"sarvesh@airstack.xyz"},{"name":"aadil-airstack","email":"aadil@airstack.xyz"},{"name":"sharathkrml","email":"sharath@airstack.xyz"},{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.0-alpha.7_1698070193549_0.8925740227072745"},"_hasShrinkwrap":false},"1.0.0-alpha.8":{"name":"@airstack/subgraph-generator","version":"1.0.0-alpha.8","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag alpha --access public","build":"npm run build:package && npm pack"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"^0.47.0","@graphprotocol/graph-ts":"^0.29.3","@types/inquirer":"^9.0.3","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0","readline-sync":"^1.4.10"},"readme":"# Airstack Subgraphs\n\n## Introduction\n\nAirstack is a web3 developer platform that provides powerful APIs for integrating on-chain and off-chain data into any application. With Airstack developers are able to easily connect their applications to the web3 ecosystem. \n\nAirstack enables GraphQL queries that combine on-chain and off-chain data from multiple sources in a single response. Our goal is to enable developers to query and integrate relevant web3 data, and serve it up to users without requiring heavy infrastructure or even a back-end. \n\nAirstack identity APIs map addresses and transactions across various sources, including: ENS, Farcaster, Lens, POAP, Dapps, and Marketplaces.\n\n## Airstack Substreams & Subgraphs\n\nAirstack is a pioneer in utilizing Substreams to index on-chain transactions faster than RPC-based solutions. Substreams are used for real-time indexing of on-chain events and for high volume blockchains such as Polygon. Airstack Substreams are hosted in-house on our infra.\n\nAirstack deploys Subgraphs with custom schemas for indexing historical events and sales data from specific dapps, marketplaces and protocols. Airstack subgraphs are hosted in-house on our infra.\n\nAirstack schemas for Substreams and Subgraphs define how events and transactions are indexed, aggregated, and consumed across projects in standard formats, enabling seamless querying of like data across projects and chains. Example verticals: NFT Marketplace, Social, DAOs, DeFi.\n\nAirstack augments on-chain data with off-chain metadata from IPFS, dapps and marketplaces (for example NFT images and descriptions). Wherever possible we default to on-chain data.\n\nData is stored in the Airstack backend and optimized with parallel processing for fast GraphQL querying.\n\n## Getting Started\n\n### 1. Prerequisite:\n\nYou already have a subgraph for Dapp/Protocol. And you intend to integrate Airstack schemas into the project.\n\n### 2. Install Airstack package:\n\n```npm\nnpm install @airstack/subgraph-generator\n```\n\n### 3. Identify the vertical for the Dapp/Protocol:\n\nWe support\n\n-   NFT Marketplace: `nft-marketplace`\n-   Domain Name: `domain-name`\n-   DEX: `dex`\n-   Bridges: `TBD`\n-   DAO: `TBD`\n-   Defi: `TBD`\n-   Games: `TBD`\n\nUse the following command to add Airstack Schemas and Modules in your project\n\n```npm\nnpx  @airstack/subgraph-generator <vertical>  --yaml <subgraph.yaml file path> --graphql <schema.graphql file path> --dataSourceNames <\"name1, name2, ...\"> --templates <\"name1, name2\">\n```\n\n<ul>\n<li> <b><i>npx airstack <vertical></i></b> will add the required Airstack entities and the module files in your <b>subgraph.yaml</b> file</li>\n<li> <b><i>--yaml <subgraph.yaml file path></i></b> provide the location of your project's <b>subgraph.yaml</b> file. This is an optional parameter.</li>\n<li> <b><i>--graphql <subgraph.graphql file path></i></b>provide the location of your project's <b>schema.graphql</b> file. This is an optional parameter.</li>\n<li> <b><i>--dataSourceNames <name1, name2, ...></i></b> provide the <b>dataSource</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>dataSource</b> provided in the <b>subgraph.yaml</b>.\n</li>\n<li> <b><i>--templates <name1, name2, ...></i></b> provide the <b>template</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>template</b> provided in the <b>subgraph.yaml</b>.\n</li>\n</ul>\n\n\n\n\n\n\n\n\n\n\nExamples:\n\na. NFT Marketplace\n\n```\nnpx @airstack/subgraph-generator nft-marketplace\n```\n\n#### Terminal will prompt these questions\n\n```sh\nEnter the name of the subgraph:\nEnter the version of the subgraph:\nEnter the slug of the subgraph:\n```\n\nIntegration of the Airstack schemas is done. Now, move to the vertical-specific section for further integration.\n\n### 3. Code integration\n\n#### Example: NFT Marketplace\n\n1. Import `airstack` modules\n\n```ts\nimport * as airstack from \"../modules/airstack/nft-marketplace\"\n```\n\n2. Creation of NFT object\n\n```ts\nlet nft = new airstack.nft.NFT(\n    collectionAddress, // Address\n    standard, // string \"ERC721\" or \"ERC1155\"\n    tokenId, // BigInt\n    amount // BigInt 1 for \"ERC721\" , n for \"ERC1155\"\n)\n```\n\n3. Creation of royalties array\n\n```ts\nlet royalties = new Array<airstack.nft.CreatorRoyalty>()\nlet royalty = new airstack.nft.CreatorRoyalty(\n    fee, // BigInt\n    beneficiary // Address\n)\nroyalties.push(royalty)\n```\n\n4. Creation of NFT Sales array\n\n```ts\nlet allSales = new Array<airstack.nft.Sale>()\nlet sale = new airstack.nft.Sale(\n    buyer, // Address\n    seller, // Address\n    nft, // airstack.nft.NFT\n    paymentAmount, // BigInt\n    paymentToken, // Address\n    protocolFees, // BigInt\n    protocolFeesBeneficiary, // Address\n    royalties // airstack.nft.CreatorRoyalty[]\n)\nallSales.push(sale)\n```\n\n5. Use the trackNFTSaleTransactions function to process the data and store in Airstack schema\n\n```ts\nairstack.nft.trackNFTSaleTransactions(\n    chainId, //  string eg: for mainnet: 1\n    txHash, // string eg: event.transaction.hash.toHexString()\n    txIndex, //string eg: event.transaction.index\n    allSales, // airstack.nft.Sale[]\n    isBundle, // boolean \n    protocolType, // string eg: \"NFT_MARKET_PLACE\"\n    protocolActionType, //string eg: \"SELL\"\n    timestamp, // BigInt eg: event.block.timestamp\n    blockHeight, // BigInt eg: event.block.number\n    blockHash // string eg: event.block.hash.toHexString()\n)\n```\n\n## Development status of each vertical\n\n⌛ = Prioritized<br/>\n💬 = In discussion<br/>\n🔨 = In progress implementation<br/>\n✅ = Completed<br/>\n\n| Vertical        | Status |\n| --------------- | :----: |\n| NFT Marketplace |   ✅   |\n| Domain Name     |   ✅   |\n| DEX             |   🔨   |\n| Bridges         |   💬   |\n| DAO             |   ⌛   |\n| Defi            |   ⌛   |\n| Games           |   ⌛   |\n\n## To build the module\n\nIf you want to build the module yourself, please follow there steps.\n\n1. Clone the repo\n2. Run command`npx @airstack/subgraph-generator <vertical> --name <subgraph_name> --slug <subgraph_slug> --version <subgraph_version>`\n3. Run the command\n   `npm run build`","readmeFilename":"README.md","gitHead":"9bf50c63952f6d3b59b4d7612932732484fdc8ea","_id":"@airstack/subgraph-generator@1.0.0-alpha.8","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-WMBr5ikTGwfsX3AI4GWOrD6DLrvBeI/G6Q0ddaDS87BWMBhNqGB8fk5oq+xr+zYIb/igFOhxQzE5Ljd54jxPow==","shasum":"41c20e8659d6ae011722e91b6ce47984ff17fced","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.0-alpha.8.tgz","fileCount":84,"unpackedSize":302547,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBkrWt1Rkjtj82mLtwk3xUi1V4afP1arAuffJ257RXQzAiEAw/Is66OPME/1TeVuOxBdUAqwjK4+1nS+3jqZB9+yPDg="}]},"_npmUser":{"name":"0xsarvesh","email":"sarvesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"0xsarvesh","email":"sarvesh@airstack.xyz"},{"name":"aadil-airstack","email":"aadil@airstack.xyz"},{"name":"sharathkrml","email":"sharath@airstack.xyz"},{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.0-alpha.8_1698257918418_0.24298195886744023"},"_hasShrinkwrap":false},"1.0.0-alpha.9":{"name":"@airstack/subgraph-generator","version":"1.0.0-alpha.9","description":"Integrate Airstack schemas in any subgraph.","main":"modules/airstack/index","scripts":{"build:package":"tsc","lint":"eslint . --ext .ts","test":"echo \"Error: no test specified\" && exit 1","publish":"npm publish --tag latest --access public","build":"npm run build:package && npm pack"},"bin":{"airstack":"dist/bin/index.js"},"keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"author":"","license":"ISC","devDependencies":{"@types/fs-extra":"9.0.13","@types/mustache":"4.2.1","@types/node":"18.7.13","@typescript-eslint/eslint-plugin":"5.35.1","eslint":"8.22.0","eslint-config-standard-with-typescript":"22.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-n":"15.2.5","eslint-plugin-promise":"6.0.1","typescript":"4.7.4"},"dependencies":{"@graphprotocol/graph-cli":"^0.47.0","@graphprotocol/graph-ts":"^0.29.3","@types/inquirer":"^9.0.3","@types/js-yaml":"4.0.5","fs-extra":"10.1.0","js-yaml":"4.1.0","mustache":"4.2.0","readline-sync":"^1.4.10"},"gitHead":"06cbf9fc8eeef5a79c3d8315d4ece3f14dd944f9","_id":"@airstack/subgraph-generator@1.0.0-alpha.9","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-n553l4aQ8KIXQ1POxurj+xsuALnrKZLSe7bDSHFXumlanIPYSswzkXql/Fes08+f5bUREvCTwt8iFfvPuKAnRQ==","shasum":"719a8191134d38d7c4571a6ac51a53de9760d760","tarball":"https://registry.npmjs.org/@airstack/subgraph-generator/-/subgraph-generator-1.0.0-alpha.9.tgz","fileCount":84,"unpackedSize":302633,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2tJepITIImbp7L37UtDFNecz+afAAYvY+497kkfx+zgIgWFjvzq2XIMsS3VaoznooGi4vwuWb7IesZ6xNRdLBW7I="}]},"_npmUser":{"name":"0xsarvesh","email":"sarvesh@airstack.xyz"},"directories":{},"maintainers":[{"name":"0xsarvesh","email":"sarvesh@airstack.xyz"},{"name":"aadil-airstack","email":"aadil@airstack.xyz"},{"name":"sharathkrml","email":"sharath@airstack.xyz"},{"name":"deepesh-kn","email":"deepesh@airstack.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/subgraph-generator_1.0.0-alpha.9_1706700660241_0.3616984724694112"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-29T11:36:56.061Z","1.0.0-alpha.0":"2022-08-29T11:36:56.359Z","modified":"2024-02-21T17:26:50.670Z","1.0.0-alpha.1":"2022-08-29T14:33:56.885Z","1.0.0-alpha.2":"2022-08-29T15:33:40.126Z","1.0.0-alpha.3":"2022-09-05T07:02:21.967Z","1.0.0-alpha.4":"2023-03-28T18:41:52.275Z","1.0.0-alpha.5":"2023-03-28T18:44:28.705Z","1.0.1-alpha.0":"2023-03-28T18:46:58.929Z","1.0.1-alpha.1":"2023-03-28T18:53:40.431Z","1.0.2-alpha.1":"2023-05-19T17:10:49.484Z","1.0.2-alpha.2":"2023-05-19T17:17:58.900Z","1.0.0-alpha.6":"2023-10-19T18:04:10.284Z","1.0.0-alpha.7":"2023-10-23T14:09:53.793Z","1.0.0-alpha.8":"2023-10-25T18:18:38.681Z","1.0.0-alpha.9":"2024-01-31T11:31:00.483Z"},"maintainers":[{"email":"yoseph@airstack.xyz","name":"yoseph_ks"},{"email":"sarvesh@airstack.xyz","name":"0xsarvesh"},{"email":"aadil@airstack.xyz","name":"aadil-airstack"},{"email":"sharath@airstack.xyz","name":"sharathkrml"},{"email":"deepesh@airstack.xyz","name":"deepesh-kn"}],"description":"Integrate Airstack schemas in any subgraph.","keywords":["airstack","subgraph","standard","schema","graphql","web3","subgraph-generator"],"license":"ISC","readme":"# Airstack Subgraphs\n\n## Introduction\n\nAirstack is a web3 developer platform that provides powerful APIs for integrating on-chain and off-chain data into any application. With Airstack developers are able to easily connect their applications to the web3 ecosystem. \n\nAirstack enables GraphQL queries that combine on-chain and off-chain data from multiple sources in a single response. Our goal is to enable developers to query and integrate relevant web3 data, and serve it up to users without requiring heavy infrastructure or even a back-end. \n\nAirstack identity APIs map addresses and transactions across various sources, including: ENS, Farcaster, Lens, POAP, Dapps, and Marketplaces.\n\n## Airstack Substreams & Subgraphs\n\nAirstack is a pioneer in utilizing Substreams to index on-chain transactions faster than RPC-based solutions. Substreams are used for real-time indexing of on-chain events and for high volume blockchains such as Polygon. Airstack Substreams are hosted in-house on our infra.\n\nAirstack deploys Subgraphs with custom schemas for indexing historical events and sales data from specific dapps, marketplaces and protocols. Airstack subgraphs are hosted in-house on our infra.\n\nAirstack schemas for Substreams and Subgraphs define how events and transactions are indexed, aggregated, and consumed across projects in standard formats, enabling seamless querying of like data across projects and chains. Example verticals: NFT Marketplace, Social, DAOs, DeFi.\n\nAirstack augments on-chain data with off-chain metadata from IPFS, dapps and marketplaces (for example NFT images and descriptions). Wherever possible we default to on-chain data.\n\nData is stored in the Airstack backend and optimized with parallel processing for fast GraphQL querying.\n\n## Getting Started\n\n### 1. Prerequisite:\n\nYou already have a subgraph for Dapp/Protocol. And you intend to integrate Airstack schemas into the project.\n\n### 2. Install Airstack package:\n\n```npm\nnpm install @airstack/subgraph-generator\n```\n\n### 3. Identify the vertical for the Dapp/Protocol:\n\nWe support\n\n-   NFT Marketplace: `nft-marketplace`\n-   Domain Name: `domain-name`\n-   DEX: `dex`\n-   Bridges: `TBD`\n-   DAO: `TBD`\n-   Defi: `TBD`\n-   Games: `TBD`\n\nUse the following command to add Airstack Schemas and Modules in your project\n\n```npm\nnpx  @airstack/subgraph-generator <vertical>  --yaml <subgraph.yaml file path> --graphql <schema.graphql file path> --dataSourceNames <\"name1, name2, ...\"> --templates <\"name1, name2\">\n```\n\n<ul>\n<li> <b><i>npx airstack <vertical></i></b> will add the required Airstack entities and the module files in your <b>subgraph.yaml</b> file</li>\n<li> <b><i>--yaml <subgraph.yaml file path></i></b> provide the location of your project's <b>subgraph.yaml</b> file. This is an optional parameter.</li>\n<li> <b><i>--graphql <subgraph.graphql file path></i></b>provide the location of your project's <b>schema.graphql</b> file. This is an optional parameter.</li>\n<li> <b><i>--dataSourceNames <name1, name2, ...></i></b> provide the <b>dataSource</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>dataSource</b> provided in the <b>subgraph.yaml</b>.\n</li>\n<li> <b><i>--templates <name1, name2, ...></i></b> provide the <b>template</b> name where Airstack entities will be added. This is an optional parameter. By default, the entities will be added in all the <b>template</b> provided in the <b>subgraph.yaml</b>.\n</li>\n</ul>\n\n\n\n\n\n\n\n\n\n\nExamples:\n\na. NFT Marketplace\n\n```\nnpx @airstack/subgraph-generator nft-marketplace\n```\n\n#### Terminal will prompt these questions\n\n```sh\nEnter the name of the subgraph:\nEnter the version of the subgraph:\nEnter the slug of the subgraph:\n```\n\nIntegration of the Airstack schemas is done. Now, move to the vertical-specific section for further integration.\n\n### 3. Code integration\n\n#### Example: NFT Marketplace\n\n1. Import `airstack` modules\n\n```ts\nimport * as airstack from \"../modules/airstack/nft-marketplace\"\n```\n\n2. Creation of NFT object\n\n```ts\nlet nft = new airstack.nft.NFT(\n    collectionAddress, // Address\n    standard, // string \"ERC721\" or \"ERC1155\"\n    tokenId, // BigInt\n    amount // BigInt 1 for \"ERC721\" , n for \"ERC1155\"\n)\n```\n\n3. Creation of royalties array\n\n```ts\nlet royalties = new Array<airstack.nft.CreatorRoyalty>()\nlet royalty = new airstack.nft.CreatorRoyalty(\n    fee, // BigInt\n    beneficiary // Address\n)\nroyalties.push(royalty)\n```\n\n4. Creation of NFT Sales array\n\n```ts\nlet allSales = new Array<airstack.nft.Sale>()\nlet sale = new airstack.nft.Sale(\n    buyer, // Address\n    seller, // Address\n    nft, // airstack.nft.NFT\n    paymentAmount, // BigInt\n    paymentToken, // Address\n    protocolFees, // BigInt\n    protocolFeesBeneficiary, // Address\n    royalties // airstack.nft.CreatorRoyalty[]\n)\nallSales.push(sale)\n```\n\n5. Use the trackNFTSaleTransactions function to process the data and store in Airstack schema\n\n```ts\nairstack.nft.trackNFTSaleTransactions(\n    chainId, //  string eg: for mainnet: 1\n    txHash, // string eg: event.transaction.hash.toHexString()\n    txIndex, //string eg: event.transaction.index\n    allSales, // airstack.nft.Sale[]\n    isBundle, // boolean \n    protocolType, // string eg: \"NFT_MARKET_PLACE\"\n    protocolActionType, //string eg: \"SELL\"\n    timestamp, // BigInt eg: event.block.timestamp\n    blockHeight, // BigInt eg: event.block.number\n    blockHash // string eg: event.block.hash.toHexString()\n)\n```\n\n## Development status of each vertical\n\n⌛ = Prioritized<br/>\n💬 = In discussion<br/>\n🔨 = In progress implementation<br/>\n✅ = Completed<br/>\n\n| Vertical        | Status |\n| --------------- | :----: |\n| NFT Marketplace |   ✅   |\n| Domain Name     |   ✅   |\n| DEX             |   🔨   |\n| Bridges         |   💬   |\n| DAO             |   ⌛   |\n| Defi            |   ⌛   |\n| Games           |   ⌛   |\n\n## To build the module\n\nIf you want to build the module yourself, please follow there steps.\n\n1. Clone the repo\n2. Run command`npx @airstack/subgraph-generator <vertical> --name <subgraph_name> --slug <subgraph_slug> --version <subgraph_version>`\n3. Run the command\n   `npm run build`","readmeFilename":"README.md"}