@injectivelabs/sdk-ts 1.20.67 → 1.21.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/dist/cjs/{BaseGrpcConsumer-DVDjYQks.d.cts → BaseGrpcConsumer-CRYBdXm9.d.cts} +1 -1
- package/dist/cjs/{ChainGrpcExchangeApi-DEoO0jhR.cjs → ChainGrpcExchangeApi-D2diaVMC.cjs} +2 -73
- package/dist/cjs/{ChainRestTendermintApi-BkHzZIRZ.cjs → ChainRestTendermintApi-BSGN-XV3.cjs} +2 -2
- package/dist/cjs/{DirectEthSecp256k1Wallet-DfvrKuF8.cjs → DirectEthSecp256k1Wallet-CsOHUTrG.cjs} +1 -1
- package/dist/cjs/{ExecArgNeptuneWithdraw-BJHAQJlT.cjs → ExecArgNeptuneWithdraw-CHK2kF7l.cjs} +2 -2
- package/dist/cjs/{IndexerGrpcWeb3GwApi-C9VUHKOj.cjs → IndexerGrpcWeb3GwApi-BaCa4M1S.cjs} +4 -2
- package/dist/cjs/{MsgBase-jNBijPHQ.cjs → MsgBase-Dt0pa34P.cjs} +93 -36
- package/dist/cjs/{MsgSetDenomMetadata-Did-0k6O.cjs → MsgSetDenomMetadata-BKnmW-f2.cjs} +3361 -4248
- package/dist/cjs/{QueryTradingStrategyContractTotalStrategies-B3pcJep3.cjs → QueryTradingStrategyContractTotalStrategies-BiIzwy-H.cjs} +2 -2
- package/dist/cjs/{StreamManagerV2-DRWQ5QH0.cjs → StreamManagerV2-DftPsZ02.cjs} +2 -2
- package/dist/cjs/{accounts-BeV7wTTf.cjs → accounts-C6QIpAkP.cjs} +22 -2
- package/dist/cjs/{chain-B3HLDM4b.cjs → chain-D4Z7pAD0.cjs} +120 -206
- package/dist/cjs/client/abacus.d.cts +5 -5
- package/dist/cjs/client/chain.cjs +4 -5
- package/dist/cjs/client/chain.d.cts +12 -12
- package/dist/cjs/client/indexer.cjs +3 -3
- package/dist/cjs/client/indexer.d.cts +12 -12
- package/dist/cjs/client/olp.d.cts +5 -5
- package/dist/cjs/client/platformServices.d.cts +5 -5
- package/dist/cjs/client/tcAbacus.d.cts +5 -5
- package/dist/cjs/client/wasm.cjs +7 -7
- package/dist/cjs/client/wasm.d.cts +4 -4
- package/dist/cjs/core/accounts.cjs +3 -3
- package/dist/cjs/core/accounts.d.cts +11 -11
- package/dist/cjs/core/modules.cjs +15 -23
- package/dist/cjs/core/modules.d.cts +12 -12
- package/dist/cjs/core/tx.cjs +7 -6
- package/dist/cjs/core/tx.d.cts +12 -12
- package/dist/cjs/cosmjs.cjs +7 -7
- package/dist/cjs/cosmjs.d.cts +2 -2
- package/dist/cjs/exports.cjs +7 -7
- package/dist/cjs/exports.d.cts +2 -2
- package/dist/cjs/{index-BtwpJOwb.d.cts → index-5s92DIT3.d.cts} +1 -1
- package/dist/{esm/index-B4-RPlmi.d.ts → cjs/index-B7LT8B2g.d.cts} +25673 -26257
- package/dist/cjs/{index-CfGvB4c1.d.cts → index-BNqPdwIL.d.cts} +1 -1
- package/dist/cjs/{index-iLM1noAM.d.cts → index-ByaAgMci.d.cts} +1 -1
- package/dist/{esm/index-CTEvW2RT.d.ts → cjs/index-CBEIfBLI.d.cts} +34 -84
- package/dist/{esm/index--I7NYLY5.d.ts → cjs/index-CKFM2Zot.d.cts} +35 -350
- package/dist/cjs/{index-Beskv_ry.d.cts → index-CcNtmgW5.d.cts} +2 -2
- package/dist/cjs/{index-Bv-5dlo_.d.cts → index-DzI7PClu.d.cts} +1 -1
- package/dist/cjs/{index-CY06tllr.d.cts → index-fb-zX9fQ.d.cts} +1 -1
- package/dist/cjs/index.cjs +19 -27
- package/dist/cjs/index.d.cts +12 -12
- package/dist/{esm/light-BFGvKXwS.d.ts → cjs/light-Dyi8qJP_.d.cts} +3 -0
- package/dist/cjs/proto/cosmos-tx.d.cts +1 -1
- package/dist/cjs/service.cjs +1 -1
- package/dist/cjs/service.d.cts +4 -4
- package/dist/cjs/{tx-C8efeicO.cjs → tx-U8W1g3W8.cjs} +4 -4
- package/dist/cjs/{tx_pb-DSDGNMKS.d.cts → tx_pb-rX24LEP1.d.cts} +58 -107
- package/dist/cjs/types/light.d.cts +1 -1
- package/dist/cjs/types.d.cts +3 -3
- package/dist/cjs/{utils-DZoXzNOj.cjs → utils-CjlVVckg.cjs} +14 -24
- package/dist/cjs/utils.cjs +1 -1
- package/dist/cjs/utils.d.cts +11 -11
- package/dist/esm/{BaseGrpcConsumer-DzOno3EM.d.ts → BaseGrpcConsumer-BfhC9A-3.d.ts} +1 -1
- package/dist/esm/{ChainGrpcExchangeApi-N27wNM6N.js → ChainGrpcExchangeApi-YNNZqhBt.js} +2 -73
- package/dist/esm/{ChainRestTendermintApi-CfvwCl2L.js → ChainRestTendermintApi-DGLg38SO.js} +2 -2
- package/dist/esm/{DirectEthSecp256k1Wallet-Cq8NYHKd.js → DirectEthSecp256k1Wallet-mXW_mPaC.js} +1 -1
- package/dist/esm/{ExecArgNeptuneWithdraw-BRrsGhPy.js → ExecArgNeptuneWithdraw-CpaH5nlc.js} +2 -2
- package/dist/esm/{IndexerGrpcWeb3GwApi-CG_ZevUX.js → IndexerGrpcWeb3GwApi-BaQI4k4D.js} +4 -2
- package/dist/esm/{MsgBase-BC3GNddA.js → MsgBase-D3okqFzc.js} +88 -37
- package/dist/esm/{MsgSetDenomMetadata-B7IN-5j2.js → MsgSetDenomMetadata-snSM4b_f.js} +900 -1738
- package/dist/esm/{QueryTradingStrategyContractTotalStrategies-DNbF4zfF.js → QueryTradingStrategyContractTotalStrategies-C5T8K9t0.js} +2 -2
- package/dist/esm/{StreamManagerV2-IyJuIDxz.js → StreamManagerV2-DayR_Wxb.js} +2 -2
- package/dist/esm/{accounts-D2h6m8BF.js → accounts-BNTm8lj5.js} +22 -2
- package/dist/esm/{chain-cb8a0SyE.js → chain-Bx2cRWCa.js} +141 -220
- package/dist/esm/client/abacus.d.ts +5 -5
- package/dist/esm/client/chain.d.ts +12 -12
- package/dist/esm/client/chain.js +5 -5
- package/dist/esm/client/indexer.d.ts +12 -12
- package/dist/esm/client/indexer.js +3 -3
- package/dist/esm/client/olp.d.ts +5 -5
- package/dist/esm/client/platformServices.d.ts +5 -5
- package/dist/esm/client/tcAbacus.d.ts +5 -5
- package/dist/esm/client/wasm.d.ts +4 -4
- package/dist/esm/client/wasm.js +7 -7
- package/dist/esm/core/accounts.d.ts +11 -11
- package/dist/esm/core/accounts.js +3 -3
- package/dist/esm/core/modules.d.ts +12 -12
- package/dist/esm/core/modules.js +10 -10
- package/dist/esm/core/tx.d.ts +12 -12
- package/dist/esm/core/tx.js +7 -7
- package/dist/esm/cosmjs.d.ts +2 -2
- package/dist/esm/cosmjs.js +7 -7
- package/dist/esm/exports.d.ts +2 -2
- package/dist/esm/exports.js +7 -7
- package/dist/esm/{index-DG-I0T6b.d.ts → index-BLlbbiGL.d.ts} +1 -1
- package/dist/{cjs/index-B8XGu-SI.d.cts → esm/index-BeikP7Cq.d.ts} +35 -350
- package/dist/esm/{index-B2tw9CHl.d.ts → index-CQGymzVV.d.ts} +1 -1
- package/dist/esm/{index-BtOljr6v.d.ts → index-DhhaPvLx.d.ts} +1 -1
- package/dist/{cjs/index-4IPdy0bE.d.cts → esm/index-DjAbTs6N.d.ts} +34 -84
- package/dist/{cjs/index-Zlg1uSyt.d.cts → esm/index-DyuSCKzD.d.ts} +25673 -26257
- package/dist/esm/{index-CJxCX4wl.d.ts → index-KPxccQ6b.d.ts} +1 -1
- package/dist/esm/{index-BHELcAAg.d.ts → index-SCzTXWme.d.ts} +2 -2
- package/dist/esm/{index-OpqhooKr.d.ts → index-c0wEF5XN.d.ts} +1 -1
- package/dist/esm/index.d.ts +12 -12
- package/dist/esm/index.js +13 -13
- package/dist/{cjs/light-B-3BDUJ7.d.cts → esm/light-cJI0PSqu.d.ts} +3 -0
- package/dist/esm/proto/cosmos-tx.d.ts +1 -1
- package/dist/esm/service.d.ts +4 -4
- package/dist/esm/service.js +1 -1
- package/dist/esm/{tx-C9bEwXA1.js → tx-COcI7kYx.js} +4 -4
- package/dist/esm/{tx_pb-Blty6MDM.d.ts → tx_pb-pR8s8ZkE.d.ts} +58 -107
- package/dist/esm/types/light.d.ts +1 -1
- package/dist/esm/types.d.ts +3 -3
- package/dist/esm/{utils-Cs0fKB6M.js → utils-Bprop_i9.js} +14 -24
- package/dist/esm/utils.d.ts +11 -11
- package/dist/esm/utils.js +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#endregion
|
|
2
|
-
//#region ../../node_modules/.pnpm/@injectivelabs+core-proto-ts-v2@1.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@injectivelabs+core-proto-ts-v2@1.21.0-alpha.0/node_modules/@injectivelabs/core-proto-ts-v2/generated/cosmos/base/v1beta1/coin_pb.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Coin defines a token with a denomination and an amount.
|
|
5
5
|
*
|
|
@@ -45,7 +45,7 @@ declare const Coin = new Coin$Type();
|
|
|
45
45
|
*/
|
|
46
46
|
declare const DecCoin = new DecCoin$Type();
|
|
47
47
|
//#endregion
|
|
48
|
-
//#region ../../node_modules/.pnpm/@injectivelabs+core-proto-ts-v2@1.
|
|
48
|
+
//#region ../../node_modules/.pnpm/@injectivelabs+core-proto-ts-v2@1.21.0-alpha.0/node_modules/@injectivelabs/core-proto-ts-v2/generated/cosmos/crypto/multisig/v1beta1/multisig_pb.d.ts
|
|
49
49
|
/**
|
|
50
50
|
* CompactBitArray is an implementation of a space efficient bit array.
|
|
51
51
|
* This is used to ensure that the encoded data takes up a minimal amount of
|
|
@@ -69,135 +69,79 @@ interface CompactBitArray {
|
|
|
69
69
|
*/
|
|
70
70
|
declare const CompactBitArray = new CompactBitArray$Type();
|
|
71
71
|
//#endregion
|
|
72
|
-
//#region ../../node_modules/.pnpm/@injectivelabs+core-proto-ts-v2@1.
|
|
72
|
+
//#region ../../node_modules/.pnpm/@injectivelabs+core-proto-ts-v2@1.21.0-alpha.0/node_modules/@injectivelabs/core-proto-ts-v2/generated/google/protobuf/any_pb.d.ts
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
76
76
|
* URL that describes the type of the serialized message.
|
|
77
77
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
78
|
+
* In its binary encoding, an `Any` is an ordinary message; but in other wire
|
|
79
|
+
* forms like JSON, it has a special encoding. The format of the type URL is
|
|
80
|
+
* described on the `type_url` field.
|
|
80
81
|
*
|
|
81
|
-
*
|
|
82
|
+
* Protobuf APIs provide utilities to interact with `Any` values:
|
|
82
83
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
84
|
+
* - A 'pack' operation accepts a message and constructs a generic `Any` wrapper
|
|
85
|
+
* around it.
|
|
86
|
+
* - An 'unpack' operation reads the content of an `Any` message, either into an
|
|
87
|
+
* existing message or a new one. Unpack operations must check the type of the
|
|
88
|
+
* value they unpack against the declared `type_url`.
|
|
89
|
+
* - An 'is' operation decides whether an `Any` contains a message of the given
|
|
90
|
+
* type, i.e. whether it can 'unpack' that type.
|
|
90
91
|
*
|
|
91
|
-
*
|
|
92
|
+
* The JSON format representation of an `Any` follows one of these cases:
|
|
92
93
|
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* if (any.isSameTypeAs(Foo.getDefaultInstance())) {
|
|
101
|
-
* foo = any.unpack(Foo.getDefaultInstance());
|
|
102
|
-
* }
|
|
103
|
-
*
|
|
104
|
-
* Example 3: Pack and unpack a message in Python.
|
|
105
|
-
*
|
|
106
|
-
* foo = Foo(...)
|
|
107
|
-
* any = Any()
|
|
108
|
-
* any.Pack(foo)
|
|
109
|
-
* ...
|
|
110
|
-
* if any.Is(Foo.DESCRIPTOR):
|
|
111
|
-
* any.Unpack(foo)
|
|
112
|
-
* ...
|
|
113
|
-
*
|
|
114
|
-
* Example 4: Pack and unpack a message in Go
|
|
115
|
-
*
|
|
116
|
-
* foo := &pb.Foo{...}
|
|
117
|
-
* any, err := anypb.New(foo)
|
|
118
|
-
* if err != nil {
|
|
119
|
-
* ...
|
|
120
|
-
* }
|
|
121
|
-
* ...
|
|
122
|
-
* foo := &pb.Foo{}
|
|
123
|
-
* if err := any.UnmarshalTo(foo); err != nil {
|
|
124
|
-
* ...
|
|
125
|
-
* }
|
|
126
|
-
*
|
|
127
|
-
* The pack methods provided by protobuf library will by default use
|
|
128
|
-
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
|
129
|
-
* methods only use the fully qualified type name after the last '/'
|
|
130
|
-
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
|
131
|
-
* name "y.z".
|
|
132
|
-
*
|
|
133
|
-
* JSON
|
|
134
|
-
* ====
|
|
135
|
-
* The JSON representation of an `Any` value uses the regular
|
|
136
|
-
* representation of the deserialized, embedded message, with an
|
|
137
|
-
* additional field `@type` which contains the type URL. Example:
|
|
138
|
-
*
|
|
139
|
-
* package google.profile;
|
|
140
|
-
* message Person {
|
|
141
|
-
* string first_name = 1;
|
|
142
|
-
* string last_name = 2;
|
|
143
|
-
* }
|
|
144
|
-
*
|
|
145
|
-
* {
|
|
146
|
-
* "@type": "type.googleapis.com/google.profile.Person",
|
|
147
|
-
* "firstName": <string>,
|
|
148
|
-
* "lastName": <string>
|
|
149
|
-
* }
|
|
150
|
-
*
|
|
151
|
-
* If the embedded message type is well-known and has a custom JSON
|
|
152
|
-
* representation, that representation will be embedded adding a field
|
|
153
|
-
* `value` which holds the custom JSON in addition to the `@type`
|
|
154
|
-
* field. Example (for message [google.protobuf.Duration][]):
|
|
155
|
-
*
|
|
156
|
-
* {
|
|
157
|
-
* "@type": "type.googleapis.com/google.protobuf.Duration",
|
|
158
|
-
* "value": "1.212s"
|
|
159
|
-
* }
|
|
94
|
+
* - For types without special-cased JSON encodings, the JSON format
|
|
95
|
+
* representation of the `Any` is the same as that of the message, with an
|
|
96
|
+
* additional `@type` field which contains the type URL.
|
|
97
|
+
* - For types with special-cased JSON encodings (typically called 'well-known'
|
|
98
|
+
* types, listed in https://protobuf.dev/programming-guides/json/#any), the
|
|
99
|
+
* JSON format representation has a key `@type` which contains the type URL
|
|
100
|
+
* and a key `value` which contains the JSON-serialized value.
|
|
160
101
|
*
|
|
102
|
+
* The text format representation of an `Any` is like a message with one field
|
|
103
|
+
* whose name is the type URL in brackets. For example, an `Any` containing a
|
|
104
|
+
* `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`.
|
|
161
105
|
*
|
|
162
106
|
* @generated from protobuf message google.protobuf.Any
|
|
163
107
|
*/
|
|
164
108
|
interface Any {
|
|
165
109
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* one "/" character. The last segment of the URL's path must represent
|
|
169
|
-
* the fully qualified name of the type (as in
|
|
170
|
-
* `path/google.protobuf.Duration`). The name should be in a canonical form
|
|
171
|
-
* (e.g., leading "." is not accepted).
|
|
110
|
+
* Identifies the type of the serialized Protobuf message with a URI reference
|
|
111
|
+
* consisting of a prefix ending in a slash and the fully-qualified type name.
|
|
172
112
|
*
|
|
173
|
-
*
|
|
174
|
-
* expect it to use in the context of Any. However, for URLs which use the
|
|
175
|
-
* scheme `http`, `https`, or no scheme, one can optionally set up a type
|
|
176
|
-
* server that maps type URLs to message definitions as follows:
|
|
113
|
+
* Example: type.googleapis.com/google.protobuf.StringValue
|
|
177
114
|
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* URL, or have them precompiled into a binary to avoid any
|
|
183
|
-
* lookup. Therefore, binary compatibility needs to be preserved
|
|
184
|
-
* on changes to types. (Use versioned type names to manage
|
|
185
|
-
* breaking changes.)
|
|
115
|
+
* This string must contain at least one `/` character, and the content after
|
|
116
|
+
* the last `/` must be the fully-qualified name of the type in canonical
|
|
117
|
+
* form, without a leading dot. Do not write a scheme on these URI references
|
|
118
|
+
* so that clients do not attempt to contact them.
|
|
186
119
|
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
* type.googleapis.com
|
|
190
|
-
* implementations
|
|
120
|
+
* The prefix is arbitrary and Protobuf implementations are expected to
|
|
121
|
+
* simply strip off everything up to and including the last `/` to identify
|
|
122
|
+
* the type. `type.googleapis.com/` is a common default prefix that some
|
|
123
|
+
* legacy implementations require. This prefix does not indicate the origin of
|
|
124
|
+
* the type, and URIs containing it are not expected to respond to any
|
|
125
|
+
* requests.
|
|
191
126
|
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
127
|
+
* All type URL strings must be legal URI references with the additional
|
|
128
|
+
* restriction (for the text format) that the content of the reference
|
|
129
|
+
* must consist only of alphanumeric characters, percent-encoded escapes, and
|
|
130
|
+
* characters in the following set (not including the outer backticks):
|
|
131
|
+
* `/-.~_!$&()*+,;=`. Despite our allowing percent encodings, implementations
|
|
132
|
+
* should not unescape them to prevent confusion with existing parsers. For
|
|
133
|
+
* example, `type.googleapis.com%2FFoo` should be rejected.
|
|
194
134
|
*
|
|
135
|
+
* In the original design of `Any`, the possibility of launching a type
|
|
136
|
+
* resolution service at these type URLs was considered but Protobuf never
|
|
137
|
+
* implemented one and considers contacting these URLs to be problematic and
|
|
138
|
+
* a potential security issue. Do not attempt to contact type URLs.
|
|
195
139
|
*
|
|
196
140
|
* @generated from protobuf field: string type_url = 1
|
|
197
141
|
*/
|
|
198
142
|
typeUrl: string;
|
|
199
143
|
/**
|
|
200
|
-
*
|
|
144
|
+
* Holds a Protobuf serialization of the type described by type_url.
|
|
201
145
|
*
|
|
202
146
|
* @generated from protobuf field: bytes value = 2
|
|
203
147
|
*/
|
|
@@ -208,7 +152,7 @@ interface Any {
|
|
|
208
152
|
*/
|
|
209
153
|
declare const Any = new Any$Type();
|
|
210
154
|
//#endregion
|
|
211
|
-
//#region ../../node_modules/.pnpm/@injectivelabs+core-proto-ts-v2@1.
|
|
155
|
+
//#region ../../node_modules/.pnpm/@injectivelabs+core-proto-ts-v2@1.21.0-alpha.0/node_modules/@injectivelabs/core-proto-ts-v2/generated/cosmos/tx/signing/v1beta1/signing_pb.d.ts
|
|
212
156
|
|
|
213
157
|
/**
|
|
214
158
|
* SignMode represents a signing mode with its own security guarantees.
|
|
@@ -271,6 +215,13 @@ declare enum SignMode {
|
|
|
271
215
|
* @generated from protobuf enum value: SIGN_MODE_EIP712_V2 = 128;
|
|
272
216
|
*/
|
|
273
217
|
EIP712_V2 = 128,
|
|
218
|
+
/**
|
|
219
|
+
* SIGN_MODE_EIP712_V3 uses the V2 transaction payload with a bytes32 zero salt.
|
|
220
|
+
* Signature verification is implemented in injective core.
|
|
221
|
+
*
|
|
222
|
+
* @generated from protobuf enum value: SIGN_MODE_EIP712_V3 = 129;
|
|
223
|
+
*/
|
|
224
|
+
EIP712_V3 = 129,
|
|
274
225
|
/**
|
|
275
226
|
* SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos
|
|
276
227
|
* SDK. Ref: https://eips.ethereum.org/EIPS/eip-191
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as TradeExecutionType, S as TradeExecutionSide, _ as StreamEvent, a as GrpcOrderTypeMap, b as TokenVerification, c as MarketStatusMap, d as OracleTypeMap, f as OrderSide, g as StreamDisconnectReason, h as OrderTypeMap, i as GrpcOrderType, l as MarketType, m as OrderType, n as GrpcMarketStatus, o as GrpcStatusCode, p as OrderState, r as GrpcMarketStatusMap, s as MarketStatus, t as GridStrategyType, u as OracleType, v as StreamOperation, x as TradeDirection, y as TokenType } from "../light-
|
|
1
|
+
import { C as TradeExecutionType, S as TradeExecutionSide, _ as StreamEvent, a as GrpcOrderTypeMap, b as TokenVerification, c as MarketStatusMap, d as OracleTypeMap, f as OrderSide, g as StreamDisconnectReason, h as OrderTypeMap, i as GrpcOrderType, l as MarketType, m as OrderType, n as GrpcMarketStatus, o as GrpcStatusCode, p as OrderState, r as GrpcMarketStatusMap, s as MarketStatus, t as GridStrategyType, u as OracleType, v as StreamOperation, x as TradeDirection, y as TokenType } from "../light-Dyi8qJP_.cjs";
|
|
2
2
|
export { GridStrategyType, GrpcMarketStatus, GrpcMarketStatusMap, GrpcOrderType, GrpcOrderTypeMap, GrpcStatusCode, MarketStatus, MarketStatusMap, MarketType, OracleType, OracleTypeMap, OrderSide, OrderState, OrderType, OrderTypeMap, StreamDisconnectReason, StreamEvent, StreamOperation, TokenType, TokenVerification, TradeDirection, TradeExecutionSide, TradeExecutionType };
|
package/dist/cjs/types.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./tx_pb-
|
|
2
|
-
import { a as PaginationOption, at as
|
|
3
|
-
import { C as TradeExecutionType, S as TradeExecutionSide, _ as StreamEvent, b as TokenVerification, f as OrderSide, g as StreamDisconnectReason, o as GrpcStatusCode, p as OrderState, v as StreamOperation, x as TradeDirection, y as TokenType } from "./light-
|
|
1
|
+
import "./tx_pb-rX24LEP1.cjs";
|
|
2
|
+
import { a as PaginationOption, at as StreamManagerEvents, c as DirectSignResponse, ct as StreamSubscription, d as TxRaw, dt as TokenStatic, f as GrpcWebTransportAdditionalOptions, h as OrderMaskMap, i as Pagination, it as StreamManagerConfig, l as GrpcCoin, lt as TokenMeta, m as OrderMask, n as ExchangePagination, nt as ResolvedStreamManagerConfig, o as AminoSignResponse, ot as StreamManagerRetryConfig, r as PagePagination, rt as StreamError, s as Coin, st as StreamState, t as RequestOptions, u as SignDoc, ut as TokenSource } from "./index-CBEIfBLI.cjs";
|
|
3
|
+
import { C as TradeExecutionType, S as TradeExecutionSide, _ as StreamEvent, b as TokenVerification, f as OrderSide, g as StreamDisconnectReason, o as GrpcStatusCode, p as OrderState, v as StreamOperation, x as TradeDirection, y as TokenType } from "./light-Dyi8qJP_.cjs";
|
|
4
4
|
export { AminoSignResponse, Coin, DirectSignResponse, ExchangePagination, GrpcCoin, GrpcStatusCode, GrpcWebTransportAdditionalOptions, OrderMask, OrderMaskMap, OrderSide, OrderState, PagePagination, Pagination, PaginationOption, RequestOptions, ResolvedStreamManagerConfig, SignDoc, StreamDisconnectReason, StreamError, StreamEvent, StreamManagerConfig, StreamManagerEvents, StreamManagerRetryConfig, StreamOperation, StreamState, StreamSubscription, TokenMeta, TokenSource, TokenStatic, TokenType, TokenVerification, TradeDirection, TradeExecutionSide, TradeExecutionType, TxRaw };
|
|
@@ -55,48 +55,38 @@ const protobufTimestampToUnixMs = (timestamp) => {
|
|
|
55
55
|
//#region src/utils/msgs.ts
|
|
56
56
|
const fixedExchangeGas = {
|
|
57
57
|
MsgCreateDerivativeLimitOrder: {
|
|
58
|
-
gas:
|
|
59
|
-
postOnlyGas:
|
|
58
|
+
gas: 56e4,
|
|
59
|
+
postOnlyGas: 62e4,
|
|
60
60
|
hasOrder: true
|
|
61
61
|
},
|
|
62
62
|
MsgCreateDerivativeMarketOrder: {
|
|
63
|
-
gas:
|
|
63
|
+
gas: 55e4,
|
|
64
64
|
hasOrder: true
|
|
65
65
|
},
|
|
66
|
-
MsgCancelDerivativeOrder: { gas:
|
|
66
|
+
MsgCancelDerivativeOrder: { gas: 372e3 },
|
|
67
67
|
MsgCreateSpotLimitOrder: {
|
|
68
|
-
gas:
|
|
69
|
-
postOnlyGas:
|
|
68
|
+
gas: 54e4,
|
|
69
|
+
postOnlyGas: 59e4,
|
|
70
70
|
hasOrder: true
|
|
71
71
|
},
|
|
72
72
|
MsgCreateSpotMarketOrder: {
|
|
73
|
-
gas:
|
|
73
|
+
gas: 54e4,
|
|
74
74
|
hasOrder: true
|
|
75
75
|
},
|
|
76
|
-
MsgCancelSpotOrder: { gas:
|
|
77
|
-
MsgCreateBinaryOptionsLimitOrder: {
|
|
78
|
-
gas: 33e4,
|
|
79
|
-
postOnlyGas: 37e4,
|
|
80
|
-
hasOrder: true
|
|
81
|
-
},
|
|
82
|
-
MsgCreateBinaryOptionsMarketOrder: {
|
|
83
|
-
gas: 31e4,
|
|
84
|
-
hasOrder: true
|
|
85
|
-
},
|
|
86
|
-
MsgCancelBinaryOptionsOrder: { gas: 2e5 },
|
|
76
|
+
MsgCancelSpotOrder: { gas: 362e3 },
|
|
87
77
|
MsgDeposit: { gas: 33e4 },
|
|
88
78
|
MsgWithdraw: { gas: 32e4 },
|
|
89
79
|
MsgSubaccountTransfer: { gas: 22e4 },
|
|
90
80
|
MsgExternalTransfer: { gas: 3e5 },
|
|
91
|
-
MsgIncreasePositionMargin: { gas:
|
|
92
|
-
MsgDecreasePositionMargin: { gas:
|
|
81
|
+
MsgIncreasePositionMargin: { gas: 35e4 },
|
|
82
|
+
MsgDecreasePositionMargin: { gas: 36e4 }
|
|
93
83
|
};
|
|
84
|
+
const orderAdmissionGas = 12e3;
|
|
94
85
|
const batchAnteGas = 12e4;
|
|
95
86
|
const batchAnteGasPerOrder = 3e3;
|
|
96
87
|
const batchExchangeGasPerOrder = {
|
|
97
|
-
MsgBatchCancelSpotOrders:
|
|
98
|
-
MsgBatchCancelDerivativeOrders:
|
|
99
|
-
MsgBatchCancelBinaryOptionsOrders: 123e3
|
|
88
|
+
MsgBatchCancelSpotOrders: 242e3,
|
|
89
|
+
MsgBatchCancelDerivativeOrders: 252e3
|
|
100
90
|
};
|
|
101
91
|
const fixedExchangeType = /^\/injective\.exchange\.v(?:1beta1|2)\.(Msg\w+)$/;
|
|
102
92
|
const postOnlyOrderTypes = new Set([require_light.OrderTypeMap.BUY_PO, require_light.OrderTypeMap.SELL_PO]);
|
|
@@ -134,7 +124,7 @@ const getFixedGasLimitBasedOnMessage = (msgs) => {
|
|
|
134
124
|
if ("hasOrder" in policy && !order) return;
|
|
135
125
|
const baseGas = (order === null || order === void 0 ? void 0 : order.orderType) !== void 0 && postOnlyOrderTypes.has(order.orderType) && "postOnlyGas" in policy ? policy.postOnlyGas : policy.gas;
|
|
136
126
|
const hasExpirationBlock = ((_order$expirationBloc = order === null || order === void 0 ? void 0 : order.expirationBlock) !== null && _order$expirationBloc !== void 0 ? _order$expirationBloc : 0n) > 0n;
|
|
137
|
-
gas += hasExpirationBlock ? baseGas + baseGas / 10 : baseGas;
|
|
127
|
+
gas += (hasExpirationBlock ? baseGas + baseGas / 10 : baseGas) + ("hasOrder" in policy ? orderAdmissionGas : 0);
|
|
138
128
|
}
|
|
139
129
|
return gas;
|
|
140
130
|
};
|
package/dist/cjs/utils.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
2
|
const require_encoding_light = require('./encoding-light-D96nxVLW.cjs');
|
|
3
3
|
const require_constants = require('./constants-tPGACRGC.cjs');
|
|
4
|
-
const require_utils = require('./utils-
|
|
4
|
+
const require_utils = require('./utils-CjlVVckg.cjs');
|
|
5
5
|
require('./light-zeGviAVI.cjs');
|
|
6
6
|
const require_grpc = require('./grpc-D_3PKEFB.cjs');
|
|
7
7
|
const require_coins = require('./coins-DBj8089z.cjs');
|
package/dist/cjs/utils.d.cts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "./tx_pb-
|
|
2
|
-
import "./index-
|
|
3
|
-
import "./light-
|
|
4
|
-
import { $
|
|
5
|
-
import "./BaseGrpcConsumer-
|
|
6
|
-
import "./index-
|
|
7
|
-
import "./index-
|
|
1
|
+
import "./tx_pb-rX24LEP1.cjs";
|
|
2
|
+
import "./index-CBEIfBLI.cjs";
|
|
3
|
+
import "./light-Dyi8qJP_.cjs";
|
|
4
|
+
import { $g as TypedDataUtilsSanitizeData, $h as denomAmountFromChainDenomAmountToFixed, Ag as spotPriceToChainPriceToFixed, Bg as hexToNumber, Bh as grpcPagingToPaging, Cg as getSignificantDecimalsFromNumber, Dg as spotPriceFromChainPrice, Eg as numberToCosmosSdkDecString, Fg as bigIntReplacer, Fh as isAbortError, Gg as isServerSide, Gh as getChecksumAddress, Hg as isJsonString, Hh as pageRequestToGrpcPageRequestV2, Ig as bigIntToNumber, Ih as recoverTypedSignaturePubKey, Jg as safeBigIntStringify, Jh as getSpotMarketDecimals, Kg as objectToJson, Kh as getDerivativeMarketDecimals, Lg as bigIntToString, Lh as fetchAllWithPagination, Mg as spotQuantityFromChainQuantityToFixed, Ng as spotQuantityToChainQuantity, OS as GrpcWebFetchTransport, Og as spotPriceFromChainPriceToFixed, Pg as spotQuantityToChainQuantityToFixed, Ph as AbortError, Qg as TypedDataUtilsHashStruct, Qh as denomAmountFromChainDenomAmount, Rg as getErrorMessage, Rh as fetchAllWithTokenPagination, S_ as protobufTimestampToUnixSeconds, Sg as getExactDecimalsFromNumber, Tg as isNumber, Ug as isNode, Uh as paginationRequestFromPagination, Vg as isBrowser, Vh as grpcPagingToPagingV2, Wg as isReactNative, Wh as paginationUint8ArrayToString, Xg as sortObjectByKeysWithReduce, Xh as amountToCosmosSdkDecAmount, Yg as sortObjectByKeys, Yh as getSpotMarketTensMultiplier, Zg as SignTypedDataVersionV4, Zh as cosmosSdkDecToBigNumber, __ as getGasPriceBasedOnMessage, _g as formatAmountToAllowableDecimals, a_ as privateKeyHashToPublicKey, ag as derivativeMarginFromChainMarginToFixed, b_ as protobufTimestampToDate, bg as formatPriceToAllowableDecimals, c_ as privateKeyToPublicKeyBase64, cg as derivativePriceFromChainPrice, d_ as sanitizeTypedData, dg as derivativePriceToChainPriceToFixed, e_ as TypedMessageV4, eg as denomAmountFromGrpcChainDenomAmount, f_ as sha256, fg as derivativeQuantityFromChainQuantity, g_ as getGasOptionsBasedOnMessage, gg as formatAmountToAllowableAmount, h_ as getFixedGasLimitBasedOnMessage, hg as derivativeQuantityToChainQuantityToFixed, i_ as messageHash, ig as derivativeMarginFromChainMargin, jg as spotQuantityFromChainQuantity, kg as spotPriceToChainPrice, l_ as publicKeyToAddress, lg as derivativePriceFromChainPriceToFixed, m_ as getGrpcWebTransport, mg as derivativeQuantityToChainQuantity, n_ as domainHash, ng as denomAmountToChainDenomAmountToFixed, o_ as privateKeyHashToPublicKeyBase64, og as derivativeMarginToChainMargin, p_ as ofacList, pg as derivativeQuantityFromChainQuantityToFixed, qg as protoObjectToJson, qh as getDerivativeMarketTensMultiplier, r_ as hashToHex, rg as denomAmountToGrpcChainDenomAmount, s_ as privateKeyToPublicKey, sg as derivativeMarginToChainMarginToFixed, t_ as decompressPubKey, tg as denomAmountToChainDenomAmount, u_ as ripemd160, ug as derivativePriceToChainPrice, v_ as makeTimeoutTimestamp, vg as formatNumberToAllowableDecimals, wg as getTensMultiplier, x_ as protobufTimestampToUnixMs, xg as formatPriceToAllowablePrice, y_ as makeTimeoutTimestampInNs, yg as formatNumberToAllowableTensMultiplier, zg as grpcCoinToUiCoin, zh as grpcPaginationToPagination } from "./index-B7LT8B2g.cjs";
|
|
5
|
+
import "./BaseGrpcConsumer-CRYBdXm9.cjs";
|
|
6
|
+
import "./index-5s92DIT3.cjs";
|
|
7
|
+
import "./index-CKFM2Zot.cjs";
|
|
8
8
|
import { t as parseCoins } from "./coins-CSrwziXH.cjs";
|
|
9
9
|
import { a as getEthereumAddress, c as getSubaccountId, d as removeHexPrefix, i as getDefaultSubaccountId, l as hexToBytes, n as bytesToHex, o as getInjectiveAddress, r as getAddressFromInjectiveAddress, s as getInjectiveAddressFromSubaccountId, t as addHexPrefix, u as isCw20ContractAddress } from "./address-light-CnSMr-vR.cjs";
|
|
10
10
|
import { a as fromBase64, c as hexToBuff, d as toBase64, f as toUtf8, h as uint8ArrayToString, i as concatUint8Arrays, l as hexToUint8Array, m as uint8ArrayToHex, n as base64ToUtf8, o as fromUtf8, p as uint8ArrayToBase64, r as binaryToBase64, s as hexToBase64, t as base64ToUint8Array, u as stringToUint8Array } from "./encoding-light-D-6m9tHO.cjs";
|
|
11
11
|
import { a as BECH32_PUBKEY_CONS_PREFIX, i as BECH32_PUBKEY_ACC_PREFIX, n as BECH32_ADDR_CONS_PREFIX, o as BECH32_PUBKEY_VAL_PREFIX, r as BECH32_ADDR_VAL_PREFIX, s as DEFAULT_DERIVATION_PATH, t as BECH32_ADDR_ACC_PREFIX } from "./constants-DQTrjP5R.cjs";
|
|
12
|
-
import "./index-
|
|
13
|
-
import "./index-
|
|
14
|
-
import "./index-
|
|
15
|
-
import "./index-
|
|
12
|
+
import "./index-BNqPdwIL.cjs";
|
|
13
|
+
import "./index-DzI7PClu.cjs";
|
|
14
|
+
import "./index-fb-zX9fQ.cjs";
|
|
15
|
+
import "./index-CcNtmgW5.cjs";
|
|
16
16
|
export { AbortError, BECH32_ADDR_ACC_PREFIX, BECH32_ADDR_CONS_PREFIX, BECH32_ADDR_VAL_PREFIX, BECH32_PUBKEY_ACC_PREFIX, BECH32_PUBKEY_CONS_PREFIX, BECH32_PUBKEY_VAL_PREFIX, DEFAULT_DERIVATION_PATH, GrpcWebFetchTransport, SignTypedDataVersionV4, TypedDataUtilsHashStruct, TypedDataUtilsSanitizeData, TypedMessageV4, addHexPrefix, amountToCosmosSdkDecAmount, base64ToUint8Array, base64ToUtf8, bigIntReplacer, bigIntToNumber, bigIntToString, binaryToBase64, bytesToHex, concatUint8Arrays, cosmosSdkDecToBigNumber, decompressPubKey, denomAmountFromChainDenomAmount, denomAmountFromChainDenomAmountToFixed, denomAmountFromGrpcChainDenomAmount, denomAmountToChainDenomAmount, denomAmountToChainDenomAmountToFixed, denomAmountToGrpcChainDenomAmount, derivativeMarginFromChainMargin, derivativeMarginFromChainMarginToFixed, derivativeMarginToChainMargin, derivativeMarginToChainMarginToFixed, derivativePriceFromChainPrice, derivativePriceFromChainPriceToFixed, derivativePriceToChainPrice, derivativePriceToChainPriceToFixed, derivativeQuantityFromChainQuantity, derivativeQuantityFromChainQuantityToFixed, derivativeQuantityToChainQuantity, derivativeQuantityToChainQuantityToFixed, domainHash, fetchAllWithPagination, fetchAllWithTokenPagination, formatAmountToAllowableAmount, formatAmountToAllowableDecimals, formatNumberToAllowableDecimals, formatNumberToAllowableTensMultiplier, formatPriceToAllowableDecimals, formatPriceToAllowablePrice, fromBase64, fromUtf8, getAddressFromInjectiveAddress, getChecksumAddress, getDefaultSubaccountId, getDerivativeMarketDecimals, getDerivativeMarketTensMultiplier, getErrorMessage, getEthereumAddress, getExactDecimalsFromNumber, getFixedGasLimitBasedOnMessage, getGasOptionsBasedOnMessage, getGasPriceBasedOnMessage, getGrpcWebTransport, getInjectiveAddress, getInjectiveAddressFromSubaccountId, getSignificantDecimalsFromNumber, getSpotMarketDecimals, getSpotMarketTensMultiplier, getSubaccountId, getTensMultiplier, grpcCoinToUiCoin, grpcPaginationToPagination, grpcPagingToPaging, grpcPagingToPagingV2, hashToHex, hexToBase64, hexToBuff, hexToBytes, hexToNumber, hexToUint8Array, isAbortError, isBrowser, isCw20ContractAddress, isJsonString, isNode, isNumber, isReactNative, isServerSide, makeTimeoutTimestamp, makeTimeoutTimestampInNs, messageHash, numberToCosmosSdkDecString, objectToJson, ofacList, pageRequestToGrpcPageRequestV2, paginationRequestFromPagination, paginationUint8ArrayToString, parseCoins, privateKeyHashToPublicKey, privateKeyHashToPublicKeyBase64, privateKeyToPublicKey, privateKeyToPublicKeyBase64, protoObjectToJson, protobufTimestampToDate, protobufTimestampToUnixMs, protobufTimestampToUnixSeconds, publicKeyToAddress, recoverTypedSignaturePubKey, removeHexPrefix, ripemd160, safeBigIntStringify, sanitizeTypedData, sha256, sortObjectByKeys, sortObjectByKeysWithReduce, spotPriceFromChainPrice, spotPriceFromChainPriceToFixed, spotPriceToChainPrice, spotPriceToChainPriceToFixed, spotQuantityFromChainQuantity, spotQuantityFromChainQuantityToFixed, spotQuantityToChainQuantity, spotQuantityToChainQuantityToFixed, stringToUint8Array, toBase64, toUtf8, uint8ArrayToBase64, uint8ArrayToHex, uint8ArrayToString };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _t as
|
|
1
|
+
import { _t as ServerStreamingCall, f as GrpcWebTransportAdditionalOptions, ft as RpcOptions, gt as ClientStreamingCall, ht as DuplexStreamingCall, mt as UnaryCall, pt as RpcTransport, vt as MethodInfo } from "./index-DjAbTs6N.js";
|
|
2
2
|
import { RetryOptions } from "@injectivelabs/utils";
|
|
3
3
|
|
|
4
4
|
//#region src/client/base/GrpcWebRpcTransport.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as _defineProperty } from "./defineProperty-BwBXXd7t.js";
|
|
2
|
-
import { S as denomAmountFromGrpcChainDenomAmount } from "./utils-
|
|
3
|
-
import { o as ChainModule } from "./ChainRestTendermintApi-
|
|
2
|
+
import { S as denomAmountFromGrpcChainDenomAmount } from "./utils-Bprop_i9.js";
|
|
3
|
+
import { o as ChainModule } from "./ChainRestTendermintApi-DGLg38SO.js";
|
|
4
4
|
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-lXuwo8W3.js";
|
|
5
5
|
import { throwIfAborted, toHumanReadable } from "@injectivelabs/utils";
|
|
6
6
|
import * as InjectiveExchangeV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v1beta1/query_pb";
|
|
@@ -68,15 +68,6 @@ var ChainGrpcExchangeTransformer = class ChainGrpcExchangeTransformer {
|
|
|
68
68
|
disqualifiedMarketIdsList: schedule.disqualifiedMarketIds
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
static tradingRewardsCampaignResponseToTradingRewardsCampaign(response) {
|
|
72
|
-
return {
|
|
73
|
-
tradingRewardCampaignInfo: ChainGrpcExchangeTransformer.grpcTradingRewardCampaignInfoToTradingRewardCampaignInfo(response.tradingRewardCampaignInfo),
|
|
74
|
-
tradingRewardPoolCampaignScheduleList: response.tradingRewardPoolCampaignSchedule.map(ChainGrpcExchangeTransformer.grpcCampaignRewardPoolToCampaignRewardPool),
|
|
75
|
-
pendingTradingRewardPoolCampaignScheduleList: response.pendingTradingRewardPoolCampaignSchedule.map(ChainGrpcExchangeTransformer.grpcCampaignRewardPoolToCampaignRewardPool),
|
|
76
|
-
totalTradeRewardPoints: response.totalTradeRewardPoints,
|
|
77
|
-
pendingTotalTradeRewardPointsList: response.pendingTotalTradeRewardPoints
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
71
|
static feeDiscountAccountInfoResponseToFeeDiscountAccountInfo(response) {
|
|
81
72
|
return {
|
|
82
73
|
tierLevel: Number(response.tierLevel),
|
|
@@ -100,39 +91,6 @@ var ChainGrpcExchangeTransformer = class ChainGrpcExchangeTransformer {
|
|
|
100
91
|
ttlTimestamp: parseInt(info.ttlTimestamp.toString(), 10)
|
|
101
92
|
};
|
|
102
93
|
}
|
|
103
|
-
static grpcPointsMultiplierToPointsMultiplier(point) {
|
|
104
|
-
return {
|
|
105
|
-
makerPointsMultiplier: point.makerPointsMultiplier,
|
|
106
|
-
takerPointsMultiplier: point.takerPointsMultiplier
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
static grpcTradingRewardCampaignBoostInfoToTradingRewardCampaignBoostInfo(info) {
|
|
110
|
-
if (!info) return;
|
|
111
|
-
return {
|
|
112
|
-
boostedSpotMarketIdsList: info.boostedSpotMarketIds,
|
|
113
|
-
boostedDerivativeMarketIdsList: info.boostedDerivativeMarketIds,
|
|
114
|
-
spotMarketMultipliersList: info.spotMarketMultipliers.map(ChainGrpcExchangeTransformer.grpcPointsMultiplierToPointsMultiplier),
|
|
115
|
-
derivativeMarketMultipliersList: info.derivativeMarketMultipliers.map(ChainGrpcExchangeTransformer.grpcPointsMultiplierToPointsMultiplier)
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
static grpcTradingRewardCampaignInfoToTradingRewardCampaignInfo(info) {
|
|
119
|
-
if (!info) return;
|
|
120
|
-
return {
|
|
121
|
-
campaignDurationSeconds: parseInt(info.campaignDurationSeconds.toString(), 10),
|
|
122
|
-
quoteDenomsList: info.quoteDenoms,
|
|
123
|
-
tradingRewardBoostInfo: ChainGrpcExchangeTransformer.grpcTradingRewardCampaignBoostInfoToTradingRewardCampaignBoostInfo(info.tradingRewardBoostInfo),
|
|
124
|
-
disqualifiedMarketIdsList: info.disqualifiedMarketIds
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
static grpcCampaignRewardPoolToCampaignRewardPool(pool) {
|
|
128
|
-
return {
|
|
129
|
-
startTimestamp: parseInt(pool.startTimestamp.toString(), 10),
|
|
130
|
-
maxCampaignRewardsList: pool.maxCampaignRewards.map((coin) => ({
|
|
131
|
-
amount: coin.amount,
|
|
132
|
-
denom: coin.denom
|
|
133
|
-
}))
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
94
|
static grpcPositionToPosition(position) {
|
|
137
95
|
return {
|
|
138
96
|
islong: position.isLong,
|
|
@@ -148,9 +106,6 @@ var ChainGrpcExchangeTransformer = class ChainGrpcExchangeTransformer {
|
|
|
148
106
|
};
|
|
149
107
|
});
|
|
150
108
|
}
|
|
151
|
-
static isOptedOutOfRewardsResponseToIsOptedOutOfRewards(response) {
|
|
152
|
-
return { isOptedOut: response.isOptedOut };
|
|
153
|
-
}
|
|
154
109
|
static activeStakeGrantResponseToActiveStakeGrant(response) {
|
|
155
110
|
return {
|
|
156
111
|
grant: response.grant,
|
|
@@ -294,25 +249,6 @@ var ChainGrpcExchangeApi = class extends BaseGrpcConsumer {
|
|
|
294
249
|
const response = await this.executeGrpcCall(request, this.client.feeDiscountAccountInfo.bind(this.client), options);
|
|
295
250
|
return ChainGrpcExchangeTransformer.feeDiscountAccountInfoResponseToFeeDiscountAccountInfo(response);
|
|
296
251
|
}
|
|
297
|
-
async fetchTradingRewardsCampaign(options) {
|
|
298
|
-
throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
|
|
299
|
-
const request = InjectiveExchangeV1Beta1QueryPb.QueryTradeRewardCampaignRequest.create();
|
|
300
|
-
const response = await this.executeGrpcCall(request, this.client.tradeRewardCampaign.bind(this.client), options);
|
|
301
|
-
return ChainGrpcExchangeTransformer.tradingRewardsCampaignResponseToTradingRewardsCampaign(response);
|
|
302
|
-
}
|
|
303
|
-
async fetchTradeRewardPoints(injectiveAddresses, options) {
|
|
304
|
-
throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
|
|
305
|
-
const request = InjectiveExchangeV1Beta1QueryPb.QueryTradeRewardPointsRequest.create();
|
|
306
|
-
request.accounts = injectiveAddresses;
|
|
307
|
-
return (await this.executeGrpcCall(request, this.client.tradeRewardPoints.bind(this.client), options)).accountTradeRewardPoints;
|
|
308
|
-
}
|
|
309
|
-
async fetchPendingTradeRewardPoints(injectiveAddresses, timestamp, options) {
|
|
310
|
-
throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
|
|
311
|
-
const request = InjectiveExchangeV1Beta1QueryPb.QueryTradeRewardPointsRequest.create();
|
|
312
|
-
request.accounts = injectiveAddresses;
|
|
313
|
-
if (timestamp) request.pendingPoolTimestamp = BigInt(timestamp);
|
|
314
|
-
return (await this.executeGrpcCall(request, this.client.pendingTradeRewardPoints.bind(this.client), options)).accountTradeRewardPoints;
|
|
315
|
-
}
|
|
316
252
|
async fetchPositions(options) {
|
|
317
253
|
throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
|
|
318
254
|
const request = InjectiveExchangeV1Beta1QueryPb.QueryPositionsRequest.create();
|
|
@@ -325,13 +261,6 @@ var ChainGrpcExchangeApi = class extends BaseGrpcConsumer {
|
|
|
325
261
|
request.subaccountId = subaccountId;
|
|
326
262
|
return await this.executeGrpcCall(request, this.client.subaccountTradeNonce.bind(this.client), options);
|
|
327
263
|
}
|
|
328
|
-
async fetchIsOptedOutOfRewards(account, options) {
|
|
329
|
-
throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
|
|
330
|
-
const request = InjectiveExchangeV1Beta1QueryPb.QueryIsOptedOutOfRewardsRequest.create();
|
|
331
|
-
request.account = account;
|
|
332
|
-
const response = await this.executeGrpcCall(request, this.client.isOptedOutOfRewards.bind(this.client), options);
|
|
333
|
-
return ChainGrpcExchangeTransformer.isOptedOutOfRewardsResponseToIsOptedOutOfRewards(response);
|
|
334
|
-
}
|
|
335
264
|
async fetchActiveStakeGrant(account, options) {
|
|
336
265
|
throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
|
|
337
266
|
const request = InjectiveExchangeV1Beta1QueryPb.QueryActiveStakeGrantRequest.create();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { h as uint8ArrayToString, p as uint8ArrayToBase64 } from "./encoding-light-BpntDob-.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-BwBXXd7t.js";
|
|
3
|
-
import { f as ChainGrpcCommonTransformer } from "./utils-
|
|
3
|
+
import { f as ChainGrpcCommonTransformer } from "./utils-Bprop_i9.js";
|
|
4
4
|
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-lXuwo8W3.js";
|
|
5
5
|
import { t as BaseRestConsumer } from "./BaseRestConsumer-S2OhA510.js";
|
|
6
6
|
import { isAbortError, throwIfAborted } from "@injectivelabs/utils";
|
|
7
7
|
import { ChainErrorModule, HttpRequestException, UnspecifiedErrorCode } from "@injectivelabs/exceptions";
|
|
8
8
|
import * as InjectiveCryptoV1Beta1Ethsecp256k1KeysPb from "@injectivelabs/core-proto-ts-v2/generated/injective/crypto/v1beta1/ethsecp256k1/keys_pb";
|
|
9
9
|
import * as ExchangePb from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v1beta1/exchange_pb";
|
|
10
|
-
import { OracleType } from "@injectivelabs/core-proto-ts-v2/generated/injective/oracle/v1beta1/oracle_pb";
|
|
11
10
|
import * as CosmosGovV1GovPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/gov/v1/gov_pb";
|
|
12
11
|
import * as CosmwasmWasmV1TypesPb from "@injectivelabs/core-proto-ts-v2/generated/cosmwasm/wasm/v1/types_pb";
|
|
12
|
+
import { OracleType } from "@injectivelabs/core-proto-ts-v2/generated/injective/oracle/v1beta1/oracle_pb";
|
|
13
13
|
import * as InjectivePermissionsV1Beta1PermissionsPb from "@injectivelabs/core-proto-ts-v2/generated/injective/permissions/v1beta1/permissions_pb";
|
|
14
14
|
import * as InjectiveTypesV1Beta1AccountPb from "@injectivelabs/core-proto-ts-v2/generated/injective/types/v1beta1/account_pb";
|
|
15
15
|
import * as CosmosAuthV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/auth/v1beta1/query_pb";
|
package/dist/esm/{DirectEthSecp256k1Wallet-Cq8NYHKd.js → DirectEthSecp256k1Wallet-mXW_mPaC.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { m as uint8ArrayToHex, p as uint8ArrayToBase64, t as base64ToUint8Array } from "./encoding-light-BpntDob-.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-BwBXXd7t.js";
|
|
3
|
-
import { F as PublicKey, k as getPublicKey, n as PrivateKey } from "./accounts-
|
|
3
|
+
import { F as PublicKey, k as getPublicKey, n as PrivateKey } from "./accounts-BNTm8lj5.js";
|
|
4
4
|
import * as CosmosBaseV1Beta1CoinPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/base/v1beta1/coin_pb";
|
|
5
5
|
import * as InjectiveTypesV1Beta1AccountPb from "@injectivelabs/core-proto-ts-v2/generated/injective/types/v1beta1/account_pb";
|
|
6
6
|
import * as IbcCoreClientV1ClientPb from "@injectivelabs/core-proto-ts-v2/generated/ibc/core/client/v1/client_pb";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as toBase64, o as fromUtf8 } from "./encoding-light-BpntDob-.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-BwBXXd7t.js";
|
|
3
|
-
import { jt as safeBigIntStringify } from "./utils-
|
|
4
|
-
import { t as MsgBase } from "./MsgBase-
|
|
3
|
+
import { jt as safeBigIntStringify } from "./utils-Bprop_i9.js";
|
|
4
|
+
import { t as MsgBase } from "./MsgBase-D3okqFzc.js";
|
|
5
5
|
import { GeneralException } from "@injectivelabs/exceptions";
|
|
6
6
|
import * as InjectiveWasmxV1TxPb from "@injectivelabs/core-proto-ts-v2/generated/injective/wasmx/v1/tx_pb";
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { m as uint8ArrayToHex, t as base64ToUint8Array, u as stringToUint8Array } from "./encoding-light-BpntDob-.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-BwBXXd7t.js";
|
|
3
|
-
import { jt as safeBigIntStringify, r as recoverTypedSignaturePubKey } from "./utils-
|
|
3
|
+
import { jt as safeBigIntStringify, r as recoverTypedSignaturePubKey } from "./utils-Bprop_i9.js";
|
|
4
4
|
import { t as BaseIndexerGrpcConsumer } from "./BaseIndexerGrpcConsumer-DIZk8nSX.js";
|
|
5
5
|
import * as CosmosTxV1Beta1TxPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/tx/v1beta1/tx_pb";
|
|
6
6
|
import { DEFAULT_BRIDGE_FEE_DENOM, DEFAULT_BRIDGE_FEE_PRICE, DEFAULT_EXCHANGE_LIMIT, DEFAULT_GAS_LIMIT, throwIfAborted } from "@injectivelabs/utils";
|
|
@@ -154,7 +154,7 @@ var IndexerGrpcTransactionApi = class extends BaseIndexerGrpcConsumer {
|
|
|
154
154
|
return this.initClient(InjectiveExchangeRPCClient);
|
|
155
155
|
}
|
|
156
156
|
async prepareTxRequest(args) {
|
|
157
|
-
const { address, chainId, message, memo, estimateGas = true, gasLimit = DEFAULT_GAS_LIMIT, feeDenom = DEFAULT_BRIDGE_FEE_DENOM, feePrice = DEFAULT_BRIDGE_FEE_PRICE, timeoutHeight } = args;
|
|
157
|
+
const { address, chainId, message, memo, estimateGas = true, gasLimit = DEFAULT_GAS_LIMIT, feeDenom = DEFAULT_BRIDGE_FEE_DENOM, feePrice = DEFAULT_BRIDGE_FEE_PRICE, timeoutHeight, eip712Version } = args;
|
|
158
158
|
const txFeeAmount = CosmosBaseV1Beta1CoinPb.Coin.create();
|
|
159
159
|
txFeeAmount.denom = feeDenom;
|
|
160
160
|
txFeeAmount.amount = feePrice;
|
|
@@ -168,6 +168,7 @@ var IndexerGrpcTransactionApi = class extends BaseIndexerGrpcConsumer {
|
|
|
168
168
|
prepareTxRequest.msgs = (Array.isArray(message) ? message : [message]).map((message$1) => stringToUint8Array(safeBigIntStringify(message$1)));
|
|
169
169
|
if (timeoutHeight !== void 0) prepareTxRequest.timeoutHeight = BigInt(timeoutHeight);
|
|
170
170
|
if (memo) prepareTxRequest.memo = typeof memo === "number" ? memo.toString() : memo;
|
|
171
|
+
if (eip712Version) prepareTxRequest.eip712Wrapper = eip712Version;
|
|
171
172
|
return await this.executeGrpcCall(prepareTxRequest, this.client.prepareTx.bind(this.client));
|
|
172
173
|
}
|
|
173
174
|
async prepareExchangeTxRequest(args) {
|
|
@@ -221,6 +222,7 @@ var IndexerGrpcTransactionApi = class extends BaseIndexerGrpcConsumer {
|
|
|
221
222
|
broadcastTxRequest.tx = stringToUint8Array(safeBigIntStringify(parsedTypedData.message));
|
|
222
223
|
broadcastTxRequest.feePayer = txResponse.feePayer;
|
|
223
224
|
broadcastTxRequest.feePayerSig = txResponse.feePayerSig;
|
|
225
|
+
if (txResponse.signMode === "SIGN_MODE_EIP712_V3") broadcastTxRequest.signMode = txResponse.signMode;
|
|
224
226
|
broadcastTxRequest.msgs = (Array.isArray(message) ? message : [message]).map((message$1) => stringToUint8Array(safeBigIntStringify(message$1)));
|
|
225
227
|
return await this.executeGrpcCall(broadcastTxRequest, this.client.broadcastTx.bind(this.client));
|
|
226
228
|
}
|