decentralcardgame-cardchain-client-ts 0.0.26-rc1 → 0.0.26
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/DecentralCardGame.cardchain.cardchain/module.js +364 -338
- package/DecentralCardGame.cardchain.cardchain/module.ts +530 -495
- package/DecentralCardGame.cardchain.cardchain/registry.js +66 -64
- package/DecentralCardGame.cardchain.cardchain/registry.ts +66 -64
- package/DecentralCardGame.cardchain.cardchain/rest.js +31 -17
- package/DecentralCardGame.cardchain.cardchain/rest.ts +138 -94
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/card.js +287 -106
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/card.ts +326 -107
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/copyright_proposal.js +38 -14
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/copyright_proposal.ts +45 -17
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/council.js +104 -47
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/council.ts +122 -50
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/genesis.js +92 -74
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/genesis.ts +109 -66
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/image.js +25 -17
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/image.ts +29 -20
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match.js +107 -51
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match.ts +130 -50
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match_reporter_proposal.js +29 -10
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match_reporter_proposal.ts +32 -10
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/num.js +17 -8
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/num.ts +21 -11
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/params.js +178 -57
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/params.ts +205 -60
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/query.js +666 -446
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/query.ts +764 -459
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/running_average.js +17 -14
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/running_average.ts +24 -15
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/sell_offer.js +45 -16
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/sell_offer.ts +53 -19
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/server.js +31 -12
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/server.ts +37 -15
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set.js +138 -62
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set.ts +173 -67
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set_proposal.js +31 -12
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set_proposal.ts +37 -15
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/tx.js +1609 -1024
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/tx.ts +1821 -1153
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/user.js +207 -98
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/user.ts +261 -96
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/voting.js +178 -108
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/voting.ts +200 -123
- package/DecentralCardGame.cardchain.cardchain/types/amino/amino.ts +1 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +86 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +90 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +219 -114
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +265 -120
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set.js +186 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set.ts +210 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +91 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.ts +113 -0
- package/DecentralCardGame.cardchain.cardchain/types.js +3 -1
- package/DecentralCardGame.cardchain.cardchain/types.ts +4 -0
- package/DecentralCardGame.cardchain.featureflag/rest.ts +6 -6
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/flag.js +86 -0
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/flag.ts +114 -0
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/genesis.js +164 -0
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/genesis.ts +205 -0
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/params.js +40 -0
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/params.ts +62 -0
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/proposal.js +100 -0
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/proposal.ts +130 -0
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/query.js +325 -0
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/query.ts +424 -0
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/tx.js +9 -0
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/tx.ts +21 -0
- package/client.js +3 -9
- package/client.ts +154 -167
- package/cosmos.auth.v1beta1/rest.ts +21 -21
- package/cosmos.authz.v1beta1/module.js +17 -17
- package/cosmos.authz.v1beta1/module.ts +25 -25
- package/cosmos.authz.v1beta1/registry.js +4 -4
- package/cosmos.authz.v1beta1/registry.ts +4 -4
- package/cosmos.authz.v1beta1/rest.ts +75 -75
- package/cosmos.bank.v1beta1/rest.ts +9 -9
- package/cosmos.distribution.v1beta1/module.js +27 -27
- package/cosmos.distribution.v1beta1/module.ts +42 -42
- package/cosmos.distribution.v1beta1/registry.js +4 -4
- package/cosmos.distribution.v1beta1/registry.ts +4 -4
- package/cosmos.distribution.v1beta1/rest.ts +20 -20
- package/cosmos.gov.v1/module.js +24 -24
- package/cosmos.gov.v1/module.ts +36 -36
- package/cosmos.gov.v1/registry.js +4 -4
- package/cosmos.gov.v1/registry.ts +4 -4
- package/cosmos.gov.v1/rest.ts +90 -90
- package/cosmos.gov.v1beta1/module.js +27 -27
- package/cosmos.gov.v1beta1/module.ts +42 -42
- package/cosmos.gov.v1beta1/registry.js +4 -4
- package/cosmos.gov.v1beta1/registry.ts +4 -4
- package/cosmos.gov.v1beta1/rest.ts +152 -152
- package/cosmos.group.v1/module.js +108 -108
- package/cosmos.group.v1/module.ts +164 -164
- package/cosmos.group.v1/registry.js +18 -18
- package/cosmos.group.v1/registry.ts +18 -18
- package/cosmos.group.v1/rest.js +5 -5
- package/cosmos.group.v1/rest.ts +214 -214
- package/cosmos.mint.v1beta1/rest.ts +13 -13
- package/cosmos.nft.v1beta1/rest.ts +132 -132
- package/cosmos.slashing.v1beta1/rest.ts +19 -19
- package/cosmos.staking.v1beta1/module.js +39 -39
- package/cosmos.staking.v1beta1/module.ts +59 -59
- package/cosmos.staking.v1beta1/registry.js +6 -6
- package/cosmos.staking.v1beta1/registry.ts +6 -6
- package/cosmos.staking.v1beta1/rest.ts +95 -95
- package/cosmos.upgrade.v1beta1/module.js +16 -16
- package/cosmos.upgrade.v1beta1/module.ts +24 -24
- package/cosmos.upgrade.v1beta1/registry.js +2 -2
- package/cosmos.upgrade.v1beta1/registry.ts +2 -2
- package/ibc.applications.interchain_accounts.controller.v1/rest.ts +10 -10
- package/ibc.applications.interchain_accounts.host.v1/rest.ts +13 -13
- package/ibc.applications.transfer.v1/rest.ts +3 -3
- package/ibc.core.channel.v1/rest.ts +44 -44
- package/package.json +1 -1
|
@@ -9,21 +9,10 @@
|
|
|
9
9
|
* ---------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
export interface ProtobufAny {
|
|
13
|
-
"@type"?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface RpcStatus {
|
|
17
|
-
/** @format int32 */
|
|
18
|
-
code?: number;
|
|
19
|
-
message?: string;
|
|
20
|
-
details?: ProtobufAny[];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
12
|
/**
|
|
24
13
|
* Params holds parameters for the mint module.
|
|
25
14
|
*/
|
|
26
|
-
export interface
|
|
15
|
+
export interface Mintv1Beta1Params {
|
|
27
16
|
/** type of coin to mint */
|
|
28
17
|
mint_denom?: string;
|
|
29
18
|
|
|
@@ -46,6 +35,17 @@ export interface V1Beta1Params {
|
|
|
46
35
|
blocks_per_year?: string;
|
|
47
36
|
}
|
|
48
37
|
|
|
38
|
+
export interface ProtobufAny {
|
|
39
|
+
"@type"?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface RpcStatus {
|
|
43
|
+
/** @format int32 */
|
|
44
|
+
code?: number;
|
|
45
|
+
message?: string;
|
|
46
|
+
details?: ProtobufAny[];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
49
|
/**
|
|
50
50
|
* QueryAnnualProvisionsResponse is the response type for the
|
|
51
51
|
Query/AnnualProvisions RPC method.
|
|
@@ -75,7 +75,7 @@ export interface V1Beta1QueryInflationResponse {
|
|
|
75
75
|
*/
|
|
76
76
|
export interface V1Beta1QueryParamsResponse {
|
|
77
77
|
/** params defines the parameters of the module. */
|
|
78
|
-
params?:
|
|
78
|
+
params?: Mintv1Beta1Params;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from "axios";
|
|
@@ -9,131 +9,10 @@
|
|
|
9
9
|
* ---------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
14
|
-
URL that describes the type of the serialized message.
|
|
15
|
-
|
|
16
|
-
Protobuf library provides support to pack/unpack Any values in the form
|
|
17
|
-
of utility functions or additional generated methods of the Any type.
|
|
18
|
-
|
|
19
|
-
Example 1: Pack and unpack a message in C++.
|
|
20
|
-
|
|
21
|
-
Foo foo = ...;
|
|
22
|
-
Any any;
|
|
23
|
-
any.PackFrom(foo);
|
|
24
|
-
...
|
|
25
|
-
if (any.UnpackTo(&foo)) {
|
|
26
|
-
...
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
Example 2: Pack and unpack a message in Java.
|
|
30
|
-
|
|
31
|
-
Foo foo = ...;
|
|
32
|
-
Any any = Any.pack(foo);
|
|
33
|
-
...
|
|
34
|
-
if (any.is(Foo.class)) {
|
|
35
|
-
foo = any.unpack(Foo.class);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
Example 3: Pack and unpack a message in Python.
|
|
39
|
-
|
|
40
|
-
foo = Foo(...)
|
|
41
|
-
any = Any()
|
|
42
|
-
any.Pack(foo)
|
|
43
|
-
...
|
|
44
|
-
if any.Is(Foo.DESCRIPTOR):
|
|
45
|
-
any.Unpack(foo)
|
|
46
|
-
...
|
|
47
|
-
|
|
48
|
-
Example 4: Pack and unpack a message in Go
|
|
49
|
-
|
|
50
|
-
foo := &pb.Foo{...}
|
|
51
|
-
any, err := anypb.New(foo)
|
|
52
|
-
if err != nil {
|
|
53
|
-
...
|
|
54
|
-
}
|
|
55
|
-
...
|
|
56
|
-
foo := &pb.Foo{}
|
|
57
|
-
if err := any.UnmarshalTo(foo); err != nil {
|
|
58
|
-
...
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
The pack methods provided by protobuf library will by default use
|
|
62
|
-
'type.googleapis.com/full.type.name' as the type URL and the unpack
|
|
63
|
-
methods only use the fully qualified type name after the last '/'
|
|
64
|
-
in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
|
65
|
-
name "y.z".
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
JSON
|
|
69
|
-
====
|
|
70
|
-
The JSON representation of an `Any` value uses the regular
|
|
71
|
-
representation of the deserialized, embedded message, with an
|
|
72
|
-
additional field `@type` which contains the type URL. Example:
|
|
73
|
-
|
|
74
|
-
package google.profile;
|
|
75
|
-
message Person {
|
|
76
|
-
string first_name = 1;
|
|
77
|
-
string last_name = 2;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
"@type": "type.googleapis.com/google.profile.Person",
|
|
82
|
-
"firstName": <string>,
|
|
83
|
-
"lastName": <string>
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
If the embedded message type is well-known and has a custom JSON
|
|
87
|
-
representation, that representation will be embedded adding a field
|
|
88
|
-
`value` which holds the custom JSON in addition to the `@type`
|
|
89
|
-
field. Example (for message [google.protobuf.Duration][]):
|
|
90
|
-
|
|
91
|
-
{
|
|
92
|
-
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
93
|
-
"value": "1.212s"
|
|
94
|
-
}
|
|
95
|
-
*/
|
|
96
|
-
export interface ProtobufAny {
|
|
97
|
-
/**
|
|
98
|
-
* A URL/resource name that uniquely identifies the type of the serialized
|
|
99
|
-
* protocol buffer message. This string must contain at least
|
|
100
|
-
* one "/" character. The last segment of the URL's path must represent
|
|
101
|
-
* the fully qualified name of the type (as in
|
|
102
|
-
* `path/google.protobuf.Duration`). The name should be in a canonical form
|
|
103
|
-
* (e.g., leading "." is not accepted).
|
|
104
|
-
*
|
|
105
|
-
* In practice, teams usually precompile into the binary all types that they
|
|
106
|
-
* expect it to use in the context of Any. However, for URLs which use the
|
|
107
|
-
* scheme `http`, `https`, or no scheme, one can optionally set up a type
|
|
108
|
-
* server that maps type URLs to message definitions as follows:
|
|
109
|
-
* * If no scheme is provided, `https` is assumed.
|
|
110
|
-
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
|
111
|
-
* value in binary format, or produce an error.
|
|
112
|
-
* * Applications are allowed to cache lookup results based on the
|
|
113
|
-
* URL, or have them precompiled into a binary to avoid any
|
|
114
|
-
* lookup. Therefore, binary compatibility needs to be preserved
|
|
115
|
-
* on changes to types. (Use versioned type names to manage
|
|
116
|
-
* breaking changes.)
|
|
117
|
-
* Note: this functionality is not currently available in the official
|
|
118
|
-
* protobuf release, and it is not used for type URLs beginning with
|
|
119
|
-
* type.googleapis.com.
|
|
120
|
-
* Schemes other than `http`, `https` (or the empty scheme) might be
|
|
121
|
-
* used with implementation specific semantics.
|
|
122
|
-
*/
|
|
123
|
-
"@type"?: string;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export interface RpcStatus {
|
|
127
|
-
/** @format int32 */
|
|
128
|
-
code?: number;
|
|
129
|
-
message?: string;
|
|
130
|
-
details?: ProtobufAny[];
|
|
131
|
-
}
|
|
132
|
-
|
|
133
12
|
/**
|
|
134
13
|
* Class defines the class of the nft type.
|
|
135
14
|
*/
|
|
136
|
-
export interface
|
|
15
|
+
export interface Nftv1Beta1Class {
|
|
137
16
|
/** id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 */
|
|
138
17
|
id?: string;
|
|
139
18
|
|
|
@@ -214,15 +93,10 @@ export interface V1Beta1Class {
|
|
|
214
93
|
data?: ProtobufAny;
|
|
215
94
|
}
|
|
216
95
|
|
|
217
|
-
/**
|
|
218
|
-
* MsgSendResponse defines the Msg/Send response type.
|
|
219
|
-
*/
|
|
220
|
-
export type V1Beta1MsgSendResponse = object;
|
|
221
|
-
|
|
222
96
|
/**
|
|
223
97
|
* NFT defines the NFT.
|
|
224
98
|
*/
|
|
225
|
-
export interface
|
|
99
|
+
export interface Nftv1Beta1NFT {
|
|
226
100
|
/** class_id associated with the NFT, similar to the contract address of ERC721 */
|
|
227
101
|
class_id?: string;
|
|
228
102
|
|
|
@@ -297,6 +171,132 @@ export interface V1Beta1NFT {
|
|
|
297
171
|
data?: ProtobufAny;
|
|
298
172
|
}
|
|
299
173
|
|
|
174
|
+
/**
|
|
175
|
+
* `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
176
|
+
URL that describes the type of the serialized message.
|
|
177
|
+
|
|
178
|
+
Protobuf library provides support to pack/unpack Any values in the form
|
|
179
|
+
of utility functions or additional generated methods of the Any type.
|
|
180
|
+
|
|
181
|
+
Example 1: Pack and unpack a message in C++.
|
|
182
|
+
|
|
183
|
+
Foo foo = ...;
|
|
184
|
+
Any any;
|
|
185
|
+
any.PackFrom(foo);
|
|
186
|
+
...
|
|
187
|
+
if (any.UnpackTo(&foo)) {
|
|
188
|
+
...
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
Example 2: Pack and unpack a message in Java.
|
|
192
|
+
|
|
193
|
+
Foo foo = ...;
|
|
194
|
+
Any any = Any.pack(foo);
|
|
195
|
+
...
|
|
196
|
+
if (any.is(Foo.class)) {
|
|
197
|
+
foo = any.unpack(Foo.class);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
Example 3: Pack and unpack a message in Python.
|
|
201
|
+
|
|
202
|
+
foo = Foo(...)
|
|
203
|
+
any = Any()
|
|
204
|
+
any.Pack(foo)
|
|
205
|
+
...
|
|
206
|
+
if any.Is(Foo.DESCRIPTOR):
|
|
207
|
+
any.Unpack(foo)
|
|
208
|
+
...
|
|
209
|
+
|
|
210
|
+
Example 4: Pack and unpack a message in Go
|
|
211
|
+
|
|
212
|
+
foo := &pb.Foo{...}
|
|
213
|
+
any, err := anypb.New(foo)
|
|
214
|
+
if err != nil {
|
|
215
|
+
...
|
|
216
|
+
}
|
|
217
|
+
...
|
|
218
|
+
foo := &pb.Foo{}
|
|
219
|
+
if err := any.UnmarshalTo(foo); err != nil {
|
|
220
|
+
...
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
The pack methods provided by protobuf library will by default use
|
|
224
|
+
'type.googleapis.com/full.type.name' as the type URL and the unpack
|
|
225
|
+
methods only use the fully qualified type name after the last '/'
|
|
226
|
+
in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
|
227
|
+
name "y.z".
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
JSON
|
|
231
|
+
====
|
|
232
|
+
The JSON representation of an `Any` value uses the regular
|
|
233
|
+
representation of the deserialized, embedded message, with an
|
|
234
|
+
additional field `@type` which contains the type URL. Example:
|
|
235
|
+
|
|
236
|
+
package google.profile;
|
|
237
|
+
message Person {
|
|
238
|
+
string first_name = 1;
|
|
239
|
+
string last_name = 2;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
{
|
|
243
|
+
"@type": "type.googleapis.com/google.profile.Person",
|
|
244
|
+
"firstName": <string>,
|
|
245
|
+
"lastName": <string>
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
If the embedded message type is well-known and has a custom JSON
|
|
249
|
+
representation, that representation will be embedded adding a field
|
|
250
|
+
`value` which holds the custom JSON in addition to the `@type`
|
|
251
|
+
field. Example (for message [google.protobuf.Duration][]):
|
|
252
|
+
|
|
253
|
+
{
|
|
254
|
+
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
255
|
+
"value": "1.212s"
|
|
256
|
+
}
|
|
257
|
+
*/
|
|
258
|
+
export interface ProtobufAny {
|
|
259
|
+
/**
|
|
260
|
+
* A URL/resource name that uniquely identifies the type of the serialized
|
|
261
|
+
* protocol buffer message. This string must contain at least
|
|
262
|
+
* one "/" character. The last segment of the URL's path must represent
|
|
263
|
+
* the fully qualified name of the type (as in
|
|
264
|
+
* `path/google.protobuf.Duration`). The name should be in a canonical form
|
|
265
|
+
* (e.g., leading "." is not accepted).
|
|
266
|
+
*
|
|
267
|
+
* In practice, teams usually precompile into the binary all types that they
|
|
268
|
+
* expect it to use in the context of Any. However, for URLs which use the
|
|
269
|
+
* scheme `http`, `https`, or no scheme, one can optionally set up a type
|
|
270
|
+
* server that maps type URLs to message definitions as follows:
|
|
271
|
+
* * If no scheme is provided, `https` is assumed.
|
|
272
|
+
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
|
273
|
+
* value in binary format, or produce an error.
|
|
274
|
+
* * Applications are allowed to cache lookup results based on the
|
|
275
|
+
* URL, or have them precompiled into a binary to avoid any
|
|
276
|
+
* lookup. Therefore, binary compatibility needs to be preserved
|
|
277
|
+
* on changes to types. (Use versioned type names to manage
|
|
278
|
+
* breaking changes.)
|
|
279
|
+
* Note: this functionality is not currently available in the official
|
|
280
|
+
* protobuf release, and it is not used for type URLs beginning with
|
|
281
|
+
* type.googleapis.com.
|
|
282
|
+
* Schemes other than `http`, `https` (or the empty scheme) might be
|
|
283
|
+
* used with implementation specific semantics.
|
|
284
|
+
*/
|
|
285
|
+
"@type"?: string;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export interface RpcStatus {
|
|
289
|
+
/** @format int32 */
|
|
290
|
+
code?: number;
|
|
291
|
+
message?: string;
|
|
292
|
+
details?: ProtobufAny[];
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* MsgSendResponse defines the Msg/Send response type.
|
|
297
|
+
*/
|
|
298
|
+
export type V1Beta1MsgSendResponse = object;
|
|
299
|
+
|
|
300
300
|
/**
|
|
301
301
|
* message SomeRequest {
|
|
302
302
|
Foo some_parameter = 1;
|
|
@@ -376,11 +376,11 @@ export interface V1Beta1QueryBalanceResponse {
|
|
|
376
376
|
|
|
377
377
|
export interface V1Beta1QueryClassResponse {
|
|
378
378
|
/** Class defines the class of the nft type. */
|
|
379
|
-
class?:
|
|
379
|
+
class?: Nftv1Beta1Class;
|
|
380
380
|
}
|
|
381
381
|
|
|
382
382
|
export interface V1Beta1QueryClassesResponse {
|
|
383
|
-
classes?:
|
|
383
|
+
classes?: Nftv1Beta1Class[];
|
|
384
384
|
|
|
385
385
|
/**
|
|
386
386
|
* PageResponse is to be embedded in gRPC response messages where the
|
|
@@ -396,11 +396,11 @@ export interface V1Beta1QueryClassesResponse {
|
|
|
396
396
|
|
|
397
397
|
export interface V1Beta1QueryNFTResponse {
|
|
398
398
|
/** NFT defines the NFT. */
|
|
399
|
-
nft?:
|
|
399
|
+
nft?: Nftv1Beta1NFT;
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
export interface V1Beta1QueryNFTsResponse {
|
|
403
|
-
nfts?:
|
|
403
|
+
nfts?: Nftv1Beta1NFT[];
|
|
404
404
|
|
|
405
405
|
/**
|
|
406
406
|
* PageResponse is to be embedded in gRPC response messages where the
|
|
@@ -20,6 +20,24 @@ export interface RpcStatus {
|
|
|
20
20
|
details?: ProtobufAny[];
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Params represents the parameters used for by the slashing module.
|
|
25
|
+
*/
|
|
26
|
+
export interface Slashingv1Beta1Params {
|
|
27
|
+
/** @format int64 */
|
|
28
|
+
signed_blocks_window?: string;
|
|
29
|
+
|
|
30
|
+
/** @format byte */
|
|
31
|
+
min_signed_per_window?: string;
|
|
32
|
+
downtime_jail_duration?: string;
|
|
33
|
+
|
|
34
|
+
/** @format byte */
|
|
35
|
+
slash_fraction_double_sign?: string;
|
|
36
|
+
|
|
37
|
+
/** @format byte */
|
|
38
|
+
slash_fraction_downtime?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
23
41
|
export type V1Beta1MsgUnjailResponse = object;
|
|
24
42
|
|
|
25
43
|
/**
|
|
@@ -94,27 +112,9 @@ export interface V1Beta1PageResponse {
|
|
|
94
112
|
total?: string;
|
|
95
113
|
}
|
|
96
114
|
|
|
97
|
-
/**
|
|
98
|
-
* Params represents the parameters used for by the slashing module.
|
|
99
|
-
*/
|
|
100
|
-
export interface V1Beta1Params {
|
|
101
|
-
/** @format int64 */
|
|
102
|
-
signed_blocks_window?: string;
|
|
103
|
-
|
|
104
|
-
/** @format byte */
|
|
105
|
-
min_signed_per_window?: string;
|
|
106
|
-
downtime_jail_duration?: string;
|
|
107
|
-
|
|
108
|
-
/** @format byte */
|
|
109
|
-
slash_fraction_double_sign?: string;
|
|
110
|
-
|
|
111
|
-
/** @format byte */
|
|
112
|
-
slash_fraction_downtime?: string;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
115
|
export interface V1Beta1QueryParamsResponse {
|
|
116
116
|
/** Params represents the parameters used for by the slashing module. */
|
|
117
|
-
params?:
|
|
117
|
+
params?: Slashingv1Beta1Params;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
export interface V1Beta1QuerySigningInfoResponse {
|
|
@@ -4,11 +4,11 @@ import { Registry } from "@cosmjs/proto-signing";
|
|
|
4
4
|
import { msgTypes } from './registry';
|
|
5
5
|
import { Api } from "./rest";
|
|
6
6
|
import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
7
|
-
import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
8
|
-
import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
9
|
-
import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
10
7
|
import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
11
8
|
import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx";
|
|
9
|
+
import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
10
|
+
import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
11
|
+
import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
12
12
|
import { StakeAuthorization as typeStakeAuthorization } from "./types";
|
|
13
13
|
import { StakeAuthorization_Validators as typeStakeAuthorization_Validators } from "./types";
|
|
14
14
|
import { LastValidatorPower as typeLastValidatorPower } from "./types";
|
|
@@ -32,7 +32,7 @@ import { DelegationResponse as typeDelegationResponse } from "./types";
|
|
|
32
32
|
import { RedelegationEntryResponse as typeRedelegationEntryResponse } from "./types";
|
|
33
33
|
import { RedelegationResponse as typeRedelegationResponse } from "./types";
|
|
34
34
|
import { Pool as typePool } from "./types";
|
|
35
|
-
export { MsgCreateValidator,
|
|
35
|
+
export { MsgCreateValidator, MsgUndelegate, MsgCancelUnbondingDelegation, MsgDelegate, MsgEditValidator, MsgBeginRedelegate };
|
|
36
36
|
export const registry = new Registry(msgTypes);
|
|
37
37
|
function getStructure(template) {
|
|
38
38
|
const structure = { fields: [] };
|
|
@@ -62,74 +62,74 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
62
62
|
throw new Error('TxClient:sendMsgCreateValidator: Could not broadcast Tx: ' + e.message);
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
-
async
|
|
65
|
+
async sendMsgUndelegate({ value, fee, memo }) {
|
|
66
66
|
if (!signer) {
|
|
67
|
-
throw new Error('TxClient:
|
|
67
|
+
throw new Error('TxClient:sendMsgUndelegate: Unable to sign Tx. Signer is not present.');
|
|
68
68
|
}
|
|
69
69
|
try {
|
|
70
70
|
const { address } = (await signer.getAccounts())[0];
|
|
71
71
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
72
|
-
let msg = this.
|
|
72
|
+
let msg = this.msgUndelegate({ value: MsgUndelegate.fromPartial(value) });
|
|
73
73
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
74
74
|
}
|
|
75
75
|
catch (e) {
|
|
76
|
-
throw new Error('TxClient:
|
|
76
|
+
throw new Error('TxClient:sendMsgUndelegate: Could not broadcast Tx: ' + e.message);
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
|
-
async
|
|
79
|
+
async sendMsgCancelUnbondingDelegation({ value, fee, memo }) {
|
|
80
80
|
if (!signer) {
|
|
81
|
-
throw new Error('TxClient:
|
|
81
|
+
throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Unable to sign Tx. Signer is not present.');
|
|
82
82
|
}
|
|
83
83
|
try {
|
|
84
84
|
const { address } = (await signer.getAccounts())[0];
|
|
85
85
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
86
|
-
let msg = this.
|
|
86
|
+
let msg = this.msgCancelUnbondingDelegation({ value: MsgCancelUnbondingDelegation.fromPartial(value) });
|
|
87
87
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
88
88
|
}
|
|
89
89
|
catch (e) {
|
|
90
|
-
throw new Error('TxClient:
|
|
90
|
+
throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Could not broadcast Tx: ' + e.message);
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
|
-
async
|
|
93
|
+
async sendMsgDelegate({ value, fee, memo }) {
|
|
94
94
|
if (!signer) {
|
|
95
|
-
throw new Error('TxClient:
|
|
95
|
+
throw new Error('TxClient:sendMsgDelegate: Unable to sign Tx. Signer is not present.');
|
|
96
96
|
}
|
|
97
97
|
try {
|
|
98
98
|
const { address } = (await signer.getAccounts())[0];
|
|
99
99
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
100
|
-
let msg = this.
|
|
100
|
+
let msg = this.msgDelegate({ value: MsgDelegate.fromPartial(value) });
|
|
101
101
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
102
102
|
}
|
|
103
103
|
catch (e) {
|
|
104
|
-
throw new Error('TxClient:
|
|
104
|
+
throw new Error('TxClient:sendMsgDelegate: Could not broadcast Tx: ' + e.message);
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
-
async
|
|
107
|
+
async sendMsgEditValidator({ value, fee, memo }) {
|
|
108
108
|
if (!signer) {
|
|
109
|
-
throw new Error('TxClient:
|
|
109
|
+
throw new Error('TxClient:sendMsgEditValidator: Unable to sign Tx. Signer is not present.');
|
|
110
110
|
}
|
|
111
111
|
try {
|
|
112
112
|
const { address } = (await signer.getAccounts())[0];
|
|
113
113
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
114
|
-
let msg = this.
|
|
114
|
+
let msg = this.msgEditValidator({ value: MsgEditValidator.fromPartial(value) });
|
|
115
115
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
116
116
|
}
|
|
117
117
|
catch (e) {
|
|
118
|
-
throw new Error('TxClient:
|
|
118
|
+
throw new Error('TxClient:sendMsgEditValidator: Could not broadcast Tx: ' + e.message);
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
|
-
async
|
|
121
|
+
async sendMsgBeginRedelegate({ value, fee, memo }) {
|
|
122
122
|
if (!signer) {
|
|
123
|
-
throw new Error('TxClient:
|
|
123
|
+
throw new Error('TxClient:sendMsgBeginRedelegate: Unable to sign Tx. Signer is not present.');
|
|
124
124
|
}
|
|
125
125
|
try {
|
|
126
126
|
const { address } = (await signer.getAccounts())[0];
|
|
127
127
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
128
|
-
let msg = this.
|
|
128
|
+
let msg = this.msgBeginRedelegate({ value: MsgBeginRedelegate.fromPartial(value) });
|
|
129
129
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
130
130
|
}
|
|
131
131
|
catch (e) {
|
|
132
|
-
throw new Error('TxClient:
|
|
132
|
+
throw new Error('TxClient:sendMsgBeginRedelegate: Could not broadcast Tx: ' + e.message);
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
msgCreateValidator({ value }) {
|
|
@@ -140,44 +140,44 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
140
140
|
throw new Error('TxClient:MsgCreateValidator: Could not create message: ' + e.message);
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
|
|
143
|
+
msgUndelegate({ value }) {
|
|
144
144
|
try {
|
|
145
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
145
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial(value) };
|
|
146
146
|
}
|
|
147
147
|
catch (e) {
|
|
148
|
-
throw new Error('TxClient:
|
|
148
|
+
throw new Error('TxClient:MsgUndelegate: Could not create message: ' + e.message);
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
|
-
|
|
151
|
+
msgCancelUnbondingDelegation({ value }) {
|
|
152
152
|
try {
|
|
153
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
153
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.fromPartial(value) };
|
|
154
154
|
}
|
|
155
155
|
catch (e) {
|
|
156
|
-
throw new Error('TxClient:
|
|
156
|
+
throw new Error('TxClient:MsgCancelUnbondingDelegation: Could not create message: ' + e.message);
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
|
-
|
|
159
|
+
msgDelegate({ value }) {
|
|
160
160
|
try {
|
|
161
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
161
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.fromPartial(value) };
|
|
162
162
|
}
|
|
163
163
|
catch (e) {
|
|
164
|
-
throw new Error('TxClient:
|
|
164
|
+
throw new Error('TxClient:MsgDelegate: Could not create message: ' + e.message);
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
|
-
|
|
167
|
+
msgEditValidator({ value }) {
|
|
168
168
|
try {
|
|
169
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
169
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.fromPartial(value) };
|
|
170
170
|
}
|
|
171
171
|
catch (e) {
|
|
172
|
-
throw new Error('TxClient:
|
|
172
|
+
throw new Error('TxClient:MsgEditValidator: Could not create message: ' + e.message);
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
|
-
|
|
175
|
+
msgBeginRedelegate({ value }) {
|
|
176
176
|
try {
|
|
177
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
177
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial(value) };
|
|
178
178
|
}
|
|
179
179
|
catch (e) {
|
|
180
|
-
throw new Error('TxClient:
|
|
180
|
+
throw new Error('TxClient:MsgBeginRedelegate: Could not create message: ' + e.message);
|
|
181
181
|
}
|
|
182
182
|
},
|
|
183
183
|
};
|