npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

payblock-node-api-sdk

v1.0.0

Published

Payblock REST API

Downloads

2

Readme

payblock-node-sdk

npm i payblock-node-api-sdk
import PayblockSDK from 'payblock-node-api-sdk';

let options = {
  publicKey: 'publicKey',
  privateKey: 'privateKey',
  walletId?: 'walletId',
  passphrase?: 'passphrase'
}
const payblock = new PayblockSDK(options)

Available Methods:

  1. Auth
Create account

let options = {
  email: string;
  password: string;
  inviterId?: string;
  roles: string[];
  agent?: string;
}

const result = await payblock.auth.register(options);
  1. Wallet
Create deposit wallet.

let options = {
  currencyId?: string;
  typeWallet?: string; // user, merchant
  privateKey?: string;
  isMnemonic?: boolean;
  setMain?: boolean;
  password?: string;
  isNew?: boolean;
}
Available Currencies: See point 5.
const wallet = await payblock.wallet.createDepositWallet(options);
Get wallet info

walletId - is required.
passphrase - is required.
const walletInfo = await payblock.wallet.getWalletInfo();
Get private key

walletId - is required.
passphrase - is required.
const pk = await payblock.wallet.getPrivateKey();
Get mnemonic

walletId - is required.
passphrase - is required.
const pk = await payblock.wallet.getMnemonic();
  1. Withdrawal
Estimate transaction fee.

let options = {
  to: string;
  amount: string;
  priority?: string;
  currencyToken?: string;
  sign?: string;
  password?: string;
  payerFeePrivateKey?: string; // Only solana
  comment?: string; //Only TON
}
walletId - is required.
passphrase - is required.
const estimateFee = await payblock.withdrawal.estimateFee(options);
Estimate nft transaction fee.

let options = {
  to: string;
  amount: string;
  contractAddress: string;
  tokenId: number;
  type: string; //erc721 or erc1155
  sign?: string;
  password?: string;
  payerFeePrivateKey?: string; // Only solana
}
walletId - is required.
passphrase - is required.
const estimateFee = await payblock.withdrawal.estimateNftFee(options);
Estimate max withdrawal.

let options = {
  to: string;
  currencyToken?: string;
  sign?: string;
  password?: string;
  payerFeePrivateKey?: string; // Only solana
  priority?: string;
}
walletId - is required.
passphrase - is required.
const max = await payblock.withdrawal.estimateMax(options);
Create withdrawal request.

let options = {
  to: string;
  amount: string;
  priority?: string;
  currencyToken?: string;
  sign?: string;
  password?: string;
  payerFeePrivateKey?: string; // Only solana
  idempotencyKey?: string;
}
walletId - is required.
passphrase - is required.
const withdrawal = await payblock.withdrawal.create(options);
Create nft withdrawal request.

let options = {
  to: string;
  amount: string;
  contractAddress: string;
  tokenId: number;
  type: string; //erc721 or erc1155
  sign?: string;
  password?: string;
  payerFeePrivateKey?: string; // Only solana
  idempotencyKey?: string;
}
walletId - is required.
passphrase - is required.
const withdrawal = await payblock.withdrawal.nftTransfer(options);
Create InternalTransfer request.

let options = {
  to: string;
  amount: string;
  idempotencyKey?: string;
}
walletId - is required.
passphrase - is required.
const withdrawal = await payblock.withdrawal.internalTransfer(options);
  1. Available merchant currencies
let options = {
}
const currencies = await payblock.currency.getAvailableCurrencies(options);
  1. Multisend
Estimate system fee.
let options = {
  currencyToken: string;
  multisendWallets: { address: string; amount: string }[];
  sign?: string;
  password?: string;
}
const estimateData = await payblock.multisend.estimateSystemFee(options);
Approve.
let options = {
  estimationId: string;
  sign?: string;
  password?: string;
  idempotencyKey?: string;
}
const approveData = await payblock.multisend.approve(options);
Estimate miner fee.
let options = {
  estimationId: string;
  sign?: string;
  password?: string;
}
const approveData = await payblock.multisend.estimateMinerFee(options);
Create multisend.
let options = {
  estimationId: string;
  sign?: string;
  password?: string;
  idempotencyKey?: string;
}
const result = await payblock.multisend.create(options);
  1. Checkout
Checkout list.

let options = {
  search?: 'string',
  sort?: string,
  order?: string,
  page?: number,
  limit?: number
}
const checkoutList = await payblock.checkout.list(options);
Create donation checkout.

let options = {
  linkImage?: string;
  linkLogoImage?: string;
  metadata?: Record<string, any>;
  accentColor?: string;
  backgroundColor?: string;
  expireTime: number,
  currencies: string[],
  collectName?: boolean,
  collectEmail?: boolean,
  description: string,
  organizationName: string,
  hideRetry?: boolean,
}

const createDonation = await payblock.checkout.createDonation(options);
Create cart checkout.

let options = {
  linkImage?: string;
  linkLogoImage?: string;
  metadata?: Record<string, any>;
  accentColor?: string;
  backgroundColor?: string;
  expireTime: number;
  currencies: string[];
  collectName?: boolean;
  collectEmail?: boolean;
  description: string;
  organizationName: string;
  cartName: string;
  fiatCurrency: string;
  hideRetry?: boolean,
}

const createDonation = await payblock.checkout.createCart(options);
Create sale checkout.

let options = {
  linkImage?: string;
  linkLogoImage?: string;
  metadata?: Record<string, any>;
  accentColor?: string;
  backgroundColor?: string;
  expireTime: number;
  currencies: string[];
  collectName?: boolean;
  collectEmail?: boolean;
  description: string;
  productName: string;
  price: string;
  fiatCurrency: string;
  hideRetry?: boolean,
}

const createSale = await payblock.checkout.createSale(options);
Create sale token checkout.

let options = {
  linkImage?: string;
  linkLogoImage?: string;
  metadata?: Record<string, any>;
  accentColor?: string;
  backgroundColor?: string;
  expireTime: number;
  currencies: string[];
  collectName: boolean;
  collectEmail: boolean;
  description: string;
  productName: string;
  price?: string;
  min: string;
  max: string;
  fiatCurrency?: string;
  fixed: string;
  tradedCurrency: string;
  tradedWallet: string;
  hideRetry?: boolean,
}

const createSaleToken = await payblock.checkout.createSaleToken(options);
Estimate sale token max value.

let options = {
  tradedWallet: string;
  tradedCurrency: string;
  checkoutId?: string;
}

const saleTokenEstimateMax = await payblock.checkout.saleTokenEstimateMax(options);
Get checkout info.

const info = await payblock.checkout.info(checkoutId: string);
Delete checkout.

const remove = await payblock.checkout.remove(checkoutId: string);
Update donation checkout.

let options = {
  linkImage?: string;
  linkLogoImage?: string;
  metadata?: Record<string, any>;
  accentColor?: string;
  backgroundColor?: string;
  expireTime: number,
  currencies: string[],
  collectName?: boolean,
  collectEmail?: boolean,
  description: string,
  organizationName: string,
  deleteImage?: boolean;
  deleteLogoImage?: boolean;
}

const updateDonation = await payblock.checkout.updateDonation(checkoutId, options);
Update sale checkout.

let options = {
  linkImage?: string;
  linkLogoImage?: string;
  metadata?: Record<string, any>;
  accentColor?: string;
  backgroundColor?: string;
  expireTime: number;
  currencies: string[];
  collectName?: boolean;
  collectEmail?: boolean;
  description: string;
  productName: string;
  price: string;
  fiatCurrency: string;
  deleteImage?: boolean;
  deleteLogoImage?: boolean;
}

const updateSale = await payblock.checkout.updateSale(checkoutId, options);
Update sale token checkout.

let options = {
  linkImage?: string;
  linkLogoImage?: string;
  metadata?: Record<string, any>;
  accentColor?: string;
  backgroundColor?: string;
  expireTime: number;
  currencies: string[];
  collectName: boolean;
  collectEmail: boolean;
  description: string;
  productName: string;
  price?: string;
  min: string;
  max: string;
  fiatCurrency?: string;
  fixed: string;
  tradedCurrency: string;
  tradedWallet: string;
  deleteImage?: boolean;
  deleteLogoImage?: boolean;
}

const updateSaleToken = await payblock.checkout.updateSaleToken(checkoutId, options);
Update cart checkout.

let options = {
  linkImage?: string;
  linkLogoImage?: string;
  metadata?: Record<string, any>;
  accentColor?: string;
  backgroundColor?: string;
  expireTime: number;
  currencies: string[];
  collectName?: boolean;
  collectEmail?: boolean;
  description: string;
  organizationName: string;
  cartName: string;
  fiatCurrency: string;
  deleteImage?: boolean;
  deleteLogoImage?: boolean;
}

const updateCart = await payblock.checkout.updateCart(checkoutId, options);
Get charges list by checkout

let options = {
  search?: 'string',
  sort?: string,
  order?: string,
  page?: number,
  limit?: number
}

const chargeList = await payblock.checkout.chargeList(checkoutId, options);
Get transactions list by checkout

typeNetwork - is required.

let options = {
  typeNetwork: string;
  search?: string;
  from?: number;
  to?: number;
  currencyId?: string;
  sort?: string;
  order?: string;
  page?: number;
  limit?: number;
  chargeId?: string;
}

const transactionsByChargeList = await payblock.checkout.chargeTransactionsList(chargeId, options);
  1. Transaction
Transaction list.
walletId - is required.
passphrase - is required.

let options = {
  search?: string;
  from?: number;
  to?: number;
  currencyId?: string;
  fromUSD?: number;
  toUSD?: number;
  type?: string;
  status?: string;
  sort?: string;
  order?: string;
  page?: number;
  limit?: number;
}
const transactionList = await payblock.transaction.list(options);
  1. External call
Read from contract.
walletId - is required.
passphrase - is required.

let options = {
  abi: Record<string, any>[];
  contractAddress: string;
  method: string;
  args?: any[];
  value?: string;
  options?: Record<string, any>;
}
const info = await payblock.externalCall.read(options);
Estimate write.
walletId - is required.
passphrase - is required.

let options = {
  abi: Record<string, any>[];
  contractAddress: string;
  method: string;
  args?: any[];
  value?: string;
  options?: Record<string, any>;
  sign?: string;
  password?: string;
}
const info = await payblock.externalCall.estimateWrite(options);
Write to the contract.
walletId - is required.
passphrase - is required.

let options = {
  abi: Record<string, any>[];
  contractAddress: string;
  method: string;
  args?: any[];
  value?: string;
  options?: Record<string, any>;
  sign?: string;
  password?: string;
  idempotencyKey?: string;
}
const info = await payblock.externalCall.write(options);
Mint Solana Nft
walletId - is required.
passphrase - is required.

let options = {
  name: string;
  description: string;
  symbol: string;
  attributes?: SolanaMetadataOptions[];
  type: SolanaNftType;
  image?: string;
  sellerFeeBasisPoints?: number;
  collectionAddress?: string;
  storage?: SolanaNftStorageType;
  collectionInfo?: SolanaCollectionInfo;
  payerFeePrivateKey?: string;
  sign?: string;
  password?: string;
  tokenOwner?: string;
  creators?: {address: string; share: number}[]
  imageLink?: srting;
}
const result = await payblock.externalCall.solana.mintNft(options);
Estimate Mint Solana Nft
walletId - is required.
passphrase - is required.

let options = {
  name: string;
  description: string;
  symbol: string;
  attributes?: SolanaMetadataOptions[];
  type: SolanaNftType;
  image: string;
  sellerFeeBasisPoints?: number;
  collectionAddress?: string;
  storage?: SolanaNftStorageType;
  collectionInfo?: SolanaCollectionInfo;
  payerFeePrivateKey?: string;
  sign?: string;
  password?: string;
  tokenOwner?: string;
  creators?: {address: string; share: number}[]
  imageLink?: srting;
}
const result = await payblock.externalCall.solana.estimateMintNft(options);
  1. Swap
Estimate swap
walletId - is not required.
passphrase - is not required.

let options = {
  fromId: string; // currencyId
  toId: string; // currencyId
  amount: string;
  sort?: string; // rate or duration
  type?: string; // fixed or float
}
const result = await payblock.swap.estimate(options);
Best offer swap
walletId - is required.
passphrase - is required.

let options = {
  fromId: string; // currencyId
  toId: string; // currencyId
  amount: string;
  type?: string; // fixed or float
}
const result = await payblock.swap.bestOffer(options);
Create swap
walletId - is required.
passphrase - is required.

let options = {
  currencyFromId: string; // currencyId
  toId: string; // walletId
  currencyToId: string; // currencyId
  amount: number;
  partner: string;
  fixed: boolean;
  rateId: string;
  sign?: string;
  password?: string;
  idempotencyKey?: string;
}
const result = await payblock.swap.create(options);
History swap
walletId - is not required.
passphrase - is not required.

let options = {
  currencyFromId?: string;
  currencyToId?: string;
  search?: string;
  sort?: string;
  order?: string;
  page?: number;
  limit?: number;
}
const result = await payblock.swap.history(options);
  1. Wallet Signature
Enable Signature
walletId - is required.
passphrase - is required.

let options = {
  sign: string;
  password?: string;
}
const result = await payblock.wallet.signature.on(options);
Disable Signature
walletId - is required.
passphrase - is required.

let options = {
  password: string;
}
const result = await payblock.wallet.signature.off(options);
Download Signature
walletId - is required.
passphrase - is required.

let options = {
  password: string;
}
const result = await payblock.wallet.signature.download(options);
Status Signature
walletId - is required.
passphrase - is required.

const result = await payblock.wallet.signature.status();
Change Password Signature
walletId - is required.
passphrase - is required.

let options = {
  oldPassword?: string;
  password: string;
}
const result = await payblock.wallet.signature.changePassword(options);
Get Status Password Signature
walletId - is required.
passphrase - is required.

const result = await payblock.wallet.signature.passwordStatus();