@velocity-exchange/sdk 0.0.1
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 -0
- package/.yarn/install-state.gz +0 -0
- package/README.md +275 -0
- package/VERSION +1 -0
- package/build-browser.js +58 -0
- package/bun.lock +1885 -0
- package/esbuild-shims.js +12 -0
- package/lib/browser/accounts/basicUserAccountSubscriber.d.ts +27 -0
- package/lib/browser/accounts/basicUserAccountSubscriber.js +38 -0
- package/lib/browser/accounts/basicUserStatsAccountSubscriber.d.ts +27 -0
- package/lib/browser/accounts/basicUserStatsAccountSubscriber.js +38 -0
- package/lib/browser/accounts/bulkAccountLoader.d.ts +37 -0
- package/lib/browser/accounts/bulkAccountLoader.js +222 -0
- package/lib/browser/accounts/bulkUserStatsSubscription.d.ts +7 -0
- package/lib/browser/accounts/bulkUserStatsSubscription.js +21 -0
- package/lib/browser/accounts/bulkUserSubscription.d.ts +7 -0
- package/lib/browser/accounts/bulkUserSubscription.js +21 -0
- package/lib/browser/accounts/customizedCadenceBulkAccountLoader.d.ts +44 -0
- package/lib/browser/accounts/customizedCadenceBulkAccountLoader.js +152 -0
- package/lib/browser/accounts/fetch.d.ts +17 -0
- package/lib/browser/accounts/fetch.js +60 -0
- package/lib/browser/accounts/grpcAccountSubscriber.d.ts +17 -0
- package/lib/browser/accounts/grpcAccountSubscriber.js +162 -0
- package/lib/browser/accounts/grpcInsuranceFundStakeAccountSubscriber.d.ts +10 -0
- package/lib/browser/accounts/grpcInsuranceFundStakeAccountSubscriber.js +31 -0
- package/lib/browser/accounts/grpcMultiAccountSubscriber.d.ts +37 -0
- package/lib/browser/accounts/grpcMultiAccountSubscriber.js +378 -0
- package/lib/browser/accounts/grpcMultiUserAccountSubscriber.d.ts +25 -0
- package/lib/browser/accounts/grpcMultiUserAccountSubscriber.js +203 -0
- package/lib/browser/accounts/grpcProgramAccountSubscriber.d.ts +18 -0
- package/lib/browser/accounts/grpcProgramAccountSubscriber.js +179 -0
- package/lib/browser/accounts/grpcUserAccountSubscriber.d.ts +10 -0
- package/lib/browser/accounts/grpcUserAccountSubscriber.js +28 -0
- package/lib/browser/accounts/grpcUserStatsAccountSubscriber.d.ts +10 -0
- package/lib/browser/accounts/grpcUserStatsAccountSubscriber.js +28 -0
- package/lib/browser/accounts/grpcVelocityClientAccountSubscriber.d.ts +16 -0
- package/lib/browser/accounts/grpcVelocityClientAccountSubscriber.js +101 -0
- package/lib/browser/accounts/grpcVelocityClientAccountSubscriberV2.d.ts +69 -0
- package/lib/browser/accounts/grpcVelocityClientAccountSubscriberV2.js +457 -0
- package/lib/browser/accounts/laserProgramAccountSubscriber.d.ts +23 -0
- package/lib/browser/accounts/laserProgramAccountSubscriber.js +162 -0
- package/lib/browser/accounts/oneShotUserAccountSubscriber.d.ts +18 -0
- package/lib/browser/accounts/oneShotUserAccountSubscriber.js +48 -0
- package/lib/browser/accounts/oneShotUserStatsAccountSubscriber.d.ts +18 -0
- package/lib/browser/accounts/oneShotUserStatsAccountSubscriber.js +48 -0
- package/lib/browser/accounts/pollingInsuranceFundStakeAccountSubscriber.d.ts +29 -0
- package/lib/browser/accounts/pollingInsuranceFundStakeAccountSubscriber.js +110 -0
- package/lib/browser/accounts/pollingOracleAccountSubscriber.d.ts +27 -0
- package/lib/browser/accounts/pollingOracleAccountSubscriber.js +78 -0
- package/lib/browser/accounts/pollingTokenAccountSubscriber.d.ts +26 -0
- package/lib/browser/accounts/pollingTokenAccountSubscriber.js +78 -0
- package/lib/browser/accounts/pollingUserAccountSubscriber.d.ts +29 -0
- package/lib/browser/accounts/pollingUserAccountSubscriber.js +102 -0
- package/lib/browser/accounts/pollingUserStatsAccountSubscriber.d.ts +27 -0
- package/lib/browser/accounts/pollingUserStatsAccountSubscriber.js +94 -0
- package/lib/browser/accounts/pollingVelocityClientAccountSubscriber.d.ts +73 -0
- package/lib/browser/accounts/pollingVelocityClientAccountSubscriber.js +420 -0
- package/lib/browser/accounts/testBulkAccountLoader.d.ts +4 -0
- package/lib/browser/accounts/testBulkAccountLoader.js +43 -0
- package/lib/browser/accounts/types.d.ts +205 -0
- package/lib/browser/accounts/types.js +16 -0
- package/lib/browser/accounts/utils.d.ts +8 -0
- package/lib/browser/accounts/utils.js +49 -0
- package/lib/browser/accounts/webSocketAccountSubscriber.d.ts +29 -0
- package/lib/browser/accounts/webSocketAccountSubscriber.js +170 -0
- package/lib/browser/accounts/webSocketAccountSubscriberV2.d.ts +109 -0
- package/lib/browser/accounts/webSocketAccountSubscriberV2.js +395 -0
- package/lib/browser/accounts/webSocketInsuranceFundStakeAccountSubscriber.d.ts +23 -0
- package/lib/browser/accounts/webSocketInsuranceFundStakeAccountSubscriber.js +67 -0
- package/lib/browser/accounts/webSocketProgramAccountSubscriber.d.ts +31 -0
- package/lib/browser/accounts/webSocketProgramAccountSubscriber.js +120 -0
- package/lib/browser/accounts/webSocketProgramAccountSubscriberV2.d.ts +145 -0
- package/lib/browser/accounts/webSocketProgramAccountSubscriberV2.js +744 -0
- package/lib/browser/accounts/webSocketProgramAccountsSubscriberV2.d.ts +145 -0
- package/lib/browser/accounts/webSocketProgramAccountsSubscriberV2.js +744 -0
- package/lib/browser/accounts/webSocketUserAccountSubscriber.d.ts +23 -0
- package/lib/browser/accounts/webSocketUserAccountSubscriber.js +61 -0
- package/lib/browser/accounts/webSocketUserStatsAccountSubsriber.d.ts +22 -0
- package/lib/browser/accounts/webSocketUserStatsAccountSubsriber.js +52 -0
- package/lib/browser/accounts/webSocketVelocityClientAccountSubscriber.d.ts +77 -0
- package/lib/browser/accounts/webSocketVelocityClientAccountSubscriber.js +400 -0
- package/lib/browser/accounts/webSocketVelocityClientAccountSubscriberV2.d.ts +91 -0
- package/lib/browser/accounts/webSocketVelocityClientAccountSubscriberV2.js +446 -0
- package/lib/browser/accounts/websocketProgramUserAccountSubscriber.d.ts +22 -0
- package/lib/browser/accounts/websocketProgramUserAccountSubscriber.js +54 -0
- package/lib/browser/addresses/marketAddresses.d.ts +2 -0
- package/lib/browser/addresses/marketAddresses.js +15 -0
- package/lib/browser/addresses/pda.d.ts +47 -0
- package/lib/browser/addresses/pda.js +263 -0
- package/lib/browser/adminClient.d.ts +402 -0
- package/lib/browser/adminClient.js +2798 -0
- package/lib/browser/assert/assert.d.ts +1 -0
- package/lib/browser/assert/assert.js +9 -0
- package/lib/browser/auctionSubscriber/auctionSubscriber.d.ts +14 -0
- package/lib/browser/auctionSubscriber/auctionSubscriber.js +32 -0
- package/lib/browser/auctionSubscriber/auctionSubscriberGrpc.d.ts +15 -0
- package/lib/browser/auctionSubscriber/auctionSubscriberGrpc.js +32 -0
- package/lib/browser/auctionSubscriber/index.d.ts +3 -0
- package/lib/browser/auctionSubscriber/index.js +19 -0
- package/lib/browser/auctionSubscriber/types.d.ts +14 -0
- package/lib/browser/auctionSubscriber/types.js +2 -0
- package/lib/browser/bankrun/bankrunConnection.d.ts +76 -0
- package/lib/browser/bankrun/bankrunConnection.js +348 -0
- package/lib/browser/blockhashSubscriber/BlockhashSubscriber.d.ts +27 -0
- package/lib/browser/blockhashSubscriber/BlockhashSubscriber.js +89 -0
- package/lib/browser/blockhashSubscriber/index.d.ts +1 -0
- package/lib/browser/blockhashSubscriber/index.js +17 -0
- package/lib/browser/blockhashSubscriber/types.d.ts +7 -0
- package/lib/browser/blockhashSubscriber/types.js +2 -0
- package/lib/browser/clock/clockSubscriber.d.ts +31 -0
- package/lib/browser/clock/clockSubscriber.js +80 -0
- package/lib/browser/config.d.ts +75 -0
- package/lib/browser/config.js +164 -0
- package/lib/browser/constants/index.d.ts +10 -0
- package/lib/browser/constants/index.js +26 -0
- package/lib/browser/constants/insuranceFund.d.ts +5 -0
- package/lib/browser/constants/insuranceFund.js +9 -0
- package/lib/browser/constants/numericConstants.d.ts +73 -0
- package/lib/browser/constants/numericConstants.js +79 -0
- package/lib/browser/constants/perpMarkets.d.ts +21 -0
- package/lib/browser/constants/perpMarkets.js +971 -0
- package/lib/browser/constants/spotMarkets.d.ts +24 -0
- package/lib/browser/constants/spotMarkets.js +797 -0
- package/lib/browser/constants/txConstants.d.ts +1 -0
- package/lib/browser/constants/txConstants.js +4 -0
- package/lib/browser/constituentMap/constituentMap.d.ts +66 -0
- package/lib/browser/constituentMap/constituentMap.js +177 -0
- package/lib/browser/constituentMap/pollingConstituentAccountSubscriber.d.ts +24 -0
- package/lib/browser/constituentMap/pollingConstituentAccountSubscriber.js +60 -0
- package/lib/browser/constituentMap/webSocketConstituentAccountSubscriber.d.ts +24 -0
- package/lib/browser/constituentMap/webSocketConstituentAccountSubscriber.js +58 -0
- package/lib/browser/core/VelocityCore.d.ts +226 -0
- package/lib/browser/core/VelocityCore.js +138 -0
- package/lib/browser/core/index.d.ts +12 -0
- package/lib/browser/core/index.js +28 -0
- package/lib/browser/core/instructions/deposit.d.ts +19 -0
- package/lib/browser/core/instructions/deposit.js +19 -0
- package/lib/browser/core/instructions/fill.d.ts +13 -0
- package/lib/browser/core/instructions/fill.js +17 -0
- package/lib/browser/core/instructions/funding.d.ts +9 -0
- package/lib/browser/core/instructions/funding.js +13 -0
- package/lib/browser/core/instructions/liquidation.d.ts +15 -0
- package/lib/browser/core/instructions/liquidation.js +17 -0
- package/lib/browser/core/instructions/orders.d.ts +22 -0
- package/lib/browser/core/instructions/orders.js +27 -0
- package/lib/browser/core/instructions/perpOrders.d.ts +78 -0
- package/lib/browser/core/instructions/perpOrders.js +99 -0
- package/lib/browser/core/instructions/settlement.d.ts +11 -0
- package/lib/browser/core/instructions/settlement.js +15 -0
- package/lib/browser/core/instructions/trigger.d.ts +11 -0
- package/lib/browser/core/instructions/trigger.js +15 -0
- package/lib/browser/core/instructions/withdraw.d.ts +20 -0
- package/lib/browser/core/instructions/withdraw.js +20 -0
- package/lib/browser/core/remainingAccounts.d.ts +27 -0
- package/lib/browser/core/remainingAccounts.js +122 -0
- package/lib/browser/core/signedMsg.d.ts +17 -0
- package/lib/browser/core/signedMsg.js +39 -0
- package/lib/browser/decode/customCoder.d.ts +44 -0
- package/lib/browser/decode/customCoder.js +64 -0
- package/lib/browser/decode/user.d.ts +4 -0
- package/lib/browser/decode/user.js +337 -0
- package/lib/browser/dlob/DLOB.d.ts +253 -0
- package/lib/browser/dlob/DLOB.js +1137 -0
- package/lib/browser/dlob/DLOBNode.d.ts +70 -0
- package/lib/browser/dlob/DLOBNode.js +103 -0
- package/lib/browser/dlob/DLOBSubscriber.d.ts +57 -0
- package/lib/browser/dlob/DLOBSubscriber.js +143 -0
- package/lib/browser/dlob/NodeList.d.ts +27 -0
- package/lib/browser/dlob/NodeList.js +126 -0
- package/lib/browser/dlob/orderBookLevels.d.ts +77 -0
- package/lib/browser/dlob/orderBookLevels.js +404 -0
- package/lib/browser/dlob/types.d.ts +18 -0
- package/lib/browser/dlob/types.js +2 -0
- package/lib/browser/events/eventList.d.ts +22 -0
- package/lib/browser/events/eventList.js +80 -0
- package/lib/browser/events/eventSubscriber.d.ts +55 -0
- package/lib/browser/events/eventSubscriber.js +229 -0
- package/lib/browser/events/eventsServerLogProvider.d.ts +21 -0
- package/lib/browser/events/eventsServerLogProvider.js +121 -0
- package/lib/browser/events/fetchLogs.d.ts +25 -0
- package/lib/browser/events/fetchLogs.js +99 -0
- package/lib/browser/events/parse.d.ts +8 -0
- package/lib/browser/events/parse.js +199 -0
- package/lib/browser/events/pollingLogProvider.d.ts +17 -0
- package/lib/browser/events/pollingLogProvider.js +58 -0
- package/lib/browser/events/sort.d.ts +2 -0
- package/lib/browser/events/sort.js +24 -0
- package/lib/browser/events/txEventCache.d.ts +24 -0
- package/lib/browser/events/txEventCache.js +71 -0
- package/lib/browser/events/types.d.ts +104 -0
- package/lib/browser/events/types.js +36 -0
- package/lib/browser/events/webSocketLogProvider.d.ts +24 -0
- package/lib/browser/events/webSocketLogProvider.js +96 -0
- package/lib/browser/factory/bigNum.d.ts +122 -0
- package/lib/browser/factory/bigNum.js +500 -0
- package/lib/browser/factory/oracleClient.d.ts +5 -0
- package/lib/browser/factory/oracleClient.js +53 -0
- package/lib/browser/idl/drift.d.ts +23894 -0
- package/lib/browser/idl/drift.js +2 -0
- package/lib/browser/idl/drift.json +18698 -0
- package/lib/browser/idl/pyth.d.ts +97 -0
- package/lib/browser/idl/pyth.js +2 -0
- package/lib/browser/idl/token_faucet.d.ts +197 -0
- package/lib/browser/idl/token_faucet.js +2 -0
- package/lib/browser/idl/token_faucet.json +229 -0
- package/lib/browser/index.d.ts +144 -0
- package/lib/browser/index.js +175 -0
- package/lib/browser/indicative-quotes/indicativeQuotesSender.d.ts +35 -0
- package/lib/browser/indicative-quotes/indicativeQuotesSender.js +192 -0
- package/lib/browser/isomorphic/anchor.browser.d.ts +24 -0
- package/lib/browser/isomorphic/anchor.browser.js +60 -0
- package/lib/browser/isomorphic/anchor.d.ts +24 -0
- package/lib/browser/isomorphic/anchor.js +60 -0
- package/lib/browser/isomorphic/anchor29.browser.d.ts +12 -0
- package/lib/browser/isomorphic/anchor29.browser.js +48 -0
- package/lib/browser/isomorphic/anchor29.d.ts +12 -0
- package/lib/browser/isomorphic/anchor29.js +48 -0
- package/lib/browser/isomorphic/grpc.browser.d.ts +1 -0
- package/lib/browser/isomorphic/grpc.browser.js +8 -0
- package/lib/browser/isomorphic/grpc.d.ts +1 -0
- package/lib/browser/isomorphic/grpc.js +8 -0
- package/lib/browser/jupiter/jupiterClient.d.ts +291 -0
- package/lib/browser/jupiter/jupiterClient.js +164 -0
- package/lib/browser/keypair.d.ts +2 -0
- package/lib/browser/keypair.js +28 -0
- package/lib/browser/marginCalculation.d.ts +67 -0
- package/lib/browser/marginCalculation.js +176 -0
- package/lib/browser/marinade/index.d.ts +12 -0
- package/lib/browser/marinade/index.js +36 -0
- package/lib/browser/marinade/types.d.ts +1963 -0
- package/lib/browser/marinade/types.js +1965 -0
- package/lib/browser/math/amm.d.ts +98 -0
- package/lib/browser/math/amm.js +671 -0
- package/lib/browser/math/auction.d.ts +65 -0
- package/lib/browser/math/auction.js +261 -0
- package/lib/browser/math/bankruptcy.d.ts +2 -0
- package/lib/browser/math/bankruptcy.js +32 -0
- package/lib/browser/math/builder.d.ts +5 -0
- package/lib/browser/math/builder.js +22 -0
- package/lib/browser/math/conversion.d.ts +4 -0
- package/lib/browser/math/conversion.js +21 -0
- package/lib/browser/math/exchangeStatus.d.ts +8 -0
- package/lib/browser/math/exchangeStatus.js +85 -0
- package/lib/browser/math/funding.d.ts +44 -0
- package/lib/browser/math/funding.js +260 -0
- package/lib/browser/math/insurance.d.ts +8 -0
- package/lib/browser/math/insurance.js +74 -0
- package/lib/browser/math/liquidation.d.ts +7 -0
- package/lib/browser/math/liquidation.js +134 -0
- package/lib/browser/math/margin.d.ts +45 -0
- package/lib/browser/math/margin.js +205 -0
- package/lib/browser/math/market.d.ts +50 -0
- package/lib/browser/math/market.js +234 -0
- package/lib/browser/math/oracles.d.ts +19 -0
- package/lib/browser/math/oracles.js +215 -0
- package/lib/browser/math/orders.d.ts +36 -0
- package/lib/browser/math/orders.js +294 -0
- package/lib/browser/math/position.d.ts +71 -0
- package/lib/browser/math/position.js +232 -0
- package/lib/browser/math/repeg.d.ts +22 -0
- package/lib/browser/math/repeg.js +164 -0
- package/lib/browser/math/spotBalance.d.ts +85 -0
- package/lib/browser/math/spotBalance.js +438 -0
- package/lib/browser/math/spotMarket.d.ts +11 -0
- package/lib/browser/math/spotMarket.js +49 -0
- package/lib/browser/math/spotPosition.d.ts +19 -0
- package/lib/browser/math/spotPosition.js +79 -0
- package/lib/browser/math/state.d.ts +8 -0
- package/lib/browser/math/state.js +44 -0
- package/lib/browser/math/superStake.d.ts +168 -0
- package/lib/browser/math/superStake.js +308 -0
- package/lib/browser/math/tiers.d.ts +4 -0
- package/lib/browser/math/tiers.js +52 -0
- package/lib/browser/math/trade.d.ts +93 -0
- package/lib/browser/math/trade.js +503 -0
- package/lib/browser/math/utils.d.ts +23 -0
- package/lib/browser/math/utils.js +113 -0
- package/lib/browser/memcmp.d.ts +18 -0
- package/lib/browser/memcmp.js +162 -0
- package/lib/browser/oracles/oracleClientCache.d.ts +9 -0
- package/lib/browser/oracles/oracleClientCache.js +19 -0
- package/lib/browser/oracles/oracleId.d.ts +9 -0
- package/lib/browser/oracles/oracleId.js +89 -0
- package/lib/browser/oracles/prelaunchOracleClient.d.ts +12 -0
- package/lib/browser/oracles/prelaunchOracleClient.js +24 -0
- package/lib/browser/oracles/pythClient.d.ts +14 -0
- package/lib/browser/oracles/pythClient.js +51 -0
- package/lib/browser/oracles/pythLazerClient.d.ts +16 -0
- package/lib/browser/oracles/pythLazerClient.js +61 -0
- package/lib/browser/oracles/quoteAssetOracleClient.d.ts +10 -0
- package/lib/browser/oracles/quoteAssetOracleClient.js +21 -0
- package/lib/browser/oracles/strictOraclePrice.d.ts +9 -0
- package/lib/browser/oracles/strictOraclePrice.js +17 -0
- package/lib/browser/oracles/types.d.ts +33 -0
- package/lib/browser/oracles/types.js +2 -0
- package/lib/browser/oracles/utils.d.ts +4 -0
- package/lib/browser/oracles/utils.js +8 -0
- package/lib/browser/orderParams.d.ts +29 -0
- package/lib/browser/orderParams.js +44 -0
- package/lib/browser/orderSubscriber/OrderSubscriber.d.ts +45 -0
- package/lib/browser/orderSubscriber/OrderSubscriber.js +193 -0
- package/lib/browser/orderSubscriber/PollingSubscription.d.ts +12 -0
- package/lib/browser/orderSubscriber/PollingSubscription.js +23 -0
- package/lib/browser/orderSubscriber/WebsocketSubscription.d.ts +23 -0
- package/lib/browser/orderSubscriber/WebsocketSubscription.js +67 -0
- package/lib/browser/orderSubscriber/grpcSubscription.d.ts +22 -0
- package/lib/browser/orderSubscriber/grpcSubscription.js +75 -0
- package/lib/browser/orderSubscriber/index.d.ts +7 -0
- package/lib/browser/orderSubscriber/index.js +23 -0
- package/lib/browser/orderSubscriber/types.d.ts +35 -0
- package/lib/browser/orderSubscriber/types.js +2 -0
- package/lib/browser/priorityFee/averageOverSlotsStrategy.d.ts +5 -0
- package/lib/browser/priorityFee/averageOverSlotsStrategy.js +16 -0
- package/lib/browser/priorityFee/averageStrategy.d.ts +5 -0
- package/lib/browser/priorityFee/averageStrategy.js +11 -0
- package/lib/browser/priorityFee/ewmaStrategy.d.ts +11 -0
- package/lib/browser/priorityFee/ewmaStrategy.js +33 -0
- package/lib/browser/priorityFee/heliusPriorityFeeMethod.d.ts +20 -0
- package/lib/browser/priorityFee/heliusPriorityFeeMethod.js +46 -0
- package/lib/browser/priorityFee/index.d.ts +16 -0
- package/lib/browser/priorityFee/index.js +32 -0
- package/lib/browser/priorityFee/maxOverSlotsStrategy.d.ts +5 -0
- package/lib/browser/priorityFee/maxOverSlotsStrategy.js +17 -0
- package/lib/browser/priorityFee/maxStrategy.d.ts +7 -0
- package/lib/browser/priorityFee/maxStrategy.js +9 -0
- package/lib/browser/priorityFee/priorityFeeSubscriber.d.ts +48 -0
- package/lib/browser/priorityFee/priorityFeeSubscriber.js +193 -0
- package/lib/browser/priorityFee/priorityFeeSubscriberMap.d.ts +50 -0
- package/lib/browser/priorityFee/priorityFeeSubscriberMap.js +96 -0
- package/lib/browser/priorityFee/solanaPriorityFeeMethod.d.ts +6 -0
- package/lib/browser/priorityFee/solanaPriorityFeeMethod.js +21 -0
- package/lib/browser/priorityFee/types.d.ts +35 -0
- package/lib/browser/priorityFee/types.js +10 -0
- package/lib/browser/priorityFee/velocityPriorityFeeMethod.d.ts +21 -0
- package/lib/browser/priorityFee/velocityPriorityFeeMethod.js +28 -0
- package/lib/browser/pyth/constants.d.ts +3 -0
- package/lib/browser/pyth/constants.js +6 -0
- package/lib/browser/pyth/index.d.ts +4 -0
- package/lib/browser/pyth/index.js +12 -0
- package/lib/browser/pyth/pythLazerSubscriber.d.ts +91 -0
- package/lib/browser/pyth/pythLazerSubscriber.js +276 -0
- package/lib/browser/pyth/types.d.ts +2226 -0
- package/lib/browser/pyth/types.js +2224 -0
- package/lib/browser/pyth/utils.d.ts +2 -0
- package/lib/browser/pyth/utils.js +10 -0
- package/lib/browser/slot/SlotSubscriber.d.ts +27 -0
- package/lib/browser/slot/SlotSubscriber.js +76 -0
- package/lib/browser/slot/SlothashSubscriber.d.ts +25 -0
- package/lib/browser/slot/SlothashSubscriber.js +88 -0
- package/lib/browser/swap/UnifiedSwapClient.d.ts +120 -0
- package/lib/browser/swap/UnifiedSwapClient.js +179 -0
- package/lib/browser/swift/grpcSignedMsgUserAccountSubscriber.d.ts +22 -0
- package/lib/browser/swift/grpcSignedMsgUserAccountSubscriber.js +57 -0
- package/lib/browser/swift/index.d.ts +10 -0
- package/lib/browser/swift/index.js +26 -0
- package/lib/browser/swift/signedMsgUserAccountSubscriber.d.ts +42 -0
- package/lib/browser/swift/signedMsgUserAccountSubscriber.js +118 -0
- package/lib/browser/swift/swiftOrderSubscriber.d.ts +63 -0
- package/lib/browser/swift/swiftOrderSubscriber.js +187 -0
- package/lib/browser/testClient.d.ts +8 -0
- package/lib/browser/testClient.js +24 -0
- package/lib/browser/titan/titanClient.d.ts +90 -0
- package/lib/browser/titan/titanClient.js +227 -0
- package/lib/browser/token/index.d.ts +5 -0
- package/lib/browser/token/index.js +15 -0
- package/lib/browser/tokenFaucet.d.ts +41 -0
- package/lib/browser/tokenFaucet.js +188 -0
- package/lib/browser/tx/baseTxSender.d.ts +59 -0
- package/lib/browser/tx/baseTxSender.js +292 -0
- package/lib/browser/tx/blockhashFetcher/baseBlockhashFetcher.d.ts +8 -0
- package/lib/browser/tx/blockhashFetcher/baseBlockhashFetcher.js +13 -0
- package/lib/browser/tx/blockhashFetcher/cachedBlockhashFetcher.d.ts +28 -0
- package/lib/browser/tx/blockhashFetcher/cachedBlockhashFetcher.js +73 -0
- package/lib/browser/tx/blockhashFetcher/types.d.ts +4 -0
- package/lib/browser/tx/blockhashFetcher/types.js +2 -0
- package/lib/browser/tx/fastSingleTxSender.d.ts +41 -0
- package/lib/browser/tx/fastSingleTxSender.js +86 -0
- package/lib/browser/tx/forwardOnlyTxSender.d.ts +37 -0
- package/lib/browser/tx/forwardOnlyTxSender.js +92 -0
- package/lib/browser/tx/priorityFeeCalculator.d.ts +44 -0
- package/lib/browser/tx/priorityFeeCalculator.js +85 -0
- package/lib/browser/tx/reportTransactionError.d.ts +20 -0
- package/lib/browser/tx/reportTransactionError.js +103 -0
- package/lib/browser/tx/retryTxSender.d.ts +37 -0
- package/lib/browser/tx/retryTxSender.js +86 -0
- package/lib/browser/tx/txHandler.d.ts +173 -0
- package/lib/browser/tx/txHandler.js +522 -0
- package/lib/browser/tx/txParamProcessor.d.ts +26 -0
- package/lib/browser/tx/txParamProcessor.js +92 -0
- package/lib/browser/tx/types.d.ts +29 -0
- package/lib/browser/tx/types.js +20 -0
- package/lib/browser/tx/utils.d.ts +6 -0
- package/lib/browser/tx/utils.js +78 -0
- package/lib/browser/tx/whileValidTxSender.d.ts +45 -0
- package/lib/browser/tx/whileValidTxSender.js +168 -0
- package/lib/browser/types.d.ts +1747 -0
- package/lib/browser/types.js +427 -0
- package/lib/browser/user.d.ts +446 -0
- package/lib/browser/user.js +2372 -0
- package/lib/browser/userConfig.d.ts +31 -0
- package/lib/browser/userConfig.js +2 -0
- package/lib/browser/userMap/PollingSubscription.d.ts +15 -0
- package/lib/browser/userMap/PollingSubscription.js +30 -0
- package/lib/browser/userMap/WebsocketSubscription.d.ts +27 -0
- package/lib/browser/userMap/WebsocketSubscription.js +45 -0
- package/lib/browser/userMap/grpcSubscription.d.ts +27 -0
- package/lib/browser/userMap/grpcSubscription.js +44 -0
- package/lib/browser/userMap/referrerMap.d.ts +45 -0
- package/lib/browser/userMap/referrerMap.js +184 -0
- package/lib/browser/userMap/revenueShareEscrowMap.d.ts +66 -0
- package/lib/browser/userMap/revenueShareEscrowMap.js +210 -0
- package/lib/browser/userMap/userMap.d.ts +114 -0
- package/lib/browser/userMap/userMap.js +486 -0
- package/lib/browser/userMap/userMapConfig.d.ts +40 -0
- package/lib/browser/userMap/userMapConfig.js +2 -0
- package/lib/browser/userMap/userStatsMap.d.ts +66 -0
- package/lib/browser/userMap/userStatsMap.js +266 -0
- package/lib/browser/userName.d.ts +5 -0
- package/lib/browser/userName.js +21 -0
- package/lib/browser/userStats.d.ts +24 -0
- package/lib/browser/userStats.js +70 -0
- package/lib/browser/userStatsConfig.d.ts +26 -0
- package/lib/browser/userStatsConfig.js +2 -0
- package/lib/browser/util/TransactionConfirmationManager.d.ts +16 -0
- package/lib/browser/util/TransactionConfirmationManager.js +174 -0
- package/lib/browser/util/chainClock.d.ts +17 -0
- package/lib/browser/util/chainClock.js +29 -0
- package/lib/browser/util/computeUnits.d.ts +8 -0
- package/lib/browser/util/computeUnits.js +48 -0
- package/lib/browser/util/digest.d.ts +5 -0
- package/lib/browser/util/digest.js +19 -0
- package/lib/browser/util/ed25519Utils.d.ts +10 -0
- package/lib/browser/util/ed25519Utils.js +80 -0
- package/lib/browser/util/promiseTimeout.d.ts +1 -0
- package/lib/browser/util/promiseTimeout.js +14 -0
- package/lib/browser/util/tps.d.ts +2 -0
- package/lib/browser/util/tps.js +16 -0
- package/lib/browser/velocityClient.d.ts +1230 -0
- package/lib/browser/velocityClient.js +5778 -0
- package/lib/browser/velocityClientConfig.d.ts +84 -0
- package/lib/browser/velocityClientConfig.js +2 -0
- package/lib/browser/wallet.d.ts +16 -0
- package/lib/browser/wallet.js +46 -0
- package/lib/node/accounts/basicUserAccountSubscriber.d.ts +28 -0
- package/lib/node/accounts/basicUserAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/basicUserAccountSubscriber.js +38 -0
- package/lib/node/accounts/basicUserStatsAccountSubscriber.d.ts +28 -0
- package/lib/node/accounts/basicUserStatsAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/basicUserStatsAccountSubscriber.js +38 -0
- package/lib/node/accounts/bulkAccountLoader.d.ts +38 -0
- package/lib/node/accounts/bulkAccountLoader.d.ts.map +1 -0
- package/lib/node/accounts/bulkAccountLoader.js +222 -0
- package/lib/node/accounts/bulkUserStatsSubscription.d.ts +8 -0
- package/lib/node/accounts/bulkUserStatsSubscription.d.ts.map +1 -0
- package/lib/node/accounts/bulkUserStatsSubscription.js +21 -0
- package/lib/node/accounts/bulkUserSubscription.d.ts +8 -0
- package/lib/node/accounts/bulkUserSubscription.d.ts.map +1 -0
- package/lib/node/accounts/bulkUserSubscription.js +21 -0
- package/lib/node/accounts/customizedCadenceBulkAccountLoader.d.ts +45 -0
- package/lib/node/accounts/customizedCadenceBulkAccountLoader.d.ts.map +1 -0
- package/lib/node/accounts/customizedCadenceBulkAccountLoader.js +152 -0
- package/lib/node/accounts/fetch.d.ts +18 -0
- package/lib/node/accounts/fetch.d.ts.map +1 -0
- package/lib/node/accounts/fetch.js +60 -0
- package/lib/node/accounts/grpcAccountSubscriber.d.ts +18 -0
- package/lib/node/accounts/grpcAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/grpcAccountSubscriber.js +162 -0
- package/lib/node/accounts/grpcInsuranceFundStakeAccountSubscriber.d.ts +11 -0
- package/lib/node/accounts/grpcInsuranceFundStakeAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/grpcInsuranceFundStakeAccountSubscriber.js +31 -0
- package/lib/node/accounts/grpcMultiAccountSubscriber.d.ts +38 -0
- package/lib/node/accounts/grpcMultiAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/grpcMultiAccountSubscriber.js +378 -0
- package/lib/node/accounts/grpcMultiUserAccountSubscriber.d.ts +26 -0
- package/lib/node/accounts/grpcMultiUserAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/grpcMultiUserAccountSubscriber.js +203 -0
- package/lib/node/accounts/grpcProgramAccountSubscriber.d.ts +19 -0
- package/lib/node/accounts/grpcProgramAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/grpcProgramAccountSubscriber.js +179 -0
- package/lib/node/accounts/grpcUserAccountSubscriber.d.ts +11 -0
- package/lib/node/accounts/grpcUserAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/grpcUserAccountSubscriber.js +28 -0
- package/lib/node/accounts/grpcUserStatsAccountSubscriber.d.ts +11 -0
- package/lib/node/accounts/grpcUserStatsAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/grpcUserStatsAccountSubscriber.js +28 -0
- package/lib/node/accounts/grpcVelocityClientAccountSubscriber.d.ts +17 -0
- package/lib/node/accounts/grpcVelocityClientAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/grpcVelocityClientAccountSubscriber.js +101 -0
- package/lib/node/accounts/grpcVelocityClientAccountSubscriberV2.d.ts +70 -0
- package/lib/node/accounts/grpcVelocityClientAccountSubscriberV2.d.ts.map +1 -0
- package/lib/node/accounts/grpcVelocityClientAccountSubscriberV2.js +457 -0
- package/lib/node/accounts/laserProgramAccountSubscriber.d.ts +24 -0
- package/lib/node/accounts/laserProgramAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/laserProgramAccountSubscriber.js +162 -0
- package/lib/node/accounts/oneShotUserAccountSubscriber.d.ts +19 -0
- package/lib/node/accounts/oneShotUserAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/oneShotUserAccountSubscriber.js +48 -0
- package/lib/node/accounts/oneShotUserStatsAccountSubscriber.d.ts +19 -0
- package/lib/node/accounts/oneShotUserStatsAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/oneShotUserStatsAccountSubscriber.js +48 -0
- package/lib/node/accounts/pollingInsuranceFundStakeAccountSubscriber.d.ts +30 -0
- package/lib/node/accounts/pollingInsuranceFundStakeAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/pollingInsuranceFundStakeAccountSubscriber.js +110 -0
- package/lib/node/accounts/pollingOracleAccountSubscriber.d.ts +28 -0
- package/lib/node/accounts/pollingOracleAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/pollingOracleAccountSubscriber.js +78 -0
- package/lib/node/accounts/pollingTokenAccountSubscriber.d.ts +27 -0
- package/lib/node/accounts/pollingTokenAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/pollingTokenAccountSubscriber.js +78 -0
- package/lib/node/accounts/pollingUserAccountSubscriber.d.ts +30 -0
- package/lib/node/accounts/pollingUserAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/pollingUserAccountSubscriber.js +102 -0
- package/lib/node/accounts/pollingUserStatsAccountSubscriber.d.ts +28 -0
- package/lib/node/accounts/pollingUserStatsAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/pollingUserStatsAccountSubscriber.js +94 -0
- package/lib/node/accounts/pollingVelocityClientAccountSubscriber.d.ts +74 -0
- package/lib/node/accounts/pollingVelocityClientAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/pollingVelocityClientAccountSubscriber.js +420 -0
- package/lib/node/accounts/testBulkAccountLoader.d.ts +5 -0
- package/lib/node/accounts/testBulkAccountLoader.d.ts.map +1 -0
- package/lib/node/accounts/testBulkAccountLoader.js +43 -0
- package/lib/node/accounts/types.d.ts +206 -0
- package/lib/node/accounts/types.d.ts.map +1 -0
- package/lib/node/accounts/types.js +16 -0
- package/lib/node/accounts/utils.d.ts +9 -0
- package/lib/node/accounts/utils.d.ts.map +1 -0
- package/lib/node/accounts/utils.js +49 -0
- package/lib/node/accounts/webSocketAccountSubscriber.d.ts +30 -0
- package/lib/node/accounts/webSocketAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/webSocketAccountSubscriber.js +170 -0
- package/lib/node/accounts/webSocketAccountSubscriberV2.d.ts +110 -0
- package/lib/node/accounts/webSocketAccountSubscriberV2.d.ts.map +1 -0
- package/lib/node/accounts/webSocketAccountSubscriberV2.js +395 -0
- package/lib/node/accounts/webSocketInsuranceFundStakeAccountSubscriber.d.ts +24 -0
- package/lib/node/accounts/webSocketInsuranceFundStakeAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/webSocketInsuranceFundStakeAccountSubscriber.js +67 -0
- package/lib/node/accounts/webSocketProgramAccountSubscriber.d.ts +32 -0
- package/lib/node/accounts/webSocketProgramAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/webSocketProgramAccountSubscriber.js +120 -0
- package/lib/node/accounts/webSocketProgramAccountSubscriberV2.d.ts +146 -0
- package/lib/node/accounts/webSocketProgramAccountSubscriberV2.d.ts.map +1 -0
- package/lib/node/accounts/webSocketProgramAccountSubscriberV2.js +744 -0
- package/lib/node/accounts/webSocketProgramAccountsSubscriberV2.d.ts +146 -0
- package/lib/node/accounts/webSocketProgramAccountsSubscriberV2.d.ts.map +1 -0
- package/lib/node/accounts/webSocketProgramAccountsSubscriberV2.js +744 -0
- package/lib/node/accounts/webSocketUserAccountSubscriber.d.ts +24 -0
- package/lib/node/accounts/webSocketUserAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/webSocketUserAccountSubscriber.js +61 -0
- package/lib/node/accounts/webSocketUserStatsAccountSubsriber.d.ts +23 -0
- package/lib/node/accounts/webSocketUserStatsAccountSubsriber.d.ts.map +1 -0
- package/lib/node/accounts/webSocketUserStatsAccountSubsriber.js +52 -0
- package/lib/node/accounts/webSocketVelocityClientAccountSubscriber.d.ts +78 -0
- package/lib/node/accounts/webSocketVelocityClientAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/webSocketVelocityClientAccountSubscriber.js +400 -0
- package/lib/node/accounts/webSocketVelocityClientAccountSubscriberV2.d.ts +92 -0
- package/lib/node/accounts/webSocketVelocityClientAccountSubscriberV2.d.ts.map +1 -0
- package/lib/node/accounts/webSocketVelocityClientAccountSubscriberV2.js +446 -0
- package/lib/node/accounts/websocketProgramUserAccountSubscriber.d.ts +23 -0
- package/lib/node/accounts/websocketProgramUserAccountSubscriber.d.ts.map +1 -0
- package/lib/node/accounts/websocketProgramUserAccountSubscriber.js +54 -0
- package/lib/node/addresses/marketAddresses.d.ts +3 -0
- package/lib/node/addresses/marketAddresses.d.ts.map +1 -0
- package/lib/node/addresses/marketAddresses.js +15 -0
- package/lib/node/addresses/pda.d.ts +48 -0
- package/lib/node/addresses/pda.d.ts.map +1 -0
- package/lib/node/addresses/pda.js +263 -0
- package/lib/node/adminClient.d.ts +403 -0
- package/lib/node/adminClient.d.ts.map +1 -0
- package/lib/node/adminClient.js +2798 -0
- package/lib/node/assert/assert.d.ts +2 -0
- package/lib/node/assert/assert.d.ts.map +1 -0
- package/lib/node/assert/assert.js +9 -0
- package/lib/node/auctionSubscriber/auctionSubscriber.d.ts +15 -0
- package/lib/node/auctionSubscriber/auctionSubscriber.d.ts.map +1 -0
- package/lib/node/auctionSubscriber/auctionSubscriber.js +32 -0
- package/lib/node/auctionSubscriber/auctionSubscriberGrpc.d.ts +16 -0
- package/lib/node/auctionSubscriber/auctionSubscriberGrpc.d.ts.map +1 -0
- package/lib/node/auctionSubscriber/auctionSubscriberGrpc.js +32 -0
- package/lib/node/auctionSubscriber/index.d.ts +4 -0
- package/lib/node/auctionSubscriber/index.d.ts.map +1 -0
- package/lib/node/auctionSubscriber/index.js +19 -0
- package/lib/node/auctionSubscriber/types.d.ts +15 -0
- package/lib/node/auctionSubscriber/types.d.ts.map +1 -0
- package/lib/node/auctionSubscriber/types.js +2 -0
- package/lib/node/bankrun/bankrunConnection.d.ts +77 -0
- package/lib/node/bankrun/bankrunConnection.d.ts.map +1 -0
- package/lib/node/bankrun/bankrunConnection.js +348 -0
- package/lib/node/blockhashSubscriber/BlockhashSubscriber.d.ts +28 -0
- package/lib/node/blockhashSubscriber/BlockhashSubscriber.d.ts.map +1 -0
- package/lib/node/blockhashSubscriber/BlockhashSubscriber.js +89 -0
- package/lib/node/blockhashSubscriber/index.d.ts +2 -0
- package/lib/node/blockhashSubscriber/index.d.ts.map +1 -0
- package/lib/node/blockhashSubscriber/index.js +17 -0
- package/lib/node/blockhashSubscriber/types.d.ts +8 -0
- package/lib/node/blockhashSubscriber/types.d.ts.map +1 -0
- package/lib/node/blockhashSubscriber/types.js +2 -0
- package/lib/node/clock/clockSubscriber.d.ts +32 -0
- package/lib/node/clock/clockSubscriber.d.ts.map +1 -0
- package/lib/node/clock/clockSubscriber.js +80 -0
- package/lib/node/config.d.ts +76 -0
- package/lib/node/config.d.ts.map +1 -0
- package/lib/node/config.js +164 -0
- package/lib/node/constants/index.d.ts +11 -0
- package/lib/node/constants/index.d.ts.map +1 -0
- package/lib/node/constants/index.js +26 -0
- package/lib/node/constants/insuranceFund.d.ts +6 -0
- package/lib/node/constants/insuranceFund.d.ts.map +1 -0
- package/lib/node/constants/insuranceFund.js +9 -0
- package/lib/node/constants/numericConstants.d.ts +74 -0
- package/lib/node/constants/numericConstants.d.ts.map +1 -0
- package/lib/node/constants/numericConstants.js +79 -0
- package/lib/node/constants/perpMarkets.d.ts +22 -0
- package/lib/node/constants/perpMarkets.d.ts.map +1 -0
- package/lib/node/constants/perpMarkets.js +971 -0
- package/lib/node/constants/spotMarkets.d.ts +25 -0
- package/lib/node/constants/spotMarkets.d.ts.map +1 -0
- package/lib/node/constants/spotMarkets.js +797 -0
- package/lib/node/constants/txConstants.d.ts +2 -0
- package/lib/node/constants/txConstants.d.ts.map +1 -0
- package/lib/node/constants/txConstants.js +4 -0
- package/lib/node/constituentMap/constituentMap.d.ts +67 -0
- package/lib/node/constituentMap/constituentMap.d.ts.map +1 -0
- package/lib/node/constituentMap/constituentMap.js +177 -0
- package/lib/node/constituentMap/pollingConstituentAccountSubscriber.d.ts +25 -0
- package/lib/node/constituentMap/pollingConstituentAccountSubscriber.d.ts.map +1 -0
- package/lib/node/constituentMap/pollingConstituentAccountSubscriber.js +60 -0
- package/lib/node/constituentMap/webSocketConstituentAccountSubscriber.d.ts +25 -0
- package/lib/node/constituentMap/webSocketConstituentAccountSubscriber.d.ts.map +1 -0
- package/lib/node/constituentMap/webSocketConstituentAccountSubscriber.js +58 -0
- package/lib/node/core/VelocityCore.d.ts +227 -0
- package/lib/node/core/VelocityCore.d.ts.map +1 -0
- package/lib/node/core/VelocityCore.js +138 -0
- package/lib/node/core/index.d.ts +13 -0
- package/lib/node/core/index.d.ts.map +1 -0
- package/lib/node/core/index.js +28 -0
- package/lib/node/core/instructions/deposit.d.ts +20 -0
- package/lib/node/core/instructions/deposit.d.ts.map +1 -0
- package/lib/node/core/instructions/deposit.js +19 -0
- package/lib/node/core/instructions/fill.d.ts +14 -0
- package/lib/node/core/instructions/fill.d.ts.map +1 -0
- package/lib/node/core/instructions/fill.js +17 -0
- package/lib/node/core/instructions/funding.d.ts +10 -0
- package/lib/node/core/instructions/funding.d.ts.map +1 -0
- package/lib/node/core/instructions/funding.js +13 -0
- package/lib/node/core/instructions/liquidation.d.ts +16 -0
- package/lib/node/core/instructions/liquidation.d.ts.map +1 -0
- package/lib/node/core/instructions/liquidation.js +17 -0
- package/lib/node/core/instructions/orders.d.ts +23 -0
- package/lib/node/core/instructions/orders.d.ts.map +1 -0
- package/lib/node/core/instructions/orders.js +27 -0
- package/lib/node/core/instructions/perpOrders.d.ts +79 -0
- package/lib/node/core/instructions/perpOrders.d.ts.map +1 -0
- package/lib/node/core/instructions/perpOrders.js +99 -0
- package/lib/node/core/instructions/settlement.d.ts +12 -0
- package/lib/node/core/instructions/settlement.d.ts.map +1 -0
- package/lib/node/core/instructions/settlement.js +15 -0
- package/lib/node/core/instructions/trigger.d.ts +12 -0
- package/lib/node/core/instructions/trigger.d.ts.map +1 -0
- package/lib/node/core/instructions/trigger.js +15 -0
- package/lib/node/core/instructions/withdraw.d.ts +21 -0
- package/lib/node/core/instructions/withdraw.d.ts.map +1 -0
- package/lib/node/core/instructions/withdraw.js +20 -0
- package/lib/node/core/remainingAccounts.d.ts +28 -0
- package/lib/node/core/remainingAccounts.d.ts.map +1 -0
- package/lib/node/core/remainingAccounts.js +122 -0
- package/lib/node/core/signedMsg.d.ts +18 -0
- package/lib/node/core/signedMsg.d.ts.map +1 -0
- package/lib/node/core/signedMsg.js +39 -0
- package/lib/node/decode/customCoder.d.ts +45 -0
- package/lib/node/decode/customCoder.d.ts.map +1 -0
- package/lib/node/decode/customCoder.js +64 -0
- package/lib/node/decode/user.d.ts +5 -0
- package/lib/node/decode/user.d.ts.map +1 -0
- package/lib/node/decode/user.js +337 -0
- package/lib/node/dlob/DLOB.d.ts +254 -0
- package/lib/node/dlob/DLOB.d.ts.map +1 -0
- package/lib/node/dlob/DLOB.js +1137 -0
- package/lib/node/dlob/DLOBNode.d.ts +71 -0
- package/lib/node/dlob/DLOBNode.d.ts.map +1 -0
- package/lib/node/dlob/DLOBNode.js +103 -0
- package/lib/node/dlob/DLOBSubscriber.d.ts +58 -0
- package/lib/node/dlob/DLOBSubscriber.d.ts.map +1 -0
- package/lib/node/dlob/DLOBSubscriber.js +143 -0
- package/lib/node/dlob/NodeList.d.ts +28 -0
- package/lib/node/dlob/NodeList.d.ts.map +1 -0
- package/lib/node/dlob/NodeList.js +126 -0
- package/lib/node/dlob/orderBookLevels.d.ts +78 -0
- package/lib/node/dlob/orderBookLevels.d.ts.map +1 -0
- package/lib/node/dlob/orderBookLevels.js +404 -0
- package/lib/node/dlob/types.d.ts +19 -0
- package/lib/node/dlob/types.d.ts.map +1 -0
- package/lib/node/dlob/types.js +2 -0
- package/lib/node/events/eventList.d.ts +23 -0
- package/lib/node/events/eventList.d.ts.map +1 -0
- package/lib/node/events/eventList.js +80 -0
- package/lib/node/events/eventSubscriber.d.ts +56 -0
- package/lib/node/events/eventSubscriber.d.ts.map +1 -0
- package/lib/node/events/eventSubscriber.js +229 -0
- package/lib/node/events/eventsServerLogProvider.d.ts +22 -0
- package/lib/node/events/eventsServerLogProvider.d.ts.map +1 -0
- package/lib/node/events/eventsServerLogProvider.js +121 -0
- package/lib/node/events/fetchLogs.d.ts +26 -0
- package/lib/node/events/fetchLogs.d.ts.map +1 -0
- package/lib/node/events/fetchLogs.js +99 -0
- package/lib/node/events/parse.d.ts +9 -0
- package/lib/node/events/parse.d.ts.map +1 -0
- package/lib/node/events/parse.js +199 -0
- package/lib/node/events/pollingLogProvider.d.ts +18 -0
- package/lib/node/events/pollingLogProvider.d.ts.map +1 -0
- package/lib/node/events/pollingLogProvider.js +58 -0
- package/lib/node/events/sort.d.ts +3 -0
- package/lib/node/events/sort.d.ts.map +1 -0
- package/lib/node/events/sort.js +24 -0
- package/lib/node/events/txEventCache.d.ts +25 -0
- package/lib/node/events/txEventCache.d.ts.map +1 -0
- package/lib/node/events/txEventCache.js +71 -0
- package/lib/node/events/types.d.ts +105 -0
- package/lib/node/events/types.d.ts.map +1 -0
- package/lib/node/events/types.js +36 -0
- package/lib/node/events/webSocketLogProvider.d.ts +25 -0
- package/lib/node/events/webSocketLogProvider.d.ts.map +1 -0
- package/lib/node/events/webSocketLogProvider.js +96 -0
- package/lib/node/factory/bigNum.d.ts +123 -0
- package/lib/node/factory/bigNum.d.ts.map +1 -0
- package/lib/node/factory/bigNum.js +500 -0
- package/lib/node/factory/oracleClient.d.ts +6 -0
- package/lib/node/factory/oracleClient.d.ts.map +1 -0
- package/lib/node/factory/oracleClient.js +53 -0
- package/lib/node/idl/drift.d.ts +23895 -0
- package/lib/node/idl/drift.d.ts.map +1 -0
- package/lib/node/idl/drift.js +2 -0
- package/lib/node/idl/drift.json +18698 -0
- package/lib/node/idl/pyth.d.ts +98 -0
- package/lib/node/idl/pyth.d.ts.map +1 -0
- package/lib/node/idl/pyth.js +2 -0
- package/lib/node/idl/token_faucet.d.ts +198 -0
- package/lib/node/idl/token_faucet.d.ts.map +1 -0
- package/lib/node/idl/token_faucet.js +2 -0
- package/lib/node/idl/token_faucet.json +229 -0
- package/lib/node/index.d.ts +145 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +175 -0
- package/lib/node/indicative-quotes/indicativeQuotesSender.d.ts +36 -0
- package/lib/node/indicative-quotes/indicativeQuotesSender.d.ts.map +1 -0
- package/lib/node/indicative-quotes/indicativeQuotesSender.js +192 -0
- package/lib/node/isomorphic/anchor.browser.d.ts.map +1 -0
- package/lib/node/isomorphic/anchor.d.ts +2 -0
- package/lib/node/isomorphic/anchor.d.ts.map +1 -0
- package/lib/node/isomorphic/anchor.js +17 -0
- package/lib/node/isomorphic/anchor.node.d.ts +2 -0
- package/lib/node/isomorphic/anchor.node.d.ts.map +1 -0
- package/lib/node/isomorphic/anchor.node.js +17 -0
- package/lib/node/isomorphic/anchor29.browser.d.ts.map +1 -0
- package/lib/node/isomorphic/anchor29.d.ts +2 -0
- package/lib/node/isomorphic/anchor29.d.ts.map +1 -0
- package/lib/node/isomorphic/anchor29.js +17 -0
- package/lib/node/isomorphic/anchor29.node.d.ts +2 -0
- package/lib/node/isomorphic/anchor29.node.d.ts.map +1 -0
- package/lib/node/isomorphic/anchor29.node.js +17 -0
- package/lib/node/isomorphic/grpc.browser.d.ts.map +1 -0
- package/lib/node/isomorphic/grpc.d.ts +18 -0
- package/lib/node/isomorphic/grpc.d.ts.map +1 -0
- package/lib/node/isomorphic/grpc.js +109 -0
- package/lib/node/isomorphic/grpc.node.d.ts +18 -0
- package/lib/node/isomorphic/grpc.node.d.ts.map +1 -0
- package/lib/node/isomorphic/grpc.node.js +109 -0
- package/lib/node/jupiter/jupiterClient.d.ts +292 -0
- package/lib/node/jupiter/jupiterClient.d.ts.map +1 -0
- package/lib/node/jupiter/jupiterClient.js +164 -0
- package/lib/node/keypair.d.ts +3 -0
- package/lib/node/keypair.d.ts.map +1 -0
- package/lib/node/keypair.js +28 -0
- package/lib/node/marginCalculation.d.ts +68 -0
- package/lib/node/marginCalculation.d.ts.map +1 -0
- package/lib/node/marginCalculation.js +176 -0
- package/lib/node/marinade/index.d.ts +13 -0
- package/lib/node/marinade/index.d.ts.map +1 -0
- package/lib/node/marinade/index.js +36 -0
- package/lib/node/marinade/types.d.ts +1964 -0
- package/lib/node/marinade/types.d.ts.map +1 -0
- package/lib/node/marinade/types.js +1965 -0
- package/lib/node/math/amm.d.ts +99 -0
- package/lib/node/math/amm.d.ts.map +1 -0
- package/lib/node/math/amm.js +671 -0
- package/lib/node/math/auction.d.ts +66 -0
- package/lib/node/math/auction.d.ts.map +1 -0
- package/lib/node/math/auction.js +261 -0
- package/lib/node/math/bankruptcy.d.ts +3 -0
- package/lib/node/math/bankruptcy.d.ts.map +1 -0
- package/lib/node/math/bankruptcy.js +32 -0
- package/lib/node/math/builder.d.ts +6 -0
- package/lib/node/math/builder.d.ts.map +1 -0
- package/lib/node/math/builder.js +22 -0
- package/lib/node/math/conversion.d.ts +5 -0
- package/lib/node/math/conversion.d.ts.map +1 -0
- package/lib/node/math/conversion.js +21 -0
- package/lib/node/math/exchangeStatus.d.ts +9 -0
- package/lib/node/math/exchangeStatus.d.ts.map +1 -0
- package/lib/node/math/exchangeStatus.js +85 -0
- package/lib/node/math/funding.d.ts +45 -0
- package/lib/node/math/funding.d.ts.map +1 -0
- package/lib/node/math/funding.js +260 -0
- package/lib/node/math/insurance.d.ts +9 -0
- package/lib/node/math/insurance.d.ts.map +1 -0
- package/lib/node/math/insurance.js +74 -0
- package/lib/node/math/liquidation.d.ts +8 -0
- package/lib/node/math/liquidation.d.ts.map +1 -0
- package/lib/node/math/liquidation.js +134 -0
- package/lib/node/math/margin.d.ts +46 -0
- package/lib/node/math/margin.d.ts.map +1 -0
- package/lib/node/math/margin.js +205 -0
- package/lib/node/math/market.d.ts +51 -0
- package/lib/node/math/market.d.ts.map +1 -0
- package/lib/node/math/market.js +234 -0
- package/lib/node/math/oracles.d.ts +20 -0
- package/lib/node/math/oracles.d.ts.map +1 -0
- package/lib/node/math/oracles.js +215 -0
- package/lib/node/math/orders.d.ts +37 -0
- package/lib/node/math/orders.d.ts.map +1 -0
- package/lib/node/math/orders.js +294 -0
- package/lib/node/math/position.d.ts +72 -0
- package/lib/node/math/position.d.ts.map +1 -0
- package/lib/node/math/position.js +232 -0
- package/lib/node/math/repeg.d.ts +23 -0
- package/lib/node/math/repeg.d.ts.map +1 -0
- package/lib/node/math/repeg.js +164 -0
- package/lib/node/math/spotBalance.d.ts +86 -0
- package/lib/node/math/spotBalance.d.ts.map +1 -0
- package/lib/node/math/spotBalance.js +438 -0
- package/lib/node/math/spotMarket.d.ts +12 -0
- package/lib/node/math/spotMarket.d.ts.map +1 -0
- package/lib/node/math/spotMarket.js +49 -0
- package/lib/node/math/spotPosition.d.ts +20 -0
- package/lib/node/math/spotPosition.d.ts.map +1 -0
- package/lib/node/math/spotPosition.js +79 -0
- package/lib/node/math/state.d.ts +9 -0
- package/lib/node/math/state.d.ts.map +1 -0
- package/lib/node/math/state.js +44 -0
- package/lib/node/math/superStake.d.ts +169 -0
- package/lib/node/math/superStake.d.ts.map +1 -0
- package/lib/node/math/superStake.js +308 -0
- package/lib/node/math/tiers.d.ts +5 -0
- package/lib/node/math/tiers.d.ts.map +1 -0
- package/lib/node/math/tiers.js +52 -0
- package/lib/node/math/trade.d.ts +94 -0
- package/lib/node/math/trade.d.ts.map +1 -0
- package/lib/node/math/trade.js +503 -0
- package/lib/node/math/utils.d.ts +24 -0
- package/lib/node/math/utils.d.ts.map +1 -0
- package/lib/node/math/utils.js +113 -0
- package/lib/node/memcmp.d.ts +19 -0
- package/lib/node/memcmp.d.ts.map +1 -0
- package/lib/node/memcmp.js +162 -0
- package/lib/node/oracles/oracleClientCache.d.ts +10 -0
- package/lib/node/oracles/oracleClientCache.d.ts.map +1 -0
- package/lib/node/oracles/oracleClientCache.js +19 -0
- package/lib/node/oracles/oracleId.d.ts +10 -0
- package/lib/node/oracles/oracleId.d.ts.map +1 -0
- package/lib/node/oracles/oracleId.js +89 -0
- package/lib/node/oracles/prelaunchOracleClient.d.ts +13 -0
- package/lib/node/oracles/prelaunchOracleClient.d.ts.map +1 -0
- package/lib/node/oracles/prelaunchOracleClient.js +24 -0
- package/lib/node/oracles/pythClient.d.ts +15 -0
- package/lib/node/oracles/pythClient.d.ts.map +1 -0
- package/lib/node/oracles/pythClient.js +51 -0
- package/lib/node/oracles/pythLazerClient.d.ts +17 -0
- package/lib/node/oracles/pythLazerClient.d.ts.map +1 -0
- package/lib/node/oracles/pythLazerClient.js +61 -0
- package/lib/node/oracles/quoteAssetOracleClient.d.ts +11 -0
- package/lib/node/oracles/quoteAssetOracleClient.d.ts.map +1 -0
- package/lib/node/oracles/quoteAssetOracleClient.js +21 -0
- package/lib/node/oracles/strictOraclePrice.d.ts +10 -0
- package/lib/node/oracles/strictOraclePrice.d.ts.map +1 -0
- package/lib/node/oracles/strictOraclePrice.js +17 -0
- package/lib/node/oracles/types.d.ts +34 -0
- package/lib/node/oracles/types.d.ts.map +1 -0
- package/lib/node/oracles/types.js +2 -0
- package/lib/node/oracles/utils.d.ts +5 -0
- package/lib/node/oracles/utils.d.ts.map +1 -0
- package/lib/node/oracles/utils.js +8 -0
- package/lib/node/orderParams.d.ts +30 -0
- package/lib/node/orderParams.d.ts.map +1 -0
- package/lib/node/orderParams.js +44 -0
- package/lib/node/orderSubscriber/OrderSubscriber.d.ts +46 -0
- package/lib/node/orderSubscriber/OrderSubscriber.d.ts.map +1 -0
- package/lib/node/orderSubscriber/OrderSubscriber.js +193 -0
- package/lib/node/orderSubscriber/PollingSubscription.d.ts +13 -0
- package/lib/node/orderSubscriber/PollingSubscription.d.ts.map +1 -0
- package/lib/node/orderSubscriber/PollingSubscription.js +23 -0
- package/lib/node/orderSubscriber/WebsocketSubscription.d.ts +24 -0
- package/lib/node/orderSubscriber/WebsocketSubscription.d.ts.map +1 -0
- package/lib/node/orderSubscriber/WebsocketSubscription.js +67 -0
- package/lib/node/orderSubscriber/grpcSubscription.d.ts +23 -0
- package/lib/node/orderSubscriber/grpcSubscription.d.ts.map +1 -0
- package/lib/node/orderSubscriber/grpcSubscription.js +75 -0
- package/lib/node/orderSubscriber/index.d.ts +8 -0
- package/lib/node/orderSubscriber/index.d.ts.map +1 -0
- package/lib/node/orderSubscriber/index.js +23 -0
- package/lib/node/orderSubscriber/types.d.ts +36 -0
- package/lib/node/orderSubscriber/types.d.ts.map +1 -0
- package/lib/node/orderSubscriber/types.js +2 -0
- package/lib/node/priorityFee/averageOverSlotsStrategy.d.ts +6 -0
- package/lib/node/priorityFee/averageOverSlotsStrategy.d.ts.map +1 -0
- package/lib/node/priorityFee/averageOverSlotsStrategy.js +16 -0
- package/lib/node/priorityFee/averageStrategy.d.ts +6 -0
- package/lib/node/priorityFee/averageStrategy.d.ts.map +1 -0
- package/lib/node/priorityFee/averageStrategy.js +11 -0
- package/lib/node/priorityFee/ewmaStrategy.d.ts +12 -0
- package/lib/node/priorityFee/ewmaStrategy.d.ts.map +1 -0
- package/lib/node/priorityFee/ewmaStrategy.js +33 -0
- package/lib/node/priorityFee/heliusPriorityFeeMethod.d.ts +21 -0
- package/lib/node/priorityFee/heliusPriorityFeeMethod.d.ts.map +1 -0
- package/lib/node/priorityFee/heliusPriorityFeeMethod.js +46 -0
- package/lib/node/priorityFee/index.d.ts +17 -0
- package/lib/node/priorityFee/index.d.ts.map +1 -0
- package/lib/node/priorityFee/index.js +32 -0
- package/lib/node/priorityFee/maxOverSlotsStrategy.d.ts +6 -0
- package/lib/node/priorityFee/maxOverSlotsStrategy.d.ts.map +1 -0
- package/lib/node/priorityFee/maxOverSlotsStrategy.js +17 -0
- package/lib/node/priorityFee/maxStrategy.d.ts +8 -0
- package/lib/node/priorityFee/maxStrategy.d.ts.map +1 -0
- package/lib/node/priorityFee/maxStrategy.js +9 -0
- package/lib/node/priorityFee/priorityFeeSubscriber.d.ts +49 -0
- package/lib/node/priorityFee/priorityFeeSubscriber.d.ts.map +1 -0
- package/lib/node/priorityFee/priorityFeeSubscriber.js +193 -0
- package/lib/node/priorityFee/priorityFeeSubscriberMap.d.ts +51 -0
- package/lib/node/priorityFee/priorityFeeSubscriberMap.d.ts.map +1 -0
- package/lib/node/priorityFee/priorityFeeSubscriberMap.js +96 -0
- package/lib/node/priorityFee/solanaPriorityFeeMethod.d.ts +7 -0
- package/lib/node/priorityFee/solanaPriorityFeeMethod.d.ts.map +1 -0
- package/lib/node/priorityFee/solanaPriorityFeeMethod.js +21 -0
- package/lib/node/priorityFee/types.d.ts +36 -0
- package/lib/node/priorityFee/types.d.ts.map +1 -0
- package/lib/node/priorityFee/types.js +10 -0
- package/lib/node/priorityFee/velocityPriorityFeeMethod.d.ts +22 -0
- package/lib/node/priorityFee/velocityPriorityFeeMethod.d.ts.map +1 -0
- package/lib/node/priorityFee/velocityPriorityFeeMethod.js +28 -0
- package/lib/node/pyth/constants.d.ts +4 -0
- package/lib/node/pyth/constants.d.ts.map +1 -0
- package/lib/node/pyth/constants.js +6 -0
- package/lib/node/pyth/index.d.ts +5 -0
- package/lib/node/pyth/index.d.ts.map +1 -0
- package/lib/node/pyth/index.js +12 -0
- package/lib/node/pyth/pythLazerSubscriber.d.ts +92 -0
- package/lib/node/pyth/pythLazerSubscriber.d.ts.map +1 -0
- package/lib/node/pyth/pythLazerSubscriber.js +276 -0
- package/lib/node/pyth/types.d.ts +2227 -0
- package/lib/node/pyth/types.d.ts.map +1 -0
- package/lib/node/pyth/types.js +2224 -0
- package/lib/node/pyth/utils.d.ts +3 -0
- package/lib/node/pyth/utils.d.ts.map +1 -0
- package/lib/node/pyth/utils.js +10 -0
- package/lib/node/slot/SlotSubscriber.d.ts +28 -0
- package/lib/node/slot/SlotSubscriber.d.ts.map +1 -0
- package/lib/node/slot/SlotSubscriber.js +76 -0
- package/lib/node/slot/SlothashSubscriber.d.ts +26 -0
- package/lib/node/slot/SlothashSubscriber.d.ts.map +1 -0
- package/lib/node/slot/SlothashSubscriber.js +88 -0
- package/lib/node/swap/UnifiedSwapClient.d.ts +121 -0
- package/lib/node/swap/UnifiedSwapClient.d.ts.map +1 -0
- package/lib/node/swap/UnifiedSwapClient.js +179 -0
- package/lib/node/swift/grpcSignedMsgUserAccountSubscriber.d.ts +23 -0
- package/lib/node/swift/grpcSignedMsgUserAccountSubscriber.d.ts.map +1 -0
- package/lib/node/swift/grpcSignedMsgUserAccountSubscriber.js +57 -0
- package/lib/node/swift/index.d.ts +11 -0
- package/lib/node/swift/index.d.ts.map +1 -0
- package/lib/node/swift/index.js +26 -0
- package/lib/node/swift/signedMsgUserAccountSubscriber.d.ts +43 -0
- package/lib/node/swift/signedMsgUserAccountSubscriber.d.ts.map +1 -0
- package/lib/node/swift/signedMsgUserAccountSubscriber.js +118 -0
- package/lib/node/swift/swiftOrderSubscriber.d.ts +64 -0
- package/lib/node/swift/swiftOrderSubscriber.d.ts.map +1 -0
- package/lib/node/swift/swiftOrderSubscriber.js +187 -0
- package/lib/node/testClient.d.ts +9 -0
- package/lib/node/testClient.d.ts.map +1 -0
- package/lib/node/testClient.js +24 -0
- package/lib/node/titan/titanClient.d.ts +91 -0
- package/lib/node/titan/titanClient.d.ts.map +1 -0
- package/lib/node/titan/titanClient.js +227 -0
- package/lib/node/token/index.d.ts +6 -0
- package/lib/node/token/index.d.ts.map +1 -0
- package/lib/node/token/index.js +15 -0
- package/lib/node/tokenFaucet.d.ts +42 -0
- package/lib/node/tokenFaucet.d.ts.map +1 -0
- package/lib/node/tokenFaucet.js +188 -0
- package/lib/node/tx/baseTxSender.d.ts +60 -0
- package/lib/node/tx/baseTxSender.d.ts.map +1 -0
- package/lib/node/tx/baseTxSender.js +292 -0
- package/lib/node/tx/blockhashFetcher/baseBlockhashFetcher.d.ts +9 -0
- package/lib/node/tx/blockhashFetcher/baseBlockhashFetcher.d.ts.map +1 -0
- package/lib/node/tx/blockhashFetcher/baseBlockhashFetcher.js +13 -0
- package/lib/node/tx/blockhashFetcher/cachedBlockhashFetcher.d.ts +29 -0
- package/lib/node/tx/blockhashFetcher/cachedBlockhashFetcher.d.ts.map +1 -0
- package/lib/node/tx/blockhashFetcher/cachedBlockhashFetcher.js +73 -0
- package/lib/node/tx/blockhashFetcher/types.d.ts +5 -0
- package/lib/node/tx/blockhashFetcher/types.d.ts.map +1 -0
- package/lib/node/tx/blockhashFetcher/types.js +2 -0
- package/lib/node/tx/fastSingleTxSender.d.ts +42 -0
- package/lib/node/tx/fastSingleTxSender.d.ts.map +1 -0
- package/lib/node/tx/fastSingleTxSender.js +86 -0
- package/lib/node/tx/forwardOnlyTxSender.d.ts +38 -0
- package/lib/node/tx/forwardOnlyTxSender.d.ts.map +1 -0
- package/lib/node/tx/forwardOnlyTxSender.js +92 -0
- package/lib/node/tx/priorityFeeCalculator.d.ts +45 -0
- package/lib/node/tx/priorityFeeCalculator.d.ts.map +1 -0
- package/lib/node/tx/priorityFeeCalculator.js +85 -0
- package/lib/node/tx/reportTransactionError.d.ts +21 -0
- package/lib/node/tx/reportTransactionError.d.ts.map +1 -0
- package/lib/node/tx/reportTransactionError.js +103 -0
- package/lib/node/tx/retryTxSender.d.ts +38 -0
- package/lib/node/tx/retryTxSender.d.ts.map +1 -0
- package/lib/node/tx/retryTxSender.js +86 -0
- package/lib/node/tx/txHandler.d.ts +174 -0
- package/lib/node/tx/txHandler.d.ts.map +1 -0
- package/lib/node/tx/txHandler.js +522 -0
- package/lib/node/tx/txParamProcessor.d.ts +27 -0
- package/lib/node/tx/txParamProcessor.d.ts.map +1 -0
- package/lib/node/tx/txParamProcessor.js +92 -0
- package/lib/node/tx/types.d.ts +30 -0
- package/lib/node/tx/types.d.ts.map +1 -0
- package/lib/node/tx/types.js +20 -0
- package/lib/node/tx/utils.d.ts +7 -0
- package/lib/node/tx/utils.d.ts.map +1 -0
- package/lib/node/tx/utils.js +78 -0
- package/lib/node/tx/whileValidTxSender.d.ts +46 -0
- package/lib/node/tx/whileValidTxSender.d.ts.map +1 -0
- package/lib/node/tx/whileValidTxSender.js +168 -0
- package/lib/node/types.d.ts +1748 -0
- package/lib/node/types.d.ts.map +1 -0
- package/lib/node/types.js +427 -0
- package/lib/node/user.d.ts +447 -0
- package/lib/node/user.d.ts.map +1 -0
- package/lib/node/user.js +2372 -0
- package/lib/node/userConfig.d.ts +32 -0
- package/lib/node/userConfig.d.ts.map +1 -0
- package/lib/node/userConfig.js +2 -0
- package/lib/node/userMap/PollingSubscription.d.ts +16 -0
- package/lib/node/userMap/PollingSubscription.d.ts.map +1 -0
- package/lib/node/userMap/PollingSubscription.js +30 -0
- package/lib/node/userMap/WebsocketSubscription.d.ts +28 -0
- package/lib/node/userMap/WebsocketSubscription.d.ts.map +1 -0
- package/lib/node/userMap/WebsocketSubscription.js +45 -0
- package/lib/node/userMap/grpcSubscription.d.ts +28 -0
- package/lib/node/userMap/grpcSubscription.d.ts.map +1 -0
- package/lib/node/userMap/grpcSubscription.js +44 -0
- package/lib/node/userMap/referrerMap.d.ts +46 -0
- package/lib/node/userMap/referrerMap.d.ts.map +1 -0
- package/lib/node/userMap/referrerMap.js +184 -0
- package/lib/node/userMap/revenueShareEscrowMap.d.ts +67 -0
- package/lib/node/userMap/revenueShareEscrowMap.d.ts.map +1 -0
- package/lib/node/userMap/revenueShareEscrowMap.js +210 -0
- package/lib/node/userMap/userMap.d.ts +115 -0
- package/lib/node/userMap/userMap.d.ts.map +1 -0
- package/lib/node/userMap/userMap.js +486 -0
- package/lib/node/userMap/userMapConfig.d.ts +41 -0
- package/lib/node/userMap/userMapConfig.d.ts.map +1 -0
- package/lib/node/userMap/userMapConfig.js +2 -0
- package/lib/node/userMap/userStatsMap.d.ts +67 -0
- package/lib/node/userMap/userStatsMap.d.ts.map +1 -0
- package/lib/node/userMap/userStatsMap.js +266 -0
- package/lib/node/userName.d.ts +6 -0
- package/lib/node/userName.d.ts.map +1 -0
- package/lib/node/userName.js +21 -0
- package/lib/node/userStats.d.ts +25 -0
- package/lib/node/userStats.d.ts.map +1 -0
- package/lib/node/userStats.js +70 -0
- package/lib/node/userStatsConfig.d.ts +27 -0
- package/lib/node/userStatsConfig.d.ts.map +1 -0
- package/lib/node/userStatsConfig.js +2 -0
- package/lib/node/util/TransactionConfirmationManager.d.ts +17 -0
- package/lib/node/util/TransactionConfirmationManager.d.ts.map +1 -0
- package/lib/node/util/TransactionConfirmationManager.js +174 -0
- package/lib/node/util/chainClock.d.ts +18 -0
- package/lib/node/util/chainClock.d.ts.map +1 -0
- package/lib/node/util/chainClock.js +29 -0
- package/lib/node/util/computeUnits.d.ts +9 -0
- package/lib/node/util/computeUnits.d.ts.map +1 -0
- package/lib/node/util/computeUnits.js +48 -0
- package/lib/node/util/digest.d.ts +6 -0
- package/lib/node/util/digest.d.ts.map +1 -0
- package/lib/node/util/digest.js +19 -0
- package/lib/node/util/ed25519Utils.d.ts +11 -0
- package/lib/node/util/ed25519Utils.d.ts.map +1 -0
- package/lib/node/util/ed25519Utils.js +80 -0
- package/lib/node/util/promiseTimeout.d.ts +2 -0
- package/lib/node/util/promiseTimeout.d.ts.map +1 -0
- package/lib/node/util/promiseTimeout.js +14 -0
- package/lib/node/util/tps.d.ts +3 -0
- package/lib/node/util/tps.d.ts.map +1 -0
- package/lib/node/util/tps.js +16 -0
- package/lib/node/velocityClient.d.ts +1231 -0
- package/lib/node/velocityClient.d.ts.map +1 -0
- package/lib/node/velocityClient.js +5778 -0
- package/lib/node/velocityClientConfig.d.ts +85 -0
- package/lib/node/velocityClientConfig.d.ts.map +1 -0
- package/lib/node/velocityClientConfig.js +2 -0
- package/lib/node/wallet.d.ts +17 -0
- package/lib/node/wallet.d.ts.map +1 -0
- package/lib/node/wallet.js +46 -0
- package/package.json +157 -0
- package/scripts/deposit-isolated-positions.ts +110 -0
- package/scripts/find-flagged-users.ts +213 -0
- package/scripts/grpc-client-test-comparison.ts +372 -0
- package/scripts/grpc-multiuser-client-test-comparison.ts +158 -0
- package/scripts/postbuild.js +95 -0
- package/scripts/single-grpc-client-test.ts +284 -0
- package/scripts/updateVersion.js +28 -0
- package/scripts/withdraw-isolated-positions.ts +174 -0
- package/src/accounts/README_WebSocketAccountSubscriberV2.md +95 -0
- package/src/accounts/README_WebSocketProgramAccountSubscriberV2.md +135 -0
- package/src/accounts/basicUserAccountSubscriber.ts +59 -0
- package/src/accounts/basicUserStatsAccountSubscriber.ts +65 -0
- package/src/accounts/bulkAccountLoader.ts +293 -0
- package/src/accounts/bulkUserStatsSubscription.ts +33 -0
- package/src/accounts/bulkUserSubscription.ts +33 -0
- package/src/accounts/customizedCadenceBulkAccountLoader.ts +213 -0
- package/src/accounts/fetch.ts +143 -0
- package/src/accounts/grpcAccountSubscriber.ts +187 -0
- package/src/accounts/grpcInsuranceFundStakeAccountSubscriber.ts +57 -0
- package/src/accounts/grpcMultiAccountSubscriber.ts +476 -0
- package/src/accounts/grpcMultiUserAccountSubscriber.ts +281 -0
- package/src/accounts/grpcProgramAccountSubscriber.ts +223 -0
- package/src/accounts/grpcUserAccountSubscriber.ts +48 -0
- package/src/accounts/grpcUserStatsAccountSubscriber.ts +50 -0
- package/src/accounts/grpcVelocityClientAccountSubscriber.ts +213 -0
- package/src/accounts/grpcVelocityClientAccountSubscriberV2.ts +762 -0
- package/src/accounts/laserProgramAccountSubscriber.ts +229 -0
- package/src/accounts/oneShotUserAccountSubscriber.ts +67 -0
- package/src/accounts/oneShotUserStatsAccountSubscriber.ts +70 -0
- package/src/accounts/pollingInsuranceFundStakeAccountSubscriber.ts +186 -0
- package/src/accounts/pollingOracleAccountSubscriber.ts +125 -0
- package/src/accounts/pollingTokenAccountSubscriber.ts +118 -0
- package/src/accounts/pollingUserAccountSubscriber.ts +160 -0
- package/src/accounts/pollingUserStatsAccountSubscriber.ts +156 -0
- package/src/accounts/pollingVelocityClientAccountSubscriber.ts +652 -0
- package/src/accounts/testBulkAccountLoader.ts +51 -0
- package/src/accounts/types.ts +284 -0
- package/src/accounts/utils.ts +62 -0
- package/src/accounts/webSocketAccountSubscriber.ts +250 -0
- package/src/accounts/webSocketAccountSubscriberV2.ts +517 -0
- package/src/accounts/webSocketInsuranceFundStakeAccountSubscriber.ts +129 -0
- package/src/accounts/webSocketProgramAccountSubscriber.ts +183 -0
- package/src/accounts/webSocketProgramAccountSubscriberV2.ts +996 -0
- package/src/accounts/webSocketProgramAccountsSubscriberV2.ts +996 -0
- package/src/accounts/webSocketUserAccountSubscriber.ts +104 -0
- package/src/accounts/webSocketUserStatsAccountSubsriber.ts +98 -0
- package/src/accounts/webSocketVelocityClientAccountSubscriber.ts +719 -0
- package/src/accounts/webSocketVelocityClientAccountSubscriberV2.ts +755 -0
- package/src/accounts/websocketProgramUserAccountSubscriber.ts +94 -0
- package/src/addresses/marketAddresses.ts +17 -0
- package/src/addresses/pda.ts +439 -0
- package/src/adminClient.ts +5936 -0
- package/src/assert/assert.ts +5 -0
- package/src/auctionSubscriber/auctionSubscriber.ts +68 -0
- package/src/auctionSubscriber/auctionSubscriberGrpc.ts +72 -0
- package/src/auctionSubscriber/index.ts +3 -0
- package/src/auctionSubscriber/types.ts +20 -0
- package/src/bankrun/bankrunConnection.ts +560 -0
- package/src/blockhashSubscriber/BlockhashSubscriber.ts +126 -0
- package/src/blockhashSubscriber/index.ts +1 -0
- package/src/blockhashSubscriber/types.ts +12 -0
- package/src/clock/clockSubscriber.ts +121 -0
- package/src/config.ts +268 -0
- package/src/constants/index.ts +10 -0
- package/src/constants/insuranceFund.ts +8 -0
- package/src/constants/numericConstants.ts +119 -0
- package/src/constants/perpMarkets.ts +1042 -0
- package/src/constants/spotMarkets.ts +874 -0
- package/src/constants/txConstants.ts +1 -0
- package/src/constituentMap/constituentMap.ts +294 -0
- package/src/constituentMap/pollingConstituentAccountSubscriber.ts +97 -0
- package/src/constituentMap/webSocketConstituentAccountSubscriber.ts +112 -0
- package/src/core/VelocityCore.ts +331 -0
- package/src/core/index.ts +12 -0
- package/src/core/instructions/deposit.ts +42 -0
- package/src/core/instructions/fill.ts +34 -0
- package/src/core/instructions/funding.ts +21 -0
- package/src/core/instructions/liquidation.ts +37 -0
- package/src/core/instructions/orders.ts +56 -0
- package/src/core/instructions/perpOrders.ts +192 -0
- package/src/core/instructions/settlement.ts +26 -0
- package/src/core/instructions/trigger.ts +26 -0
- package/src/core/instructions/withdraw.ts +44 -0
- package/src/core/remainingAccounts.ts +276 -0
- package/src/core/signedMsg.ts +71 -0
- package/src/decode/customCoder.ts +105 -0
- package/src/decode/user.ts +372 -0
- package/src/dlob/DLOB.ts +2098 -0
- package/src/dlob/DLOBNode.ts +193 -0
- package/src/dlob/DLOBSubscriber.ts +211 -0
- package/src/dlob/NodeList.ts +174 -0
- package/src/dlob/orderBookLevels.ts +575 -0
- package/src/dlob/types.ts +22 -0
- package/src/events/eventList.ts +97 -0
- package/src/events/eventSubscriber.ts +382 -0
- package/src/events/eventsServerLogProvider.ts +152 -0
- package/src/events/fetchLogs.ts +169 -0
- package/src/events/parse.ts +248 -0
- package/src/events/pollingLogProvider.ts +89 -0
- package/src/events/sort.ts +39 -0
- package/src/events/txEventCache.ts +74 -0
- package/src/events/types.ts +228 -0
- package/src/events/webSocketLogProvider.ts +121 -0
- package/src/factory/bigNum.ts +709 -0
- package/src/factory/oracleClient.ts +73 -0
- package/src/idl/drift.json +18698 -0
- package/src/idl/drift.ts +23894 -0
- package/src/idl/pyth.json +142 -0
- package/src/idl/pyth.ts +97 -0
- package/src/idl/pyth_solana_receiver.json +628 -0
- package/src/idl/token_faucet.json +229 -0
- package/src/idl/token_faucet.ts +197 -0
- package/src/index.ts +150 -0
- package/src/indicative-quotes/indicativeQuotesSender.ts +233 -0
- package/src/isomorphic/README.md +19 -0
- package/src/isomorphic/anchor.browser.ts +44 -0
- package/src/isomorphic/anchor.node.ts +1 -0
- package/src/isomorphic/anchor.ts +1 -0
- package/src/isomorphic/anchor29.browser.ts +24 -0
- package/src/isomorphic/anchor29.node.ts +1 -0
- package/src/isomorphic/anchor29.ts +1 -0
- package/src/isomorphic/grpc.browser.ts +4 -0
- package/src/isomorphic/grpc.node.ts +130 -0
- package/src/isomorphic/grpc.ts +1 -0
- package/src/jupiter/jupiterClient.ts +482 -0
- package/src/keypair.ts +24 -0
- package/src/margin/README.md +138 -0
- package/src/marginCalculation.ts +255 -0
- package/src/marinade/idl/idl.json +1962 -0
- package/src/marinade/index.ts +64 -0
- package/src/marinade/types.ts +3925 -0
- package/src/math/amm.ts +1246 -0
- package/src/math/auction.ts +374 -0
- package/src/math/bankruptcy.ts +35 -0
- package/src/math/builder.ts +20 -0
- package/src/math/conversion.ts +24 -0
- package/src/math/exchangeStatus.ts +136 -0
- package/src/math/funding.ts +436 -0
- package/src/math/insurance.ts +111 -0
- package/src/math/liquidation.ts +209 -0
- package/src/math/margin.ts +368 -0
- package/src/math/market.ts +438 -0
- package/src/math/oracles.ts +367 -0
- package/src/math/orders.ts +473 -0
- package/src/math/position.ts +340 -0
- package/src/math/repeg.ts +214 -0
- package/src/math/spotBalance.ts +752 -0
- package/src/math/spotMarket.ts +82 -0
- package/src/math/spotPosition.ts +191 -0
- package/src/math/state.ts +48 -0
- package/src/math/superStake.ts +528 -0
- package/src/math/tiers.ts +44 -0
- package/src/math/trade.ts +805 -0
- package/src/math/utils.ts +121 -0
- package/src/memcmp.ts +164 -0
- package/src/oracles/oracleClientCache.ts +25 -0
- package/src/oracles/oracleId.ts +66 -0
- package/src/oracles/prelaunchOracleClient.ts +38 -0
- package/src/oracles/pythClient.ts +85 -0
- package/src/oracles/pythLazerClient.ts +102 -0
- package/src/oracles/quoteAssetOracleClient.ts +25 -0
- package/src/oracles/strictOraclePrice.ts +19 -0
- package/src/oracles/types.ts +37 -0
- package/src/oracles/utils.ts +10 -0
- package/src/orderParams.ts +79 -0
- package/src/orderSubscriber/OrderSubscriber.ts +296 -0
- package/src/orderSubscriber/PollingSubscription.ts +39 -0
- package/src/orderSubscriber/WebsocketSubscription.ts +119 -0
- package/src/orderSubscriber/grpcSubscription.ts +139 -0
- package/src/orderSubscriber/index.ts +7 -0
- package/src/orderSubscriber/types.ts +55 -0
- package/src/priorityFee/averageOverSlotsStrategy.ts +16 -0
- package/src/priorityFee/averageStrategy.ts +12 -0
- package/src/priorityFee/ewmaStrategy.ts +41 -0
- package/src/priorityFee/heliusPriorityFeeMethod.ts +57 -0
- package/src/priorityFee/index.ts +16 -0
- package/src/priorityFee/maxOverSlotsStrategy.ts +17 -0
- package/src/priorityFee/maxStrategy.ts +7 -0
- package/src/priorityFee/priorityFeeSubscriber.ts +256 -0
- package/src/priorityFee/priorityFeeSubscriberMap.ts +125 -0
- package/src/priorityFee/solanaPriorityFeeMethod.ts +34 -0
- package/src/priorityFee/types.ts +64 -0
- package/src/priorityFee/velocityPriorityFeeMethod.ts +54 -0
- package/src/pyth/constants.ts +9 -0
- package/src/pyth/index.ts +15 -0
- package/src/pyth/pythLazerSubscriber.ts +365 -0
- package/src/pyth/types.ts +4453 -0
- package/src/pyth/utils.ts +13 -0
- package/src/slot/SlotSubscriber.ts +108 -0
- package/src/slot/SlothashSubscriber.ts +126 -0
- package/src/swap/UnifiedSwapClient.ts +315 -0
- package/src/swift/grpcSignedMsgUserAccountSubscriber.ts +95 -0
- package/src/swift/index.ts +10 -0
- package/src/swift/signedMsgUserAccountSubscriber.ts +241 -0
- package/src/swift/swiftOrderSubscriber.ts +347 -0
- package/src/testClient.ts +42 -0
- package/src/titan/titanClient.ts +438 -0
- package/src/token/index.ts +13 -0
- package/src/tokenFaucet.ts +274 -0
- package/src/tx/baseTxSender.ts +471 -0
- package/src/tx/blockhashFetcher/baseBlockhashFetcher.ts +19 -0
- package/src/tx/blockhashFetcher/cachedBlockhashFetcher.ts +90 -0
- package/src/tx/blockhashFetcher/types.ts +5 -0
- package/src/tx/fastSingleTxSender.ts +142 -0
- package/src/tx/forwardOnlyTxSender.ts +145 -0
- package/src/tx/priorityFeeCalculator.ts +117 -0
- package/src/tx/reportTransactionError.ts +159 -0
- package/src/tx/retryTxSender.ts +135 -0
- package/src/tx/txHandler.ts +853 -0
- package/src/tx/txParamProcessor.ts +163 -0
- package/src/tx/types.ts +71 -0
- package/src/tx/utils.ts +107 -0
- package/src/tx/whileValidTxSender.ts +266 -0
- package/src/types.ts +1793 -0
- package/src/user.ts +4487 -0
- package/src/userConfig.ts +37 -0
- package/src/userMap/PollingSubscription.ts +47 -0
- package/src/userMap/WebsocketSubscription.ts +84 -0
- package/src/userMap/grpcSubscription.ts +85 -0
- package/src/userMap/referrerMap.ts +267 -0
- package/src/userMap/revenueShareEscrowMap.ts +310 -0
- package/src/userMap/userMap.ts +683 -0
- package/src/userMap/userMapConfig.ts +66 -0
- package/src/userMap/userStatsMap.ts +358 -0
- package/src/userName.ts +21 -0
- package/src/userStats.ts +117 -0
- package/src/userStatsConfig.ts +32 -0
- package/src/util/TransactionConfirmationManager.ts +292 -0
- package/src/util/chainClock.ts +41 -0
- package/src/util/computeUnits.ts +65 -0
- package/src/util/digest.ts +16 -0
- package/src/util/ed25519Utils.ts +85 -0
- package/src/util/promiseTimeout.ts +14 -0
- package/src/util/tps.ts +27 -0
- package/src/velocityClient.ts +11364 -0
- package/src/velocityClientConfig.ts +144 -0
- package/src/wallet.ts +54 -0
- package/tests/DriftCore/decode.test.ts +16 -0
- package/tests/DriftCore/fill_trigger.test.ts +73 -0
- package/tests/DriftCore/instructions.test.ts +46 -0
- package/tests/DriftCore/pdas.test.ts +28 -0
- package/tests/DriftCore/perp_orders.test.ts +205 -0
- package/tests/DriftCore/remainingAccounts.test.ts +73 -0
- package/tests/DriftCore/settlement_liquidation.test.ts +69 -0
- package/tests/accounts/customizedCadenceBulkAccountLoader.test.ts +203 -0
- package/tests/amm/test.ts +2095 -0
- package/tests/auctions/test.ts +81 -0
- package/tests/bn/test.ts +355 -0
- package/tests/ci/verifyConstants.ts +396 -0
- package/tests/decode/phoenix.ts +71 -0
- package/tests/decode/test.ts +262 -0
- package/tests/decode/userAccountBufferStrings.ts +102 -0
- package/tests/dlob/helpers.ts +740 -0
- package/tests/dlob/test.ts +6920 -0
- package/tests/events/parseLogsForCuUsage.ts +139 -0
- package/tests/insurance/test.ts +40 -0
- package/tests/spot/test.ts +226 -0
- package/tests/tx/TransactionConfirmationManager.test.ts +305 -0
- package/tests/tx/cachedBlockhashFetcher.test.ts +96 -0
- package/tests/tx/priorityFeeCalculator.ts +77 -0
- package/tests/tx/priorityFeeStrategy.ts +95 -0
- package/tests/user/getMarginCalculation.ts +361 -0
- package/tests/user/helpers.ts +185 -0
- package/tests/user/liquidations.ts +129 -0
- package/tests/user/marginCalculations.test.ts +321 -0
- package/tests/user/test.ts +826 -0
- package/tsconfig.browser.json +16 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,2224 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IDL = exports.WORMHOLE_CORE_BRIDGE_SOLANA_IDL = void 0;
|
|
4
|
+
exports.WORMHOLE_CORE_BRIDGE_SOLANA_IDL = {
|
|
5
|
+
version: '0.0.1-alpha.5',
|
|
6
|
+
name: 'wormhole_core_bridge_solana',
|
|
7
|
+
constants: [
|
|
8
|
+
{
|
|
9
|
+
name: 'SOLANA_CHAIN',
|
|
10
|
+
type: 'u16',
|
|
11
|
+
value: '1',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'FEE_COLLECTOR_SEED_PREFIX',
|
|
15
|
+
type: 'bytes',
|
|
16
|
+
value: '[102, 101, 101, 95, 99, 111, 108, 108, 101, 99, 116, 111, 114]',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'UPGRADE_SEED_PREFIX',
|
|
20
|
+
type: 'bytes',
|
|
21
|
+
value: '[117, 112, 103, 114, 97, 100, 101]',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'PROGRAM_EMITTER_SEED_PREFIX',
|
|
25
|
+
type: 'bytes',
|
|
26
|
+
value: '[101, 109, 105, 116, 116, 101, 114]',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'MAX_MESSAGE_PAYLOAD_SIZE',
|
|
30
|
+
type: {
|
|
31
|
+
defined: 'usize',
|
|
32
|
+
},
|
|
33
|
+
value: '30 * 1_024',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
instructions: [
|
|
37
|
+
{
|
|
38
|
+
name: 'initMessageV1',
|
|
39
|
+
docs: [
|
|
40
|
+
'Processor for initializing a new draft [PostedMessageV1](crate::state::PostedMessageV1)',
|
|
41
|
+
'account for writing. The emitter authority is established at this point and the payload size',
|
|
42
|
+
'is inferred from the size of the created account. This instruction handler also allows an',
|
|
43
|
+
"integrator to publish Wormhole messages using his program's ID as the emitter address",
|
|
44
|
+
'(by passing `Some(crate::ID)` to the [cpi_program_id](InitMessageV1Args::cpi_program_id)',
|
|
45
|
+
'argument). **Be aware that the emitter authority\'s seeds must only be \\[b"emitter"\\] in this',
|
|
46
|
+
'case.**',
|
|
47
|
+
'',
|
|
48
|
+
'This instruction should be followed up with `write_message_v1` and `finalize_message_v1` to',
|
|
49
|
+
'write and indicate that the message is ready for publishing respectively (to prepare it for',
|
|
50
|
+
'publishing via the',
|
|
51
|
+
'[post message instruction](crate::legacy::instruction::LegacyInstruction::PostMessage)).',
|
|
52
|
+
'',
|
|
53
|
+
'NOTE: If you wish to publish a small message (one where the data does not overflow the',
|
|
54
|
+
'Solana transaction size), it is recommended that you use an [sdk](crate::sdk::cpi) method to',
|
|
55
|
+
'either prepare your message or post a message as a program ID emitter.',
|
|
56
|
+
],
|
|
57
|
+
accounts: [
|
|
58
|
+
{
|
|
59
|
+
name: 'emitterAuthority',
|
|
60
|
+
isMut: false,
|
|
61
|
+
isSigner: true,
|
|
62
|
+
docs: [
|
|
63
|
+
'This authority is the only one who can write to the draft message account.',
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'draftMessage',
|
|
68
|
+
isMut: true,
|
|
69
|
+
isSigner: false,
|
|
70
|
+
docs: ['Bridge.'],
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
args: [
|
|
74
|
+
{
|
|
75
|
+
name: 'args',
|
|
76
|
+
type: {
|
|
77
|
+
defined: 'InitMessageV1Args',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'writeMessageV1',
|
|
84
|
+
docs: [
|
|
85
|
+
'Processor used to write to a draft [PostedMessageV1](crate::state::PostedMessageV1) account.',
|
|
86
|
+
'This instruction requires an authority (the emitter authority) to interact with the message',
|
|
87
|
+
'account.',
|
|
88
|
+
],
|
|
89
|
+
accounts: [
|
|
90
|
+
{
|
|
91
|
+
name: 'emitterAuthority',
|
|
92
|
+
isMut: false,
|
|
93
|
+
isSigner: true,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'draftMessage',
|
|
97
|
+
isMut: true,
|
|
98
|
+
isSigner: false,
|
|
99
|
+
docs: ['only be published when the message is finalized.'],
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
args: [
|
|
103
|
+
{
|
|
104
|
+
name: 'args',
|
|
105
|
+
type: {
|
|
106
|
+
defined: 'WriteMessageV1Args',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'finalizeMessageV1',
|
|
113
|
+
docs: [
|
|
114
|
+
'Processor used to finalize a draft [PostedMessageV1](crate::state::PostedMessageV1) account.',
|
|
115
|
+
'Once finalized, this message account cannot be written to again. A finalized message is the',
|
|
116
|
+
'only state the legacy post message instruction can accept before publishing. This',
|
|
117
|
+
'instruction requires an authority (the emitter authority) to interact with the message',
|
|
118
|
+
'account.',
|
|
119
|
+
],
|
|
120
|
+
accounts: [
|
|
121
|
+
{
|
|
122
|
+
name: 'emitterAuthority',
|
|
123
|
+
isMut: false,
|
|
124
|
+
isSigner: true,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'draftMessage',
|
|
128
|
+
isMut: true,
|
|
129
|
+
isSigner: false,
|
|
130
|
+
docs: ['only be published when the message is finalized.'],
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
args: [],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'closeMessageV1',
|
|
137
|
+
docs: [
|
|
138
|
+
'Processor used to process a draft [PostedMessageV1](crate::state::PostedMessageV1) account.',
|
|
139
|
+
'This instruction requires an authority (the emitter authority) to interact with the message',
|
|
140
|
+
'account.',
|
|
141
|
+
],
|
|
142
|
+
accounts: [
|
|
143
|
+
{
|
|
144
|
+
name: 'emitterAuthority',
|
|
145
|
+
isMut: false,
|
|
146
|
+
isSigner: true,
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: 'draftMessage',
|
|
150
|
+
isMut: true,
|
|
151
|
+
isSigner: false,
|
|
152
|
+
docs: ['only be published when the message is finalized.'],
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'closeAccountDestination',
|
|
156
|
+
isMut: true,
|
|
157
|
+
isSigner: false,
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
args: [],
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: 'initEncodedVaa',
|
|
164
|
+
docs: [
|
|
165
|
+
'Processor used to intialize a created account as [EncodedVaa](crate::state::EncodedVaa). An',
|
|
166
|
+
'authority (the write authority) is established with this instruction.',
|
|
167
|
+
],
|
|
168
|
+
accounts: [
|
|
169
|
+
{
|
|
170
|
+
name: 'writeAuthority',
|
|
171
|
+
isMut: false,
|
|
172
|
+
isSigner: true,
|
|
173
|
+
docs: [
|
|
174
|
+
'The authority who can write to the VAA account when it is being processed.',
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'encodedVaa',
|
|
179
|
+
isMut: true,
|
|
180
|
+
isSigner: false,
|
|
181
|
+
docs: ['Bridge.'],
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
args: [],
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: 'closeEncodedVaa',
|
|
188
|
+
docs: [
|
|
189
|
+
'Processor used to close an [EncodedVaa](crate::state::EncodedVaa). This instruction requires',
|
|
190
|
+
'an authority (the write authority) to interact witht he encoded VAA account.',
|
|
191
|
+
],
|
|
192
|
+
accounts: [
|
|
193
|
+
{
|
|
194
|
+
name: 'writeAuthority',
|
|
195
|
+
isMut: true,
|
|
196
|
+
isSigner: true,
|
|
197
|
+
docs: [
|
|
198
|
+
'This account is only required to be mutable for the `CloseVaaAccount` directive. This',
|
|
199
|
+
'authority is the same signer that originally created the VAA accounts, so he is the one that',
|
|
200
|
+
'will receive the lamports back for the closed accounts.',
|
|
201
|
+
],
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: 'encodedVaa',
|
|
205
|
+
isMut: true,
|
|
206
|
+
isSigner: false,
|
|
207
|
+
docs: ['written to and then verified.'],
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
args: [],
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: 'writeEncodedVaa',
|
|
214
|
+
docs: [
|
|
215
|
+
'Processor used to write to an [EncodedVaa](crate::state::EncodedVaa) account. This',
|
|
216
|
+
'instruction requires an authority (the write authority) to interact with the encoded VAA',
|
|
217
|
+
'account.',
|
|
218
|
+
],
|
|
219
|
+
accounts: [
|
|
220
|
+
{
|
|
221
|
+
name: 'writeAuthority',
|
|
222
|
+
isMut: false,
|
|
223
|
+
isSigner: true,
|
|
224
|
+
docs: [
|
|
225
|
+
'The only authority that can write to the encoded VAA account.',
|
|
226
|
+
],
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: 'draftVaa',
|
|
230
|
+
isMut: true,
|
|
231
|
+
isSigner: false,
|
|
232
|
+
docs: ['written to and then verified.'],
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
args: [
|
|
236
|
+
{
|
|
237
|
+
name: 'args',
|
|
238
|
+
type: {
|
|
239
|
+
defined: 'WriteEncodedVaaArgs',
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: 'verifyEncodedVaaV1',
|
|
246
|
+
docs: [
|
|
247
|
+
'Processor used to verify an [EncodedVaa](crate::state::EncodedVaa) account as a version 1',
|
|
248
|
+
'VAA (guardian signatures attesting to this observation). This instruction requires an',
|
|
249
|
+
'authority (the write authority) to interact with the encoded VAA account.',
|
|
250
|
+
],
|
|
251
|
+
accounts: [
|
|
252
|
+
{
|
|
253
|
+
name: 'writeAuthority',
|
|
254
|
+
isMut: false,
|
|
255
|
+
isSigner: true,
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: 'draftVaa',
|
|
259
|
+
isMut: true,
|
|
260
|
+
isSigner: false,
|
|
261
|
+
docs: ['written to and then verified.'],
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
name: 'guardianSet',
|
|
265
|
+
isMut: false,
|
|
266
|
+
isSigner: false,
|
|
267
|
+
docs: [
|
|
268
|
+
'Guardian set account, which should be the same one that was used to attest for the VAA. The',
|
|
269
|
+
'signatures in the encoded VAA are verified against this guardian set.',
|
|
270
|
+
],
|
|
271
|
+
},
|
|
272
|
+
],
|
|
273
|
+
args: [],
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
name: 'postVaaV1',
|
|
277
|
+
docs: [
|
|
278
|
+
'Processor used to close an [EncodedVaa](crate::state::EncodedVaa) account to create a',
|
|
279
|
+
'[PostedMessageV1](crate::state::PostedMessageV1) account in its place.',
|
|
280
|
+
'',
|
|
281
|
+
'NOTE: Because the legacy verify signatures instruction was not required for the Posted VAA',
|
|
282
|
+
'account to exist, the encoded [SignatureSet](crate::state::SignatureSet) is the default',
|
|
283
|
+
'[Pubkey].',
|
|
284
|
+
],
|
|
285
|
+
accounts: [
|
|
286
|
+
{
|
|
287
|
+
name: 'payer',
|
|
288
|
+
isMut: true,
|
|
289
|
+
isSigner: true,
|
|
290
|
+
docs: [
|
|
291
|
+
'Payer to create the posted VAA account. This instruction allows anyone with an encoded VAA',
|
|
292
|
+
'to create a posted VAA account.',
|
|
293
|
+
],
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: 'encodedVaa',
|
|
297
|
+
isMut: false,
|
|
298
|
+
isSigner: false,
|
|
299
|
+
docs: [
|
|
300
|
+
'Encoded VAA, whose body will be serialized into the posted VAA account.',
|
|
301
|
+
'',
|
|
302
|
+
'NOTE: This instruction handler only exists to support integrators that still rely on posted',
|
|
303
|
+
'VAA accounts. While we encourage integrators to use the encoded VAA account instead, we',
|
|
304
|
+
'allow a pathway to convert the encoded VAA into a posted VAA. However, the payload is',
|
|
305
|
+
'restricted to 9.5KB, which is much larger than what was possible with the old implementation',
|
|
306
|
+
'using the legacy post vaa instruction. The Core Bridge program will not support posting VAAs',
|
|
307
|
+
'larger than this payload size.',
|
|
308
|
+
],
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
name: 'postedVaa',
|
|
312
|
+
isMut: true,
|
|
313
|
+
isSigner: false,
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: 'systemProgram',
|
|
317
|
+
isMut: false,
|
|
318
|
+
isSigner: false,
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
args: [],
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
name: 'closeSignatureSet',
|
|
325
|
+
docs: [
|
|
326
|
+
'Processor used to close a [SignatureSet](crate::state::SignatureSet), which was used to',
|
|
327
|
+
'verify the VAA using the legacy parse and verify procedure.',
|
|
328
|
+
],
|
|
329
|
+
accounts: [
|
|
330
|
+
{
|
|
331
|
+
name: 'solDestination',
|
|
332
|
+
isMut: true,
|
|
333
|
+
isSigner: true,
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
name: 'postedVaa',
|
|
337
|
+
isMut: false,
|
|
338
|
+
isSigner: false,
|
|
339
|
+
docs: ['Posted VAA.'],
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
name: 'signatureSet',
|
|
343
|
+
isMut: true,
|
|
344
|
+
isSigner: false,
|
|
345
|
+
docs: [
|
|
346
|
+
'Signature set that may have been used to create the posted VAA account. If the `post_vaa_v1`',
|
|
347
|
+
'instruction were used to create the posted VAA account, then the encoded signature set',
|
|
348
|
+
'pubkey would be all zeroes.',
|
|
349
|
+
],
|
|
350
|
+
},
|
|
351
|
+
],
|
|
352
|
+
args: [],
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
accounts: [
|
|
356
|
+
{
|
|
357
|
+
name: 'guardianSet',
|
|
358
|
+
docs: [
|
|
359
|
+
'Account used to store a guardian set. The keys encoded in this account are Ethereum pubkeys.',
|
|
360
|
+
'Its expiration time is determined at the time a guardian set is updated to a new set, where the',
|
|
361
|
+
'current network clock time is used with',
|
|
362
|
+
'[guardian_set_ttl](crate::state::Config::guardian_set_ttl).',
|
|
363
|
+
'',
|
|
364
|
+
'NOTE: The account schema is the same as legacy guardian sets, but this account now has a',
|
|
365
|
+
"discriminator generated by Anchor's [account] macro. When the Core Bridge program performs a",
|
|
366
|
+
'guardian set update with this implementation, guardian sets will now have this Anchor-generated',
|
|
367
|
+
'discriminator.',
|
|
368
|
+
],
|
|
369
|
+
type: {
|
|
370
|
+
kind: 'struct',
|
|
371
|
+
fields: [
|
|
372
|
+
{
|
|
373
|
+
name: 'index',
|
|
374
|
+
docs: [
|
|
375
|
+
'Index representing an incrementing version number for this guardian set.',
|
|
376
|
+
],
|
|
377
|
+
type: 'u32',
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
name: 'keys',
|
|
381
|
+
docs: ['Ethereum-style public keys.'],
|
|
382
|
+
type: {
|
|
383
|
+
vec: {
|
|
384
|
+
array: ['u8', 20],
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
name: 'creationTime',
|
|
390
|
+
docs: [
|
|
391
|
+
'Timestamp representing the time this guardian became active.',
|
|
392
|
+
],
|
|
393
|
+
type: {
|
|
394
|
+
defined: 'Timestamp',
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
name: 'expirationTime',
|
|
399
|
+
docs: [
|
|
400
|
+
'Expiration time when VAAs issued by this set are no longer valid.',
|
|
401
|
+
],
|
|
402
|
+
type: {
|
|
403
|
+
defined: 'Timestamp',
|
|
404
|
+
},
|
|
405
|
+
},
|
|
406
|
+
],
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
name: 'signatureSet',
|
|
411
|
+
docs: [
|
|
412
|
+
'Account used to store information about a guardian set used to sign a VAA. There is only one',
|
|
413
|
+
'signature set for each verified VAA (associated with a',
|
|
414
|
+
'[PostedVaaV1](crate::legacy::state::PostedVaaV1) account). This account is created using the',
|
|
415
|
+
'verify signatures legacy instruction.',
|
|
416
|
+
'',
|
|
417
|
+
'NOTE: The account schema is the same as legacy signature sets, but this account now has a',
|
|
418
|
+
"discriminator generated by Anchor's [account] macro. When the Core Bridge program upgrades to",
|
|
419
|
+
'this implementation from the old one, integrators in the middle of verifying signatures will',
|
|
420
|
+
'have to use a new keypair for this account and try again.',
|
|
421
|
+
],
|
|
422
|
+
type: {
|
|
423
|
+
kind: 'struct',
|
|
424
|
+
fields: [
|
|
425
|
+
{
|
|
426
|
+
name: 'sigVerifySuccesses',
|
|
427
|
+
docs: ['Signatures of validators'],
|
|
428
|
+
type: {
|
|
429
|
+
vec: 'bool',
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
name: 'messageHash',
|
|
434
|
+
docs: ['Hash of the VAA message body.'],
|
|
435
|
+
type: {
|
|
436
|
+
defined: 'MessageHash',
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
name: 'guardianSetIndex',
|
|
441
|
+
docs: ['Index of the guardian set'],
|
|
442
|
+
type: 'u32',
|
|
443
|
+
},
|
|
444
|
+
],
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
name: 'encodedVaa',
|
|
449
|
+
docs: [
|
|
450
|
+
'Account used to warehouse VAA buffer.',
|
|
451
|
+
'',
|
|
452
|
+
"NOTE: This account should not be used by an external application unless the header's status is",
|
|
453
|
+
'`Verified`. It is encouraged to use the `EncodedVaa` zero-copy account struct instead.',
|
|
454
|
+
],
|
|
455
|
+
type: {
|
|
456
|
+
kind: 'struct',
|
|
457
|
+
fields: [
|
|
458
|
+
{
|
|
459
|
+
name: 'header',
|
|
460
|
+
docs: ['Status, write authority and VAA version.'],
|
|
461
|
+
type: {
|
|
462
|
+
defined: 'Header',
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
name: 'buf',
|
|
467
|
+
docs: ['VAA buffer.'],
|
|
468
|
+
type: 'bytes',
|
|
469
|
+
},
|
|
470
|
+
],
|
|
471
|
+
},
|
|
472
|
+
},
|
|
473
|
+
],
|
|
474
|
+
types: [
|
|
475
|
+
{
|
|
476
|
+
name: 'InitializeArgs',
|
|
477
|
+
docs: ['Arguments used to initialize the Core Bridge program.'],
|
|
478
|
+
type: {
|
|
479
|
+
kind: 'struct',
|
|
480
|
+
fields: [
|
|
481
|
+
{
|
|
482
|
+
name: 'guardianSetTtlSeconds',
|
|
483
|
+
type: 'u32',
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
name: 'feeLamports',
|
|
487
|
+
type: 'u64',
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
name: 'initialGuardians',
|
|
491
|
+
type: {
|
|
492
|
+
vec: {
|
|
493
|
+
array: ['u8', 20],
|
|
494
|
+
},
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
|
+
],
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
name: 'PostMessageArgs',
|
|
502
|
+
docs: [
|
|
503
|
+
'Arguments used to post a new Wormhole (Core Bridge) message either using',
|
|
504
|
+
'[post_message](crate::legacy::instruction::post_message) or',
|
|
505
|
+
'[post_message_unreliable](crate::legacy::instruction::post_message_unreliable).',
|
|
506
|
+
],
|
|
507
|
+
type: {
|
|
508
|
+
kind: 'struct',
|
|
509
|
+
fields: [
|
|
510
|
+
{
|
|
511
|
+
name: 'nonce',
|
|
512
|
+
docs: ['Unique id for this message.'],
|
|
513
|
+
type: 'u32',
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
name: 'payload',
|
|
517
|
+
docs: ['Encoded message.'],
|
|
518
|
+
type: 'bytes',
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
name: 'commitment',
|
|
522
|
+
docs: ['Solana commitment level for Guardian observation.'],
|
|
523
|
+
type: {
|
|
524
|
+
defined: 'Commitment',
|
|
525
|
+
},
|
|
526
|
+
},
|
|
527
|
+
],
|
|
528
|
+
},
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
name: 'PostVaaArgs',
|
|
532
|
+
docs: [
|
|
533
|
+
'Arguments to post new VAA data after signature verification.',
|
|
534
|
+
'',
|
|
535
|
+
'NOTE: It is preferred to use the new process of verifying a VAA using the new Core Bridge Anchor',
|
|
536
|
+
'instructions. See [init_encoded_vaa](crate::wormhole_core_bridge_solana::init_encoded_vaa) and',
|
|
537
|
+
'[write_encoded_vaa](crate::wormhole_core_bridge_solana::write_encoded_vaa) for more info.',
|
|
538
|
+
],
|
|
539
|
+
type: {
|
|
540
|
+
kind: 'struct',
|
|
541
|
+
fields: [
|
|
542
|
+
{
|
|
543
|
+
name: 'gap0',
|
|
544
|
+
docs: ['Unused data.'],
|
|
545
|
+
type: {
|
|
546
|
+
array: ['u8', 5],
|
|
547
|
+
},
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
name: 'timestamp',
|
|
551
|
+
docs: ['Time the message was submitted.'],
|
|
552
|
+
type: 'u32',
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
name: 'nonce',
|
|
556
|
+
docs: ['Unique ID for this message.'],
|
|
557
|
+
type: 'u32',
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
name: 'emitterChain',
|
|
561
|
+
docs: [
|
|
562
|
+
'The Wormhole chain ID denoting the origin of this message.',
|
|
563
|
+
],
|
|
564
|
+
type: 'u16',
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
name: 'emitterAddress',
|
|
568
|
+
docs: ['Emitter of the message.'],
|
|
569
|
+
type: {
|
|
570
|
+
array: ['u8', 32],
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
name: 'sequence',
|
|
575
|
+
docs: ['Sequence number of this message.'],
|
|
576
|
+
type: 'u64',
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
name: 'consistencyLevel',
|
|
580
|
+
docs: ['Level of consistency requested by the emitter.'],
|
|
581
|
+
type: 'u8',
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
name: 'payload',
|
|
585
|
+
docs: ['Message payload.'],
|
|
586
|
+
type: 'bytes',
|
|
587
|
+
},
|
|
588
|
+
],
|
|
589
|
+
},
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
name: 'VerifySignaturesArgs',
|
|
593
|
+
docs: [
|
|
594
|
+
'Arguments to verify specific guardian indices.',
|
|
595
|
+
'',
|
|
596
|
+
'NOTE: It is preferred to use the new process of verifying a VAA using the new Core Bridge Anchor',
|
|
597
|
+
'instructions. See [init_encoded_vaa](crate::wormhole_core_bridge_solana::init_encoded_vaa) and',
|
|
598
|
+
'[write_encoded_vaa](crate::wormhole_core_bridge_solana::write_encoded_vaa) for more info.',
|
|
599
|
+
],
|
|
600
|
+
type: {
|
|
601
|
+
kind: 'struct',
|
|
602
|
+
fields: [
|
|
603
|
+
{
|
|
604
|
+
name: 'signerIndices',
|
|
605
|
+
docs: [
|
|
606
|
+
'Indices of verified guardian signatures, where -1 indicates a missing value. There is a',
|
|
607
|
+
'missing value if the guardian at this index is not expected to have its signature verfied by',
|
|
608
|
+
'the Sig Verify native program in the instruction invoked prior).',
|
|
609
|
+
'',
|
|
610
|
+
'NOTE: In the legacy implementation, this argument being a fixed-sized array of 19 only',
|
|
611
|
+
'allows the first 19 guardians of any size guardian set to be verified. Because of this, it',
|
|
612
|
+
'is absolutely important to use the new process of verifying a VAA.',
|
|
613
|
+
],
|
|
614
|
+
type: {
|
|
615
|
+
array: ['i8', 19],
|
|
616
|
+
},
|
|
617
|
+
},
|
|
618
|
+
],
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
name: 'EmptyArgs',
|
|
623
|
+
docs: ['Unit struct used to represent an empty instruction argument.'],
|
|
624
|
+
type: {
|
|
625
|
+
kind: 'struct',
|
|
626
|
+
fields: [],
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
name: 'Config',
|
|
631
|
+
docs: [
|
|
632
|
+
'Account used to store the current configuration of the bridge, including tracking Wormhole fee',
|
|
633
|
+
'payments. For governance decrees, the guardian set index is used to determine whether a decree',
|
|
634
|
+
'was attested for using the latest guardian set.',
|
|
635
|
+
],
|
|
636
|
+
type: {
|
|
637
|
+
kind: 'struct',
|
|
638
|
+
fields: [
|
|
639
|
+
{
|
|
640
|
+
name: 'guardianSetIndex',
|
|
641
|
+
docs: [
|
|
642
|
+
'The current guardian set index, used to decide which signature sets to accept.',
|
|
643
|
+
],
|
|
644
|
+
type: 'u32',
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
name: 'gap0',
|
|
648
|
+
docs: [
|
|
649
|
+
'Gap. In the old implementation, this was an amount that kept track of message fees that',
|
|
650
|
+
"were paid to the program's fee collector.",
|
|
651
|
+
],
|
|
652
|
+
type: {
|
|
653
|
+
array: ['u8', 8],
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
name: 'guardianSetTtl',
|
|
658
|
+
docs: [
|
|
659
|
+
'Period for how long a guardian set is valid after it has been replaced by a new one. This',
|
|
660
|
+
'guarantees that VAAs issued by that set can still be submitted for a certain period. In',
|
|
661
|
+
'this period we still trust the old guardian set.',
|
|
662
|
+
],
|
|
663
|
+
type: {
|
|
664
|
+
defined: 'Duration',
|
|
665
|
+
},
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
name: 'feeLamports',
|
|
669
|
+
docs: [
|
|
670
|
+
'Amount of lamports that needs to be paid to the protocol to post a message',
|
|
671
|
+
],
|
|
672
|
+
type: 'u64',
|
|
673
|
+
},
|
|
674
|
+
],
|
|
675
|
+
},
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
name: 'LegacyEmitterSequence',
|
|
679
|
+
docs: [
|
|
680
|
+
'Account used to store the current sequence number for a given emitter.',
|
|
681
|
+
],
|
|
682
|
+
type: {
|
|
683
|
+
kind: 'struct',
|
|
684
|
+
fields: [
|
|
685
|
+
{
|
|
686
|
+
name: 'value',
|
|
687
|
+
docs: [
|
|
688
|
+
'Current sequence number, which will be used the next time this emitter publishes a message.',
|
|
689
|
+
],
|
|
690
|
+
type: 'u64',
|
|
691
|
+
},
|
|
692
|
+
],
|
|
693
|
+
},
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
name: 'EmitterSequence',
|
|
697
|
+
type: {
|
|
698
|
+
kind: 'struct',
|
|
699
|
+
fields: [
|
|
700
|
+
{
|
|
701
|
+
name: 'legacy',
|
|
702
|
+
type: {
|
|
703
|
+
defined: 'LegacyEmitterSequence',
|
|
704
|
+
},
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
name: 'bump',
|
|
708
|
+
type: 'u8',
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
name: 'emitterType',
|
|
712
|
+
type: {
|
|
713
|
+
defined: 'EmitterType',
|
|
714
|
+
},
|
|
715
|
+
},
|
|
716
|
+
],
|
|
717
|
+
},
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
name: 'PostedMessageV1Unreliable',
|
|
721
|
+
docs: ['Account used to store a published (reusable) Wormhole message.'],
|
|
722
|
+
type: {
|
|
723
|
+
kind: 'struct',
|
|
724
|
+
fields: [
|
|
725
|
+
{
|
|
726
|
+
name: 'data',
|
|
727
|
+
type: {
|
|
728
|
+
defined: 'PostedMessageV1Data',
|
|
729
|
+
},
|
|
730
|
+
},
|
|
731
|
+
],
|
|
732
|
+
},
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
name: 'PostedMessageV1Info',
|
|
736
|
+
docs: [
|
|
737
|
+
'Message metadata defining information about a published Wormhole message.',
|
|
738
|
+
],
|
|
739
|
+
type: {
|
|
740
|
+
kind: 'struct',
|
|
741
|
+
fields: [
|
|
742
|
+
{
|
|
743
|
+
name: 'consistencyLevel',
|
|
744
|
+
docs: ['Level of consistency requested by the emitter.'],
|
|
745
|
+
type: 'u8',
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
name: 'emitterAuthority',
|
|
749
|
+
docs: [
|
|
750
|
+
'Authority used to write the message. This field is set to default when the message is',
|
|
751
|
+
'posted.',
|
|
752
|
+
],
|
|
753
|
+
type: 'publicKey',
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
name: 'status',
|
|
757
|
+
docs: [
|
|
758
|
+
'If a message is being written to, this status is used to determine which state this',
|
|
759
|
+
'account is in (e.g. [MessageStatus::Writing] indicates that the emitter authority is still',
|
|
760
|
+
'writing its message to this account). When this message is posted, this value will be',
|
|
761
|
+
'set to [MessageStatus::Published].',
|
|
762
|
+
],
|
|
763
|
+
type: {
|
|
764
|
+
defined: 'MessageStatus',
|
|
765
|
+
},
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
name: 'gap0',
|
|
769
|
+
docs: ['No data is stored here.'],
|
|
770
|
+
type: {
|
|
771
|
+
array: ['u8', 3],
|
|
772
|
+
},
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
name: 'postedTimestamp',
|
|
776
|
+
docs: ['Time the posted message was created.'],
|
|
777
|
+
type: {
|
|
778
|
+
defined: 'Timestamp',
|
|
779
|
+
},
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
name: 'nonce',
|
|
783
|
+
docs: ['Unique id for this message.'],
|
|
784
|
+
type: 'u32',
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
name: 'sequence',
|
|
788
|
+
docs: ['Sequence number of this message.'],
|
|
789
|
+
type: 'u64',
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
name: 'solanaChainId',
|
|
793
|
+
docs: [
|
|
794
|
+
'Always `1`.',
|
|
795
|
+
'',
|
|
796
|
+
'NOTE: Saving this value is silly, but we are keeping it to be consistent with how the posted',
|
|
797
|
+
'message account is written.',
|
|
798
|
+
],
|
|
799
|
+
type: {
|
|
800
|
+
defined: 'ChainIdSolanaOnly',
|
|
801
|
+
},
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
name: 'emitter',
|
|
805
|
+
docs: [
|
|
806
|
+
'Emitter of the message. This may either be the emitter authority or a program ID.',
|
|
807
|
+
],
|
|
808
|
+
type: 'publicKey',
|
|
809
|
+
},
|
|
810
|
+
],
|
|
811
|
+
},
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
name: 'PostedMessageV1Data',
|
|
815
|
+
docs: [
|
|
816
|
+
'Underlying data for either [PostedMessageV1](crate::legacy::state::PostedMessageV1) or',
|
|
817
|
+
'[PostedMessageV1Unreliable](crate::legacy::state::PostedMessageV1Unreliable).',
|
|
818
|
+
],
|
|
819
|
+
type: {
|
|
820
|
+
kind: 'struct',
|
|
821
|
+
fields: [
|
|
822
|
+
{
|
|
823
|
+
name: 'info',
|
|
824
|
+
docs: ['Message metadata.'],
|
|
825
|
+
type: {
|
|
826
|
+
defined: 'PostedMessageV1Info',
|
|
827
|
+
},
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
name: 'payload',
|
|
831
|
+
docs: ['Encoded message.'],
|
|
832
|
+
type: 'bytes',
|
|
833
|
+
},
|
|
834
|
+
],
|
|
835
|
+
},
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
name: 'PostedMessageV1',
|
|
839
|
+
docs: [
|
|
840
|
+
'Account used to store a published Wormhole message.',
|
|
841
|
+
'',
|
|
842
|
+
'NOTE: If your integration requires reusable message accounts, please see',
|
|
843
|
+
'[PostedMessageV1Unreliable](crate::legacy::state::PostedMessageV1Unreliable).',
|
|
844
|
+
],
|
|
845
|
+
type: {
|
|
846
|
+
kind: 'struct',
|
|
847
|
+
fields: [
|
|
848
|
+
{
|
|
849
|
+
name: 'data',
|
|
850
|
+
docs: ['Message data.'],
|
|
851
|
+
type: {
|
|
852
|
+
defined: 'PostedMessageV1Data',
|
|
853
|
+
},
|
|
854
|
+
},
|
|
855
|
+
],
|
|
856
|
+
},
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
name: 'PostedVaaV1Info',
|
|
860
|
+
docs: [
|
|
861
|
+
'VAA metadata defining information about a Wormhole message attested for by an active guardian',
|
|
862
|
+
'set.',
|
|
863
|
+
],
|
|
864
|
+
type: {
|
|
865
|
+
kind: 'struct',
|
|
866
|
+
fields: [
|
|
867
|
+
{
|
|
868
|
+
name: 'consistencyLevel',
|
|
869
|
+
docs: ['Level of consistency requested by the emitter.'],
|
|
870
|
+
type: 'u8',
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
name: 'timestamp',
|
|
874
|
+
docs: ['Time the message was submitted.'],
|
|
875
|
+
type: {
|
|
876
|
+
defined: 'Timestamp',
|
|
877
|
+
},
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
name: 'signatureSet',
|
|
881
|
+
docs: [
|
|
882
|
+
"Pubkey of [SignatureSet](crate::state::SignatureSet) account that represents this VAA's",
|
|
883
|
+
'signature verification.',
|
|
884
|
+
],
|
|
885
|
+
type: 'publicKey',
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
name: 'guardianSetIndex',
|
|
889
|
+
docs: [
|
|
890
|
+
'Guardian set index used to verify signatures for [SignatureSet](crate::state::SignatureSet).',
|
|
891
|
+
'',
|
|
892
|
+
'NOTE: In the previous implementation, this member was referred to as the "posted timestamp",',
|
|
893
|
+
'which is zero for VAA data (posted messages and VAAs resemble the same account schema). By',
|
|
894
|
+
'changing this to the guardian set index, we patch a bug with verifying governance VAAs for',
|
|
895
|
+
'the Core Bridge (other Core Bridge implementations require that the guardian set that',
|
|
896
|
+
'attested for the governance VAA is the current one).',
|
|
897
|
+
],
|
|
898
|
+
type: 'u32',
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
name: 'nonce',
|
|
902
|
+
docs: ['Unique ID for this message.'],
|
|
903
|
+
type: 'u32',
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
name: 'sequence',
|
|
907
|
+
docs: ['Sequence number of this message.'],
|
|
908
|
+
type: 'u64',
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
name: 'emitterChain',
|
|
912
|
+
docs: [
|
|
913
|
+
'The Wormhole chain ID denoting the origin of this message.',
|
|
914
|
+
],
|
|
915
|
+
type: 'u16',
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
name: 'emitterAddress',
|
|
919
|
+
docs: ['Emitter of the message.'],
|
|
920
|
+
type: {
|
|
921
|
+
array: ['u8', 32],
|
|
922
|
+
},
|
|
923
|
+
},
|
|
924
|
+
],
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
name: 'PostedVaaV1',
|
|
929
|
+
docs: ['Account used to store a verified VAA.'],
|
|
930
|
+
type: {
|
|
931
|
+
kind: 'struct',
|
|
932
|
+
fields: [
|
|
933
|
+
{
|
|
934
|
+
name: 'info',
|
|
935
|
+
docs: ['VAA metadata.'],
|
|
936
|
+
type: {
|
|
937
|
+
defined: 'PostedVaaV1Info',
|
|
938
|
+
},
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
name: 'payload',
|
|
942
|
+
docs: ['Message payload.'],
|
|
943
|
+
type: 'bytes',
|
|
944
|
+
},
|
|
945
|
+
],
|
|
946
|
+
},
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
name: 'WriteEncodedVaaArgs',
|
|
950
|
+
docs: [
|
|
951
|
+
'Arguments for the [write_encoded_vaa](crate::wormhole_core_bridge_solana::write_encoded_vaa)',
|
|
952
|
+
'instruction.',
|
|
953
|
+
],
|
|
954
|
+
type: {
|
|
955
|
+
kind: 'struct',
|
|
956
|
+
fields: [
|
|
957
|
+
{
|
|
958
|
+
name: 'index',
|
|
959
|
+
docs: ['Index of VAA buffer.'],
|
|
960
|
+
type: 'u32',
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
name: 'data',
|
|
964
|
+
docs: [
|
|
965
|
+
'Data representing subset of VAA buffer starting at specified index.',
|
|
966
|
+
],
|
|
967
|
+
type: 'bytes',
|
|
968
|
+
},
|
|
969
|
+
],
|
|
970
|
+
},
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
name: 'InitMessageV1Args',
|
|
974
|
+
docs: [
|
|
975
|
+
'Arguments for the [init_message_v1](crate::wormhole_core_bridge_solana::init_message_v1)',
|
|
976
|
+
'instruction.',
|
|
977
|
+
],
|
|
978
|
+
type: {
|
|
979
|
+
kind: 'struct',
|
|
980
|
+
fields: [
|
|
981
|
+
{
|
|
982
|
+
name: 'nonce',
|
|
983
|
+
docs: ['Unique id for this message.'],
|
|
984
|
+
type: 'u32',
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
name: 'commitment',
|
|
988
|
+
docs: ['Solana commitment level for Guardian observation.'],
|
|
989
|
+
type: {
|
|
990
|
+
defined: 'Commitment',
|
|
991
|
+
},
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
name: 'cpiProgramId',
|
|
995
|
+
docs: [
|
|
996
|
+
'Optional program ID if the emitter address will be your program ID.',
|
|
997
|
+
'',
|
|
998
|
+
'NOTE: If `Some(program_id)`, your emitter authority seeds to be \\[b"emitter\\].',
|
|
999
|
+
],
|
|
1000
|
+
type: {
|
|
1001
|
+
option: 'publicKey',
|
|
1002
|
+
},
|
|
1003
|
+
},
|
|
1004
|
+
],
|
|
1005
|
+
},
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
name: 'WriteMessageV1Args',
|
|
1009
|
+
docs: [
|
|
1010
|
+
'Arguments for the [write_message_v1](crate::wormhole_core_bridge_solana::write_message_v1)',
|
|
1011
|
+
'instruction.',
|
|
1012
|
+
],
|
|
1013
|
+
type: {
|
|
1014
|
+
kind: 'struct',
|
|
1015
|
+
fields: [
|
|
1016
|
+
{
|
|
1017
|
+
name: 'index',
|
|
1018
|
+
docs: ['Index of message buffer.'],
|
|
1019
|
+
type: 'u32',
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
name: 'data',
|
|
1023
|
+
docs: [
|
|
1024
|
+
'Data representing subset of message buffer starting at specified index.',
|
|
1025
|
+
],
|
|
1026
|
+
type: 'bytes',
|
|
1027
|
+
},
|
|
1028
|
+
],
|
|
1029
|
+
},
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
name: 'Header',
|
|
1033
|
+
docs: ['`EncodedVaa` account header.'],
|
|
1034
|
+
type: {
|
|
1035
|
+
kind: 'struct',
|
|
1036
|
+
fields: [
|
|
1037
|
+
{
|
|
1038
|
+
name: 'status',
|
|
1039
|
+
docs: [
|
|
1040
|
+
'Processing status. **This encoded VAA is only considered usable when this status is set',
|
|
1041
|
+
'to [Verified](ProcessingStatus::Verified).**',
|
|
1042
|
+
],
|
|
1043
|
+
type: {
|
|
1044
|
+
defined: 'ProcessingStatus',
|
|
1045
|
+
},
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
name: 'writeAuthority',
|
|
1049
|
+
docs: ['The authority that has write privilege to this account.'],
|
|
1050
|
+
type: 'publicKey',
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
name: 'version',
|
|
1054
|
+
docs: [
|
|
1055
|
+
'VAA version. Only when the VAA is verified is this version set to a value.',
|
|
1056
|
+
],
|
|
1057
|
+
type: 'u8',
|
|
1058
|
+
},
|
|
1059
|
+
],
|
|
1060
|
+
},
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
name: 'Timestamp',
|
|
1064
|
+
docs: [
|
|
1065
|
+
'This struct defines unix timestamp as u32 (as opposed to more modern systems that have adopted',
|
|
1066
|
+
"i64). Methods for this struct are meant to convert Solana's clock type to this type assuming we",
|
|
1067
|
+
'are far from year 2038.',
|
|
1068
|
+
],
|
|
1069
|
+
type: {
|
|
1070
|
+
kind: 'struct',
|
|
1071
|
+
fields: [
|
|
1072
|
+
{
|
|
1073
|
+
name: 'value',
|
|
1074
|
+
type: 'u32',
|
|
1075
|
+
},
|
|
1076
|
+
],
|
|
1077
|
+
},
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
name: 'Duration',
|
|
1081
|
+
docs: [
|
|
1082
|
+
'To be used with the [Timestamp] type, this struct defines a duration in seconds.',
|
|
1083
|
+
],
|
|
1084
|
+
type: {
|
|
1085
|
+
kind: 'struct',
|
|
1086
|
+
fields: [
|
|
1087
|
+
{
|
|
1088
|
+
name: 'seconds',
|
|
1089
|
+
type: 'u32',
|
|
1090
|
+
},
|
|
1091
|
+
],
|
|
1092
|
+
},
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
name: 'MessageHash',
|
|
1096
|
+
docs: ['This type is used to represent a message hash (keccak).'],
|
|
1097
|
+
type: {
|
|
1098
|
+
kind: 'struct',
|
|
1099
|
+
fields: [
|
|
1100
|
+
{
|
|
1101
|
+
name: 'bytes',
|
|
1102
|
+
type: {
|
|
1103
|
+
array: ['u8', 32],
|
|
1104
|
+
},
|
|
1105
|
+
},
|
|
1106
|
+
],
|
|
1107
|
+
},
|
|
1108
|
+
},
|
|
1109
|
+
{
|
|
1110
|
+
name: 'ChainIdSolanaOnly',
|
|
1111
|
+
docs: [
|
|
1112
|
+
'This type is kind of silly. But because [PostedMessageV1](crate::state::PostedMessageV1) has the',
|
|
1113
|
+
"emitter chain ID as a field, which is unnecessary since it is always Solana's chain ID, we use",
|
|
1114
|
+
'this type to guarantee that the encoded chain ID is always `1`.',
|
|
1115
|
+
],
|
|
1116
|
+
type: {
|
|
1117
|
+
kind: 'struct',
|
|
1118
|
+
fields: [
|
|
1119
|
+
{
|
|
1120
|
+
name: 'chainId',
|
|
1121
|
+
type: 'u16',
|
|
1122
|
+
},
|
|
1123
|
+
],
|
|
1124
|
+
},
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
name: 'EmitterInfo',
|
|
1128
|
+
type: {
|
|
1129
|
+
kind: 'struct',
|
|
1130
|
+
fields: [
|
|
1131
|
+
{
|
|
1132
|
+
name: 'chain',
|
|
1133
|
+
type: 'u16',
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
name: 'address',
|
|
1137
|
+
type: {
|
|
1138
|
+
array: ['u8', 32],
|
|
1139
|
+
},
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
name: 'sequence',
|
|
1143
|
+
type: 'u64',
|
|
1144
|
+
},
|
|
1145
|
+
],
|
|
1146
|
+
},
|
|
1147
|
+
},
|
|
1148
|
+
{
|
|
1149
|
+
name: 'LegacyInstruction',
|
|
1150
|
+
docs: [
|
|
1151
|
+
'Legacy instruction selector.',
|
|
1152
|
+
'',
|
|
1153
|
+
'NOTE: No more instructions should be added to this enum. Instead, add them as Anchor instruction',
|
|
1154
|
+
'handlers, which will inevitably live in',
|
|
1155
|
+
'[wormhole_core_bridge_solana](crate::wormhole_core_bridge_solana).',
|
|
1156
|
+
],
|
|
1157
|
+
type: {
|
|
1158
|
+
kind: 'enum',
|
|
1159
|
+
variants: [
|
|
1160
|
+
{
|
|
1161
|
+
name: 'Initialize',
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
name: 'PostMessage',
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
name: 'PostVaa',
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
name: 'SetMessageFee',
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
name: 'TransferFees',
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
name: 'UpgradeContract',
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
name: 'GuardianSetUpdate',
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
name: 'VerifySignatures',
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
name: 'PostMessageUnreliable',
|
|
1186
|
+
},
|
|
1187
|
+
],
|
|
1188
|
+
},
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
name: 'EmitterType',
|
|
1192
|
+
type: {
|
|
1193
|
+
kind: 'enum',
|
|
1194
|
+
variants: [
|
|
1195
|
+
{
|
|
1196
|
+
name: 'Unset',
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
name: 'Legacy',
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
name: 'Executable',
|
|
1203
|
+
},
|
|
1204
|
+
],
|
|
1205
|
+
},
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
name: 'MessageStatus',
|
|
1209
|
+
docs: [
|
|
1210
|
+
'Status of a message. When a message is posted, its status is',
|
|
1211
|
+
'[Published](MessageStatus::Published).',
|
|
1212
|
+
],
|
|
1213
|
+
type: {
|
|
1214
|
+
kind: 'enum',
|
|
1215
|
+
variants: [
|
|
1216
|
+
{
|
|
1217
|
+
name: 'Published',
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
name: 'Writing',
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
name: 'ReadyForPublishing',
|
|
1224
|
+
},
|
|
1225
|
+
],
|
|
1226
|
+
},
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
name: 'PublishMessageDirective',
|
|
1230
|
+
docs: ['Directive used to determine how to post a Core Bridge message.'],
|
|
1231
|
+
type: {
|
|
1232
|
+
kind: 'enum',
|
|
1233
|
+
variants: [
|
|
1234
|
+
{
|
|
1235
|
+
name: 'Message',
|
|
1236
|
+
fields: [
|
|
1237
|
+
{
|
|
1238
|
+
name: 'nonce',
|
|
1239
|
+
type: 'u32',
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
name: 'payload',
|
|
1243
|
+
type: 'bytes',
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
name: 'commitment',
|
|
1247
|
+
type: {
|
|
1248
|
+
defined: 'Commitment',
|
|
1249
|
+
},
|
|
1250
|
+
},
|
|
1251
|
+
],
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
name: 'ProgramMessage',
|
|
1255
|
+
fields: [
|
|
1256
|
+
{
|
|
1257
|
+
name: 'programId',
|
|
1258
|
+
type: 'publicKey',
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
name: 'nonce',
|
|
1262
|
+
type: 'u32',
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
name: 'payload',
|
|
1266
|
+
type: 'bytes',
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
name: 'commitment',
|
|
1270
|
+
type: {
|
|
1271
|
+
defined: 'Commitment',
|
|
1272
|
+
},
|
|
1273
|
+
},
|
|
1274
|
+
],
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
name: 'PreparedMessage',
|
|
1278
|
+
},
|
|
1279
|
+
],
|
|
1280
|
+
},
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
name: 'ProcessingStatus',
|
|
1284
|
+
docs: ["Encoded VAA's processing status."],
|
|
1285
|
+
type: {
|
|
1286
|
+
kind: 'enum',
|
|
1287
|
+
variants: [
|
|
1288
|
+
{
|
|
1289
|
+
name: 'Unset',
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
name: 'Writing',
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
name: 'Verified',
|
|
1296
|
+
},
|
|
1297
|
+
],
|
|
1298
|
+
},
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
name: 'Commitment',
|
|
1302
|
+
docs: [
|
|
1303
|
+
"Representation of Solana's commitment levels. This enum is not exhaustive because Wormhole only",
|
|
1304
|
+
'considers these two commitment levels in its Guardian observation.',
|
|
1305
|
+
'',
|
|
1306
|
+
'See <https://docs.solana.com/cluster/commitments> for more info.',
|
|
1307
|
+
],
|
|
1308
|
+
type: {
|
|
1309
|
+
kind: 'enum',
|
|
1310
|
+
variants: [
|
|
1311
|
+
{
|
|
1312
|
+
name: 'Confirmed',
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
name: 'Finalized',
|
|
1316
|
+
},
|
|
1317
|
+
],
|
|
1318
|
+
},
|
|
1319
|
+
},
|
|
1320
|
+
],
|
|
1321
|
+
errors: [
|
|
1322
|
+
{
|
|
1323
|
+
code: 6002,
|
|
1324
|
+
name: 'InvalidInstructionArgument',
|
|
1325
|
+
msg: 'InvalidInstructionArgument',
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
code: 6003,
|
|
1329
|
+
name: 'AccountNotZeroed',
|
|
1330
|
+
msg: 'AccountNotZeroed',
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
code: 6004,
|
|
1334
|
+
name: 'InvalidDataConversion',
|
|
1335
|
+
msg: 'InvalidDataConversion',
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
code: 6006,
|
|
1339
|
+
name: 'U64Overflow',
|
|
1340
|
+
msg: 'U64Overflow',
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
code: 6008,
|
|
1344
|
+
name: 'InvalidComputeSize',
|
|
1345
|
+
msg: 'InvalidComputeSize',
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
code: 6016,
|
|
1349
|
+
name: 'InvalidChain',
|
|
1350
|
+
msg: 'InvalidChain',
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
code: 6032,
|
|
1354
|
+
name: 'InvalidGovernanceEmitter',
|
|
1355
|
+
msg: 'InvalidGovernanceEmitter',
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
code: 6034,
|
|
1359
|
+
name: 'InvalidGovernanceAction',
|
|
1360
|
+
msg: 'InvalidGovernanceAction',
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
code: 6036,
|
|
1364
|
+
name: 'LatestGuardianSetRequired',
|
|
1365
|
+
msg: 'LatestGuardianSetRequired',
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
code: 6038,
|
|
1369
|
+
name: 'GovernanceForAnotherChain',
|
|
1370
|
+
msg: 'GovernanceForAnotherChain',
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
code: 6040,
|
|
1374
|
+
name: 'InvalidGovernanceVaa',
|
|
1375
|
+
msg: 'InvalidGovernanceVaa',
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
code: 6256,
|
|
1379
|
+
name: 'InsufficientFees',
|
|
1380
|
+
msg: 'InsufficientFees',
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
code: 6258,
|
|
1384
|
+
name: 'EmitterMismatch',
|
|
1385
|
+
msg: 'EmitterMismatch',
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
code: 6260,
|
|
1389
|
+
name: 'NotReadyForPublishing',
|
|
1390
|
+
msg: 'NotReadyForPublishing',
|
|
1391
|
+
},
|
|
1392
|
+
{
|
|
1393
|
+
code: 6262,
|
|
1394
|
+
name: 'InvalidPreparedMessage',
|
|
1395
|
+
msg: 'InvalidPreparedMessage',
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
code: 6264,
|
|
1399
|
+
name: 'ExecutableEmitter',
|
|
1400
|
+
msg: 'ExecutableEmitter',
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
code: 6266,
|
|
1404
|
+
name: 'LegacyEmitter',
|
|
1405
|
+
msg: 'LegacyEmitter',
|
|
1406
|
+
},
|
|
1407
|
+
{
|
|
1408
|
+
code: 6512,
|
|
1409
|
+
name: 'InvalidSignatureSet',
|
|
1410
|
+
msg: 'InvalidSignatureSet',
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
code: 6514,
|
|
1414
|
+
name: 'InvalidMessageHash',
|
|
1415
|
+
msg: 'InvalidMessageHash',
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
code: 6515,
|
|
1419
|
+
name: 'NoQuorum',
|
|
1420
|
+
msg: 'NoQuorum',
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
code: 6516,
|
|
1424
|
+
name: 'MessageMismatch',
|
|
1425
|
+
msg: 'MessageMismatch',
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
code: 7024,
|
|
1429
|
+
name: 'NotEnoughLamports',
|
|
1430
|
+
msg: 'NotEnoughLamports',
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
code: 7026,
|
|
1434
|
+
name: 'InvalidFeeRecipient',
|
|
1435
|
+
msg: 'InvalidFeeRecipient',
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
code: 7280,
|
|
1439
|
+
name: 'ImplementationMismatch',
|
|
1440
|
+
msg: 'ImplementationMismatch',
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
code: 7536,
|
|
1444
|
+
name: 'InvalidGuardianSetIndex',
|
|
1445
|
+
msg: 'InvalidGuardianSetIndex',
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
code: 7792,
|
|
1449
|
+
name: 'GuardianSetMismatch',
|
|
1450
|
+
msg: 'GuardianSetMismatch',
|
|
1451
|
+
},
|
|
1452
|
+
{
|
|
1453
|
+
code: 7794,
|
|
1454
|
+
name: 'InstructionAtWrongIndex',
|
|
1455
|
+
msg: 'InstructionAtWrongIndex',
|
|
1456
|
+
},
|
|
1457
|
+
{
|
|
1458
|
+
code: 7795,
|
|
1459
|
+
name: 'EmptySigVerifyInstruction',
|
|
1460
|
+
msg: 'EmptySigVerifyInstruction',
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
code: 7796,
|
|
1464
|
+
name: 'InvalidSigVerifyInstruction',
|
|
1465
|
+
msg: 'InvalidSigVerifyInstruction',
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
code: 7798,
|
|
1469
|
+
name: 'GuardianSetExpired',
|
|
1470
|
+
msg: 'GuardianSetExpired',
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
code: 7800,
|
|
1474
|
+
name: 'InvalidGuardianKeyRecovery',
|
|
1475
|
+
msg: 'InvalidGuardianKeyRecovery',
|
|
1476
|
+
},
|
|
1477
|
+
{
|
|
1478
|
+
code: 7802,
|
|
1479
|
+
name: 'SignerIndicesMismatch',
|
|
1480
|
+
msg: 'SignerIndicesMismatch',
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
code: 8048,
|
|
1484
|
+
name: 'PayloadSizeMismatch',
|
|
1485
|
+
msg: 'PayloadSizeMismatch',
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
code: 10112,
|
|
1489
|
+
name: 'ZeroGuardians',
|
|
1490
|
+
msg: 'ZeroGuardians',
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
code: 10128,
|
|
1494
|
+
name: 'GuardianZeroAddress',
|
|
1495
|
+
msg: 'GuardianZeroAddress',
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
code: 10144,
|
|
1499
|
+
name: 'DuplicateGuardianAddress',
|
|
1500
|
+
msg: 'DuplicateGuardianAddress',
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
code: 10160,
|
|
1504
|
+
name: 'MessageAlreadyPublished',
|
|
1505
|
+
msg: 'MessageAlreadyPublished',
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
code: 10176,
|
|
1509
|
+
name: 'VaaWritingDisallowed',
|
|
1510
|
+
msg: 'VaaWritingDisallowed',
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
code: 10192,
|
|
1514
|
+
name: 'VaaAlreadyVerified',
|
|
1515
|
+
msg: 'VaaAlreadyVerified',
|
|
1516
|
+
},
|
|
1517
|
+
{
|
|
1518
|
+
code: 10208,
|
|
1519
|
+
name: 'InvalidGuardianIndex',
|
|
1520
|
+
msg: 'InvalidGuardianIndex',
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
code: 10224,
|
|
1524
|
+
name: 'InvalidSignature',
|
|
1525
|
+
msg: 'InvalidSignature',
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
code: 10256,
|
|
1529
|
+
name: 'UnverifiedVaa',
|
|
1530
|
+
msg: 'UnverifiedVaa',
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
code: 10258,
|
|
1534
|
+
name: 'VaaStillProcessing',
|
|
1535
|
+
msg: 'VaaStillProcessing',
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
code: 10260,
|
|
1539
|
+
name: 'InWritingStatus',
|
|
1540
|
+
msg: 'InWritingStatus',
|
|
1541
|
+
},
|
|
1542
|
+
{
|
|
1543
|
+
code: 10262,
|
|
1544
|
+
name: 'NotInWritingStatus',
|
|
1545
|
+
msg: 'NotInWritingStatus',
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
code: 10264,
|
|
1549
|
+
name: 'InvalidMessageStatus',
|
|
1550
|
+
msg: 'InvalidMessageStatus',
|
|
1551
|
+
},
|
|
1552
|
+
{
|
|
1553
|
+
code: 10266,
|
|
1554
|
+
name: 'HashNotComputed',
|
|
1555
|
+
msg: 'HashNotComputed',
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
code: 10268,
|
|
1559
|
+
name: 'InvalidVaaVersion',
|
|
1560
|
+
msg: 'InvalidVaaVersion',
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
code: 10270,
|
|
1564
|
+
name: 'InvalidCreatedAccountSize',
|
|
1565
|
+
msg: 'InvalidCreatedAccountSize',
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
code: 10272,
|
|
1569
|
+
name: 'DataOverflow',
|
|
1570
|
+
msg: 'DataOverflow',
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
code: 10274,
|
|
1574
|
+
name: 'ExceedsMaxPayloadSize',
|
|
1575
|
+
msg: 'ExceedsMaxPayloadSize (30KB)',
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
code: 10276,
|
|
1579
|
+
name: 'CannotParseVaa',
|
|
1580
|
+
msg: 'CannotParseVaa',
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
code: 10278,
|
|
1584
|
+
name: 'EmitterAuthorityMismatch',
|
|
1585
|
+
msg: 'EmitterAuthorityMismatch',
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
code: 10280,
|
|
1589
|
+
name: 'InvalidProgramEmitter',
|
|
1590
|
+
msg: 'InvalidProgramEmitter',
|
|
1591
|
+
},
|
|
1592
|
+
{
|
|
1593
|
+
code: 10282,
|
|
1594
|
+
name: 'WriteAuthorityMismatch',
|
|
1595
|
+
msg: 'WriteAuthorityMismatch',
|
|
1596
|
+
},
|
|
1597
|
+
{
|
|
1598
|
+
code: 10284,
|
|
1599
|
+
name: 'PostedVaaPayloadTooLarge',
|
|
1600
|
+
msg: 'PostedVaaPayloadTooLarge',
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
code: 10286,
|
|
1604
|
+
name: 'ExecutableDisallowed',
|
|
1605
|
+
msg: 'ExecutableDisallowed',
|
|
1606
|
+
},
|
|
1607
|
+
],
|
|
1608
|
+
};
|
|
1609
|
+
exports.IDL = {
|
|
1610
|
+
version: '0.1.0',
|
|
1611
|
+
name: 'pyth_solana_receiver',
|
|
1612
|
+
instructions: [
|
|
1613
|
+
{
|
|
1614
|
+
name: 'initialize',
|
|
1615
|
+
accounts: [
|
|
1616
|
+
{
|
|
1617
|
+
name: 'payer',
|
|
1618
|
+
isMut: true,
|
|
1619
|
+
isSigner: true,
|
|
1620
|
+
},
|
|
1621
|
+
{
|
|
1622
|
+
name: 'config',
|
|
1623
|
+
isMut: true,
|
|
1624
|
+
isSigner: false,
|
|
1625
|
+
},
|
|
1626
|
+
{
|
|
1627
|
+
name: 'systemProgram',
|
|
1628
|
+
isMut: false,
|
|
1629
|
+
isSigner: false,
|
|
1630
|
+
},
|
|
1631
|
+
],
|
|
1632
|
+
args: [
|
|
1633
|
+
{
|
|
1634
|
+
name: 'initialConfig',
|
|
1635
|
+
type: {
|
|
1636
|
+
defined: 'Config',
|
|
1637
|
+
},
|
|
1638
|
+
},
|
|
1639
|
+
],
|
|
1640
|
+
},
|
|
1641
|
+
{
|
|
1642
|
+
name: 'requestGovernanceAuthorityTransfer',
|
|
1643
|
+
accounts: [
|
|
1644
|
+
{
|
|
1645
|
+
name: 'payer',
|
|
1646
|
+
isMut: false,
|
|
1647
|
+
isSigner: true,
|
|
1648
|
+
},
|
|
1649
|
+
{
|
|
1650
|
+
name: 'config',
|
|
1651
|
+
isMut: true,
|
|
1652
|
+
isSigner: false,
|
|
1653
|
+
},
|
|
1654
|
+
],
|
|
1655
|
+
args: [
|
|
1656
|
+
{
|
|
1657
|
+
name: 'targetGovernanceAuthority',
|
|
1658
|
+
type: 'publicKey',
|
|
1659
|
+
},
|
|
1660
|
+
],
|
|
1661
|
+
},
|
|
1662
|
+
{
|
|
1663
|
+
name: 'acceptGovernanceAuthorityTransfer',
|
|
1664
|
+
accounts: [
|
|
1665
|
+
{
|
|
1666
|
+
name: 'payer',
|
|
1667
|
+
isMut: false,
|
|
1668
|
+
isSigner: true,
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
name: 'config',
|
|
1672
|
+
isMut: true,
|
|
1673
|
+
isSigner: false,
|
|
1674
|
+
},
|
|
1675
|
+
],
|
|
1676
|
+
args: [],
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
name: 'setDataSources',
|
|
1680
|
+
accounts: [
|
|
1681
|
+
{
|
|
1682
|
+
name: 'payer',
|
|
1683
|
+
isMut: false,
|
|
1684
|
+
isSigner: true,
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
name: 'config',
|
|
1688
|
+
isMut: true,
|
|
1689
|
+
isSigner: false,
|
|
1690
|
+
},
|
|
1691
|
+
],
|
|
1692
|
+
args: [
|
|
1693
|
+
{
|
|
1694
|
+
name: 'validDataSources',
|
|
1695
|
+
type: {
|
|
1696
|
+
vec: {
|
|
1697
|
+
defined: 'DataSource',
|
|
1698
|
+
},
|
|
1699
|
+
},
|
|
1700
|
+
},
|
|
1701
|
+
],
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
name: 'setFee',
|
|
1705
|
+
accounts: [
|
|
1706
|
+
{
|
|
1707
|
+
name: 'payer',
|
|
1708
|
+
isMut: false,
|
|
1709
|
+
isSigner: true,
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
name: 'config',
|
|
1713
|
+
isMut: true,
|
|
1714
|
+
isSigner: false,
|
|
1715
|
+
},
|
|
1716
|
+
],
|
|
1717
|
+
args: [
|
|
1718
|
+
{
|
|
1719
|
+
name: 'singleUpdateFeeInLamports',
|
|
1720
|
+
type: 'u64',
|
|
1721
|
+
},
|
|
1722
|
+
],
|
|
1723
|
+
},
|
|
1724
|
+
{
|
|
1725
|
+
name: 'setWormholeAddress',
|
|
1726
|
+
accounts: [
|
|
1727
|
+
{
|
|
1728
|
+
name: 'payer',
|
|
1729
|
+
isMut: false,
|
|
1730
|
+
isSigner: true,
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
name: 'config',
|
|
1734
|
+
isMut: true,
|
|
1735
|
+
isSigner: false,
|
|
1736
|
+
},
|
|
1737
|
+
],
|
|
1738
|
+
args: [
|
|
1739
|
+
{
|
|
1740
|
+
name: 'wormhole',
|
|
1741
|
+
type: 'publicKey',
|
|
1742
|
+
},
|
|
1743
|
+
],
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
name: 'setMinimumSignatures',
|
|
1747
|
+
accounts: [
|
|
1748
|
+
{
|
|
1749
|
+
name: 'payer',
|
|
1750
|
+
isMut: false,
|
|
1751
|
+
isSigner: true,
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
name: 'config',
|
|
1755
|
+
isMut: true,
|
|
1756
|
+
isSigner: false,
|
|
1757
|
+
},
|
|
1758
|
+
],
|
|
1759
|
+
args: [
|
|
1760
|
+
{
|
|
1761
|
+
name: 'minimumSignatures',
|
|
1762
|
+
type: 'u8',
|
|
1763
|
+
},
|
|
1764
|
+
],
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
name: 'postUpdateAtomic',
|
|
1768
|
+
docs: [
|
|
1769
|
+
'Post a price update using a VAA and a MerklePriceUpdate.',
|
|
1770
|
+
'This function allows you to post a price update in a single transaction.',
|
|
1771
|
+
"Compared to post_update, it is less secure since you won't be able to verify all guardian signatures if you use this function because of transaction size limitations.",
|
|
1772
|
+
'Typically, you can fit 5 guardian signatures in a transaction that uses this.',
|
|
1773
|
+
],
|
|
1774
|
+
accounts: [
|
|
1775
|
+
{
|
|
1776
|
+
name: 'payer',
|
|
1777
|
+
isMut: true,
|
|
1778
|
+
isSigner: true,
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
name: 'guardianSet',
|
|
1782
|
+
isMut: false,
|
|
1783
|
+
isSigner: false,
|
|
1784
|
+
docs: [
|
|
1785
|
+
'Instead we do the same steps in deserialize_guardian_set_checked.',
|
|
1786
|
+
],
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
name: 'config',
|
|
1790
|
+
isMut: false,
|
|
1791
|
+
isSigner: false,
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
name: 'treasury',
|
|
1795
|
+
isMut: true,
|
|
1796
|
+
isSigner: false,
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
name: 'priceUpdateAccount',
|
|
1800
|
+
isMut: true,
|
|
1801
|
+
isSigner: true,
|
|
1802
|
+
docs: [
|
|
1803
|
+
'The contraint is such that either the price_update_account is uninitialized or the payer is the write_authority.',
|
|
1804
|
+
"Pubkey::default() is the SystemProgram on Solana and it can't sign so it's impossible that price_update_account.write_authority == Pubkey::default() once the account is initialized",
|
|
1805
|
+
],
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
name: 'systemProgram',
|
|
1809
|
+
isMut: false,
|
|
1810
|
+
isSigner: false,
|
|
1811
|
+
},
|
|
1812
|
+
{
|
|
1813
|
+
name: 'writeAuthority',
|
|
1814
|
+
isMut: false,
|
|
1815
|
+
isSigner: true,
|
|
1816
|
+
},
|
|
1817
|
+
],
|
|
1818
|
+
args: [
|
|
1819
|
+
{
|
|
1820
|
+
name: 'params',
|
|
1821
|
+
type: {
|
|
1822
|
+
defined: 'PostUpdateAtomicParams',
|
|
1823
|
+
},
|
|
1824
|
+
},
|
|
1825
|
+
],
|
|
1826
|
+
},
|
|
1827
|
+
{
|
|
1828
|
+
name: 'postUpdate',
|
|
1829
|
+
docs: [
|
|
1830
|
+
'Post a price update using an encoded_vaa account and a MerklePriceUpdate calldata.',
|
|
1831
|
+
'This should be called after the client has already verified the Vaa via the Wormhole contract.',
|
|
1832
|
+
'Check out target_chains/solana/cli/src/main.rs for an example of how to do this.',
|
|
1833
|
+
],
|
|
1834
|
+
accounts: [
|
|
1835
|
+
{
|
|
1836
|
+
name: 'payer',
|
|
1837
|
+
isMut: true,
|
|
1838
|
+
isSigner: true,
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
name: 'encodedVaa',
|
|
1842
|
+
isMut: false,
|
|
1843
|
+
isSigner: false,
|
|
1844
|
+
},
|
|
1845
|
+
{
|
|
1846
|
+
name: 'config',
|
|
1847
|
+
isMut: false,
|
|
1848
|
+
isSigner: false,
|
|
1849
|
+
},
|
|
1850
|
+
{
|
|
1851
|
+
name: 'treasury',
|
|
1852
|
+
isMut: true,
|
|
1853
|
+
isSigner: false,
|
|
1854
|
+
},
|
|
1855
|
+
{
|
|
1856
|
+
name: 'priceUpdateAccount',
|
|
1857
|
+
isMut: true,
|
|
1858
|
+
isSigner: true,
|
|
1859
|
+
docs: [
|
|
1860
|
+
'The contraint is such that either the price_update_account is uninitialized or the payer is the write_authority.',
|
|
1861
|
+
"Pubkey::default() is the SystemProgram on Solana and it can't sign so it's impossible that price_update_account.write_authority == Pubkey::default() once the account is initialized",
|
|
1862
|
+
],
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
name: 'systemProgram',
|
|
1866
|
+
isMut: false,
|
|
1867
|
+
isSigner: false,
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
name: 'writeAuthority',
|
|
1871
|
+
isMut: false,
|
|
1872
|
+
isSigner: true,
|
|
1873
|
+
},
|
|
1874
|
+
],
|
|
1875
|
+
args: [
|
|
1876
|
+
{
|
|
1877
|
+
name: 'params',
|
|
1878
|
+
type: {
|
|
1879
|
+
defined: 'PostUpdateParams',
|
|
1880
|
+
},
|
|
1881
|
+
},
|
|
1882
|
+
],
|
|
1883
|
+
},
|
|
1884
|
+
{
|
|
1885
|
+
name: 'reclaimRent',
|
|
1886
|
+
accounts: [
|
|
1887
|
+
{
|
|
1888
|
+
name: 'payer',
|
|
1889
|
+
isMut: true,
|
|
1890
|
+
isSigner: true,
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
name: 'priceUpdateAccount',
|
|
1894
|
+
isMut: true,
|
|
1895
|
+
isSigner: false,
|
|
1896
|
+
},
|
|
1897
|
+
],
|
|
1898
|
+
args: [],
|
|
1899
|
+
},
|
|
1900
|
+
],
|
|
1901
|
+
accounts: [
|
|
1902
|
+
{
|
|
1903
|
+
name: 'Config',
|
|
1904
|
+
type: {
|
|
1905
|
+
kind: 'struct',
|
|
1906
|
+
fields: [
|
|
1907
|
+
{
|
|
1908
|
+
name: 'governanceAuthority',
|
|
1909
|
+
type: 'publicKey',
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
name: 'targetGovernanceAuthority',
|
|
1913
|
+
type: {
|
|
1914
|
+
option: 'publicKey',
|
|
1915
|
+
},
|
|
1916
|
+
},
|
|
1917
|
+
{
|
|
1918
|
+
name: 'wormhole',
|
|
1919
|
+
type: 'publicKey',
|
|
1920
|
+
},
|
|
1921
|
+
{
|
|
1922
|
+
name: 'validDataSources',
|
|
1923
|
+
type: {
|
|
1924
|
+
vec: {
|
|
1925
|
+
defined: 'DataSource',
|
|
1926
|
+
},
|
|
1927
|
+
},
|
|
1928
|
+
},
|
|
1929
|
+
{
|
|
1930
|
+
name: 'singleUpdateFeeInLamports',
|
|
1931
|
+
type: 'u64',
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
name: 'minimumSignatures',
|
|
1935
|
+
type: 'u8',
|
|
1936
|
+
},
|
|
1937
|
+
],
|
|
1938
|
+
},
|
|
1939
|
+
},
|
|
1940
|
+
{
|
|
1941
|
+
name: 'priceUpdateV2',
|
|
1942
|
+
type: {
|
|
1943
|
+
kind: 'struct',
|
|
1944
|
+
fields: [
|
|
1945
|
+
{
|
|
1946
|
+
name: 'writeAuthority',
|
|
1947
|
+
type: 'publicKey',
|
|
1948
|
+
},
|
|
1949
|
+
{
|
|
1950
|
+
name: 'verificationLevel',
|
|
1951
|
+
type: {
|
|
1952
|
+
defined: 'VerificationLevel',
|
|
1953
|
+
},
|
|
1954
|
+
},
|
|
1955
|
+
{
|
|
1956
|
+
name: 'priceMessage',
|
|
1957
|
+
type: {
|
|
1958
|
+
defined: 'PriceFeedMessage',
|
|
1959
|
+
},
|
|
1960
|
+
},
|
|
1961
|
+
{
|
|
1962
|
+
name: 'postedSlot',
|
|
1963
|
+
type: 'u64',
|
|
1964
|
+
},
|
|
1965
|
+
],
|
|
1966
|
+
},
|
|
1967
|
+
},
|
|
1968
|
+
],
|
|
1969
|
+
types: [
|
|
1970
|
+
{
|
|
1971
|
+
name: 'PriceFeedMessage',
|
|
1972
|
+
type: {
|
|
1973
|
+
kind: 'struct',
|
|
1974
|
+
fields: [
|
|
1975
|
+
{
|
|
1976
|
+
name: 'feedId',
|
|
1977
|
+
type: {
|
|
1978
|
+
array: ['u8', 32],
|
|
1979
|
+
},
|
|
1980
|
+
},
|
|
1981
|
+
{
|
|
1982
|
+
name: 'price',
|
|
1983
|
+
type: 'i64',
|
|
1984
|
+
},
|
|
1985
|
+
{
|
|
1986
|
+
name: 'conf',
|
|
1987
|
+
type: 'u64',
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
name: 'exponent',
|
|
1991
|
+
type: 'i32',
|
|
1992
|
+
},
|
|
1993
|
+
{
|
|
1994
|
+
name: 'publishTime',
|
|
1995
|
+
type: 'i64',
|
|
1996
|
+
},
|
|
1997
|
+
{
|
|
1998
|
+
name: 'prevPublishTime',
|
|
1999
|
+
type: 'i64',
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
name: 'emaPrice',
|
|
2003
|
+
type: 'i64',
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
name: 'emaConf',
|
|
2007
|
+
type: 'u64',
|
|
2008
|
+
},
|
|
2009
|
+
],
|
|
2010
|
+
},
|
|
2011
|
+
},
|
|
2012
|
+
{
|
|
2013
|
+
name: 'MerklePriceUpdate',
|
|
2014
|
+
type: {
|
|
2015
|
+
kind: 'struct',
|
|
2016
|
+
fields: [
|
|
2017
|
+
{
|
|
2018
|
+
name: 'message',
|
|
2019
|
+
type: 'bytes',
|
|
2020
|
+
},
|
|
2021
|
+
{
|
|
2022
|
+
name: 'proof',
|
|
2023
|
+
type: {
|
|
2024
|
+
vec: {
|
|
2025
|
+
array: ['u8', 20],
|
|
2026
|
+
},
|
|
2027
|
+
},
|
|
2028
|
+
},
|
|
2029
|
+
],
|
|
2030
|
+
},
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
name: 'DataSource',
|
|
2034
|
+
type: {
|
|
2035
|
+
kind: 'struct',
|
|
2036
|
+
fields: [
|
|
2037
|
+
{
|
|
2038
|
+
name: 'chain',
|
|
2039
|
+
type: 'u16',
|
|
2040
|
+
},
|
|
2041
|
+
{
|
|
2042
|
+
name: 'emitter',
|
|
2043
|
+
type: 'publicKey',
|
|
2044
|
+
},
|
|
2045
|
+
],
|
|
2046
|
+
},
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
name: 'PostUpdateAtomicParams',
|
|
2050
|
+
type: {
|
|
2051
|
+
kind: 'struct',
|
|
2052
|
+
fields: [
|
|
2053
|
+
{
|
|
2054
|
+
name: 'vaa',
|
|
2055
|
+
type: 'bytes',
|
|
2056
|
+
},
|
|
2057
|
+
{
|
|
2058
|
+
name: 'merklePriceUpdate',
|
|
2059
|
+
type: {
|
|
2060
|
+
defined: 'MerklePriceUpdate',
|
|
2061
|
+
},
|
|
2062
|
+
},
|
|
2063
|
+
{
|
|
2064
|
+
name: 'treasuryId',
|
|
2065
|
+
type: 'u8',
|
|
2066
|
+
},
|
|
2067
|
+
],
|
|
2068
|
+
},
|
|
2069
|
+
},
|
|
2070
|
+
{
|
|
2071
|
+
name: 'PostUpdateParams',
|
|
2072
|
+
type: {
|
|
2073
|
+
kind: 'struct',
|
|
2074
|
+
fields: [
|
|
2075
|
+
{
|
|
2076
|
+
name: 'merklePriceUpdate',
|
|
2077
|
+
type: {
|
|
2078
|
+
defined: 'MerklePriceUpdate',
|
|
2079
|
+
},
|
|
2080
|
+
},
|
|
2081
|
+
{
|
|
2082
|
+
name: 'treasuryId',
|
|
2083
|
+
type: 'u8',
|
|
2084
|
+
},
|
|
2085
|
+
],
|
|
2086
|
+
},
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
name: 'VerificationLevel',
|
|
2090
|
+
docs: [
|
|
2091
|
+
'* This enum represents how many guardian signatures were checked for a Pythnet price update\n * If full, guardian quorum has been attained\n * If partial, at least config.minimum signatures have been verified, but in the case config.minimum_signatures changes in the future we also include the number of signatures that were checked',
|
|
2092
|
+
],
|
|
2093
|
+
type: {
|
|
2094
|
+
kind: 'enum',
|
|
2095
|
+
variants: [
|
|
2096
|
+
{
|
|
2097
|
+
name: 'Partial',
|
|
2098
|
+
fields: [
|
|
2099
|
+
{
|
|
2100
|
+
name: 'numSignatures',
|
|
2101
|
+
type: 'u8',
|
|
2102
|
+
},
|
|
2103
|
+
],
|
|
2104
|
+
},
|
|
2105
|
+
{
|
|
2106
|
+
name: 'Full',
|
|
2107
|
+
},
|
|
2108
|
+
],
|
|
2109
|
+
},
|
|
2110
|
+
},
|
|
2111
|
+
],
|
|
2112
|
+
errors: [
|
|
2113
|
+
{
|
|
2114
|
+
code: 6000,
|
|
2115
|
+
name: 'InvalidWormholeMessage',
|
|
2116
|
+
msg: 'Received an invalid wormhole message',
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
code: 6001,
|
|
2120
|
+
name: 'DeserializeMessageFailed',
|
|
2121
|
+
msg: 'An error occurred when deserializing the message',
|
|
2122
|
+
},
|
|
2123
|
+
{
|
|
2124
|
+
code: 6002,
|
|
2125
|
+
name: 'InvalidPriceUpdate',
|
|
2126
|
+
msg: 'Received an invalid price update',
|
|
2127
|
+
},
|
|
2128
|
+
{
|
|
2129
|
+
code: 6003,
|
|
2130
|
+
name: 'UnsupportedMessageType',
|
|
2131
|
+
msg: 'This type of message is not supported currently',
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
code: 6004,
|
|
2135
|
+
name: 'InvalidDataSource',
|
|
2136
|
+
msg: "The tuple emitter chain, emitter doesn't match one of the valid data sources.",
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
code: 6005,
|
|
2140
|
+
name: 'InsufficientFunds',
|
|
2141
|
+
msg: 'Funds are insufficient to pay the receiving fee',
|
|
2142
|
+
},
|
|
2143
|
+
{
|
|
2144
|
+
code: 6006,
|
|
2145
|
+
name: 'WrongWriteAuthority',
|
|
2146
|
+
msg: "This signer can't write to price update account",
|
|
2147
|
+
},
|
|
2148
|
+
{
|
|
2149
|
+
code: 6007,
|
|
2150
|
+
name: 'WrongVaaOwner',
|
|
2151
|
+
msg: 'The posted VAA account has the wrong owner.',
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
code: 6008,
|
|
2155
|
+
name: 'DeserializeVaaFailed',
|
|
2156
|
+
msg: 'An error occurred when deserializing the VAA.',
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
code: 6009,
|
|
2160
|
+
name: 'InsufficientGuardianSignatures',
|
|
2161
|
+
msg: 'The number of guardian signatures is below the minimum',
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
code: 6010,
|
|
2165
|
+
name: 'InvalidVaaVersion',
|
|
2166
|
+
msg: 'Invalid VAA version',
|
|
2167
|
+
},
|
|
2168
|
+
{
|
|
2169
|
+
code: 6011,
|
|
2170
|
+
name: 'GuardianSetMismatch',
|
|
2171
|
+
msg: "Guardian set version in the VAA doesn't match the guardian set passed",
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
code: 6012,
|
|
2175
|
+
name: 'InvalidGuardianOrder',
|
|
2176
|
+
msg: 'Guardian signature indices must be increasing',
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
code: 6013,
|
|
2180
|
+
name: 'InvalidGuardianIndex',
|
|
2181
|
+
msg: 'Guardian index exceeds the number of guardians in the set',
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
code: 6014,
|
|
2185
|
+
name: 'InvalidSignature',
|
|
2186
|
+
msg: 'A VAA signature is invalid',
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
code: 6015,
|
|
2190
|
+
name: 'InvalidGuardianKeyRecovery',
|
|
2191
|
+
msg: "The recovered guardian public key doesn't match the guardian set",
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
code: 6016,
|
|
2195
|
+
name: 'WrongGuardianSetOwner',
|
|
2196
|
+
msg: 'The guardian set account is owned by the wrong program',
|
|
2197
|
+
},
|
|
2198
|
+
{
|
|
2199
|
+
code: 6017,
|
|
2200
|
+
name: 'InvalidGuardianSetPda',
|
|
2201
|
+
msg: "The Guardian Set account doesn't match the PDA derivation",
|
|
2202
|
+
},
|
|
2203
|
+
{
|
|
2204
|
+
code: 6018,
|
|
2205
|
+
name: 'GuardianSetExpired',
|
|
2206
|
+
msg: 'The Guardian Set is expired',
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
code: 6019,
|
|
2210
|
+
name: 'GovernanceAuthorityMismatch',
|
|
2211
|
+
msg: 'The signer is not authorized to perform this governance action',
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
code: 6020,
|
|
2215
|
+
name: 'TargetGovernanceAuthorityMismatch',
|
|
2216
|
+
msg: 'The signer is not authorized to accept the governance authority',
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
code: 6021,
|
|
2220
|
+
name: 'NonexistentGovernanceAuthorityTransferRequest',
|
|
2221
|
+
msg: 'The governance authority needs to request a transfer first',
|
|
2222
|
+
},
|
|
2223
|
+
],
|
|
2224
|
+
};
|