@agoric/orchestration 0.1.1-dev-3294e0c.0.3294e0c → 0.1.1-dev-488dec7.0.488dec7
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 +17 -17
- package/src/utils/packet.d.ts +17 -3
- package/src/utils/packet.d.ts.map +1 -1
- package/src/utils/packet.js +10 -1
- package/tools/ibc-mocks.d.ts.map +1 -1
- package/tools/ibc-mocks.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/orchestration",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-488dec7.0.488dec7",
|
|
4
4
|
"description": "Chain abstraction for Agoric's orchestration clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"lint-fix": "yarn lint:eslint --fix",
|
|
22
22
|
"lint": "yarn run -T run-s --continue-on-error 'lint:*'",
|
|
23
23
|
"lint:eslint": "node ../../scripts/eslint-repo.mjs .",
|
|
24
|
-
"lint:types": "yarn run -T
|
|
24
|
+
"lint:types": "yarn run -T tsgo --tsBuildInfoFile tsconfig.tsgo.tsbuildinfo"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@agoric/async-flow": "0.1.1-dev-
|
|
39
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
40
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
41
|
-
"@agoric/internal": "0.3.3-dev-
|
|
42
|
-
"@agoric/network": "0.1.1-dev-
|
|
43
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
44
|
-
"@agoric/store": "0.9.3-dev-
|
|
45
|
-
"@agoric/time": "0.3.3-dev-
|
|
46
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
47
|
-
"@agoric/vow": "0.1.1-dev-
|
|
48
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
49
|
-
"@agoric/zone": "0.2.3-dev-
|
|
38
|
+
"@agoric/async-flow": "0.1.1-dev-488dec7.0.488dec7",
|
|
39
|
+
"@agoric/cosmic-proto": "0.4.1-dev-488dec7.0.488dec7",
|
|
40
|
+
"@agoric/ertp": "0.16.3-dev-488dec7.0.488dec7",
|
|
41
|
+
"@agoric/internal": "0.3.3-dev-488dec7.0.488dec7",
|
|
42
|
+
"@agoric/network": "0.1.1-dev-488dec7.0.488dec7",
|
|
43
|
+
"@agoric/notifier": "0.6.3-dev-488dec7.0.488dec7",
|
|
44
|
+
"@agoric/store": "0.9.3-dev-488dec7.0.488dec7",
|
|
45
|
+
"@agoric/time": "0.3.3-dev-488dec7.0.488dec7",
|
|
46
|
+
"@agoric/vat-data": "0.5.3-dev-488dec7.0.488dec7",
|
|
47
|
+
"@agoric/vow": "0.1.1-dev-488dec7.0.488dec7",
|
|
48
|
+
"@agoric/zoe": "0.26.3-dev-488dec7.0.488dec7",
|
|
49
|
+
"@agoric/zone": "0.2.3-dev-488dec7.0.488dec7",
|
|
50
50
|
"@cosmjs/encoding": "^0.36.0",
|
|
51
51
|
"@endo/base64": "^1.0.12",
|
|
52
52
|
"@endo/errors": "^1.2.13",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"bs58": "^6.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
64
|
-
"@agoric/vats": "0.15.2-dev-
|
|
63
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-488dec7.0.488dec7",
|
|
64
|
+
"@agoric/vats": "0.15.2-dev-488dec7.0.488dec7",
|
|
65
65
|
"@chain-registry/client": "^1.53.194",
|
|
66
66
|
"@cosmjs/amino": "^0.36.0",
|
|
67
67
|
"@cosmjs/proto-signing": "^0.36.0",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"typeCoverage": {
|
|
114
114
|
"atLeast": 97.65
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "488dec73a49f5a4fd66eea6521638ce5ba11dd2f"
|
|
117
117
|
}
|
package/src/utils/packet.d.ts
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {AnyJson, JsonSafe} from '@agoric/cosmic-proto';
|
|
3
|
+
* @import {TxBody as TxBodyData} from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
3
4
|
* @import {InterchainAccountPacketData} from '@agoric/cosmic-proto/ibc/applications/interchain_accounts/v1/packet.js';
|
|
4
5
|
* @import {InterchainQueryPacketData} from '@agoric/cosmic-proto/icq/v1/packet.js';
|
|
5
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* Options for the TxBody of an outgoing ICA packet. `unordered` and
|
|
9
|
+
* `timeoutTimestamp` are TxBody fields (since cosmos-sdk v0.53), encoded along
|
|
10
|
+
* with the rest.
|
|
11
|
+
*
|
|
12
|
+
* @typedef {Partial<Omit<TxBodyData, 'messages'>>} TxPacketOptions
|
|
13
|
+
*/
|
|
6
14
|
/**
|
|
7
15
|
* Makes an IBC transaction packet from an array of messages. Expects the
|
|
8
16
|
* `value` of each message to be base64 encoded bytes. Skips checks for
|
|
9
17
|
* malformed messages in favor of interface guards.
|
|
10
18
|
*
|
|
11
19
|
* @param {AnyJson[]} msgs
|
|
12
|
-
* @param {
|
|
20
|
+
* @param {TxPacketOptions} [opts]
|
|
13
21
|
* @returns {string} stringified InterchainAccountPacketData
|
|
14
22
|
* @throws {Error} if malformed messages are provided
|
|
15
23
|
*/
|
|
16
|
-
export function makeTxPacket(msgs: AnyJson[], opts?:
|
|
24
|
+
export function makeTxPacket(msgs: AnyJson[], opts?: TxPacketOptions): string;
|
|
17
25
|
/**
|
|
18
26
|
* Makes an IBC query packet from an array of query messages. Expects the `data`
|
|
19
27
|
* of each message to be base64 encoded bytes. Skips checks for malformed
|
|
@@ -49,9 +57,15 @@ export function parseTxPacket(response: string): string;
|
|
|
49
57
|
* not found
|
|
50
58
|
*/
|
|
51
59
|
export function parseQueryPacket(response: string): JsonSafe<ResponseQueryType>[];
|
|
60
|
+
/**
|
|
61
|
+
* Options for the TxBody of an outgoing ICA packet. `unordered` and
|
|
62
|
+
* `timeoutTimestamp` are TxBody fields (since cosmos-sdk v0.53), encoded along
|
|
63
|
+
* with the rest.
|
|
64
|
+
*/
|
|
65
|
+
export type TxPacketOptions = Partial<Omit<TxBodyType, "messages">>;
|
|
52
66
|
import type { AnyJson } from '@agoric/cosmic-proto';
|
|
53
|
-
import { TxBody as TxBodyType } from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
54
67
|
import { RequestQuery as RequestQueryType } from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
55
68
|
import type { JsonSafe } from '@agoric/cosmic-proto';
|
|
56
69
|
import { ResponseQuery as ResponseQueryType } from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
70
|
+
import { TxBody as TxBodyType } from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
57
71
|
//# sourceMappingURL=packet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packet.d.ts","sourceRoot":"","sources":["packet.js"],"names":[],"mappings":"AAsBA
|
|
1
|
+
{"version":3,"file":"packet.d.ts","sourceRoot":"","sources":["packet.js"],"names":[],"mappings":"AAsBA;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;GASG;AACH,mCALW,OAAO,EAAE,SACT,eAAe,GACb,MAAM,CAsBlB;AAGD;;;;;;;;GAQG;AACH,sCAJW,SAAS,gBAAgB,CAAC,EAAE,GAC1B,MAAM,CAgBlB;AAGD;;;;;;;;;;GAUG;AACH,wCALW,MAAM,GACJ,MAAM,CASlB;AAGD;;;;;;;;;;;GAWG;AACH,2CALW,MAAM,GACJ,SAAS,iBAAiB,CAAC,EAAE,CASzC;;;;;;8BAhGY,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;6BAXd,sBAAsB;iDAjBnD,+CAA+C;8BAiBlB,sBAAsB;mDAjBnD,+CAA+C;qCALjB,8CAA8C"}
|
package/src/utils/packet.js
CHANGED
|
@@ -22,17 +22,26 @@ const CosmosResponse = CodecHelper(CosmosResponseType);
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* @import {AnyJson, JsonSafe} from '@agoric/cosmic-proto';
|
|
25
|
+
* @import {TxBody as TxBodyData} from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
25
26
|
* @import {InterchainAccountPacketData} from '@agoric/cosmic-proto/ibc/applications/interchain_accounts/v1/packet.js';
|
|
26
27
|
* @import {InterchainQueryPacketData} from '@agoric/cosmic-proto/icq/v1/packet.js';
|
|
27
28
|
*/
|
|
28
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Options for the TxBody of an outgoing ICA packet. `unordered` and
|
|
32
|
+
* `timeoutTimestamp` are TxBody fields (since cosmos-sdk v0.53), encoded along
|
|
33
|
+
* with the rest.
|
|
34
|
+
*
|
|
35
|
+
* @typedef {Partial<Omit<TxBodyData, 'messages'>>} TxPacketOptions
|
|
36
|
+
*/
|
|
37
|
+
|
|
29
38
|
/**
|
|
30
39
|
* Makes an IBC transaction packet from an array of messages. Expects the
|
|
31
40
|
* `value` of each message to be base64 encoded bytes. Skips checks for
|
|
32
41
|
* malformed messages in favor of interface guards.
|
|
33
42
|
*
|
|
34
43
|
* @param {AnyJson[]} msgs
|
|
35
|
-
* @param {
|
|
44
|
+
* @param {TxPacketOptions} [opts]
|
|
36
45
|
* @returns {string} stringified InterchainAccountPacketData
|
|
37
46
|
* @throws {Error} if malformed messages are provided
|
|
38
47
|
*/
|
package/tools/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ACR,yBAAyB,CAAC,CAAC,CAAC,CA4D9B;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,MAOtD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,GAAI,yBAG3C,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAM,KAAG,OAAO,CACxD,QAAQ,CAAC,qBAAqB,CAAC,CAQ/B,CAAC"}
|
package/tools/ibc-mocks.ts
CHANGED
|
@@ -66,7 +66,11 @@ export function buildTxResponseString<T extends EncoderMessage<any>[]>(
|
|
|
66
66
|
messages: T,
|
|
67
67
|
): string {
|
|
68
68
|
const msgResponses = messages.map(({ encoder, message }) => {
|
|
69
|
-
|
|
69
|
+
const protoMsg = CodecHelper(encoder).toProtoMsg(message);
|
|
70
|
+
return Any.fromPartial({
|
|
71
|
+
typeUrl: String(protoMsg.typeUrl),
|
|
72
|
+
value: protoMsg.value,
|
|
73
|
+
});
|
|
70
74
|
});
|
|
71
75
|
|
|
72
76
|
const txMsgData = TxMsgData.toProto({
|