AccessNode Overview
AccessNode is a powerful tool for running a self-hosted indexing node that integrates with the AccessTime core contracts. Built with Ponder, it supports both GraphQL queries and Drizzle ORM. AccessNode allows you to interact with blockchain data and build your own custom APIs and services. You can modify or add new schemas, and create a fully customized access node.
Key Features
- GraphQL Support: Query blockchain data with GraphQL for flexible data retrieval.
- Drizzle ORM: Provides a read-only client to easily connect and integrate your own services.
- Customizable: Modify or extend schemas to meet the needs of your project.
- Light and Full Modes: Choose between Light mode (focused on purchases and users) and Full mode (includes statistics, voting, and project overviews).
Indexing Modes
AccessNode supports two modes for indexing blockchain data:
- Light Mode – Primarily indexes purchase and user data. Ideal for simple implementations and smaller services.
- Full Mode – Extends Light mode by adding support for voting, statistics, and project overviews. Best for more complex integrations and analytics.
How It Works
- Drizzle ORM: Provides a read-only client that makes it easy to connect AccessNode to your blockchain data. Use Drizzle ORM to query, manipulate, or display blockchain data in your custom service.
- Ponder: AccessNode uses Ponder for schema-based management of on-chain data. You can modify the schemas or add new ones as needed for your application.
- GraphQL Queries: AccessNode exposes a GraphQL API for querying the indexed data. You can fetch all your desired data through simple GraphQL queries.
Schemas
AccessNode’s schemas define how data is indexed from blockchain contracts. They are built using Ponder and are highly customizable. Below is a brief overview of the core schemas used in AccessNode.
Core Schemas
-
AccessTime: Represents the main AccessTime contract data.
- Tracks ownership and payments.
- Stores total vote points and participant counts.
-
AccessTime User: Represents a user associated with an AccessTime contract.
- Tracks the end time and total purchased time of the user.
-
Purchase: Represents the purchase transactions made by users for AccessTime subscriptions.
- Stores the amount of the purchase, the payment method, and associated package.
-
AccessVote: Represents voting data for AccessTime contracts.
- Tracks votes and the participant count for each voting session.
-
Statistic: Represents statistical data related to AccessTime contracts.
- Stores various statistics about the contract, such as time intervals and value.
Customizing the Schemas
You can customize these schemas to meet the specific needs of your project. For example, you can:
- Add new fields to track additional data.
- Modify existing schemas to include extra logic or relationships.
- Create new tables to support additional data models.
Next Steps
Once you've reviewed the schemas, you can start your AccessNode instance in either Light or Full mode. You can also integrate your custom APIs and services using GraphQL and Drizzle ORM to interact with your blockchain data.
For more detailed guides on configuring specific schemas, refer to the CLI Setup and Indexing Modes pages.