Shred Delivery and Sender are now live! Get earliest access to raw Solana data and optimized transaction sending. Learn about Shred Delivery | Learn about Sender
简体中文
使用 gRPC 协议进行高性能、实时的 Solana 区块链数据流传输,提供高级过滤功能和超低延迟交付,专为开发者设计。
processed
confirmed
finalized
true
[ { "offset": 0, "length": 100 }, { "offset": 200, "length": 50 } ]
账户过滤器
[ { "dataSize": 165 }, { "memcmp": { "offset": 0, "bytes": "base58_encoded_bytes" } } ]
交易过滤器
区块过滤器
插槽过滤器
false
import Client, { CommitmentLevel, SubscribeRequest } from "@triton-one/yellowstone-grpc"; const client = new Client("your-grpc-endpoint", "your-api-token", { "grpc.max_receive_message_length": 64 * 1024 * 1024 }); const stream = await client.subscribe(); // Handle incoming data stream.on("data", (data) => { if (data.transaction) { console.log(`Transaction: ${data.transaction.signature}`); console.log(`Success: ${!data.transaction.meta?.err}`); } }); // Subscribe to transactions with complete request structure const subscribeRequest: SubscribeRequest = { transactions: { client: { accountInclude: [ "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", // Token Program "11111111111111111111111111111111" // System Program ], accountExclude: [], accountRequired: [], vote: false, failed: false } }, commitment: CommitmentLevel.CONFIRMED, ping: { id: 1 } }; stream.write(subscribeRequest);
此页面对您有帮助吗?