@triton-one/vixen-stream
v0.4.1
Published
A program parsed solana event steam.
Readme
Vixen Stream SDK
A Typescript gRPC client for Triton One's Vixen-hosted stream.
Usage
npm install @triton-one/vixen-streamimport {
ProgramStreamsServiceClient,
ProgramUpdateType,
credentials,
createCallCredentials,
ProgramAddress,
} from "@triton-one/vixen-stream";
const creds = credentials.createSsl();
// <token> is your Triton One authentication token
const callCredentials = createCallCredentials("<token>");
const combinedCredentials = credentials.combineChannelCredentials(
creds,
callCredentials
);
// <endpoint> is your Triton One RPC endpoint
const client = new ProgramStreamsServiceClient(
"<endpoint>",
combinedCredentials
);
// Subscribe to account and instruction updates for the token keg program
let stream = client.Subscribe({
program: ProgramAddress.Token,
});
// Handle the update events as you see fit. Write them to a database, call an API, or submit a Solana transaction.
stream.on("data", function (update: ProgramUpdateType<ProgramAddress.Token>) {
console.log(update);
});
stream.on("end", () => console.log("end"));
stream.on("error", (e: Error) => console.log("error: ", e));Programs
The following table lists the supported programs and their corresponding addresses. If you need support for additional programs, please reach out to Triton One support.
| Program | Address | | ----------------- | -------------------------------------------- | | Token | TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA | | Token22 | TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb | | OrcaWhirlpool | whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc | | RaydiumClmm | CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK | | Meteora | LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo | | Pumpfun | 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P | | JupiterSwap | JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 | | MeteoraAmm | cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG | | Moonshot | MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG | | PumpSwaps | pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA | | RaydiumCpmm | CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C | | RaydiumAmmv4 | 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 | | KaminoLimitOrders | LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF |
