Skip to content

Commit

Permalink
Update Documentation (#79)
Browse files Browse the repository at this point in the history
* Update README.md

* .

* Add getPriorityFeeEstimate
  • Loading branch information
0xIchigo authored Apr 16, 2024
1 parent 30da9e6 commit ac730e1
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ Comprehensive and performant API for tokens, NFTs, and compressed NFTs on Solana
- [`getAssetsByGroup()`](#getAssetsByGroup): Get a list of assets by a group key and value. This endpoint is very useful for getting the mint list for NFT Collections.
- [`getAssetsByCreator()`](#getAssetsByCreator): Get a list of assets created by an address.
- [`getAssetsByAuthority()`](#getAssetsByAuthority): Get a list of assets with a specific authority.
- [`getTokenAccounts()`](#getTokenAccounts): Get information about all token accounts for a specific mint or a specific owner.
- [`getNftEditions()`](#getNftEditions): Get information about all the edition NFTs for a specific master NFT

[**Mint API**](#mint-api)

Expand Down Expand Up @@ -121,6 +123,7 @@ Offers additional tools for various Solana-related tasks like analyzing blockcha
- [`airdrop()`](#airdrop): Request an allocation of lamports to the specified address
- [`getStakeAccounts()`](#getStakeAccounts): Returns all the stake accounts for a given public key.
- [`getTokenHolders()`](#getTokenHolders): Returns all the token accounts for a given mint address (ONLY FOR SPL TOKENS).
- [`getPriorityFeeEstimate()`](#getPriorityFeeEstimate): Returns an estimated priority fee based on a set of predefined priority levels (percentiles).

## DAS API (Digital Asset Standard)

Expand Down Expand Up @@ -270,6 +273,40 @@ const response = await helius.rpc.getAssetsByAuthority({
console.log(response.items);
```

### getTokenAccounts()

Get information about all token accounts for a specific mint or a specific owner.

```ts
const response = await helius.rpc.getTokenAccounts({
page: 1,
limit: 100,
options: {
showZeroBalance: false,
},
owner: "CckxW6C1CjsxYcXSiDbk7NYfPLhfqAm3kSB5LEZunnSE"
});

console.log(response);
```

### getNftEditions()

Get information about all the edition NFTs for a specific master NFT.

```ts
import { Helius } from "helius-sdk";

const helius = new Helius("YOUR_API_KEY");
const response = await helius.rpc.getNftEditions({
mint: "Ey2Qb8kLctbchQsMnhZs5DjY32To2QtPuXNwWvk4NosL",
page: 1,
limit: 2,
});

console.log(response);
```

## Mint

To read more about the easiest way to mint cNFTs on Solana, see [our docs](https://docs.helius.dev/compression-and-das-api/mint-api).
Expand Down Expand Up @@ -611,6 +648,23 @@ const helius = new Helius("YOUR_API_KEY");
const response = await helius.rpc.getTokenHolders("<token mint address>");
```

### getPriorityFeeEstimate()
This method considers both global and local fee markets in the estimation. Users can also specify to receive all the priority levels and adjust the window with which these levels are calculated via `lookbackSlots`

```ts
import { Helius } from "helius-sdk";
const helius = new Helius("YOUR_API_KEY");

const response = await helius.rpc.getPriorityFeeEstimate({
accountKeys: ["JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"],
options: {
includeAllPriorityFeeLevels: true,
}
});

console.log(response);
```

## helius.connection

> [!WARNING]
Expand Down

0 comments on commit ac730e1

Please sign in to comment.