BastyonBastyon
  • Get Started

    • Getting Started
    • Easy Node Setup Guide
    • Full Node Setup Guide
  • Monetization

    • Bastyon Monetization Guide
  • Platform Overview

    • Platform Overview
    • Contributing to Bastyon
  • Blockchain Node

    • Getting Started
    • Source Code
    • Building
    • Usage
    • RPC
  • API

    • Introduction
    • Get Started
    • RPC
    • MiniApps
  • Mini Apps

    • Getting Started
    • Permissions
    • SDK
  • Barteron

    • Barteron APIs
  • English
  • Русский
  • Get Started

    • Getting Started
    • Easy Node Setup Guide
    • Full Node Setup Guide
  • Monetization

    • Bastyon Monetization Guide
  • Platform Overview

    • Platform Overview
    • Contributing to Bastyon
  • Blockchain Node

    • Getting Started
    • Source Code
    • Building
    • Usage
    • RPC
  • API

    • Introduction
    • Get Started
    • RPC
    • MiniApps
  • Mini Apps

    • Getting Started
    • Permissions
    • SDK
  • Barteron

    • Barteron APIs
  • English
  • Русский
  • Proxy & API

    • Introduction
    • Get Started
    • Proxy RPC
    • MiniApps

Proxy RPC

Private

TODO - implement

Public

This document provides a detailed description of all available RPC methods in the PocketNetProxy class. Each method is listed with its parameters, return values, and examples of usage.

Bastyon Proxy API Reference

Available Methods

CategoryMethodDescription
AppsGetAppsRetrieves a list of applications filtered by the given criteria
GetAppScoresRetrieves scores for a list of applications
GetAppCommentsRetrieves comments related to a specific application
User & AccountGetUserProfileRetrieves the profile information of a specific user
GetUserStateRetrieves the state information of a specific user
GetUserAddressRetrieves the addresses associated with a specific username
GetUserStatisticRetrieves statistics for a specific user based on activity
GetUserSubscribesRetrieves a list of users that a specific user is subscribed to
GetUserSubscribersRetrieves a list of subscribers for a specific user
GetAccountSettingRetrieves account settings information for a given address
GetAddressIdRetrieves the unique identifier (ID) associated with a specific address
GetAddressInfoRetrieves detailed information about a specific address
GetAddressRegistrationRetrieves the registration status for multiple addresses
GetBalanceHistoryRetrieves the balance history for a list of addresses
GetAccountEarningRetrieves the earning details of a specific account
GetAccountEarningStatsRetrieves detailed statistics on account earnings
Content & SocialGetContentRetrieves content based on provided hashes and address
GetContentsRetrieves content posted by a specific address
GetCommentsRetrieves comments related to a specific post
GetLastCommentsRetrieves the most recent comments from the network
GetAccountContentsRetrieves contents associated with a specific account
GetAccountCommentsRetrieves comments associated with a specific account
GetAccountPostsRetrieves posts associated with a specific account
GetAccountFollowersRetrieves a list of followers for a specific account
GetAccountFollowingsRetrieves a list of accounts that a specific user is following
GetAccountBlockingsRetrieves information about accounts blocked by a specific user
GetAccountBlockersRetrieves information about accounts that have blocked a specific user
GetBansRetrieves the ban status of a specific user
GetTagsRetrieves a list of tags used within the network
ScoringGetAddressScoresRetrieves scores related to a specific address and posts
GetPostScoresRetrieves scores for a specific post
GetPageScoresRetrieves scores for multiple posts and comments
BlockchainGetBlockRetrieves detailed information about a specific block
GetBlockCountRetrieves the current block count in the network
GetBlockHashRetrieves the block hash for a given block number
GetBlockTemplateRetrieves a block template for mining purposes
GetBlockTransactionsRetrieves transactions in a specific block
GetCompactBlockRetrieves compact block data
GetBlockRewardRetrieves reward information for a specific block
GetBlockchainInfoRetrieves state of the blockchain
GetBlockSubsidyRetrieves block subsidy information
GetBestBlockHashRetrieves the most recent block hash
GetChainTipsRetrieves chain tips information
VerifyChainVerifies the integrity of the blockchain
TransactionsGetTransactionRetrieves transaction information
GetRawTransactionRetrieves raw transaction data
DecodeRawTransactionDecodes raw transaction data
GetAddressTransactionsRetrieves transactions for an address
AddTransactionAdds a new transaction
GenerateTransactionGenerates a new transaction
TxUnspentRetrieves unspent transaction outputs
GetTxOutRetrieves UTXO information
GetTxOutProofRetrieves UTXO proof
VerifyTxOutProofVerifies UTXO proof
Network & NodeGetNodeInfoRetrieves information about the current node
GetPeerInfoRetrieves information about connected peers
GetNetworkInfoRetrieves network status and nodes information
GetNetworkHashrateRetrieves current network hash rate
GetTimeRetrieves current network time
GetCoinInfoRetrieves general coin information
GetMempoolInfoRetrieves memory pool state
GetRawMempoolRetrieves transactions in memory pool
GetDifficultyRetrieves current network difficulty
Staking & MiningGetPosDifficultyRetrieves Proof-of-Stake difficulty
GetNetworkStakeWeightRetrieves current stake weight
GetStakingStatusRetrieves staking status
GetMintingInfoRetrieves minting information
Jury SystemGetJuryRetrieves specific jury information
GetAllJuryRetrieves all juries in network
GetJuryAssignedRetrieves jury assignments
GetJuryModeratorsRetrieves jury moderators
GetJuryVotesRetrieves jury votes
GetJuryBalanceRetrieves jury balance
GetJuryListRetrieves jury list
GetJuryRewardRetrieves jury rewards
GetJuryVotesCountRetrieves vote counts
GetModeratorStatisticsRetrieves moderator activity statistics
Search & DiscoverySearchSearches content by keywords and type
SearchUsersSearches users by criteria
SearchLinksSearches content by links
Wallet & ValidationGetWalletInfoRetrieves wallet information
ValidateAddressValidates network address
CheckStringTypeChecks string type in network context
System InfoGetMissedInfoRetrieves missed blocks and transactions

Apps Category

GetApps

Retrieves a list of applications filtered by given criteria.

Parameters

interface GetAppsParams {
    request: string;  // Request string containing filter criteria for apps
}

Usage

const response = await api.rpc.getapps({
    request: "featured_apps"
} satisfies GetAppsParams);

GetAppScores

Retrieves scoring information for applications.

Parameters

interface GetAppScoresParams {
    request: string;  // Request string specifying which app scores to retrieve
}

Usage

const response = await api.rpc.getappscores({
    request: "app_scores"
} satisfies GetAppScoresParams);

GetAppComments

Retrieves comments associated with a specific application.

Parameters

interface GetAppCommentsParams {
    request: string;  // Request string specifying which app comments to retrieve
}

Usage

const response = await api.rpc.getappcomments({
    request: "app_comments"
} satisfies GetAppCommentsParams);

User & Account Management

GetUserProfile

Retrieves detailed profile information for a specific user.

Parameters

interface GetUserProfileParams {
    address: string;    // Blockchain address of the user
    shortForm: string;  // Format of the response ("basic" or "detailed")
}

Usage

const response = await api.rpc.getuserprofile({
    address: "user_blockchain_address",
    shortForm: "basic"
} satisfies GetUserProfileParams);

GetUserState

Retrieves current state information for a specific user.

Parameters

interface GetUserStateParams {
    address: string;  // Blockchain address of the user
}

Usage

const response = await api.rpc.getuserstate({
    address: "user_blockchain_address"
} satisfies GetUserStateParams);

GetUserAddress

Retrieves blockchain addresses associated with a username.

Parameters

interface GetUserAddressParams {
    user_name: string;  // Username to look up
    count: number;      // Number of addresses to return
}

Usage

const response = await api.rpc.getuseraddress({
    user_name: "username",
    count: 1
} satisfies GetUserAddressParams);

GetUserStatistic

Retrieves statistical information about user activity.

Parameters

interface GetUserStatisticParams {
    addresses: string[];  // Array of blockchain addresses
    height: number;       // Block height for statistics
    depthR: number;      // Rating depth to include
    depthC: number;      // Comments depth to include
    cntC: number;        // Number of comments to include
}

Usage

const response = await api.rpc.getuserstatistic({
    addresses: ["address1", "address2"],
    height: 1000,
    depthR: 10,
    depthC: 10,
    cntC: 5
} satisfies GetUserStatisticParams);

GetAddressId

Retrieves the unique identifier associated with an address.

Parameters

interface GetAddressIdParams {
    address: string;  // Blockchain address
    id: number;      // Unique identifier
}

Usage

const response = await api.rpc.getaddressid({
    address: "blockchain_address",
    id: 12345
} satisfies GetAddressIdParams);

Content & Social Features

GetContent

Retrieves specific content using provided hashes.

Parameters

interface GetContentParams {
    hashes: string[];    // Array of content hashes to retrieve
    address: string;     // User's blockchain address
    last: boolean;       // Whether to get only the latest content
}

Usage

const response = await api.rpc.getcontent({
    hashes: ["hash1", "hash2"],
    address: "user_address",
    last: true
} satisfies GetContentParams);

GetContents

Retrieves all content for a specific address.

Parameters

interface GetContentsParams {
    address: string;    // User's blockchain address
}

Usage

const response = await api.rpc.getcontents({
    address: "user_address"
} satisfies GetContentsParams);

GetComments

Retrieves comments for a specific post.

Parameters

interface GetCommentsParams {
    postid: number;           // ID of the post
    parentid?: number;        // Optional parent comment ID for threaded comments
    address?: string;         // Optional: filter by commenter address
    commend_ids?: string[];   // Optional: specific comment IDs to retrieve
}

Usage

const response = await api.rpc.getcomments({
    postid: 12345,
    parentid: 0,
    address: "commenter_address"
} satisfies GetCommentsParams);

GetLastComments

Retrieves the most recent comments from the network.

Parameters

interface GetLastCommentsParams {
    count: number;    // Number of recent comments to retrieve
}

Usage

const response = await api.rpc.getlastcomments({
    count: 10
} satisfies GetLastCommentsParams);

GetAccountContents

Retrieves all content associated with an account.

Parameters

interface GetAccountContentsParams {
    address: string;     // Account's blockchain address
    orderby: string;     // Field to order results by
    orderdesc: boolean;  // Order direction
    offset: number;      // Pagination offset
    limit: number;       // Results per page
}

Usage

const response = await api.rpc.getaccountcontents({
    address: "user_address",
    orderby: "date",
    orderdesc: true,
    offset: 0,
    limit: 20
} satisfies GetAccountContentsParams);

GetAccountComments

Retrieves all comments made by an account.

Parameters

interface GetAccountCommentsParams {
    address: string;     // Account's blockchain address
    orderby: string;     // Field to order results by
    orderdesc: boolean;  // Order direction
    offset: number;      // Pagination offset
    limit: number;       // Results per page
}

Usage

const response = await api.rpc.getaccountcomments({
    address: "user_address",
    orderby: "date",
    orderdesc: true,
    offset: 0,
    limit: 20
} satisfies GetAccountCommentsParams);

GetAccountFollowers

Retrieves list of account followers.

Parameters

interface GetUserSubscribesParams {
    address: string;     // Account's blockchain address
    orderby: string;     // Field to order results by
    orderdesc: boolean;  // Order direction
    offset: number;      // Pagination offset
    limit: number;       // Results per page
}

Usage

const response = await api.rpc.getaccountfollowers({
    address: "user_address",
    orderby: "date",
    orderdesc: true,
    offset: 0,
    limit: 20
} satisfies GetUserSubscribesParams);

GetAccountFollowings

Retrieves list of accounts being followed.

Parameters

interface GetUserSubscribesParams {
    address: string;     // Account's blockchain address
    orderby: string;     // Field to order results by
    orderdesc: boolean;  // Order direction
    offset: number;      // Pagination offset
    limit: number;       // Results per page
}

Usage

const response = await api.rpc.getaccountfollowings({
    address: "user_address",
    orderby: "date",
    orderdesc: true,
    offset: 0,
    limit: 20
} satisfies GetUserSubscribesParams);

Scoring Features

GetAddressScores

Retrieves scores associated with an address.

Parameters

interface GetAddressScoresParams {
    address: string;      // User's blockchain address
    postHashes: string[]; // Array of post hashes to get scores for
}

Usage

const response = await api.rpc.getaddressscores({
    address: "user_address",
    postHashes: ["hash1", "hash2"]
} satisfies GetAddressScoresParams);

Blockchain Operations

GetBlock

Retrieves detailed information about a specific block.

Parameters

interface GetCompactBlockParams {
    blockhash: string;    // Hash of the block to retrieve
    blocknumber: number;  // Block number to retrieve
}

Usage

const response = await api.rpc.getblock({
    blockhash: "block_hash_string",
    blocknumber: 12345
} satisfies GetCompactBlockParams);

GetBlockCount

Retrieves the current block count in the network.

Parameters

interface GetUserSubscribesParams {
    address: string;     // Required for authentication
    orderby: string;     // Ordering field
    orderdesc: boolean;  // Order direction
    offset: number;      // Pagination offset
    limit: number;       // Results per page
}

Usage

const response = await api.rpc.getblockcount({
    address: "user_address",
    orderby: "height",
    orderdesc: true,
    offset: 0,
    limit: 1
} satisfies GetUserSubscribesParams);

GetBlockHash

Retrieves the block hash for a given block number.

Parameters

interface GetCompactBlockParams {
    blockhash: string;    // Previous block hash
    blocknumber: number;  // Block number to get hash for
}

Usage

const response = await api.rpc.getblockhash({
    blockhash: "previous_block_hash",
    blocknumber: 12345
} satisfies GetCompactBlockParams);

GetBlockTemplate

Retrieves a block template for mining purposes.

Parameters

interface GetCompactBlockParams {
    blockhash: string;    // Previous block hash
    blocknumber: number;  // Block number for template
}

Usage

const response = await api.rpc.getblocktemplate({
    blockhash: "previous_block_hash",
    blocknumber: 12345
} satisfies GetCompactBlockParams);

GetBlockchainInfo

Retrieves detailed information about the state of the blockchain.

Parameters

interface GetPosDifficultyParams {
    height?: number;  // Optional: specific block height to query
}

Usage

const response = await api.rpc.getblockchaininfo({
    height: 12345
} satisfies GetPosDifficultyParams);

Transaction Operations

GetTransaction

Retrieves detailed information about a specific transaction.

Parameters

interface GetCompactBlockParams {
    blockhash: string;    // Block hash containing the transaction
    blocknumber: number;  // Block number containing the transaction
}

Usage

const response = await api.rpc.gettransaction({
    blockhash: "block_hash",
    blocknumber: 12345
} satisfies GetCompactBlockParams);

GetRawTransaction

Retrieves raw transaction data.

Parameters

interface GetCompactBlockParams {
    blockhash: string;    // Block hash containing the transaction
    blocknumber: number;  // Block number containing the transaction
}

Usage

const response = await api.rpc.getrawtransaction({
    blockhash: "block_hash",
    blocknumber: 12345
} satisfies GetCompactBlockParams);

AddTransaction

Adds a new transaction to the network.

Parameters

interface AddTransactionParams {
    param1: string;           // Transaction parameter
    param2: Record<string, any>;  // Additional transaction details
}

Usage

const response = await api.rpc.addtransaction({
    param1: "transaction_data",
    param2: {
        // Transaction details
        type: "transfer",
        amount: 100
    }
} satisfies AddTransactionParams);

GenerateTransaction

Generates a new transaction based on provided details.

Parameters

interface GenerateTransactionParams {
    address: string;          // Sender's address
    privkeys: string[];      // Array of private keys
    outcount: number;        // Number of outputs
    type: string;            // Transaction type
    payload: Record<string, any>;  // Transaction payload
    fee: number;             // Transaction fee
    contentaddress: number;  // Content address
    confirmations: number;   // Required confirmations
    locktime: number;        // Transaction locktime
}

Usage

const response = await api.rpc.generatetransaction({
    address: "sender_address",
    privkeys: ["key1", "key2"],
    outcount: 1,
    type: "transfer",
    payload: { /* transaction details */ },
    fee: 0.001,
    contentaddress: 0,
    confirmations: 6,
    locktime: 0
} satisfies GenerateTransactionParams);

Network Operations

GetNodeInfo

Retrieves information about the current node.

Parameters

interface GetNodeInfoParams {
    // No parameters required
}

Usage

const response = await api.rpc.getnodeinfo();

GetPeerInfo

Retrieves information about connected peers in the network.

Parameters

interface GetPeerInfoParams {
    // No parameters required
}

Usage

const response = await api.rpc.getpeerinfo();

GetNetworkInfo

Retrieves network status and node information.

Parameters

interface GetUserSubscribesParams {
    address: string;     // Required for authentication
    orderby: string;     // Ordering field
    orderdesc: boolean;  // Order direction
    offset: number;      // Pagination offset
    limit: number;       // Results per page
}

Usage

const response = await api.rpc.getnetworkinfo({
    address: "user_address",
    orderby: "status",
    orderdesc: true,
    offset: 0,
    limit: 20
} satisfies GetUserSubscribesParams);

GetNetworkHashrate

Retrieves the current network hash rate.

Parameters

interface GetUserSubscribesParams {
    address: string;     // Required for authentication
    orderby: string;     // Ordering field
    orderdesc: boolean;  // Order direction
    offset: number;      // Pagination offset
    limit: number;       // Results per page
}

Usage

const response = await api.rpc.getnetworkhashrate({
    address: "user_address",
    orderby: "hashrate",
    orderdesc: true,
    offset: 0,
    limit: 1
} satisfies GetUserSubscribesParams);

Jury System

GetJury

Retrieves information about a specific jury.

Parameters

interface GetJuryParams {
    jury: string;  // Jury identifier
}

Usage

const response = await api.rpc.getjury({
    jury: "jury_id"
} satisfies GetJuryParams);

GetAllJury

Retrieves information about all juries in the network.

Parameters

interface GetAllJuryParams {
    // No parameters required
}

Usage

const response = await api.rpc.getalljury();

GetJuryAssigned

Retrieves jury assignments for a specific user.

Parameters

interface GetJuryAssignedParams {
    address: string;     // Moderator's address
    verdict: boolean;    // Verdict filter
    topHeight: number;   // Maximum block height
    pageStart: number;   // Pagination start
    pageSize: number;    // Items per page
    orderBy: string;     // Sort field
    desc: boolean;       // Sort direction
}

Usage

const response = await api.rpc.getjuryassigned({
    address: "moderator_address",
    verdict: true,
    topHeight: 12345,
    pageStart: 0,
    pageSize: 10,
    orderBy: "date",
    desc: true
} satisfies GetJuryAssignedParams);

GetJuryModerators

Retrieves list of moderators for a specific jury.

Parameters

interface GetJuryModeratorsParams {
    jury: string;  // Jury identifier
}

Usage

const response = await api.rpc.getjurymoderators({
    jury: "jury_id"
} satisfies GetJuryModeratorsParams);

GetJuryVotes

Retrieves voting information for a specific jury.

Parameters

interface GetJuryParams {
    jury: string;  // Jury identifier
}

Usage

const response = await api.rpc.getjuryvotes({
    jury: "jury_id"
} satisfies GetJuryParams);

Search & Discovery

Search

Searches for content within the network.

Parameters

interface SearchParams {
    keyword: string;      // Search keyword
    type: string;        // Content type to search
    topBlock?: number;   // Optional: maximum block height
    pageStart?: number;  // Optional: pagination start
    pageSize?: number;   // Optional: items per page
    address?: string;    // Optional: address filter
}

Usage

const response = await api.rpc.search({
    keyword: "search_term",
    type: "content",
    pageSize: 20,
    pageStart: 0
} satisfies SearchParams);

SearchUsers

Searches for users based on criteria.

Parameters

interface SearchUsersParams {
    keyword: string;      // Search keyword
    fieldtype: string;    // Field to search in
    orderbyrank: number;  // Ranking order
}

Usage

const response = await api.rpc.searchusers({
    keyword: "username",
    fieldtype: "name",
    orderbyrank: 1
} satisfies SearchUsersParams);

SearchLinks

Searches for content based on links.

Parameters

interface SearchLinksParams {
    links: string;         // Links to search for
    contenttypes: string[];  // Content types to include
    height: number;        // Block height limit
    count: number;         // Number of results
}

Usage

const response = await api.rpc.searchlinks({
    links: "link_pattern",
    contenttypes: ["post", "comment"],
    height: 12345,
    count: 20
} satisfies SearchLinksParams);
Last Updated:
Contributors: Andy Oknen, gked
Prev
Get Started
Next
MiniApps