diff --git a/Makefile b/Makefile index 741693af..e9494315 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,10 @@ COSMOS_SDK_VERSION := v0.50.14-inj.9 COSMOS_SDK_REPO := https://github.com/InjectiveLabs/cosmos-sdk.git -INJECTIVE_CORE_VERSION := v1.19.0 +INJECTIVE_CORE_VERSION := v1.20.0 INJECTIVE_CORE_REPO := https://github.com/InjectiveLabs/injective-core.git -INDEXER_VERSION := v1.19.0 +INDEXER_VERSION := v1.20.2 INDEXER_REPO := https://github.com/InjectiveLabs/injective-indexer.git IBC_GO_VERSION := v8.7.0-inj.4 @@ -17,10 +17,10 @@ COMETBFT_REPO := https://github.com/InjectiveLabs/cometbft.git WASMD_VERSION := v0.53.3-inj.3 WASMD_REPO := https://github.com/InjectiveLabs/wasmd.git -PYTHON_SDK_VERSION := v1.14.0 +PYTHON_SDK_VERSION := v1.15.0 PYTHON_SDK_REPO := https://github.com/InjectiveLabs/sdk-python.git -GO_SDK_VERSION := v1.61.0 +GO_SDK_VERSION := v1.62.0 GO_SDK_REPO := https://github.com/InjectiveLabs/sdk-go.git # Temporary directories diff --git a/README.md b/README.md index fd4d1575..25c95ef2 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,112 @@ The markers look like this: -The API documentation is generated using [Slate](https://github.com/slatedocs/slate) \ No newline at end of file +The API documentation is generated using [Slate](https://github.com/slatedocs/slate) + +## Updating the docs for a new Injective chain version + +Every chain release requires a set of manual steps before opening a PR. The steps below cover what changed between releases: regenerating protobuf-derived JSON tables, regenerating error-code tables, refreshing SDK code snippets, and recording the release in the changelog. + +### Prerequisites + +Make sure the following tools are available in your local environment before running any of the commands below: + +| Tool | Purpose | +|---|---| +| `git` | Cloning source repositories | +| `go` | Running the error-code generation script inside `injective-core` | +| `jq` | Parsing `.pb.go` files in `scripts/generate_proto_json_files.sh` | +| `node` + `markdown-autodocs` (`npm i -g markdown-autodocs`) | Refreshing SDK code snippets | +| `ruby` + `bundler` + `middleman` | Building and serving the docs locally | + +### Step 1 — Bump repository versions in the Makefile + +Open `Makefile` and update the version variables at the top of the file. Two groups of variables exist: + +**Chain-side repositories** (drive proto JSON table generation and error-code generation): + +| Variable | Repository | +|---|---| +| `COSMOS_SDK_VERSION` | `InjectiveLabs/cosmos-sdk` | +| `INJECTIVE_CORE_VERSION` | `InjectiveLabs/injective-core` | +| `INDEXER_VERSION` | `InjectiveLabs/injective-indexer` | +| `IBC_GO_VERSION` | `InjectiveLabs/ibc-go` | +| `COMETBFT_VERSION` | `InjectiveLabs/cometbft` | +| `WASMD_VERSION` | `InjectiveLabs/wasmd` | + +**SDK repositories** (drive SDK code snippet refresh via `make refresh-examples`): + +| Variable | Repository | +|---|---| +| `PYTHON_SDK_VERSION` | `InjectiveLabs/sdk-python` | +| `GO_SDK_VERSION` | `InjectiveLabs/sdk-go` | + +Set each variable to the exact Git tag published in the corresponding repository for the new release. + +### Step 2 — Regenerate proto JSON tables and error codes + +Run the single command that rebuilds both the protobuf-derived JSON tables and the error-code documentation: + +``` +make update-all-proto-related-files +``` + +This target clones all six chain-side repositories at the versions pinned in step 1, runs the two generators, then removes the cloned directories. It produces: + +- `source/json_tables/{injective,cosmos,indexer,ibc,cometbft,wasmd}/**/*.json` — one JSON file per protobuf message type, consumed by `JSON_TO_HTML_TABLE` markdown-autodocs markers inside `source/includes/*.md`. +- `source/json_tables/errors/*.json` — one JSON file per module, generated by `injective-core/scripts/docs/document_error_codes_script.go`. +- `source/includes/_errors.md` — fully regenerated by `scripts/generate_errors_md.sh`. **Do not edit this file manually**; every run overwrites it entirely. + +If you only need a partial regeneration, use the narrower targets `make update-proto-json` (proto tables only) or `make update-errors-documentation` (error codes only). + +### Step 3 — Refresh SDK code snippets + +``` +make refresh-examples +``` + +This clones `sdk-python` and `sdk-go` at the versions pinned in step 1 into `tmp-python-sdk/` and `tmp-go-sdk/`, then runs `markdown-autodocs` over all `source/includes/*.md` files to update every code block enclosed in `MARKDOWN-AUTO-DOCS` markers. + +**Important:** the deploy workflow (`.github/workflows/deploy.yml`) automatically re-runs `markdown-autodocs` on every push to `main`, but it does **not** regenerate the proto JSON tables or `_errors.md`. Those files must be committed as part of the PR. + +### Step 4 — Update the changelog + +Add a new dated entry at the top of `source/includes/_changelog.md`, following the existing pattern: + +```markdown +## YYYY-MM-DD +- Updated all messages to reflect the changes included in the chain version vX.Y.Z, and the Indexer for that chain version +- Python SDK vA.B.C +- Go SDK vD.E.F +``` + +Include any additional bullet points for notable additions specific to this release (new modules documented, new query types, etc.). + +### Step 5 — Verify locally + +Build and serve the docs to confirm everything renders correctly before opening a PR: + +``` +./slate.sh serve +``` + +Navigate through the affected module pages and spot-check that parameter tables (rendered from the updated JSON files) and code snippets (rendered from the updated SDK examples) look correct. + +### When the upgrade adds new pages or modules + +Two less frequent actions may be required: + +- **New top-level page**: add an entry to the `includes:` list in `source/index.html.md` and create the corresponding `source/includes/_.md` file. The deploy order in that list controls the navigation order in the rendered site. +- **New proto directory layout in a repository**: if a repository restructures where it keeps `.pb.go` or `.proto` files, update the processing logic in `scripts/generate_proto_json_files.sh` to match the new layout. This happened, for example, when namespace-directory support was added to handle modules that do not follow the standard `types/` sub-folder convention. + +### Files expected to change in the PR + +Use this as a checklist before pushing: + +- `Makefile` — version bumps +- `source/json_tables/**` — regenerated proto JSON tables +- `source/includes/_errors.md` — regenerated error-code page +- `source/includes/*.md` — refreshed SDK code snippets and updated parameter tables +- `source/includes/_changelog.md` — new dated release entry +- `source/index.html.md` — only if a new top-level page was added +- `scripts/generate_proto_json_files.sh` — only if the proto directory layout changed in one of the source repositories \ No newline at end of file diff --git a/source/includes/_binaryoptions.md b/source/includes/_binaryoptions.md index 36c8dd9e..d0611f35 100644 --- a/source/includes/_binaryoptions.md +++ b/source/includes/_binaryoptions.md @@ -219,7 +219,9 @@ func main() { 10BandIBC 11Provider 12Stork -13ChainlinkDataStreams +13ChainlinkDataStreams +14PythPro +15SedaFast
@@ -434,7 +436,9 @@ func main() { 10BandIBC 11Provider 12Stork -13ChainlinkDataStreams +13ChainlinkDataStreams +14PythPro +15SedaFast
diff --git a/source/includes/_chainstream.md b/source/includes/_chainstream.md index f26f2cb7..cae61c82 100644 --- a/source/includes/_chainstream.md +++ b/source/includes/_chainstream.md @@ -380,7 +380,8 @@ Each message contains a list of events that are filtered by the request paramete order_hashstringthe order hash fee_recipient_addressstringthe fee recipient address cidstringthe client order ID -trade_idstringthe trade ID +trade_idstringthe trade ID +is_liquidationboolwhether the trade resulted from a liquidation
diff --git a/source/includes/_changelog.md b/source/includes/_changelog.md index 77a8f02f..383afed3 100644 --- a/source/includes/_changelog.md +++ b/source/includes/_changelog.md @@ -1,5 +1,10 @@ # Change Log +## 2026-06-01 +- Updated all messages to reflect the changes included in the chain version v1.20.0, and the Indexer for that chain version +- Python SDK v1.15.0 +- Go SDK v1.62.0 + ## 2026-04-28 - Updated all messages to reflect the changes included in the chain version v1.19.0, and the Indexer for that chain version - Python SDK v1.14.0 @@ -97,4 +102,4 @@ - Changed the cookies management logic. All cookies management is done now by Network ## 2023-08-28 -- Added IP rate limits documentation \ No newline at end of file +- Added IP rate limits documentation diff --git a/source/includes/_derivatives.md b/source/includes/_derivatives.md index 37e7fc78..ac84f533 100644 --- a/source/includes/_derivatives.md +++ b/source/includes/_derivatives.md @@ -1338,7 +1338,8 @@ func main() { reduce_margin_ratioLegacyDecreduce_margin_ratio defines the ratio of the margin that is reduced open_notional_capOpenNotionalCapopen_notional_cap defines the maximum open notional for the market has_disabled_minimal_protocol_feeboolhas_disabled_minimal_protocol_fee indicates whether the minimal protocol fee is disabled for the market -force_paused_infoForcePausedInfoforce_paused_info defines additional info for force paused markets, only set when status == ForcePaused +force_paused_infoForcePausedInfoforce_paused_info defines additional info for force paused markets, only set when status == ForcePaused +cross_margin_eligibleboolcross_margin_eligible marks the market as eligible for cross-margin pool participation. Default false means markets are ineligible until explicitly enabled at launch or toggled via governance proposal.
@@ -1359,7 +1360,9 @@ func main() { 10BandIBC 11Provider 12Stork -13ChainlinkDataStreams +13ChainlinkDataStreams +14PythPro +15SedaFast
@@ -1693,7 +1696,8 @@ func main() { reduce_margin_ratioLegacyDecreduce_margin_ratio defines the ratio of the margin that is reduced open_notional_capOpenNotionalCapopen_notional_cap defines the maximum open notional for the market has_disabled_minimal_protocol_feeboolhas_disabled_minimal_protocol_fee indicates whether the minimal protocol fee is disabled for the market -force_paused_infoForcePausedInfoforce_paused_info defines additional info for force paused markets, only set when status == ForcePaused +force_paused_infoForcePausedInfoforce_paused_info defines additional info for force paused markets, only set when status == ForcePaused +cross_margin_eligibleboolcross_margin_eligible marks the market as eligible for cross-margin pool participation. Default false means markets are ineligible until explicitly enabled at launch or toggled via governance proposal.
@@ -1714,7 +1718,9 @@ func main() { 10BandIBC 11Provider 12Stork -13ChainlinkDataStreams +13ChainlinkDataStreams +14PythPro +15SedaFast
@@ -2299,7 +2305,8 @@ func main() { ``` -
ParameterTypeDescription
statePosition
+ +
ParameterTypeDescription
statePosition
risk_modeRiskModeThe risk mode of the subaccount (ISOLATED or CROSS). For CROSS mode, the position's margin is an accounting value; actual collateral is pooled. Use CrossMarginPoolSnapshot for pool-level health.

@@ -2692,7 +2699,8 @@ func main() { ``` -
ParameterTypeDescription
statePosition
+ +
ParameterTypeDescription
statePosition
risk_modeRiskModeThe risk mode of the subaccount (ISOLATED or CROSS). For CROSS mode, the position's margin is an accounting value; actual collateral is pooled. Use CrossMarginPoolSnapshot for pool-level health.

@@ -2860,7 +2868,8 @@ func main() { ``` -
ParameterTypeDescription
stateEffectivePosition
+ +
ParameterTypeDescription
stateEffectivePosition
risk_modeRiskModeThe risk mode of the subaccount (ISOLATED or CROSS). For CROSS mode, effective_margin reflects position value but liquidation is determined at pool level. Use CrossMarginPoolSnapshot for pool health.

@@ -3556,6 +3565,7 @@ async def main() -> None: min_quantity_tick_size=Decimal("0.01"), min_notional=Decimal("1"), open_notional_cap=composer.uncapped_open_notional_cap(), + cross_margin_eligible=False, ) # broadcast the transaction @@ -3702,7 +3712,8 @@ func main() { min_quantity_tick_sizeLegacyDecmin_quantity_tick_size defines the minimum tick size of the order's quantity (in human readable format)Yes min_notionalLegacyDecmin_notional defines the minimum notional (in quote asset) required for orders in the market (in human readable format)Yes reduce_margin_ratioLegacyDecreduce_margin_ratio defines the ratio of the margin that is reducedYes -open_notional_capOpenNotionalCapopen_notional_cap defines the cap on the open notionalYes +open_notional_capOpenNotionalCapopen_notional_cap defines the cap on the open notionalYes +cross_margin_eligibleboolcross_margin_eligible marks the market as eligible for cross-marginYes
@@ -3723,7 +3734,9 @@ func main() { 10BandIBC 11Provider 12Stork -13ChainlinkDataStreams +13ChainlinkDataStreams +14PythPro +15SedaFast
@@ -3859,10 +3872,12 @@ async def main() -> None: taker_fee_rate=Decimal("0.001"), initial_margin_ratio=Decimal("0.33"), maintenance_margin_ratio=Decimal("0.095"), + reduce_margin_ratio=Decimal("3"), min_price_tick_size=Decimal("0.001"), min_quantity_tick_size=Decimal("0.01"), min_notional=Decimal("1"), open_notional_cap=composer.uncapped_open_notional_cap(), + cross_margin_eligible=False, ) # broadcast the transaction @@ -4012,7 +4027,8 @@ func main() { min_quantity_tick_sizeLegacyDecmin_quantity_tick_size defines the minimum tick size of the order's quantityYes min_notionalLegacyDecmin_notional defines the minimum notional (in quote asset) required for orders in the marketYes reduce_margin_ratioLegacyDecreduce_margin_ratio defines the ratio of the margin that is reducedYes -open_notional_capOpenNotionalCapopen_notional_cap defines the cap on the open notionalYes +open_notional_capOpenNotionalCapopen_notional_cap defines the cap on the open notionalYes +cross_margin_eligibleboolcross_margin_eligible marks the market as eligible for cross-marginYes
@@ -4033,7 +4049,9 @@ func main() { 10BandIBC 11Provider 12Stork -13ChainlinkDataStreams +13ChainlinkDataStreams +14PythPro +15SedaFast
@@ -5822,6 +5840,334 @@ func main() { +## MsgBatchLiquidatePositions + +This message is sent to the chain to liquidate more than one position with a single message. For more details about liquidation check [MsgLiquidatePosition](#chain-exchange-for-derivatives-msgliquidateposition). +The batch message always succeeds, even if all the liquidation actions it contains fail. That means that a failure in a liquidation action does not invalidate the other actions in the message. + +**IP rate limit group:** `chain` + +### Request Parameters +> Request Example: + + + +```py +import asyncio +import json +import os +import uuid +from decimal import Decimal + +import dotenv + +from pyinjective.async_client_v2 import AsyncClient +from pyinjective.core.broadcaster import MsgBroadcasterWithPk +from pyinjective.core.network import Network +from pyinjective.wallet import PrivateKey + + +async def main() -> None: + dotenv.load_dotenv() + private_key_in_hexa = os.getenv("INJECTIVE_PRIVATE_KEY") + + # select network: local, testnet, mainnet + network = Network.testnet() + + # initialize grpc client + client = AsyncClient(network) + composer = await client.composer() + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + + message_broadcaster = MsgBroadcasterWithPk.new_using_gas_heuristics( + network=network, + private_key=private_key_in_hexa, + gas_price=gas_price, + client=client, + composer=composer, + ) + + priv_key = PrivateKey.from_hex(private_key_in_hexa) + pub_key = priv_key.to_public_key() + address = pub_key.to_address() + subaccount_id = address.get_subaccount_id(index=0) + + market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" + fee_recipient = "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r" + cid = str(uuid.uuid4()) + + order = composer.derivative_order( + market_id=market_id, + subaccount_id=subaccount_id, + fee_recipient=fee_recipient, + price=Decimal("39.01"), # This should be the liquidation price + quantity=Decimal("0.147"), + margin=Decimal("5.73447"), + order_type="SELL", + cid=cid, + ) + + # Build individual liquidation entries; order is optional per-entry + liquidation_with_order = composer.liquidate_position_data( + subaccount_id="0x156df4d5bc8e7dd9191433e54bd6a11eeb390921000000000000000000000000", + market_id=market_id, + order=order, + ) + liquidation_without_order = composer.liquidate_position_data( + subaccount_id="0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000000", + market_id=market_id, + ) + + # prepare tx msg + msg = composer.msg_batch_liquidate_positions( + sender=address.to_acc_bech32(), + liquidations=[liquidation_with_order, liquidation_without_order], + ) + + # broadcast the transaction + result = await message_broadcaster.broadcast([msg]) + print("---Transaction Response---") + print(json.dumps(result, indent=2)) + + gas_price = await client.current_chain_gas_price() + # adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gas_price = int(gas_price * 1.1) + message_broadcaster.update_gas_price(gas_price=gas_price) + + +if __name__ == "__main__": + asyncio.get_event_loop().run_until_complete(main()) +``` + + + + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/google/uuid" + "github.com/joho/godotenv" + "github.com/shopspring/decimal" + + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" +) + +func main() { + _ = godotenv.Load() + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint) + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + os.Getenv("INJECTIVE_PRIVATE_KEY"), // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClientV2( + clientCtx, + network, + ) + + if err != nil { + panic(err) + } + + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + gasPrice := chainClient.CurrentChainGasPrice(ctx) + // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gasPrice = int64(float64(gasPrice) * 1.1) + chainClient.SetGasPrice(gasPrice) + + defaultSubaccountID := chainClient.DefaultSubaccount(senderAddress) + + marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" + + firstOrder := chainClient.CreateDerivativeOrderV2( + defaultSubaccountID, + &chainclient.DerivativeOrderData{ + OrderType: int32(exchangev2types.OrderType_SELL), + Quantity: decimal.NewFromFloat(0.147), + Price: decimal.RequireFromString("39.01"), + Leverage: decimal.RequireFromString("1"), + FeeRecipient: senderAddress.String(), + MarketId: marketId, + Cid: uuid.NewString(), + }, + ) + + msg := &exchangev2types.MsgBatchLiquidatePositions{ + Sender: senderAddress.String(), + Liquidations: []exchangev2types.LiquidatePositionData{ + { + SubaccountId: "0x156df4d5bc8e7dd9191433e54bd6a11eeb390921000000000000000000000000", + MarketId: marketId, + Order: firstOrder, + }, + { + SubaccountId: "0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000", + MarketId: marketId, + }, + }, + } + + // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + response, err := chainClient.AsyncBroadcastMsg(ctx, msg) + + if err != nil { + panic(err) + } + + str, _ := json.MarshalIndent(response, "", "\t") + fmt.Print(string(str)) + + gasPrice = chainClient.CurrentChainGasPrice(ctx) + // adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted + gasPrice = int64(float64(gasPrice) * 1.1) + chainClient.SetGasPrice(gasPrice) +} +``` + + + + +
ParameterTypeDescriptionRequired
senderstringthe sender's Injective addressYes
liquidationsLiquidatePositionData arraythe positions to liquidateYes
+ + +
+ +**LiquidatePositionData** + + + + +
ParameterTypeDescription
subaccount_idstringthe subaccount ID the position belongs to
market_idstringthe position's market ID
orderDerivativeOrderoptional order to provide for liquidation
+ + +
+ +**DerivativeOrder** + + + + + + + +
ParameterTypeDescription
market_idstringmarket_id represents the unique ID of the market
order_infoOrderInfoorder_info contains the information of the order
order_typeOrderTypeorder types
marginLegacyDecmargin is the margin used by the limit order (in human readable format)
trigger_priceLegacyDectrigger_price is the trigger price used by stop/take orders (in human readable format) (optional)
expiration_blockint64expiration block is the block number at which the order will expire
+ + +
+ +**OrderInfo** + + + + + + +
ParameterTypeDescription
subaccount_idstringbytes32 subaccount ID that created the order
fee_recipientstringaddress fee_recipient address that will receive fees for the order
priceLegacyDecprice of the order (in human readable format)
quantityLegacyDecquantity of the order (in human readable format)
cidstringthe client order ID (optional)
+ + +
+ +**OrderType** + + + + + + + + + + + + +
CodeName
0UNSPECIFIED
1BUY
2SELL
3STOP_BUY
4STOP_SELL
5TAKE_BUY
6TAKE_SELL
7BUY_PO
8SELL_PO
9BUY_ATOMIC
10SELL_ATOMIC
+ + +### Response Parameters +> Response Example: + +``` python +``` + +```go +``` + + +
ParameterTypeDescription
tx_responseTxResponsetx_response is the queried TxResponses.
+ + +
+ +**TxResponse** + + + + + + + + + + + + + + +
ParameterTypeDescription
heightint64The block height
txhashstringThe transaction hash.
codespacestringNamespace for the Code
codeuint32Response code.
datastringResult bytes, if any.
raw_logstringThe output of the application's logger (raw string). May be non-deterministic.
logsABCIMessageLogsThe output of the application's logger (typed). May be non-deterministic.
infostringAdditional information. May be non-deterministic.
gas_wantedint64Amount of gas requested for transaction.
gas_usedint64Amount of gas consumed by transaction.
txAnyThe request transaction bytes.
timestampstringTime of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
eventsEvent arrayEvents defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
+ + +
+ +**ABCIMessageLog** + + + + +
ParameterTypeDescription
msg_indexuint32
logstring
eventsStringEventsEvents contains a slice of Event objects that were emitted during some execution.
+ + + ## MsgIncreasePositionMargin **IP rate limit group:** `chain` @@ -6379,6 +6725,7 @@ async def main() -> None: new_maintenance_margin_ratio=Decimal("0.085"), new_reduce_margin_ratio=Decimal("3.5"), new_open_notional_cap=composer.uncapped_open_notional_cap(), + cross_margin_eligibility=composer.CROSS_MARGIN_ELIGIBILITY.CM_ELIGIBILITY_INELIGIBLE, ) # broadcast the transaction @@ -6519,7 +6866,8 @@ func main() { new_initial_margin_ratioLegacyDec(optional) updated value for initial_margin_ratioNo new_maintenance_margin_ratioLegacyDec(optional) updated value for maintenance_margin_ratioNo new_reduce_margin_ratioLegacyDec(optional) updated value for reduce_margin_ratioNo -new_open_notional_capOpenNotionalCap(optional) updated value for open_notional_capNo +new_open_notional_capOpenNotionalCap(optional) updated value for open_notional_capNo +cross_margin_eligibilityCrossMarginEligibility(optional) tri-state toggle for cross-margin eligibility. Direct message updates are exchange-admin-only and may set either ELIGIBLE or INELIGIBLE. UNSPECIFIED is a no-op (preserves current value).No
diff --git a/source/includes/_derivativesrpc.md b/source/includes/_derivativesrpc.md index c8504d80..583bad96 100644 --- a/source/includes/_derivativesrpc.md +++ b/source/includes/_derivativesrpc.md @@ -2747,7 +2747,8 @@ func main() { -
ParameterTypeDescription
positionDerivativePositionV2Updated derivative Position
timestampint64Operation timestamp in UNIX millis.
+timestampint64Operation timestamp in UNIX millis. +operation_typestringPosition update type
@@ -4169,7 +4170,8 @@ func main() { placed_order_hashstringOrderHash of order that is triggered by this conditional order execution_typestringExecution type of conditional order tx_hashstringTransaction Hash where order is created. Not all orders have this field -cidstringCustom client order ID +cidstringCustom client order ID +account_addressstringAccount address that owns the subaccount which placed this order
diff --git a/source/includes/_errors.md b/source/includes/_errors.md index a318db4d..e67fc7b0 100644 --- a/source/includes/_errors.md +++ b/source/includes/_errors.md @@ -323,7 +323,7 @@ This section lists all error codes from various modules in the Injective ecosyst exchange62already opted out of rewards exchange63invalid margin ratio exchange64provided funds are below minimum -exchange65position is below initial margin requirement +exchange65position margin is below the required threshold exchange66pool has non-positive total lp token supply exchange67passed lp token burn amount is greater than total lp token supply exchange68unsupported action @@ -371,7 +371,9 @@ This section lists all error codes from various modules in the Injective ecosyst exchange110offsetting subaccount IDs cannot be empty exchange111invalid open notional cap exchange112open notional cap breached -exchange113no valid offsetting positions found +exchange113no valid offsetting positions found +exchange114targeted market is not the canonical liquidation target +exchange115message type is deprecated ## Feegrant module @@ -432,14 +434,6 @@ This section lists all error codes from various modules in the Injective ecosyst host4invalid packet -## Hyperlane module - - - - -
module_nameerror_codedescription
hyperlane1no receiver ISM
hyperlane2required hook not set
hyperlane3default hook not set
- - ## Ibc module @@ -482,7 +476,8 @@ This section lists all error codes from various modules in the Injective ecosyst ## Injective module -
module_nameerror_codedescription
injective3invalid chain ID
+ +
module_nameerror_codedescription
injective3invalid chain ID
injective4invalid ethereum signature
## Insurance module @@ -525,22 +520,6 @@ This section lists all error codes from various modules in the Injective ecosyst interchainaccounts19invalid account reopening -## Ism module - - - - - - - - - - - - -
module_nameerror_codedescription
ism1unexpected error
ism2invalid multisig configuration
ism3invalid announce
ism4mailbox does not exist
ism5invalid signature
ism6invalid ism type
ism7unknown ism id
ism8no route found
ism9unauthorized
ism10invalid owner
ism11route for domain already exists
- - ## Oracle module @@ -588,7 +567,15 @@ This section lists all error codes from various modules in the Injective ecosyst oracle42invalid stork signature oracle43stork asset id not unique oracle44chainlink report verification failed -oracle45Band oracle is deprecated and no longer supported +oracle45Band oracle is deprecated and no longer supported +oracle46stork asset id is empty +oracle47pyth pro update verification failed +oracle48seda fast oracle disabled: public key not configured +oracle49seda fast payload malformed +oracle50seda fast signature verification failed +oracle51seda fast exec program id not in allowlist +oracle52seda fast execution failed (non-zero exit code or no consensus) +oracle53seda fast result parser failed ## Params module @@ -655,16 +642,6 @@ This section lists all error codes from various modules in the Injective ecosyst port5route not found -## Post_dispatch module - - - - - - -
module_nameerror_codedescription
post_dispatch1mailbox does not exist
post_dispatch2sender is not designated mailbox
post_dispatch3hook does not exist or isn't registered
post_dispatch4unauthorized
post_dispatch5invalid owner
- - ## Sdk module @@ -861,11 +838,14 @@ This section lists all error codes from various modules in the Injective ecosyst
module_nameerror_codedescription
vouchers1voucher not found
-## Warp module +## Wasm-hooks module - - -
module_nameerror_codedescription
warp1not enough collateral
warp2token not found
+ + + + + +
module_nameerror_codedescription
wasm-hooks3cannot marshal the ICS20 packet
wasm-hooks4invalid packet data
wasm-hooks5cannot create response
wasm-hooks6wasm error
wasm-hooks7bad sender
## Wasm module @@ -898,16 +878,6 @@ This section lists all error codes from various modules in the Injective ecosyst wasm30max call depth exceeded -## Wasm-hooks module - - - - - - -
module_nameerror_codedescription
wasm-hooks3cannot marshal the ICS20 packet
wasm-hooks4invalid packet data
wasm-hooks5cannot create response
wasm-hooks6wasm error
wasm-hooks7bad sender
- - ## Xwasm module diff --git a/source/includes/_insurance.md b/source/includes/_insurance.md index 93194d80..fc7f9ca1 100644 --- a/source/includes/_insurance.md +++ b/source/includes/_insurance.md @@ -392,7 +392,9 @@ if __name__ == "__main__": 10BandIBC 11Provider 12Stork -13ChainlinkDataStreams +13ChainlinkDataStreams +14PythPro +15SedaFast diff --git a/source/json_tables/errors/exchange_errors.json b/source/json_tables/errors/exchange_errors.json index db8f7e41..907313b2 100644 --- a/source/json_tables/errors/exchange_errors.json +++ b/source/json_tables/errors/exchange_errors.json @@ -317,7 +317,7 @@ { "module_name": "exchange", "error_code": 65, - "description": "position is below initial margin requirement" + "description": "position margin is below the required threshold" }, { "module_name": "exchange", @@ -558,5 +558,15 @@ "module_name": "exchange", "error_code": 113, "description": "no valid offsetting positions found" + }, + { + "module_name": "exchange", + "error_code": 114, + "description": "targeted market is not the canonical liquidation target" + }, + { + "module_name": "exchange", + "error_code": 115, + "description": "message type is deprecated" } ] diff --git a/source/json_tables/errors/hyperlane_errors.json b/source/json_tables/errors/hyperlane_errors.json deleted file mode 100644 index df99ac34..00000000 --- a/source/json_tables/errors/hyperlane_errors.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "module_name": "hyperlane", - "error_code": 1, - "description": "no receiver ISM" - }, - { - "module_name": "hyperlane", - "error_code": 2, - "description": "required hook not set" - }, - { - "module_name": "hyperlane", - "error_code": 3, - "description": "default hook not set" - } -] diff --git a/source/json_tables/errors/injective_errors.json b/source/json_tables/errors/injective_errors.json index d7f210ff..d1409334 100644 --- a/source/json_tables/errors/injective_errors.json +++ b/source/json_tables/errors/injective_errors.json @@ -3,5 +3,10 @@ "module_name": "injective", "error_code": 3, "description": "invalid chain ID" + }, + { + "module_name": "injective", + "error_code": 4, + "description": "invalid ethereum signature" } ] diff --git a/source/json_tables/errors/ism_errors.json b/source/json_tables/errors/ism_errors.json deleted file mode 100644 index 9eeeb2f7..00000000 --- a/source/json_tables/errors/ism_errors.json +++ /dev/null @@ -1,57 +0,0 @@ -[ - { - "module_name": "ism", - "error_code": 1, - "description": "unexpected error" - }, - { - "module_name": "ism", - "error_code": 2, - "description": "invalid multisig configuration" - }, - { - "module_name": "ism", - "error_code": 3, - "description": "invalid announce" - }, - { - "module_name": "ism", - "error_code": 4, - "description": "mailbox does not exist" - }, - { - "module_name": "ism", - "error_code": 5, - "description": "invalid signature" - }, - { - "module_name": "ism", - "error_code": 6, - "description": "invalid ism type" - }, - { - "module_name": "ism", - "error_code": 7, - "description": "unknown ism id" - }, - { - "module_name": "ism", - "error_code": 8, - "description": "no route found" - }, - { - "module_name": "ism", - "error_code": 9, - "description": "unauthorized" - }, - { - "module_name": "ism", - "error_code": 10, - "description": "invalid owner" - }, - { - "module_name": "ism", - "error_code": 11, - "description": "route for domain already exists" - } -] diff --git a/source/json_tables/errors/oracle_errors.json b/source/json_tables/errors/oracle_errors.json index 93683f19..056b8693 100644 --- a/source/json_tables/errors/oracle_errors.json +++ b/source/json_tables/errors/oracle_errors.json @@ -223,5 +223,45 @@ "module_name": "oracle", "error_code": 45, "description": "Band oracle is deprecated and no longer supported" + }, + { + "module_name": "oracle", + "error_code": 46, + "description": "stork asset id is empty" + }, + { + "module_name": "oracle", + "error_code": 47, + "description": "pyth pro update verification failed" + }, + { + "module_name": "oracle", + "error_code": 48, + "description": "seda fast oracle disabled: public key not configured" + }, + { + "module_name": "oracle", + "error_code": 49, + "description": "seda fast payload malformed" + }, + { + "module_name": "oracle", + "error_code": 50, + "description": "seda fast signature verification failed" + }, + { + "module_name": "oracle", + "error_code": 51, + "description": "seda fast exec program id not in allowlist" + }, + { + "module_name": "oracle", + "error_code": 52, + "description": "seda fast execution failed (non-zero exit code or no consensus)" + }, + { + "module_name": "oracle", + "error_code": 53, + "description": "seda fast result parser failed" } ] diff --git a/source/json_tables/errors/post_dispatch_errors.json b/source/json_tables/errors/post_dispatch_errors.json deleted file mode 100644 index 7fa5e593..00000000 --- a/source/json_tables/errors/post_dispatch_errors.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "module_name": "post_dispatch", - "error_code": 1, - "description": "mailbox does not exist" - }, - { - "module_name": "post_dispatch", - "error_code": 2, - "description": "sender is not designated mailbox" - }, - { - "module_name": "post_dispatch", - "error_code": 3, - "description": "hook does not exist or isn't registered" - }, - { - "module_name": "post_dispatch", - "error_code": 4, - "description": "unauthorized" - }, - { - "module_name": "post_dispatch", - "error_code": 5, - "description": "invalid owner" - } -] diff --git a/source/json_tables/errors/warp_errors.json b/source/json_tables/errors/warp_errors.json deleted file mode 100644 index 5cc340dd..00000000 --- a/source/json_tables/errors/warp_errors.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "module_name": "warp", - "error_code": 1, - "description": "not enough collateral" - }, - { - "module_name": "warp", - "error_code": 2, - "description": "token not found" - } -] diff --git a/source/json_tables/indexer/event_provider_api/StreamABCIEventsRequest.json b/source/json_tables/indexer/event_provider_api/StreamABCIEventsRequest.json new file mode 100644 index 00000000..fe20abd0 --- /dev/null +++ b/source/json_tables/indexer/event_provider_api/StreamABCIEventsRequest.json @@ -0,0 +1,26 @@ +[ + { + "Parameter": "height", + "Type": "int32", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "event_types", + "Type": "string array", + "Description": "Array of event types", + "Required": "Yes" + }, + { + "Parameter": "batch_size", + "Type": "uint32", + "Description": "Number of blocks to include in each stream response. The service will have a cap on the batch size, and default to it if it's greater. Once the stream is in sync, the batch size", + "Required": "Yes" + }, + { + "Parameter": "fetchers", + "Type": "uint32", + "Description": "Number of parallel fetchers. The service will have a cap on the number of fetchers, and default to it. The service may chose to throttle the fetchers based on the current load.", + "Required": "Yes" + } +] diff --git a/source/json_tables/indexer/event_provider_api/StreamABCIEventsResponse.json b/source/json_tables/indexer/event_provider_api/StreamABCIEventsResponse.json new file mode 100644 index 00000000..3d56d094 --- /dev/null +++ b/source/json_tables/indexer/event_provider_api/StreamABCIEventsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "blocks", + "Type": "StreamedRawBlock array", + "Description": "" + } +] diff --git a/source/json_tables/indexer/event_provider_api/StreamedRawBlock.json b/source/json_tables/indexer/event_provider_api/StreamedRawBlock.json new file mode 100644 index 00000000..f45e9293 --- /dev/null +++ b/source/json_tables/indexer/event_provider_api/StreamedRawBlock.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "in_sync", + "Type": "bool", + "Description": "Indicates whether the block is the latest one available in the event provider" + }, + { + "Parameter": "height", + "Type": "int64", + "Description": "" + }, + { + "Parameter": "block_time", + "Type": "string", + "Description": "" + }, + { + "Parameter": "block_timestamp", + "Type": "int64", + "Description": "Block timestamp in UNIX millis." + }, + { + "Parameter": "txs_results", + "Type": "ABCIResponseDeliverTx array", + "Description": "" + }, + { + "Parameter": "begin_block_events", + "Type": "ABCIEvent array", + "Description": "" + }, + { + "Parameter": "end_block_events", + "Type": "ABCIEvent array", + "Description": "" + } +] diff --git a/source/json_tables/indexer/injective_accounts_rpc/DerivativeLimitOrder.json b/source/json_tables/indexer/injective_accounts_rpc/DerivativeLimitOrder.json index b826fa10..c6365ad1 100644 --- a/source/json_tables/indexer/injective_accounts_rpc/DerivativeLimitOrder.json +++ b/source/json_tables/indexer/injective_accounts_rpc/DerivativeLimitOrder.json @@ -108,5 +108,10 @@ "Parameter": "cid", "Type": "string", "Description": "Custom client order ID" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address that owns the subaccount which placed this order" } ] diff --git a/source/json_tables/indexer/injective_chart_rpc/DerivativeMarketHistoryRequest.json b/source/json_tables/indexer/injective_chart_rpc/DerivativeMarketHistoryRequest.json index 4ec3ccf5..e68050ae 100644 --- a/source/json_tables/indexer/injective_chart_rpc/DerivativeMarketHistoryRequest.json +++ b/source/json_tables/indexer/injective_chart_rpc/DerivativeMarketHistoryRequest.json @@ -40,5 +40,11 @@ "Type": "bool", "Description": "Use oracle prices as fallback for missing derivative candles.", "Required": "Yes" + }, + { + "Parameter": "fill_gaps", + "Type": "bool", + "Description": "When true, fills gaps in derivative candles using oracle/mark prices anchored to neighboring real trade candles.", + "Required": "Yes" } ] diff --git a/source/json_tables/indexer/injective_chart_rpc/SpotMarketHistoryRequest.json b/source/json_tables/indexer/injective_chart_rpc/SpotMarketHistoryRequest.json index 886e3099..6fb63537 100644 --- a/source/json_tables/indexer/injective_chart_rpc/SpotMarketHistoryRequest.json +++ b/source/json_tables/indexer/injective_chart_rpc/SpotMarketHistoryRequest.json @@ -34,5 +34,11 @@ "Type": "int32", "Description": "Number of bars (higher priority than from) starting with to. If countback is set, from should be ignored.", "Required": "Yes" + }, + { + "Parameter": "fill_gaps", + "Type": "bool", + "Description": "When true, snaps consecutive candles together so each open equals the previous close.", + "Required": "Yes" } ] diff --git a/source/json_tables/indexer/injective_derivative_exchange_rpc/DerivativeLimitOrder.json b/source/json_tables/indexer/injective_derivative_exchange_rpc/DerivativeLimitOrder.json index b826fa10..c6365ad1 100644 --- a/source/json_tables/indexer/injective_derivative_exchange_rpc/DerivativeLimitOrder.json +++ b/source/json_tables/indexer/injective_derivative_exchange_rpc/DerivativeLimitOrder.json @@ -108,5 +108,10 @@ "Parameter": "cid", "Type": "string", "Description": "Custom client order ID" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address that owns the subaccount which placed this order" } ] diff --git a/source/json_tables/indexer/injective_derivative_exchange_rpc/StreamPositionsV2Response.json b/source/json_tables/indexer/injective_derivative_exchange_rpc/StreamPositionsV2Response.json index 7593bc91..2c45c163 100644 --- a/source/json_tables/indexer/injective_derivative_exchange_rpc/StreamPositionsV2Response.json +++ b/source/json_tables/indexer/injective_derivative_exchange_rpc/StreamPositionsV2Response.json @@ -8,5 +8,10 @@ "Parameter": "timestamp", "Type": "int64", "Description": "Operation timestamp in UNIX millis." + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Position update type" } ] diff --git a/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareAutoSignResponse.json b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareAutoSignResponse.json index 60fc9f17..85b8e0a9 100644 --- a/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareAutoSignResponse.json +++ b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareAutoSignResponse.json @@ -63,5 +63,10 @@ "Parameter": "quotes_wait_ms", "Type": "uint64", "Description": "Actual milliseconds elapsed waiting for quotes; use as quotes_wait_time_ms hint in next request" + }, + { + "Parameter": "expired_quotes_count", + "Type": "uint64", + "Description": "Number of quotes that expired after being received and were excluded from selection" } ] diff --git a/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareEip712AutoSignRequest.json b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareEip712AutoSignRequest.json new file mode 100644 index 00000000..454662e1 --- /dev/null +++ b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareEip712AutoSignRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "request", + "Type": "RFQGwPrepareEip712AutoSignRequestType", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareEip712AutoSignResponse.json b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareEip712AutoSignResponse.json new file mode 100644 index 00000000..8d343ea8 --- /dev/null +++ b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareEip712AutoSignResponse.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "rfq_id", + "Type": "uint64", + "Description": "Generated RFQ ID" + }, + { + "Parameter": "data", + "Type": "string", + "Description": "EIP712-compatible JSON containing MsgExec wrapper, signable with eth_signTypedData_v4" + }, + { + "Parameter": "fee_payer_sig", + "Type": "string", + "Description": "Hex-encoded fee payer signature over the EIP712 hash" + }, + { + "Parameter": "fee_payer", + "Type": "string", + "Description": "Fee payer address" + }, + { + "Parameter": "sign_mode", + "Type": "string", + "Description": "SIGN_MODE_EIP712_V2 or SIGN_MODE_LEGACY_AMINO_JSON" + }, + { + "Parameter": "pub_key_type", + "Type": "string", + "Description": "Fee payer public key type" + }, + { + "Parameter": "fee_payer_pub_key", + "Type": "CosmosPubKey", + "Description": "Fee payer public key" + }, + { + "Parameter": "quotes", + "Type": "RFQGwPrepareQuoteResult array", + "Description": "Selected quotes in execution order" + }, + { + "Parameter": "autosign_account_number", + "Type": "uint64", + "Description": "Autosign (ephemeral) account number" + }, + { + "Parameter": "autosign_account_sequence", + "Type": "uint64", + "Description": "Autosign (ephemeral) account sequence" + }, + { + "Parameter": "quotes_wait_ms", + "Type": "uint64", + "Description": "Actual milliseconds elapsed waiting for quotes; use as quotes_wait_time_ms hint in next request" + }, + { + "Parameter": "expired_quotes_count", + "Type": "uint64", + "Description": "Number of quotes that expired after being received and were excluded from selection" + } +] diff --git a/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareEip712Request.json b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareEip712Request.json new file mode 100644 index 00000000..42ef279a --- /dev/null +++ b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareEip712Request.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "request", + "Type": "RFQGwPrepareEip712RequestType", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareEip712Response.json b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareEip712Response.json new file mode 100644 index 00000000..1d536998 --- /dev/null +++ b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareEip712Response.json @@ -0,0 +1,62 @@ +[ + { + "Parameter": "rfq_id", + "Type": "uint64", + "Description": "Generated RFQ ID" + }, + { + "Parameter": "data", + "Type": "string", + "Description": "EIP712-compatible JSON, signable with eth_signTypedData_v4" + }, + { + "Parameter": "fee_payer_sig", + "Type": "string", + "Description": "Hex-encoded fee payer signature over the EIP712 hash" + }, + { + "Parameter": "fee_payer", + "Type": "string", + "Description": "Fee payer address" + }, + { + "Parameter": "sign_mode", + "Type": "string", + "Description": "SIGN_MODE_EIP712_V2 or SIGN_MODE_LEGACY_AMINO_JSON" + }, + { + "Parameter": "pub_key_type", + "Type": "string", + "Description": "Fee payer public key type" + }, + { + "Parameter": "fee_payer_pub_key", + "Type": "CosmosPubKey", + "Description": "Fee payer public key" + }, + { + "Parameter": "quotes", + "Type": "RFQGwPrepareQuoteResult array", + "Description": "Selected quotes in execution order" + }, + { + "Parameter": "taker_account_number", + "Type": "uint64", + "Description": "Taker Cosmos account number" + }, + { + "Parameter": "taker_account_sequence", + "Type": "uint64", + "Description": "Taker Cosmos account sequence" + }, + { + "Parameter": "quotes_wait_ms", + "Type": "uint64", + "Description": "Actual milliseconds elapsed waiting for quotes; use as quotes_wait_time_ms hint in next request" + }, + { + "Parameter": "expired_quotes_count", + "Type": "uint64", + "Description": "Number of quotes that expired after being received and were excluded from selection" + } +] diff --git a/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareRequest.json b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareRequest.json new file mode 100644 index 00000000..d209afe7 --- /dev/null +++ b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "request", + "Type": "RFQGwPrepareRequestType", + "Description": "", + "Required": "No" + } +] diff --git a/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareResponse.json b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareResponse.json new file mode 100644 index 00000000..5d997337 --- /dev/null +++ b/source/json_tables/indexer/injective_rfq_gw_rpc/PrepareResponse.json @@ -0,0 +1,72 @@ +[ + { + "Parameter": "rfq_id", + "Type": "uint64", + "Description": "Generated RFQ ID" + }, + { + "Parameter": "tx", + "Type": "byte array", + "Description": "Fee-delegated prepared transaction bytes" + }, + { + "Parameter": "fee_payer_sig", + "Type": "string", + "Description": "Hex-encoded fee payer signature" + }, + { + "Parameter": "fee_payer", + "Type": "string", + "Description": "Fee payer address" + }, + { + "Parameter": "sign_mode", + "Type": "string", + "Description": "Sign mode (SIGN_MODE_DIRECT)" + }, + { + "Parameter": "pub_key_type", + "Type": "string", + "Description": "Fee payer public key type" + }, + { + "Parameter": "fee_payer_pub_key", + "Type": "CosmosPubKey", + "Description": "Fee payer public key" + }, + { + "Parameter": "quotes", + "Type": "RFQGwPrepareQuoteResult array", + "Description": "Selected quotes in execution order" + }, + { + "Parameter": "taker_account_number", + "Type": "uint64", + "Description": "Taker Cosmos account number" + }, + { + "Parameter": "taker_account_sequence", + "Type": "uint64", + "Description": "Taker Cosmos account sequence" + }, + { + "Parameter": "fee_payer_account_number", + "Type": "uint64", + "Description": "Fee payer Cosmos account number" + }, + { + "Parameter": "fee_payer_account_sequence", + "Type": "uint64", + "Description": "Fee payer Cosmos account sequence" + }, + { + "Parameter": "quotes_wait_ms", + "Type": "uint64", + "Description": "Actual milliseconds elapsed waiting for quotes; use as quotes_wait_time_ms hint in next request" + }, + { + "Parameter": "expired_quotes_count", + "Type": "uint64", + "Description": "Number of quotes that expired after being received and were excluded from selection" + } +] diff --git a/source/json_tables/indexer/injective_rfq_gw_rpc/RFQGwPrepareEip712AutoSignRequestType.json b/source/json_tables/indexer/injective_rfq_gw_rpc/RFQGwPrepareEip712AutoSignRequestType.json new file mode 100644 index 00000000..d4b720ab --- /dev/null +++ b/source/json_tables/indexer/injective_rfq_gw_rpc/RFQGwPrepareEip712AutoSignRequestType.json @@ -0,0 +1,107 @@ +[ + { + "Parameter": "client_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "" + }, + { + "Parameter": "margin", + "Type": "string", + "Description": "" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "" + }, + { + "Parameter": "worst_price", + "Type": "string", + "Description": "" + }, + { + "Parameter": "autosign_address", + "Type": "string", + "Description": "Ephemeral autosign address (MsgExec grantee) that signs the EIP712 typed data" + }, + { + "Parameter": "expiry", + "Type": "uint64", + "Description": "RFQ request expiry in milliseconds. 0 = no expiry" + }, + { + "Parameter": "autosign_pub_key", + "Type": "string", + "Description": "Hex-encoded autosign ephemeral public key" + }, + { + "Parameter": "autosign_account_number", + "Type": "uint64", + "Description": "Autosign (ephemeral) Cosmos account number" + }, + { + "Parameter": "autosign_account_sequence", + "Type": "uint64", + "Description": "Autosign (ephemeral) Cosmos account sequence (nonce)" + }, + { + "Parameter": "fee_payer_account_number", + "Type": "uint64", + "Description": "Fee payer Cosmos account number" + }, + { + "Parameter": "fee_payer_account_sequence", + "Type": "uint64", + "Description": "Fee payer Cosmos account sequence (nonce)" + }, + { + "Parameter": "quotes_wait_time_ms", + "Type": "uint64", + "Description": "How long to wait for quotes (max 5000ms)" + }, + { + "Parameter": "unfilled_action", + "Type": "RFQSettlementUnfilledActionType", + "Description": "Action for quantity not filled by the selected quotes. Set `limit` to place a limit order at the given price, `market` to sweep the remainder as a market order. Omit to settle only the quoted amount." + }, + { + "Parameter": "subaccount_nonce", + "Type": "uint32", + "Description": "Taker subaccount nonce at settlement time. Prevents replay when submitting multiple RFQs in the same block. Defaults to 0 (contract reads the on-chain nonce)." + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID echoed through to the on-chain trade event. Used to correlate a trade event back to the originating UI order. Not used server-side." + }, + { + "Parameter": "taker_address", + "Type": "string", + "Description": "Real taker address (authz granter); used as MsgExecuteContractCompat sender" + }, + { + "Parameter": "eth_chain_id", + "Type": "uint64", + "Description": "EVM chain ID used in the EIP712 domain separator (e.g. 1 for Injective mainnet)" + }, + { + "Parameter": "eip712_wrapper", + "Type": "string", + "Description": "EIP712 wrapper version: 'v2' uses WrapTxToEIP712V2, 'v1' uses legacy amino JSON" + }, + { + "Parameter": "gas", + "Type": "uint64", + "Description": "Optional gas limit override" + } +] diff --git a/source/json_tables/indexer/injective_rfq_gw_rpc/RFQGwPrepareEip712RequestType.json b/source/json_tables/indexer/injective_rfq_gw_rpc/RFQGwPrepareEip712RequestType.json new file mode 100644 index 00000000..3efad093 --- /dev/null +++ b/source/json_tables/indexer/injective_rfq_gw_rpc/RFQGwPrepareEip712RequestType.json @@ -0,0 +1,102 @@ +[ + { + "Parameter": "client_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "" + }, + { + "Parameter": "margin", + "Type": "string", + "Description": "" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "" + }, + { + "Parameter": "worst_price", + "Type": "string", + "Description": "" + }, + { + "Parameter": "taker_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "expiry", + "Type": "uint64", + "Description": "RFQ request expiry in milliseconds. 0 = no expiry" + }, + { + "Parameter": "taker_pub_key", + "Type": "string", + "Description": "Hex-encoded taker public key" + }, + { + "Parameter": "taker_account_number", + "Type": "uint64", + "Description": "Taker Cosmos account number" + }, + { + "Parameter": "taker_account_sequence", + "Type": "uint64", + "Description": "Taker Cosmos account sequence (nonce)" + }, + { + "Parameter": "fee_payer_account_number", + "Type": "uint64", + "Description": "Fee payer Cosmos account number" + }, + { + "Parameter": "fee_payer_account_sequence", + "Type": "uint64", + "Description": "Fee payer Cosmos account sequence (nonce)" + }, + { + "Parameter": "quotes_wait_time_ms", + "Type": "uint64", + "Description": "How long to wait for quotes (max 5000ms)" + }, + { + "Parameter": "unfilled_action", + "Type": "RFQSettlementUnfilledActionType", + "Description": "Action for quantity not filled by the selected quotes. Set `limit` to place a limit order at the given price, `market` to sweep the remainder as a market order. Omit to settle only the quoted amount." + }, + { + "Parameter": "subaccount_nonce", + "Type": "uint32", + "Description": "Taker subaccount nonce at settlement time. Prevents replay when submitting multiple RFQs in the same block. Defaults to 0 (contract reads the on-chain nonce)." + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID echoed through to the on-chain trade event. Used to correlate a trade event back to the originating UI order. Not used server-side." + }, + { + "Parameter": "eth_chain_id", + "Type": "uint64", + "Description": "EVM chain ID used in the EIP712 domain separator (e.g. 1 for Injective mainnet)" + }, + { + "Parameter": "eip712_wrapper", + "Type": "string", + "Description": "EIP712 wrapper version: 'v2' uses WrapTxToEIP712V2, 'v1' uses legacy amino JSON" + }, + { + "Parameter": "gas", + "Type": "uint64", + "Description": "Optional gas limit override" + } +] diff --git a/source/json_tables/indexer/injective_rfq_gw_rpc/RFQGwPrepareRequestType.json b/source/json_tables/indexer/injective_rfq_gw_rpc/RFQGwPrepareRequestType.json new file mode 100644 index 00000000..6031c359 --- /dev/null +++ b/source/json_tables/indexer/injective_rfq_gw_rpc/RFQGwPrepareRequestType.json @@ -0,0 +1,87 @@ +[ + { + "Parameter": "client_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "direction", + "Type": "string", + "Description": "" + }, + { + "Parameter": "margin", + "Type": "string", + "Description": "" + }, + { + "Parameter": "quantity", + "Type": "string", + "Description": "" + }, + { + "Parameter": "worst_price", + "Type": "string", + "Description": "" + }, + { + "Parameter": "taker_address", + "Type": "string", + "Description": "" + }, + { + "Parameter": "expiry", + "Type": "uint64", + "Description": "RFQ request expiry in milliseconds. 0 = no expiry" + }, + { + "Parameter": "taker_pub_key", + "Type": "string", + "Description": "Hex-encoded taker public key" + }, + { + "Parameter": "taker_account_number", + "Type": "uint64", + "Description": "Taker Cosmos account number" + }, + { + "Parameter": "taker_account_sequence", + "Type": "uint64", + "Description": "Taker Cosmos account sequence (nonce)" + }, + { + "Parameter": "fee_payer_account_number", + "Type": "uint64", + "Description": "Fee payer Cosmos account number" + }, + { + "Parameter": "fee_payer_account_sequence", + "Type": "uint64", + "Description": "Fee payer Cosmos account sequence (nonce)" + }, + { + "Parameter": "quotes_wait_time_ms", + "Type": "uint64", + "Description": "How long to wait for quotes (max 5000ms)" + }, + { + "Parameter": "unfilled_action", + "Type": "RFQSettlementUnfilledActionType", + "Description": "Action for quantity not filled by the selected quotes. Set `limit` to place a limit order at the given price, `market` to sweep the remainder as a market order. Omit to settle only the quoted amount." + }, + { + "Parameter": "subaccount_nonce", + "Type": "uint32", + "Description": "Taker subaccount nonce at settlement time. Prevents replay when submitting multiple RFQs in the same block. Defaults to 0 (contract reads the on-chain nonce)." + }, + { + "Parameter": "cid", + "Type": "string", + "Description": "Client order ID echoed through to the on-chain trade event. Used to correlate a trade event back to the originating UI order. Not used server-side." + } +] diff --git a/source/json_tables/indexer/injective_rfq_rpc/ConditionalOrderInput.json b/source/json_tables/indexer/injective_rfq_rpc/ConditionalOrderInput.json index 6753149e..c5a63b4c 100644 --- a/source/json_tables/indexer/injective_rfq_rpc/ConditionalOrderInput.json +++ b/source/json_tables/indexer/injective_rfq_rpc/ConditionalOrderInput.json @@ -98,5 +98,10 @@ "Parameter": "allowed_relayer", "Type": "string", "Description": "Optional relayer restriction" + }, + { + "Parameter": "taker_nonce_time_window_ms", + "Type": "uint64", + "Description": "Replay protection nonce time window in milliseconds" } ] diff --git a/source/json_tables/indexer/injective_rfq_rpc/ConditionalOrderResponseType.json b/source/json_tables/indexer/injective_rfq_rpc/ConditionalOrderResponseType.json index b5ef2d18..4b4fd263 100644 --- a/source/json_tables/indexer/injective_rfq_rpc/ConditionalOrderResponseType.json +++ b/source/json_tables/indexer/injective_rfq_rpc/ConditionalOrderResponseType.json @@ -77,6 +77,31 @@ { "Parameter": "error", "Type": "string", - "Description": "Last error message, if any" + "Description": "Deprecated: use 'errors' instead. Last error message, if any." + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Settlement transaction hash, if any" + }, + { + "Parameter": "terminal_at", + "Type": "int64", + "Description": "Terminal timestamp in milliseconds (set when the order reaches a terminal status: completed, failed, or cancelled)" + }, + { + "Parameter": "evm_chain_id", + "Type": "uint64", + "Description": "EVM chain ID embedded in the EIP-712 domain at signing time. Zero for v1 (raw JSON) orders." + }, + { + "Parameter": "taker_nonce_time_window_ms", + "Type": "uint64", + "Description": "Replay protection nonce time window in milliseconds" + }, + { + "Parameter": "errors", + "Type": "string array", + "Description": "All error messages accumulated across execution attempts (most recent last)" } ] diff --git a/source/json_tables/indexer/injective_rfq_rpc/CreateConditionalOrderRequest.json b/source/json_tables/indexer/injective_rfq_rpc/CreateConditionalOrderRequest.json index 87bcb42a..72e30e98 100644 --- a/source/json_tables/indexer/injective_rfq_rpc/CreateConditionalOrderRequest.json +++ b/source/json_tables/indexer/injective_rfq_rpc/CreateConditionalOrderRequest.json @@ -10,5 +10,17 @@ "Type": "string", "Description": "Hex-encoded 65-byte ECDSA recoverable signature (r‖s‖v). To produce: build the canonical JSON object with these fields in exact order, no omitted keys, null for absent values: version (uint8) — protocol version chain_id (string) — e.g. \"injective-1\" contract_address (string) — RFQ contract bech32 address taker (string) — taker bech32 address epoch (uint64) — taker's current epoch rfq_id (uint64) — unique order ID market_id (string) — derivative market ID hex subaccount_nonce (uint32) — taker subaccount index lane_version (uint64) — lane version for replay protection deadline_ms (uint64) — expiry timestamp in milliseconds direction (string) — \"long\" or \"short\" quantity (string) — FPDecimal e.g. \"1\", \"4.9\" margin (string) — collateral amount as FPDecimal worst_price (string) — FPDecimal worst acceptable price min_total_fill_quantity (string) — FPDecimal minimum fill trigger (enum) — {\"mark_price_gte\":\"\"} or {\"mark_price_lte\":\"\"} unfilled_action (null) — always null in v1 cid (*string) — optional client ID, or null allowed_relayer (*string) — optional relayer address, or null Then: signature = secp256k1_sign(Keccak256(canonical_json), taker_private_key)", "Required": "No" + }, + { + "Parameter": "sign_mode", + "Type": "string", + "Description": "Signature scheme used for the conditional order: \"v1\" (raw JSON keccak256) or \"v2\" (EIP-712). Defaults to \"v1\" when omitted, for backward compatibility with pre-EIP-712 clients.", + "Required": "Yes" + }, + { + "Parameter": "evm_chain_id", + "Type": "uint64", + "Description": "EVM chain ID embedded in the EIP-712 domain. Required when sign_mode is \"v2\"; ignored otherwise. Must match one of the indexer's configured chain IDs.", + "Required": "Yes" } ] diff --git a/source/json_tables/indexer/injective_rfq_rpc/MakerAuth.json b/source/json_tables/indexer/injective_rfq_rpc/MakerAuth.json new file mode 100644 index 00000000..caaca9a1 --- /dev/null +++ b/source/json_tables/indexer/injective_rfq_rpc/MakerAuth.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "evm_chain_id", + "Type": "uint64", + "Description": "EVM chain ID used in the EIP-712 domain" + }, + { + "Parameter": "signature", + "Type": "string", + "Description": "EIP-712 signature over the StreamAuthChallenge typed data" + } +] diff --git a/source/json_tables/indexer/injective_rfq_rpc/MakerChallenge.json b/source/json_tables/indexer/injective_rfq_rpc/MakerChallenge.json new file mode 100644 index 00000000..eea163c7 --- /dev/null +++ b/source/json_tables/indexer/injective_rfq_rpc/MakerChallenge.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "nonce", + "Type": "string", + "Description": "Hex-encoded 32-byte nonce" + }, + { + "Parameter": "evm_chain_id", + "Type": "uint64", + "Description": "EVM chain ID to use when signing the challenge with EIP-712 v2" + }, + { + "Parameter": "expires_at", + "Type": "int64", + "Description": "Unix milliseconds after which the challenge is no longer accepted" + } +] diff --git a/source/json_tables/indexer/injective_rfq_rpc/MakerStreamResponse.json b/source/json_tables/indexer/injective_rfq_rpc/MakerStreamResponse.json index 58f6b332..3397385e 100644 --- a/source/json_tables/indexer/injective_rfq_rpc/MakerStreamResponse.json +++ b/source/json_tables/indexer/injective_rfq_rpc/MakerStreamResponse.json @@ -2,7 +2,7 @@ { "Parameter": "message_type", "Type": "string", - "Description": "Type: 'request', 'quote_ack', 'quote_update', 'settlement_update', 'error', 'pong'" + "Description": "Type: 'request', 'quote_ack', 'quote_update', 'settlement_update', 'error', 'pong', 'challenge'" }, { "Parameter": "request", @@ -28,5 +28,10 @@ "Parameter": "settlement", "Type": "RFQSettlementMakerUpdate", "Description": "Settlement update for maker" + }, + { + "Parameter": "challenge", + "Type": "MakerChallenge", + "Description": "Auth challenge issued before the stream loop begins" } ] diff --git a/source/json_tables/indexer/injective_rfq_rpc/MakerStreamStreamingRequest.json b/source/json_tables/indexer/injective_rfq_rpc/MakerStreamStreamingRequest.json index 8585999d..d964c3f9 100644 --- a/source/json_tables/indexer/injective_rfq_rpc/MakerStreamStreamingRequest.json +++ b/source/json_tables/indexer/injective_rfq_rpc/MakerStreamStreamingRequest.json @@ -2,7 +2,7 @@ { "Parameter": "message_type", "Type": "string", - "Description": "Type: 'quote', 'ping'", + "Description": "Type: 'quote', 'ping', 'auth'", "Required": "Yes" }, { @@ -10,5 +10,11 @@ "Type": "RFQQuoteType", "Description": "Quote to submit", "Required": "No" + }, + { + "Parameter": "auth", + "Type": "MakerAuth", + "Description": "Auth response to a stream challenge", + "Required": "No" } ] diff --git a/source/json_tables/indexer/injective_rfq_rpc/RFQProcessedQuoteType.json b/source/json_tables/indexer/injective_rfq_rpc/RFQProcessedQuoteType.json index 48ec22f0..82e99a61 100644 --- a/source/json_tables/indexer/injective_rfq_rpc/RFQProcessedQuoteType.json +++ b/source/json_tables/indexer/injective_rfq_rpc/RFQProcessedQuoteType.json @@ -106,7 +106,7 @@ }, { "Parameter": "maker_subaccount_nonce", - "Type": "uint64", + "Type": "uint32", "Description": "Maker subaccount nonce used in quote signature" }, { @@ -123,5 +123,15 @@ "Parameter": "client_id", "Type": "string", "Description": "Client ID from the originating request" + }, + { + "Parameter": "sign_mode", + "Type": "string", + "Description": "Signature scheme used for the quote: \"v1\" (raw JSON keccak256) or \"v2\" (EIP-712). Defaults to \"v1\" when omitted, for backward compatibility with pre-EIP-712 clients." + }, + { + "Parameter": "evm_chain_id", + "Type": "uint64", + "Description": "EVM chain ID embedded in the EIP-712 domain. Required when sign_mode is \"v2\"; ignored otherwise. Must match one of the indexer's configured chain IDs." } ] diff --git a/source/json_tables/indexer/injective_rfq_rpc/RFQQuoteType.json b/source/json_tables/indexer/injective_rfq_rpc/RFQQuoteType.json index 203d5b6d..34968d00 100644 --- a/source/json_tables/indexer/injective_rfq_rpc/RFQQuoteType.json +++ b/source/json_tables/indexer/injective_rfq_rpc/RFQQuoteType.json @@ -91,7 +91,7 @@ }, { "Parameter": "maker_subaccount_nonce", - "Type": "uint64", + "Type": "uint32", "Description": "Maker subaccount nonce used in quote signature" }, { @@ -108,5 +108,15 @@ "Parameter": "client_id", "Type": "string", "Description": "Client ID from the originating request" + }, + { + "Parameter": "sign_mode", + "Type": "string", + "Description": "Signature scheme used for the quote: \"v1\" (raw JSON keccak256) or \"v2\" (EIP-712). Defaults to \"v1\" when omitted, for backward compatibility with pre-EIP-712 clients." + }, + { + "Parameter": "evm_chain_id", + "Type": "uint64", + "Description": "EVM chain ID embedded in the EIP-712 domain. Required when sign_mode is \"v2\"; ignored otherwise. Must match one of the indexer's configured chain IDs." } ] diff --git a/source/json_tables/indexer/injective_rfq_rpc/RFQSettlementMakerUpdate.json b/source/json_tables/indexer/injective_rfq_rpc/RFQSettlementMakerUpdate.json index ec232df8..e7082dd0 100644 --- a/source/json_tables/indexer/injective_rfq_rpc/RFQSettlementMakerUpdate.json +++ b/source/json_tables/indexer/injective_rfq_rpc/RFQSettlementMakerUpdate.json @@ -83,5 +83,10 @@ "Parameter": "cid", "Type": "string", "Description": "Settlement CID" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Settlement transaction hash" } ] diff --git a/source/json_tables/indexer/injective_rfq_rpc/RFQSettlementType.json b/source/json_tables/indexer/injective_rfq_rpc/RFQSettlementType.json index fb9e8a3c..38c15888 100644 --- a/source/json_tables/indexer/injective_rfq_rpc/RFQSettlementType.json +++ b/source/json_tables/indexer/injective_rfq_rpc/RFQSettlementType.json @@ -78,5 +78,10 @@ "Parameter": "cid", "Type": "string", "Description": "Settlement CID" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Settlement transaction hash" } ] diff --git a/source/json_tables/indexer/injective_rfq_rpc/StreamError.json b/source/json_tables/indexer/injective_rfq_rpc/StreamError.json index 837a7abb..efb51ebe 100644 --- a/source/json_tables/indexer/injective_rfq_rpc/StreamError.json +++ b/source/json_tables/indexer/injective_rfq_rpc/StreamError.json @@ -3,5 +3,10 @@ "Parameter": "code", "Type": "string", "Description": "Error code" + }, + { + "Parameter": "id", + "Type": "string", + "Description": "ID to identify the request or quote in the stream. RFQ_ID for quotes. CLIENT_ID for requests." } ] diff --git a/source/json_tables/indexer/injective_rfq_rpc/TakerStreamStreamingRequest.json b/source/json_tables/indexer/injective_rfq_rpc/TakerStreamStreamingRequest.json index 5c6a6408..71060d8b 100644 --- a/source/json_tables/indexer/injective_rfq_rpc/TakerStreamStreamingRequest.json +++ b/source/json_tables/indexer/injective_rfq_rpc/TakerStreamStreamingRequest.json @@ -22,5 +22,17 @@ "Type": "string", "Description": "Signature for the conditional order", "Required": "Yes" + }, + { + "Parameter": "conditional_order_sign_mode", + "Type": "string", + "Description": "Signature scheme for the conditional order: \"v1\" (raw JSON keccak256) or \"v2\" (EIP-712). Defaults to \"v1\" when omitted, for backward compatibility with pre-EIP-712 clients.", + "Required": "Yes" + }, + { + "Parameter": "conditional_order_evm_chain_id", + "Type": "uint64", + "Description": "EVM chain ID embedded in the EIP-712 domain for the conditional order. Required when conditional_order_sign_mode is \"v2\".", + "Required": "Yes" } ] diff --git a/source/json_tables/indexer/injective_tc_derivatives_rpc/DerivativeLimitOrder.json b/source/json_tables/indexer/injective_tc_derivatives_rpc/DerivativeLimitOrder.json index b826fa10..c6365ad1 100644 --- a/source/json_tables/indexer/injective_tc_derivatives_rpc/DerivativeLimitOrder.json +++ b/source/json_tables/indexer/injective_tc_derivatives_rpc/DerivativeLimitOrder.json @@ -108,5 +108,10 @@ "Parameter": "cid", "Type": "string", "Description": "Custom client order ID" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address that owns the subaccount which placed this order" } ] diff --git a/source/json_tables/indexer/injective_tc_derivatives_rpc/StreamPositionsResponse.json b/source/json_tables/indexer/injective_tc_derivatives_rpc/StreamPositionsResponse.json index 7593bc91..2c45c163 100644 --- a/source/json_tables/indexer/injective_tc_derivatives_rpc/StreamPositionsResponse.json +++ b/source/json_tables/indexer/injective_tc_derivatives_rpc/StreamPositionsResponse.json @@ -8,5 +8,10 @@ "Parameter": "timestamp", "Type": "int64", "Description": "Operation timestamp in UNIX millis." + }, + { + "Parameter": "operation_type", + "Type": "string", + "Description": "Position update type" } ] diff --git a/source/json_tables/indexer/injective_tc_derivatives_rpc/StreamTradesRequest.json b/source/json_tables/indexer/injective_tc_derivatives_rpc/StreamTradesRequest.json index 5515a542..95ffe166 100644 --- a/source/json_tables/indexer/injective_tc_derivatives_rpc/StreamTradesRequest.json +++ b/source/json_tables/indexer/injective_tc_derivatives_rpc/StreamTradesRequest.json @@ -10,5 +10,11 @@ "Type": "string", "Description": "filter by account address", "Required": "Yes" + }, + { + "Parameter": "rfq_maker", + "Type": "string", + "Description": "filter synthetic trades by RFQ maker address (only emits maker-side synthetic trades whose rfqMaker equals this address)", + "Required": "Yes" } ] diff --git a/source/json_tables/indexer/injective_tc_derivatives_rpc/TCDerivativeOrderHistoryType.json b/source/json_tables/indexer/injective_tc_derivatives_rpc/TCDerivativeOrderHistoryType.json index 93532681..4fab3566 100644 --- a/source/json_tables/indexer/injective_tc_derivatives_rpc/TCDerivativeOrderHistoryType.json +++ b/source/json_tables/indexer/injective_tc_derivatives_rpc/TCDerivativeOrderHistoryType.json @@ -103,5 +103,10 @@ "Parameter": "cid", "Type": "string", "Description": "Custom client order ID" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address that owns the subaccount which placed this order" } ] diff --git a/source/json_tables/indexer/injective_tc_derivatives_rpc/TCDerivativeTrade.json b/source/json_tables/indexer/injective_tc_derivatives_rpc/TCDerivativeTrade.json index 593b93a9..9a231719 100644 --- a/source/json_tables/indexer/injective_tc_derivatives_rpc/TCDerivativeTrade.json +++ b/source/json_tables/indexer/injective_tc_derivatives_rpc/TCDerivativeTrade.json @@ -83,5 +83,30 @@ "Parameter": "position_entry_price", "Type": "string", "Description": "Entry price of the position associated with this trade" + }, + { + "Parameter": "is_position_closed", + "Type": "bool", + "Description": "True if the position is closed by this trade" + }, + { + "Parameter": "rfq_maker", + "Type": "string", + "Description": "RFQ maker address for the synthetic trade (set only on synthetic trades coming from an RFQ settlement)" + }, + { + "Parameter": "account_address", + "Type": "string", + "Description": "Account address that owns the subaccount which executed this trade" + }, + { + "Parameter": "rfq_id", + "Type": "uint64", + "Description": "RFQ identifier the synthetic trade was settled under (set only on synthetic trades coming from an RFQ settlement)" + }, + { + "Parameter": "tx_hash", + "Type": "string", + "Description": "Transaction hash where the trade was executed" } ] diff --git a/source/json_tables/indexer/injective_tc_derivatives_rpc/TradesRequest.json b/source/json_tables/indexer/injective_tc_derivatives_rpc/TradesRequest.json index f30fcbd4..81ad1ab4 100644 --- a/source/json_tables/indexer/injective_tc_derivatives_rpc/TradesRequest.json +++ b/source/json_tables/indexer/injective_tc_derivatives_rpc/TradesRequest.json @@ -52,5 +52,17 @@ "Type": "int64", "Description": "The ending timestamp in UNIX milliseconds that the trades must be equal or younger than", "Required": "Yes" + }, + { + "Parameter": "with_pnl", + "Type": "bool", + "Description": "Return only trades with non-zero PNL", + "Required": "Yes" + }, + { + "Parameter": "rfq_maker", + "Type": "string", + "Description": "filter synthetic trades by RFQ maker address", + "Required": "Yes" } ] diff --git a/source/json_tables/injective/exchange/v2/CrossMarginEligibility.json b/source/json_tables/injective/exchange/v2/CrossMarginEligibility.json new file mode 100644 index 00000000..a069233e --- /dev/null +++ b/source/json_tables/injective/exchange/v2/CrossMarginEligibility.json @@ -0,0 +1,14 @@ +[ + { + "Code": "0", + "Name": "CM_ELIGIBILITY_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "CM_ELIGIBILITY_ELIGIBLE" + }, + { + "Code": "2", + "Name": "CM_ELIGIBILITY_INELIGIBLE" + } +] diff --git a/source/json_tables/injective/exchange/v2/CrossMarginParams.json b/source/json_tables/injective/exchange/v2/CrossMarginParams.json new file mode 100644 index 00000000..2eafcc0d --- /dev/null +++ b/source/json_tables/injective/exchange/v2/CrossMarginParams.json @@ -0,0 +1,37 @@ +[ + { + "Parameter": "positive_upnl_haircut_rate", + "Type": "LegacyDec", + "Description": "positive_upnl_haircut_rate defines the haircut applied to positive unrealized PnL for cross-margin admission checks." + }, + { + "Parameter": "fees_buffer", + "Type": "LegacyDec", + "Description": "fees_buffer defines a fixed notional buffer (quote-denom units) subtracted from cross-margin equity calculations." + }, + { + "Parameter": "enabled_quote_denoms", + "Type": "string array", + "Description": "enabled_quote_denoms defines the quote denoms that are eligible for cross-margin pools." + }, + { + "Parameter": "perpetual_enabled", + "Type": "bool", + "Description": "perpetual_enabled defines whether perpetual derivative markets are eligible for cross margin." + }, + { + "Parameter": "expiry_enabled", + "Type": "bool", + "Description": "expiry_enabled defines whether expiry futures derivative markets are eligible for cross margin." + }, + { + "Parameter": "max_active_derivative_markets_per_pool", + "Type": "uint32", + "Description": "max_active_derivative_markets_per_pool defines the maximum number of active derivative markets (positions or orders) a cross-margin subaccount may have within a single quote-denom pool." + }, + { + "Parameter": "emergency_paused", + "Type": "bool", + "Description": "emergency_paused defines whether cross margin is in emergency pause mode. When true: - All cross-margin orders (including reduce-only) are blocked - Profile switching involving cross mode is blocked - Liquidations are still allowed - Withdrawals are allowed up to isolated-margin maintenance level" + } +] diff --git a/source/json_tables/injective/exchange/v2/DerivativeMarket.json b/source/json_tables/injective/exchange/v2/DerivativeMarket.json index e315f761..46c00433 100644 --- a/source/json_tables/injective/exchange/v2/DerivativeMarket.json +++ b/source/json_tables/injective/exchange/v2/DerivativeMarket.json @@ -118,5 +118,10 @@ "Parameter": "force_paused_info", "Type": "ForcePausedInfo", "Description": "force_paused_info defines additional info for force paused markets, only set when status == ForcePaused" + }, + { + "Parameter": "cross_margin_eligible", + "Type": "bool", + "Description": "cross_margin_eligible marks the market as eligible for cross-margin pool participation. Default false means markets are ineligible until explicitly enabled at launch or toggled via governance proposal." } ] diff --git a/source/json_tables/injective/exchange/v2/DerivativeMarketParamUpdateProposal.json b/source/json_tables/injective/exchange/v2/DerivativeMarketParamUpdateProposal.json index 9204f26f..f0231b41 100644 --- a/source/json_tables/injective/exchange/v2/DerivativeMarketParamUpdateProposal.json +++ b/source/json_tables/injective/exchange/v2/DerivativeMarketParamUpdateProposal.json @@ -98,5 +98,10 @@ "Parameter": "has_disabled_minimal_protocol_fee", "Type": "DisableMinimalProtocolFeeUpdate", "Description": "has_disabled_minimal_protocol_fee defines whether the minimal protocol fee is disabled for the market" + }, + { + "Parameter": "cross_margin_eligibility", + "Type": "CrossMarginEligibility", + "Description": "cross_margin_eligibility controls whether the market can participate in cross-margin pools" } ] diff --git a/source/json_tables/injective/exchange/v2/DerivativeMarketSettlementInfo.json b/source/json_tables/injective/exchange/v2/DerivativeMarketSettlementInfo.json index d285267c..8a4b1c69 100644 --- a/source/json_tables/injective/exchange/v2/DerivativeMarketSettlementInfo.json +++ b/source/json_tables/injective/exchange/v2/DerivativeMarketSettlementInfo.json @@ -8,5 +8,10 @@ "Parameter": "settlement_price", "Type": "LegacyDec", "Description": "settlement_price defines the settlement price" + }, + { + "Parameter": "is_forced_settlement", + "Type": "bool", + "Description": "is_forced_settlement indicates whether the settlement was explicitly scheduled by admin or governance force-settlement." } ] diff --git a/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketLaunchProposal.json b/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketLaunchProposal.json index 9cf258cc..9541dd86 100644 --- a/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketLaunchProposal.json +++ b/source/json_tables/injective/exchange/v2/ExpiryFuturesMarketLaunchProposal.json @@ -93,5 +93,10 @@ "Parameter": "open_notional_cap", "Type": "OpenNotionalCap", "Description": "open_notional_cap defines the maximum open notional for the market" + }, + { + "Parameter": "cross_margin_eligible", + "Type": "bool", + "Description": "cross_margin_eligible marks the market as eligible for cross-margin" } ] diff --git a/source/json_tables/injective/exchange/v2/GenesisState.json b/source/json_tables/injective/exchange/v2/GenesisState.json index 75123da7..8f316831 100644 --- a/source/json_tables/injective/exchange/v2/GenesisState.json +++ b/source/json_tables/injective/exchange/v2/GenesisState.json @@ -183,5 +183,10 @@ "Parameter": "denom_min_notionals", "Type": "DenomMinNotional array", "Description": "" + }, + { + "Parameter": "subaccount_risk_profiles", + "Type": "SubaccountRiskProfileRecord array", + "Description": "" } ] diff --git a/source/json_tables/injective/exchange/v2/LiquidatePositionData.json b/source/json_tables/injective/exchange/v2/LiquidatePositionData.json new file mode 100644 index 00000000..9e4a1f9c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/LiquidatePositionData.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID the position belongs to" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the position's market ID" + }, + { + "Parameter": "order", + "Type": "DerivativeOrder", + "Description": "optional order to provide for liquidation" + } +] diff --git a/source/json_tables/injective/exchange/v2/LiquidatePositionResult.json b/source/json_tables/injective/exchange/v2/LiquidatePositionResult.json new file mode 100644 index 00000000..244d0044 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/LiquidatePositionResult.json @@ -0,0 +1,22 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID the position belongs to" + }, + { + "Parameter": "market_id", + "Type": "string", + "Description": "the position's market ID" + }, + { + "Parameter": "success", + "Type": "bool", + "Description": "whether the liquidation succeeded" + }, + { + "Parameter": "error", + "Type": "string", + "Description": "failure reason when success is false" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchLiquidatePositions.json b/source/json_tables/injective/exchange/v2/MsgBatchLiquidatePositions.json new file mode 100644 index 00000000..a3772c01 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchLiquidatePositions.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "liquidations", + "Type": "LiquidatePositionData array", + "Description": "the positions to liquidate", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgBatchLiquidatePositionsResponse.json b/source/json_tables/injective/exchange/v2/MsgBatchLiquidatePositionsResponse.json new file mode 100644 index 00000000..03b5532f --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgBatchLiquidatePositionsResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "results", + "Type": "LiquidatePositionResult array", + "Description": "" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgInstantExpiryFuturesMarketLaunch.json b/source/json_tables/injective/exchange/v2/MsgInstantExpiryFuturesMarketLaunch.json index b84bb476..5c002db9 100644 --- a/source/json_tables/injective/exchange/v2/MsgInstantExpiryFuturesMarketLaunch.json +++ b/source/json_tables/injective/exchange/v2/MsgInstantExpiryFuturesMarketLaunch.json @@ -100,5 +100,11 @@ "Type": "OpenNotionalCap", "Description": "open_notional_cap defines the cap on the open notional", "Required": "Yes" + }, + { + "Parameter": "cross_margin_eligible", + "Type": "bool", + "Description": "cross_margin_eligible marks the market as eligible for cross-margin", + "Required": "Yes" } ] diff --git a/source/json_tables/injective/exchange/v2/MsgInstantPerpetualMarketLaunch.json b/source/json_tables/injective/exchange/v2/MsgInstantPerpetualMarketLaunch.json index 9b73123d..d81bd9cf 100644 --- a/source/json_tables/injective/exchange/v2/MsgInstantPerpetualMarketLaunch.json +++ b/source/json_tables/injective/exchange/v2/MsgInstantPerpetualMarketLaunch.json @@ -94,5 +94,11 @@ "Type": "OpenNotionalCap", "Description": "open_notional_cap defines the cap on the open notional", "Required": "Yes" + }, + { + "Parameter": "cross_margin_eligible", + "Type": "bool", + "Description": "cross_margin_eligible marks the market as eligible for cross-margin", + "Required": "Yes" } ] diff --git a/source/json_tables/injective/exchange/v2/MsgLiquidateCrossMarginPool.json b/source/json_tables/injective/exchange/v2/MsgLiquidateCrossMarginPool.json new file mode 100644 index 00000000..30281d8c --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgLiquidateCrossMarginPool.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the liquidator's Injective address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the cross-margin subaccount to liquidate", + "Required": "Yes" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "identifies which cross-margin pool (by quote denom)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgSetDelegationTransferReceivers.json b/source/json_tables/injective/exchange/v2/MsgSetDelegationTransferReceivers.json new file mode 100644 index 00000000..07b19b59 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgSetDelegationTransferReceivers.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address (must be exchange admin)", + "Required": "Yes" + }, + { + "Parameter": "receivers", + "Type": "string array", + "Description": "list of receiver addresses to set as delegation transfer receivers", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/MsgUpdateDerivativeMarket.json b/source/json_tables/injective/exchange/v2/MsgUpdateDerivativeMarket.json index d32035bb..afdf620d 100644 --- a/source/json_tables/injective/exchange/v2/MsgUpdateDerivativeMarket.json +++ b/source/json_tables/injective/exchange/v2/MsgUpdateDerivativeMarket.json @@ -58,5 +58,11 @@ "Type": "OpenNotionalCap", "Description": "(optional) updated value for open_notional_cap", "Required": "No" + }, + { + "Parameter": "cross_margin_eligibility", + "Type": "CrossMarginEligibility", + "Description": "(optional) tri-state toggle for cross-margin eligibility. Direct message updates are exchange-admin-only and may set either ELIGIBLE or INELIGIBLE. UNSPECIFIED is a no-op (preserves current value).", + "Required": "No" } ] diff --git a/source/json_tables/injective/exchange/v2/MsgUpdateSubaccountRiskProfile.json b/source/json_tables/injective/exchange/v2/MsgUpdateSubaccountRiskProfile.json new file mode 100644 index 00000000..610b1a0a --- /dev/null +++ b/source/json_tables/injective/exchange/v2/MsgUpdateSubaccountRiskProfile.json @@ -0,0 +1,20 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "the sender's Injective address", + "Required": "Yes" + }, + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "the subaccount ID to update the risk profile for", + "Required": "Yes" + }, + { + "Parameter": "risk_profile", + "Type": "SubaccountRiskProfile", + "Description": "the requested risk profile (subject to eligibility & safety gates)", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/Params.json b/source/json_tables/injective/exchange/v2/Params.json index 08c19956..ca6eef61 100644 --- a/source/json_tables/injective/exchange/v2/Params.json +++ b/source/json_tables/injective/exchange/v2/Params.json @@ -183,5 +183,10 @@ "Parameter": "white_knight_liquidator_reward_share_rate", "Type": "LegacyDec", "Description": "white_knight_liquidator_reward_share_rate defines the ratio of the split of the surplus collateral that goes to a white knight liquidator" + }, + { + "Parameter": "cross_margin_params", + "Type": "CrossMarginParams", + "Description": "cross_margin_params groups all cross-margin related parameters." } ] diff --git a/source/json_tables/injective/exchange/v2/PerpetualMarketLaunchProposal.json b/source/json_tables/injective/exchange/v2/PerpetualMarketLaunchProposal.json index 6115925e..5de558c4 100644 --- a/source/json_tables/injective/exchange/v2/PerpetualMarketLaunchProposal.json +++ b/source/json_tables/injective/exchange/v2/PerpetualMarketLaunchProposal.json @@ -88,5 +88,10 @@ "Parameter": "open_notional_cap", "Type": "OpenNotionalCap", "Description": "open_notional_cap defines the maximum open notional for the market" + }, + { + "Parameter": "cross_margin_eligible", + "Type": "bool", + "Description": "cross_margin_eligible marks the market as eligible for cross-margin" } ] diff --git a/source/json_tables/injective/exchange/v2/QueryCrossMarginPoolSnapshotRequest.json b/source/json_tables/injective/exchange/v2/QueryCrossMarginPoolSnapshotRequest.json new file mode 100644 index 00000000..45e6f019 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryCrossMarginPoolSnapshotRequest.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "32-byte hex string identifying the subaccount.", + "Required": "Yes" + }, + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "The quote denom of the cross-margin pool (e.g., \"USDC\").", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QueryCrossMarginPoolSnapshotResponse.json b/source/json_tables/injective/exchange/v2/QueryCrossMarginPoolSnapshotResponse.json new file mode 100644 index 00000000..ef635ffe --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QueryCrossMarginPoolSnapshotResponse.json @@ -0,0 +1,77 @@ +[ + { + "Parameter": "quote_denom", + "Type": "string", + "Description": "The quote denom of the pool." + }, + { + "Parameter": "quote_balance", + "Type": "LegacyDec", + "Description": "Available quote balance in the pool (human-readable notional units)." + }, + { + "Parameter": "position_margin_total", + "Type": "LegacyDec", + "Description": "Total margin held in positions." + }, + { + "Parameter": "unrealized_pnl", + "Type": "LegacyDec", + "Description": "Raw unrealised PnL across all positions in the pool." + }, + { + "Parameter": "unrealized_pnl_effective", + "Type": "LegacyDec", + "Description": "Effective unrealised PnL after applying positive uPnL haircut." + }, + { + "Parameter": "equity_admission", + "Type": "LegacyDec", + "Description": "Equity used for order admission checks (quote_balance + position_margin + uPnL_eff - fees_buffer)." + }, + { + "Parameter": "equity_liquidation", + "Type": "LegacyDec", + "Description": "Equity used for liquidation checks (uses raw uPnL, not haircutted)." + }, + { + "Parameter": "initial_margin_total", + "Type": "LegacyDec", + "Description": "Sum of initial margin requirements for existing positions only." + }, + { + "Parameter": "maintenance_margin_total", + "Type": "LegacyDec", + "Description": "Sum of maintenance margin requirements for existing positions." + }, + { + "Parameter": "initial_margin_with_orders_total", + "Type": "LegacyDec", + "Description": "Initial margin using worst-case net exposure (q + B, q - S) across all markets." + }, + { + "Parameter": "entry_loss_total", + "Type": "LegacyDec", + "Description": "Sum of entry losses for all open orders." + }, + { + "Parameter": "fee_reserve_total", + "Type": "LegacyDec", + "Description": "Sum of fee reserves for all open orders." + }, + { + "Parameter": "order_lock_requirement", + "Type": "LegacyDec", + "Description": "Order Lock Requirement = IM_with_orders + entry_loss + fee_reserve. Orders may be cancelled if equity_admission < order_lock_requirement." + }, + { + "Parameter": "positive_upnl_haircut_rate", + "Type": "LegacyDec", + "Description": "The positive uPnL haircut rate applied (e.g., 0.5 = 50%)." + }, + { + "Parameter": "health_factor", + "Type": "LegacyDec", + "Description": "Health factor = equity_liquidation / maintenance_margin_total. When < 1, the account is liquidatable. When < 1.5, the account is in a warning state. Empty if maintenance_margin_total is zero (no positions)." + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountEffectivePositionInMarketResponse.json b/source/json_tables/injective/exchange/v2/QuerySubaccountEffectivePositionInMarketResponse.json index 1efde0db..b8336468 100644 --- a/source/json_tables/injective/exchange/v2/QuerySubaccountEffectivePositionInMarketResponse.json +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountEffectivePositionInMarketResponse.json @@ -3,5 +3,10 @@ "Parameter": "state", "Type": "EffectivePosition", "Description": "" + }, + { + "Parameter": "risk_mode", + "Type": "RiskMode", + "Description": "The risk mode of the subaccount (ISOLATED or CROSS). For CROSS mode, effective_margin reflects position value but liquidation is determined at pool level. Use CrossMarginPoolSnapshot for pool health." } ] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountPositionInMarketResponse.json b/source/json_tables/injective/exchange/v2/QuerySubaccountPositionInMarketResponse.json index 093e6566..bed50f03 100644 --- a/source/json_tables/injective/exchange/v2/QuerySubaccountPositionInMarketResponse.json +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountPositionInMarketResponse.json @@ -3,5 +3,10 @@ "Parameter": "state", "Type": "Position", "Description": "" + }, + { + "Parameter": "risk_mode", + "Type": "RiskMode", + "Description": "The risk mode of the subaccount (ISOLATED or CROSS). For CROSS mode, the position's margin is an accounting value; actual collateral is pooled. Use CrossMarginPoolSnapshot for pool-level health." } ] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountRiskProfileRequest.json b/source/json_tables/injective/exchange/v2/QuerySubaccountRiskProfileRequest.json new file mode 100644 index 00000000..2c866974 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountRiskProfileRequest.json @@ -0,0 +1,8 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "32-byte hex string, consistent with existing exchange queries.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/exchange/v2/QuerySubaccountRiskProfileResponse.json b/source/json_tables/injective/exchange/v2/QuerySubaccountRiskProfileResponse.json new file mode 100644 index 00000000..bdd7ce16 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/QuerySubaccountRiskProfileResponse.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "profile", + "Type": "SubaccountRiskProfile", + "Description": "" + }, + { + "Parameter": "is_default", + "Type": "bool", + "Description": "True if the profile was not explicitly stored and defaults were returned." + } +] diff --git a/source/json_tables/injective/exchange/v2/ReservationPolicy.json b/source/json_tables/injective/exchange/v2/ReservationPolicy.json new file mode 100644 index 00000000..67348121 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/ReservationPolicy.json @@ -0,0 +1,14 @@ +[ + { + "Code": "0", + "Name": "RESERVATION_POLICY_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "RESERVATION_POLICY_FULL_HOLD" + }, + { + "Code": "3", + "Name": "RESERVATION_POLICY_NO_HOLD" + } +] diff --git a/source/json_tables/injective/exchange/v2/RiskMode.json b/source/json_tables/injective/exchange/v2/RiskMode.json new file mode 100644 index 00000000..36aa17aa --- /dev/null +++ b/source/json_tables/injective/exchange/v2/RiskMode.json @@ -0,0 +1,18 @@ +[ + { + "Code": "0", + "Name": "RISK_MODE_UNSPECIFIED" + }, + { + "Code": "1", + "Name": "RISK_MODE_ISOLATED" + }, + { + "Code": "2", + "Name": "RISK_MODE_CROSS" + }, + { + "Code": "3", + "Name": "RISK_MODE_PORTFOLIO" + } +] diff --git a/source/json_tables/injective/exchange/v2/SubaccountRiskProfile.json b/source/json_tables/injective/exchange/v2/SubaccountRiskProfile.json new file mode 100644 index 00000000..bce98a26 --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SubaccountRiskProfile.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "mode", + "Type": "RiskMode", + "Description": "" + }, + { + "Parameter": "reservation_policy", + "Type": "ReservationPolicy", + "Description": "" + }, + { + "Parameter": "credit_line_id", + "Type": "string", + "Description": "credit_line_id is reserved for future use and currently must be empty." + } +] diff --git a/source/json_tables/injective/exchange/v2/SubaccountRiskProfileRecord.json b/source/json_tables/injective/exchange/v2/SubaccountRiskProfileRecord.json new file mode 100644 index 00000000..81f7ebbd --- /dev/null +++ b/source/json_tables/injective/exchange/v2/SubaccountRiskProfileRecord.json @@ -0,0 +1,12 @@ +[ + { + "Parameter": "subaccount_id", + "Type": "string", + "Description": "" + }, + { + "Parameter": "risk_profile", + "Type": "SubaccountRiskProfile", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/GenesisState.json b/source/json_tables/injective/oracle/GenesisState.json index 4fb4b71e..2459d6ce 100644 --- a/source/json_tables/injective/oracle/GenesisState.json +++ b/source/json_tables/injective/oracle/GenesisState.json @@ -88,5 +88,15 @@ "Parameter": "chainlink_data_streams_price_states", "Type": "ChainlinkDataStreamsPriceState array", "Description": "" + }, + { + "Parameter": "pyth_pro_price_states", + "Type": "PythProPriceState array", + "Description": "pyth_pro_price_states defines the persisted PythPro feed price states at genesis." + }, + { + "Parameter": "seda_fast_price_states", + "Type": "SedaFastPriceState array", + "Description": "seda_fast_price_states defines the persisted SEDA Fast feed price states at genesis, keyed by feed_id (hex-encoded execInputs)." } ] diff --git a/source/json_tables/injective/oracle/MsgRelayBandRates.json b/source/json_tables/injective/oracle/MsgRelayBandRates.json new file mode 100644 index 00000000..00d28af8 --- /dev/null +++ b/source/json_tables/injective/oracle/MsgRelayBandRates.json @@ -0,0 +1,32 @@ +[ + { + "Parameter": "relayer", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "symbols", + "Type": "string array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "rates", + "Type": "uint64 array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "resolve_times", + "Type": "uint64 array", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "requestIDs", + "Type": "uint64 array", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/MsgRelayPythProPrices.json b/source/json_tables/injective/oracle/MsgRelayPythProPrices.json new file mode 100644 index 00000000..09f37f86 --- /dev/null +++ b/source/json_tables/injective/oracle/MsgRelayPythProPrices.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "sender is the relayer address broadcasting the update. Any address may relay; security is enforced by the PythLazer EVM contract.", + "Required": "Yes" + }, + { + "Parameter": "updates", + "Type": "][byte array", + "Description": "updates contains one or more Pyth Lazer update blobs; each blob is passed to a single verifyUpdate EVM call.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/MsgRelaySedaFastPrices.json b/source/json_tables/injective/oracle/MsgRelaySedaFastPrices.json new file mode 100644 index 00000000..8a136b7f --- /dev/null +++ b/source/json_tables/injective/oracle/MsgRelaySedaFastPrices.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "updates", + "Type": "][byte array", + "Description": "updates contains one or more SEDA Fast result JSON envelopes.", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/MsgRequestBandIBCRates.json b/source/json_tables/injective/oracle/MsgRequestBandIBCRates.json new file mode 100644 index 00000000..c6c39050 --- /dev/null +++ b/source/json_tables/injective/oracle/MsgRequestBandIBCRates.json @@ -0,0 +1,14 @@ +[ + { + "Parameter": "sender", + "Type": "string", + "Description": "", + "Required": "Yes" + }, + { + "Parameter": "request_id", + "Type": "uint64", + "Description": "", + "Required": "Yes" + } +] diff --git a/source/json_tables/injective/oracle/Params.json b/source/json_tables/injective/oracle/Params.json index 3f4ec7df..a04fd61a 100644 --- a/source/json_tables/injective/oracle/Params.json +++ b/source/json_tables/injective/oracle/Params.json @@ -13,5 +13,25 @@ "Parameter": "chainlink_data_streams_verification_gas_limit", "Type": "uint64", "Description": "" + }, + { + "Parameter": "pyth_pro_verifier_contract", + "Type": "string", + "Description": "EVM hex address of the PythLazer verifier contract deployed on Injective. Must be set via governance before PythPro price relaying is active. (optional)" + }, + { + "Parameter": "pyth_pro_verification_gas_limit", + "Type": "uint64", + "Description": "Gas cap for the eth_call used in PythPro update verification. Defaults to 500000." + }, + { + "Parameter": "pyth_pro_verification_fee", + "Type": "uint64", + "Description": "Fee in wei passed as msg.value to the PythLazer verifyUpdate call. Update via governance if the on-chain contract fee changes. Defaults to 1." + }, + { + "Parameter": "seda_fast_params", + "Type": "SedaFastParams", + "Description": "seda_fast_params groups all SEDA Fast oracle configuration. An empty public_key disables MsgRelaySedaFastPrices handling until set via MsgUpdateParams." } ] diff --git a/source/json_tables/injective/oracle/PythProPriceState.json b/source/json_tables/injective/oracle/PythProPriceState.json new file mode 100644 index 00000000..397ad606 --- /dev/null +++ b/source/json_tables/injective/oracle/PythProPriceState.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "feed_id", + "Type": "uint32", + "Description": "feed_id is the uint32 Pyth Lazer feed identifier." + }, + { + "Parameter": "timestamp", + "Type": "uint64", + "Description": "timestamp is the price timestamp extracted from the verified payload (microseconds from epoch)." + }, + { + "Parameter": "price_state", + "Type": "PriceState", + "Description": "price_state holds the verified price, cumulative price, and block timestamp." + } +] diff --git a/source/json_tables/injective/oracle/QueryPythProPriceStatesResponse.json b/source/json_tables/injective/oracle/QueryPythProPriceStatesResponse.json new file mode 100644 index 00000000..ca3aa40f --- /dev/null +++ b/source/json_tables/injective/oracle/QueryPythProPriceStatesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price_states", + "Type": "PythProPriceState array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/QuerySedaFastPriceStatesResponse.json b/source/json_tables/injective/oracle/QuerySedaFastPriceStatesResponse.json new file mode 100644 index 00000000..caf0d27c --- /dev/null +++ b/source/json_tables/injective/oracle/QuerySedaFastPriceStatesResponse.json @@ -0,0 +1,7 @@ +[ + { + "Parameter": "price_states", + "Type": "SedaFastPriceState array", + "Description": "" + } +] diff --git a/source/json_tables/injective/oracle/SedaFastParams.json b/source/json_tables/injective/oracle/SedaFastParams.json new file mode 100644 index 00000000..1b09980e --- /dev/null +++ b/source/json_tables/injective/oracle/SedaFastParams.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "public_key", + "Type": "byte array", + "Description": "SEC1 secp256k1 public key published by SEDA Fast at GET /info. Compressed (33 B, 0x02/0x03 prefix) or uncompressed (65 B, 0x04 prefix). Empty value disables all MsgRelaySedaFastPrices handling." + }, + { + "Parameter": "simple_program_ids", + "Type": "string array", + "Description": "Allowlist of execProgramIds whose dataResult.result payload is an ASCII decimal string (e.g. \"384.48255\"), parsed as LegacyDec." + }, + { + "Parameter": "json_program_ids", + "Type": "string array", + "Description": "Allowlist of execProgramIds whose dataResult.result payload is a UTF-8 JSON object containing {price:{mantissa,expo},...}." + } +] diff --git a/source/json_tables/injective/oracle/SedaFastPriceState.json b/source/json_tables/injective/oracle/SedaFastPriceState.json new file mode 100644 index 00000000..1af6fa02 --- /dev/null +++ b/source/json_tables/injective/oracle/SedaFastPriceState.json @@ -0,0 +1,17 @@ +[ + { + "Parameter": "feed_id", + "Type": "string", + "Description": "feed_id is the hex-encoded execInputs string from the SEDA Fast dataRequest. It is the stable on-chain identity of the feed, invariant across relayer restarts and per-execution result IDs." + }, + { + "Parameter": "timestamp", + "Type": "uint64", + "Description": "timestamp is the dataResult.blockTimestamp value (milliseconds from epoch) extracted from the verified SEDA Fast response." + }, + { + "Parameter": "price_state", + "Type": "PriceState", + "Description": "price_state holds the verified price, cumulative price, and block timestamp." + } +] diff --git a/source/json_tables/injective/oracle/v1beta1/OracleType.json b/source/json_tables/injective/oracle/v1beta1/OracleType.json index ccde2a87..60f6f307 100644 --- a/source/json_tables/injective/oracle/v1beta1/OracleType.json +++ b/source/json_tables/injective/oracle/v1beta1/OracleType.json @@ -54,5 +54,13 @@ { "Code": "13", "Name": "ChainlinkDataStreams" + }, + { + "Code": "14", + "Name": "PythPro" + }, + { + "Code": "15", + "Name": "SedaFast" } ] diff --git a/source/json_tables/injective/stream/v2/DerivativeTrade.json b/source/json_tables/injective/stream/v2/DerivativeTrade.json index 090dd5f3..e2f7ce00 100644 --- a/source/json_tables/injective/stream/v2/DerivativeTrade.json +++ b/source/json_tables/injective/stream/v2/DerivativeTrade.json @@ -53,5 +53,10 @@ "Parameter": "trade_id", "Type": "string", "Description": "the trade ID" + }, + { + "Parameter": "is_liquidation", + "Type": "bool", + "Description": "whether the trade resulted from a liquidation" } ]