@velocity-exchange/sdk 0.0.5 → 0.2.0
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/.prettierignore +1 -1
- package/CHANGELOG.md +35 -0
- package/README.md +30 -30
- package/bun.lock +24 -2
- package/lib/browser/accounts/basicUserAccountSubscriber.d.ts +5 -3
- package/lib/browser/accounts/basicUserAccountSubscriber.js +4 -3
- package/lib/browser/accounts/basicUserStatsAccountSubscriber.d.ts +5 -3
- package/lib/browser/accounts/basicUserStatsAccountSubscriber.js +4 -3
- package/lib/browser/accounts/bulkAccountLoader.d.ts +5 -5
- package/lib/browser/accounts/bulkAccountLoader.js +12 -1
- package/lib/browser/accounts/grpcAccountSubscriber.d.ts +2 -1
- package/lib/browser/accounts/grpcAccountSubscriber.js +8 -2
- package/lib/browser/accounts/grpcMultiAccountSubscriber.d.ts +3 -2
- package/lib/browser/accounts/grpcMultiAccountSubscriber.js +13 -5
- package/lib/browser/accounts/grpcMultiUserAccountSubscriber.d.ts +2 -1
- package/lib/browser/accounts/grpcMultiUserAccountSubscriber.js +12 -8
- package/lib/browser/accounts/grpcProgramAccountSubscriber.d.ts +2 -1
- package/lib/browser/accounts/grpcProgramAccountSubscriber.js +9 -3
- package/lib/browser/accounts/grpcVelocityClientAccountSubscriber.d.ts +0 -4
- package/lib/browser/accounts/grpcVelocityClientAccountSubscriber.js +19 -6
- package/lib/browser/accounts/grpcVelocityClientAccountSubscriberV2.d.ts +1 -5
- package/lib/browser/accounts/grpcVelocityClientAccountSubscriberV2.js +44 -23
- package/lib/browser/accounts/laserProgramAccountSubscriber.js +4 -1
- package/lib/browser/accounts/oneShotUserAccountSubscriber.js +4 -3
- package/lib/browser/accounts/oneShotUserStatsAccountSubscriber.js +7 -3
- package/lib/browser/accounts/pollingInsuranceFundStakeAccountSubscriber.d.ts +4 -2
- package/lib/browser/accounts/pollingInsuranceFundStakeAccountSubscriber.js +3 -3
- package/lib/browser/accounts/pollingOracleAccountSubscriber.d.ts +0 -2
- package/lib/browser/accounts/pollingOracleAccountSubscriber.js +16 -5
- package/lib/browser/accounts/pollingTokenAccountSubscriber.d.ts +0 -2
- package/lib/browser/accounts/pollingTokenAccountSubscriber.js +16 -5
- package/lib/browser/accounts/pollingUserAccountSubscriber.d.ts +8 -4
- package/lib/browser/accounts/pollingUserAccountSubscriber.js +17 -11
- package/lib/browser/accounts/pollingUserStatsAccountSubscriber.d.ts +4 -2
- package/lib/browser/accounts/pollingUserStatsAccountSubscriber.js +6 -6
- package/lib/browser/accounts/pollingVelocityClientAccountSubscriber.d.ts +7 -5
- package/lib/browser/accounts/pollingVelocityClientAccountSubscriber.js +69 -35
- package/lib/browser/accounts/types.d.ts +6 -12
- package/lib/browser/accounts/utils.d.ts +1 -0
- package/lib/browser/accounts/utils.js +10 -3
- package/lib/browser/accounts/webSocketAccountSubscriber.d.ts +4 -2
- package/lib/browser/accounts/webSocketAccountSubscriber.js +17 -5
- package/lib/browser/accounts/webSocketAccountSubscriberV2.d.ts +4 -2
- package/lib/browser/accounts/webSocketAccountSubscriberV2.js +17 -6
- package/lib/browser/accounts/webSocketInsuranceFundStakeAccountSubscriber.d.ts +4 -2
- package/lib/browser/accounts/webSocketInsuranceFundStakeAccountSubscriber.js +9 -0
- package/lib/browser/accounts/webSocketProgramAccountSubscriber.d.ts +3 -1
- package/lib/browser/accounts/webSocketProgramAccountSubscriber.js +14 -3
- package/lib/browser/accounts/webSocketProgramAccountSubscriberV2.d.ts +3 -1
- package/lib/browser/accounts/webSocketProgramAccountSubscriberV2.js +15 -3
- package/lib/browser/accounts/webSocketProgramAccountsSubscriberV2.d.ts +3 -1
- package/lib/browser/accounts/webSocketProgramAccountsSubscriberV2.js +14 -4
- package/lib/browser/accounts/webSocketUserAccountSubscriber.d.ts +4 -2
- package/lib/browser/accounts/webSocketUserAccountSubscriber.js +9 -0
- package/lib/browser/accounts/webSocketUserStatsAccountSubsriber.d.ts +4 -2
- package/lib/browser/accounts/webSocketUserStatsAccountSubsriber.js +9 -0
- package/lib/browser/accounts/webSocketVelocityClientAccountSubscriber.d.ts +4 -8
- package/lib/browser/accounts/webSocketVelocityClientAccountSubscriber.js +52 -26
- package/lib/browser/accounts/webSocketVelocityClientAccountSubscriberV2.d.ts +7 -7
- package/lib/browser/accounts/webSocketVelocityClientAccountSubscriberV2.js +49 -20
- package/lib/browser/accounts/websocketProgramUserAccountSubscriber.d.ts +1 -1
- package/lib/browser/accounts/websocketProgramUserAccountSubscriber.js +0 -3
- package/lib/browser/addresses/marketAddresses.js +3 -2
- package/lib/browser/addresses/pda.d.ts +1 -9
- package/lib/browser/addresses/pda.js +4 -23
- package/lib/browser/adminClient.d.ts +25 -29
- package/lib/browser/adminClient.js +168 -169
- package/lib/browser/auctionSubscriber/auctionSubscriber.d.ts +2 -4
- package/lib/browser/auctionSubscriber/auctionSubscriber.js +8 -10
- package/lib/browser/auctionSubscriber/auctionSubscriberGrpc.d.ts +2 -4
- package/lib/browser/auctionSubscriber/auctionSubscriberGrpc.js +11 -10
- package/lib/browser/auctionSubscriber/types.d.ts +3 -2
- package/lib/browser/bankrun/bankrunConnection.d.ts +6 -4
- package/lib/browser/bankrun/bankrunConnection.js +69 -31
- package/lib/browser/blockhashSubscriber/BlockhashSubscriber.d.ts +1 -1
- package/lib/browser/blockhashSubscriber/BlockhashSubscriber.js +3 -2
- package/lib/browser/clock/clockSubscriber.d.ts +6 -6
- package/lib/browser/clock/clockSubscriber.js +4 -3
- package/lib/browser/config.d.ts +11 -20
- package/lib/browser/config.js +13 -36
- package/lib/browser/constants/index.d.ts +1 -2
- package/lib/browser/constants/index.js +1 -2
- package/lib/browser/constants/numericConstants.d.ts +1 -3
- package/lib/browser/constants/numericConstants.js +3 -5
- package/lib/browser/constituentMap/constituentMap.d.ts +0 -2
- package/lib/browser/constituentMap/constituentMap.js +10 -6
- package/lib/browser/constituentMap/pollingConstituentAccountSubscriber.js +3 -2
- package/lib/browser/constituentMap/webSocketConstituentAccountSubscriber.d.ts +2 -3
- package/lib/browser/constituentMap/webSocketConstituentAccountSubscriber.js +10 -3
- package/lib/browser/core/VelocityCore.d.ts +9 -15
- package/lib/browser/core/VelocityCore.js +5 -7
- package/lib/browser/core/instructions/perpOrders.d.ts +14 -0
- package/lib/browser/core/instructions/perpOrders.js +14 -0
- package/lib/browser/core/instructions/withdraw.d.ts +1 -1
- package/lib/browser/core/instructions/withdraw.js +1 -1
- package/lib/browser/core/remainingAccounts.d.ts +2 -2
- package/lib/browser/core/remainingAccounts.js +5 -5
- package/lib/browser/decode/user.js +9 -1
- package/lib/browser/dlob/DLOB.d.ts +7 -2
- package/lib/browser/dlob/DLOB.js +205 -142
- package/lib/browser/dlob/DLOBNode.d.ts +5 -2
- package/lib/browser/dlob/DLOBNode.js +7 -0
- package/lib/browser/dlob/DLOBSubscriber.d.ts +0 -2
- package/lib/browser/dlob/DLOBSubscriber.js +39 -39
- package/lib/browser/dlob/NodeList.js +8 -7
- package/lib/browser/dlob/orderBookLevels.js +24 -17
- package/lib/browser/dlob/types.d.ts +0 -2
- package/lib/browser/events/eventList.js +4 -1
- package/lib/browser/events/eventSubscriber.d.ts +6 -3
- package/lib/browser/events/eventSubscriber.js +75 -26
- package/lib/browser/events/eventsServerLogProvider.d.ts +1 -1
- package/lib/browser/events/eventsServerLogProvider.js +17 -10
- package/lib/browser/events/fetchLogs.d.ts +1 -1
- package/lib/browser/events/fetchLogs.js +4 -2
- package/lib/browser/events/parse.js +14 -14
- package/lib/browser/events/pollingLogProvider.d.ts +1 -1
- package/lib/browser/events/pollingLogProvider.js +1 -0
- package/lib/browser/events/txEventCache.js +6 -2
- package/lib/browser/events/types.d.ts +3 -7
- package/lib/browser/events/types.js +1 -3
- package/lib/browser/events/webSocketLogProvider.d.ts +1 -1
- package/lib/browser/events/webSocketLogProvider.js +5 -2
- package/lib/browser/factory/bigNum.js +1 -1
- package/lib/{node/idl/drift.d.ts → browser/idl/velocity.d.ts} +2412 -2481
- package/lib/browser/idl/{drift.json → velocity.json} +2265 -2333
- package/lib/browser/index.d.ts +1 -3
- package/lib/browser/index.js +1 -4
- package/lib/browser/jupiter/jupiterClient.d.ts +1 -1
- package/lib/browser/jupiter/jupiterClient.js +18 -8
- package/lib/browser/marginCalculation.js +1 -0
- package/lib/browser/math/amm.d.ts +31 -13
- package/lib/browser/math/amm.js +87 -31
- package/lib/browser/math/auction.js +16 -12
- package/lib/browser/math/bankruptcy.js +1 -1
- package/lib/browser/math/builder.d.ts +18 -1
- package/lib/browser/math/builder.js +32 -1
- package/lib/browser/math/funding.js +30 -30
- package/lib/browser/math/insurance.d.ts +1 -1
- package/lib/browser/math/insurance.js +4 -5
- package/lib/browser/math/margin.d.ts +3 -11
- package/lib/browser/math/margin.js +10 -69
- package/lib/browser/math/market.d.ts +4 -12
- package/lib/browser/math/market.js +12 -46
- package/lib/browser/math/oracles.d.ts +4 -7
- package/lib/browser/math/oracles.js +24 -37
- package/lib/browser/math/orders.d.ts +2 -7
- package/lib/browser/math/orders.js +9 -81
- package/lib/browser/math/position.d.ts +0 -4
- package/lib/browser/math/position.js +6 -11
- package/lib/browser/math/repeg.d.ts +0 -1
- package/lib/browser/math/repeg.js +1 -23
- package/lib/browser/math/spotBalance.d.ts +4 -4
- package/lib/browser/math/spotBalance.js +6 -6
- package/lib/browser/math/spotMarket.d.ts +0 -6
- package/lib/browser/math/spotMarket.js +1 -16
- package/lib/browser/math/spotPosition.d.ts +4 -4
- package/lib/browser/math/state.d.ts +0 -2
- package/lib/browser/math/state.js +1 -9
- package/lib/browser/math/superStake.d.ts +11 -63
- package/lib/browser/math/superStake.js +29 -28
- package/lib/browser/math/trade.js +7 -7
- package/lib/browser/math/utils.d.ts +1 -1
- package/lib/browser/math/utils.js +1 -1
- package/lib/browser/memcmp.d.ts +0 -1
- package/lib/browser/memcmp.js +1 -10
- package/lib/browser/oracles/prelaunchOracleClient.js +3 -2
- package/lib/browser/oracles/pythClient.js +9 -3
- package/lib/browser/oracles/pythLazerClient.js +5 -4
- package/lib/browser/oracles/utils.d.ts +4 -0
- package/lib/browser/oracles/utils.js +9 -1
- package/lib/browser/orderSubscriber/OrderSubscriber.d.ts +1 -3
- package/lib/browser/orderSubscriber/OrderSubscriber.js +16 -14
- package/lib/browser/orderSubscriber/WebsocketSubscription.js +1 -1
- package/lib/browser/orderSubscriber/grpcSubscription.js +2 -2
- package/lib/browser/orderSubscriber/types.d.ts +0 -2
- package/lib/browser/priorityFee/heliusPriorityFeeMethod.d.ts +1 -1
- package/lib/browser/priorityFee/priorityFeeSubscriber.d.ts +2 -6
- package/lib/browser/priorityFee/priorityFeeSubscriber.js +34 -18
- package/lib/browser/priorityFee/priorityFeeSubscriberMap.d.ts +0 -4
- package/lib/browser/priorityFee/priorityFeeSubscriberMap.js +3 -11
- package/lib/browser/priorityFee/solanaPriorityFeeMethod.d.ts +1 -1
- package/lib/browser/priorityFee/types.d.ts +3 -8
- package/lib/browser/priorityFee/velocityPriorityFeeMethod.d.ts +0 -8
- package/lib/browser/priorityFee/velocityPriorityFeeMethod.js +1 -3
- package/lib/browser/pyth/pythLazerSubscriber.d.ts +1 -1
- package/lib/browser/pyth/pythLazerSubscriber.js +1 -1
- package/lib/browser/pyth/types.d.ts +0 -1
- package/lib/browser/slot/SlotSubscriber.d.ts +1 -1
- package/lib/browser/slot/SlotSubscriber.js +2 -1
- package/lib/browser/slot/SlothashSubscriber.d.ts +3 -2
- package/lib/browser/slot/SlothashSubscriber.js +11 -4
- package/lib/browser/swap/UnifiedSwapClient.js +1 -1
- package/lib/browser/swift/grpcSignedMsgUserAccountSubscriber.d.ts +0 -3
- package/lib/browser/swift/grpcSignedMsgUserAccountSubscriber.js +5 -5
- package/lib/browser/swift/signedMsgUserAccountSubscriber.d.ts +7 -7
- package/lib/browser/swift/signedMsgUserAccountSubscriber.js +14 -10
- package/lib/browser/swift/swiftOrderSubscriber.d.ts +7 -6
- package/lib/browser/swift/swiftOrderSubscriber.js +15 -16
- package/lib/browser/testClient.js +3 -2
- package/lib/browser/tokenFaucet.js +16 -2
- package/lib/browser/tx/baseTxSender.d.ts +4 -4
- package/lib/browser/tx/baseTxSender.js +5 -4
- package/lib/browser/tx/fastSingleTxSender.d.ts +3 -3
- package/lib/browser/tx/fastSingleTxSender.js +9 -5
- package/lib/browser/tx/reportTransactionError.d.ts +2 -2
- package/lib/browser/tx/reportTransactionError.js +5 -1
- package/lib/browser/tx/retryTxSender.d.ts +1 -1
- package/lib/browser/tx/retryTxSender.js +4 -2
- package/lib/browser/tx/txHandler.d.ts +7 -1
- package/lib/browser/tx/txHandler.js +54 -40
- package/lib/browser/tx/txParamProcessor.d.ts +4 -1
- package/lib/browser/tx/txParamProcessor.js +6 -0
- package/lib/browser/tx/types.d.ts +1 -1
- package/lib/browser/tx/whileValidTxSender.d.ts +1 -6
- package/lib/browser/tx/whileValidTxSender.js +35 -13
- package/lib/browser/types.d.ts +102 -157
- package/lib/browser/types.js +6 -2
- package/lib/browser/user.d.ts +22 -10
- package/lib/browser/user.js +174 -154
- package/lib/browser/userConfig.d.ts +3 -2
- package/lib/browser/userMap/WebsocketSubscription.d.ts +1 -1
- package/lib/browser/userMap/WebsocketSubscription.js +1 -1
- package/lib/browser/userMap/grpcSubscription.d.ts +1 -1
- package/lib/browser/userMap/grpcSubscription.js +1 -1
- package/lib/browser/userMap/referrerMap.d.ts +0 -2
- package/lib/browser/userMap/referrerMap.js +10 -7
- package/lib/browser/userMap/revenueShareEscrowMap.d.ts +0 -2
- package/lib/browser/userMap/revenueShareEscrowMap.js +4 -4
- package/lib/browser/userMap/userMap.d.ts +3 -5
- package/lib/browser/userMap/userMap.js +39 -30
- package/lib/browser/userMap/userMapConfig.d.ts +3 -2
- package/lib/browser/userMap/userStatsMap.d.ts +1 -3
- package/lib/browser/userMap/userStatsMap.js +18 -17
- package/lib/browser/userStats.d.ts +7 -4
- package/lib/browser/userStats.js +28 -18
- package/lib/browser/userStatsConfig.d.ts +3 -2
- package/lib/browser/util/TransactionConfirmationManager.js +4 -2
- package/lib/browser/util/chainClock.d.ts +1 -1
- package/lib/browser/util/computeUnits.d.ts +1 -1
- package/lib/browser/util/computeUnits.js +6 -1
- package/lib/browser/util/ed25519Utils.d.ts +1 -1
- package/lib/browser/util/ed25519Utils.js +1 -1
- package/lib/browser/velocityClient.d.ts +144 -71
- package/lib/browser/velocityClient.js +653 -457
- package/lib/browser/velocityClientConfig.d.ts +0 -8
- package/lib/node/accounts/basicUserAccountSubscriber.d.ts +5 -3
- package/lib/node/accounts/basicUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/basicUserAccountSubscriber.js +4 -3
- package/lib/node/accounts/basicUserStatsAccountSubscriber.d.ts +5 -3
- package/lib/node/accounts/basicUserStatsAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/basicUserStatsAccountSubscriber.js +4 -3
- package/lib/node/accounts/bulkAccountLoader.d.ts +5 -5
- package/lib/node/accounts/bulkAccountLoader.d.ts.map +1 -1
- package/lib/node/accounts/bulkAccountLoader.js +12 -1
- package/lib/node/accounts/grpcAccountSubscriber.d.ts +2 -1
- package/lib/node/accounts/grpcAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/grpcAccountSubscriber.js +8 -2
- package/lib/node/accounts/grpcMultiAccountSubscriber.d.ts +3 -2
- package/lib/node/accounts/grpcMultiAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/grpcMultiAccountSubscriber.js +13 -5
- package/lib/node/accounts/grpcMultiUserAccountSubscriber.d.ts +2 -1
- package/lib/node/accounts/grpcMultiUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/grpcMultiUserAccountSubscriber.js +12 -8
- package/lib/node/accounts/grpcProgramAccountSubscriber.d.ts +2 -1
- package/lib/node/accounts/grpcProgramAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/grpcProgramAccountSubscriber.js +9 -3
- package/lib/node/accounts/grpcVelocityClientAccountSubscriber.d.ts +0 -4
- package/lib/node/accounts/grpcVelocityClientAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/grpcVelocityClientAccountSubscriber.js +19 -6
- package/lib/node/accounts/grpcVelocityClientAccountSubscriberV2.d.ts +1 -5
- package/lib/node/accounts/grpcVelocityClientAccountSubscriberV2.d.ts.map +1 -1
- package/lib/node/accounts/grpcVelocityClientAccountSubscriberV2.js +44 -23
- package/lib/node/accounts/laserProgramAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/laserProgramAccountSubscriber.js +4 -1
- package/lib/node/accounts/oneShotUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/oneShotUserAccountSubscriber.js +4 -3
- package/lib/node/accounts/oneShotUserStatsAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/oneShotUserStatsAccountSubscriber.js +7 -3
- package/lib/node/accounts/pollingInsuranceFundStakeAccountSubscriber.d.ts +4 -2
- package/lib/node/accounts/pollingInsuranceFundStakeAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/pollingInsuranceFundStakeAccountSubscriber.js +3 -3
- package/lib/node/accounts/pollingOracleAccountSubscriber.d.ts +0 -2
- package/lib/node/accounts/pollingOracleAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/pollingOracleAccountSubscriber.js +16 -5
- package/lib/node/accounts/pollingTokenAccountSubscriber.d.ts +0 -2
- package/lib/node/accounts/pollingTokenAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/pollingTokenAccountSubscriber.js +16 -5
- package/lib/node/accounts/pollingUserAccountSubscriber.d.ts +8 -4
- package/lib/node/accounts/pollingUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/pollingUserAccountSubscriber.js +17 -11
- package/lib/node/accounts/pollingUserStatsAccountSubscriber.d.ts +4 -2
- package/lib/node/accounts/pollingUserStatsAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/pollingUserStatsAccountSubscriber.js +6 -6
- package/lib/node/accounts/pollingVelocityClientAccountSubscriber.d.ts +7 -5
- package/lib/node/accounts/pollingVelocityClientAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/pollingVelocityClientAccountSubscriber.js +69 -35
- package/lib/node/accounts/types.d.ts +6 -12
- package/lib/node/accounts/types.d.ts.map +1 -1
- package/lib/node/accounts/utils.d.ts +1 -0
- package/lib/node/accounts/utils.d.ts.map +1 -1
- package/lib/node/accounts/utils.js +10 -3
- package/lib/node/accounts/webSocketAccountSubscriber.d.ts +4 -2
- package/lib/node/accounts/webSocketAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/webSocketAccountSubscriber.js +17 -5
- package/lib/node/accounts/webSocketAccountSubscriberV2.d.ts +4 -2
- package/lib/node/accounts/webSocketAccountSubscriberV2.d.ts.map +1 -1
- package/lib/node/accounts/webSocketAccountSubscriberV2.js +17 -6
- package/lib/node/accounts/webSocketInsuranceFundStakeAccountSubscriber.d.ts +4 -2
- package/lib/node/accounts/webSocketInsuranceFundStakeAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/webSocketInsuranceFundStakeAccountSubscriber.js +9 -0
- package/lib/node/accounts/webSocketProgramAccountSubscriber.d.ts +3 -1
- package/lib/node/accounts/webSocketProgramAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/webSocketProgramAccountSubscriber.js +14 -3
- package/lib/node/accounts/webSocketProgramAccountSubscriberV2.d.ts +3 -1
- package/lib/node/accounts/webSocketProgramAccountSubscriberV2.d.ts.map +1 -1
- package/lib/node/accounts/webSocketProgramAccountSubscriberV2.js +15 -3
- package/lib/node/accounts/webSocketProgramAccountsSubscriberV2.d.ts +3 -1
- package/lib/node/accounts/webSocketProgramAccountsSubscriberV2.d.ts.map +1 -1
- package/lib/node/accounts/webSocketProgramAccountsSubscriberV2.js +14 -4
- package/lib/node/accounts/webSocketUserAccountSubscriber.d.ts +4 -2
- package/lib/node/accounts/webSocketUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/webSocketUserAccountSubscriber.js +9 -0
- package/lib/node/accounts/webSocketUserStatsAccountSubsriber.d.ts +4 -2
- package/lib/node/accounts/webSocketUserStatsAccountSubsriber.d.ts.map +1 -1
- package/lib/node/accounts/webSocketUserStatsAccountSubsriber.js +9 -0
- package/lib/node/accounts/webSocketVelocityClientAccountSubscriber.d.ts +4 -8
- package/lib/node/accounts/webSocketVelocityClientAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/webSocketVelocityClientAccountSubscriber.js +52 -26
- package/lib/node/accounts/webSocketVelocityClientAccountSubscriberV2.d.ts +7 -7
- package/lib/node/accounts/webSocketVelocityClientAccountSubscriberV2.d.ts.map +1 -1
- package/lib/node/accounts/webSocketVelocityClientAccountSubscriberV2.js +49 -20
- package/lib/node/accounts/websocketProgramUserAccountSubscriber.d.ts +1 -1
- package/lib/node/accounts/websocketProgramUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/websocketProgramUserAccountSubscriber.js +0 -3
- package/lib/node/addresses/marketAddresses.d.ts.map +1 -1
- package/lib/node/addresses/marketAddresses.js +3 -2
- package/lib/node/addresses/pda.d.ts +1 -9
- package/lib/node/addresses/pda.d.ts.map +1 -1
- package/lib/node/addresses/pda.js +4 -23
- package/lib/node/adminClient.d.ts +25 -29
- package/lib/node/adminClient.d.ts.map +1 -1
- package/lib/node/adminClient.js +168 -169
- package/lib/node/auctionSubscriber/auctionSubscriber.d.ts +2 -4
- package/lib/node/auctionSubscriber/auctionSubscriber.d.ts.map +1 -1
- package/lib/node/auctionSubscriber/auctionSubscriber.js +8 -10
- package/lib/node/auctionSubscriber/auctionSubscriberGrpc.d.ts +2 -4
- package/lib/node/auctionSubscriber/auctionSubscriberGrpc.d.ts.map +1 -1
- package/lib/node/auctionSubscriber/auctionSubscriberGrpc.js +11 -10
- package/lib/node/auctionSubscriber/types.d.ts +3 -2
- package/lib/node/auctionSubscriber/types.d.ts.map +1 -1
- package/lib/node/bankrun/bankrunConnection.d.ts +6 -4
- package/lib/node/bankrun/bankrunConnection.d.ts.map +1 -1
- package/lib/node/bankrun/bankrunConnection.js +69 -31
- package/lib/node/blockhashSubscriber/BlockhashSubscriber.d.ts +1 -1
- package/lib/node/blockhashSubscriber/BlockhashSubscriber.d.ts.map +1 -1
- package/lib/node/blockhashSubscriber/BlockhashSubscriber.js +3 -2
- package/lib/node/clock/clockSubscriber.d.ts +6 -6
- package/lib/node/clock/clockSubscriber.d.ts.map +1 -1
- package/lib/node/clock/clockSubscriber.js +4 -3
- package/lib/node/config.d.ts +11 -20
- package/lib/node/config.d.ts.map +1 -1
- package/lib/node/config.js +13 -36
- package/lib/node/constants/index.d.ts +1 -2
- package/lib/node/constants/index.d.ts.map +1 -1
- package/lib/node/constants/index.js +1 -2
- package/lib/node/constants/numericConstants.d.ts +1 -3
- package/lib/node/constants/numericConstants.d.ts.map +1 -1
- package/lib/node/constants/numericConstants.js +3 -5
- package/lib/node/constituentMap/constituentMap.d.ts +0 -2
- package/lib/node/constituentMap/constituentMap.d.ts.map +1 -1
- package/lib/node/constituentMap/constituentMap.js +10 -6
- package/lib/node/constituentMap/pollingConstituentAccountSubscriber.d.ts.map +1 -1
- package/lib/node/constituentMap/pollingConstituentAccountSubscriber.js +3 -2
- package/lib/node/constituentMap/webSocketConstituentAccountSubscriber.d.ts +2 -3
- package/lib/node/constituentMap/webSocketConstituentAccountSubscriber.d.ts.map +1 -1
- package/lib/node/constituentMap/webSocketConstituentAccountSubscriber.js +10 -3
- package/lib/node/core/VelocityCore.d.ts +9 -15
- package/lib/node/core/VelocityCore.d.ts.map +1 -1
- package/lib/node/core/VelocityCore.js +5 -7
- package/lib/node/core/instructions/perpOrders.d.ts +14 -0
- package/lib/node/core/instructions/perpOrders.d.ts.map +1 -1
- package/lib/node/core/instructions/perpOrders.js +14 -0
- package/lib/node/core/instructions/withdraw.d.ts +1 -1
- package/lib/node/core/instructions/withdraw.d.ts.map +1 -1
- package/lib/node/core/instructions/withdraw.js +1 -1
- package/lib/node/core/remainingAccounts.d.ts +2 -2
- package/lib/node/core/remainingAccounts.d.ts.map +1 -1
- package/lib/node/core/remainingAccounts.js +5 -5
- package/lib/node/decode/user.d.ts.map +1 -1
- package/lib/node/decode/user.js +9 -1
- package/lib/node/dlob/DLOB.d.ts +7 -2
- package/lib/node/dlob/DLOB.d.ts.map +1 -1
- package/lib/node/dlob/DLOB.js +205 -142
- package/lib/node/dlob/DLOBNode.d.ts +5 -2
- package/lib/node/dlob/DLOBNode.d.ts.map +1 -1
- package/lib/node/dlob/DLOBNode.js +7 -0
- package/lib/node/dlob/DLOBSubscriber.d.ts +0 -2
- package/lib/node/dlob/DLOBSubscriber.d.ts.map +1 -1
- package/lib/node/dlob/DLOBSubscriber.js +39 -39
- package/lib/node/dlob/NodeList.d.ts.map +1 -1
- package/lib/node/dlob/NodeList.js +8 -7
- package/lib/node/dlob/orderBookLevels.d.ts.map +1 -1
- package/lib/node/dlob/orderBookLevels.js +24 -17
- package/lib/node/dlob/types.d.ts +0 -2
- package/lib/node/dlob/types.d.ts.map +1 -1
- package/lib/node/events/eventList.d.ts +3 -3
- package/lib/node/events/eventList.d.ts.map +1 -1
- package/lib/node/events/eventList.js +4 -1
- package/lib/node/events/eventSubscriber.d.ts +6 -3
- package/lib/node/events/eventSubscriber.d.ts.map +1 -1
- package/lib/node/events/eventSubscriber.js +75 -26
- package/lib/node/events/eventsServerLogProvider.d.ts +2 -2
- package/lib/node/events/eventsServerLogProvider.d.ts.map +1 -1
- package/lib/node/events/eventsServerLogProvider.js +17 -10
- package/lib/node/events/fetchLogs.d.ts +1 -1
- package/lib/node/events/fetchLogs.d.ts.map +1 -1
- package/lib/node/events/fetchLogs.js +4 -2
- package/lib/node/events/parse.d.ts.map +1 -1
- package/lib/node/events/parse.js +14 -14
- package/lib/node/events/pollingLogProvider.d.ts +2 -2
- package/lib/node/events/pollingLogProvider.d.ts.map +1 -1
- package/lib/node/events/pollingLogProvider.js +1 -0
- package/lib/node/events/txEventCache.d.ts +3 -3
- package/lib/node/events/txEventCache.d.ts.map +1 -1
- package/lib/node/events/txEventCache.js +6 -2
- package/lib/node/events/types.d.ts +3 -7
- package/lib/node/events/types.d.ts.map +1 -1
- package/lib/node/events/types.js +1 -3
- package/lib/node/events/webSocketLogProvider.d.ts +2 -2
- package/lib/node/events/webSocketLogProvider.d.ts.map +1 -1
- package/lib/node/events/webSocketLogProvider.js +5 -2
- package/lib/node/factory/bigNum.js +1 -1
- package/lib/{browser/idl/drift.d.ts → node/idl/velocity.d.ts} +2413 -2480
- package/lib/node/idl/velocity.d.ts.map +1 -0
- package/lib/node/idl/{drift.json → velocity.json} +2265 -2333
- package/lib/node/index.d.ts +1 -3
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +1 -4
- package/lib/node/jupiter/jupiterClient.d.ts +1 -1
- package/lib/node/jupiter/jupiterClient.d.ts.map +1 -1
- package/lib/node/jupiter/jupiterClient.js +18 -8
- package/lib/node/marginCalculation.d.ts.map +1 -1
- package/lib/node/marginCalculation.js +1 -0
- package/lib/node/math/amm.d.ts +31 -13
- package/lib/node/math/amm.d.ts.map +1 -1
- package/lib/node/math/amm.js +87 -31
- package/lib/node/math/auction.d.ts.map +1 -1
- package/lib/node/math/auction.js +16 -12
- package/lib/node/math/bankruptcy.js +1 -1
- package/lib/node/math/builder.d.ts +18 -1
- package/lib/node/math/builder.d.ts.map +1 -1
- package/lib/node/math/builder.js +32 -1
- package/lib/node/math/funding.d.ts.map +1 -1
- package/lib/node/math/funding.js +30 -30
- package/lib/node/math/insurance.d.ts +1 -1
- package/lib/node/math/insurance.d.ts.map +1 -1
- package/lib/node/math/insurance.js +4 -5
- package/lib/node/math/margin.d.ts +3 -11
- package/lib/node/math/margin.d.ts.map +1 -1
- package/lib/node/math/margin.js +10 -69
- package/lib/node/math/market.d.ts +4 -12
- package/lib/node/math/market.d.ts.map +1 -1
- package/lib/node/math/market.js +12 -46
- package/lib/node/math/oracles.d.ts +4 -7
- package/lib/node/math/oracles.d.ts.map +1 -1
- package/lib/node/math/oracles.js +24 -37
- package/lib/node/math/orders.d.ts +2 -7
- package/lib/node/math/orders.d.ts.map +1 -1
- package/lib/node/math/orders.js +9 -81
- package/lib/node/math/position.d.ts +1 -5
- package/lib/node/math/position.d.ts.map +1 -1
- package/lib/node/math/position.js +6 -11
- package/lib/node/math/repeg.d.ts +0 -1
- package/lib/node/math/repeg.d.ts.map +1 -1
- package/lib/node/math/repeg.js +1 -23
- package/lib/node/math/spotBalance.d.ts +4 -4
- package/lib/node/math/spotBalance.d.ts.map +1 -1
- package/lib/node/math/spotBalance.js +6 -6
- package/lib/node/math/spotMarket.d.ts +0 -6
- package/lib/node/math/spotMarket.d.ts.map +1 -1
- package/lib/node/math/spotMarket.js +1 -16
- package/lib/node/math/spotPosition.d.ts +4 -4
- package/lib/node/math/spotPosition.d.ts.map +1 -1
- package/lib/node/math/state.d.ts +0 -2
- package/lib/node/math/state.d.ts.map +1 -1
- package/lib/node/math/state.js +1 -9
- package/lib/node/math/superStake.d.ts +11 -63
- package/lib/node/math/superStake.d.ts.map +1 -1
- package/lib/node/math/superStake.js +29 -28
- package/lib/node/math/trade.d.ts +2 -2
- package/lib/node/math/trade.d.ts.map +1 -1
- package/lib/node/math/trade.js +7 -7
- package/lib/node/math/utils.d.ts +1 -1
- package/lib/node/math/utils.js +1 -1
- package/lib/node/memcmp.d.ts +0 -1
- package/lib/node/memcmp.d.ts.map +1 -1
- package/lib/node/memcmp.js +1 -10
- package/lib/node/oracles/oracleClientCache.d.ts +1 -1
- package/lib/node/oracles/prelaunchOracleClient.d.ts.map +1 -1
- package/lib/node/oracles/prelaunchOracleClient.js +3 -2
- package/lib/node/oracles/pythClient.d.ts.map +1 -1
- package/lib/node/oracles/pythClient.js +9 -3
- package/lib/node/oracles/pythLazerClient.d.ts.map +1 -1
- package/lib/node/oracles/pythLazerClient.js +5 -4
- package/lib/node/oracles/utils.d.ts +4 -0
- package/lib/node/oracles/utils.d.ts.map +1 -1
- package/lib/node/oracles/utils.js +9 -1
- package/lib/node/orderSubscriber/OrderSubscriber.d.ts +1 -3
- package/lib/node/orderSubscriber/OrderSubscriber.d.ts.map +1 -1
- package/lib/node/orderSubscriber/OrderSubscriber.js +16 -14
- package/lib/node/orderSubscriber/WebsocketSubscription.js +1 -1
- package/lib/node/orderSubscriber/grpcSubscription.js +2 -2
- package/lib/node/orderSubscriber/types.d.ts +0 -2
- package/lib/node/orderSubscriber/types.d.ts.map +1 -1
- package/lib/node/priorityFee/heliusPriorityFeeMethod.d.ts +1 -1
- package/lib/node/priorityFee/heliusPriorityFeeMethod.d.ts.map +1 -1
- package/lib/node/priorityFee/priorityFeeSubscriber.d.ts +2 -6
- package/lib/node/priorityFee/priorityFeeSubscriber.d.ts.map +1 -1
- package/lib/node/priorityFee/priorityFeeSubscriber.js +34 -18
- package/lib/node/priorityFee/priorityFeeSubscriberMap.d.ts +0 -4
- package/lib/node/priorityFee/priorityFeeSubscriberMap.d.ts.map +1 -1
- package/lib/node/priorityFee/priorityFeeSubscriberMap.js +3 -11
- package/lib/node/priorityFee/solanaPriorityFeeMethod.d.ts +1 -1
- package/lib/node/priorityFee/solanaPriorityFeeMethod.d.ts.map +1 -1
- package/lib/node/priorityFee/types.d.ts +3 -8
- package/lib/node/priorityFee/types.d.ts.map +1 -1
- package/lib/node/priorityFee/velocityPriorityFeeMethod.d.ts +0 -8
- package/lib/node/priorityFee/velocityPriorityFeeMethod.d.ts.map +1 -1
- package/lib/node/priorityFee/velocityPriorityFeeMethod.js +1 -3
- package/lib/node/pyth/pythLazerSubscriber.d.ts +1 -1
- package/lib/node/pyth/pythLazerSubscriber.js +1 -1
- package/lib/node/pyth/types.d.ts +0 -1
- package/lib/node/pyth/types.d.ts.map +1 -1
- package/lib/node/slot/SlotSubscriber.d.ts +1 -1
- package/lib/node/slot/SlotSubscriber.d.ts.map +1 -1
- package/lib/node/slot/SlotSubscriber.js +2 -1
- package/lib/node/slot/SlothashSubscriber.d.ts +3 -2
- package/lib/node/slot/SlothashSubscriber.d.ts.map +1 -1
- package/lib/node/slot/SlothashSubscriber.js +11 -4
- package/lib/node/swap/UnifiedSwapClient.js +1 -1
- package/lib/node/swift/grpcSignedMsgUserAccountSubscriber.d.ts +0 -3
- package/lib/node/swift/grpcSignedMsgUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/swift/grpcSignedMsgUserAccountSubscriber.js +5 -5
- package/lib/node/swift/signedMsgUserAccountSubscriber.d.ts +7 -7
- package/lib/node/swift/signedMsgUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/swift/signedMsgUserAccountSubscriber.js +14 -10
- package/lib/node/swift/swiftOrderSubscriber.d.ts +7 -6
- package/lib/node/swift/swiftOrderSubscriber.d.ts.map +1 -1
- package/lib/node/swift/swiftOrderSubscriber.js +15 -16
- package/lib/node/testClient.js +3 -2
- package/lib/node/tokenFaucet.d.ts.map +1 -1
- package/lib/node/tokenFaucet.js +16 -2
- package/lib/node/tx/baseTxSender.d.ts +4 -4
- package/lib/node/tx/baseTxSender.d.ts.map +1 -1
- package/lib/node/tx/baseTxSender.js +5 -4
- package/lib/node/tx/fastSingleTxSender.d.ts +3 -3
- package/lib/node/tx/fastSingleTxSender.d.ts.map +1 -1
- package/lib/node/tx/fastSingleTxSender.js +9 -5
- package/lib/node/tx/reportTransactionError.d.ts +2 -2
- package/lib/node/tx/reportTransactionError.d.ts.map +1 -1
- package/lib/node/tx/reportTransactionError.js +5 -1
- package/lib/node/tx/retryTxSender.d.ts +1 -1
- package/lib/node/tx/retryTxSender.d.ts.map +1 -1
- package/lib/node/tx/retryTxSender.js +4 -2
- package/lib/node/tx/txHandler.d.ts +9 -3
- package/lib/node/tx/txHandler.d.ts.map +1 -1
- package/lib/node/tx/txHandler.js +54 -40
- package/lib/node/tx/txParamProcessor.d.ts +4 -1
- package/lib/node/tx/txParamProcessor.d.ts.map +1 -1
- package/lib/node/tx/txParamProcessor.js +6 -0
- package/lib/node/tx/types.d.ts +1 -1
- package/lib/node/tx/types.d.ts.map +1 -1
- package/lib/node/tx/whileValidTxSender.d.ts +1 -6
- package/lib/node/tx/whileValidTxSender.d.ts.map +1 -1
- package/lib/node/tx/whileValidTxSender.js +35 -13
- package/lib/node/types.d.ts +100 -155
- package/lib/node/types.d.ts.map +1 -1
- package/lib/node/types.js +6 -2
- package/lib/node/user.d.ts +22 -10
- package/lib/node/user.d.ts.map +1 -1
- package/lib/node/user.js +174 -154
- package/lib/node/userConfig.d.ts +3 -2
- package/lib/node/userConfig.d.ts.map +1 -1
- package/lib/node/userMap/WebsocketSubscription.d.ts +1 -1
- package/lib/node/userMap/WebsocketSubscription.d.ts.map +1 -1
- package/lib/node/userMap/WebsocketSubscription.js +1 -1
- package/lib/node/userMap/grpcSubscription.d.ts +1 -1
- package/lib/node/userMap/grpcSubscription.d.ts.map +1 -1
- package/lib/node/userMap/grpcSubscription.js +1 -1
- package/lib/node/userMap/referrerMap.d.ts +0 -2
- package/lib/node/userMap/referrerMap.d.ts.map +1 -1
- package/lib/node/userMap/referrerMap.js +10 -7
- package/lib/node/userMap/revenueShareEscrowMap.d.ts +0 -2
- package/lib/node/userMap/revenueShareEscrowMap.d.ts.map +1 -1
- package/lib/node/userMap/revenueShareEscrowMap.js +4 -4
- package/lib/node/userMap/userMap.d.ts +3 -5
- package/lib/node/userMap/userMap.d.ts.map +1 -1
- package/lib/node/userMap/userMap.js +39 -30
- package/lib/node/userMap/userMapConfig.d.ts +3 -2
- package/lib/node/userMap/userMapConfig.d.ts.map +1 -1
- package/lib/node/userMap/userStatsMap.d.ts +1 -3
- package/lib/node/userMap/userStatsMap.d.ts.map +1 -1
- package/lib/node/userMap/userStatsMap.js +18 -17
- package/lib/node/userStats.d.ts +7 -4
- package/lib/node/userStats.d.ts.map +1 -1
- package/lib/node/userStats.js +28 -18
- package/lib/node/userStatsConfig.d.ts +3 -2
- package/lib/node/userStatsConfig.d.ts.map +1 -1
- package/lib/node/util/TransactionConfirmationManager.d.ts.map +1 -1
- package/lib/node/util/TransactionConfirmationManager.js +4 -2
- package/lib/node/util/chainClock.d.ts +1 -1
- package/lib/node/util/chainClock.d.ts.map +1 -1
- package/lib/node/util/computeUnits.d.ts +1 -1
- package/lib/node/util/computeUnits.d.ts.map +1 -1
- package/lib/node/util/computeUnits.js +6 -1
- package/lib/node/util/ed25519Utils.d.ts +1 -1
- package/lib/node/util/ed25519Utils.js +1 -1
- package/lib/node/velocityClient.d.ts +145 -72
- package/lib/node/velocityClient.d.ts.map +1 -1
- package/lib/node/velocityClient.js +653 -457
- package/lib/node/velocityClientConfig.d.ts +0 -8
- package/lib/node/velocityClientConfig.d.ts.map +1 -1
- package/package.json +10 -9
- package/scripts/deposit-isolated-positions.ts +2 -2
- package/scripts/find-flagged-users.ts +1 -1
- package/scripts/grpc-client-test-comparison.ts +4 -4
- package/scripts/grpc-multiuser-client-test-comparison.ts +2 -2
- package/scripts/single-grpc-client-test.ts +3 -3
- package/scripts/updateVersion.js +4 -4
- package/scripts/withdraw-isolated-positions.ts +2 -2
- package/src/accounts/basicUserAccountSubscriber.ts +7 -5
- package/src/accounts/basicUserStatsAccountSubscriber.ts +9 -5
- package/src/accounts/bulkAccountLoader.ts +20 -7
- package/src/accounts/grpcAccountSubscriber.ts +11 -3
- package/src/accounts/grpcMultiAccountSubscriber.ts +24 -9
- package/src/accounts/grpcMultiUserAccountSubscriber.ts +16 -12
- package/src/accounts/grpcProgramAccountSubscriber.ts +12 -4
- package/src/accounts/grpcVelocityClientAccountSubscriber.ts +17 -14
- package/src/accounts/grpcVelocityClientAccountSubscriberV2.ts +69 -49
- package/src/accounts/laserProgramAccountSubscriber.ts +4 -1
- package/src/accounts/oneShotUserAccountSubscriber.ts +5 -3
- package/src/accounts/oneShotUserStatsAccountSubscriber.ts +8 -3
- package/src/accounts/pollingInsuranceFundStakeAccountSubscriber.ts +11 -5
- package/src/accounts/pollingOracleAccountSubscriber.ts +17 -10
- package/src/accounts/pollingTokenAccountSubscriber.ts +17 -10
- package/src/accounts/pollingUserAccountSubscriber.ts +26 -20
- package/src/accounts/pollingUserStatsAccountSubscriber.ts +12 -10
- package/src/accounts/pollingVelocityClientAccountSubscriber.ts +80 -41
- package/src/accounts/types.ts +8 -13
- package/src/accounts/utils.ts +12 -2
- package/src/accounts/webSocketAccountSubscriber.ts +23 -10
- package/src/accounts/webSocketAccountSubscriberV2.ts +23 -8
- package/src/accounts/webSocketInsuranceFundStakeAccountSubscriber.ts +17 -2
- package/src/accounts/webSocketProgramAccountSubscriber.ts +29 -4
- package/src/accounts/webSocketProgramAccountSubscriberV2.ts +30 -4
- package/src/accounts/webSocketProgramAccountsSubscriberV2.ts +29 -4
- package/src/accounts/webSocketUserAccountSubscriber.ts +11 -2
- package/src/accounts/webSocketUserStatsAccountSubsriber.ts +15 -2
- package/src/accounts/webSocketVelocityClientAccountSubscriber.ts +79 -58
- package/src/accounts/webSocketVelocityClientAccountSubscriberV2.ts +77 -45
- package/src/accounts/websocketProgramUserAccountSubscriber.ts +1 -6
- package/src/addresses/marketAddresses.ts +3 -2
- package/src/addresses/pda.ts +3 -38
- package/src/adminClient.ts +285 -315
- package/src/auctionSubscriber/auctionSubscriber.ts +8 -11
- package/src/auctionSubscriber/auctionSubscriberGrpc.ts +13 -11
- package/src/auctionSubscriber/types.ts +3 -3
- package/src/bankrun/bankrunConnection.ts +83 -39
- package/src/blockhashSubscriber/BlockhashSubscriber.ts +5 -4
- package/src/clock/clockSubscriber.ts +10 -9
- package/src/config.ts +16 -70
- package/src/constants/index.ts +1 -2
- package/src/constants/numericConstants.ts +3 -3
- package/src/constituentMap/constituentMap.ts +10 -7
- package/src/constituentMap/pollingConstituentAccountSubscriber.ts +4 -2
- package/src/constituentMap/webSocketConstituentAccountSubscriber.ts +13 -4
- package/src/core/VelocityCore.ts +11 -20
- package/src/core/instructions/perpOrders.ts +14 -0
- package/src/core/instructions/withdraw.ts +2 -2
- package/src/core/remainingAccounts.ts +7 -7
- package/src/decode/user.ts +8 -1
- package/src/dlob/DLOB.ts +300 -176
- package/src/dlob/DLOBNode.ts +23 -3
- package/src/dlob/DLOBSubscriber.ts +53 -42
- package/src/dlob/NodeList.ts +8 -7
- package/src/dlob/orderBookLevels.ts +51 -25
- package/src/dlob/types.ts +0 -2
- package/src/events/eventList.ts +4 -1
- package/src/events/eventSubscriber.ts +108 -50
- package/src/events/eventsServerLogProvider.ts +24 -15
- package/src/events/fetchLogs.ts +3 -3
- package/src/events/parse.ts +14 -14
- package/src/events/pollingLogProvider.ts +2 -2
- package/src/events/txEventCache.ts +8 -2
- package/src/events/types.ts +4 -15
- package/src/events/webSocketLogProvider.ts +5 -3
- package/src/factory/bigNum.ts +2 -2
- package/src/idl/{drift.json → velocity.json} +2265 -2333
- package/src/idl/{drift.ts → velocity.ts} +2267 -2335
- package/src/index.ts +1 -6
- package/src/jupiter/jupiterClient.ts +30 -10
- package/src/margin/README.md +2 -2
- package/src/marginCalculation.ts +1 -0
- package/src/math/amm.ts +217 -40
- package/src/math/auction.ts +16 -12
- package/src/math/bankruptcy.ts +1 -1
- package/src/math/builder.ts +45 -1
- package/src/math/funding.ts +51 -47
- package/src/math/insurance.ts +6 -8
- package/src/math/margin.ts +12 -119
- package/src/math/market.ts +16 -98
- package/src/math/oracles.ts +29 -43
- package/src/math/orders.ts +13 -109
- package/src/math/position.ts +6 -12
- package/src/math/repeg.ts +0 -29
- package/src/math/spotBalance.ts +14 -10
- package/src/math/spotMarket.ts +2 -28
- package/src/math/spotPosition.ts +4 -4
- package/src/math/state.ts +0 -8
- package/src/math/superStake.ts +36 -85
- package/src/math/trade.ts +7 -3
- package/src/math/utils.ts +1 -1
- package/src/memcmp.ts +0 -9
- package/src/oracles/prelaunchOracleClient.ts +7 -2
- package/src/oracles/pythClient.ts +12 -3
- package/src/oracles/pythLazerClient.ts +10 -5
- package/src/oracles/utils.ts +15 -0
- package/src/orderSubscriber/OrderSubscriber.ts +12 -12
- package/src/orderSubscriber/WebsocketSubscription.ts +1 -1
- package/src/orderSubscriber/grpcSubscription.ts +2 -2
- package/src/orderSubscriber/types.ts +0 -2
- package/src/priorityFee/heliusPriorityFeeMethod.ts +1 -1
- package/src/priorityFee/priorityFeeSubscriber.ts +50 -21
- package/src/priorityFee/priorityFeeSubscriberMap.ts +2 -10
- package/src/priorityFee/solanaPriorityFeeMethod.ts +1 -1
- package/src/priorityFee/types.ts +3 -13
- package/src/priorityFee/velocityPriorityFeeMethod.ts +0 -12
- package/src/pyth/pythLazerSubscriber.ts +1 -1
- package/src/pyth/types.ts +0 -2
- package/src/slot/SlotSubscriber.ts +3 -3
- package/src/slot/SlothashSubscriber.ts +17 -6
- package/src/swap/UnifiedSwapClient.ts +1 -1
- package/src/swift/grpcSignedMsgUserAccountSubscriber.ts +5 -6
- package/src/swift/signedMsgUserAccountSubscriber.ts +18 -16
- package/src/swift/swiftOrderSubscriber.ts +17 -21
- package/src/testClient.ts +2 -2
- package/src/tokenFaucet.ts +22 -3
- package/src/tx/baseTxSender.ts +10 -10
- package/src/tx/fastSingleTxSender.ts +12 -8
- package/src/tx/reportTransactionError.ts +12 -7
- package/src/tx/retryTxSender.ts +6 -4
- package/src/tx/txHandler.ts +88 -43
- package/src/tx/txParamProcessor.ts +18 -3
- package/src/tx/types.ts +1 -1
- package/src/tx/whileValidTxSender.ts +51 -22
- package/src/types.ts +119 -173
- package/src/user.ts +208 -165
- package/src/userConfig.ts +1 -3
- package/src/userMap/WebsocketSubscription.ts +2 -2
- package/src/userMap/grpcSubscription.ts +2 -2
- package/src/userMap/referrerMap.ts +13 -13
- package/src/userMap/revenueShareEscrowMap.ts +6 -5
- package/src/userMap/userMap.ts +46 -32
- package/src/userMap/userMapConfig.ts +3 -3
- package/src/userMap/userStatsMap.ts +32 -23
- package/src/userStats.ts +22 -13
- package/src/userStatsConfig.ts +3 -3
- package/src/util/TransactionConfirmationManager.ts +10 -2
- package/src/util/chainClock.ts +1 -1
- package/src/util/computeUnits.ts +7 -3
- package/src/util/ed25519Utils.ts +1 -1
- package/src/velocityClient.ts +867 -600
- package/src/velocityClientConfig.ts +0 -10
- package/tests/{DriftCore → VelocityCore}/decode.test.ts +1 -1
- package/tests/{DriftCore → VelocityCore}/fill_trigger.test.ts +1 -1
- package/tests/{DriftCore → VelocityCore}/instructions.test.ts +1 -1
- package/tests/{DriftCore → VelocityCore}/pdas.test.ts +4 -2
- package/tests/amm/test.ts +138 -0
- package/tests/ci/verifyConstants.ts +24 -27
- package/tests/decode/test.ts +2 -2
- package/tests/dlob/helpers.ts +11 -10
- package/tests/events/parseLogsForCuUsage.ts +15 -15
- package/tests/user/helpers.ts +9 -9
- package/tests/user/test.ts +13 -10
- package/tsconfig.json +1 -0
- package/lib/browser/constants/insuranceFund.d.ts +0 -5
- package/lib/browser/constants/insuranceFund.js +0 -9
- package/lib/browser/tx/forwardOnlyTxSender.d.ts +0 -37
- package/lib/browser/tx/forwardOnlyTxSender.js +0 -92
- package/lib/browser/util/deprecatedAlias.d.ts +0 -26
- package/lib/browser/util/deprecatedAlias.js +0 -10
- package/lib/browser/util/tps.d.ts +0 -2
- package/lib/browser/util/tps.js +0 -16
- package/lib/node/constants/insuranceFund.d.ts +0 -6
- package/lib/node/constants/insuranceFund.d.ts.map +0 -1
- package/lib/node/constants/insuranceFund.js +0 -9
- package/lib/node/idl/drift.d.ts.map +0 -1
- package/lib/node/tx/forwardOnlyTxSender.d.ts +0 -38
- package/lib/node/tx/forwardOnlyTxSender.d.ts.map +0 -1
- package/lib/node/tx/forwardOnlyTxSender.js +0 -92
- package/lib/node/util/deprecatedAlias.d.ts +0 -27
- package/lib/node/util/deprecatedAlias.d.ts.map +0 -1
- package/lib/node/util/deprecatedAlias.js +0 -10
- package/lib/node/util/tps.d.ts +0 -3
- package/lib/node/util/tps.d.ts.map +0 -1
- package/lib/node/util/tps.js +0 -16
- package/src/constants/insuranceFund.ts +0 -8
- package/src/tx/forwardOnlyTxSender.ts +0 -145
- package/src/util/deprecatedAlias.ts +0 -21
- package/src/util/tps.ts +0 -27
- /package/lib/browser/idl/{drift.js → velocity.js} +0 -0
- /package/lib/node/idl/{drift.js → velocity.js} +0 -0
- /package/tests/{DriftCore → VelocityCore}/perp_orders.test.ts +0 -0
- /package/tests/{DriftCore → VelocityCore}/remainingAccounts.test.ts +0 -0
- /package/tests/{DriftCore → VelocityCore}/settlement_liquidation.test.ts +0 -0
|
@@ -17,4 +17,4 @@ export type HeliusPriorityFeeResponse = {
|
|
|
17
17
|
};
|
|
18
18
|
id: string;
|
|
19
19
|
};
|
|
20
|
-
export declare function fetchHeliusPriorityFee(heliusRpcUrl: string, lookbackDistance: number, addresses: string[]): Promise<HeliusPriorityFeeResponse>;
|
|
20
|
+
export declare function fetchHeliusPriorityFee(heliusRpcUrl: string, lookbackDistance: number, addresses: string[]): Promise<HeliusPriorityFeeResponse | undefined>;
|
|
@@ -5,12 +5,10 @@ import { MaxOverSlotsStrategy } from './maxOverSlotsStrategy';
|
|
|
5
5
|
import { HeliusPriorityFeeLevels, HeliusPriorityLevel } from './heliusPriorityFeeMethod';
|
|
6
6
|
import { VelocityMarketInfo } from './velocityPriorityFeeMethod';
|
|
7
7
|
export declare class PriorityFeeSubscriber {
|
|
8
|
-
connection
|
|
8
|
+
connection?: Connection;
|
|
9
9
|
frequencyMs: number;
|
|
10
10
|
addresses: string[];
|
|
11
11
|
velocityMarkets?: VelocityMarketInfo[];
|
|
12
|
-
/** @deprecated Use `velocityMarkets` instead. `driftMarkets` will be removed in a future major. */
|
|
13
|
-
get driftMarkets(): VelocityMarketInfo[] | undefined;
|
|
14
12
|
customStrategy?: PriorityFeeStrategy;
|
|
15
13
|
averageStrategy: AverageOverSlotsStrategy;
|
|
16
14
|
maxStrategy: MaxOverSlotsStrategy;
|
|
@@ -19,8 +17,6 @@ export declare class PriorityFeeSubscriber {
|
|
|
19
17
|
maxFeeMicroLamports?: number;
|
|
20
18
|
priorityFeeMultiplier?: number;
|
|
21
19
|
velocityPriorityFeeEndpoint?: string;
|
|
22
|
-
/** @deprecated Use `velocityPriorityFeeEndpoint` instead. `driftPriorityFeeEndpoint` will be removed in a future major. */
|
|
23
|
-
get driftPriorityFeeEndpoint(): string | undefined;
|
|
24
20
|
heliusRpcUrl?: string;
|
|
25
21
|
lastHeliusSample?: HeliusPriorityFeeLevels;
|
|
26
22
|
intervalId?: ReturnType<typeof setTimeout>;
|
|
@@ -33,7 +29,7 @@ export declare class PriorityFeeSubscriber {
|
|
|
33
29
|
subscribe(): Promise<void>;
|
|
34
30
|
private loadForSolana;
|
|
35
31
|
private loadForHelius;
|
|
36
|
-
private
|
|
32
|
+
private loadForVelocity;
|
|
37
33
|
getMaxPriorityFee(): number | undefined;
|
|
38
34
|
updateMaxPriorityFee(newMaxFee: number | undefined): void;
|
|
39
35
|
getPriorityFeeMultiplier(): number;
|
|
@@ -8,14 +8,6 @@ const solanaPriorityFeeMethod_1 = require("./solanaPriorityFeeMethod");
|
|
|
8
8
|
const heliusPriorityFeeMethod_1 = require("./heliusPriorityFeeMethod");
|
|
9
9
|
const velocityPriorityFeeMethod_1 = require("./velocityPriorityFeeMethod");
|
|
10
10
|
class PriorityFeeSubscriber {
|
|
11
|
-
/** @deprecated Use `velocityMarkets` instead. `driftMarkets` will be removed in a future major. */
|
|
12
|
-
get driftMarkets() {
|
|
13
|
-
return this.velocityMarkets;
|
|
14
|
-
}
|
|
15
|
-
/** @deprecated Use `velocityPriorityFeeEndpoint` instead. `driftPriorityFeeEndpoint` will be removed in a future major. */
|
|
16
|
-
get driftPriorityFeeEndpoint() {
|
|
17
|
-
return this.velocityPriorityFeeEndpoint;
|
|
18
|
-
}
|
|
19
11
|
constructor(config) {
|
|
20
12
|
var _a, _b, _c, _d, _e;
|
|
21
13
|
this.averageStrategy = new averageOverSlotsStrategy_1.AverageOverSlotsStrategy();
|
|
@@ -32,19 +24,19 @@ class PriorityFeeSubscriber {
|
|
|
32
24
|
this.addresses = config.addresses
|
|
33
25
|
? config.addresses.map((address) => address.toBase58())
|
|
34
26
|
: [];
|
|
35
|
-
this.velocityMarkets =
|
|
27
|
+
this.velocityMarkets = config.velocityMarkets;
|
|
36
28
|
if (config.customStrategy) {
|
|
37
29
|
this.customStrategy = config.customStrategy;
|
|
38
30
|
}
|
|
39
31
|
else {
|
|
40
32
|
this.customStrategy = this.averageStrategy;
|
|
41
33
|
}
|
|
42
|
-
this.lookbackDistance = (
|
|
34
|
+
this.lookbackDistance = (_b = config.slotsToCheck) !== null && _b !== void 0 ? _b : 50;
|
|
43
35
|
if (config.priorityFeeMethod) {
|
|
44
36
|
this.priorityFeeMethod = config.priorityFeeMethod;
|
|
45
37
|
if (this.priorityFeeMethod === types_1.PriorityFeeMethod.HELIUS) {
|
|
46
38
|
if (config.heliusRpcUrl === undefined) {
|
|
47
|
-
if (this.connection.rpcEndpoint.includes('helius')) {
|
|
39
|
+
if ((_c = this.connection) === null || _c === void 0 ? void 0 : _c.rpcEndpoint.includes('helius')) {
|
|
48
40
|
this.heliusRpcUrl = this.connection.rpcEndpoint;
|
|
49
41
|
}
|
|
50
42
|
else {
|
|
@@ -57,7 +49,7 @@ class PriorityFeeSubscriber {
|
|
|
57
49
|
}
|
|
58
50
|
else if (this.priorityFeeMethod === types_1.PriorityFeeMethod.VELOCITY) {
|
|
59
51
|
this.velocityPriorityFeeEndpoint =
|
|
60
|
-
(_d = config.velocityPriorityFeeEndpoint) !== null && _d !== void 0 ? _d : config.
|
|
52
|
+
(_d = config.velocityPriorityFeeEndpoint) !== null && _d !== void 0 ? _d : config.velocityPriorityFeeEndpoint;
|
|
61
53
|
}
|
|
62
54
|
}
|
|
63
55
|
if (this.priorityFeeMethod === types_1.PriorityFeeMethod.SOLANA) {
|
|
@@ -76,7 +68,13 @@ class PriorityFeeSubscriber {
|
|
|
76
68
|
await this.load();
|
|
77
69
|
}
|
|
78
70
|
async loadForSolana() {
|
|
71
|
+
if (this.connection === undefined) {
|
|
72
|
+
throw new Error('connection must be provided to use SOLANA priority fee API');
|
|
73
|
+
}
|
|
79
74
|
const samples = await (0, solanaPriorityFeeMethod_1.fetchSolanaPriorityFee)(this.connection, this.lookbackDistance, this.addresses);
|
|
75
|
+
if (samples === undefined) {
|
|
76
|
+
throw new Error('fetchSolanaPriorityFee returned no samples');
|
|
77
|
+
}
|
|
80
78
|
if (samples.length > 0) {
|
|
81
79
|
this.latestPriorityFee = samples[0].prioritizationFee;
|
|
82
80
|
this.lastSlotSeen = samples[0].slot;
|
|
@@ -89,9 +87,12 @@ class PriorityFeeSubscriber {
|
|
|
89
87
|
}
|
|
90
88
|
async loadForHelius() {
|
|
91
89
|
var _a, _b;
|
|
90
|
+
if (this.heliusRpcUrl === undefined) {
|
|
91
|
+
throw new Error('heliusRpcUrl must be provided to use PriorityFeeMethod.HELIUS');
|
|
92
|
+
}
|
|
92
93
|
const sample = await (0, heliusPriorityFeeMethod_1.fetchHeliusPriorityFee)(this.heliusRpcUrl, this.lookbackDistance, this.addresses);
|
|
93
94
|
this.lastHeliusSample = (_b = (_a = sample === null || sample === void 0 ? void 0 : sample.result) === null || _a === void 0 ? void 0 : _a.priorityFeeLevels) !== null && _b !== void 0 ? _b : undefined;
|
|
94
|
-
if (this.lastHeliusSample) {
|
|
95
|
+
if (sample !== undefined && this.lastHeliusSample) {
|
|
95
96
|
this.lastAvgStrategyResult =
|
|
96
97
|
this.lastHeliusSample[heliusPriorityFeeMethod_1.HeliusPriorityLevel.MEDIUM];
|
|
97
98
|
this.lastMaxStrategyResult =
|
|
@@ -101,16 +102,31 @@ class PriorityFeeSubscriber {
|
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
|
-
async
|
|
105
|
+
async loadForVelocity() {
|
|
105
106
|
if (!this.velocityMarkets) {
|
|
106
107
|
return;
|
|
107
108
|
}
|
|
109
|
+
if (this.velocityPriorityFeeEndpoint === undefined) {
|
|
110
|
+
throw new Error('velocityPriorityFeeEndpoint must be provided to use PriorityFeeMethod.VELOCITY');
|
|
111
|
+
}
|
|
108
112
|
const sample = await (0, velocityPriorityFeeMethod_1.fetchVelocityPriorityFee)(this.velocityPriorityFeeEndpoint, this.velocityMarkets.map((m) => m.marketType), this.velocityMarkets.map((m) => m.marketIndex));
|
|
109
113
|
if (sample.length > 0) {
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
// The endpoint returns one fee-level set per requested market. Take the
|
|
115
|
+
// max level across markets so a transaction touching several markets is
|
|
116
|
+
// covered by the most expensive one. (Base indexed the array itself with
|
|
117
|
+
// a string enum key — `sample['medium']` — which yielded `undefined` and
|
|
118
|
+
// produced NaN strategy results; the missing per-element index is fixed
|
|
119
|
+
// here.)
|
|
120
|
+
this.lastAvgStrategyResult = Math.max(...sample.map((s) => s[heliusPriorityFeeMethod_1.HeliusPriorityLevel.MEDIUM]));
|
|
121
|
+
this.lastMaxStrategyResult = Math.max(...sample.map((s) => s[heliusPriorityFeeMethod_1.HeliusPriorityLevel.UNSAFE_MAX]));
|
|
112
122
|
if (this.customStrategy) {
|
|
113
|
-
|
|
123
|
+
// Custom strategies expect `{ slot, prioritizationFee }[]`; map each
|
|
124
|
+
// market's medium level into that shape so they aggregate real values
|
|
125
|
+
// instead of summing the absent `prioritizationFee` field (NaN).
|
|
126
|
+
this.lastCustomStrategyResult = this.customStrategy.calculate(sample.map((s) => ({
|
|
127
|
+
slot: 0,
|
|
128
|
+
prioritizationFee: s[heliusPriorityFeeMethod_1.HeliusPriorityLevel.MEDIUM],
|
|
129
|
+
})));
|
|
114
130
|
}
|
|
115
131
|
}
|
|
116
132
|
}
|
|
@@ -169,7 +185,7 @@ class PriorityFeeSubscriber {
|
|
|
169
185
|
await this.loadForHelius();
|
|
170
186
|
}
|
|
171
187
|
else if (this.priorityFeeMethod === types_1.PriorityFeeMethod.VELOCITY) {
|
|
172
|
-
await this.
|
|
188
|
+
await this.loadForVelocity();
|
|
173
189
|
}
|
|
174
190
|
else {
|
|
175
191
|
throw new Error(`${this.priorityFeeMethod} load not implemented`);
|
|
@@ -7,11 +7,7 @@ export declare class PriorityFeeSubscriberMap {
|
|
|
7
7
|
frequencyMs: number;
|
|
8
8
|
intervalId?: ReturnType<typeof setTimeout>;
|
|
9
9
|
velocityMarkets?: VelocityMarketInfo[];
|
|
10
|
-
/** @deprecated Use `velocityMarkets` instead. `driftMarkets` will be removed in a future major. */
|
|
11
|
-
get driftMarkets(): VelocityMarketInfo[] | undefined;
|
|
12
10
|
velocityPriorityFeeEndpoint: string;
|
|
13
|
-
/** @deprecated Use `velocityPriorityFeeEndpoint` instead. `driftPriorityFeeEndpoint` will be removed in a future major. */
|
|
14
|
-
get driftPriorityFeeEndpoint(): string;
|
|
15
11
|
feesMap: Map<string, Map<number, VelocityPriorityFeeLevels>>;
|
|
16
12
|
constructor(config: PriorityFeeSubscriberMapConfig);
|
|
17
13
|
private updateFeesMap;
|
|
@@ -7,21 +7,13 @@ const types_1 = require("./types");
|
|
|
7
7
|
* takes advantage of /batchPriorityFees endpoint from Velocity hosted priority fee service
|
|
8
8
|
*/
|
|
9
9
|
class PriorityFeeSubscriberMap {
|
|
10
|
-
/** @deprecated Use `velocityMarkets` instead. `driftMarkets` will be removed in a future major. */
|
|
11
|
-
get driftMarkets() {
|
|
12
|
-
return this.velocityMarkets;
|
|
13
|
-
}
|
|
14
|
-
/** @deprecated Use `velocityPriorityFeeEndpoint` instead. `driftPriorityFeeEndpoint` will be removed in a future major. */
|
|
15
|
-
get driftPriorityFeeEndpoint() {
|
|
16
|
-
return this.velocityPriorityFeeEndpoint;
|
|
17
|
-
}
|
|
18
10
|
constructor(config) {
|
|
19
|
-
var _a, _b
|
|
11
|
+
var _a, _b;
|
|
20
12
|
this.frequencyMs =
|
|
21
13
|
(_a = config.frequencyMs) !== null && _a !== void 0 ? _a : types_1.DEFAULT_PRIORITY_FEE_MAP_FREQUENCY_MS;
|
|
22
14
|
// Type-system guarantees at least one of the two is supplied.
|
|
23
|
-
this.velocityPriorityFeeEndpoint = ((_b = config.velocityPriorityFeeEndpoint) !== null && _b !== void 0 ? _b : config.
|
|
24
|
-
this.velocityMarkets =
|
|
15
|
+
this.velocityPriorityFeeEndpoint = ((_b = config.velocityPriorityFeeEndpoint) !== null && _b !== void 0 ? _b : config.velocityPriorityFeeEndpoint);
|
|
16
|
+
this.velocityMarkets = config.velocityMarkets;
|
|
25
17
|
this.feesMap = new Map();
|
|
26
18
|
this.feesMap.set('perp', new Map());
|
|
27
19
|
this.feesMap.set('spot', new Map());
|
|
@@ -3,4 +3,4 @@ export type SolanaPriorityFeeResponse = {
|
|
|
3
3
|
slot: number;
|
|
4
4
|
prioritizationFee: number;
|
|
5
5
|
};
|
|
6
|
-
export declare function fetchSolanaPriorityFee(connection: Connection, lookbackDistance: number, addresses: string[]): Promise<SolanaPriorityFeeResponse[]>;
|
|
6
|
+
export declare function fetchSolanaPriorityFee(connection: Connection, lookbackDistance: number, addresses: string[]): Promise<SolanaPriorityFeeResponse[] | undefined>;
|
|
@@ -2,7 +2,6 @@ import { Connection, PublicKey } from '@solana/web3.js';
|
|
|
2
2
|
import { SolanaPriorityFeeResponse } from './solanaPriorityFeeMethod';
|
|
3
3
|
import { HeliusPriorityFeeResponse } from './heliusPriorityFeeMethod';
|
|
4
4
|
import { VelocityMarketInfo, VelocityPriorityFeeResponse } from './velocityPriorityFeeMethod';
|
|
5
|
-
import { AtLeastOne } from '../util/deprecatedAlias';
|
|
6
5
|
export declare const DEFAULT_PRIORITY_FEE_MAP_FREQUENCY_MS = 10000;
|
|
7
6
|
export interface PriorityFeeStrategy {
|
|
8
7
|
calculate(samples: SolanaPriorityFeeResponse[] | HeliusPriorityFeeResponse | VelocityPriorityFeeResponse): number;
|
|
@@ -17,23 +16,19 @@ export type PriorityFeeSubscriberConfig = {
|
|
|
17
16
|
frequencyMs?: number;
|
|
18
17
|
addresses?: PublicKey[];
|
|
19
18
|
velocityMarkets?: VelocityMarketInfo[];
|
|
20
|
-
/** @deprecated Use `velocityMarkets` instead. `driftMarkets` will be removed in a future major. */
|
|
21
|
-
driftMarkets?: VelocityMarketInfo[];
|
|
22
19
|
customStrategy?: PriorityFeeStrategy;
|
|
23
20
|
priorityFeeMethod?: PriorityFeeMethod;
|
|
24
21
|
slotsToCheck?: number;
|
|
25
22
|
heliusRpcUrl?: string;
|
|
26
23
|
velocityPriorityFeeEndpoint?: string;
|
|
27
|
-
/** @deprecated Use `velocityPriorityFeeEndpoint` instead. `driftPriorityFeeEndpoint` will be removed in a future major. */
|
|
28
|
-
driftPriorityFeeEndpoint?: string;
|
|
29
24
|
maxFeeMicroLamports?: number;
|
|
30
25
|
priorityFeeMultiplier?: number;
|
|
31
26
|
};
|
|
32
27
|
type PriorityFeeSubscriberMapConfigBase = {
|
|
33
28
|
frequencyMs?: number;
|
|
34
29
|
velocityMarkets?: VelocityMarketInfo[];
|
|
35
|
-
/** @deprecated Use `velocityMarkets` instead. `driftMarkets` will be removed in a future major. */
|
|
36
|
-
driftMarkets?: VelocityMarketInfo[];
|
|
37
30
|
};
|
|
38
|
-
export type PriorityFeeSubscriberMapConfig = PriorityFeeSubscriberMapConfigBase &
|
|
31
|
+
export type PriorityFeeSubscriberMapConfig = PriorityFeeSubscriberMapConfigBase & {
|
|
32
|
+
velocityPriorityFeeEndpoint: string;
|
|
33
|
+
};
|
|
39
34
|
export {};
|
|
@@ -3,19 +3,11 @@ export type VelocityMarketInfo = {
|
|
|
3
3
|
marketType: string;
|
|
4
4
|
marketIndex: number;
|
|
5
5
|
};
|
|
6
|
-
/** @deprecated Use `VelocityMarketInfo` instead. `DriftMarketInfo` will be removed in a future major. */
|
|
7
|
-
export type DriftMarketInfo = VelocityMarketInfo;
|
|
8
6
|
export type VelocityPriorityFeeLevels = {
|
|
9
7
|
[key in HeliusPriorityLevel]: number;
|
|
10
8
|
} & {
|
|
11
9
|
marketType: 'perp' | 'spot';
|
|
12
10
|
marketIndex: number;
|
|
13
11
|
};
|
|
14
|
-
/** @deprecated Use `VelocityPriorityFeeLevels` instead. `DriftPriorityFeeLevels` will be removed in a future major. */
|
|
15
|
-
export type DriftPriorityFeeLevels = VelocityPriorityFeeLevels;
|
|
16
12
|
export type VelocityPriorityFeeResponse = VelocityPriorityFeeLevels[];
|
|
17
|
-
/** @deprecated Use `VelocityPriorityFeeResponse` instead. `DriftPriorityFeeResponse` will be removed in a future major. */
|
|
18
|
-
export type DriftPriorityFeeResponse = VelocityPriorityFeeResponse;
|
|
19
13
|
export declare function fetchVelocityPriorityFee(url: string, marketTypes: string[], marketIndexes: number[]): Promise<VelocityPriorityFeeResponse>;
|
|
20
|
-
/** @deprecated Use `fetchVelocityPriorityFee` instead. `fetchDriftPriorityFee` will be removed in a future major. */
|
|
21
|
-
export declare const fetchDriftPriorityFee: typeof fetchVelocityPriorityFee;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.fetchVelocityPriorityFee = void 0;
|
|
7
7
|
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
8
8
|
async function fetchVelocityPriorityFee(url, marketTypes, marketIndexes) {
|
|
9
9
|
try {
|
|
@@ -24,5 +24,3 @@ async function fetchVelocityPriorityFee(url, marketTypes, marketIndexes) {
|
|
|
24
24
|
return [];
|
|
25
25
|
}
|
|
26
26
|
exports.fetchVelocityPriorityFee = fetchVelocityPriorityFee;
|
|
27
|
-
/** @deprecated Use `fetchVelocityPriorityFee` instead. `fetchDriftPriorityFee` will be removed in a future major. */
|
|
28
|
-
exports.fetchDriftPriorityFee = fetchVelocityPriorityFee;
|
|
@@ -39,7 +39,7 @@ export declare class PythLazerSubscriber {
|
|
|
39
39
|
* @param endpoints - Array of WebSocket endpoint URLs for Pyth Lazer
|
|
40
40
|
* @param token - Authentication token for Pyth Lazer API
|
|
41
41
|
* @param priceFeedArrays - Array of price feed configurations to subscribe to
|
|
42
|
-
* @param env -
|
|
42
|
+
* @param env - Velocity environment (mainnet-beta, devnet, etc.)
|
|
43
43
|
* @param resubTimeoutMs - Milliseconds to wait before resubscribing on data timeout
|
|
44
44
|
* @param sdkLogging - Whether to log Pyth SDK logs to the console. This is very noisy but could be useful for debugging.
|
|
45
45
|
* @param feedProperties - Price feed properties to request. Must include both 'price' and 'exponent' (required for getPriceFromMarketIndex). Defaults to ['price', 'bestAskPrice', 'bestBidPrice', 'exponent']. Stored by copy so caller mutation does not affect this instance.
|
|
@@ -13,7 +13,7 @@ class PythLazerSubscriber {
|
|
|
13
13
|
* @param endpoints - Array of WebSocket endpoint URLs for Pyth Lazer
|
|
14
14
|
* @param token - Authentication token for Pyth Lazer API
|
|
15
15
|
* @param priceFeedArrays - Array of price feed configurations to subscribe to
|
|
16
|
-
* @param env -
|
|
16
|
+
* @param env - Velocity environment (mainnet-beta, devnet, etc.)
|
|
17
17
|
* @param resubTimeoutMs - Milliseconds to wait before resubscribing on data timeout
|
|
18
18
|
* @param sdkLogging - Whether to log Pyth SDK logs to the console. This is very noisy but could be useful for debugging.
|
|
19
19
|
* @param feedProperties - Price feed properties to request. Must include both 'price' and 'exponent' (required for getPriceFromMarketIndex). Defaults to ['price', 'bestAskPrice', 'bestBidPrice', 'exponent']. Stored by copy so caller mutation does not affect this instance.
|
|
@@ -2222,5 +2222,4 @@ export type PythSolanaReceiver = {
|
|
|
2222
2222
|
];
|
|
2223
2223
|
};
|
|
2224
2224
|
export declare const IDL: PythSolanaReceiver;
|
|
2225
|
-
export declare const PYTH_SOLANA_RECEIVER_IDL: PythSolanaReceiver;
|
|
2226
2225
|
export type PriceUpdateAccount = IdlAccounts<PythSolanaReceiver>['priceUpdateV2'];
|
|
@@ -11,7 +11,7 @@ export interface SlotSubscriberEvents {
|
|
|
11
11
|
export declare class SlotSubscriber {
|
|
12
12
|
private connection;
|
|
13
13
|
currentSlot: number;
|
|
14
|
-
subscriptionId
|
|
14
|
+
subscriptionId?: number;
|
|
15
15
|
eventEmitter: StrictEventEmitter<EventEmitter, SlotSubscriberEvents>;
|
|
16
16
|
timeoutId?: ReturnType<typeof setTimeout>;
|
|
17
17
|
resubTimeoutMs?: number;
|
|
@@ -5,11 +5,12 @@ const events_1 = require("events");
|
|
|
5
5
|
class SlotSubscriber {
|
|
6
6
|
constructor(connection, config) {
|
|
7
7
|
this.connection = connection;
|
|
8
|
+
this.currentSlot = 0;
|
|
8
9
|
this.isUnsubscribing = false;
|
|
9
10
|
this.receivingData = false;
|
|
10
11
|
this.eventEmitter = new events_1.EventEmitter();
|
|
11
12
|
this.resubTimeoutMs = config === null || config === void 0 ? void 0 : config.resubTimeoutMs;
|
|
12
|
-
if (this.resubTimeoutMs < 1000) {
|
|
13
|
+
if (this.resubTimeoutMs !== undefined && this.resubTimeoutMs < 1000) {
|
|
13
14
|
console.log('resubTimeoutMs should be at least 1000ms to avoid spamming resub');
|
|
14
15
|
}
|
|
15
16
|
}
|
|
@@ -9,8 +9,9 @@ export type Slothash = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare class SlothashSubscriber {
|
|
11
11
|
private connection;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
private _currentSlothash?;
|
|
13
|
+
private get currentSlothash();
|
|
14
|
+
subscriptionId?: number;
|
|
14
15
|
commitment: Commitment;
|
|
15
16
|
timeoutId?: ReturnType<typeof setTimeout>;
|
|
16
17
|
resubTimeoutMs?: number;
|
|
@@ -8,6 +8,12 @@ const web3_js_1 = require("@solana/web3.js");
|
|
|
8
8
|
const bs58_1 = __importDefault(require("bs58"));
|
|
9
9
|
const anchor_1 = require("../isomorphic/anchor");
|
|
10
10
|
class SlothashSubscriber {
|
|
11
|
+
get currentSlothash() {
|
|
12
|
+
if (!this._currentSlothash) {
|
|
13
|
+
throw new Error('SlothashSubscriber: slothash accessed before subscribe()');
|
|
14
|
+
}
|
|
15
|
+
return this._currentSlothash;
|
|
16
|
+
}
|
|
11
17
|
constructor(connection, config) {
|
|
12
18
|
var _a;
|
|
13
19
|
this.connection = connection;
|
|
@@ -15,7 +21,7 @@ class SlothashSubscriber {
|
|
|
15
21
|
this.receivingData = false;
|
|
16
22
|
this.resubTimeoutMs = config === null || config === void 0 ? void 0 : config.resubTimeoutMs;
|
|
17
23
|
this.commitment = (_a = config === null || config === void 0 ? void 0 : config.commitment) !== null && _a !== void 0 ? _a : 'processed';
|
|
18
|
-
if (this.resubTimeoutMs < 1000) {
|
|
24
|
+
if (this.resubTimeoutMs != null && this.resubTimeoutMs < 1000) {
|
|
19
25
|
console.log('resubTimeoutMs should be at least 1000ms to avoid spamming resub');
|
|
20
26
|
}
|
|
21
27
|
}
|
|
@@ -27,15 +33,16 @@ class SlothashSubscriber {
|
|
|
27
33
|
if (currentAccountData == null) {
|
|
28
34
|
throw new Error('Failed to retrieve current slot hash');
|
|
29
35
|
}
|
|
30
|
-
this.
|
|
36
|
+
this._currentSlothash = deserializeSlothash(currentAccountData.data);
|
|
31
37
|
this.subscriptionId = this.connection.onAccountChange(web3_js_1.SYSVAR_SLOT_HASHES_PUBKEY, (slothashInfo, context) => {
|
|
32
|
-
if (!this.
|
|
38
|
+
if (!this._currentSlothash ||
|
|
39
|
+
this._currentSlothash.slot < context.slot) {
|
|
33
40
|
if (this.resubTimeoutMs && !this.isUnsubscribing) {
|
|
34
41
|
this.receivingData = true;
|
|
35
42
|
clearTimeout(this.timeoutId);
|
|
36
43
|
this.setTimeout();
|
|
37
44
|
}
|
|
38
|
-
this.
|
|
45
|
+
this._currentSlothash = deserializeSlothash(slothashInfo.data);
|
|
39
46
|
}
|
|
40
47
|
}, this.commitment);
|
|
41
48
|
if (this.resubTimeoutMs) {
|
|
@@ -140,7 +140,7 @@ class UnifiedSwapClient {
|
|
|
140
140
|
slippageBps,
|
|
141
141
|
swapMode: isExactOut ? titanClient_1.SwapMode.ExactOut : titanClient_1.SwapMode.ExactIn,
|
|
142
142
|
onlyDirectRoutes,
|
|
143
|
-
sizeConstraint: sizeConstraint || 1280 - 375, // MAX_TX_BYTE_SIZE - buffer for
|
|
143
|
+
sizeConstraint: sizeConstraint || 1280 - 375, // MAX_TX_BYTE_SIZE - buffer for velocity instructions
|
|
144
144
|
});
|
|
145
145
|
swapInstructions = titanClient.getTitanInstructions({
|
|
146
146
|
transactionMessage,
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { grpcProgramAccountSubscriber } from '../accounts/grpcProgramAccountSubscriber';
|
|
2
1
|
import { GrpcConfigs } from '../accounts/types';
|
|
3
|
-
import { SignedMsgUserOrdersAccount } from '../types';
|
|
4
2
|
import { SignedMsgUserOrdersAccountSubscriber, SignedMsgUserOrdersAccountSubscriberConfig } from './signedMsgUserAccountSubscriber';
|
|
5
3
|
export declare class grpcSignedMsgUserOrdersAccountSubscriber extends SignedMsgUserOrdersAccountSubscriber {
|
|
6
4
|
private grpcConfigs;
|
|
7
|
-
subscriber: grpcProgramAccountSubscriber<SignedMsgUserOrdersAccount>;
|
|
8
5
|
constructor({ grpcConfigs, ...rest }: SignedMsgUserOrdersAccountSubscriberConfig & {
|
|
9
6
|
grpcConfigs: GrpcConfigs;
|
|
10
7
|
});
|
|
@@ -10,8 +10,8 @@ class grpcSignedMsgUserOrdersAccountSubscriber extends signedMsgUserAccountSubsc
|
|
|
10
10
|
this.grpcConfigs = grpcConfigs;
|
|
11
11
|
}
|
|
12
12
|
async subscribe() {
|
|
13
|
-
if (!this.
|
|
14
|
-
this.
|
|
13
|
+
if (!this._subscriber) {
|
|
14
|
+
this._subscriber =
|
|
15
15
|
await grpcProgramAccountSubscriber_1.grpcProgramAccountSubscriber.create(this.grpcConfigs, 'SingedMsgUserOrdersAccountMap', 'signedMsgUserOrders', this.velocityClient.program, this.decodeFn, {
|
|
16
16
|
filters: [(0, memcmp_1.getSignedMsgUserOrdersFilter)()],
|
|
17
17
|
}, this.resubOpts);
|
|
@@ -38,10 +38,10 @@ class grpcSignedMsgUserOrdersAccountSubscriber extends signedMsgUserAccountSubsc
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
async unsubscribe() {
|
|
41
|
-
if (!this.
|
|
41
|
+
if (!this._subscriber)
|
|
42
42
|
return;
|
|
43
|
-
await this.
|
|
44
|
-
this.
|
|
43
|
+
await this._subscriber.unsubscribe();
|
|
44
|
+
this._subscriber = undefined;
|
|
45
45
|
if (this.resyncTimeoutId !== undefined) {
|
|
46
46
|
clearTimeout(this.resyncTimeoutId);
|
|
47
47
|
this.resyncTimeoutId = undefined;
|
|
@@ -6,7 +6,6 @@ import { SignedMsgOrderId, SignedMsgUserOrdersAccount } from '../types';
|
|
|
6
6
|
import { Commitment, PublicKey } from '@solana/web3.js';
|
|
7
7
|
import { ResubOpts } from '../accounts/types';
|
|
8
8
|
import { VelocityClient } from '../velocityClient';
|
|
9
|
-
import { AtLeastOne } from '../util/deprecatedAlias';
|
|
10
9
|
import StrictEventEmitter from 'strict-event-emitter-types';
|
|
11
10
|
import { EventEmitter } from 'events';
|
|
12
11
|
export type SignedMsgUserOrdersAccountSubscriberConfig = {
|
|
@@ -14,15 +13,15 @@ export type SignedMsgUserOrdersAccountSubscriberConfig = {
|
|
|
14
13
|
resubOpts?: ResubOpts;
|
|
15
14
|
decodeFn?: (name: string, data: Buffer) => SignedMsgUserOrdersAccount;
|
|
16
15
|
resyncIntervalMs?: number;
|
|
17
|
-
} &
|
|
16
|
+
} & {
|
|
17
|
+
velocityClient: VelocityClient;
|
|
18
|
+
};
|
|
18
19
|
export interface SignedMsgUserOrdersAccountSubscriberEvents {
|
|
19
20
|
onAccountUpdate: (activeSignedMsgOrderIds: SignedMsgOrderId[], authorityPubkey: PublicKey, slot: number) => void;
|
|
20
21
|
newSignedMsgOrderIds: (newSignedMsgOrderIds: SignedMsgOrderId[], authorityPubkey: PublicKey, slot: number) => void;
|
|
21
22
|
}
|
|
22
23
|
export declare class SignedMsgUserOrdersAccountSubscriber {
|
|
23
24
|
protected velocityClient: VelocityClient;
|
|
24
|
-
/** @deprecated Use `velocityClient` instead. `driftClient` will be removed in a future major. */
|
|
25
|
-
protected get driftClient(): VelocityClient;
|
|
26
25
|
protected commitment: Commitment;
|
|
27
26
|
protected resubOpts?: ResubOpts;
|
|
28
27
|
protected resyncTimeoutId?: ReturnType<typeof setTimeout>;
|
|
@@ -34,10 +33,11 @@ export declare class SignedMsgUserOrdersAccountSubscriber {
|
|
|
34
33
|
}>;
|
|
35
34
|
mostRecentSlot: number;
|
|
36
35
|
fetchPromise?: Promise<void>;
|
|
37
|
-
fetchPromiseResolver
|
|
38
|
-
protected
|
|
36
|
+
private fetchPromiseResolver;
|
|
37
|
+
protected _subscriber?: WebSocketProgramAccountSubscriber<SignedMsgUserOrdersAccount>;
|
|
38
|
+
protected get subscriber(): WebSocketProgramAccountSubscriber<SignedMsgUserOrdersAccount>;
|
|
39
39
|
eventEmitter: StrictEventEmitter<EventEmitter, SignedMsgUserOrdersAccountSubscriberEvents>;
|
|
40
|
-
constructor({ velocityClient,
|
|
40
|
+
constructor({ velocityClient, commitment, resubOpts, decodeFn, resyncIntervalMs, }: SignedMsgUserOrdersAccountSubscriberConfig);
|
|
41
41
|
subscribe(): Promise<void>;
|
|
42
42
|
fetch(): Promise<void>;
|
|
43
43
|
tryUpdateSignedMsgUserOrdersAccount(data: Buffer | SignedMsgUserOrdersAccount, dataType: 'buffer' | 'decoded', slot: number, skipEventEmitting?: boolean): void;
|
|
@@ -5,16 +5,20 @@ const memcmp_1 = require("../memcmp");
|
|
|
5
5
|
const webSocketProgramAccountSubscriber_1 = require("../accounts/webSocketProgramAccountSubscriber");
|
|
6
6
|
const events_1 = require("events");
|
|
7
7
|
class SignedMsgUserOrdersAccountSubscriber {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
get subscriber() {
|
|
9
|
+
if (!this._subscriber) {
|
|
10
|
+
throw new Error('SignedMsgUserOrdersAccountSubscriber: subscriber accessed before subscribe()');
|
|
11
|
+
}
|
|
12
|
+
return this._subscriber;
|
|
11
13
|
}
|
|
12
|
-
constructor({ velocityClient,
|
|
14
|
+
constructor({ velocityClient, commitment, resubOpts, decodeFn, resyncIntervalMs, }) {
|
|
13
15
|
this.signedMsgUserOrderAccounts = new Map();
|
|
16
|
+
this.mostRecentSlot = 0;
|
|
17
|
+
this.fetchPromiseResolver = () => { };
|
|
14
18
|
this.commitment = commitment !== null && commitment !== void 0 ? commitment : 'confirmed';
|
|
15
19
|
this.resubOpts = resubOpts;
|
|
16
20
|
// Type-system guarantees at least one of the two is supplied.
|
|
17
|
-
this.velocityClient =
|
|
21
|
+
this.velocityClient = velocityClient;
|
|
18
22
|
this.decodeFn =
|
|
19
23
|
decodeFn !== null && decodeFn !== void 0 ? decodeFn : this.velocityClient.program.account.signedMsgUserOrders.coder.accounts.decodeUnchecked.bind(this.velocityClient.program.account.signedMsgUserOrders.coder
|
|
20
24
|
.accounts);
|
|
@@ -23,9 +27,9 @@ class SignedMsgUserOrdersAccountSubscriber {
|
|
|
23
27
|
this.resubOpts = resubOpts;
|
|
24
28
|
}
|
|
25
29
|
async subscribe() {
|
|
26
|
-
if (!this.
|
|
30
|
+
if (!this._subscriber) {
|
|
27
31
|
const filters = [(0, memcmp_1.getSignedMsgUserOrdersFilter)()];
|
|
28
|
-
this.
|
|
32
|
+
this._subscriber =
|
|
29
33
|
new webSocketProgramAccountSubscriber_1.WebSocketProgramAccountSubscriber('SingedMsgUserOrdersAccountMap', 'signedMsgUserOrders', this.velocityClient.program, this.decodeFn, {
|
|
30
34
|
filters,
|
|
31
35
|
commitment: this.commitment,
|
|
@@ -110,10 +114,10 @@ class SignedMsgUserOrdersAccountSubscriber {
|
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
116
|
async unsubscribe() {
|
|
113
|
-
if (!this.
|
|
117
|
+
if (!this._subscriber)
|
|
114
118
|
return;
|
|
115
|
-
await this.
|
|
116
|
-
this.
|
|
119
|
+
await this._subscriber.unsubscribe();
|
|
120
|
+
this._subscriber = undefined;
|
|
117
121
|
if (this.resyncTimeoutId !== undefined) {
|
|
118
122
|
clearTimeout(this.resyncTimeoutId);
|
|
119
123
|
this.resyncTimeoutId = undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VelocityClient } from '../velocityClient';
|
|
2
2
|
import { VelocityEnv } from '../config';
|
|
3
|
-
import { AtLeastOne } from '../util/deprecatedAlias';
|
|
4
3
|
import { OptionalOrderParams, SignedMsgOrderParamsDelegateMessage, SignedMsgOrderParamsMessage, UserAccount } from '../types';
|
|
5
4
|
import { Keypair, TransactionInstruction } from '@solana/web3.js';
|
|
6
5
|
export interface AccountGetter {
|
|
@@ -11,13 +10,17 @@ type SwiftOrderSubscriberConfigBase = {
|
|
|
11
10
|
endpoint?: string;
|
|
12
11
|
marketIndexes: number[];
|
|
13
12
|
/**
|
|
14
|
-
In the future, this will be used for verifying $
|
|
13
|
+
In the future, this will be used for verifying $VELOCITY stake as we add
|
|
15
14
|
authentication for delegate signers
|
|
16
15
|
For now, pass a new keypair or a keypair to an empty wallet
|
|
17
16
|
*/
|
|
18
17
|
keypair: Keypair;
|
|
19
18
|
};
|
|
20
|
-
export type SwiftOrderSubscriberConfig = SwiftOrderSubscriberConfigBase &
|
|
19
|
+
export type SwiftOrderSubscriberConfig = SwiftOrderSubscriberConfigBase & {
|
|
20
|
+
velocityEnv: VelocityEnv;
|
|
21
|
+
} & {
|
|
22
|
+
velocityClient: VelocityClient;
|
|
23
|
+
};
|
|
21
24
|
/**
|
|
22
25
|
* Swift order message received from WebSocket
|
|
23
26
|
*/
|
|
@@ -48,10 +51,8 @@ export declare class SwiftOrderSubscriber {
|
|
|
48
51
|
private readonly heartbeatIntervalMs;
|
|
49
52
|
private ws;
|
|
50
53
|
private velocityClient;
|
|
51
|
-
/** @deprecated Use `velocityClient` instead. `driftClient` will be removed in a future major. */
|
|
52
|
-
private get driftClient();
|
|
53
54
|
userAccountGetter?: AccountGetter;
|
|
54
|
-
onOrder
|
|
55
|
+
onOrder?: (orderMessageRaw: SwiftOrderMessage, signedMessage: SignedMsgOrderParamsMessage | SignedMsgOrderParamsDelegateMessage, isDelegateSigner?: boolean) => Promise<void>;
|
|
55
56
|
subscribed: boolean;
|
|
56
57
|
constructor(config: SwiftOrderSubscriberConfig);
|
|
57
58
|
unsubscribe(): void;
|