@triton-one/yellowstone-grpc
Advanced tools
Comparing version 1.0.0 to 1.2.0
/** | ||
* TypeScript/JavaScript client for gRPC Geyser. | ||
*/ | ||
import { CommitmentLevel, GetLatestBlockhashResponse, GeyserClient, IsBlockhashValidResponse, SubscribeRequestAccountsDataSlice, SubscribeRequestFilterAccounts, SubscribeRequestFilterBlocks, SubscribeRequestFilterBlocksMeta, SubscribeRequestFilterEntry, SubscribeRequestFilterSlots, SubscribeRequestFilterTransactions } from "./grpc/geyser"; | ||
import { ChannelOptions } from "@grpc/grpc-js"; | ||
import { CommitmentLevel, GetLatestBlockhashResponse, GeyserClient, IsBlockhashValidResponse, SubscribeRequestAccountsDataSlice, SubscribeRequestFilterAccounts, SubscribeRequestFilterBlocks, SubscribeRequestFilterBlocksMeta, SubscribeRequestFilterEntry, SubscribeRequestFilterSlots, SubscribeRequestFilterTransactions, SubscribeUpdateTransactionInfo } from "./grpc/geyser"; | ||
export { CommitmentLevel, SubscribeRequest, SubscribeRequestAccountsDataSlice, SubscribeRequestFilterAccounts, SubscribeRequestFilterAccountsFilter, SubscribeRequestFilterAccountsFilterMemcmp, SubscribeRequestFilterAccountsFilterLamports, SubscribeRequestFilterBlocks, SubscribeRequestFilterBlocksMeta, SubscribeRequestFilterEntry, SubscribeRequestFilterSlots, SubscribeRequestFilterTransactions, SubscribeRequest_AccountsEntry, SubscribeRequest_BlocksEntry, SubscribeRequest_BlocksMetaEntry, SubscribeRequest_SlotsEntry, SubscribeRequest_TransactionsEntry, SubscribeUpdate, SubscribeUpdateAccount, SubscribeUpdateAccountInfo, SubscribeUpdateBlock, SubscribeUpdateBlockMeta, SubscribeUpdatePing, SubscribeUpdateSlot, SubscribeUpdateTransaction, SubscribeUpdateTransactionInfo, } from "./grpc/geyser"; | ||
import * as wasm from "./encoding/yellowstone_grpc_solana_encoding_wasm"; | ||
import { MapTransactionEncodingToReturnType } from "./types"; | ||
export declare const txEncode: { | ||
encoding: typeof wasm.WasmUiTransactionEncoding; | ||
encode_raw: typeof wasm.encode; | ||
encode: <T extends wasm.WasmUiTransactionEncoding>(message: SubscribeUpdateTransactionInfo, encoding: T, max_supported_transaction_version: number | undefined, show_rewards: boolean) => MapTransactionEncodingToReturnType[T]; | ||
}; | ||
export default class Client { | ||
@@ -8,0 +15,0 @@ _client: GeyserClient; |
@@ -5,13 +5,2 @@ "use strict"; | ||
*/ | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -53,35 +42,44 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
exports.__esModule = true; | ||
exports.SubscribeUpdateTransactionInfo = exports.SubscribeUpdateTransaction = exports.SubscribeUpdateSlot = exports.SubscribeUpdatePing = exports.SubscribeUpdateBlockMeta = exports.SubscribeUpdateBlock = exports.SubscribeUpdateAccountInfo = exports.SubscribeUpdateAccount = exports.SubscribeUpdate = exports.SubscribeRequest_TransactionsEntry = exports.SubscribeRequest_SlotsEntry = exports.SubscribeRequest_BlocksMetaEntry = exports.SubscribeRequest_BlocksEntry = exports.SubscribeRequest_AccountsEntry = exports.SubscribeRequestFilterTransactions = exports.SubscribeRequestFilterSlots = exports.SubscribeRequestFilterEntry = exports.SubscribeRequestFilterBlocksMeta = exports.SubscribeRequestFilterBlocks = exports.SubscribeRequestFilterAccountsFilterLamports = exports.SubscribeRequestFilterAccountsFilterMemcmp = exports.SubscribeRequestFilterAccountsFilter = exports.SubscribeRequestFilterAccounts = exports.SubscribeRequestAccountsDataSlice = exports.SubscribeRequest = exports.CommitmentLevel = void 0; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.txEncode = exports.SubscribeUpdateTransactionInfo = exports.SubscribeUpdateTransaction = exports.SubscribeUpdateSlot = exports.SubscribeUpdatePing = exports.SubscribeUpdateBlockMeta = exports.SubscribeUpdateBlock = exports.SubscribeUpdateAccountInfo = exports.SubscribeUpdateAccount = exports.SubscribeUpdate = exports.SubscribeRequest_TransactionsEntry = exports.SubscribeRequest_SlotsEntry = exports.SubscribeRequest_BlocksMetaEntry = exports.SubscribeRequest_BlocksEntry = exports.SubscribeRequest_AccountsEntry = exports.SubscribeRequestFilterTransactions = exports.SubscribeRequestFilterSlots = exports.SubscribeRequestFilterEntry = exports.SubscribeRequestFilterBlocksMeta = exports.SubscribeRequestFilterBlocks = exports.SubscribeRequestFilterAccountsFilterLamports = exports.SubscribeRequestFilterAccountsFilterMemcmp = exports.SubscribeRequestFilterAccountsFilter = exports.SubscribeRequestFilterAccounts = exports.SubscribeRequestAccountsDataSlice = exports.SubscribeRequest = exports.CommitmentLevel = void 0; | ||
var grpc_js_1 = require("@grpc/grpc-js"); | ||
// Import generated gRPC client and types. | ||
var geyser_1 = require("./grpc/geyser"); | ||
var grpc_js_1 = require("@grpc/grpc-js"); | ||
// Reexport automatically generated types | ||
var geyser_2 = require("./grpc/geyser"); | ||
__createBinding(exports, geyser_2, "CommitmentLevel"); | ||
__createBinding(exports, geyser_2, "SubscribeRequest"); | ||
__createBinding(exports, geyser_2, "SubscribeRequestAccountsDataSlice"); | ||
__createBinding(exports, geyser_2, "SubscribeRequestFilterAccounts"); | ||
__createBinding(exports, geyser_2, "SubscribeRequestFilterAccountsFilter"); | ||
__createBinding(exports, geyser_2, "SubscribeRequestFilterAccountsFilterMemcmp"); | ||
__createBinding(exports, geyser_2, "SubscribeRequestFilterAccountsFilterLamports"); | ||
__createBinding(exports, geyser_2, "SubscribeRequestFilterBlocks"); | ||
__createBinding(exports, geyser_2, "SubscribeRequestFilterBlocksMeta"); | ||
__createBinding(exports, geyser_2, "SubscribeRequestFilterEntry"); | ||
__createBinding(exports, geyser_2, "SubscribeRequestFilterSlots"); | ||
__createBinding(exports, geyser_2, "SubscribeRequestFilterTransactions"); | ||
__createBinding(exports, geyser_2, "SubscribeRequest_AccountsEntry"); | ||
__createBinding(exports, geyser_2, "SubscribeRequest_BlocksEntry"); | ||
__createBinding(exports, geyser_2, "SubscribeRequest_BlocksMetaEntry"); | ||
__createBinding(exports, geyser_2, "SubscribeRequest_SlotsEntry"); | ||
__createBinding(exports, geyser_2, "SubscribeRequest_TransactionsEntry"); | ||
__createBinding(exports, geyser_2, "SubscribeUpdate"); | ||
__createBinding(exports, geyser_2, "SubscribeUpdateAccount"); | ||
__createBinding(exports, geyser_2, "SubscribeUpdateAccountInfo"); | ||
__createBinding(exports, geyser_2, "SubscribeUpdateBlock"); | ||
__createBinding(exports, geyser_2, "SubscribeUpdateBlockMeta"); | ||
__createBinding(exports, geyser_2, "SubscribeUpdatePing"); | ||
__createBinding(exports, geyser_2, "SubscribeUpdateSlot"); | ||
__createBinding(exports, geyser_2, "SubscribeUpdateTransaction"); | ||
__createBinding(exports, geyser_2, "SubscribeUpdateTransactionInfo"); | ||
Object.defineProperty(exports, "CommitmentLevel", { enumerable: true, get: function () { return geyser_2.CommitmentLevel; } }); | ||
Object.defineProperty(exports, "SubscribeRequest", { enumerable: true, get: function () { return geyser_2.SubscribeRequest; } }); | ||
Object.defineProperty(exports, "SubscribeRequestAccountsDataSlice", { enumerable: true, get: function () { return geyser_2.SubscribeRequestAccountsDataSlice; } }); | ||
Object.defineProperty(exports, "SubscribeRequestFilterAccounts", { enumerable: true, get: function () { return geyser_2.SubscribeRequestFilterAccounts; } }); | ||
Object.defineProperty(exports, "SubscribeRequestFilterAccountsFilter", { enumerable: true, get: function () { return geyser_2.SubscribeRequestFilterAccountsFilter; } }); | ||
Object.defineProperty(exports, "SubscribeRequestFilterAccountsFilterMemcmp", { enumerable: true, get: function () { return geyser_2.SubscribeRequestFilterAccountsFilterMemcmp; } }); | ||
Object.defineProperty(exports, "SubscribeRequestFilterAccountsFilterLamports", { enumerable: true, get: function () { return geyser_2.SubscribeRequestFilterAccountsFilterLamports; } }); | ||
Object.defineProperty(exports, "SubscribeRequestFilterBlocks", { enumerable: true, get: function () { return geyser_2.SubscribeRequestFilterBlocks; } }); | ||
Object.defineProperty(exports, "SubscribeRequestFilterBlocksMeta", { enumerable: true, get: function () { return geyser_2.SubscribeRequestFilterBlocksMeta; } }); | ||
Object.defineProperty(exports, "SubscribeRequestFilterEntry", { enumerable: true, get: function () { return geyser_2.SubscribeRequestFilterEntry; } }); | ||
Object.defineProperty(exports, "SubscribeRequestFilterSlots", { enumerable: true, get: function () { return geyser_2.SubscribeRequestFilterSlots; } }); | ||
Object.defineProperty(exports, "SubscribeRequestFilterTransactions", { enumerable: true, get: function () { return geyser_2.SubscribeRequestFilterTransactions; } }); | ||
Object.defineProperty(exports, "SubscribeRequest_AccountsEntry", { enumerable: true, get: function () { return geyser_2.SubscribeRequest_AccountsEntry; } }); | ||
Object.defineProperty(exports, "SubscribeRequest_BlocksEntry", { enumerable: true, get: function () { return geyser_2.SubscribeRequest_BlocksEntry; } }); | ||
Object.defineProperty(exports, "SubscribeRequest_BlocksMetaEntry", { enumerable: true, get: function () { return geyser_2.SubscribeRequest_BlocksMetaEntry; } }); | ||
Object.defineProperty(exports, "SubscribeRequest_SlotsEntry", { enumerable: true, get: function () { return geyser_2.SubscribeRequest_SlotsEntry; } }); | ||
Object.defineProperty(exports, "SubscribeRequest_TransactionsEntry", { enumerable: true, get: function () { return geyser_2.SubscribeRequest_TransactionsEntry; } }); | ||
Object.defineProperty(exports, "SubscribeUpdate", { enumerable: true, get: function () { return geyser_2.SubscribeUpdate; } }); | ||
Object.defineProperty(exports, "SubscribeUpdateAccount", { enumerable: true, get: function () { return geyser_2.SubscribeUpdateAccount; } }); | ||
Object.defineProperty(exports, "SubscribeUpdateAccountInfo", { enumerable: true, get: function () { return geyser_2.SubscribeUpdateAccountInfo; } }); | ||
Object.defineProperty(exports, "SubscribeUpdateBlock", { enumerable: true, get: function () { return geyser_2.SubscribeUpdateBlock; } }); | ||
Object.defineProperty(exports, "SubscribeUpdateBlockMeta", { enumerable: true, get: function () { return geyser_2.SubscribeUpdateBlockMeta; } }); | ||
Object.defineProperty(exports, "SubscribeUpdatePing", { enumerable: true, get: function () { return geyser_2.SubscribeUpdatePing; } }); | ||
Object.defineProperty(exports, "SubscribeUpdateSlot", { enumerable: true, get: function () { return geyser_2.SubscribeUpdateSlot; } }); | ||
Object.defineProperty(exports, "SubscribeUpdateTransaction", { enumerable: true, get: function () { return geyser_2.SubscribeUpdateTransaction; } }); | ||
Object.defineProperty(exports, "SubscribeUpdateTransactionInfo", { enumerable: true, get: function () { return geyser_2.SubscribeUpdateTransactionInfo; } }); | ||
// Import transaction encoding function created in Rust | ||
var wasm = require("./encoding/yellowstone_grpc_solana_encoding_wasm"); | ||
exports.txEncode = { | ||
encoding: wasm.WasmUiTransactionEncoding, | ||
encode_raw: wasm.encode, | ||
encode: function (message, encoding, max_supported_transaction_version, show_rewards) { | ||
return JSON.parse(wasm.encode(geyser_1.SubscribeUpdateTransactionInfo.encode(message).finish(), encoding, max_supported_transaction_version, show_rewards)); | ||
}, | ||
}; | ||
var Client = /** @class */ (function () { | ||
@@ -144,3 +142,3 @@ function Client(endpoint, xToken, channelOptions) { | ||
commitment: commitment, | ||
accountsDataSlice: accountsDataSlice | ||
accountsDataSlice: accountsDataSlice, | ||
}, function (err) { | ||
@@ -284,2 +282,2 @@ if (err === null || err === undefined) { | ||
}()); | ||
exports["default"] = Client; | ||
exports.default = Client; |
{ | ||
"name": "@triton-one/yellowstone-grpc", | ||
"version": "1.0.0", | ||
"version": "1.2.0", | ||
"license": "Apache-2.0", | ||
@@ -32,6 +32,10 @@ "author": "Triton One", | ||
"devDependencies": { | ||
"@solana/rpc-api": "=2.0.0", | ||
"prettier": "^2.8.3", | ||
"ts-proto": "^1.139.0", | ||
"typescript": "^4.9.5" | ||
"typescript": "=5.2.2" | ||
}, | ||
"engines": { | ||
"node": ">=20.18.0" | ||
}, | ||
"files": [ | ||
@@ -38,0 +42,0 @@ "dist" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1868702
14
21193
4
2
1