BARK Whitepaper
  • Welcome
  • Executive Summary
  • Abstract
  • Disclaimer
  • About
    • The BARK Protocol
      • Business Model
        • Fee Structure
          • Benefits
      • The Vision of BARK
        • Foundation
  • Introduction
    • Transformative Technology
      • Benefits
  • Markets
    • Global Markets
      • Problem
      • Traditional Finance
        • The Role of Bots
        • Solution
        • Resources
  • Solutions
    • Verifiable Web
      • Features
        • Real-World Use Cases
          • Charitable Donation
          • Tokenized Assets
            • Real-World Asset Token
            • CNFT
              • Implementation
        • Asset Marketplace
          • Benefits
          • System Architecture
      • Advantages
    • Technology
      • Architecture
      • Benefits
  • Ecosystem
    • Strategic Planning
    • Introduction
      • BARK
      • Components
        • Governance
          • Voting
          • Participation
            • Getting Started
          • Treasury
            • Advantages
        • Underdogs
          • Development
            • Members Club´s
              • Mission Statement
                • Tiered Members
                • Responsibilities
                  • Services
              • BARKER
                • Membership
                  • Council
              • The Peaky Barkers
                • Mission
                • Brand
                  • Merchandise
              • Sparky Bros
                • Mission
                • Brand
                  • Merchandise
            • Benefits
            • Marketing
            • Participate
            • FAQ
    • Members Club´s
  • Technology
    • Architecture
      • Tokenization
        • Overview
        • BARK
          • Overview
            • Utility
            • Benefits
            • Advantages
        • BPT Token
        • BRWA: Tokenized Assets
        • BARK Protocol Token
          • Integration
    • Token Standard
      • SPL-404
      • Why Solana
  • Product
    • NFT Marketplace
      • Website
      • FAQ
    • Social Finance
      • Introduction
        • CNFT 404
      • Architecture
        • Components
      • Disbursement
        • Architecture
          • User Interface
            • Features
        • Introduction
          • Use Cases
            • Charity
            • Payments
            • Swap
          • Benefits
    • Crowdfunding Platform
      • About
      • Overview
        • Features
          • Components
            • Payments System
        • Benefits
        • Use Cases
        • Compliance
      • Development
        • Overview
          • Website
          • Application
            • Assets
          • Solana
            • Components
            • Programs
          • SUI
            • Components
          • References
        • Brand Guidelines
          • Assets
        • Roadmap
    • Blinks
      • Introduction
      • Components
    • BarkBOT
      • About
      • Features
        • API
          • Example
      • Reguirements
        • Integration
          • Blockchain
          • Programs
      • Architecture
        • Advantages
      • References
    • Commerce
      • Components
        • Backend
          • API
        • Storefront
        • Plugins
          • Payments
            • Payment Gateway
      • References
        • Tutorial
    • BarkSwap
      • Introduction
        • Architecture
        • Features
          • Benefits
    • Staking DApp
    • BARK AI Chatbot
      • Application
        • Development
          • Programs
          • NFT
            • Badges
        • FAQ
      • Architecture
        • Implementation
      • Demo
    • Token Sale Dashboard
      • Terminology
      • Benefits
  • Tokenomics
    • Tokenization
      • BARK
        • BARK (SPL20)
          • Use Cases
          • Distribution
          • Vesting & Locking Mechanism
        • BARK (Token-2022)
          • Specification
            • Important
          • Utility
            • Fees
              • Allocation
            • Staking
          • Distribution
          • Vesting
          • Emission Plan
            • Burning
              • Burning Process
        • CNFT
          • BARKER
            • Information
              • Community Token
            • Allocation
            • Swap
          • SPARKY
            • Token economy
            • Features
      • BPT
      • BRWA
  • Airdop
    • Acknowledgment
    • Overview
      • FAQ
  • Roadmap
    • Comprehensive Strategy
      • Recover & BARK Burning Plan
      • Strategic Transition to SPL-20 Token Standard
    • Milestones
      • Strategy Change
        • Airdrop One
        • Trading
          • Listing Process on DEXs
      • Exchanges
  • Community
    • Future Development
      • Treasury
        • Implementation
    • Overview
      • Governance
        • Specifications
          • Verification
        • Join BARK
      • Rewards
      • Engagement
        • Airdrops
    • FAQ
  • References
    • References
  • Developers
    • Applications
      • Blinks
        • Components
          • UI/UX Design
          • Server
            • Example
        • Actions
          • Frameworks
            • React Native
          • Referrals
          • Donate
          • Swap
          • Extensions
        • API Documentation
          • API
            • Use Cases
            • Features
            • Integration
      • Token Swap System
        • Architecture
          • Sample
          • BarkSwap API
      • BarkPaws Bot
        • Interface
          • Web3 DApp
          • Benefits
          • Improvement
      • Fundraising Platform
        • Introduction
          • Smart Contracts
            • Technical Overview
              • Contract
        • Components
          • Campaigns
            • Payments
              • Payment Processor
              • Stablecoin
                • Escrow Programs
                • Compliance
        • References
          • API
            • Documentation
    • BARK & Jupiter Swap API
      • API
    • Reward System
    • Product Owners
      • Grant Programs
  • Partnership
    • Collaboration
  • Annauncement
    • Newsletter
  • Documentation
    • Projects
      • Market Maker Bot
      • BARKER´s Club
      • Contributing
      • FairLauncher.fun
    • Investors Guide
      • Trading
  • Assets
    • Brand
      • Brand Guide
        • System Design
          • Colors Guide
        • Assets
Powered by GitBook
On this page
  1. Developers
  2. Applications
  3. Blinks

API Documentation

This documentation provides an overview of the API's capabilities, the structure of requests and responses, and the components involved. This should be useful for developers interacting with the BARK protocol via the API.

Introductions: BARK Actions Server API


Overview

The BARK "Solana" Actions Server API allows interaction with the BARK protocol on the Solana blockchain. The API includes endpoints for minting NFTs, processing donations in SOL, USDC, and BARK and SPL tokens, and provides transaction management functionality.

Base URLs

  • Production: https://api.actions.barkprotocol.net/v1

  • Development: http://localhost:3000/v1

Endpoints

1. Mint NFT

  • Endpoint: /api/mint

  • Method: POST

  • Description: Mints a new BARK NFT with custom metadata.

  • Request Body:

    {
      "name": "NFT Name",
      "symbol": "NFTSYMBOL",
      "uri": "https://example.com/metadata.json"
    }
  • Response:

    • 200 OK:

      {
        "message": "NFT minted successfully",
        "transactionId": "TransactionIDHere"
      }
    • 400 Bad Request:

      {
        "message": "Invalid request data"
      }
    • 500 Internal Server Error:

      {
        "message": "Server error during minting"
      }

2. Donate SOL

  • Endpoint: /api/donate/sol

  • Method: POST

  • Description: Processes a donation of SOL to the specified treasury address.

  • Request Body:

    {
      "account": "SolPublicKey",
      "amount": "10",
      "priority": "High"
    }
  • Response:

    • 200 OK:

      {
        "message": "You sent 10 SOL!",
        "transactionId": "TransactionIDHere"
      }
    • 400 Bad Request:

      {
        "message": "Invalid input"
      }
    • 500 Internal Server Error:

      {
        "message": "Server error during donation processing"
      }

3. Donate USDC

  • Endpoint: /api/donate/usdc

  • Method: POST

  • Description: Processes a donation of USDC to the specified treasury address.

  • Request Body:

    {
      "account": "SolPublicKey",
      "amount": "100",
      "priority": "Medium"
    }
  • Response:

    • 200 OK:

      {
        "message": "You sent 100 USDC!",
        "transactionId": "TransactionIDHere"
      }
    • 400 Bad Request:

      {
        "message": "Invalid input"
      }
    • 500 Internal Server Error:

      {
        "message": "Server error during donation processing"
      }

4. Donate BARK

  • Endpoint: /api/donate/bark

  • Method: POST

  • Description: Processes a donation of BARK tokens to the specified treasury address.

  • Request Body:

    {
      "account": "SolPublicKey",
      "amount": "5000",
      "priority": "Low"
    }
  • Response:

    • 200 OK:

      {
        "message": "You sent 5000 BARK!",
        "transactionId": "TransactionIDHere"
      }
    • 400 Bad Request:

      {
        "message": "Invalid input"
      }
    • 500 Internal Server Error:

      {
        "message": "Server error during donation processing"
      }

Components

Schemas

  1. MintNftRequest

    • Type: object

    • Properties:

      • name (string): The name of the NFT. Required.

      • symbol (string): The symbol for the NFT. Required.

      • uri (string): The URI pointing to the NFT metadata. Required.

    • Example:

      {
        "name": "NFT Name",
        "symbol": "NFTSYMBOL",
        "uri": "https://example.com/metadata.json"
      }
  2. MintNftResponse

    • Type: object

    • Properties:

      • message (string): Success message.

      • transactionId (string): The transaction ID of the mint operation.

    • Example:

      {
        "message": "NFT minted successfully",
        "transactionId": "TransactionIDHere"
      }
  3. DonateRequest

    • Type: object

    • Properties:

      • account (string): The public key of the sender's Solana account. Required.

      • amount (string): The amount of SOL, USDC, or BARK tokens to donate. Required.

      • priority (string): The priority level of the transaction. Required. (Values: VeryHigh, High, Medium, Low, Min)

    • Example:

      {
        "account": "SolPublicKey",
        "amount": "10",
        "priority": "High"
      }
  4. DonationResponse

    • Type: object

    • Properties:

      • message (string): Success message indicating the donation was processed.

      • transactionId (string): The transaction ID of the donation.

    • Example:

      {
        "message": "You sent 10 SOL!",
        "transactionId": "TransactionIDHere"
      }
  5. ErrorResponse

    • Type: object

    • Properties:

      • message (string): Error message indicating what went wrong.

    • Example:

      {
        "message": "Invalid input: ensure account is a valid public key and amount is a number"
      }

Tags

  • NFT: Operations related to NFT minting.

  • Donation: Operations related to donations in SOL, USDC, BARK, and SPL tokens.

PreviousExtensionsNextAPI

Last updated 8 months ago