@xpla/xplajs 1.9.0-rc0 → 1.9.1

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/dist/binary.cjs CHANGED
@@ -4,7 +4,7 @@ const require_varint = require('./varint.cjs');
4
4
 
5
5
  //#region src/binary.ts
6
6
  /**
7
- * This file and any referenced files were automatically generated by @hyperweb/telescope@1.17.4
7
+ * This file and any referenced files were automatically generated by @hyperweb/telescope@2.2.4
8
8
  * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
9
9
  * and run the transpile command or npm scripts command that is used to regenerate this bundle.
10
10
  */
package/dist/binary.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  //#region src/binary.d.ts
2
2
  /**
3
- * This file and any referenced files were automatically generated by @hyperweb/telescope@1.17.4
3
+ * This file and any referenced files were automatically generated by @hyperweb/telescope@2.2.4
4
4
  * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
5
5
  * and run the transpile command or npm scripts command that is used to regenerate this bundle.
6
6
  */
package/dist/binary.js CHANGED
@@ -3,7 +3,7 @@ import { int64FromString, int64Length, int64ToString, readInt32, readUInt32, uIn
3
3
 
4
4
  //#region src/binary.ts
5
5
  /**
6
- * This file and any referenced files were automatically generated by @hyperweb/telescope@1.17.4
6
+ * This file and any referenced files were automatically generated by @hyperweb/telescope@2.2.4
7
7
  * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
8
8
  * and run the transpile command or npm scripts command that is used to regenerate this bundle.
9
9
  */
@@ -12,33 +12,88 @@ function createBaseAny() {
12
12
  * `Any` contains an arbitrary serialized protocol buffer message along with a
13
13
  * URL that describes the type of the serialized message.
14
14
  *
15
- * In its binary encoding, an `Any` is an ordinary message; but in other wire
16
- * forms like JSON, it has a special encoding. The format of the type URL is
17
- * described on the `type_url` field.
15
+ * Protobuf library provides support to pack/unpack Any values in the form
16
+ * of utility functions or additional generated methods of the Any type.
18
17
  *
19
- * Protobuf APIs provide utilities to interact with `Any` values:
18
+ * Example 1: Pack and unpack a message in C++.
20
19
  *
21
- * - A 'pack' operation accepts a message and constructs a generic `Any` wrapper
22
- * around it.
23
- * - An 'unpack' operation reads the content of an `Any` message, either into an
24
- * existing message or a new one. Unpack operations must check the type of the
25
- * value they unpack against the declared `type_url`.
26
- * - An 'is' operation decides whether an `Any` contains a message of the given
27
- * type, i.e. whether it can 'unpack' that type.
20
+ * Foo foo = ...;
21
+ * Any any;
22
+ * any.PackFrom(foo);
23
+ * ...
24
+ * if (any.UnpackTo(&foo)) {
25
+ * ...
26
+ * }
28
27
  *
29
- * The JSON format representation of an `Any` follows one of these cases:
28
+ * Example 2: Pack and unpack a message in Java.
30
29
  *
31
- * - For types without special-cased JSON encodings, the JSON format
32
- * representation of the `Any` is the same as that of the message, with an
33
- * additional `@type` field which contains the type URL.
34
- * - For types with special-cased JSON encodings (typically called 'well-known'
35
- * types, listed in https://protobuf.dev/programming-guides/json/#any), the
36
- * JSON format representation has a key `@type` which contains the type URL
37
- * and a key `value` which contains the JSON-serialized value.
30
+ * Foo foo = ...;
31
+ * Any any = Any.pack(foo);
32
+ * ...
33
+ * if (any.is(Foo.class)) {
34
+ * foo = any.unpack(Foo.class);
35
+ * }
36
+ * // or ...
37
+ * if (any.isSameTypeAs(Foo.getDefaultInstance())) {
38
+ * foo = any.unpack(Foo.getDefaultInstance());
39
+ * }
38
40
  *
39
- * The text format representation of an `Any` is like a message with one field
40
- * whose name is the type URL in brackets. For example, an `Any` containing a
41
- * `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`.
41
+ * Example 3: Pack and unpack a message in Python.
42
+ *
43
+ * foo = Foo(...)
44
+ * any = Any()
45
+ * any.Pack(foo)
46
+ * ...
47
+ * if any.Is(Foo.DESCRIPTOR):
48
+ * any.Unpack(foo)
49
+ * ...
50
+ *
51
+ * Example 4: Pack and unpack a message in Go
52
+ *
53
+ * foo := &pb.Foo{...}
54
+ * any, err := anypb.New(foo)
55
+ * if err != nil {
56
+ * ...
57
+ * }
58
+ * ...
59
+ * foo := &pb.Foo{}
60
+ * if err := any.UnmarshalTo(foo); err != nil {
61
+ * ...
62
+ * }
63
+ *
64
+ * The pack methods provided by protobuf library will by default use
65
+ * 'type.googleapis.com/full.type.name' as the type URL and the unpack
66
+ * methods only use the fully qualified type name after the last '/'
67
+ * in the type URL, for example "foo.bar.com/x/y.z" will yield type
68
+ * name "y.z".
69
+ *
70
+ * JSON
71
+ * ====
72
+ * The JSON representation of an `Any` value uses the regular
73
+ * representation of the deserialized, embedded message, with an
74
+ * additional field `@type` which contains the type URL. Example:
75
+ *
76
+ * package google.profile;
77
+ * message Person {
78
+ * string first_name = 1;
79
+ * string last_name = 2;
80
+ * }
81
+ *
82
+ * {
83
+ * "@type": "type.googleapis.com/google.profile.Person",
84
+ * "firstName": <string>,
85
+ * "lastName": <string>
86
+ * }
87
+ *
88
+ * If the embedded message type is well-known and has a custom JSON
89
+ * representation, that representation will be embedded adding a field
90
+ * `value` which holds the custom JSON in addition to the `@type`
91
+ * field. Example (for message [google.protobuf.Duration][]):
92
+ *
93
+ * {
94
+ * "@type": "type.googleapis.com/google.protobuf.Duration",
95
+ * "value": "1.212s"
96
+ * }
42
97
  * @name Any
43
98
  * @package google.protobuf
44
99
  * @see proto type: google.protobuf.Any
@@ -6,72 +6,126 @@ import { DeepPartial } from "../../helpers.js";
6
6
  * `Any` contains an arbitrary serialized protocol buffer message along with a
7
7
  * URL that describes the type of the serialized message.
8
8
  *
9
- * In its binary encoding, an `Any` is an ordinary message; but in other wire
10
- * forms like JSON, it has a special encoding. The format of the type URL is
11
- * described on the `type_url` field.
12
- *
13
- * Protobuf APIs provide utilities to interact with `Any` values:
14
- *
15
- * - A 'pack' operation accepts a message and constructs a generic `Any` wrapper
16
- * around it.
17
- * - An 'unpack' operation reads the content of an `Any` message, either into an
18
- * existing message or a new one. Unpack operations must check the type of the
19
- * value they unpack against the declared `type_url`.
20
- * - An 'is' operation decides whether an `Any` contains a message of the given
21
- * type, i.e. whether it can 'unpack' that type.
22
- *
23
- * The JSON format representation of an `Any` follows one of these cases:
24
- *
25
- * - For types without special-cased JSON encodings, the JSON format
26
- * representation of the `Any` is the same as that of the message, with an
27
- * additional `@type` field which contains the type URL.
28
- * - For types with special-cased JSON encodings (typically called 'well-known'
29
- * types, listed in https://protobuf.dev/programming-guides/json/#any), the
30
- * JSON format representation has a key `@type` which contains the type URL
31
- * and a key `value` which contains the JSON-serialized value.
32
- *
33
- * The text format representation of an `Any` is like a message with one field
34
- * whose name is the type URL in brackets. For example, an `Any` containing a
35
- * `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`.
9
+ * Protobuf library provides support to pack/unpack Any values in the form
10
+ * of utility functions or additional generated methods of the Any type.
11
+ *
12
+ * Example 1: Pack and unpack a message in C++.
13
+ *
14
+ * Foo foo = ...;
15
+ * Any any;
16
+ * any.PackFrom(foo);
17
+ * ...
18
+ * if (any.UnpackTo(&foo)) {
19
+ * ...
20
+ * }
21
+ *
22
+ * Example 2: Pack and unpack a message in Java.
23
+ *
24
+ * Foo foo = ...;
25
+ * Any any = Any.pack(foo);
26
+ * ...
27
+ * if (any.is(Foo.class)) {
28
+ * foo = any.unpack(Foo.class);
29
+ * }
30
+ * // or ...
31
+ * if (any.isSameTypeAs(Foo.getDefaultInstance())) {
32
+ * foo = any.unpack(Foo.getDefaultInstance());
33
+ * }
34
+ *
35
+ * Example 3: Pack and unpack a message in Python.
36
+ *
37
+ * foo = Foo(...)
38
+ * any = Any()
39
+ * any.Pack(foo)
40
+ * ...
41
+ * if any.Is(Foo.DESCRIPTOR):
42
+ * any.Unpack(foo)
43
+ * ...
44
+ *
45
+ * Example 4: Pack and unpack a message in Go
46
+ *
47
+ * foo := &pb.Foo{...}
48
+ * any, err := anypb.New(foo)
49
+ * if err != nil {
50
+ * ...
51
+ * }
52
+ * ...
53
+ * foo := &pb.Foo{}
54
+ * if err := any.UnmarshalTo(foo); err != nil {
55
+ * ...
56
+ * }
57
+ *
58
+ * The pack methods provided by protobuf library will by default use
59
+ * 'type.googleapis.com/full.type.name' as the type URL and the unpack
60
+ * methods only use the fully qualified type name after the last '/'
61
+ * in the type URL, for example "foo.bar.com/x/y.z" will yield type
62
+ * name "y.z".
63
+ *
64
+ * JSON
65
+ * ====
66
+ * The JSON representation of an `Any` value uses the regular
67
+ * representation of the deserialized, embedded message, with an
68
+ * additional field `@type` which contains the type URL. Example:
69
+ *
70
+ * package google.profile;
71
+ * message Person {
72
+ * string first_name = 1;
73
+ * string last_name = 2;
74
+ * }
75
+ *
76
+ * {
77
+ * "@type": "type.googleapis.com/google.profile.Person",
78
+ * "firstName": <string>,
79
+ * "lastName": <string>
80
+ * }
81
+ *
82
+ * If the embedded message type is well-known and has a custom JSON
83
+ * representation, that representation will be embedded adding a field
84
+ * `value` which holds the custom JSON in addition to the `@type`
85
+ * field. Example (for message [google.protobuf.Duration][]):
86
+ *
87
+ * {
88
+ * "@type": "type.googleapis.com/google.protobuf.Duration",
89
+ * "value": "1.212s"
90
+ * }
36
91
  * @name Any
37
92
  * @package google.protobuf
38
93
  * @see proto type: google.protobuf.Any
39
94
  */
40
95
  interface Any {
41
96
  /**
42
- * Identifies the type of the serialized Protobuf message with a URI reference
43
- * consisting of a prefix ending in a slash and the fully-qualified type name.
97
+ * A URL/resource name that uniquely identifies the type of the serialized
98
+ * protocol buffer message. This string must contain at least
99
+ * one "/" character. The last segment of the URL's path must represent
100
+ * the fully qualified name of the type (as in
101
+ * `path/google.protobuf.Duration`). The name should be in a canonical form
102
+ * (e.g., leading "." is not accepted).
44
103
  *
45
- * Example: type.googleapis.com/google.protobuf.StringValue
104
+ * In practice, teams usually precompile into the binary all types that they
105
+ * expect it to use in the context of Any. However, for URLs which use the
106
+ * scheme `http`, `https`, or no scheme, one can optionally set up a type
107
+ * server that maps type URLs to message definitions as follows:
46
108
  *
47
- * This string must contain at least one `/` character, and the content after
48
- * the last `/` must be the fully-qualified name of the type in canonical
49
- * form, without a leading dot. Do not write a scheme on these URI references
50
- * so that clients do not attempt to contact them.
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.)
51
117
  *
52
- * The prefix is arbitrary and Protobuf implementations are expected to
53
- * simply strip off everything up to and including the last `/` to identify
54
- * the type. `type.googleapis.com/` is a common default prefix that some
55
- * legacy implementations require. This prefix does not indicate the origin of
56
- * the type, and URIs containing it are not expected to respond to any
57
- * requests.
118
+ * Note: this functionality is not currently available in the official
119
+ * protobuf release, and it is not used for type URLs beginning with
120
+ * type.googleapis.com. As of May 2023, there are no widely used type server
121
+ * implementations and no plans to implement one.
58
122
  *
59
- * All type URL strings must be legal URI references with the additional
60
- * restriction (for the text format) that the content of the reference
61
- * must consist only of alphanumeric characters, percent-encoded escapes, and
62
- * characters in the following set (not including the outer backticks):
63
- * `/-.~_!$&()*+,;=`. Despite our allowing percent encodings, implementations
64
- * should not unescape them to prevent confusion with existing parsers. For
65
- * example, `type.googleapis.com%2FFoo` should be rejected.
66
- *
67
- * In the original design of `Any`, the possibility of launching a type
68
- * resolution service at these type URLs was considered but Protobuf never
69
- * implemented one and considers contacting these URLs to be problematic and
70
- * a potential security issue. Do not attempt to contact type URLs.
123
+ * Schemes other than `http`, `https` (or the empty scheme) might be
124
+ * used with implementation specific semantics.
71
125
  */
72
126
  typeUrl: string;
73
127
  /**
74
- * Holds a Protobuf serialization of the type described by type_url.
128
+ * Must be a valid serialized protocol buffer of the above specified type.
75
129
  */
76
130
  value: Uint8Array;
77
131
  }
@@ -83,72 +137,126 @@ interface AnyProtoMsg {
83
137
  * `Any` contains an arbitrary serialized protocol buffer message along with a
84
138
  * URL that describes the type of the serialized message.
85
139
  *
86
- * In its binary encoding, an `Any` is an ordinary message; but in other wire
87
- * forms like JSON, it has a special encoding. The format of the type URL is
88
- * described on the `type_url` field.
89
- *
90
- * Protobuf APIs provide utilities to interact with `Any` values:
91
- *
92
- * - A 'pack' operation accepts a message and constructs a generic `Any` wrapper
93
- * around it.
94
- * - An 'unpack' operation reads the content of an `Any` message, either into an
95
- * existing message or a new one. Unpack operations must check the type of the
96
- * value they unpack against the declared `type_url`.
97
- * - An 'is' operation decides whether an `Any` contains a message of the given
98
- * type, i.e. whether it can 'unpack' that type.
99
- *
100
- * The JSON format representation of an `Any` follows one of these cases:
101
- *
102
- * - For types without special-cased JSON encodings, the JSON format
103
- * representation of the `Any` is the same as that of the message, with an
104
- * additional `@type` field which contains the type URL.
105
- * - For types with special-cased JSON encodings (typically called 'well-known'
106
- * types, listed in https://protobuf.dev/programming-guides/json/#any), the
107
- * JSON format representation has a key `@type` which contains the type URL
108
- * and a key `value` which contains the JSON-serialized value.
109
- *
110
- * The text format representation of an `Any` is like a message with one field
111
- * whose name is the type URL in brackets. For example, an `Any` containing a
112
- * `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`.
140
+ * Protobuf library provides support to pack/unpack Any values in the form
141
+ * of utility functions or additional generated methods of the Any type.
142
+ *
143
+ * Example 1: Pack and unpack a message in C++.
144
+ *
145
+ * Foo foo = ...;
146
+ * Any any;
147
+ * any.PackFrom(foo);
148
+ * ...
149
+ * if (any.UnpackTo(&foo)) {
150
+ * ...
151
+ * }
152
+ *
153
+ * Example 2: Pack and unpack a message in Java.
154
+ *
155
+ * Foo foo = ...;
156
+ * Any any = Any.pack(foo);
157
+ * ...
158
+ * if (any.is(Foo.class)) {
159
+ * foo = any.unpack(Foo.class);
160
+ * }
161
+ * // or ...
162
+ * if (any.isSameTypeAs(Foo.getDefaultInstance())) {
163
+ * foo = any.unpack(Foo.getDefaultInstance());
164
+ * }
165
+ *
166
+ * Example 3: Pack and unpack a message in Python.
167
+ *
168
+ * foo = Foo(...)
169
+ * any = Any()
170
+ * any.Pack(foo)
171
+ * ...
172
+ * if any.Is(Foo.DESCRIPTOR):
173
+ * any.Unpack(foo)
174
+ * ...
175
+ *
176
+ * Example 4: Pack and unpack a message in Go
177
+ *
178
+ * foo := &pb.Foo{...}
179
+ * any, err := anypb.New(foo)
180
+ * if err != nil {
181
+ * ...
182
+ * }
183
+ * ...
184
+ * foo := &pb.Foo{}
185
+ * if err := any.UnmarshalTo(foo); err != nil {
186
+ * ...
187
+ * }
188
+ *
189
+ * The pack methods provided by protobuf library will by default use
190
+ * 'type.googleapis.com/full.type.name' as the type URL and the unpack
191
+ * methods only use the fully qualified type name after the last '/'
192
+ * in the type URL, for example "foo.bar.com/x/y.z" will yield type
193
+ * name "y.z".
194
+ *
195
+ * JSON
196
+ * ====
197
+ * The JSON representation of an `Any` value uses the regular
198
+ * representation of the deserialized, embedded message, with an
199
+ * additional field `@type` which contains the type URL. Example:
200
+ *
201
+ * package google.profile;
202
+ * message Person {
203
+ * string first_name = 1;
204
+ * string last_name = 2;
205
+ * }
206
+ *
207
+ * {
208
+ * "@type": "type.googleapis.com/google.profile.Person",
209
+ * "firstName": <string>,
210
+ * "lastName": <string>
211
+ * }
212
+ *
213
+ * If the embedded message type is well-known and has a custom JSON
214
+ * representation, that representation will be embedded adding a field
215
+ * `value` which holds the custom JSON in addition to the `@type`
216
+ * field. Example (for message [google.protobuf.Duration][]):
217
+ *
218
+ * {
219
+ * "@type": "type.googleapis.com/google.protobuf.Duration",
220
+ * "value": "1.212s"
221
+ * }
113
222
  * @name AnyAmino
114
223
  * @package google.protobuf
115
224
  * @see proto type: google.protobuf.Any
116
225
  */
117
226
  interface AnyAmino {
118
227
  /**
119
- * Identifies the type of the serialized Protobuf message with a URI reference
120
- * consisting of a prefix ending in a slash and the fully-qualified type name.
121
- *
122
- * Example: type.googleapis.com/google.protobuf.StringValue
228
+ * A URL/resource name that uniquely identifies the type of the serialized
229
+ * protocol buffer message. This string must contain at least
230
+ * one "/" character. The last segment of the URL's path must represent
231
+ * the fully qualified name of the type (as in
232
+ * `path/google.protobuf.Duration`). The name should be in a canonical form
233
+ * (e.g., leading "." is not accepted).
123
234
  *
124
- * This string must contain at least one `/` character, and the content after
125
- * the last `/` must be the fully-qualified name of the type in canonical
126
- * form, without a leading dot. Do not write a scheme on these URI references
127
- * so that clients do not attempt to contact them.
235
+ * In practice, teams usually precompile into the binary all types that they
236
+ * expect it to use in the context of Any. However, for URLs which use the
237
+ * scheme `http`, `https`, or no scheme, one can optionally set up a type
238
+ * server that maps type URLs to message definitions as follows:
128
239
  *
129
- * The prefix is arbitrary and Protobuf implementations are expected to
130
- * simply strip off everything up to and including the last `/` to identify
131
- * the type. `type.googleapis.com/` is a common default prefix that some
132
- * legacy implementations require. This prefix does not indicate the origin of
133
- * the type, and URIs containing it are not expected to respond to any
134
- * requests.
240
+ * * If no scheme is provided, `https` is assumed.
241
+ * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
242
+ * value in binary format, or produce an error.
243
+ * * Applications are allowed to cache lookup results based on the
244
+ * URL, or have them precompiled into a binary to avoid any
245
+ * lookup. Therefore, binary compatibility needs to be preserved
246
+ * on changes to types. (Use versioned type names to manage
247
+ * breaking changes.)
135
248
  *
136
- * All type URL strings must be legal URI references with the additional
137
- * restriction (for the text format) that the content of the reference
138
- * must consist only of alphanumeric characters, percent-encoded escapes, and
139
- * characters in the following set (not including the outer backticks):
140
- * `/-.~_!$&()*+,;=`. Despite our allowing percent encodings, implementations
141
- * should not unescape them to prevent confusion with existing parsers. For
142
- * example, `type.googleapis.com%2FFoo` should be rejected.
249
+ * Note: this functionality is not currently available in the official
250
+ * protobuf release, and it is not used for type URLs beginning with
251
+ * type.googleapis.com. As of May 2023, there are no widely used type server
252
+ * implementations and no plans to implement one.
143
253
  *
144
- * In the original design of `Any`, the possibility of launching a type
145
- * resolution service at these type URLs was considered but Protobuf never
146
- * implemented one and considers contacting these URLs to be problematic and
147
- * a potential security issue. Do not attempt to contact type URLs.
254
+ * Schemes other than `http`, `https` (or the empty scheme) might be
255
+ * used with implementation specific semantics.
148
256
  */
149
257
  type: string;
150
258
  /**
151
- * Holds a Protobuf serialization of the type described by type_url.
259
+ * Must be a valid serialized protocol buffer of the above specified type.
152
260
  */
153
261
  value: any;
154
262
  }
@@ -160,33 +268,88 @@ interface AnyAminoMsg {
160
268
  * `Any` contains an arbitrary serialized protocol buffer message along with a
161
269
  * URL that describes the type of the serialized message.
162
270
  *
163
- * In its binary encoding, an `Any` is an ordinary message; but in other wire
164
- * forms like JSON, it has a special encoding. The format of the type URL is
165
- * described on the `type_url` field.
166
- *
167
- * Protobuf APIs provide utilities to interact with `Any` values:
168
- *
169
- * - A 'pack' operation accepts a message and constructs a generic `Any` wrapper
170
- * around it.
171
- * - An 'unpack' operation reads the content of an `Any` message, either into an
172
- * existing message or a new one. Unpack operations must check the type of the
173
- * value they unpack against the declared `type_url`.
174
- * - An 'is' operation decides whether an `Any` contains a message of the given
175
- * type, i.e. whether it can 'unpack' that type.
176
- *
177
- * The JSON format representation of an `Any` follows one of these cases:
178
- *
179
- * - For types without special-cased JSON encodings, the JSON format
180
- * representation of the `Any` is the same as that of the message, with an
181
- * additional `@type` field which contains the type URL.
182
- * - For types with special-cased JSON encodings (typically called 'well-known'
183
- * types, listed in https://protobuf.dev/programming-guides/json/#any), the
184
- * JSON format representation has a key `@type` which contains the type URL
185
- * and a key `value` which contains the JSON-serialized value.
186
- *
187
- * The text format representation of an `Any` is like a message with one field
188
- * whose name is the type URL in brackets. For example, an `Any` containing a
189
- * `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`.
271
+ * Protobuf library provides support to pack/unpack Any values in the form
272
+ * of utility functions or additional generated methods of the Any type.
273
+ *
274
+ * Example 1: Pack and unpack a message in C++.
275
+ *
276
+ * Foo foo = ...;
277
+ * Any any;
278
+ * any.PackFrom(foo);
279
+ * ...
280
+ * if (any.UnpackTo(&foo)) {
281
+ * ...
282
+ * }
283
+ *
284
+ * Example 2: Pack and unpack a message in Java.
285
+ *
286
+ * Foo foo = ...;
287
+ * Any any = Any.pack(foo);
288
+ * ...
289
+ * if (any.is(Foo.class)) {
290
+ * foo = any.unpack(Foo.class);
291
+ * }
292
+ * // or ...
293
+ * if (any.isSameTypeAs(Foo.getDefaultInstance())) {
294
+ * foo = any.unpack(Foo.getDefaultInstance());
295
+ * }
296
+ *
297
+ * Example 3: Pack and unpack a message in Python.
298
+ *
299
+ * foo = Foo(...)
300
+ * any = Any()
301
+ * any.Pack(foo)
302
+ * ...
303
+ * if any.Is(Foo.DESCRIPTOR):
304
+ * any.Unpack(foo)
305
+ * ...
306
+ *
307
+ * Example 4: Pack and unpack a message in Go
308
+ *
309
+ * foo := &pb.Foo{...}
310
+ * any, err := anypb.New(foo)
311
+ * if err != nil {
312
+ * ...
313
+ * }
314
+ * ...
315
+ * foo := &pb.Foo{}
316
+ * if err := any.UnmarshalTo(foo); err != nil {
317
+ * ...
318
+ * }
319
+ *
320
+ * The pack methods provided by protobuf library will by default use
321
+ * 'type.googleapis.com/full.type.name' as the type URL and the unpack
322
+ * methods only use the fully qualified type name after the last '/'
323
+ * in the type URL, for example "foo.bar.com/x/y.z" will yield type
324
+ * name "y.z".
325
+ *
326
+ * JSON
327
+ * ====
328
+ * The JSON representation of an `Any` value uses the regular
329
+ * representation of the deserialized, embedded message, with an
330
+ * additional field `@type` which contains the type URL. Example:
331
+ *
332
+ * package google.profile;
333
+ * message Person {
334
+ * string first_name = 1;
335
+ * string last_name = 2;
336
+ * }
337
+ *
338
+ * {
339
+ * "@type": "type.googleapis.com/google.profile.Person",
340
+ * "firstName": <string>,
341
+ * "lastName": <string>
342
+ * }
343
+ *
344
+ * If the embedded message type is well-known and has a custom JSON
345
+ * representation, that representation will be embedded adding a field
346
+ * `value` which holds the custom JSON in addition to the `@type`
347
+ * field. Example (for message [google.protobuf.Duration][]):
348
+ *
349
+ * {
350
+ * "@type": "type.googleapis.com/google.protobuf.Duration",
351
+ * "value": "1.212s"
352
+ * }
190
353
  * @name Any
191
354
  * @package google.protobuf
192
355
  * @see proto type: google.protobuf.Any
@@ -11,33 +11,88 @@ function createBaseAny() {
11
11
  * `Any` contains an arbitrary serialized protocol buffer message along with a
12
12
  * URL that describes the type of the serialized message.
13
13
  *
14
- * In its binary encoding, an `Any` is an ordinary message; but in other wire
15
- * forms like JSON, it has a special encoding. The format of the type URL is
16
- * described on the `type_url` field.
14
+ * Protobuf library provides support to pack/unpack Any values in the form
15
+ * of utility functions or additional generated methods of the Any type.
17
16
  *
18
- * Protobuf APIs provide utilities to interact with `Any` values:
17
+ * Example 1: Pack and unpack a message in C++.
19
18
  *
20
- * - A 'pack' operation accepts a message and constructs a generic `Any` wrapper
21
- * around it.
22
- * - An 'unpack' operation reads the content of an `Any` message, either into an
23
- * existing message or a new one. Unpack operations must check the type of the
24
- * value they unpack against the declared `type_url`.
25
- * - An 'is' operation decides whether an `Any` contains a message of the given
26
- * type, i.e. whether it can 'unpack' that type.
19
+ * Foo foo = ...;
20
+ * Any any;
21
+ * any.PackFrom(foo);
22
+ * ...
23
+ * if (any.UnpackTo(&foo)) {
24
+ * ...
25
+ * }
27
26
  *
28
- * The JSON format representation of an `Any` follows one of these cases:
27
+ * Example 2: Pack and unpack a message in Java.
29
28
  *
30
- * - For types without special-cased JSON encodings, the JSON format
31
- * representation of the `Any` is the same as that of the message, with an
32
- * additional `@type` field which contains the type URL.
33
- * - For types with special-cased JSON encodings (typically called 'well-known'
34
- * types, listed in https://protobuf.dev/programming-guides/json/#any), the
35
- * JSON format representation has a key `@type` which contains the type URL
36
- * and a key `value` which contains the JSON-serialized value.
29
+ * Foo foo = ...;
30
+ * Any any = Any.pack(foo);
31
+ * ...
32
+ * if (any.is(Foo.class)) {
33
+ * foo = any.unpack(Foo.class);
34
+ * }
35
+ * // or ...
36
+ * if (any.isSameTypeAs(Foo.getDefaultInstance())) {
37
+ * foo = any.unpack(Foo.getDefaultInstance());
38
+ * }
37
39
  *
38
- * The text format representation of an `Any` is like a message with one field
39
- * whose name is the type URL in brackets. For example, an `Any` containing a
40
- * `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`.
40
+ * Example 3: Pack and unpack a message in Python.
41
+ *
42
+ * foo = Foo(...)
43
+ * any = Any()
44
+ * any.Pack(foo)
45
+ * ...
46
+ * if any.Is(Foo.DESCRIPTOR):
47
+ * any.Unpack(foo)
48
+ * ...
49
+ *
50
+ * Example 4: Pack and unpack a message in Go
51
+ *
52
+ * foo := &pb.Foo{...}
53
+ * any, err := anypb.New(foo)
54
+ * if err != nil {
55
+ * ...
56
+ * }
57
+ * ...
58
+ * foo := &pb.Foo{}
59
+ * if err := any.UnmarshalTo(foo); err != nil {
60
+ * ...
61
+ * }
62
+ *
63
+ * The pack methods provided by protobuf library will by default use
64
+ * 'type.googleapis.com/full.type.name' as the type URL and the unpack
65
+ * methods only use the fully qualified type name after the last '/'
66
+ * in the type URL, for example "foo.bar.com/x/y.z" will yield type
67
+ * name "y.z".
68
+ *
69
+ * JSON
70
+ * ====
71
+ * The JSON representation of an `Any` value uses the regular
72
+ * representation of the deserialized, embedded message, with an
73
+ * additional field `@type` which contains the type URL. Example:
74
+ *
75
+ * package google.profile;
76
+ * message Person {
77
+ * string first_name = 1;
78
+ * string last_name = 2;
79
+ * }
80
+ *
81
+ * {
82
+ * "@type": "type.googleapis.com/google.profile.Person",
83
+ * "firstName": <string>,
84
+ * "lastName": <string>
85
+ * }
86
+ *
87
+ * If the embedded message type is well-known and has a custom JSON
88
+ * representation, that representation will be embedded adding a field
89
+ * `value` which holds the custom JSON in addition to the `@type`
90
+ * field. Example (for message [google.protobuf.Duration][]):
91
+ *
92
+ * {
93
+ * "@type": "type.googleapis.com/google.protobuf.Duration",
94
+ * "value": "1.212s"
95
+ * }
41
96
  * @name Any
42
97
  * @package google.protobuf
43
98
  * @see proto type: google.protobuf.Any
package/dist/registry.cjs CHANGED
@@ -4,7 +4,7 @@ const require_google_protobuf_any = require('./google/protobuf/any.cjs');
4
4
 
5
5
  //#region src/registry.ts
6
6
  /**
7
- * This file and any referenced files were automatically generated by @hyperweb/telescope@1.17.4
7
+ * This file and any referenced files were automatically generated by @hyperweb/telescope@2.2.4
8
8
  * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
9
9
  * and run the transpile command or npm scripts command that is used to regenerate this bundle.
10
10
  */
@@ -18,7 +18,7 @@ declare class GlobalDecoderRegistry {
18
18
  static getDecoderByInstance<T, SDK, Amino>(obj: unknown): TelescopeGeneratedCodec<T, SDK, Amino> | null;
19
19
  static getDecoderByAminoType<T, SDK, Amino>(type: string): TelescopeGeneratedCodec<T, SDK, Amino> | null;
20
20
  static wrapAny(obj: unknown): Any;
21
- static unwrapAny<T, SDK, Amino>(input: BinaryReader | Uint8Array | Any): T | Any;
21
+ static unwrapAny<T, SDK, Amino>(input: BinaryReader | Uint8Array | Any): Any | T;
22
22
  static fromJSON<T>(object: any): T;
23
23
  static toJSON<T>(message: T): any;
24
24
  static fromPartial<T>(object: unknown): T;
package/dist/registry.js CHANGED
@@ -3,7 +3,7 @@ import { Any } from "./google/protobuf/any.js";
3
3
 
4
4
  //#region src/registry.ts
5
5
  /**
6
- * This file and any referenced files were automatically generated by @hyperweb/telescope@1.17.4
6
+ * This file and any referenced files were automatically generated by @hyperweb/telescope@2.2.4
7
7
  * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
8
8
  * and run the transpile command or npm scripts command that is used to regenerate this bundle.
9
9
  */
package/dist/utf8.cjs CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
5
  //#region src/utf8.ts
6
6
  /**
7
- * This file and any referenced files were automatically generated by @hyperweb/telescope@1.17.4
7
+ * This file and any referenced files were automatically generated by @hyperweb/telescope@2.2.4
8
8
  * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
9
9
  * and run the transpile command or npm scripts command that is used to regenerate this bundle.
10
10
  */
package/dist/utf8.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  //#region src/utf8.d.ts
2
2
  /**
3
- * This file and any referenced files were automatically generated by @hyperweb/telescope@1.17.4
3
+ * This file and any referenced files were automatically generated by @hyperweb/telescope@2.2.4
4
4
  * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
5
5
  * and run the transpile command or npm scripts command that is used to regenerate this bundle.
6
6
  */
package/dist/utf8.js CHANGED
@@ -1,6 +1,6 @@
1
1
  //#region src/utf8.ts
2
2
  /**
3
- * This file and any referenced files were automatically generated by @hyperweb/telescope@1.17.4
3
+ * This file and any referenced files were automatically generated by @hyperweb/telescope@2.2.4
4
4
  * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
5
5
  * and run the transpile command or npm scripts command that is used to regenerate this bundle.
6
6
  */
package/dist/varint.cjs CHANGED
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  //#region src/varint.ts
4
4
  /**
5
- * This file and any referenced files were automatically generated by @hyperweb/telescope@1.17.4
5
+ * This file and any referenced files were automatically generated by @hyperweb/telescope@2.2.4
6
6
  * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
7
7
  * and run the transpile command or npm scripts command that is used to regenerate this bundle.
8
8
  */
package/dist/varint.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  //#region src/varint.d.ts
2
2
  /**
3
- * This file and any referenced files were automatically generated by @hyperweb/telescope@1.17.4
3
+ * This file and any referenced files were automatically generated by @hyperweb/telescope@2.2.4
4
4
  * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
5
5
  * and run the transpile command or npm scripts command that is used to regenerate this bundle.
6
6
  */
package/dist/varint.js CHANGED
@@ -1,6 +1,6 @@
1
1
  //#region src/varint.ts
2
2
  /**
3
- * This file and any referenced files were automatically generated by @hyperweb/telescope@1.17.4
3
+ * This file and any referenced files were automatically generated by @hyperweb/telescope@2.2.4
4
4
  * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
5
5
  * and run the transpile command or npm scripts command that is used to regenerate this bundle.
6
6
  */
@@ -4,7 +4,7 @@ let _cosmjs_stargate = require("@cosmjs/stargate");
4
4
 
5
5
  //#region src/xpla/rpc.query.ts
6
6
  const createRPCQueryClient = async ({ rpcEndpoint }) => {
7
- const client = new _cosmjs_stargate.QueryClient(await _cosmjs_tendermint_rpc.Tendermint34Client.connect(rpcEndpoint));
7
+ const client = new _cosmjs_stargate.QueryClient(await (0, _cosmjs_tendermint_rpc.connectComet)(rpcEndpoint));
8
8
  return {
9
9
  cosmos: {
10
10
  auth: { v1beta1: (await Promise.resolve().then(() => require("../cosmos/auth/v1beta1/query.rpc.Query.cjs"))).createRpcQueryExtension(client) },
@@ -1,9 +1,9 @@
1
- import { Tendermint34Client } from "@cosmjs/tendermint-rpc";
1
+ import { connectComet } from "@cosmjs/tendermint-rpc";
2
2
  import { QueryClient } from "@cosmjs/stargate";
3
3
 
4
4
  //#region src/xpla/rpc.query.ts
5
5
  const createRPCQueryClient = async ({ rpcEndpoint }) => {
6
- const client = new QueryClient(await Tendermint34Client.connect(rpcEndpoint));
6
+ const client = new QueryClient(await connectComet(rpcEndpoint));
7
7
  return {
8
8
  cosmos: {
9
9
  auth: { v1beta1: (await import("../cosmos/auth/v1beta1/query.rpc.Query.js")).createRpcQueryExtension(client) },
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@xpla/xplajs",
3
- "version": "1.9.0-rc0",
3
+ "version": "1.9.1",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.js",
6
6
  "type": "module",
7
7
  "author": "Joowon Yun <joowon@delightlabs.io>",
8
8
  "homepage": "https://github.com/xpladev/xplajs",
9
+ "scripts": {
10
+ "build": "tsdown",
11
+ "typecheck": "tsc --noEmit"
12
+ },
9
13
  "publishConfig": {
10
14
  "access": "public"
11
15
  },
@@ -31,26 +35,24 @@
31
35
  "./package.json": "./package.json"
32
36
  },
33
37
  "dependencies": {
34
- "@cosmjs/stargate": "^0.38.1",
35
- "@cosmjs/tendermint-rpc": "^0.38.1",
38
+ "@cosmjs/stargate": "catalog:",
39
+ "@cosmjs/tendermint-rpc": "catalog:",
36
40
  "@cosmology/lcd": "^0.14.4",
37
- "@interchainjs/cosmos": "^1.21.0",
38
- "@interchainjs/cosmos-types": "^1.21.0",
39
- "@interchainjs/encoding": "^1.20.0",
40
- "@interchainjs/math": "^1.20.0",
41
- "@interchainjs/pubkey": "^1.21.0",
42
- "@interchainjs/types": "^1.21.0",
43
- "@interchainjs/utils": "^1.21.0",
41
+ "@interchainjs/cosmos": "catalog:",
42
+ "@interchainjs/cosmos-types": "catalog:",
43
+ "@interchainjs/encoding": "catalog:",
44
+ "@interchainjs/math": "catalog:",
45
+ "@interchainjs/pubkey": "catalog:",
46
+ "@interchainjs/types": "catalog:",
47
+ "@interchainjs/utils": "catalog:",
44
48
  "@noble/hashes": "^1.3.1",
45
49
  "decimal.js": "^10.4.3"
46
50
  },
47
51
  "devDependencies": {
48
- "@types/node": "^22",
49
- "tsdown": "^0.21.0-beta.2"
52
+ "@types/node": "catalog:",
53
+ "tsdown": "catalog:"
50
54
  },
51
55
  "license": "MIT",
52
56
  "description": "",
53
- "scripts": {
54
- "build": "tsdown"
55
- }
56
- }
57
+ "gitHead": "8aec257919fe2b6b89d6dae386bd57b5a3f5d83e"
58
+ }