@agoric/cosmic-proto 0.4.1-dev-eef7b69.0.eef7b69 → 0.4.1-dev-f96725d.0.f96725d
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/helpers.d.ts +11 -3
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js.map +1 -1
- package/package.json +7 -3
package/dist/helpers.d.ts
CHANGED
|
@@ -3,11 +3,19 @@ import type { TypeFromUrl } from './codegen/typeFromUrl.js';
|
|
|
3
3
|
import type { JsonSafe } from './codegen/index.js';
|
|
4
4
|
import type { Any } from './codegen/google/protobuf/any.js';
|
|
5
5
|
import type { QueryBalanceRequestProtoMsg } from './codegen/cosmos/bank/v1beta1/query.js';
|
|
6
|
+
/**
|
|
7
|
+
* A mapping from typeUrl strings to their corresponding TypeScript types. This
|
|
8
|
+
* is generated automatically during the build process, and has no runtime code,
|
|
9
|
+
* just compiler hints.
|
|
10
|
+
*/
|
|
11
|
+
export type { TypeFromUrl };
|
|
6
12
|
/**
|
|
7
13
|
* The result of Any.toJSON(). Exported at top level as a convenience
|
|
8
14
|
* for a very common import.
|
|
9
15
|
*/
|
|
10
|
-
export type AnyJson = JsonSafe<Any
|
|
16
|
+
export type AnyJson<TU extends unknown | keyof TypeFromUrl = unknown> = TU extends keyof TypeFromUrl ? JsonSafe<Omit<Any, 'typeUrl'> & {
|
|
17
|
+
typeUrl: TU;
|
|
18
|
+
}> : JsonSafe<Any>;
|
|
11
19
|
/**
|
|
12
20
|
* The encoding introduced in Protobuf 3 for Any that can be serialized to JSON.
|
|
13
21
|
*
|
|
@@ -25,7 +33,8 @@ export type MessageBody<TU extends keyof TypeFromUrl | unknown> = Omit<TypedJson
|
|
|
25
33
|
type RequestTypeUrl<Base extends string> = `/${Base}Request`;
|
|
26
34
|
/** Pattern specific to Msg sends, in which "Msg" without "Response" implies it's a request */
|
|
27
35
|
type TxMessageTypeUrl<Package extends string, Name extends Capitalize<string>> = `/${Package}.Msg${Name}`;
|
|
28
|
-
export type
|
|
36
|
+
export type ResponseTypeUrl<TU extends keyof TypeFromUrl | unknown> = TU extends RequestTypeUrl<infer Base> ? `/${Base}Response` : TU extends TxMessageTypeUrl<infer Package, infer Name> ? `/${Package}.Msg${Name}Response` : unknown;
|
|
37
|
+
export type ResponseTo<T extends TypedJson> = TypedJson<ResponseTypeUrl<T['@type']>>;
|
|
29
38
|
export declare const typedJson: <TU extends keyof TypeFromUrl>(typeStr: TU, value: MessageBody<TU>) => TypedJson<TU>;
|
|
30
39
|
export declare const typeUrlToGrpcPath: (typeUrl: Any["typeUrl"]) => string;
|
|
31
40
|
type RequestQueryOpts = Partial<Omit<RequestQuery, 'path' | 'data'>>;
|
|
@@ -35,5 +44,4 @@ export declare const toRequestQueryJson: (msg: Any | QueryBalanceRequestProtoMsg
|
|
|
35
44
|
height: string;
|
|
36
45
|
prove: boolean;
|
|
37
46
|
};
|
|
38
|
-
export {};
|
|
39
47
|
//# sourceMappingURL=helpers.d.ts.map
|
package/dist/helpers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAE1F;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oC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AO,IAChE,EAAE,SAAS,cAAc,CAAC,MAAM,IAAI,CAAC,GACjC,IAAI,IAAI,UAAU,GAClB,EAAE,SAAS,gBAAgB,CAAC,MAAM,OAAO,EAAE,MAAM,IAAI,CAAC,GACpD,IAAI,OAAO,OAAO,IAAI,UAAU,GAChC,OAAO,CAAC;AAEhB,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,SAAS,IAAI,SAAS,CACrD,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAC5B,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,EAAE,SAAS,MAAM,WAAW,EACpD,SAAS,EAAE,EACX,OAAO,WAAW,CAAC,EAAE,CAAC,KAKjB,SAAS,CAAC,EAAE,CAClB,CAAC;AAKF,eAAO,MAAM,iBAAiB,GAAI,SAAS,GAAG,CAAC,SAAS,CAAC,WAOxD,CAAC;AAEF,KAAK,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;AAErE,eAAO,MAAM,kBAAkB,GAC7B,KAAK,GAAG,GAAG,2BAA2B,EACtC,OAAM,gBAAqB;;;;;CAQ1B,CAAC"}
|
package/dist/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AA6DlE,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,OAAW,EACX,KAAsB,EACtB,EAAE;IACF,OAAO;QACL,OAAO,EAAE,OAAO;QAChB,GAAG,KAAK;KACQ,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,oBAAoB,GACxB,mEAAmE,CAAC;AAEtE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAuB,EAAE,EAAE;IAC3D,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAClD,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7B,MAAM,SAAS,CAAC,oBAAoB,OAAO,4BAA4B,CAAC,CAAC;IAC3E,CAAC;IACD,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;IACjD,OAAO,IAAI,WAAW,UAAU,UAAU,EAAE,CAAC;AAC/C,CAAC,CAAC;AAIF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,GAAsC,EACtC,OAAyB,EAAE,EAC3B,EAAE,CACF,YAAY,CAAC,MAAM,CACjB,YAAY,CAAC,WAAW,CAAC;IACvB,IAAI,EAAE,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC;IACpC,IAAI,EAAE,GAAG,CAAC,KAAK;IACf,GAAG,IAAI;CACR,CAAC,CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/cosmic-proto",
|
|
3
|
-
"version": "0.4.1-dev-
|
|
3
|
+
"version": "0.4.1-dev-f96725d.0.f96725d",
|
|
4
4
|
"description": "Protobuf stubs for the Agoric cosmos-sdk module",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Agoric",
|
|
@@ -112,6 +112,10 @@
|
|
|
112
112
|
"types": "./dist/codegen/noble/dollar/vaults/v1/tx.d.ts",
|
|
113
113
|
"default": "./dist/codegen/noble/dollar/vaults/v1/tx.js"
|
|
114
114
|
},
|
|
115
|
+
"./noble/dollar/vaults/v1/vaults.js": {
|
|
116
|
+
"types": "./dist/codegen/noble/dollar/vaults/v1/vaults.d.ts",
|
|
117
|
+
"default": "./dist/codegen/noble/dollar/vaults/v1/vaults.js"
|
|
118
|
+
},
|
|
115
119
|
"./noble/swap/v1/tx.js": {
|
|
116
120
|
"types": "./dist/codegen/noble/swap/v1/tx.d.ts",
|
|
117
121
|
"default": "./dist/codegen/noble/swap/v1/tx.js"
|
|
@@ -180,7 +184,7 @@
|
|
|
180
184
|
"access": "public"
|
|
181
185
|
},
|
|
182
186
|
"devDependencies": {
|
|
183
|
-
"@agoric/cosmos": "0.34.2-dev-
|
|
187
|
+
"@agoric/cosmos": "0.34.2-dev-f96725d.0.f96725d",
|
|
184
188
|
"@ava/typescript": "^5.0.0",
|
|
185
189
|
"@cosmology/telescope": "^1.12.21",
|
|
186
190
|
"@endo/bundle-source": "^4.1.2",
|
|
@@ -212,5 +216,5 @@
|
|
|
212
216
|
"engines": {
|
|
213
217
|
"node": "^20.9 || ^22.11"
|
|
214
218
|
},
|
|
215
|
-
"gitHead": "
|
|
219
|
+
"gitHead": "f96725dc568bd872664f68eb5f60b0853737e166"
|
|
216
220
|
}
|