This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Commitment, | |
ComputeBudgetProgram, | |
Connection, | |
Keypair, | |
PublicKey, | |
SystemProgram, | |
Transaction, | |
} from '@solana/web3.js'; | |
import * as base58 from 'bs58'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Client, { | |
CommitmentLevel, | |
SubscribeRequest, | |
SubscribeRequestFilterAccountsFilter, | |
} from "@triton-one/yellowstone-grpc"; | |
const GRPC_URL = "insert_here"; | |
const X_TOKEN = "insert_here"; | |
async function main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Run this manually onto your DB. You can use it to convert binary to base58. | |
CREATE OR REPLACE FUNCTION base58(input_bytea bytea) | |
RETURNS text AS $body$ | |
declare | |
alphabet text[] = array[ | |
'1','2','3','4','5','6','7','8','9', | |
'A','B','C','D','E','F','G','H','J','K','L','M','N','P','Q','R','S','T','U','V','W','X','Y','Z', | |
'a','b','c','d','e','f','g','h','i','j','k','m','n','o','p','q','r','s','t','u','v','w','x','y','z' | |
]; | |
cnt integer = 58; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --location 'https://rpc.helius.xyz/?api-key=$API_KEY' \ | |
--header 'Content-Type: application/json' \ | |
--data '{ | |
"jsonrpc": "2.0", | |
"id": "helius-test", | |
"method": "getAsset", | |
"params": { | |
"id": "So11111111111111111111111111111111111111112", | |
"displayOptions": { | |
"showFungible": true |