### Get Subscriptions using cURL Source: https://docs.accessprotocol.co/api Retrieves subscriptions for a specific user and pool using a cURL command. This endpoint requires the pool's public key and the user's public key as path parameters. ```shell curl https://docs.accessprotocol.co/subscriptions/__POOL_PUBKEY__/__USER_PUBKEY__ ``` -------------------------------- ### Check Subscriber Status (GET /issubscriber) Source: https://docs.accessprotocol.co/api Retrieves the subscriber status for a given pool and user. Requires poolPubkey and userPubkey as path parameters. Authentication is typically handled via Bearer token. ```HTTP GET /issubscriber/{poolPubkey}/{userPubkey} ``` -------------------------------- ### JavaScript Bindings for Access Protocol Source: https://docs.accessprotocol.co/guide Provides JavaScript bindings to interact with Access Protocol's core and transferable subscription programs on the Solana blockchain. These packages facilitate direct interaction with the protocol's smart contracts for staking, reward distribution, and subscription management. ```javascript import { Access } from "@accessprotocol/js"; import { TransferableSubscription } from "@accessprotocol/nft"; // Initialize Access Protocol JS bindings const access = new Access(); // Initialize Transferable Subscription bindings const transferableSubscription = new TransferableSubscription(); // Example: Staking ACS tokens (requires user wallet connection) // const stakeTx = await access.stakeTokens(creatorPoolAddress, amount); // Example: Unstaking ACS tokens // const unstakeTx = await access.unstakeTokens(creatorPoolAddress); // Example: Interacting with NFT subscriptions // const nftSubscription = await transferableSubscription.getSubscription(userAddress, nftContractAddress); ``` -------------------------------- ### JavaScript Bindings for Access Protocol Source: https://docs.accessprotocol.co/index Provides JavaScript bindings to interact with Access Protocol's core and transferable subscription programs on the Solana blockchain. These packages facilitate direct interaction with the protocol's smart contracts for staking, reward distribution, and subscription management. ```javascript import { Access } from "@accessprotocol/js"; import { TransferableSubscription } from "@accessprotocol/nft"; // Initialize Access Protocol JS bindings const access = new Access(); // Initialize Transferable Subscription bindings const transferableSubscription = new TransferableSubscription(); // Example: Staking ACS tokens (requires user wallet connection) // const stakeTx = await access.stakeTokens(creatorPoolAddress, amount); // Example: Unstaking ACS tokens // const unstakeTx = await access.unstakeTokens(creatorPoolAddress); // Example: Interacting with NFT subscriptions // const nftSubscription = await transferableSubscription.getSubscription(userAddress, nftContractAddress); ``` -------------------------------- ### Access Protocol Payment Gate Integration Source: https://docs.accessprotocol.co/guide The recommended method for publishers to integrate Access Protocol into their websites and web-based applications. This npm package simplifies the process of setting up paywalls and managing premium content access for subscribers. ```javascript import PaymentGate from "@accessprotocol/payment-gate"; // Initialize the Payment Gate const paymentGate = new PaymentGate({ // Configuration options for the payment gate // e.g., creatorAddress: 'YOUR_CREATOR_ADDRESS', // rpcUrl: 'YOUR_SOLANA_RPC_URL' }); // Example: Rendering a paywall component // paymentGate.renderPaywall({ // elementId: 'paywall-container', // contentId: 'premium-article-123' // }); // Example: Handling subscription events // paymentGate.on('subscriptionSuccess', (data) => { // console.log('Subscription successful:', data); // }); ``` -------------------------------- ### Access Protocol Payment Gate Integration Source: https://docs.accessprotocol.co/index The recommended method for publishers to integrate Access Protocol into their websites and web-based applications. This npm package simplifies the process of setting up paywalls and managing premium content access for subscribers. ```javascript import PaymentGate from "@accessprotocol/payment-gate"; // Initialize the Payment Gate const paymentGate = new PaymentGate({ // Configuration options for the payment gate // e.g., creatorAddress: 'YOUR_CREATOR_ADDRESS', // rpcUrl: 'YOUR_SOLANA_RPC_URL' }); // Example: Rendering a paywall component // paymentGate.renderPaywall({ // elementId: 'paywall-container', // contentId: 'premium-article-123' // }); // Example: Handling subscription events // paymentGate.on('subscriptionSuccess', (data) => { // console.log('Subscription successful:', data); // }); ``` -------------------------------- ### Access Protocol Models Source: https://docs.accessprotocol.co/api Defines the data structures used within the Access Protocol. These models represent entities such as bond accounts, stake accounts, and subscription bases. ```Go type BondAccount struct {} type BondV2Account struct {} type StakeAccount struct {} type SubscriptionBase struct {} ``` -------------------------------- ### Subscriptions Response Schema Source: https://docs.accessprotocol.co/api The JSON schema for the response when retrieving subscriptions. It includes details about assets, bond accounts, bond v2 accounts, and stake accounts associated with the subscription. ```json [ { "AssetId": "…", "BondAccounts": [ { "Amount": 1, "CreatedAt": "…", "LastClaimTimestamp": "…", "PublicKey": "…", "SubscriptionBaseID": 1, "TotalClaimedRewards": 1, "UnlockTimestamp": "…", "UpdatedAt": "…" } ], "BondV2Accounts": [ { "Amount": 1, "CreatedAt": "…", "LastClaimTimestamp": "…", "PoolMinimum": 1, "PublicKey": "…", "SubscriptionBaseID": 1, "TotalClaimedRewards": 1, "UnlockTimestamp": "…", "UpdatedAt": "…" } ], "ID": 1, "Owner": "…", "Pool": "…", "StakeAccounts": [ { "Amount": 1, "CreatedAt": "…", "LastClaimTimestamp": "…", "PoolMinimum": 1, "PublicKey": "…", "SubscriptionBaseID": 1, "TotalClaimedRewards": 1, "UpdatedAt": "…" } ] } ] ``` -------------------------------- ### Access Protocol Router Messages Source: https://docs.accessprotocol.co/api Defines message structures for the Access Protocol router, including data payloads and response types for various operations. ```Go type MsgData struct {} type NonceResponse struct {} type SubscriberTokenRequest struct {} type SubscriberTokenValidResponse struct {} type VerifySubscriberTokenRequest struct {} type VerifySubscriberTokenResponse struct {} ``` -------------------------------- ### Verify Subscriber Token (POST /subscriber_token/verify) Source: https://docs.accessprotocol.co/api Verifies an existing subscriber token. This endpoint is used to confirm the validity of a subscriber token. It likely requires the token in the request body. ```HTTP POST /subscriber_token/verify ``` -------------------------------- ### Generate Subscriber Token (POST /subscriber_token) Source: https://docs.accessprotocol.co/api Generates a subscriber token. This endpoint is used to create new tokens for subscribers. It typically requires specific payload data, though not detailed here. ```HTTP POST /subscriber_token ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.