sol-parser-sdk-nodejs 0.3.0 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +24 -0
- package/README.md +100 -352
- package/README_CN.md +107 -253
- package/dist/accounts/mod.d.ts +3 -0
- package/dist/accounts/mod.js +18 -1
- package/dist/accounts/pumpfun.d.ts +6 -0
- package/dist/accounts/pumpfun.js +157 -0
- package/dist/accounts/rpc_wallet.d.ts +5 -0
- package/dist/accounts/rpc_wallet.js +18 -0
- package/dist/accounts/rust_aliases.d.ts +10 -0
- package/dist/accounts/rust_aliases.js +21 -0
- package/dist/accounts/wallet_resolve.d.ts +1 -0
- package/dist/accounts/wallet_resolve.js +28 -0
- package/dist/common/constants.d.ts +10 -0
- package/dist/common/constants.js +13 -0
- package/dist/core/account_dispatcher_rpc.js +26 -5
- package/dist/core/account_fill_meteora.d.ts +4 -2
- package/dist/core/account_fill_meteora.js +5 -2
- package/dist/core/account_fill_pumpfun.js +17 -0
- package/dist/core/account_pubkey_cache.d.ts +12 -0
- package/dist/core/account_pubkey_cache.js +26 -0
- package/dist/core/clock.d.ts +6 -0
- package/dist/core/clock.js +13 -0
- package/dist/core/dex_event.d.ts +172 -44
- package/dist/core/metadata.d.ts +1 -0
- package/dist/core/pumpfun_fee_enrich.d.ts +4 -0
- package/dist/core/pumpfun_fee_enrich.js +80 -0
- package/dist/core/unified_parser.d.ts +2 -2
- package/dist/core/unified_parser.js +8 -6
- package/dist/grpc/client.d.ts +32 -1
- package/dist/grpc/client.js +400 -64
- package/dist/grpc/event_parser.d.ts +6 -0
- package/dist/grpc/event_parser.js +15 -0
- package/dist/grpc/geyser_connect.d.ts +30 -0
- package/dist/grpc/geyser_connect.js +40 -0
- package/dist/grpc/log_instr_dedup.d.ts +2 -0
- package/dist/grpc/log_instr_dedup.js +330 -0
- package/dist/grpc/order_buffer.d.ts +27 -0
- package/dist/grpc/order_buffer.js +166 -0
- package/dist/grpc/program_ids.d.ts +26 -0
- package/dist/grpc/program_ids.js +55 -0
- package/dist/grpc/rpc_to_grpc.d.ts +18 -0
- package/dist/grpc/rpc_to_grpc.js +127 -0
- package/dist/grpc/subscribe_builder.d.ts +13 -0
- package/dist/grpc/subscribe_builder.js +66 -0
- package/dist/grpc/transaction_meta.d.ts +29 -0
- package/dist/grpc/transaction_meta.js +208 -0
- package/dist/grpc/types.d.ts +57 -2
- package/dist/grpc/types.js +199 -7
- package/dist/grpc/yellowstone_parse.d.ts +8 -1
- package/dist/grpc/yellowstone_parse.js +27 -11
- package/dist/index.d.ts +39 -8
- package/dist/index.js +184 -2
- package/dist/instr/bonk_ix.d.ts +4 -1
- package/dist/instr/bonk_ix.js +106 -27
- package/dist/instr/meteora_damm_ix.d.ts +4 -2
- package/dist/instr/meteora_damm_ix.js +248 -13
- package/dist/instr/mod.d.ts +1 -0
- package/dist/instr/mod.js +16 -3
- package/dist/instr/orca_whirlpool_ix.d.ts +4 -1
- package/dist/instr/orca_whirlpool_ix.js +45 -16
- package/dist/instr/program_ids.d.ts +7 -13
- package/dist/instr/program_ids.js +20 -15
- package/dist/instr/pump_fees_ix.d.ts +2 -0
- package/dist/instr/pump_fees_ix.js +166 -0
- package/dist/instr/pumpfun_ix.js +57 -0
- package/dist/instr/pumpswap_ix.d.ts +1 -1
- package/dist/instr/pumpswap_ix.js +78 -57
- package/dist/instr/raydium_amm_v4_ix.d.ts +1 -1
- package/dist/instr/raydium_amm_v4_ix.js +94 -28
- package/dist/instr/raydium_clmm_ix.d.ts +1 -1
- package/dist/instr/raydium_clmm_ix.js +84 -30
- package/dist/instr/raydium_cpmm_ix.d.ts +1 -1
- package/dist/instr/raydium_cpmm_ix.js +46 -12
- package/dist/instr/rust_aliases.d.ts +8 -0
- package/dist/instr/rust_aliases.js +16 -0
- package/dist/instr/utils.d.ts +1 -1
- package/dist/instr/utils.js +2 -1
- package/dist/logs/discriminator_lut.d.ts +19 -0
- package/dist/logs/discriminator_lut.js +62 -0
- package/dist/logs/meteora_damm.d.ts +3 -4
- package/dist/logs/meteora_damm.js +3 -369
- package/dist/logs/optimized_matcher.d.ts +2 -2
- package/dist/logs/optimized_matcher.js +123 -23
- package/dist/logs/program_log_discriminators.d.ts +10 -0
- package/dist/logs/program_log_discriminators.js +10 -0
- package/dist/logs/pump.d.ts +2 -0
- package/dist/logs/pump.js +51 -4
- package/dist/logs/pump_fees.d.ts +23 -0
- package/dist/logs/pump_fees.js +364 -0
- package/dist/logs/rust_aliases.d.ts +6 -0
- package/dist/logs/rust_aliases.js +13 -0
- package/dist/rpc_parser.d.ts +1 -0
- package/dist/rpc_parser.js +4 -1
- package/dist/rpc_transaction.d.ts +2 -0
- package/dist/rpc_transaction.js +14 -6
- package/dist/shredstream/alt_lookup.d.ts +9 -0
- package/dist/shredstream/alt_lookup.js +70 -0
- package/dist/shredstream/client.d.ts +62 -0
- package/dist/shredstream/client.js +399 -0
- package/dist/shredstream/config.d.ts +30 -0
- package/dist/shredstream/config.js +34 -0
- package/dist/shredstream/entries_decode.d.ts +28 -0
- package/dist/shredstream/entries_decode.js +251 -0
- package/dist/shredstream/index.d.ts +17 -0
- package/dist/shredstream/index.js +33 -0
- package/dist/shredstream/instruction_parse.d.ts +34 -0
- package/dist/shredstream/instruction_parse.js +49 -0
- package/dist/shredstream/proto_types.d.ts +9 -0
- package/dist/shredstream/proto_types.js +2 -0
- package/dist/shredstream/shredstream.proto +15 -0
- package/dist/shredstream/wire_to_shred_tx.d.ts +2 -0
- package/dist/shredstream/wire_to_shred_tx.js +59 -0
- package/package.json +28 -11
package/dist/index.js
CHANGED
|
@@ -33,12 +33,30 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
36
|
+
exports.pubkey_bytes_to_bs58 = exports.tryYellowstoneSignature = exports.collectWatchTransferCounterpartyPairs = exports.splTokenCounterpartyByOwner = exports.tokenBalanceRawAmount = exports.heuristicSolCounterpartiesForWatchedKeys = exports.lamportBalanceDeltas = exports.collectAccountKeysBs58 = exports.pubkeyBytesToBs58 = exports.grpcTxIndexFromInfo = exports.parseDexEventsFromGrpcTransactionInfo = exports.convert_rpc_to_grpc = exports.convertRpcToGrpc = exports.applyAccountFillsToLogEvents = exports.fillDataRpc = exports.fillAccountsFromTransactionDataRpc = exports.parseRpcTransaction = exports.parseTransactionFromRpc = exports.isWarmedUp = exports.warmupParser = exports.build_account_pubkeys_with_cache = exports.buildAccountPubkeysWithCache = exports.AccountPubkeyCache = exports.elapsedMicrosSince = exports.nowNanos = exports.nowMicros = exports.nowUs = exports.parse_log = exports.parseLog = exports.parseTransactionWithStreamingListener = exports.parseLogsStreaming = exports.parseTransactionEventsStreaming = exports.parseTransactionWithListener = exports.parseLogsOnly = exports.parseTransactionEvents = exports.enrichPumpfunSameTxPostMerge = exports.enrichPumpfunTradesFromCreateInstructions = exports.enrichCreateV2ObservedFeeRecipient = exports.formatParseError = exports.dexEventToJsonString = exports.bigintToJsonReplacer = exports.defaultPubkey = exports.metadataForDexEvent = exports.SLOW_PROCESSING_THRESHOLD_US = exports.DEFAULT_REQUEST_TIMEOUT = exports.DEFAULT_METRICS_WINDOW_SECONDS = exports.DEFAULT_METRICS_PRINT_INTERVAL_SECONDS = exports.DEFAULT_MAX_DECODING_MESSAGE_SIZE = exports.DEFAULT_CONNECT_TIMEOUT = exports.DEFAULT_CHANNEL_SIZE = void 0;
|
|
37
|
+
exports.protocol_program_ids = exports.accountFilterForProtocols = exports.transactionFilterForProtocols = exports.getProgramIdsForProtocols = exports.METEORA_DLMM_PROGRAM_ID = exports.METEORA_DAMM_V2_PROGRAM_ID = exports.METEORA_POOLS_PROGRAM_ID = exports.ORCA_WHIRLPOOL_PROGRAM_ID = exports.RAYDIUM_AMM_V4_PROGRAM_ID = exports.RAYDIUM_CLMM_PROGRAM_ID = exports.RAYDIUM_CPMM_PROGRAM_ID = exports.BONK_PROGRAM_ID = exports.PUMP_FEES_PROGRAM_ID = exports.PUMPSWAP_FEES_PROGRAM_ID = exports.PUMPSWAP_PROGRAM_ID = exports.PUMPFUN_PROGRAM_ID = exports.PROTOCOL_PROGRAM_IDS = exports.all_event_types = exports.ALL_EVENT_TYPES = exports.eventTypeFilterAllowsInstructionParsing = exports.eventTypeFilterIncludesPumpFees = exports.eventTypeFilterIncludesRaydiumLaunchpad = exports.eventTypeFilterIncludesBonk = exports.eventTypeFilterIncludesOrcaWhirlpool = exports.eventTypeFilterIncludesRaydiumAmmV4 = exports.eventTypeFilterIncludesRaydiumCpmm = exports.eventTypeFilterIncludesRaydiumClmm = exports.eventTypeFilterIncludesMeteoraDammV2 = exports.eventTypeFilterIncludesPumpswap = exports.eventTypeFilterIncludesPumpfun = exports.eventTypeFilterExclude = exports.eventTypeFilterIncludeOnly = exports.accountFilterMemcmp = exports.accountFilterFromProgramOwners = exports.slotFilterMaxSlot = exports.slotFilterMinSlot = exports.newSlotFilter = exports.newAccountFilter = exports.transactionFilterFromProgramIds = exports.newTransactionFilter = exports.highThroughputClientConfig = exports.lowLatencyClientConfig = exports.defaultClientConfig = exports.try_yellowstone_signature = exports.collect_watch_transfer_counterparty_pairs = exports.spl_token_counterparty_by_owner = exports.token_balance_raw_amount = exports.heuristic_sol_counterparties_for_watched_keys = exports.lamport_balance_deltas = exports.collect_account_keys_bs58 = void 0;
|
|
38
|
+
exports.parsePumpswapPool = exports.parsePumpswapGlobalConfig = exports.isPumpfunGlobalAccount = exports.parsePumpfunAccount = exports.parsePumpfunGlobal = exports.parseTokenAccount = exports.isNonceAccount = exports.parseNonceAccount = exports.parseAccountUnified = exports.u64leDiscriminator = exports.PUMPSWAP_DISC = exports.PROGRAM_LOG_DISC = exports.parseMeteoraDammLog = exports.lookup_discriminator = exports.lookupDiscriminator = exports.discriminator_to_protocol = exports.discriminatorToProtocol = exports.discriminator_to_name = exports.discriminatorToName = exports.parse_log_unified = exports.parse_log_optimized = exports.parse_meteora_dlmm_log = exports.parse_meteora_damm_log = exports.parseLogOptimized = exports.parseLogUnified = exports.build_subscribe_transaction_filters_named = exports.build_subscribe_request_with_commitment = exports.build_subscribe_request = exports.CommitmentLevel = exports.buildSubscribeTransactionFiltersNamed = exports.buildSubscribeRequestWithCommitment = exports.buildSubscribeRequest = exports.exclude_types = exports.include_only = exports.event_type_filter_exclude = exports.event_type_filter_include_only = exports.account_filter_memcmp = exports.account_filter_from_program_owners = exports.slot_filter_max_slot = exports.slot_filter_min_slot = exports.new_slot_filter = exports.new_account_filter = exports.transaction_filter_from_program_ids = exports.new_transaction_filter = exports.high_throughput_client_config = exports.low_latency_client_config = exports.default_client_config = exports.account_filter_for_protocols = exports.transaction_filter_for_protocols = exports.get_program_ids_for_protocols = void 0;
|
|
39
|
+
exports.high_throughput_shred_stream_config = exports.low_latency_shred_stream_config = exports.default_shred_stream_config = exports.highThroughputShredStreamConfig = exports.lowLatencyShredStreamConfig = exports.defaultShredStreamConfig = exports.wireBytesToShredWasmTx = exports.decodeShredstreamEntriesBincode = exports.decodeEntriesBincodeNested = exports.decodeEntriesBincodeFlat = exports.bincodeVecEntryCount = exports.loadAddressLookupTableAccounts = exports.fullAccountKeyStringsFromShredTx = exports.dexEventsFromShredWasmTxWithFullKeys = exports.dexEventsFromShredWasmTx = exports.ShredEventQueue = exports.ShredStreamClient = exports.geyser_grpc_channel_options = exports.default_geyser_connect_config = exports.connect_yellowstone_geyser = exports.event_parser = exports.geyserGrpcChannelOptions = exports.defaultGeyserConnectConfig = exports.connectYellowstoneGeyser = exports.YellowstoneGrpc = exports.programIds = exports.parse_pump_fees_instruction = exports.parse_meteora_damm_instruction = exports.parse_pumpswap_instruction = exports.parse_pumpfun_instruction = exports.parse_instruction_unified = exports.parsePumpFeesInstruction = exports.parseMeteoraDammInstruction = exports.parsePumpswapInstruction = exports.parsePumpfunInstruction = exports.parseInstructionUnified = exports.user_wallet_pubkey_for_onchain_account = exports.rpc_resolve_user_wallet_pubkey = exports.parse_pumpswap_pool = exports.parse_pumpswap_global_config = exports.parse_pumpfun_global = exports.parse_token_account = exports.parse_nonce_account = exports.parse_account_unified = exports.rpcResolveUserWalletPubkey = exports.userWalletPubkeyForOnchainAccount = exports.hasDiscriminator = exports.isPoolAccount = exports.isGlobalConfigAccount = exports.parsePumpswapAccount = void 0;
|
|
40
|
+
var constants_js_1 = require("./common/constants.js");
|
|
41
|
+
Object.defineProperty(exports, "DEFAULT_CHANNEL_SIZE", { enumerable: true, get: function () { return constants_js_1.DEFAULT_CHANNEL_SIZE; } });
|
|
42
|
+
Object.defineProperty(exports, "DEFAULT_CONNECT_TIMEOUT", { enumerable: true, get: function () { return constants_js_1.DEFAULT_CONNECT_TIMEOUT; } });
|
|
43
|
+
Object.defineProperty(exports, "DEFAULT_MAX_DECODING_MESSAGE_SIZE", { enumerable: true, get: function () { return constants_js_1.DEFAULT_MAX_DECODING_MESSAGE_SIZE; } });
|
|
44
|
+
Object.defineProperty(exports, "DEFAULT_METRICS_PRINT_INTERVAL_SECONDS", { enumerable: true, get: function () { return constants_js_1.DEFAULT_METRICS_PRINT_INTERVAL_SECONDS; } });
|
|
45
|
+
Object.defineProperty(exports, "DEFAULT_METRICS_WINDOW_SECONDS", { enumerable: true, get: function () { return constants_js_1.DEFAULT_METRICS_WINDOW_SECONDS; } });
|
|
46
|
+
Object.defineProperty(exports, "DEFAULT_REQUEST_TIMEOUT", { enumerable: true, get: function () { return constants_js_1.DEFAULT_REQUEST_TIMEOUT; } });
|
|
47
|
+
Object.defineProperty(exports, "SLOW_PROCESSING_THRESHOLD_US", { enumerable: true, get: function () { return constants_js_1.SLOW_PROCESSING_THRESHOLD_US; } });
|
|
48
|
+
var dex_event_js_1 = require("./core/dex_event.js");
|
|
49
|
+
Object.defineProperty(exports, "metadataForDexEvent", { enumerable: true, get: function () { return dex_event_js_1.metadataForDexEvent; } });
|
|
50
|
+
Object.defineProperty(exports, "defaultPubkey", { enumerable: true, get: function () { return dex_event_js_1.defaultPubkey; } });
|
|
37
51
|
var json_utils_js_1 = require("./core/json_utils.js");
|
|
38
52
|
Object.defineProperty(exports, "bigintToJsonReplacer", { enumerable: true, get: function () { return json_utils_js_1.bigintToJsonReplacer; } });
|
|
39
53
|
Object.defineProperty(exports, "dexEventToJsonString", { enumerable: true, get: function () { return json_utils_js_1.dexEventToJsonString; } });
|
|
40
54
|
var error_js_1 = require("./core/error.js");
|
|
41
55
|
Object.defineProperty(exports, "formatParseError", { enumerable: true, get: function () { return error_js_1.formatParseError; } });
|
|
56
|
+
var pumpfun_fee_enrich_js_1 = require("./core/pumpfun_fee_enrich.js");
|
|
57
|
+
Object.defineProperty(exports, "enrichCreateV2ObservedFeeRecipient", { enumerable: true, get: function () { return pumpfun_fee_enrich_js_1.enrichCreateV2ObservedFeeRecipient; } });
|
|
58
|
+
Object.defineProperty(exports, "enrichPumpfunTradesFromCreateInstructions", { enumerable: true, get: function () { return pumpfun_fee_enrich_js_1.enrichPumpfunTradesFromCreateInstructions; } });
|
|
59
|
+
Object.defineProperty(exports, "enrichPumpfunSameTxPostMerge", { enumerable: true, get: function () { return pumpfun_fee_enrich_js_1.enrichPumpfunSameTxPostMerge; } });
|
|
42
60
|
var unified_parser_js_1 = require("./core/unified_parser.js");
|
|
43
61
|
Object.defineProperty(exports, "parseTransactionEvents", { enumerable: true, get: function () { return unified_parser_js_1.parseTransactionEvents; } });
|
|
44
62
|
Object.defineProperty(exports, "parseLogsOnly", { enumerable: true, get: function () { return unified_parser_js_1.parseLogsOnly; } });
|
|
@@ -47,7 +65,16 @@ Object.defineProperty(exports, "parseTransactionEventsStreaming", { enumerable:
|
|
|
47
65
|
Object.defineProperty(exports, "parseLogsStreaming", { enumerable: true, get: function () { return unified_parser_js_1.parseLogsStreaming; } });
|
|
48
66
|
Object.defineProperty(exports, "parseTransactionWithStreamingListener", { enumerable: true, get: function () { return unified_parser_js_1.parseTransactionWithStreamingListener; } });
|
|
49
67
|
Object.defineProperty(exports, "parseLog", { enumerable: true, get: function () { return unified_parser_js_1.parseLog; } });
|
|
68
|
+
Object.defineProperty(exports, "parse_log", { enumerable: true, get: function () { return unified_parser_js_1.parseLog; } });
|
|
50
69
|
Object.defineProperty(exports, "nowUs", { enumerable: true, get: function () { return unified_parser_js_1.nowUs; } });
|
|
70
|
+
var clock_js_1 = require("./core/clock.js");
|
|
71
|
+
Object.defineProperty(exports, "nowMicros", { enumerable: true, get: function () { return clock_js_1.nowMicros; } });
|
|
72
|
+
Object.defineProperty(exports, "nowNanos", { enumerable: true, get: function () { return clock_js_1.nowNanos; } });
|
|
73
|
+
Object.defineProperty(exports, "elapsedMicrosSince", { enumerable: true, get: function () { return clock_js_1.elapsedMicrosSince; } });
|
|
74
|
+
var account_pubkey_cache_js_1 = require("./core/account_pubkey_cache.js");
|
|
75
|
+
Object.defineProperty(exports, "AccountPubkeyCache", { enumerable: true, get: function () { return account_pubkey_cache_js_1.AccountPubkeyCache; } });
|
|
76
|
+
Object.defineProperty(exports, "buildAccountPubkeysWithCache", { enumerable: true, get: function () { return account_pubkey_cache_js_1.buildAccountPubkeysWithCache; } });
|
|
77
|
+
Object.defineProperty(exports, "build_account_pubkeys_with_cache", { enumerable: true, get: function () { return account_pubkey_cache_js_1.buildAccountPubkeysWithCache; } });
|
|
51
78
|
var warmup_js_1 = require("./warmup.js");
|
|
52
79
|
Object.defineProperty(exports, "warmupParser", { enumerable: true, get: function () { return warmup_js_1.warmupParser; } });
|
|
53
80
|
Object.defineProperty(exports, "isWarmedUp", { enumerable: true, get: function () { return warmup_js_1.isWarmedUp; } });
|
|
@@ -57,23 +84,126 @@ Object.defineProperty(exports, "parseRpcTransaction", { enumerable: true, get: f
|
|
|
57
84
|
Object.defineProperty(exports, "fillAccountsFromTransactionDataRpc", { enumerable: true, get: function () { return rpc_parser_js_1.fillAccountsFromTransactionDataRpc; } });
|
|
58
85
|
Object.defineProperty(exports, "fillDataRpc", { enumerable: true, get: function () { return rpc_parser_js_1.fillDataRpc; } });
|
|
59
86
|
Object.defineProperty(exports, "applyAccountFillsToLogEvents", { enumerable: true, get: function () { return rpc_parser_js_1.applyAccountFillsToLogEvents; } });
|
|
87
|
+
Object.defineProperty(exports, "convertRpcToGrpc", { enumerable: true, get: function () { return rpc_parser_js_1.convertRpcToGrpc; } });
|
|
88
|
+
Object.defineProperty(exports, "convert_rpc_to_grpc", { enumerable: true, get: function () { return rpc_parser_js_1.convert_rpc_to_grpc; } });
|
|
60
89
|
var yellowstone_parse_js_1 = require("./grpc/yellowstone_parse.js");
|
|
61
90
|
Object.defineProperty(exports, "parseDexEventsFromGrpcTransactionInfo", { enumerable: true, get: function () { return yellowstone_parse_js_1.parseDexEventsFromGrpcTransactionInfo; } });
|
|
91
|
+
Object.defineProperty(exports, "grpcTxIndexFromInfo", { enumerable: true, get: function () { return yellowstone_parse_js_1.grpcTxIndexFromInfo; } });
|
|
92
|
+
var transaction_meta_js_1 = require("./grpc/transaction_meta.js");
|
|
93
|
+
Object.defineProperty(exports, "pubkeyBytesToBs58", { enumerable: true, get: function () { return transaction_meta_js_1.pubkeyBytesToBs58; } });
|
|
94
|
+
Object.defineProperty(exports, "collectAccountKeysBs58", { enumerable: true, get: function () { return transaction_meta_js_1.collectAccountKeysBs58; } });
|
|
95
|
+
Object.defineProperty(exports, "lamportBalanceDeltas", { enumerable: true, get: function () { return transaction_meta_js_1.lamportBalanceDeltas; } });
|
|
96
|
+
Object.defineProperty(exports, "heuristicSolCounterpartiesForWatchedKeys", { enumerable: true, get: function () { return transaction_meta_js_1.heuristicSolCounterpartiesForWatchedKeys; } });
|
|
97
|
+
Object.defineProperty(exports, "tokenBalanceRawAmount", { enumerable: true, get: function () { return transaction_meta_js_1.tokenBalanceRawAmount; } });
|
|
98
|
+
Object.defineProperty(exports, "splTokenCounterpartyByOwner", { enumerable: true, get: function () { return transaction_meta_js_1.splTokenCounterpartyByOwner; } });
|
|
99
|
+
Object.defineProperty(exports, "collectWatchTransferCounterpartyPairs", { enumerable: true, get: function () { return transaction_meta_js_1.collectWatchTransferCounterpartyPairs; } });
|
|
100
|
+
Object.defineProperty(exports, "tryYellowstoneSignature", { enumerable: true, get: function () { return transaction_meta_js_1.tryYellowstoneSignature; } });
|
|
101
|
+
/** Rust `grpc::transaction_meta` 蛇形命名别名(便于从 Rust 迁移) */
|
|
102
|
+
var transaction_meta_js_2 = require("./grpc/transaction_meta.js");
|
|
103
|
+
Object.defineProperty(exports, "pubkey_bytes_to_bs58", { enumerable: true, get: function () { return transaction_meta_js_2.pubkeyBytesToBs58; } });
|
|
104
|
+
Object.defineProperty(exports, "collect_account_keys_bs58", { enumerable: true, get: function () { return transaction_meta_js_2.collectAccountKeysBs58; } });
|
|
105
|
+
Object.defineProperty(exports, "lamport_balance_deltas", { enumerable: true, get: function () { return transaction_meta_js_2.lamportBalanceDeltas; } });
|
|
106
|
+
Object.defineProperty(exports, "heuristic_sol_counterparties_for_watched_keys", { enumerable: true, get: function () { return transaction_meta_js_2.heuristicSolCounterpartiesForWatchedKeys; } });
|
|
107
|
+
Object.defineProperty(exports, "token_balance_raw_amount", { enumerable: true, get: function () { return transaction_meta_js_2.tokenBalanceRawAmount; } });
|
|
108
|
+
Object.defineProperty(exports, "spl_token_counterparty_by_owner", { enumerable: true, get: function () { return transaction_meta_js_2.splTokenCounterpartyByOwner; } });
|
|
109
|
+
Object.defineProperty(exports, "collect_watch_transfer_counterparty_pairs", { enumerable: true, get: function () { return transaction_meta_js_2.collectWatchTransferCounterpartyPairs; } });
|
|
110
|
+
Object.defineProperty(exports, "try_yellowstone_signature", { enumerable: true, get: function () { return transaction_meta_js_2.tryYellowstoneSignature; } });
|
|
62
111
|
var types_js_1 = require("./grpc/types.js");
|
|
63
112
|
Object.defineProperty(exports, "defaultClientConfig", { enumerable: true, get: function () { return types_js_1.defaultClientConfig; } });
|
|
113
|
+
Object.defineProperty(exports, "lowLatencyClientConfig", { enumerable: true, get: function () { return types_js_1.lowLatencyClientConfig; } });
|
|
114
|
+
Object.defineProperty(exports, "highThroughputClientConfig", { enumerable: true, get: function () { return types_js_1.highThroughputClientConfig; } });
|
|
64
115
|
Object.defineProperty(exports, "newTransactionFilter", { enumerable: true, get: function () { return types_js_1.newTransactionFilter; } });
|
|
116
|
+
Object.defineProperty(exports, "transactionFilterFromProgramIds", { enumerable: true, get: function () { return types_js_1.transactionFilterFromProgramIds; } });
|
|
117
|
+
Object.defineProperty(exports, "newAccountFilter", { enumerable: true, get: function () { return types_js_1.newAccountFilter; } });
|
|
118
|
+
Object.defineProperty(exports, "newSlotFilter", { enumerable: true, get: function () { return types_js_1.newSlotFilter; } });
|
|
119
|
+
Object.defineProperty(exports, "slotFilterMinSlot", { enumerable: true, get: function () { return types_js_1.slotFilterMinSlot; } });
|
|
120
|
+
Object.defineProperty(exports, "slotFilterMaxSlot", { enumerable: true, get: function () { return types_js_1.slotFilterMaxSlot; } });
|
|
121
|
+
Object.defineProperty(exports, "accountFilterFromProgramOwners", { enumerable: true, get: function () { return types_js_1.accountFilterFromProgramOwners; } });
|
|
122
|
+
Object.defineProperty(exports, "accountFilterMemcmp", { enumerable: true, get: function () { return types_js_1.accountFilterMemcmp; } });
|
|
65
123
|
Object.defineProperty(exports, "eventTypeFilterIncludeOnly", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludeOnly; } });
|
|
66
124
|
Object.defineProperty(exports, "eventTypeFilterExclude", { enumerable: true, get: function () { return types_js_1.eventTypeFilterExclude; } });
|
|
67
125
|
Object.defineProperty(exports, "eventTypeFilterIncludesPumpfun", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesPumpfun; } });
|
|
68
126
|
Object.defineProperty(exports, "eventTypeFilterIncludesPumpswap", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesPumpswap; } });
|
|
69
127
|
Object.defineProperty(exports, "eventTypeFilterIncludesMeteoraDammV2", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesMeteoraDammV2; } });
|
|
128
|
+
Object.defineProperty(exports, "eventTypeFilterIncludesRaydiumClmm", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesRaydiumClmm; } });
|
|
129
|
+
Object.defineProperty(exports, "eventTypeFilterIncludesRaydiumCpmm", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesRaydiumCpmm; } });
|
|
130
|
+
Object.defineProperty(exports, "eventTypeFilterIncludesRaydiumAmmV4", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesRaydiumAmmV4; } });
|
|
131
|
+
Object.defineProperty(exports, "eventTypeFilterIncludesOrcaWhirlpool", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesOrcaWhirlpool; } });
|
|
132
|
+
Object.defineProperty(exports, "eventTypeFilterIncludesBonk", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesBonk; } });
|
|
133
|
+
Object.defineProperty(exports, "eventTypeFilterIncludesRaydiumLaunchpad", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesRaydiumLaunchpad; } });
|
|
134
|
+
Object.defineProperty(exports, "eventTypeFilterIncludesPumpFees", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesPumpFees; } });
|
|
70
135
|
Object.defineProperty(exports, "eventTypeFilterAllowsInstructionParsing", { enumerable: true, get: function () { return types_js_1.eventTypeFilterAllowsInstructionParsing; } });
|
|
136
|
+
Object.defineProperty(exports, "ALL_EVENT_TYPES", { enumerable: true, get: function () { return types_js_1.ALL_EVENT_TYPES; } });
|
|
137
|
+
var types_js_2 = require("./grpc/types.js");
|
|
138
|
+
Object.defineProperty(exports, "all_event_types", { enumerable: true, get: function () { return types_js_2.ALL_EVENT_TYPES; } });
|
|
139
|
+
var program_ids_js_1 = require("./grpc/program_ids.js");
|
|
140
|
+
Object.defineProperty(exports, "PROTOCOL_PROGRAM_IDS", { enumerable: true, get: function () { return program_ids_js_1.PROTOCOL_PROGRAM_IDS; } });
|
|
141
|
+
Object.defineProperty(exports, "PUMPFUN_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.PUMPFUN_PROGRAM_ID; } });
|
|
142
|
+
Object.defineProperty(exports, "PUMPSWAP_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.PUMPSWAP_PROGRAM_ID; } });
|
|
143
|
+
Object.defineProperty(exports, "PUMPSWAP_FEES_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.PUMPSWAP_FEES_PROGRAM_ID; } });
|
|
144
|
+
Object.defineProperty(exports, "PUMP_FEES_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.PUMP_FEES_PROGRAM_ID; } });
|
|
145
|
+
Object.defineProperty(exports, "BONK_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.BONK_PROGRAM_ID; } });
|
|
146
|
+
Object.defineProperty(exports, "RAYDIUM_CPMM_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.RAYDIUM_CPMM_PROGRAM_ID; } });
|
|
147
|
+
Object.defineProperty(exports, "RAYDIUM_CLMM_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.RAYDIUM_CLMM_PROGRAM_ID; } });
|
|
148
|
+
Object.defineProperty(exports, "RAYDIUM_AMM_V4_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.RAYDIUM_AMM_V4_PROGRAM_ID; } });
|
|
149
|
+
Object.defineProperty(exports, "ORCA_WHIRLPOOL_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.ORCA_WHIRLPOOL_PROGRAM_ID; } });
|
|
150
|
+
Object.defineProperty(exports, "METEORA_POOLS_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.METEORA_POOLS_PROGRAM_ID; } });
|
|
151
|
+
Object.defineProperty(exports, "METEORA_DAMM_V2_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.METEORA_DAMM_V2_PROGRAM_ID; } });
|
|
152
|
+
Object.defineProperty(exports, "METEORA_DLMM_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.METEORA_DLMM_PROGRAM_ID; } });
|
|
153
|
+
Object.defineProperty(exports, "getProgramIdsForProtocols", { enumerable: true, get: function () { return program_ids_js_1.getProgramIdsForProtocols; } });
|
|
154
|
+
Object.defineProperty(exports, "transactionFilterForProtocols", { enumerable: true, get: function () { return program_ids_js_1.transactionFilterForProtocols; } });
|
|
155
|
+
Object.defineProperty(exports, "accountFilterForProtocols", { enumerable: true, get: function () { return program_ids_js_1.accountFilterForProtocols; } });
|
|
156
|
+
var program_ids_js_2 = require("./grpc/program_ids.js");
|
|
157
|
+
Object.defineProperty(exports, "protocol_program_ids", { enumerable: true, get: function () { return program_ids_js_2.PROTOCOL_PROGRAM_IDS; } });
|
|
158
|
+
Object.defineProperty(exports, "get_program_ids_for_protocols", { enumerable: true, get: function () { return program_ids_js_2.getProgramIdsForProtocols; } });
|
|
159
|
+
Object.defineProperty(exports, "transaction_filter_for_protocols", { enumerable: true, get: function () { return program_ids_js_2.transactionFilterForProtocols; } });
|
|
160
|
+
Object.defineProperty(exports, "account_filter_for_protocols", { enumerable: true, get: function () { return program_ids_js_2.accountFilterForProtocols; } });
|
|
161
|
+
/** Rust `grpc::types` 蛇形命名别名 */
|
|
162
|
+
var types_js_3 = require("./grpc/types.js");
|
|
163
|
+
Object.defineProperty(exports, "default_client_config", { enumerable: true, get: function () { return types_js_3.defaultClientConfig; } });
|
|
164
|
+
Object.defineProperty(exports, "low_latency_client_config", { enumerable: true, get: function () { return types_js_3.lowLatencyClientConfig; } });
|
|
165
|
+
Object.defineProperty(exports, "high_throughput_client_config", { enumerable: true, get: function () { return types_js_3.highThroughputClientConfig; } });
|
|
166
|
+
Object.defineProperty(exports, "new_transaction_filter", { enumerable: true, get: function () { return types_js_3.newTransactionFilter; } });
|
|
167
|
+
Object.defineProperty(exports, "transaction_filter_from_program_ids", { enumerable: true, get: function () { return types_js_3.transactionFilterFromProgramIds; } });
|
|
168
|
+
Object.defineProperty(exports, "new_account_filter", { enumerable: true, get: function () { return types_js_3.newAccountFilter; } });
|
|
169
|
+
Object.defineProperty(exports, "new_slot_filter", { enumerable: true, get: function () { return types_js_3.newSlotFilter; } });
|
|
170
|
+
Object.defineProperty(exports, "slot_filter_min_slot", { enumerable: true, get: function () { return types_js_3.slotFilterMinSlot; } });
|
|
171
|
+
Object.defineProperty(exports, "slot_filter_max_slot", { enumerable: true, get: function () { return types_js_3.slotFilterMaxSlot; } });
|
|
172
|
+
Object.defineProperty(exports, "account_filter_from_program_owners", { enumerable: true, get: function () { return types_js_3.accountFilterFromProgramOwners; } });
|
|
173
|
+
Object.defineProperty(exports, "account_filter_memcmp", { enumerable: true, get: function () { return types_js_3.accountFilterMemcmp; } });
|
|
174
|
+
Object.defineProperty(exports, "event_type_filter_include_only", { enumerable: true, get: function () { return types_js_3.eventTypeFilterIncludeOnly; } });
|
|
175
|
+
Object.defineProperty(exports, "event_type_filter_exclude", { enumerable: true, get: function () { return types_js_3.eventTypeFilterExclude; } });
|
|
176
|
+
Object.defineProperty(exports, "include_only", { enumerable: true, get: function () { return types_js_3.eventTypeFilterIncludeOnly; } });
|
|
177
|
+
Object.defineProperty(exports, "exclude_types", { enumerable: true, get: function () { return types_js_3.eventTypeFilterExclude; } });
|
|
178
|
+
var subscribe_builder_js_1 = require("./grpc/subscribe_builder.js");
|
|
179
|
+
Object.defineProperty(exports, "buildSubscribeRequest", { enumerable: true, get: function () { return subscribe_builder_js_1.buildSubscribeRequest; } });
|
|
180
|
+
Object.defineProperty(exports, "buildSubscribeRequestWithCommitment", { enumerable: true, get: function () { return subscribe_builder_js_1.buildSubscribeRequestWithCommitment; } });
|
|
181
|
+
Object.defineProperty(exports, "buildSubscribeTransactionFiltersNamed", { enumerable: true, get: function () { return subscribe_builder_js_1.buildSubscribeTransactionFiltersNamed; } });
|
|
182
|
+
Object.defineProperty(exports, "CommitmentLevel", { enumerable: true, get: function () { return subscribe_builder_js_1.CommitmentLevel; } });
|
|
183
|
+
/** Rust `grpc::subscribe_builder` 蛇形命名 */
|
|
184
|
+
var subscribe_builder_js_2 = require("./grpc/subscribe_builder.js");
|
|
185
|
+
Object.defineProperty(exports, "build_subscribe_request", { enumerable: true, get: function () { return subscribe_builder_js_2.buildSubscribeRequest; } });
|
|
186
|
+
Object.defineProperty(exports, "build_subscribe_request_with_commitment", { enumerable: true, get: function () { return subscribe_builder_js_2.buildSubscribeRequestWithCommitment; } });
|
|
187
|
+
Object.defineProperty(exports, "build_subscribe_transaction_filters_named", { enumerable: true, get: function () { return subscribe_builder_js_2.buildSubscribeTransactionFiltersNamed; } });
|
|
71
188
|
var optimized_matcher_js_1 = require("./logs/optimized_matcher.js");
|
|
72
189
|
Object.defineProperty(exports, "parseLogUnified", { enumerable: true, get: function () { return optimized_matcher_js_1.parseLogUnified; } });
|
|
73
190
|
Object.defineProperty(exports, "parseLogOptimized", { enumerable: true, get: function () { return optimized_matcher_js_1.parseLogOptimized; } });
|
|
191
|
+
/** Rust `logs` 蛇形命名别名(`parse_meteora_damm_log` 等) */
|
|
192
|
+
var rust_aliases_js_1 = require("./logs/rust_aliases.js");
|
|
193
|
+
Object.defineProperty(exports, "parse_meteora_damm_log", { enumerable: true, get: function () { return rust_aliases_js_1.parse_meteora_damm_log; } });
|
|
194
|
+
Object.defineProperty(exports, "parse_meteora_dlmm_log", { enumerable: true, get: function () { return rust_aliases_js_1.parse_meteora_dlmm_log; } });
|
|
195
|
+
Object.defineProperty(exports, "parse_log_optimized", { enumerable: true, get: function () { return rust_aliases_js_1.parse_log_optimized; } });
|
|
196
|
+
Object.defineProperty(exports, "parse_log_unified", { enumerable: true, get: function () { return rust_aliases_js_1.parse_log_unified; } });
|
|
197
|
+
/** 与 Rust `logs::discriminator_lut` 名称 / 协议查询对齐 */
|
|
198
|
+
var discriminator_lut_js_1 = require("./logs/discriminator_lut.js");
|
|
199
|
+
Object.defineProperty(exports, "discriminatorToName", { enumerable: true, get: function () { return discriminator_lut_js_1.discriminatorToName; } });
|
|
200
|
+
Object.defineProperty(exports, "discriminator_to_name", { enumerable: true, get: function () { return discriminator_lut_js_1.discriminator_to_name; } });
|
|
201
|
+
Object.defineProperty(exports, "discriminatorToProtocol", { enumerable: true, get: function () { return discriminator_lut_js_1.discriminatorToProtocol; } });
|
|
202
|
+
Object.defineProperty(exports, "discriminator_to_protocol", { enumerable: true, get: function () { return discriminator_lut_js_1.discriminator_to_protocol; } });
|
|
203
|
+
Object.defineProperty(exports, "lookupDiscriminator", { enumerable: true, get: function () { return discriminator_lut_js_1.lookupDiscriminator; } });
|
|
204
|
+
Object.defineProperty(exports, "lookup_discriminator", { enumerable: true, get: function () { return discriminator_lut_js_1.lookup_discriminator; } });
|
|
74
205
|
var meteora_damm_js_1 = require("./logs/meteora_damm.js");
|
|
75
206
|
Object.defineProperty(exports, "parseMeteoraDammLog", { enumerable: true, get: function () { return meteora_damm_js_1.parseMeteoraDammLog; } });
|
|
76
|
-
Object.defineProperty(exports, "parseInitializePoolEvent", { enumerable: true, get: function () { return meteora_damm_js_1.parseInitializePoolEvent; } });
|
|
77
207
|
var program_log_discriminators_js_1 = require("./logs/program_log_discriminators.js");
|
|
78
208
|
Object.defineProperty(exports, "PROGRAM_LOG_DISC", { enumerable: true, get: function () { return program_log_discriminators_js_1.PROGRAM_LOG_DISC; } });
|
|
79
209
|
Object.defineProperty(exports, "PUMPSWAP_DISC", { enumerable: true, get: function () { return program_log_discriminators_js_1.PUMPSWAP_DISC; } });
|
|
@@ -83,17 +213,69 @@ Object.defineProperty(exports, "parseAccountUnified", { enumerable: true, get: f
|
|
|
83
213
|
Object.defineProperty(exports, "parseNonceAccount", { enumerable: true, get: function () { return mod_js_1.parseNonceAccount; } });
|
|
84
214
|
Object.defineProperty(exports, "isNonceAccount", { enumerable: true, get: function () { return mod_js_1.isNonceAccount; } });
|
|
85
215
|
Object.defineProperty(exports, "parseTokenAccount", { enumerable: true, get: function () { return mod_js_1.parseTokenAccount; } });
|
|
216
|
+
Object.defineProperty(exports, "parsePumpfunGlobal", { enumerable: true, get: function () { return mod_js_1.parsePumpfunGlobal; } });
|
|
217
|
+
Object.defineProperty(exports, "parsePumpfunAccount", { enumerable: true, get: function () { return mod_js_1.parsePumpfunAccount; } });
|
|
218
|
+
Object.defineProperty(exports, "isPumpfunGlobalAccount", { enumerable: true, get: function () { return mod_js_1.isPumpfunGlobalAccount; } });
|
|
86
219
|
Object.defineProperty(exports, "parsePumpswapGlobalConfig", { enumerable: true, get: function () { return mod_js_1.parsePumpswapGlobalConfig; } });
|
|
87
220
|
Object.defineProperty(exports, "parsePumpswapPool", { enumerable: true, get: function () { return mod_js_1.parsePumpswapPool; } });
|
|
88
221
|
Object.defineProperty(exports, "parsePumpswapAccount", { enumerable: true, get: function () { return mod_js_1.parsePumpswapAccount; } });
|
|
89
222
|
Object.defineProperty(exports, "isGlobalConfigAccount", { enumerable: true, get: function () { return mod_js_1.isGlobalConfigAccount; } });
|
|
90
223
|
Object.defineProperty(exports, "isPoolAccount", { enumerable: true, get: function () { return mod_js_1.isPoolAccount; } });
|
|
91
224
|
Object.defineProperty(exports, "hasDiscriminator", { enumerable: true, get: function () { return mod_js_1.hasDiscriminator; } });
|
|
225
|
+
Object.defineProperty(exports, "userWalletPubkeyForOnchainAccount", { enumerable: true, get: function () { return mod_js_1.userWalletPubkeyForOnchainAccount; } });
|
|
226
|
+
Object.defineProperty(exports, "rpcResolveUserWalletPubkey", { enumerable: true, get: function () { return mod_js_1.rpcResolveUserWalletPubkey; } });
|
|
227
|
+
/** Rust `accounts` 蛇形命名别名 */
|
|
228
|
+
var rust_aliases_js_2 = require("./accounts/rust_aliases.js");
|
|
229
|
+
Object.defineProperty(exports, "parse_account_unified", { enumerable: true, get: function () { return rust_aliases_js_2.parse_account_unified; } });
|
|
230
|
+
Object.defineProperty(exports, "parse_nonce_account", { enumerable: true, get: function () { return rust_aliases_js_2.parse_nonce_account; } });
|
|
231
|
+
Object.defineProperty(exports, "parse_token_account", { enumerable: true, get: function () { return rust_aliases_js_2.parse_token_account; } });
|
|
232
|
+
Object.defineProperty(exports, "parse_pumpfun_global", { enumerable: true, get: function () { return rust_aliases_js_2.parse_pumpfun_global; } });
|
|
233
|
+
Object.defineProperty(exports, "parse_pumpswap_global_config", { enumerable: true, get: function () { return rust_aliases_js_2.parse_pumpswap_global_config; } });
|
|
234
|
+
Object.defineProperty(exports, "parse_pumpswap_pool", { enumerable: true, get: function () { return rust_aliases_js_2.parse_pumpswap_pool; } });
|
|
235
|
+
Object.defineProperty(exports, "rpc_resolve_user_wallet_pubkey", { enumerable: true, get: function () { return rust_aliases_js_2.rpc_resolve_user_wallet_pubkey; } });
|
|
236
|
+
Object.defineProperty(exports, "user_wallet_pubkey_for_onchain_account", { enumerable: true, get: function () { return rust_aliases_js_2.user_wallet_pubkey_for_onchain_account; } });
|
|
92
237
|
var mod_js_2 = require("./instr/mod.js");
|
|
93
238
|
Object.defineProperty(exports, "parseInstructionUnified", { enumerable: true, get: function () { return mod_js_2.parseInstructionUnified; } });
|
|
94
239
|
Object.defineProperty(exports, "parsePumpfunInstruction", { enumerable: true, get: function () { return mod_js_2.parsePumpfunInstruction; } });
|
|
95
240
|
Object.defineProperty(exports, "parsePumpswapInstruction", { enumerable: true, get: function () { return mod_js_2.parsePumpswapInstruction; } });
|
|
96
241
|
Object.defineProperty(exports, "parseMeteoraDammInstruction", { enumerable: true, get: function () { return mod_js_2.parseMeteoraDammInstruction; } });
|
|
242
|
+
Object.defineProperty(exports, "parsePumpFeesInstruction", { enumerable: true, get: function () { return mod_js_2.parsePumpFeesInstruction; } });
|
|
243
|
+
/** Rust `instr` 根模块蛇形命名别名 */
|
|
244
|
+
var rust_aliases_js_3 = require("./instr/rust_aliases.js");
|
|
245
|
+
Object.defineProperty(exports, "parse_instruction_unified", { enumerable: true, get: function () { return rust_aliases_js_3.parse_instruction_unified; } });
|
|
246
|
+
Object.defineProperty(exports, "parse_pumpfun_instruction", { enumerable: true, get: function () { return rust_aliases_js_3.parse_pumpfun_instruction; } });
|
|
247
|
+
Object.defineProperty(exports, "parse_pumpswap_instruction", { enumerable: true, get: function () { return rust_aliases_js_3.parse_pumpswap_instruction; } });
|
|
248
|
+
Object.defineProperty(exports, "parse_meteora_damm_instruction", { enumerable: true, get: function () { return rust_aliases_js_3.parse_meteora_damm_instruction; } });
|
|
249
|
+
Object.defineProperty(exports, "parse_pump_fees_instruction", { enumerable: true, get: function () { return rust_aliases_js_3.parse_pump_fees_instruction; } });
|
|
97
250
|
exports.programIds = __importStar(require("./instr/program_ids.js"));
|
|
98
251
|
var client_js_1 = require("./grpc/client.js");
|
|
99
252
|
Object.defineProperty(exports, "YellowstoneGrpc", { enumerable: true, get: function () { return client_js_1.YellowstoneGrpc; } });
|
|
253
|
+
var geyser_connect_js_1 = require("./grpc/geyser_connect.js");
|
|
254
|
+
Object.defineProperty(exports, "connectYellowstoneGeyser", { enumerable: true, get: function () { return geyser_connect_js_1.connectYellowstoneGeyser; } });
|
|
255
|
+
Object.defineProperty(exports, "defaultGeyserConnectConfig", { enumerable: true, get: function () { return geyser_connect_js_1.defaultGeyserConnectConfig; } });
|
|
256
|
+
Object.defineProperty(exports, "geyserGrpcChannelOptions", { enumerable: true, get: function () { return geyser_connect_js_1.geyserGrpcChannelOptions; } });
|
|
257
|
+
/** 与 Rust `sol_parser_sdk::grpc::event_parser` 模块对应 */
|
|
258
|
+
exports.event_parser = __importStar(require("./grpc/event_parser.js"));
|
|
259
|
+
var geyser_connect_js_2 = require("./grpc/geyser_connect.js");
|
|
260
|
+
Object.defineProperty(exports, "connect_yellowstone_geyser", { enumerable: true, get: function () { return geyser_connect_js_2.connectYellowstoneGeyser; } });
|
|
261
|
+
Object.defineProperty(exports, "default_geyser_connect_config", { enumerable: true, get: function () { return geyser_connect_js_2.defaultGeyserConnectConfig; } });
|
|
262
|
+
Object.defineProperty(exports, "geyser_grpc_channel_options", { enumerable: true, get: function () { return geyser_connect_js_2.geyserGrpcChannelOptions; } });
|
|
263
|
+
var index_js_1 = require("./shredstream/index.js");
|
|
264
|
+
Object.defineProperty(exports, "ShredStreamClient", { enumerable: true, get: function () { return index_js_1.ShredStreamClient; } });
|
|
265
|
+
Object.defineProperty(exports, "ShredEventQueue", { enumerable: true, get: function () { return index_js_1.ShredEventQueue; } });
|
|
266
|
+
Object.defineProperty(exports, "dexEventsFromShredWasmTx", { enumerable: true, get: function () { return index_js_1.dexEventsFromShredWasmTx; } });
|
|
267
|
+
Object.defineProperty(exports, "dexEventsFromShredWasmTxWithFullKeys", { enumerable: true, get: function () { return index_js_1.dexEventsFromShredWasmTxWithFullKeys; } });
|
|
268
|
+
Object.defineProperty(exports, "fullAccountKeyStringsFromShredTx", { enumerable: true, get: function () { return index_js_1.fullAccountKeyStringsFromShredTx; } });
|
|
269
|
+
Object.defineProperty(exports, "loadAddressLookupTableAccounts", { enumerable: true, get: function () { return index_js_1.loadAddressLookupTableAccounts; } });
|
|
270
|
+
Object.defineProperty(exports, "bincodeVecEntryCount", { enumerable: true, get: function () { return index_js_1.bincodeVecEntryCount; } });
|
|
271
|
+
Object.defineProperty(exports, "decodeEntriesBincodeFlat", { enumerable: true, get: function () { return index_js_1.decodeEntriesBincodeFlat; } });
|
|
272
|
+
Object.defineProperty(exports, "decodeEntriesBincodeNested", { enumerable: true, get: function () { return index_js_1.decodeEntriesBincodeNested; } });
|
|
273
|
+
Object.defineProperty(exports, "decodeShredstreamEntriesBincode", { enumerable: true, get: function () { return index_js_1.decodeShredstreamEntriesBincode; } });
|
|
274
|
+
Object.defineProperty(exports, "wireBytesToShredWasmTx", { enumerable: true, get: function () { return index_js_1.wireBytesToShredWasmTx; } });
|
|
275
|
+
Object.defineProperty(exports, "defaultShredStreamConfig", { enumerable: true, get: function () { return index_js_1.defaultShredStreamConfig; } });
|
|
276
|
+
Object.defineProperty(exports, "lowLatencyShredStreamConfig", { enumerable: true, get: function () { return index_js_1.lowLatencyShredStreamConfig; } });
|
|
277
|
+
Object.defineProperty(exports, "highThroughputShredStreamConfig", { enumerable: true, get: function () { return index_js_1.highThroughputShredStreamConfig; } });
|
|
278
|
+
var index_js_2 = require("./shredstream/index.js");
|
|
279
|
+
Object.defineProperty(exports, "default_shred_stream_config", { enumerable: true, get: function () { return index_js_2.defaultShredStreamConfig; } });
|
|
280
|
+
Object.defineProperty(exports, "low_latency_shred_stream_config", { enumerable: true, get: function () { return index_js_2.lowLatencyShredStreamConfig; } });
|
|
281
|
+
Object.defineProperty(exports, "high_throughput_shred_stream_config", { enumerable: true, get: function () { return index_js_2.highThroughputShredStreamConfig; } });
|
package/dist/instr/bonk_ix.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Bonk Launchpad 指令解析
|
|
2
|
+
* Bonk / Raydium Launchpad 指令解析
|
|
3
|
+
*
|
|
4
|
+
* 1) **Program data 日志形载荷**(与 `logs/raydium_launchpad` 一致):前 8 字节为事件 disc,后跟 pool/user/金额…
|
|
5
|
+
* 2) **Anchor 外层指令**:`global:buy` / `sell` / `create_pool` / `migrate_to_amm` 等(sha256 前 8 字节),参数多为 Borsh u64。
|
|
3
6
|
*/
|
|
4
7
|
import type { DexEvent } from "../core/dex_event.js";
|
|
5
8
|
export declare function parseBonkInstruction(instructionData: Uint8Array, accounts: string[], signature: string, slot: number, txIndex: number, blockTimeUs: number | undefined, grpcRecvUs: number): DexEvent | null;
|
package/dist/instr/bonk_ix.js
CHANGED
|
@@ -2,51 +2,130 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseBonkInstruction = parseBonkInstruction;
|
|
4
4
|
const dex_event_js_1 = require("../core/dex_event.js");
|
|
5
|
+
const raydium_launchpad_js_1 = require("../logs/raydium_launchpad.js");
|
|
5
6
|
const utils_js_1 = require("./utils.js");
|
|
6
7
|
const Z = (0, dex_event_js_1.defaultPubkey)();
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
/** Anchor `sha256("global:<name>")[0..8]`,与链上 Launchpad / pAMM 系指令一致 */
|
|
9
|
+
const ANCHOR = {
|
|
10
|
+
BUY: [102, 6, 61, 18, 1, 218, 235, 234],
|
|
11
|
+
SELL: [51, 230, 133, 164, 1, 127, 131, 173],
|
|
12
|
+
BUY_EXACT_IN: [250, 234, 13, 123, 213, 156, 19, 236],
|
|
13
|
+
SELL_EXACT_OUT: [95, 200, 71, 34, 8, 9, 11, 166],
|
|
14
|
+
CREATE_POOL: [233, 146, 209, 142, 207, 104, 64, 188],
|
|
15
|
+
MIGRATE_TO_AMM: [207, 82, 192, 145, 254, 207, 145, 223],
|
|
11
16
|
};
|
|
12
|
-
function
|
|
17
|
+
function discEqU64(data, disc) {
|
|
13
18
|
if (data.length < 8)
|
|
14
19
|
return false;
|
|
15
20
|
const v = (0, utils_js_1.readU64LE)(data, 0);
|
|
16
21
|
return v === disc;
|
|
17
22
|
}
|
|
18
|
-
function
|
|
19
|
-
if (
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
function headEq(data, bytes) {
|
|
24
|
+
if (data.length < 8)
|
|
25
|
+
return false;
|
|
26
|
+
for (let i = 0; i < 8; i++)
|
|
27
|
+
if (data[i] !== bytes[i])
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
/** 与 PumpSwap buy/sell 一致:两 u64(base / quote 侧限额) */
|
|
32
|
+
function tradeFromTwoU64(payload, accounts, meta, mode) {
|
|
33
|
+
const a0 = (0, utils_js_1.readU64LE)(payload, 0) ?? 0n;
|
|
34
|
+
const a1 = (0, utils_js_1.readU64LE)(payload, 8) ?? 0n;
|
|
35
|
+
const pool = (0, utils_js_1.getAccount)(accounts, 1) ?? Z;
|
|
36
|
+
const user = (0, utils_js_1.getAccount)(accounts, 0) ?? Z;
|
|
37
|
+
if (mode === "buy") {
|
|
23
38
|
return {
|
|
24
39
|
BonkTrade: {
|
|
25
40
|
metadata: meta,
|
|
26
|
-
pool_state:
|
|
27
|
-
user
|
|
28
|
-
amount_in:
|
|
29
|
-
amount_out:
|
|
41
|
+
pool_state: pool,
|
|
42
|
+
user,
|
|
43
|
+
amount_in: a1,
|
|
44
|
+
amount_out: a0,
|
|
30
45
|
is_buy: true,
|
|
31
46
|
trade_direction: "Buy",
|
|
32
47
|
exact_in: true,
|
|
33
48
|
},
|
|
34
49
|
};
|
|
35
50
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
51
|
+
return {
|
|
52
|
+
BonkTrade: {
|
|
53
|
+
metadata: meta,
|
|
54
|
+
pool_state: pool,
|
|
55
|
+
user,
|
|
56
|
+
amount_in: a0,
|
|
57
|
+
amount_out: a1,
|
|
58
|
+
is_buy: false,
|
|
59
|
+
trade_direction: "Sell",
|
|
60
|
+
exact_in: true,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function parseBonkInstruction(instructionData, accounts, signature, slot, txIndex, blockTimeUs, grpcRecvUs) {
|
|
65
|
+
if (instructionData.length < 8)
|
|
66
|
+
return null;
|
|
67
|
+
const meta = (0, utils_js_1.ixMeta)(signature, slot, txIndex, blockTimeUs, grpcRecvUs);
|
|
68
|
+
// --- Program data 事件形(与链上 emit 载荷一致,偶见于外层) ---
|
|
69
|
+
if (discEqU64(instructionData, raydium_launchpad_js_1.BONK_DISC.TRADE)) {
|
|
70
|
+
return (0, raydium_launchpad_js_1.parseBonkTradeFromData)(instructionData.subarray(8), meta);
|
|
71
|
+
}
|
|
72
|
+
if (discEqU64(instructionData, raydium_launchpad_js_1.BONK_DISC.POOL_CREATE)) {
|
|
73
|
+
return (0, raydium_launchpad_js_1.parseBonkPoolCreateFromData)(instructionData.subarray(8), meta);
|
|
74
|
+
}
|
|
75
|
+
if (discEqU64(instructionData, raydium_launchpad_js_1.BONK_DISC.MIGRATE_AMM)) {
|
|
76
|
+
return (0, raydium_launchpad_js_1.parseBonkMigrateAmmFromData)(instructionData.subarray(8), meta);
|
|
77
|
+
}
|
|
78
|
+
const rest = instructionData.subarray(8);
|
|
79
|
+
// --- Anchor:买卖(两 u64) ---
|
|
80
|
+
if (headEq(instructionData, ANCHOR.BUY) || headEq(instructionData, ANCHOR.BUY_EXACT_IN)) {
|
|
81
|
+
if (rest.length < 16)
|
|
82
|
+
return null;
|
|
83
|
+
return tradeFromTwoU64(rest, accounts, meta, "buy");
|
|
84
|
+
}
|
|
85
|
+
if (headEq(instructionData, ANCHOR.SELL) || headEq(instructionData, ANCHOR.SELL_EXACT_OUT)) {
|
|
86
|
+
if (rest.length < 16)
|
|
87
|
+
return null;
|
|
88
|
+
return tradeFromTwoU64(rest, accounts, meta, "sell");
|
|
89
|
+
}
|
|
90
|
+
// --- create_pool:优先按日志形载荷解析;否则用账户兜底 ---
|
|
91
|
+
if (headEq(instructionData, ANCHOR.CREATE_POOL)) {
|
|
92
|
+
const parsed = (0, raydium_launchpad_js_1.parseBonkPoolCreateFromData)(rest, meta);
|
|
93
|
+
if (parsed)
|
|
94
|
+
return parsed;
|
|
95
|
+
if (accounts.length >= 9) {
|
|
96
|
+
return {
|
|
97
|
+
BonkPoolCreate: {
|
|
98
|
+
metadata: meta,
|
|
99
|
+
base_mint_param: {
|
|
100
|
+
symbol: "BONK",
|
|
101
|
+
name: "Bonk Pool",
|
|
102
|
+
uri: "https://bonk.com",
|
|
103
|
+
decimals: 5,
|
|
104
|
+
},
|
|
105
|
+
pool_state: (0, utils_js_1.getAccount)(accounts, 1) ?? Z,
|
|
106
|
+
creator: (0, utils_js_1.getAccount)(accounts, 8) ?? Z,
|
|
45
107
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
// --- migrate_to_amm ---
|
|
113
|
+
if (headEq(instructionData, ANCHOR.MIGRATE_TO_AMM)) {
|
|
114
|
+
const parsed = (0, raydium_launchpad_js_1.parseBonkMigrateAmmFromData)(rest, meta);
|
|
115
|
+
if (parsed)
|
|
116
|
+
return parsed;
|
|
117
|
+
if (rest.length >= 8 && accounts.length >= 3) {
|
|
118
|
+
return {
|
|
119
|
+
BonkMigrateAmm: {
|
|
120
|
+
metadata: meta,
|
|
121
|
+
old_pool: (0, utils_js_1.getAccount)(accounts, 0) ?? Z,
|
|
122
|
+
new_pool: (0, utils_js_1.getAccount)(accounts, 1) ?? Z,
|
|
123
|
+
user: (0, utils_js_1.getAccount)(accounts, 2) ?? Z,
|
|
124
|
+
liquidity_amount: (0, utils_js_1.readU64LE)(rest, 0) ?? 0n,
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
50
129
|
}
|
|
51
130
|
return null;
|
|
52
131
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Meteora DAMM V2 指令解析
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
|
+
* 1) **外层用户指令**(`@meteora-ag/cp-amm-sdk` / `cp_amm.json`):`swap` / `initialize_pool` / `add_liquidity` / `remove_liquidity` / `remove_all_liquidity` / `create_position` / `close_position` 等
|
|
5
|
+
* 2) **CPI 事件形**:前 8 字节为外层 Anchor discriminator,8..16 为 `emit!` 事件 disc,16.. 为载荷。
|
|
4
6
|
*/
|
|
5
7
|
import type { DexEvent } from "../core/dex_event.js";
|
|
6
|
-
export declare function parseMeteoraDammInstruction(instructionData: Uint8Array,
|
|
8
|
+
export declare function parseMeteoraDammInstruction(instructionData: Uint8Array, accounts: string[], signature: string, slot: number, txIndex: number, blockTimeUs: number | undefined, grpcRecvUs: number): DexEvent | null;
|