@zoguxprotocol/proto 0.1.7 → 0.1.8
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/package.json +1 -1
- package/src/codegen/zogux/bridge/events.ts +12 -6
- package/src/codegen/zogux/bridge/params.ts +6 -4
- package/src/codegen/zogux/indexer/protocol/v1/subaccount.ts +6 -4
- package/src/codegen/zogux/sending/transfer.ts +8 -2
- package/src/codegen/zogux/sending/tx.rpc.msg.ts +6 -2
- package/src/codegen/zogux/spots/tx.rpc.msg.ts +11 -1
- package/src/codegen/zogux/spots/tx.ts +110 -0
- package/src/codegen/zogux/subaccounts/spot_position.ts +6 -4
- package/src/codegen/zogux/subaccounts/tx.rpc.msg.ts +3 -2
- package/src/codegen/zogux/subaccounts/tx.ts +22 -7
package/package.json
CHANGED
|
@@ -87,8 +87,8 @@ export interface EventWithdrawalSignatureSubmittedSDKType {
|
|
|
87
87
|
block_height: Long;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
* EventWithdrawalSigned is emitted when a withdrawal has collected enough TSS
|
|
91
|
-
* Signer service should listen to this and submit to EVM.
|
|
90
|
+
* EventWithdrawalSigned is emitted when a withdrawal has collected enough TSS
|
|
91
|
+
* signatures. Signer service should listen to this and submit to EVM.
|
|
92
92
|
*/
|
|
93
93
|
|
|
94
94
|
export interface EventWithdrawalSigned {
|
|
@@ -102,8 +102,8 @@ export interface EventWithdrawalSigned {
|
|
|
102
102
|
blockHeight: Long;
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
|
-
* EventWithdrawalSigned is emitted when a withdrawal has collected enough TSS
|
|
106
|
-
* Signer service should listen to this and submit to EVM.
|
|
105
|
+
* EventWithdrawalSigned is emitted when a withdrawal has collected enough TSS
|
|
106
|
+
* signatures. Signer service should listen to this and submit to EVM.
|
|
107
107
|
*/
|
|
108
108
|
|
|
109
109
|
export interface EventWithdrawalSignedSDKType {
|
|
@@ -111,7 +111,10 @@ export interface EventWithdrawalSignedSDKType {
|
|
|
111
111
|
signature: Uint8Array;
|
|
112
112
|
block_height: Long;
|
|
113
113
|
}
|
|
114
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* EventWithdrawalSubmitted is emitted when signer has submitted the withdrawal
|
|
116
|
+
* to EVM.
|
|
117
|
+
*/
|
|
115
118
|
|
|
116
119
|
export interface EventWithdrawalSubmitted {
|
|
117
120
|
/** Withdrawal ID */
|
|
@@ -123,7 +126,10 @@ export interface EventWithdrawalSubmitted {
|
|
|
123
126
|
|
|
124
127
|
blockHeight: Long;
|
|
125
128
|
}
|
|
126
|
-
/**
|
|
129
|
+
/**
|
|
130
|
+
* EventWithdrawalSubmitted is emitted when signer has submitted the withdrawal
|
|
131
|
+
* to EVM.
|
|
132
|
+
*/
|
|
127
133
|
|
|
128
134
|
export interface EventWithdrawalSubmittedSDKType {
|
|
129
135
|
withdrawal_id: string;
|
|
@@ -85,7 +85,8 @@ export interface SafetyParamsSDKType {
|
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* TSSParams stores parameters for TSS (Threshold Signature Scheme).
|
|
88
|
-
* Note: TSS produces a single aggregated signature, no threshold counting
|
|
88
|
+
* Note: TSS produces a single aggregated signature, no threshold counting
|
|
89
|
+
* needed.
|
|
89
90
|
*/
|
|
90
91
|
|
|
91
92
|
export interface TSSParams {
|
|
@@ -98,15 +99,16 @@ export interface TSSParams {
|
|
|
98
99
|
|
|
99
100
|
supportedChainIds: Long[];
|
|
100
101
|
/**
|
|
101
|
-
* TSS group public key (hex-encoded, 66 chars for compressed or 130 for
|
|
102
|
-
* This is used to verify TSS signatures.
|
|
102
|
+
* TSS group public key (hex-encoded, 66 chars for compressed or 130 for
|
|
103
|
+
* uncompressed). This is used to verify TSS signatures.
|
|
103
104
|
*/
|
|
104
105
|
|
|
105
106
|
tssPubKey: string;
|
|
106
107
|
}
|
|
107
108
|
/**
|
|
108
109
|
* TSSParams stores parameters for TSS (Threshold Signature Scheme).
|
|
109
|
-
* Note: TSS produces a single aggregated signature, no threshold counting
|
|
110
|
+
* Note: TSS produces a single aggregated signature, no threshold counting
|
|
111
|
+
* needed.
|
|
110
112
|
*/
|
|
111
113
|
|
|
112
114
|
export interface TSSParamsSDKType {
|
|
@@ -85,8 +85,9 @@ export interface IndexerAssetPositionSDKType {
|
|
|
85
85
|
index: Long;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
|
-
* IndexerSpotLockedBalance tracks locked funds for pending spot orders for a
|
|
89
|
-
* This is used to ensure users have sufficient balance when
|
|
88
|
+
* IndexerSpotLockedBalance tracks locked funds for pending spot orders for a
|
|
89
|
+
* specific asset. This is used to ensure users have sufficient balance when
|
|
90
|
+
* placing limit orders.
|
|
90
91
|
*/
|
|
91
92
|
|
|
92
93
|
export interface IndexerSpotLockedBalance {
|
|
@@ -101,8 +102,9 @@ export interface IndexerSpotLockedBalance {
|
|
|
101
102
|
quantumsLocked: Uint8Array;
|
|
102
103
|
}
|
|
103
104
|
/**
|
|
104
|
-
* IndexerSpotLockedBalance tracks locked funds for pending spot orders for a
|
|
105
|
-
* This is used to ensure users have sufficient balance when
|
|
105
|
+
* IndexerSpotLockedBalance tracks locked funds for pending spot orders for a
|
|
106
|
+
* specific asset. This is used to ensure users have sufficient balance when
|
|
107
|
+
* placing limit orders.
|
|
106
108
|
*/
|
|
107
109
|
|
|
108
110
|
export interface IndexerSpotLockedBalanceSDKType {
|
|
@@ -25,7 +25,10 @@ export interface TransferSDKType {
|
|
|
25
25
|
asset_id: number;
|
|
26
26
|
amount: Long;
|
|
27
27
|
}
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* MsgCreateTransferSpot represents a single transfer of spot assets between two
|
|
30
|
+
* subaccounts.
|
|
31
|
+
*/
|
|
29
32
|
|
|
30
33
|
export interface MsgCreateTransferSpot {
|
|
31
34
|
/** The sender subaccount owner's wallet address (used as signer). */
|
|
@@ -43,7 +46,10 @@ export interface MsgCreateTransferSpot {
|
|
|
43
46
|
|
|
44
47
|
quantums: Long;
|
|
45
48
|
}
|
|
46
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* MsgCreateTransferSpot represents a single transfer of spot assets between two
|
|
51
|
+
* subaccounts.
|
|
52
|
+
*/
|
|
47
53
|
|
|
48
54
|
export interface MsgCreateTransferSpotSDKType {
|
|
49
55
|
sender: string;
|
|
@@ -7,7 +7,10 @@ import { MsgCreateTransfer, MsgCreateTransferResponse, MsgCreateTransferSpotResp
|
|
|
7
7
|
export interface Msg {
|
|
8
8
|
/** CreateTransfer initiates a new transfer between subaccounts. */
|
|
9
9
|
createTransfer(request: MsgCreateTransfer): Promise<MsgCreateTransferResponse>;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* CreateTransferSpot initiates a new transfer of spot assets between
|
|
12
|
+
* subaccounts.
|
|
13
|
+
*/
|
|
11
14
|
|
|
12
15
|
createTransferSpot(request: MsgCreateTransferSpot): Promise<MsgCreateTransferSpotResponse>;
|
|
13
16
|
/**
|
|
@@ -48,7 +51,8 @@ export interface Msg {
|
|
|
48
51
|
transferSpotToPerp(request: MsgTransferSpotToPerp): Promise<MsgTransferSpotToPerpResponse>;
|
|
49
52
|
/**
|
|
50
53
|
* TransferPerpToSpot transfers funds from perpetual collateral to
|
|
51
|
-
* spot balance. Can transfer within the same subaccount or between different
|
|
54
|
+
* spot balance. Can transfer within the same subaccount or between different
|
|
55
|
+
* subaccounts.
|
|
52
56
|
*/
|
|
53
57
|
|
|
54
58
|
transferPerpToSpot(request: MsgTransferPerpToSpot): Promise<MsgTransferPerpToSpotResponse>;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { Rpc } from "../../helpers";
|
|
2
2
|
import * as _m0 from "protobufjs/minimal";
|
|
3
|
-
import { MsgUpdateSpotFeeTiers, MsgUpdateSpotFeeTiersResponse } from "./tx";
|
|
3
|
+
import { MsgUpdateSpotFeeTiers, MsgUpdateSpotFeeTiersResponse, MsgCreateSpotMarket, MsgCreateSpotMarketResponse } from "./tx";
|
|
4
4
|
/** Msg defines the Msg service. */
|
|
5
5
|
|
|
6
6
|
export interface Msg {
|
|
7
7
|
/** UpdateSpotFeeTiers updates the SpotFeeTiers in state. */
|
|
8
8
|
updateSpotFeeTiers(request: MsgUpdateSpotFeeTiers): Promise<MsgUpdateSpotFeeTiersResponse>;
|
|
9
|
+
/** CreateSpotMarket creates a new spot market via governance. */
|
|
10
|
+
|
|
11
|
+
createSpotMarket(request: MsgCreateSpotMarket): Promise<MsgCreateSpotMarketResponse>;
|
|
9
12
|
}
|
|
10
13
|
export class MsgClientImpl implements Msg {
|
|
11
14
|
private readonly rpc: Rpc;
|
|
@@ -13,6 +16,7 @@ export class MsgClientImpl implements Msg {
|
|
|
13
16
|
constructor(rpc: Rpc) {
|
|
14
17
|
this.rpc = rpc;
|
|
15
18
|
this.updateSpotFeeTiers = this.updateSpotFeeTiers.bind(this);
|
|
19
|
+
this.createSpotMarket = this.createSpotMarket.bind(this);
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
updateSpotFeeTiers(request: MsgUpdateSpotFeeTiers): Promise<MsgUpdateSpotFeeTiersResponse> {
|
|
@@ -21,4 +25,10 @@ export class MsgClientImpl implements Msg {
|
|
|
21
25
|
return promise.then(data => MsgUpdateSpotFeeTiersResponse.decode(new _m0.Reader(data)));
|
|
22
26
|
}
|
|
23
27
|
|
|
28
|
+
createSpotMarket(request: MsgCreateSpotMarket): Promise<MsgCreateSpotMarketResponse> {
|
|
29
|
+
const data = MsgCreateSpotMarket.encode(request).finish();
|
|
30
|
+
const promise = this.rpc.request("zogux.spots.Msg", "CreateSpotMarket", data);
|
|
31
|
+
return promise.then(data => MsgCreateSpotMarketResponse.decode(new _m0.Reader(data)));
|
|
32
|
+
}
|
|
33
|
+
|
|
24
34
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SpotFeeTier, SpotFeeTierSDKType } from "./fee_tier";
|
|
2
|
+
import { SpotMarketParams, SpotMarketParamsSDKType } from "./market";
|
|
2
3
|
import * as _m0 from "protobufjs/minimal";
|
|
3
4
|
import { DeepPartial } from "../../helpers";
|
|
4
5
|
/** MsgUpdateSpotFeeTiers is the Msg/UpdateSpotFeeTiers request type. */
|
|
@@ -27,6 +28,26 @@ export interface MsgUpdateSpotFeeTiersResponse {}
|
|
|
27
28
|
*/
|
|
28
29
|
|
|
29
30
|
export interface MsgUpdateSpotFeeTiersResponseSDKType {}
|
|
31
|
+
/** MsgCreateSpotMarket is a message used by x/gov to create a new spot market. */
|
|
32
|
+
|
|
33
|
+
export interface MsgCreateSpotMarket {
|
|
34
|
+
authority: string;
|
|
35
|
+
/** Parameters for the new spot market. */
|
|
36
|
+
|
|
37
|
+
params?: SpotMarketParams;
|
|
38
|
+
}
|
|
39
|
+
/** MsgCreateSpotMarket is a message used by x/gov to create a new spot market. */
|
|
40
|
+
|
|
41
|
+
export interface MsgCreateSpotMarketSDKType {
|
|
42
|
+
authority: string;
|
|
43
|
+
params?: SpotMarketParamsSDKType;
|
|
44
|
+
}
|
|
45
|
+
/** MsgCreateSpotMarketResponse defines the CreateSpotMarket response type. */
|
|
46
|
+
|
|
47
|
+
export interface MsgCreateSpotMarketResponse {}
|
|
48
|
+
/** MsgCreateSpotMarketResponse defines the CreateSpotMarket response type. */
|
|
49
|
+
|
|
50
|
+
export interface MsgCreateSpotMarketResponseSDKType {}
|
|
30
51
|
|
|
31
52
|
function createBaseMsgUpdateSpotFeeTiers(): MsgUpdateSpotFeeTiers {
|
|
32
53
|
return {
|
|
@@ -115,4 +136,93 @@ export const MsgUpdateSpotFeeTiersResponse = {
|
|
|
115
136
|
return message;
|
|
116
137
|
}
|
|
117
138
|
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
function createBaseMsgCreateSpotMarket(): MsgCreateSpotMarket {
|
|
142
|
+
return {
|
|
143
|
+
authority: "",
|
|
144
|
+
params: undefined
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export const MsgCreateSpotMarket = {
|
|
149
|
+
encode(message: MsgCreateSpotMarket, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
150
|
+
if (message.authority !== "") {
|
|
151
|
+
writer.uint32(10).string(message.authority);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (message.params !== undefined) {
|
|
155
|
+
SpotMarketParams.encode(message.params, writer.uint32(18).fork()).ldelim();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return writer;
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateSpotMarket {
|
|
162
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
163
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
164
|
+
const message = createBaseMsgCreateSpotMarket();
|
|
165
|
+
|
|
166
|
+
while (reader.pos < end) {
|
|
167
|
+
const tag = reader.uint32();
|
|
168
|
+
|
|
169
|
+
switch (tag >>> 3) {
|
|
170
|
+
case 1:
|
|
171
|
+
message.authority = reader.string();
|
|
172
|
+
break;
|
|
173
|
+
|
|
174
|
+
case 2:
|
|
175
|
+
message.params = SpotMarketParams.decode(reader, reader.uint32());
|
|
176
|
+
break;
|
|
177
|
+
|
|
178
|
+
default:
|
|
179
|
+
reader.skipType(tag & 7);
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return message;
|
|
185
|
+
},
|
|
186
|
+
|
|
187
|
+
fromPartial(object: DeepPartial<MsgCreateSpotMarket>): MsgCreateSpotMarket {
|
|
188
|
+
const message = createBaseMsgCreateSpotMarket();
|
|
189
|
+
message.authority = object.authority ?? "";
|
|
190
|
+
message.params = object.params !== undefined && object.params !== null ? SpotMarketParams.fromPartial(object.params) : undefined;
|
|
191
|
+
return message;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
function createBaseMsgCreateSpotMarketResponse(): MsgCreateSpotMarketResponse {
|
|
197
|
+
return {};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export const MsgCreateSpotMarketResponse = {
|
|
201
|
+
encode(_: MsgCreateSpotMarketResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
202
|
+
return writer;
|
|
203
|
+
},
|
|
204
|
+
|
|
205
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateSpotMarketResponse {
|
|
206
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
207
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
208
|
+
const message = createBaseMsgCreateSpotMarketResponse();
|
|
209
|
+
|
|
210
|
+
while (reader.pos < end) {
|
|
211
|
+
const tag = reader.uint32();
|
|
212
|
+
|
|
213
|
+
switch (tag >>> 3) {
|
|
214
|
+
default:
|
|
215
|
+
reader.skipType(tag & 7);
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
return message;
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
fromPartial(_: DeepPartial<MsgCreateSpotMarketResponse>): MsgCreateSpotMarketResponse {
|
|
224
|
+
const message = createBaseMsgCreateSpotMarketResponse();
|
|
225
|
+
return message;
|
|
226
|
+
}
|
|
227
|
+
|
|
118
228
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _m0 from "protobufjs/minimal";
|
|
2
2
|
import { DeepPartial } from "../../helpers";
|
|
3
3
|
/**
|
|
4
|
-
* SpotAssetLocked tracks locked funds for pending spot orders for a specific
|
|
5
|
-
* This is used to ensure users have sufficient balance when placing
|
|
4
|
+
* SpotAssetLocked tracks locked funds for pending spot orders for a specific
|
|
5
|
+
* asset. This is used to ensure users have sufficient balance when placing
|
|
6
|
+
* limit orders.
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
9
|
export interface SpotAssetLocked {
|
|
@@ -17,8 +18,9 @@ export interface SpotAssetLocked {
|
|
|
17
18
|
quantumsLocked: Uint8Array;
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
|
-
* SpotAssetLocked tracks locked funds for pending spot orders for a specific
|
|
21
|
-
* This is used to ensure users have sufficient balance when placing
|
|
21
|
+
* SpotAssetLocked tracks locked funds for pending spot orders for a specific
|
|
22
|
+
* asset. This is used to ensure users have sufficient balance when placing
|
|
23
|
+
* limit orders.
|
|
22
24
|
*/
|
|
23
25
|
|
|
24
26
|
export interface SpotAssetLockedSDKType {
|
|
@@ -5,8 +5,9 @@ import { MsgRecoverySpotBalance, MsgRecoverySpotBalanceResponse } from "./tx";
|
|
|
5
5
|
|
|
6
6
|
export interface Msg {
|
|
7
7
|
/**
|
|
8
|
-
* RecoverySpotBalance is an admin function to recover spot balance
|
|
9
|
-
* This should only be called by authorized admin/governance
|
|
8
|
+
* RecoverySpotBalance is an admin function to recover spot balance
|
|
9
|
+
* discrepancies. This should only be called by authorized admin/governance
|
|
10
|
+
* addresses.
|
|
10
11
|
*/
|
|
11
12
|
recoverySpotBalance(request: MsgRecoverySpotBalance): Promise<MsgRecoverySpotBalanceResponse>;
|
|
12
13
|
}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { SubaccountId, SubaccountIdSDKType } from "./subaccount";
|
|
2
2
|
import * as _m0 from "protobufjs/minimal";
|
|
3
3
|
import { DeepPartial } from "../../helpers";
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* MsgRecoverySpotBalance is the request type for recovering spot balance
|
|
6
|
+
* discrepancies.
|
|
7
|
+
*/
|
|
5
8
|
|
|
6
9
|
export interface MsgRecoverySpotBalance {
|
|
7
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Authority is the address authorized to execute this message (typically
|
|
12
|
+
* governance).
|
|
13
|
+
*/
|
|
8
14
|
authority: string;
|
|
9
15
|
/** SubaccountId identifies the subaccount to recover. */
|
|
10
16
|
|
|
@@ -13,13 +19,16 @@ export interface MsgRecoverySpotBalance {
|
|
|
13
19
|
|
|
14
20
|
assetId: number;
|
|
15
21
|
/**
|
|
16
|
-
* DeltaAmount is the amount to add (positive) or subtract (negative) to
|
|
17
|
-
* This is a string representation of a big.Int.
|
|
22
|
+
* DeltaAmount is the amount to add (positive) or subtract (negative) to
|
|
23
|
+
* recover the balance. This is a string representation of a big.Int.
|
|
18
24
|
*/
|
|
19
25
|
|
|
20
26
|
deltaAmount: string;
|
|
21
27
|
}
|
|
22
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* MsgRecoverySpotBalance is the request type for recovering spot balance
|
|
30
|
+
* discrepancies.
|
|
31
|
+
*/
|
|
23
32
|
|
|
24
33
|
export interface MsgRecoverySpotBalanceSDKType {
|
|
25
34
|
authority: string;
|
|
@@ -27,10 +36,16 @@ export interface MsgRecoverySpotBalanceSDKType {
|
|
|
27
36
|
asset_id: number;
|
|
28
37
|
delta_amount: string;
|
|
29
38
|
}
|
|
30
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* MsgRecoverySpotBalanceResponse is the response type for
|
|
41
|
+
* MsgRecoverySpotBalance.
|
|
42
|
+
*/
|
|
31
43
|
|
|
32
44
|
export interface MsgRecoverySpotBalanceResponse {}
|
|
33
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* MsgRecoverySpotBalanceResponse is the response type for
|
|
47
|
+
* MsgRecoverySpotBalance.
|
|
48
|
+
*/
|
|
34
49
|
|
|
35
50
|
export interface MsgRecoverySpotBalanceResponseSDKType {}
|
|
36
51
|
|