Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@airstack/subgraph-generator
Advanced tools
Airstack 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.
Airstack 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.
Airstack identity APIs map addresses and transactions across various sources, including: ENS, Farcaster, Lens, POAP, Dapps, and Marketplaces.
Airstack 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.
Airstack 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.
Airstack 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.
Airstack 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.
Data is stored in the Airstack backend and optimized with parallel processing for fast GraphQL querying.
You already have a subgraph for Dapp/Protocol. And you intend to integrate Airstack schemas into the project.
npm install @airstack/subgraph-generator
We support
nft-marketplace
domain-name
dex
TBD
TBD
TBD
TBD
Use the following command to add Airstack Schemas and Modules in your project
npx @airstack/subgraph-generator <vertical> --yaml <subgraph.yaml file path> --graphql <schema.graphql file path> --dataSourceNames <"name1, name2, ..."> --templates <"name1, name2">
Examples:
a. NFT Marketplace
npx @airstack/subgraph-generator nft-marketplace
Enter the name of the subgraph:
Enter the version of the subgraph:
Enter the slug of the subgraph:
Integration of the Airstack schemas is done. Now, move to the vertical-specific section for further integration.
airstack
modulesimport * as airstack from "../modules/airstack/nft-marketplace"
let nft = new airstack.nft.NFT(
collectionAddress, // Address
standard, // string "ERC721" or "ERC1155"
tokenId, // BigInt
amount // BigInt 1 for "ERC721" , n for "ERC1155"
)
let royalties = new Array<airstack.nft.CreatorRoyalty>()
let royalty = new airstack.nft.CreatorRoyalty(
fee, // BigInt
beneficiary // Address
)
royalties.push(royalty)
let allSales = new Array<airstack.nft.Sale>()
let sale = new airstack.nft.Sale(
buyer, // Address
seller, // Address
nft, // airstack.nft.NFT
paymentAmount, // BigInt
paymentToken, // Address
protocolFees, // BigInt
protocolFeesBeneficiary, // Address
royalties // airstack.nft.CreatorRoyalty[]
)
allSales.push(sale)
airstack.nft.trackNFTSaleTransactions(
chainId, // string eg: for mainnet: 1
txHash, // string eg: event.transaction.hash.toHexString()
txIndex, //string eg: event.transaction.index
allSales, // airstack.nft.Sale[]
isBundle, // boolean
protocolType, // string eg: "NFT_MARKET_PLACE"
protocolActionType, //string eg: "SELL"
timestamp, // BigInt eg: event.block.timestamp
blockHeight, // BigInt eg: event.block.number
blockHash // string eg: event.block.hash.toHexString()
)
⌛ = Prioritized
💬 = In discussion
🔨 = In progress implementation
✅ = Completed
Vertical | Status |
---|---|
NFT Marketplace | ✅ |
Domain Name | ✅ |
DEX | 🔨 |
Bridges | 💬 |
DAO | ⌛ |
Defi | ⌛ |
Games | ⌛ |
If you want to build the module yourself, please follow there steps.
npx @airstack/subgraph-generator <vertical> --name <subgraph_name> --slug <subgraph_slug> --version <subgraph_version>
npm run build
FAQs
Integrate Airstack schemas in any subgraph.
We found that @airstack/subgraph-generator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.