@drift-labs/sdk 2.162.0-beta.2 → 2.163.0-beta.9
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 +2 -2
- package/VERSION +1 -1
- package/bun.lock +47 -79
- package/lib/browser/accounts/fetch.d.ts +6 -6
- package/lib/browser/accounts/fetch.js +4 -4
- package/lib/browser/accounts/grpcAccountSubscriber.d.ts +2 -2
- package/lib/browser/accounts/grpcDriftClientAccountSubscriber.d.ts +2 -2
- package/lib/browser/accounts/grpcDriftClientAccountSubscriberV2.d.ts +3 -3
- package/lib/browser/accounts/grpcDriftClientAccountSubscriberV2.js +2 -2
- package/lib/browser/accounts/grpcInsuranceFundStakeAccountSubscriber.d.ts +2 -2
- package/lib/browser/accounts/grpcMultiAccountSubscriber.d.ts +2 -2
- package/lib/browser/accounts/grpcMultiUserAccountSubscriber.d.ts +2 -2
- package/lib/browser/accounts/grpcProgramAccountSubscriber.d.ts +2 -2
- package/lib/browser/accounts/grpcUserAccountSubscriber.d.ts +2 -2
- package/lib/browser/accounts/grpcUserStatsAccountSubscriber.d.ts +2 -2
- package/lib/browser/accounts/laserProgramAccountSubscriber.d.ts +2 -2
- package/lib/browser/accounts/oneShotUserAccountSubscriber.d.ts +3 -3
- package/lib/browser/accounts/oneShotUserStatsAccountSubscriber.d.ts +3 -3
- package/lib/browser/accounts/pollingDriftClientAccountSubscriber.d.ts +3 -3
- package/lib/browser/accounts/pollingDriftClientAccountSubscriber.js +2 -2
- package/lib/browser/accounts/pollingInsuranceFundStakeAccountSubscriber.d.ts +3 -3
- package/lib/browser/accounts/pollingInsuranceFundStakeAccountSubscriber.js +1 -1
- package/lib/browser/accounts/pollingOracleAccountSubscriber.d.ts +2 -2
- package/lib/browser/accounts/pollingTokenAccountSubscriber.d.ts +2 -2
- package/lib/browser/accounts/pollingUserAccountSubscriber.js +2 -2
- package/lib/browser/accounts/pollingUserStatsAccountSubscriber.d.ts +3 -3
- package/lib/browser/accounts/pollingUserStatsAccountSubscriber.js +1 -1
- package/lib/browser/accounts/testBulkAccountLoader.js +3 -5
- package/lib/browser/accounts/types.d.ts +11 -14
- package/lib/browser/accounts/webSocketAccountSubscriber.d.ts +3 -3
- package/lib/browser/accounts/webSocketAccountSubscriber.js +1 -2
- package/lib/browser/accounts/webSocketAccountSubscriberV2.d.ts +3 -3
- package/lib/browser/accounts/webSocketDriftClientAccountSubscriber.d.ts +5 -5
- package/lib/browser/accounts/webSocketDriftClientAccountSubscriber.js +2 -2
- package/lib/browser/accounts/webSocketDriftClientAccountSubscriberV2.d.ts +3 -3
- package/lib/browser/accounts/webSocketDriftClientAccountSubscriberV2.js +2 -2
- package/lib/browser/accounts/webSocketInsuranceFundStakeAccountSubscriber.d.ts +3 -3
- package/lib/browser/accounts/webSocketProgramAccountSubscriber.d.ts +3 -3
- package/lib/browser/accounts/webSocketProgramAccountSubscriberV2.d.ts +3 -3
- package/lib/browser/accounts/webSocketProgramAccountsSubscriberV2.d.ts +3 -3
- package/lib/browser/accounts/webSocketUserAccountSubscriber.d.ts +3 -3
- package/lib/browser/accounts/webSocketUserStatsAccountSubsriber.d.ts +3 -3
- package/lib/browser/accounts/websocketProgramUserAccountSubscriber.d.ts +2 -2
- package/lib/browser/addresses/pda.d.ts +6 -2
- package/lib/browser/addresses/pda.js +7 -12
- package/lib/browser/adminClient.d.ts +11 -9
- package/lib/browser/adminClient.js +30 -72
- package/lib/browser/auctionSubscriber/auctionSubscriber.js +1 -1
- package/lib/browser/auctionSubscriber/auctionSubscriberGrpc.js +1 -1
- package/lib/browser/config.d.ts +7 -3
- package/lib/browser/config.js +9 -7
- package/lib/browser/constants/index.d.ts +5 -0
- package/lib/browser/constants/index.js +5 -0
- package/lib/browser/constants/numericConstants.d.ts +1 -1
- package/lib/browser/constants/numericConstants.js +3 -3
- package/lib/browser/constants/perpMarkets.js +3 -412
- package/lib/browser/constants/spotMarkets.js +7 -91
- package/lib/browser/constituentMap/constituentMap.js +2 -2
- package/lib/browser/constituentMap/pollingConstituentAccountSubscriber.d.ts +3 -3
- package/lib/browser/constituentMap/webSocketConstituentAccountSubscriber.d.ts +3 -3
- package/lib/browser/constituentMap/webSocketConstituentAccountSubscriber.js +1 -1
- package/lib/browser/decode/customCoder.d.ts +7 -9
- package/lib/browser/decode/customCoder.js +17 -28
- package/lib/browser/decode/user.js +7 -25
- package/lib/browser/dlob/DLOB.d.ts +12 -0
- package/lib/browser/dlob/DLOB.js +12 -0
- package/lib/browser/dlob/orderBookLevels.js +1 -1
- package/lib/browser/driftClient.d.ts +32 -59
- package/lib/browser/driftClient.js +85 -562
- package/lib/browser/driftClientConfig.d.ts +7 -0
- package/lib/browser/events/eventSubscriber.d.ts +8 -0
- package/lib/browser/events/eventSubscriber.js +5 -2
- package/lib/browser/events/parse.d.ts +1 -1
- package/lib/browser/factory/oracleClient.d.ts +2 -2
- package/lib/browser/factory/oracleClient.js +9 -21
- package/lib/browser/idl/drift.d.ts +25708 -0
- package/lib/browser/idl/drift.js +2 -0
- package/lib/browser/idl/drift.json +20850 -15287
- 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 +148 -61
- package/lib/browser/index.d.ts +13 -6
- package/lib/browser/index.js +12 -5
- package/lib/browser/marinade/index.d.ts +1 -1
- package/lib/browser/marinade/index.js +2 -2
- package/lib/browser/math/amm.d.ts +4 -5
- package/lib/browser/math/amm.js +8 -35
- package/lib/browser/math/funding.js +6 -1
- package/lib/browser/math/margin.d.ts +3 -4
- package/lib/browser/math/margin.js +16 -47
- package/lib/browser/math/market.d.ts +2 -2
- package/lib/browser/math/market.js +10 -42
- package/lib/browser/math/oracles.js +14 -19
- package/lib/browser/math/position.js +1 -1
- package/lib/browser/math/trade.js +4 -4
- package/lib/browser/memcmp.js +8 -8
- package/lib/browser/openbook/openbookV2Subscriber.d.ts +1 -1
- package/lib/browser/openbook/openbookV2Subscriber.js +3 -3
- package/lib/browser/oracles/oracleClientCache.d.ts +2 -2
- package/lib/browser/oracles/prelaunchOracleClient.d.ts +2 -2
- package/lib/browser/oracles/prelaunchOracleClient.js +1 -1
- package/lib/browser/oracles/pythLazerClient.js +3 -5
- package/lib/browser/oracles/types.d.ts +6 -0
- package/lib/browser/orderParams.d.ts +0 -1
- package/lib/browser/orderParams.js +1 -5
- package/lib/browser/orderSubscriber/OrderSubscriber.js +3 -4
- package/lib/browser/orderSubscriber/WebsocketSubscription.js +1 -1
- package/lib/browser/orderSubscriber/grpcSubscription.js +2 -2
- package/lib/browser/orderSubscriber/index.d.ts +5 -0
- package/lib/browser/orderSubscriber/index.js +5 -0
- package/lib/browser/priorityFee/index.d.ts +5 -0
- package/lib/browser/priorityFee/index.js +5 -0
- package/lib/browser/pyth/index.d.ts +2 -2
- package/lib/browser/pyth/types.d.ts +1 -1
- package/lib/browser/swift/grpcSignedMsgUserAccountSubscriber.js +1 -1
- package/lib/browser/swift/index.d.ts +7 -0
- package/lib/browser/swift/index.js +7 -0
- package/lib/browser/swift/signedMsgUserAccountSubscriber.js +4 -3
- package/lib/browser/tokenFaucet.d.ts +2 -2
- package/lib/browser/tokenFaucet.js +4 -4
- package/lib/browser/tx/txHandler.d.ts +12 -0
- package/lib/browser/tx/txHandler.js +12 -0
- package/lib/browser/types.d.ts +19 -31
- package/lib/browser/types.js +6 -11
- package/lib/browser/user.d.ts +27 -18
- package/lib/browser/user.js +64 -100
- package/lib/browser/userMap/WebsocketSubscription.js +1 -1
- package/lib/browser/userMap/grpcSubscription.js +1 -1
- package/lib/browser/userMap/revenueShareEscrowMap.js +4 -4
- package/lib/browser/userMap/userMap.js +4 -5
- package/lib/browser/userMap/userStatsMap.js +2 -3
- package/lib/browser/userStats.d.ts +5 -0
- package/lib/node/accounts/fetch.d.ts +6 -6
- package/lib/node/accounts/fetch.d.ts.map +1 -1
- package/lib/node/accounts/fetch.js +4 -4
- package/lib/node/accounts/grpcAccountSubscriber.d.ts +2 -2
- package/lib/node/accounts/grpcAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/grpcDriftClientAccountSubscriber.d.ts +2 -2
- package/lib/node/accounts/grpcDriftClientAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/grpcDriftClientAccountSubscriberV2.d.ts +3 -3
- package/lib/node/accounts/grpcDriftClientAccountSubscriberV2.d.ts.map +1 -1
- package/lib/node/accounts/grpcDriftClientAccountSubscriberV2.js +2 -2
- package/lib/node/accounts/grpcInsuranceFundStakeAccountSubscriber.d.ts +2 -2
- package/lib/node/accounts/grpcInsuranceFundStakeAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/grpcMultiAccountSubscriber.d.ts +2 -2
- package/lib/node/accounts/grpcMultiAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/grpcMultiUserAccountSubscriber.d.ts +2 -2
- package/lib/node/accounts/grpcMultiUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/grpcProgramAccountSubscriber.d.ts +2 -2
- package/lib/node/accounts/grpcProgramAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/grpcUserAccountSubscriber.d.ts +2 -2
- package/lib/node/accounts/grpcUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/grpcUserStatsAccountSubscriber.d.ts +2 -2
- package/lib/node/accounts/grpcUserStatsAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/laserProgramAccountSubscriber.d.ts +2 -2
- package/lib/node/accounts/laserProgramAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/oneShotUserAccountSubscriber.d.ts +3 -3
- package/lib/node/accounts/oneShotUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/oneShotUserStatsAccountSubscriber.d.ts +3 -3
- package/lib/node/accounts/oneShotUserStatsAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/pollingDriftClientAccountSubscriber.d.ts +3 -3
- package/lib/node/accounts/pollingDriftClientAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/pollingDriftClientAccountSubscriber.js +2 -2
- package/lib/node/accounts/pollingInsuranceFundStakeAccountSubscriber.d.ts +3 -3
- package/lib/node/accounts/pollingInsuranceFundStakeAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/pollingInsuranceFundStakeAccountSubscriber.js +1 -1
- package/lib/node/accounts/pollingOracleAccountSubscriber.d.ts +2 -2
- package/lib/node/accounts/pollingOracleAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/pollingTokenAccountSubscriber.d.ts +2 -2
- package/lib/node/accounts/pollingTokenAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/pollingUserAccountSubscriber.js +2 -2
- package/lib/node/accounts/pollingUserStatsAccountSubscriber.d.ts +3 -3
- package/lib/node/accounts/pollingUserStatsAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/pollingUserStatsAccountSubscriber.js +1 -1
- package/lib/node/accounts/testBulkAccountLoader.d.ts.map +1 -1
- package/lib/node/accounts/testBulkAccountLoader.js +3 -5
- package/lib/node/accounts/types.d.ts +11 -14
- package/lib/node/accounts/types.d.ts.map +1 -1
- package/lib/node/accounts/webSocketAccountSubscriber.d.ts +3 -3
- package/lib/node/accounts/webSocketAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/webSocketAccountSubscriber.js +1 -2
- package/lib/node/accounts/webSocketAccountSubscriberV2.d.ts +3 -3
- package/lib/node/accounts/webSocketAccountSubscriberV2.d.ts.map +1 -1
- package/lib/node/accounts/webSocketDriftClientAccountSubscriber.d.ts +5 -5
- package/lib/node/accounts/webSocketDriftClientAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/webSocketDriftClientAccountSubscriber.js +2 -2
- package/lib/node/accounts/webSocketDriftClientAccountSubscriberV2.d.ts +3 -3
- package/lib/node/accounts/webSocketDriftClientAccountSubscriberV2.d.ts.map +1 -1
- package/lib/node/accounts/webSocketDriftClientAccountSubscriberV2.js +2 -2
- package/lib/node/accounts/webSocketInsuranceFundStakeAccountSubscriber.d.ts +3 -3
- package/lib/node/accounts/webSocketInsuranceFundStakeAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/webSocketProgramAccountSubscriber.d.ts +3 -3
- package/lib/node/accounts/webSocketProgramAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/webSocketProgramAccountSubscriberV2.d.ts +3 -3
- package/lib/node/accounts/webSocketProgramAccountSubscriberV2.d.ts.map +1 -1
- package/lib/node/accounts/webSocketProgramAccountsSubscriberV2.d.ts +3 -3
- package/lib/node/accounts/webSocketProgramAccountsSubscriberV2.d.ts.map +1 -1
- package/lib/node/accounts/webSocketUserAccountSubscriber.d.ts +3 -3
- package/lib/node/accounts/webSocketUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/webSocketUserStatsAccountSubsriber.d.ts +3 -3
- package/lib/node/accounts/webSocketUserStatsAccountSubsriber.d.ts.map +1 -1
- package/lib/node/accounts/websocketProgramUserAccountSubscriber.d.ts +2 -2
- package/lib/node/accounts/websocketProgramUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/addresses/pda.d.ts +6 -2
- package/lib/node/addresses/pda.d.ts.map +1 -1
- package/lib/node/addresses/pda.js +7 -12
- package/lib/node/adminClient.d.ts +11 -9
- package/lib/node/adminClient.d.ts.map +1 -1
- package/lib/node/adminClient.js +30 -72
- package/lib/node/auctionSubscriber/auctionSubscriber.d.ts.map +1 -1
- package/lib/node/auctionSubscriber/auctionSubscriber.js +1 -1
- package/lib/node/auctionSubscriber/auctionSubscriberGrpc.d.ts.map +1 -1
- package/lib/node/auctionSubscriber/auctionSubscriberGrpc.js +1 -1
- package/lib/node/config.d.ts +7 -3
- package/lib/node/config.d.ts.map +1 -1
- package/lib/node/config.js +9 -7
- package/lib/node/constants/index.d.ts +5 -0
- package/lib/node/constants/index.d.ts.map +1 -1
- package/lib/node/constants/index.js +5 -0
- package/lib/node/constants/numericConstants.d.ts +1 -1
- package/lib/node/constants/numericConstants.d.ts.map +1 -1
- package/lib/node/constants/numericConstants.js +3 -3
- package/lib/node/constants/perpMarkets.d.ts.map +1 -1
- package/lib/node/constants/perpMarkets.js +3 -412
- package/lib/node/constants/spotMarkets.d.ts.map +1 -1
- package/lib/node/constants/spotMarkets.js +7 -91
- package/lib/node/constituentMap/constituentMap.d.ts.map +1 -1
- package/lib/node/constituentMap/constituentMap.js +2 -2
- package/lib/node/constituentMap/pollingConstituentAccountSubscriber.d.ts +3 -3
- package/lib/node/constituentMap/pollingConstituentAccountSubscriber.d.ts.map +1 -1
- package/lib/node/constituentMap/webSocketConstituentAccountSubscriber.d.ts +3 -3
- package/lib/node/constituentMap/webSocketConstituentAccountSubscriber.d.ts.map +1 -1
- package/lib/node/constituentMap/webSocketConstituentAccountSubscriber.js +1 -1
- package/lib/node/decode/customCoder.d.ts +7 -9
- package/lib/node/decode/customCoder.d.ts.map +1 -1
- package/lib/node/decode/customCoder.js +17 -28
- package/lib/node/decode/user.d.ts.map +1 -1
- package/lib/node/decode/user.js +7 -25
- package/lib/node/dlob/DLOB.d.ts +12 -0
- package/lib/node/dlob/DLOB.d.ts.map +1 -1
- package/lib/node/dlob/DLOB.js +12 -0
- package/lib/node/dlob/orderBookLevels.d.ts.map +1 -1
- package/lib/node/dlob/orderBookLevels.js +1 -1
- package/lib/node/driftClient.d.ts +32 -59
- package/lib/node/driftClient.d.ts.map +1 -1
- package/lib/node/driftClient.js +85 -562
- package/lib/node/driftClientConfig.d.ts +7 -0
- package/lib/node/driftClientConfig.d.ts.map +1 -1
- package/lib/node/events/eventSubscriber.d.ts +8 -0
- package/lib/node/events/eventSubscriber.d.ts.map +1 -1
- package/lib/node/events/eventSubscriber.js +5 -2
- package/lib/node/events/parse.d.ts +1 -1
- package/lib/node/events/parse.d.ts.map +1 -1
- package/lib/node/factory/oracleClient.d.ts +2 -2
- package/lib/node/factory/oracleClient.d.ts.map +1 -1
- package/lib/node/factory/oracleClient.js +9 -21
- package/lib/node/idl/drift.d.ts +25709 -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 +20850 -15287
- 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 +148 -61
- package/lib/node/index.d.ts +13 -6
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +12 -5
- package/lib/node/marinade/index.d.ts +1 -1
- package/lib/node/marinade/index.d.ts.map +1 -1
- package/lib/node/marinade/index.js +2 -2
- package/lib/node/math/amm.d.ts +4 -5
- package/lib/node/math/amm.d.ts.map +1 -1
- package/lib/node/math/amm.js +8 -35
- package/lib/node/math/funding.d.ts.map +1 -1
- package/lib/node/math/funding.js +6 -1
- package/lib/node/math/margin.d.ts +3 -4
- package/lib/node/math/margin.d.ts.map +1 -1
- package/lib/node/math/margin.js +16 -47
- package/lib/node/math/market.d.ts +2 -2
- package/lib/node/math/market.d.ts.map +1 -1
- package/lib/node/math/market.js +10 -42
- package/lib/node/math/oracles.d.ts.map +1 -1
- package/lib/node/math/oracles.js +14 -19
- package/lib/node/math/position.d.ts.map +1 -1
- package/lib/node/math/position.js +1 -1
- package/lib/node/math/trade.d.ts.map +1 -1
- package/lib/node/math/trade.js +4 -4
- package/lib/node/memcmp.js +8 -8
- package/lib/node/openbook/openbookV2Subscriber.d.ts +1 -1
- package/lib/node/openbook/openbookV2Subscriber.d.ts.map +1 -1
- package/lib/node/openbook/openbookV2Subscriber.js +3 -3
- package/lib/node/oracles/oracleClientCache.d.ts +2 -2
- package/lib/node/oracles/oracleClientCache.d.ts.map +1 -1
- package/lib/node/oracles/prelaunchOracleClient.d.ts +2 -2
- package/lib/node/oracles/prelaunchOracleClient.d.ts.map +1 -1
- package/lib/node/oracles/prelaunchOracleClient.js +1 -1
- package/lib/node/oracles/pythLazerClient.d.ts.map +1 -1
- package/lib/node/oracles/pythLazerClient.js +3 -5
- package/lib/node/oracles/types.d.ts +6 -0
- package/lib/node/oracles/types.d.ts.map +1 -1
- package/lib/node/orderParams.d.ts +0 -1
- package/lib/node/orderParams.d.ts.map +1 -1
- package/lib/node/orderParams.js +1 -5
- package/lib/node/orderSubscriber/OrderSubscriber.d.ts.map +1 -1
- package/lib/node/orderSubscriber/OrderSubscriber.js +3 -4
- package/lib/node/orderSubscriber/WebsocketSubscription.js +1 -1
- package/lib/node/orderSubscriber/grpcSubscription.js +2 -2
- package/lib/node/orderSubscriber/index.d.ts +5 -0
- package/lib/node/orderSubscriber/index.d.ts.map +1 -1
- package/lib/node/orderSubscriber/index.js +5 -0
- package/lib/node/priorityFee/index.d.ts +5 -0
- package/lib/node/priorityFee/index.d.ts.map +1 -1
- package/lib/node/priorityFee/index.js +5 -0
- package/lib/node/pyth/index.d.ts +2 -2
- package/lib/node/pyth/index.d.ts.map +1 -1
- package/lib/node/pyth/types.d.ts +1 -1
- package/lib/node/pyth/types.d.ts.map +1 -1
- package/lib/node/swift/grpcSignedMsgUserAccountSubscriber.js +1 -1
- package/lib/node/swift/index.d.ts +7 -0
- package/lib/node/swift/index.d.ts.map +1 -1
- package/lib/node/swift/index.js +7 -0
- package/lib/node/swift/signedMsgUserAccountSubscriber.d.ts.map +1 -1
- package/lib/node/swift/signedMsgUserAccountSubscriber.js +4 -3
- package/lib/node/tokenFaucet.d.ts +2 -2
- package/lib/node/tokenFaucet.d.ts.map +1 -1
- package/lib/node/tokenFaucet.js +4 -4
- package/lib/node/tx/txHandler.d.ts +12 -0
- package/lib/node/tx/txHandler.d.ts.map +1 -1
- package/lib/node/tx/txHandler.js +12 -0
- package/lib/node/types.d.ts +19 -31
- package/lib/node/types.d.ts.map +1 -1
- package/lib/node/types.js +6 -11
- package/lib/node/user.d.ts +27 -18
- package/lib/node/user.d.ts.map +1 -1
- package/lib/node/user.js +64 -100
- package/lib/node/userMap/WebsocketSubscription.js +1 -1
- package/lib/node/userMap/grpcSubscription.js +1 -1
- package/lib/node/userMap/revenueShareEscrowMap.d.ts.map +1 -1
- package/lib/node/userMap/revenueShareEscrowMap.js +4 -4
- package/lib/node/userMap/userMap.d.ts.map +1 -1
- package/lib/node/userMap/userMap.js +4 -5
- package/lib/node/userMap/userStatsMap.d.ts.map +1 -1
- package/lib/node/userMap/userStatsMap.js +2 -3
- package/lib/node/userStats.d.ts +5 -0
- package/lib/node/userStats.d.ts.map +1 -1
- package/package.json +5 -7
- package/src/accounts/fetch.ts +18 -17
- package/src/accounts/grpcAccountSubscriber.ts +3 -3
- package/src/accounts/grpcDriftClientAccountSubscriber.ts +2 -3
- package/src/accounts/grpcDriftClientAccountSubscriberV2.ts +5 -6
- package/src/accounts/grpcInsuranceFundStakeAccountSubscriber.ts +2 -2
- package/src/accounts/grpcMultiAccountSubscriber.ts +4 -4
- package/src/accounts/grpcMultiUserAccountSubscriber.ts +4 -4
- package/src/accounts/grpcProgramAccountSubscriber.ts +3 -3
- package/src/accounts/grpcUserAccountSubscriber.ts +2 -2
- package/src/accounts/grpcUserStatsAccountSubscriber.ts +2 -2
- package/src/accounts/laserProgramAccountSubscriber.ts +3 -3
- package/src/accounts/oneShotUserAccountSubscriber.ts +6 -7
- package/src/accounts/oneShotUserStatsAccountSubscriber.ts +10 -9
- package/src/accounts/pollingDriftClientAccountSubscriber.ts +12 -11
- package/src/accounts/pollingInsuranceFundStakeAccountSubscriber.ts +11 -10
- package/src/accounts/pollingOracleAccountSubscriber.ts +2 -2
- package/src/accounts/pollingTokenAccountSubscriber.ts +2 -2
- package/src/accounts/pollingUserAccountSubscriber.ts +2 -2
- package/src/accounts/pollingUserStatsAccountSubscriber.ts +14 -14
- package/src/accounts/testBulkAccountLoader.ts +3 -5
- package/src/accounts/types.ts +10 -25
- package/src/accounts/webSocketAccountSubscriber.ts +5 -5
- package/src/accounts/webSocketAccountSubscriberV2.ts +4 -3
- package/src/accounts/webSocketDriftClientAccountSubscriber.ts +9 -10
- package/src/accounts/webSocketDriftClientAccountSubscriberV2.ts +13 -10
- package/src/accounts/webSocketInsuranceFundStakeAccountSubscriber.ts +3 -3
- package/src/accounts/webSocketProgramAccountSubscriber.ts +4 -3
- package/src/accounts/webSocketProgramAccountSubscriberV2.ts +4 -3
- package/src/accounts/webSocketProgramAccountsSubscriberV2.ts +4 -3
- package/src/accounts/webSocketUserAccountSubscriber.ts +3 -3
- package/src/accounts/webSocketUserStatsAccountSubsriber.ts +3 -3
- package/src/accounts/websocketProgramUserAccountSubscriber.ts +4 -4
- package/src/addresses/pda.ts +6 -22
- package/src/adminClient.ts +154 -239
- package/src/auctionSubscriber/auctionSubscriber.ts +5 -3
- package/src/auctionSubscriber/auctionSubscriberGrpc.ts +5 -3
- package/src/config.ts +24 -16
- package/src/constants/index.ts +5 -0
- package/src/constants/numericConstants.ts +2 -3
- package/src/constants/perpMarkets.ts +3 -445
- package/src/constants/spotMarkets.ts +7 -102
- package/src/constituentMap/constituentMap.ts +5 -6
- package/src/constituentMap/pollingConstituentAccountSubscriber.ts +3 -3
- package/src/constituentMap/webSocketConstituentAccountSubscriber.ts +6 -6
- package/src/decode/customCoder.ts +26 -35
- package/src/decode/user.ts +7 -25
- package/src/dlob/DLOB.ts +12 -0
- package/src/dlob/orderBookLevels.ts +0 -1
- package/src/driftClient.ts +245 -1091
- package/src/driftClientConfig.ts +7 -0
- package/src/events/eventSubscriber.ts +14 -2
- package/src/events/parse.ts +2 -2
- package/src/factory/oracleClient.ts +17 -28
- package/src/idl/drift.json +20850 -15287
- package/src/idl/drift.ts +25708 -0
- package/src/idl/pyth.ts +97 -0
- package/src/idl/token_faucet.json +148 -61
- package/src/idl/token_faucet.ts +197 -0
- package/src/index.ts +13 -12
- package/src/margin/README.md +0 -1
- package/src/marinade/index.ts +2 -2
- package/src/math/amm.ts +2 -48
- package/src/math/funding.ts +8 -3
- package/src/math/margin.ts +12 -67
- package/src/math/market.ts +15 -69
- package/src/math/oracles.ts +14 -30
- package/src/math/position.ts +0 -1
- package/src/math/trade.ts +0 -4
- package/src/memcmp.ts +1 -1
- package/src/openbook/openbookV2Subscriber.ts +1 -1
- package/src/oracles/oracleClientCache.ts +2 -2
- package/src/oracles/prelaunchOracleClient.ts +9 -8
- package/src/oracles/pythLazerClient.ts +10 -12
- package/src/oracles/types.ts +6 -0
- package/src/orderParams.ts +0 -5
- package/src/orderSubscriber/OrderSubscriber.ts +7 -6
- package/src/orderSubscriber/WebsocketSubscription.ts +1 -1
- package/src/orderSubscriber/grpcSubscription.ts +2 -2
- package/src/orderSubscriber/index.ts +5 -0
- package/src/priorityFee/index.ts +5 -0
- package/src/pyth/index.ts +4 -4
- package/src/pyth/types.ts +1 -1
- package/src/swift/grpcSignedMsgUserAccountSubscriber.ts +1 -1
- package/src/swift/index.ts +7 -0
- package/src/swift/signedMsgUserAccountSubscriber.ts +7 -4
- package/src/tokenFaucet.ts +8 -4
- package/src/tx/txHandler.ts +12 -0
- package/src/types.ts +16 -20
- package/src/user.ts +66 -144
- package/src/userMap/WebsocketSubscription.ts +1 -1
- package/src/userMap/grpcSubscription.ts +1 -1
- package/src/userMap/revenueShareEscrowMap.ts +24 -20
- package/src/userMap/userMap.ts +8 -7
- package/src/userMap/userStatsMap.ts +6 -5
- package/src/userStats.ts +5 -0
- package/tests/accounts/customizedCadenceBulkAccountLoader.test.ts +5 -4
- package/tests/amm/test.ts +45 -64
- package/tests/ci/verifyConstants.ts +23 -26
- package/tests/decode/test.ts +2 -4
- package/tests/dlob/helpers.ts +8 -15
- package/tests/user/helpers.ts +0 -2
- package/tests/user/marginCalculations.test.ts +2 -3
- package/tests/user/test.ts +18 -15
- package/lib/browser/accounts/pollingHighLeverageModeConfigAccountSubscriber.d.ts +0 -29
- package/lib/browser/accounts/pollingHighLeverageModeConfigAccountSubscriber.js +0 -111
- package/lib/browser/accounts/webSocketHighLeverageModeConfigAccountSubscriber.d.ts +0 -23
- package/lib/browser/accounts/webSocketHighLeverageModeConfigAccountSubscriber.js +0 -69
- package/lib/browser/idl/pyth_solana_receiver.json +0 -628
- package/lib/browser/idl/switchboard.json +0 -8354
- package/lib/browser/idl/switchboard_on_demand_30.json +0 -5849
- package/lib/browser/oracles/pythPullClient.d.ts +0 -19
- package/lib/browser/oracles/pythPullClient.js +0 -65
- package/lib/browser/oracles/switchboardClient.d.ts +0 -12
- package/lib/browser/oracles/switchboardClient.js +0 -40
- package/lib/browser/oracles/switchboardOnDemandClient.d.ts +0 -12
- package/lib/browser/oracles/switchboardOnDemandClient.js +0 -33
- package/lib/browser/util/pythOracleUtils.d.ts +0 -2
- package/lib/browser/util/pythOracleUtils.js +0 -15
- package/lib/node/accounts/pollingHighLeverageModeConfigAccountSubscriber.d.ts +0 -30
- package/lib/node/accounts/pollingHighLeverageModeConfigAccountSubscriber.d.ts.map +0 -1
- package/lib/node/accounts/pollingHighLeverageModeConfigAccountSubscriber.js +0 -111
- package/lib/node/accounts/webSocketHighLeverageModeConfigAccountSubscriber.d.ts +0 -24
- package/lib/node/accounts/webSocketHighLeverageModeConfigAccountSubscriber.d.ts.map +0 -1
- package/lib/node/accounts/webSocketHighLeverageModeConfigAccountSubscriber.js +0 -69
- package/lib/node/idl/pyth_solana_receiver.json +0 -628
- package/lib/node/idl/switchboard.json +0 -8354
- package/lib/node/idl/switchboard_on_demand_30.json +0 -5849
- package/lib/node/oracles/pythPullClient.d.ts +0 -20
- package/lib/node/oracles/pythPullClient.d.ts.map +0 -1
- package/lib/node/oracles/pythPullClient.js +0 -65
- package/lib/node/oracles/switchboardClient.d.ts +0 -13
- package/lib/node/oracles/switchboardClient.d.ts.map +0 -1
- package/lib/node/oracles/switchboardClient.js +0 -40
- package/lib/node/oracles/switchboardOnDemandClient.d.ts +0 -13
- package/lib/node/oracles/switchboardOnDemandClient.d.ts.map +0 -1
- package/lib/node/oracles/switchboardOnDemandClient.js +0 -33
- package/lib/node/util/pythOracleUtils.d.ts +0 -3
- package/lib/node/util/pythOracleUtils.d.ts.map +0 -1
- package/lib/node/util/pythOracleUtils.js +0 -15
- package/src/accounts/pollingHighLeverageModeConfigAccountSubscriber.ts +0 -189
- package/src/accounts/webSocketHighLeverageModeConfigAccountSubscriber.ts +0 -131
- package/src/idl/switchboard.json +0 -8354
- package/src/idl/switchboard_on_demand_30.json +0 -5849
- package/src/oracles/pythPullClient.ts +0 -112
- package/src/oracles/switchboardClient.ts +0 -77
- package/src/oracles/switchboardOnDemandClient.ts +0 -64
- package/src/util/pythOracleUtils.ts +0 -11
|
@@ -1,628 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "0.1.0",
|
|
3
|
-
"name": "pyth_solana_receiver",
|
|
4
|
-
"instructions": [
|
|
5
|
-
{
|
|
6
|
-
"name": "initialize",
|
|
7
|
-
"accounts": [
|
|
8
|
-
{
|
|
9
|
-
"name": "payer",
|
|
10
|
-
"isMut": true,
|
|
11
|
-
"isSigner": true
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"name": "config",
|
|
15
|
-
"isMut": true,
|
|
16
|
-
"isSigner": false
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "systemProgram",
|
|
20
|
-
"isMut": false,
|
|
21
|
-
"isSigner": false
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"args": [
|
|
25
|
-
{
|
|
26
|
-
"name": "initialConfig",
|
|
27
|
-
"type": {
|
|
28
|
-
"defined": "Config"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"name": "requestGovernanceAuthorityTransfer",
|
|
35
|
-
"accounts": [
|
|
36
|
-
{
|
|
37
|
-
"name": "payer",
|
|
38
|
-
"isMut": false,
|
|
39
|
-
"isSigner": true
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"name": "config",
|
|
43
|
-
"isMut": true,
|
|
44
|
-
"isSigner": false
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"args": [
|
|
48
|
-
{
|
|
49
|
-
"name": "targetGovernanceAuthority",
|
|
50
|
-
"type": "publicKey"
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"name": "acceptGovernanceAuthorityTransfer",
|
|
56
|
-
"accounts": [
|
|
57
|
-
{
|
|
58
|
-
"name": "payer",
|
|
59
|
-
"isMut": false,
|
|
60
|
-
"isSigner": true
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"name": "config",
|
|
64
|
-
"isMut": true,
|
|
65
|
-
"isSigner": false
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
"args": []
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "setDataSources",
|
|
72
|
-
"accounts": [
|
|
73
|
-
{
|
|
74
|
-
"name": "payer",
|
|
75
|
-
"isMut": false,
|
|
76
|
-
"isSigner": true
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"name": "config",
|
|
80
|
-
"isMut": true,
|
|
81
|
-
"isSigner": false
|
|
82
|
-
}
|
|
83
|
-
],
|
|
84
|
-
"args": [
|
|
85
|
-
{
|
|
86
|
-
"name": "validDataSources",
|
|
87
|
-
"type": {
|
|
88
|
-
"vec": {
|
|
89
|
-
"defined": "DataSource"
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"name": "setFee",
|
|
97
|
-
"accounts": [
|
|
98
|
-
{
|
|
99
|
-
"name": "payer",
|
|
100
|
-
"isMut": false,
|
|
101
|
-
"isSigner": true
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"name": "config",
|
|
105
|
-
"isMut": true,
|
|
106
|
-
"isSigner": false
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"args": [
|
|
110
|
-
{
|
|
111
|
-
"name": "singleUpdateFeeInLamports",
|
|
112
|
-
"type": "u64"
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"name": "setWormholeAddress",
|
|
118
|
-
"accounts": [
|
|
119
|
-
{
|
|
120
|
-
"name": "payer",
|
|
121
|
-
"isMut": false,
|
|
122
|
-
"isSigner": true
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"name": "config",
|
|
126
|
-
"isMut": true,
|
|
127
|
-
"isSigner": false
|
|
128
|
-
}
|
|
129
|
-
],
|
|
130
|
-
"args": [
|
|
131
|
-
{
|
|
132
|
-
"name": "wormhole",
|
|
133
|
-
"type": "publicKey"
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"name": "setMinimumSignatures",
|
|
139
|
-
"accounts": [
|
|
140
|
-
{
|
|
141
|
-
"name": "payer",
|
|
142
|
-
"isMut": false,
|
|
143
|
-
"isSigner": true
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"name": "config",
|
|
147
|
-
"isMut": true,
|
|
148
|
-
"isSigner": false
|
|
149
|
-
}
|
|
150
|
-
],
|
|
151
|
-
"args": [
|
|
152
|
-
{
|
|
153
|
-
"name": "minimumSignatures",
|
|
154
|
-
"type": "u8"
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"name": "postUpdateAtomic",
|
|
160
|
-
"docs": [
|
|
161
|
-
"Post a price update using a VAA and a MerklePriceUpdate.",
|
|
162
|
-
"This function allows you to post a price update in a single transaction.",
|
|
163
|
-
"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.",
|
|
164
|
-
"Typically, you can fit 5 guardian signatures in a transaction that uses this."
|
|
165
|
-
],
|
|
166
|
-
"accounts": [
|
|
167
|
-
{
|
|
168
|
-
"name": "payer",
|
|
169
|
-
"isMut": true,
|
|
170
|
-
"isSigner": true
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
"name": "guardianSet",
|
|
174
|
-
"isMut": false,
|
|
175
|
-
"isSigner": false,
|
|
176
|
-
"docs": [
|
|
177
|
-
"Instead we do the same steps in deserialize_guardian_set_checked."
|
|
178
|
-
]
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"name": "config",
|
|
182
|
-
"isMut": false,
|
|
183
|
-
"isSigner": false
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
"name": "treasury",
|
|
187
|
-
"isMut": true,
|
|
188
|
-
"isSigner": false
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
"name": "priceUpdateAccount",
|
|
192
|
-
"isMut": true,
|
|
193
|
-
"isSigner": true,
|
|
194
|
-
"docs": [
|
|
195
|
-
"The contraint is such that either the price_update_account is uninitialized or the payer is the write_authority.",
|
|
196
|
-
"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"
|
|
197
|
-
]
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"name": "systemProgram",
|
|
201
|
-
"isMut": false,
|
|
202
|
-
"isSigner": false
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"name": "writeAuthority",
|
|
206
|
-
"isMut": false,
|
|
207
|
-
"isSigner": true
|
|
208
|
-
}
|
|
209
|
-
],
|
|
210
|
-
"args": [
|
|
211
|
-
{
|
|
212
|
-
"name": "params",
|
|
213
|
-
"type": {
|
|
214
|
-
"defined": "PostUpdateAtomicParams"
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
]
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"name": "postUpdate",
|
|
221
|
-
"docs": [
|
|
222
|
-
"Post a price update using an encoded_vaa account and a MerklePriceUpdate calldata.",
|
|
223
|
-
"This should be called after the client has already verified the Vaa via the Wormhole contract.",
|
|
224
|
-
"Check out target_chains/solana/cli/src/main.rs for an example of how to do this."
|
|
225
|
-
],
|
|
226
|
-
"accounts": [
|
|
227
|
-
{
|
|
228
|
-
"name": "payer",
|
|
229
|
-
"isMut": true,
|
|
230
|
-
"isSigner": true
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
"name": "encodedVaa",
|
|
234
|
-
"isMut": false,
|
|
235
|
-
"isSigner": false
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
"name": "config",
|
|
239
|
-
"isMut": false,
|
|
240
|
-
"isSigner": false
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"name": "treasury",
|
|
244
|
-
"isMut": true,
|
|
245
|
-
"isSigner": false
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"name": "priceUpdateAccount",
|
|
249
|
-
"isMut": true,
|
|
250
|
-
"isSigner": true,
|
|
251
|
-
"docs": [
|
|
252
|
-
"The contraint is such that either the price_update_account is uninitialized or the payer is the write_authority.",
|
|
253
|
-
"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"
|
|
254
|
-
]
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"name": "systemProgram",
|
|
258
|
-
"isMut": false,
|
|
259
|
-
"isSigner": false
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
"name": "writeAuthority",
|
|
263
|
-
"isMut": false,
|
|
264
|
-
"isSigner": true
|
|
265
|
-
}
|
|
266
|
-
],
|
|
267
|
-
"args": [
|
|
268
|
-
{
|
|
269
|
-
"name": "params",
|
|
270
|
-
"type": {
|
|
271
|
-
"defined": "PostUpdateParams"
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
]
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"name": "reclaimRent",
|
|
278
|
-
"accounts": [
|
|
279
|
-
{
|
|
280
|
-
"name": "payer",
|
|
281
|
-
"isMut": true,
|
|
282
|
-
"isSigner": true
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"name": "priceUpdateAccount",
|
|
286
|
-
"isMut": true,
|
|
287
|
-
"isSigner": false
|
|
288
|
-
}
|
|
289
|
-
],
|
|
290
|
-
"args": []
|
|
291
|
-
}
|
|
292
|
-
],
|
|
293
|
-
"accounts": [
|
|
294
|
-
{
|
|
295
|
-
"name": "Config",
|
|
296
|
-
"type": {
|
|
297
|
-
"kind": "struct",
|
|
298
|
-
"fields": [
|
|
299
|
-
{
|
|
300
|
-
"name": "governanceAuthority",
|
|
301
|
-
"type": "publicKey"
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"name": "targetGovernanceAuthority",
|
|
305
|
-
"type": {
|
|
306
|
-
"option": "publicKey"
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
"name": "wormhole",
|
|
311
|
-
"type": "publicKey"
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
"name": "validDataSources",
|
|
315
|
-
"type": {
|
|
316
|
-
"vec": {
|
|
317
|
-
"defined": "DataSource"
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
"name": "singleUpdateFeeInLamports",
|
|
323
|
-
"type": "u64"
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
"name": "minimumSignatures",
|
|
327
|
-
"type": "u8"
|
|
328
|
-
}
|
|
329
|
-
]
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
"name": "priceUpdateV2",
|
|
334
|
-
"type": {
|
|
335
|
-
"kind": "struct",
|
|
336
|
-
"fields": [
|
|
337
|
-
{
|
|
338
|
-
"name": "writeAuthority",
|
|
339
|
-
"type": "publicKey"
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
"name": "verificationLevel",
|
|
343
|
-
"type": {
|
|
344
|
-
"defined": "VerificationLevel"
|
|
345
|
-
}
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
"name": "priceMessage",
|
|
349
|
-
"type": {
|
|
350
|
-
"defined": "PriceFeedMessage"
|
|
351
|
-
}
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
"name": "postedSlot",
|
|
355
|
-
"type": "u64"
|
|
356
|
-
}
|
|
357
|
-
]
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
],
|
|
361
|
-
"types": [
|
|
362
|
-
{
|
|
363
|
-
"name": "PriceFeedMessage",
|
|
364
|
-
"type": {
|
|
365
|
-
"kind": "struct",
|
|
366
|
-
"fields": [
|
|
367
|
-
{
|
|
368
|
-
"name": "feedId",
|
|
369
|
-
"type": {
|
|
370
|
-
"array": ["u8", 32]
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
"name": "price",
|
|
375
|
-
"type": "i64"
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
"name": "conf",
|
|
379
|
-
"type": "u64"
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
"name": "exponent",
|
|
383
|
-
"type": "i32"
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
"name": "publishTime",
|
|
387
|
-
"type": "i64"
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
"name": "prevPublishTime",
|
|
391
|
-
"type": "i64"
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
"name": "emaPrice",
|
|
395
|
-
"type": "i64"
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
"name": "emaConf",
|
|
399
|
-
"type": "u64"
|
|
400
|
-
}
|
|
401
|
-
]
|
|
402
|
-
}
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
"name": "MerklePriceUpdate",
|
|
406
|
-
"type": {
|
|
407
|
-
"kind": "struct",
|
|
408
|
-
"fields": [
|
|
409
|
-
{
|
|
410
|
-
"name": "message",
|
|
411
|
-
"type": "bytes"
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
"name": "proof",
|
|
415
|
-
"type": {
|
|
416
|
-
"vec": {
|
|
417
|
-
"array": ["u8", 20]
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
]
|
|
422
|
-
}
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
"name": "DataSource",
|
|
426
|
-
"type": {
|
|
427
|
-
"kind": "struct",
|
|
428
|
-
"fields": [
|
|
429
|
-
{
|
|
430
|
-
"name": "chain",
|
|
431
|
-
"type": "u16"
|
|
432
|
-
},
|
|
433
|
-
{
|
|
434
|
-
"name": "emitter",
|
|
435
|
-
"type": "publicKey"
|
|
436
|
-
}
|
|
437
|
-
]
|
|
438
|
-
}
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
"name": "PostMultiUpdatesAtomicParams",
|
|
442
|
-
"type": {
|
|
443
|
-
"kind": "struct",
|
|
444
|
-
"fields": [
|
|
445
|
-
{
|
|
446
|
-
"name": "vaa",
|
|
447
|
-
"type": "bytes"
|
|
448
|
-
},
|
|
449
|
-
{
|
|
450
|
-
"name": "merklePriceUpdates",
|
|
451
|
-
"type": {
|
|
452
|
-
"vec": {
|
|
453
|
-
"defined": "MerklePriceUpdate"
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
]
|
|
458
|
-
}
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
"name": "PostUpdateAtomicParams",
|
|
462
|
-
"type": {
|
|
463
|
-
"kind": "struct",
|
|
464
|
-
"fields": [
|
|
465
|
-
{
|
|
466
|
-
"name": "vaa",
|
|
467
|
-
"type": "bytes"
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
"name": "merklePriceUpdate",
|
|
471
|
-
"type": {
|
|
472
|
-
"defined": "MerklePriceUpdate"
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
]
|
|
476
|
-
}
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
"name": "PostUpdateParams",
|
|
480
|
-
"type": {
|
|
481
|
-
"kind": "struct",
|
|
482
|
-
"fields": [
|
|
483
|
-
{
|
|
484
|
-
"name": "merklePriceUpdate",
|
|
485
|
-
"type": {
|
|
486
|
-
"defined": "MerklePriceUpdate"
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
]
|
|
490
|
-
}
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
"name": "VerificationLevel",
|
|
494
|
-
"docs": [
|
|
495
|
-
"* 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"
|
|
496
|
-
],
|
|
497
|
-
"type": {
|
|
498
|
-
"kind": "enum",
|
|
499
|
-
"variants": [
|
|
500
|
-
{
|
|
501
|
-
"name": "Partial",
|
|
502
|
-
"fields": [
|
|
503
|
-
{
|
|
504
|
-
"name": "numSignatures",
|
|
505
|
-
"type": "u8"
|
|
506
|
-
}
|
|
507
|
-
]
|
|
508
|
-
},
|
|
509
|
-
{
|
|
510
|
-
"name": "Full"
|
|
511
|
-
}
|
|
512
|
-
]
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
],
|
|
516
|
-
"errors": [
|
|
517
|
-
{
|
|
518
|
-
"code": 6000,
|
|
519
|
-
"name": "InvalidWormholeMessage",
|
|
520
|
-
"msg": "Received an invalid wormhole message"
|
|
521
|
-
},
|
|
522
|
-
{
|
|
523
|
-
"code": 6001,
|
|
524
|
-
"name": "DeserializeMessageFailed",
|
|
525
|
-
"msg": "An error occurred when deserializing the message"
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
"code": 6002,
|
|
529
|
-
"name": "InvalidPriceUpdate",
|
|
530
|
-
"msg": "Received an invalid price update"
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
"code": 6003,
|
|
534
|
-
"name": "UnsupportedMessageType",
|
|
535
|
-
"msg": "This type of message is not supported currently"
|
|
536
|
-
},
|
|
537
|
-
{
|
|
538
|
-
"code": 6004,
|
|
539
|
-
"name": "InvalidDataSource",
|
|
540
|
-
"msg": "The tuple emitter chain, emitter doesn't match one of the valid data sources."
|
|
541
|
-
},
|
|
542
|
-
{
|
|
543
|
-
"code": 6005,
|
|
544
|
-
"name": "InsufficientFunds",
|
|
545
|
-
"msg": "Funds are insufficient to pay the receiving fee"
|
|
546
|
-
},
|
|
547
|
-
{
|
|
548
|
-
"code": 6006,
|
|
549
|
-
"name": "WrongWriteAuthority",
|
|
550
|
-
"msg": "This signer can't write to price update account"
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
"code": 6007,
|
|
554
|
-
"name": "WrongVaaOwner",
|
|
555
|
-
"msg": "The posted VAA account has the wrong owner."
|
|
556
|
-
},
|
|
557
|
-
{
|
|
558
|
-
"code": 6008,
|
|
559
|
-
"name": "DeserializeVaaFailed",
|
|
560
|
-
"msg": "An error occurred when deserializing the VAA."
|
|
561
|
-
},
|
|
562
|
-
{
|
|
563
|
-
"code": 6009,
|
|
564
|
-
"name": "InsufficientGuardianSignatures",
|
|
565
|
-
"msg": "The number of guardian signatures is below the minimum"
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
"code": 6010,
|
|
569
|
-
"name": "InvalidVaaVersion",
|
|
570
|
-
"msg": "Invalid VAA version"
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
"code": 6011,
|
|
574
|
-
"name": "GuardianSetMismatch",
|
|
575
|
-
"msg": "Guardian set version in the VAA doesn't match the guardian set passed"
|
|
576
|
-
},
|
|
577
|
-
{
|
|
578
|
-
"code": 6012,
|
|
579
|
-
"name": "InvalidGuardianOrder",
|
|
580
|
-
"msg": "Guardian signature indices must be increasing"
|
|
581
|
-
},
|
|
582
|
-
{
|
|
583
|
-
"code": 6013,
|
|
584
|
-
"name": "InvalidGuardianIndex",
|
|
585
|
-
"msg": "Guardian index exceeds the number of guardians in the set"
|
|
586
|
-
},
|
|
587
|
-
{
|
|
588
|
-
"code": 6014,
|
|
589
|
-
"name": "InvalidSignature",
|
|
590
|
-
"msg": "A VAA signature is invalid"
|
|
591
|
-
},
|
|
592
|
-
{
|
|
593
|
-
"code": 6015,
|
|
594
|
-
"name": "InvalidGuardianKeyRecovery",
|
|
595
|
-
"msg": "The recovered guardian public key doesn't match the guardian set"
|
|
596
|
-
},
|
|
597
|
-
{
|
|
598
|
-
"code": 6016,
|
|
599
|
-
"name": "WrongGuardianSetOwner",
|
|
600
|
-
"msg": "The guardian set account is owned by the wrong program"
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
"code": 6017,
|
|
604
|
-
"name": "InvalidGuardianSetPda",
|
|
605
|
-
"msg": "The Guardian Set account doesn't match the PDA derivation"
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
"code": 6018,
|
|
609
|
-
"name": "GuardianSetExpired",
|
|
610
|
-
"msg": "The Guardian Set is expired"
|
|
611
|
-
},
|
|
612
|
-
{
|
|
613
|
-
"code": 6019,
|
|
614
|
-
"name": "GovernanceAuthorityMismatch",
|
|
615
|
-
"msg": "The signer is not authorized to perform this governance action"
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
"code": 6020,
|
|
619
|
-
"name": "TargetGovernanceAuthorityMismatch",
|
|
620
|
-
"msg": "The signer is not authorized to accept the governance authority"
|
|
621
|
-
},
|
|
622
|
-
{
|
|
623
|
-
"code": 6021,
|
|
624
|
-
"name": "NonexistentGovernanceAuthorityTransferRequest",
|
|
625
|
-
"msg": "The governance authority needs to request a transfer first"
|
|
626
|
-
}
|
|
627
|
-
]
|
|
628
|
-
}
|