@agoric/orchestration 0.1.1-dev-bb3d92f.0 → 0.1.1-dev-22cbfe3.0
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 +15 -15
- package/src/cosmos-api.d.ts +0 -1
- package/src/cosmos-api.d.ts.map +1 -1
- package/src/cosmos-api.ts +0 -2
- package/src/examples/stakeAtom.contract.d.ts +2 -2
- package/src/examples/stakeAtom.contract.d.ts.map +1 -1
- package/src/examples/stakeAtom.contract.js +2 -2
- package/src/examples/stakeBld.contract.d.ts +10 -6
- package/src/examples/stakeBld.contract.d.ts.map +1 -1
- package/src/examples/stakeBld.contract.js +3 -2
- package/src/examples/swapExample.contract.d.ts +1 -1
- package/src/examples/unbondExample.contract.d.ts +1 -1
- package/src/exos/README.md +56 -0
- package/src/exos/chainAccountKit.d.ts +1 -4
- package/src/exos/chainAccountKit.d.ts.map +1 -1
- package/src/exos/chainAccountKit.js +0 -7
- package/src/exos/icqConnectionKit.d.ts +5 -4
- package/src/exos/icqConnectionKit.d.ts.map +1 -1
- package/src/exos/icqConnectionKit.js +4 -4
- package/src/exos/local-chain-account-kit.d.ts +5 -16
- package/src/exos/local-chain-account-kit.d.ts.map +1 -1
- package/src/exos/local-chain-account-kit.js +17 -32
- package/src/exos/stakingAccountKit.d.ts +2 -2
- package/src/exos/stakingAccountKit.d.ts.map +1 -1
- package/src/exos/stakingAccountKit.js +4 -12
- package/src/facade.d.ts +1 -1
- package/src/proposals/orchestration-proposal.d.ts +3 -3
- package/src/proposals/start-stakeAtom.d.ts +2 -2
- package/src/proposals/start-stakeAtom.d.ts.map +1 -1
- package/src/proposals/start-stakeBld.d.ts +10 -6
- package/src/proposals/start-stakeBld.d.ts.map +1 -1
- package/src/service.d.ts +2 -2
- package/src/utils/packet.d.ts +8 -8
- package/src/utils/packet.d.ts.map +1 -1
- package/src/utils/packet.js +7 -5
- package/src/vat-orchestration.d.ts +2 -2
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-22cbfe3.0+22cbfe3",
|
|
4
4
|
"description": "Chain abstraction for Agoric's orchestration clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@agoric/assert": "0.6.1-dev-
|
|
35
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
36
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
37
|
-
"@agoric/internal": "0.3.3-dev-
|
|
38
|
-
"@agoric/network": "0.1.1-dev-
|
|
39
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
40
|
-
"@agoric/store": "0.9.3-dev-
|
|
41
|
-
"@agoric/time": "0.3.3-dev-
|
|
42
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
43
|
-
"@agoric/vats": "0.15.2-dev-
|
|
44
|
-
"@agoric/vow": "0.1.1-dev-
|
|
45
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
46
|
-
"@agoric/zone": "0.2.3-dev-
|
|
34
|
+
"@agoric/assert": "0.6.1-dev-22cbfe3.0+22cbfe3",
|
|
35
|
+
"@agoric/cosmic-proto": "0.4.1-dev-22cbfe3.0+22cbfe3",
|
|
36
|
+
"@agoric/ertp": "0.16.3-dev-22cbfe3.0+22cbfe3",
|
|
37
|
+
"@agoric/internal": "0.3.3-dev-22cbfe3.0+22cbfe3",
|
|
38
|
+
"@agoric/network": "0.1.1-dev-22cbfe3.0+22cbfe3",
|
|
39
|
+
"@agoric/notifier": "0.6.3-dev-22cbfe3.0+22cbfe3",
|
|
40
|
+
"@agoric/store": "0.9.3-dev-22cbfe3.0+22cbfe3",
|
|
41
|
+
"@agoric/time": "0.3.3-dev-22cbfe3.0+22cbfe3",
|
|
42
|
+
"@agoric/vat-data": "0.5.3-dev-22cbfe3.0+22cbfe3",
|
|
43
|
+
"@agoric/vats": "0.15.2-dev-22cbfe3.0+22cbfe3",
|
|
44
|
+
"@agoric/vow": "0.1.1-dev-22cbfe3.0+22cbfe3",
|
|
45
|
+
"@agoric/zoe": "0.26.3-dev-22cbfe3.0+22cbfe3",
|
|
46
|
+
"@agoric/zone": "0.2.3-dev-22cbfe3.0+22cbfe3",
|
|
47
47
|
"@endo/base64": "^1.0.5",
|
|
48
48
|
"@endo/far": "^1.1.2",
|
|
49
49
|
"@endo/marshal": "^1.5.0",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"typeCoverage": {
|
|
85
85
|
"atLeast": 97.38
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "22cbfe3672f7878718fd90c35c760ee67c2d08a0"
|
|
88
88
|
}
|
package/src/cosmos-api.d.ts
CHANGED
|
@@ -161,7 +161,6 @@ export interface IcaAccount {
|
|
|
161
161
|
* Close the remote account
|
|
162
162
|
*/
|
|
163
163
|
close: () => Promise<void>;
|
|
164
|
-
prepareTransfer: () => Promise<Invitation>;
|
|
165
164
|
/** @returns the address of the remote channel */
|
|
166
165
|
getRemoteAddress: () => RemoteIbcAddress;
|
|
167
166
|
/** @returns the address of the local channel */
|
package/src/cosmos-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmos-api.d.ts","sourceRoot":"","sources":["cosmos-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,mBAAmB,EACpB,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8CAA8C,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,K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|
|
205
205
|
*/
|
|
206
206
|
close: () => Promise<void>;
|
|
207
|
-
/* transfer account to new holder */
|
|
208
|
-
prepareTransfer: () => Promise<Invitation>;
|
|
209
207
|
/** @returns the address of the remote channel */
|
|
210
208
|
getRemoteAddress: () => RemoteIbcAddress;
|
|
211
209
|
/** @returns the address of the local channel */
|
|
@@ -13,7 +13,7 @@ export function start(zcf: ZCF<StakeAtomTerms>, privateArgs: {
|
|
|
13
13
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
14
14
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
15
15
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
16
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
16
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
17
17
|
}>>;
|
|
18
18
|
}>;
|
|
19
19
|
storageNode: StorageNode;
|
|
@@ -37,7 +37,7 @@ export function start(zcf: ZCF<StakeAtomTerms>, privateArgs: {
|
|
|
37
37
|
withdrawRewards(): never;
|
|
38
38
|
undelegate(delegations: import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation[]): Promise<void>;
|
|
39
39
|
}>>;
|
|
40
|
-
|
|
40
|
+
makeAccountInvitationMaker(): Promise<Invitation<{
|
|
41
41
|
publicSubscribers: {
|
|
42
42
|
account: {
|
|
43
43
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stakeAtom.contract.d.ts","sourceRoot":"","sources":["stakeAtom.contract.js"],"names":[],"mappings":";;;;;;;;;AAkDO,2BATI,GAAG,CAAC,cAAc,CAAC;;;;;;;;;iBAGb,WAAW;gBACZ,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+
|
|
1
|
+
{"version":3,"file":"stakeAtom.contract.d.ts","sourceRoot":"","sources":["stakeAtom.contract.js"],"names":[],"mappings":";;;;;;;;;AAkDO,2BATI,GAAG,CAAC,cAAc,CAAC;;;;;;;;;iBAGb,WAAW;gBACZ,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+FAiFyxG,OAAO,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;GAH/zG;;;;eAxFc,MAAM;;0BA0FP,OAAO,KAAK;iCAzHmB,kBAAkB;kCAC7B,cAAc;kCAYf,cAAc;6BAFnB,kBAAkB"}
|
|
@@ -97,7 +97,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
97
97
|
'StakeAtom',
|
|
98
98
|
M.interface('StakeAtomI', {
|
|
99
99
|
makeAccount: M.callWhen().returns(M.remotable('ChainAccount')),
|
|
100
|
-
|
|
100
|
+
makeAccountInvitationMaker: M.callWhen().returns(InvitationShape),
|
|
101
101
|
}),
|
|
102
102
|
{
|
|
103
103
|
async makeAccount() {
|
|
@@ -105,7 +105,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
105
105
|
const { account } = await makeAccountKit();
|
|
106
106
|
return account;
|
|
107
107
|
},
|
|
108
|
-
|
|
108
|
+
makeAccountInvitationMaker() {
|
|
109
109
|
trace('makeCreateAccountInvitation');
|
|
110
110
|
return zcf.makeInvitation(
|
|
111
111
|
async seat => {
|
|
@@ -19,7 +19,6 @@ export function start(zcf: ZCF, privateArgs: {
|
|
|
19
19
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
20
20
|
}, undefined>>;
|
|
21
21
|
CloseAccount(): never;
|
|
22
|
-
TransferAccount(): never;
|
|
23
22
|
}>;
|
|
24
23
|
account: import("@endo/exo").Guarded<{
|
|
25
24
|
getPublicTopics(): {
|
|
@@ -33,9 +32,11 @@ export function start(zcf: ZCF, privateArgs: {
|
|
|
33
32
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
34
33
|
}, undefined>>;
|
|
35
34
|
makeCloseAccountInvitation(): never;
|
|
36
|
-
makeTransferAccountInvitation(): never;
|
|
37
35
|
deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
|
|
38
36
|
withdraw(amount: Amount<"nat">): Promise<globalThis.Payment<"nat">>;
|
|
37
|
+
executeTx<MT extends {
|
|
38
|
+
'@type': string;
|
|
39
|
+
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto").ResponseTo<MT[K]>; }>;
|
|
39
40
|
getAddress(): string;
|
|
40
41
|
transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
|
|
41
42
|
}>;
|
|
@@ -52,13 +53,15 @@ export function start(zcf: ZCF, privateArgs: {
|
|
|
52
53
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
53
54
|
}, undefined>>;
|
|
54
55
|
makeCloseAccountInvitation(): never;
|
|
55
|
-
makeTransferAccountInvitation(): never;
|
|
56
56
|
deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
|
|
57
57
|
withdraw(amount: Amount<"nat">): Promise<globalThis.Payment<"nat">>;
|
|
58
|
+
executeTx<MT extends {
|
|
59
|
+
'@type': string;
|
|
60
|
+
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto").ResponseTo<MT[K]>; }>;
|
|
58
61
|
getAddress(): string;
|
|
59
62
|
transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
|
|
60
63
|
}>>;
|
|
61
|
-
|
|
64
|
+
makeAccountInvitationMaker(): Promise<Invitation<{
|
|
62
65
|
publicSubscribers: {
|
|
63
66
|
account: {
|
|
64
67
|
description: string;
|
|
@@ -71,7 +74,6 @@ export function start(zcf: ZCF, privateArgs: {
|
|
|
71
74
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
72
75
|
}, undefined>>;
|
|
73
76
|
CloseAccount(): never;
|
|
74
|
-
TransferAccount(): never;
|
|
75
77
|
}>;
|
|
76
78
|
account: import("@endo/exo").Guarded<{
|
|
77
79
|
getPublicTopics(): {
|
|
@@ -85,9 +87,11 @@ export function start(zcf: ZCF, privateArgs: {
|
|
|
85
87
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
86
88
|
}, undefined>>;
|
|
87
89
|
makeCloseAccountInvitation(): never;
|
|
88
|
-
makeTransferAccountInvitation(): never;
|
|
89
90
|
deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
|
|
90
91
|
withdraw(amount: Amount<"nat">): Promise<globalThis.Payment<"nat">>;
|
|
92
|
+
executeTx<MT extends {
|
|
93
|
+
'@type': string;
|
|
94
|
+
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto").ResponseTo<MT[K]>; }>;
|
|
91
95
|
getAddress(): string;
|
|
92
96
|
transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
|
|
93
97
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stakeBld.contract.d.ts","sourceRoot":"","sources":["stakeBld.contract.js"],"names":[],"mappings":"AAgCO,2BAVI,GAAG;gBAEG,OAAO,gCAAgC,EAAE,UAAU;gBACnD,UAAU;iBACT,WAAW;;;YAIlB,OAAO,kBAAkB,EAAE,OAAO
|
|
1
|
+
{"version":3,"file":"stakeBld.contract.d.ts","sourceRoot":"","sources":["stakeBld.contract.js"],"names":[],"mappings":"AAgCO,2BAVI,GAAG;gBAEG,OAAO,gCAAgC,EAAE,UAAU;gBACnD,UAAU;iBACT,WAAW;;;YAIlB,OAAO,kBAAkB,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;6EA6F6d,OAAO,KAAK,CAAC;;;;iCA/DlgB,QAAQ,KAAK,CAAC,mBACxB,OAAO;iCAgBI,OAAO,KAC5B,CAAC;;;+BAaY,EAAJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BT;kCA3G0C,cAAc;gCAAd,cAAc"}
|
|
@@ -59,6 +59,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
59
59
|
async function makeLocalAccountKit() {
|
|
60
60
|
const account = await E(privateArgs.localchain).makeAccount();
|
|
61
61
|
const address = await E(account).getAddress();
|
|
62
|
+
// XXX 'address' is implied by 'account'; use an async maker that get the value itself
|
|
62
63
|
return makeLocalChainAccountKit({
|
|
63
64
|
account,
|
|
64
65
|
address,
|
|
@@ -70,7 +71,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
70
71
|
'StakeBld',
|
|
71
72
|
M.interface('StakeBldI', {
|
|
72
73
|
makeAccount: M.callWhen().returns(M.remotable('LocalChainAccountHolder')),
|
|
73
|
-
|
|
74
|
+
makeAccountInvitationMaker: M.callWhen().returns(InvitationShape),
|
|
74
75
|
makeStakeBldInvitation: M.callWhen().returns(InvitationShape),
|
|
75
76
|
}),
|
|
76
77
|
{
|
|
@@ -103,7 +104,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
103
104
|
const { holder } = await makeLocalAccountKit();
|
|
104
105
|
return holder;
|
|
105
106
|
},
|
|
106
|
-
|
|
107
|
+
makeAccountInvitationMaker() {
|
|
107
108
|
trace('makeCreateAccountInvitation');
|
|
108
109
|
return zcf.makeInvitation(async seat => {
|
|
109
110
|
seat.exit();
|
|
@@ -38,7 +38,7 @@ export function start(zcf: ZCF, privateArgs: {
|
|
|
38
38
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
39
39
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
40
40
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
41
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
41
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
42
42
|
}>>;
|
|
43
43
|
}>> | null;
|
|
44
44
|
storageNode: Remote<globalThis.StorageNode>;
|
|
@@ -24,7 +24,7 @@ export function start(zcf: ZCF, privateArgs: {
|
|
|
24
24
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
25
25
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
26
26
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
27
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
27
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
28
28
|
}>>;
|
|
29
29
|
}>>;
|
|
30
30
|
storageNode: Remote<globalThis.StorageNode>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Exo structure
|
|
2
|
+
|
|
3
|
+
As of 2024-05-29…
|
|
4
|
+
|
|
5
|
+
```mermaid
|
|
6
|
+
classDiagram
|
|
7
|
+
|
|
8
|
+
%% Orchestration vat business logic (Zoe)
|
|
9
|
+
LCAKit --* LocalchainAccount
|
|
10
|
+
ICQConnectionKit --* Port
|
|
11
|
+
ICQConnectionKit --* Connection
|
|
12
|
+
ChainAccountKit --* Port
|
|
13
|
+
ChainAccountKit --* Connection
|
|
14
|
+
StakingAccountKit --* IcaAccount
|
|
15
|
+
|
|
16
|
+
class ChainAccountKit {
|
|
17
|
+
port: Port
|
|
18
|
+
connection: Connection
|
|
19
|
+
localAddress: LocalIbcAddress
|
|
20
|
+
requestedRemoteAddress: string
|
|
21
|
+
remoteAddress: RemoteIbcAddress
|
|
22
|
+
chainAddress: ChainAddress
|
|
23
|
+
}
|
|
24
|
+
class ICQConnectionKit {
|
|
25
|
+
port: Port
|
|
26
|
+
connection: Connection
|
|
27
|
+
localAddress: LocalIbcAddress
|
|
28
|
+
remoteAddress: RemoteIbcAddress
|
|
29
|
+
}
|
|
30
|
+
class StakingAccountKit {
|
|
31
|
+
chainAddress: ChainAddress
|
|
32
|
+
bondDenom: string
|
|
33
|
+
account: ICAAccount
|
|
34
|
+
timer: Timer
|
|
35
|
+
topicKit: TopicKit
|
|
36
|
+
makeTransferInvitation()
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
%% In other vats
|
|
40
|
+
class LCAKit {
|
|
41
|
+
account: LocalChainAccount
|
|
42
|
+
address: ChainAddress
|
|
43
|
+
topicKit: RecorderKit<LocalChainAccountNotification>
|
|
44
|
+
}
|
|
45
|
+
class LocalchainAccount {
|
|
46
|
+
executeTx()
|
|
47
|
+
deposit()
|
|
48
|
+
withdraw()
|
|
49
|
+
}
|
|
50
|
+
class IcaAccount {
|
|
51
|
+
executeTx()
|
|
52
|
+
deposit()
|
|
53
|
+
getPurse()
|
|
54
|
+
close()
|
|
55
|
+
}
|
|
56
|
+
```
|
|
@@ -8,7 +8,6 @@ export const ChainAccountI: import("@endo/patterns").InterfaceGuard<{
|
|
|
8
8
|
close: import("@endo/patterns").MethodGuard;
|
|
9
9
|
deposit: import("@endo/patterns").MethodGuard;
|
|
10
10
|
getPurse: import("@endo/patterns").MethodGuard;
|
|
11
|
-
prepareTransfer: import("@endo/patterns").MethodGuard;
|
|
12
11
|
}>;
|
|
13
12
|
export function prepareChainAccountKit(zone: Zone): (port: Port, requestedRemoteAddress: string) => import("@endo/exo").GuardedKit<{
|
|
14
13
|
account: {
|
|
@@ -27,7 +26,7 @@ export function prepareChainAccountKit(zone: Zone): (port: Port, requestedRemote
|
|
|
27
26
|
* @returns {Promise<string>} - base64 encoded bytes string. Can be decoded using the corresponding `Msg*Response` object.
|
|
28
27
|
* @throws {Error} if packet fails to send or an error is returned
|
|
29
28
|
*/
|
|
30
|
-
executeEncodedTx(msgs:
|
|
29
|
+
executeEncodedTx(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/google/protobuf/any.js").Any>[], opts?: Omit<TxBody, "messages"> | undefined): Promise<string>;
|
|
31
30
|
/**
|
|
32
31
|
* Close the remote account
|
|
33
32
|
*/
|
|
@@ -38,7 +37,6 @@ export function prepareChainAccountKit(zone: Zone): (port: Port, requestedRemote
|
|
|
38
37
|
* @param {Brand} brand
|
|
39
38
|
*/
|
|
40
39
|
getPurse(brand: Brand): Promise<never>;
|
|
41
|
-
prepareTransfer(): Promise<never>;
|
|
42
40
|
};
|
|
43
41
|
connectionHandler: {
|
|
44
42
|
/**
|
|
@@ -64,7 +62,6 @@ export type ChainAccountKit = ReturnType<ReturnType<typeof prepareChainAccountKi
|
|
|
64
62
|
import type { Zone } from '@agoric/base-zone';
|
|
65
63
|
import type { Port } from '@agoric/network';
|
|
66
64
|
import type { ChainAddress } from '../types.js';
|
|
67
|
-
import type { AnyJson } from '@agoric/cosmic-proto';
|
|
68
65
|
import type { TxBody } from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
69
66
|
import type { Connection } from '@agoric/network';
|
|
70
67
|
import type { Remote } from '@agoric/vow';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chainAccountKit.d.ts","sourceRoot":"","sources":["chainAccountKit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chainAccountKit.d.ts","sourceRoot":"","sources":["chainAccountKit.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;GAYG;AAcI;;QAqBC;;WAEG;;;;;;QAyBH;;;;;;WAMG;mLAFU,OAAO,CAAC,MAAM,CAAC;QAY5B;;WAEG;;;QAaH;;;WAGG;wBADQ,KAAK;;;QAQhB;;;;WAIG;;;;;GAyBR;qCAnJW,0BAA0B;;;;;4BAsBX,MAAM;;;;8BA+HrB,UAAU,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;0BAjK1C,mBAAmB;0BACP,iBAAiB;kCAKrB,aAAa;4BAFnB,8CAA8C;gCAHpC,iBAAiB;4BAC3B,aAAa"}
|
|
@@ -4,7 +4,6 @@ import { makeTracer } from '@agoric/internal';
|
|
|
4
4
|
import { V as E } from '@agoric/vow/vat.js';
|
|
5
5
|
import { M } from '@endo/patterns';
|
|
6
6
|
import { PaymentShape, PurseShape } from '@agoric/ertp';
|
|
7
|
-
import { InvitationShape } from '@agoric/zoe/src/typeGuards.js';
|
|
8
7
|
import { findAddressField } from '../utils/address.js';
|
|
9
8
|
import {
|
|
10
9
|
ConnectionHandlerI,
|
|
@@ -41,7 +40,6 @@ export const ChainAccountI = M.interface('ChainAccount', {
|
|
|
41
40
|
close: M.callWhen().returns(M.undefined()),
|
|
42
41
|
deposit: M.callWhen(PaymentShape).returns(M.undefined()),
|
|
43
42
|
getPurse: M.callWhen().returns(PurseShape),
|
|
44
|
-
prepareTransfer: M.callWhen().returns(InvitationShape),
|
|
45
43
|
});
|
|
46
44
|
|
|
47
45
|
/**
|
|
@@ -143,11 +141,6 @@ export const prepareChainAccountKit = zone =>
|
|
|
143
141
|
console.log('getPurse got', brand);
|
|
144
142
|
throw new Error('not yet implemented');
|
|
145
143
|
},
|
|
146
|
-
|
|
147
|
-
/* transfer account to new holder */
|
|
148
|
-
async prepareTransfer() {
|
|
149
|
-
throw new Error('not yet implemented');
|
|
150
|
-
},
|
|
151
144
|
},
|
|
152
145
|
connectionHandler: {
|
|
153
146
|
/**
|
|
@@ -9,11 +9,11 @@ export function prepareICQConnectionKit(zone: Zone): (port: Port) => import("@en
|
|
|
9
9
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
10
10
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
11
11
|
/**
|
|
12
|
-
* @param {
|
|
13
|
-
* @returns {Promise<
|
|
12
|
+
* @param {JsonSafe<RequestQuery>[]} msgs
|
|
13
|
+
* @returns {Promise<JsonSafe<ResponseQuery>[]>}
|
|
14
14
|
* @throws {Error} if packet fails to send or an error is returned
|
|
15
15
|
*/
|
|
16
|
-
query(msgs:
|
|
16
|
+
query(msgs: JsonSafe<RequestQuery>[]): Promise<JsonSafe<ResponseQuery>[]>;
|
|
17
17
|
};
|
|
18
18
|
connectionHandler: {
|
|
19
19
|
/**
|
|
@@ -36,8 +36,9 @@ export type ICQConnectionKit = ReturnType<ReturnType<typeof prepareICQConnection
|
|
|
36
36
|
export type ICQConnection = ICQConnectionKit["connection"];
|
|
37
37
|
import type { Zone } from '@agoric/base-zone';
|
|
38
38
|
import type { Port } from '@agoric/network';
|
|
39
|
+
import type { RequestQuery } from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
40
|
+
import type { JsonSafe } from '@agoric/cosmic-proto';
|
|
39
41
|
import type { ResponseQuery } from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
40
|
-
import type { Base64Any } from '@agoric/cosmic-proto';
|
|
41
42
|
import type { Connection } from '@agoric/network';
|
|
42
43
|
import type { Remote } from '@agoric/vow';
|
|
43
44
|
//# sourceMappingURL=icqConnectionKit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icqConnectionKit.d.ts","sourceRoot":"","sources":["icqConnectionKit.js"],"names":[],"mappings":"AAoBA,2DAGE;AAEF;;;;GAIG;AAyBI;;;;QA8BC;;;;WAIG;;;;QAYH;;;;WAIG;;;;;GAgBR;;;;;;;+BAEW,UAAU,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;4BACtD,gBAAgB,CAAC,YAAY,CAAC;0BAlHrB,mBAAmB;0BACP,iBAAiB;
|
|
1
|
+
{"version":3,"file":"icqConnectionKit.d.ts","sourceRoot":"","sources":["icqConnectionKit.js"],"names":[],"mappings":"AAoBA,2DAGE;AAEF;;;;GAIG;AAyBI;;;;QA8BC;;;;WAIG;;;;QAYH;;;;WAIG;;;;;GAgBR;;;;;;;+BAEW,UAAU,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;4BACtD,gBAAgB,CAAC,YAAY,CAAC;0BAlHrB,mBAAmB;0BACP,iBAAiB;kCAGN,+CAA+C;8BADlE,sBAAsB;mCACH,+CAA+C;gCAH1D,iBAAiB;4BAC3B,aAAa"}
|
|
@@ -10,8 +10,8 @@ import { ConnectionHandlerI } from '../typeGuards.js';
|
|
|
10
10
|
* @import {Zone} from '@agoric/base-zone';
|
|
11
11
|
* @import {Connection, Port} from '@agoric/network';
|
|
12
12
|
* @import {Remote} from '@agoric/vow';
|
|
13
|
-
* @import {
|
|
14
|
-
* @import {ResponseQuery} from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
13
|
+
* @import {JsonSafe} from '@agoric/cosmic-proto';
|
|
14
|
+
* @import {RequestQuery, ResponseQuery} from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
15
15
|
* @import {LocalIbcAddress, RemoteIbcAddress} from '@agoric/vats/tools/ibc-utils.js';
|
|
16
16
|
*/
|
|
17
17
|
|
|
@@ -83,8 +83,8 @@ export const prepareICQConnectionKit = zone =>
|
|
|
83
83
|
);
|
|
84
84
|
},
|
|
85
85
|
/**
|
|
86
|
-
* @param {
|
|
87
|
-
* @returns {Promise<
|
|
86
|
+
* @param {JsonSafe<RequestQuery>[]} msgs
|
|
87
|
+
* @returns {Promise<JsonSafe<ResponseQuery>[]>}
|
|
88
88
|
* @throws {Error} if packet fails to send or an error is returned
|
|
89
89
|
*/
|
|
90
90
|
query(msgs) {
|
|
@@ -11,25 +11,11 @@ export function prepareLocalChainAccountKit(baggage: Baggage, makeRecorderKit: <
|
|
|
11
11
|
address: string;
|
|
12
12
|
storageNode: StorageNode;
|
|
13
13
|
}) => import("@endo/exo").GuardedKit<{
|
|
14
|
-
helper: {
|
|
15
|
-
/** @throws if this holder no longer owns the account */
|
|
16
|
-
owned(): import("@endo/exo").Guarded<{
|
|
17
|
-
getAddress(): Promise<string>;
|
|
18
|
-
getBalance(brand: Brand<"nat">): Promise<import("@agoric/ertp/src/types.js").NatAmount>;
|
|
19
|
-
deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
|
|
20
|
-
withdraw(amount: Amount<"nat">): Promise<globalThis.Payment<"nat">>;
|
|
21
|
-
executeTx<MT extends {
|
|
22
|
-
'@type': string;
|
|
23
|
-
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto/vatsafe").ResponseTo<MT[K]>; }>;
|
|
24
|
-
}>;
|
|
25
|
-
getUpdater(): import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<LocalChainAccountNotification>;
|
|
26
|
-
};
|
|
27
14
|
invitationMakers: {
|
|
28
15
|
Delegate(validatorAddress: any, amount: any): Promise<Invitation<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgDelegateResponse & {
|
|
29
16
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
30
17
|
}, undefined>>;
|
|
31
18
|
CloseAccount(): never;
|
|
32
|
-
TransferAccount(): never;
|
|
33
19
|
};
|
|
34
20
|
holder: {
|
|
35
21
|
getPublicTopics(): {
|
|
@@ -52,11 +38,14 @@ export function prepareLocalChainAccountKit(baggage: Baggage, makeRecorderKit: <
|
|
|
52
38
|
* Starting a transfer revokes the account holder. The associated updater
|
|
53
39
|
* will get a special notification that the account is being transferred.
|
|
54
40
|
*/
|
|
55
|
-
makeTransferAccountInvitation(): never;
|
|
56
41
|
/** @type {LocalChainAccount['deposit']} */
|
|
57
42
|
deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
|
|
58
43
|
/** @type {LocalChainAccount['withdraw']} */
|
|
59
44
|
withdraw(amount: Amount<"nat">): Promise<globalThis.Payment<"nat">>;
|
|
45
|
+
/** @type {LocalChainAccount['executeTx']} */
|
|
46
|
+
executeTx<MT extends {
|
|
47
|
+
'@type': string;
|
|
48
|
+
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto/vatsafe").ResponseTo<MT[K]>; }>;
|
|
60
49
|
/**
|
|
61
50
|
* @returns {ChainAddress['address']}
|
|
62
51
|
*/
|
|
@@ -86,7 +75,7 @@ export type State = {
|
|
|
86
75
|
executeTx<MT extends {
|
|
87
76
|
'@type': string;
|
|
88
77
|
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto/vatsafe").ResponseTo<MT[K]>; }>;
|
|
89
|
-
}
|
|
78
|
+
}>;
|
|
90
79
|
address: string;
|
|
91
80
|
};
|
|
92
81
|
export type LocalChainAccountKit = ReturnType<ReturnType<typeof prepareLocalChainAccountKit>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-chain-account-kit.d.ts","sourceRoot":"","sources":["local-chain-account-kit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-chain-account-kit.d.ts","sourceRoot":"","sources":["local-chain-account-kit.js"],"names":[],"mappings":"AAqEO,gGA2EoC,WAAW,GAC1C,QAAA,OAAG,WACd,EAAW,MAAH,CAAG,WAAS,CAAC,CAAC,0HAlFZ,GAAG,uEAGH,eAAe;;;0BA1BzB,MAEC,KAAK,CAAC;yBAQD,QAAQ,KAAK,CAAC,mBACA,OAAO;yBAmBjB,OACT,KAAE,CAAC;;;uBAoBA,EAAJ;;;iBAGc,WAAW;;;;;;;;;;;;;;;;QAkClB;;;;WAIG;iDAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;;;;QAgCxB;;;WAGG;QACH,2CAA2C;yBArH5C,QAAQ,KAAK,CAAC,mBACA,OAAO;QAwHpB,4CAA4C;yBArGzC,OACT,KAAE,CAAC;QAwGG,6CAA6C;;;uBApFhD,EAAJ;QAyFO;;WAEG;;QAIH;;;;;WAKG;0GADU,OAAO,CAAC,IAAI,CAAC;;GA6CjC;;;;;aA5Ma,MAAM;;;;;;0BASnB,MAEC,KAAK,CAAC;yBAQD,QAAQ,KAAK,CAAC,mBACA,OAAO;yBAmBjB,OACT,KAAE,CAAC;;;uBAoBA,EAAJ;;;;mCAiJa,UAAU,CAAC,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC;6BA1N9C,kBAAkB;iCADG,6CAA6C;kCAEjD,cAAc;gCAAd,cAAc;+BAHsC,uBAAuB;kCAAvB,uBAAuB;2CAAvB,uBAAuB"}
|
|
@@ -3,7 +3,6 @@ import { NonNullish } from '@agoric/assert';
|
|
|
3
3
|
import { typedJson } from '@agoric/cosmic-proto/vatsafe';
|
|
4
4
|
import { AmountShape, PaymentShape } from '@agoric/ertp';
|
|
5
5
|
import { makeTracer } from '@agoric/internal';
|
|
6
|
-
import { UnguardedHelperI } from '@agoric/internal/src/typeGuards.js';
|
|
7
6
|
import { M, prepareExoClassKit } from '@agoric/vat-data';
|
|
8
7
|
import { TopicsRecordShape } from '@agoric/zoe/src/contractSupport/index.js';
|
|
9
8
|
import { E } from '@endo/far';
|
|
@@ -37,7 +36,7 @@ const { Fail } = assert;
|
|
|
37
36
|
/**
|
|
38
37
|
* @typedef {{
|
|
39
38
|
* topicKit: RecorderKit<LocalChainAccountNotification>;
|
|
40
|
-
* account: LocalChainAccount
|
|
39
|
+
* account: LocalChainAccount;
|
|
41
40
|
* address: ChainAddress['address'];
|
|
42
41
|
* }} State
|
|
43
42
|
*/
|
|
@@ -46,13 +45,13 @@ const HolderI = M.interface('holder', {
|
|
|
46
45
|
getPublicTopics: M.call().returns(TopicsRecordShape),
|
|
47
46
|
makeDelegateInvitation: M.call(M.string(), AmountShape).returns(M.promise()),
|
|
48
47
|
makeCloseAccountInvitation: M.call().returns(M.promise()),
|
|
49
|
-
makeTransferAccountInvitation: M.call().returns(M.promise()),
|
|
50
48
|
deposit: M.callWhen(PaymentShape).returns(AmountShape),
|
|
51
49
|
withdraw: M.callWhen(AmountShape).returns(PaymentShape),
|
|
52
50
|
transfer: M.call(AmountArgShape, ChainAddressShape)
|
|
53
51
|
.optional(IBCTransferOptionsShape)
|
|
54
52
|
.returns(M.promise()),
|
|
55
53
|
getAddress: M.call().returns(M.string()),
|
|
54
|
+
executeTx: M.callWhen(M.arrayOf(M.record())).returns(M.arrayOf(M.record())),
|
|
56
55
|
});
|
|
57
56
|
|
|
58
57
|
/** @type {{ [name: string]: [description: string, valueShape: Pattern] }} */
|
|
@@ -77,17 +76,17 @@ export const prepareLocalChainAccountKit = (
|
|
|
77
76
|
agoricChainInfo,
|
|
78
77
|
) => {
|
|
79
78
|
const timestampHelper = makeTimestampHelper(timerService, timerBrand);
|
|
80
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Make an object wrapping an LCA with Zoe interfaces.
|
|
81
|
+
*/
|
|
82
|
+
const makeLocalChainAccountKit = prepareExoClassKit(
|
|
81
83
|
baggage,
|
|
82
|
-
'
|
|
84
|
+
'LCA Kit',
|
|
83
85
|
{
|
|
84
|
-
helper: UnguardedHelperI,
|
|
85
86
|
holder: HolderI,
|
|
86
87
|
invitationMakers: M.interface('invitationMakers', {
|
|
87
88
|
Delegate: HolderI.payload.methodGuards.makeDelegateInvitation,
|
|
88
89
|
CloseAccount: HolderI.payload.methodGuards.makeCloseAccountInvitation,
|
|
89
|
-
TransferAccount:
|
|
90
|
-
HolderI.payload.methodGuards.makeTransferAccountInvitation,
|
|
91
90
|
}),
|
|
92
91
|
},
|
|
93
92
|
/**
|
|
@@ -106,19 +105,6 @@ export const prepareLocalChainAccountKit = (
|
|
|
106
105
|
return { account, address, topicKit };
|
|
107
106
|
},
|
|
108
107
|
{
|
|
109
|
-
helper: {
|
|
110
|
-
/** @throws if this holder no longer owns the account */
|
|
111
|
-
owned() {
|
|
112
|
-
const { account } = this.state;
|
|
113
|
-
if (!account) {
|
|
114
|
-
throw Fail`Using account holder after transfer`;
|
|
115
|
-
}
|
|
116
|
-
return account;
|
|
117
|
-
},
|
|
118
|
-
getUpdater() {
|
|
119
|
-
return this.state.topicKit.recorder;
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
108
|
invitationMakers: {
|
|
123
109
|
Delegate(validatorAddress, amount) {
|
|
124
110
|
return this.facets.holder.makeDelegateInvitation(
|
|
@@ -129,9 +115,6 @@ export const prepareLocalChainAccountKit = (
|
|
|
129
115
|
CloseAccount() {
|
|
130
116
|
return this.facets.holder.makeCloseAccountInvitation();
|
|
131
117
|
},
|
|
132
|
-
TransferAccount() {
|
|
133
|
-
return this.facets.holder.makeTransferAccountInvitation();
|
|
134
|
-
},
|
|
135
118
|
},
|
|
136
119
|
holder: {
|
|
137
120
|
getPublicTopics() {
|
|
@@ -161,7 +144,7 @@ export const prepareLocalChainAccountKit = (
|
|
|
161
144
|
return zcf.makeInvitation(async seat => {
|
|
162
145
|
// TODO should it allow delegating more BLD?
|
|
163
146
|
seat.exit();
|
|
164
|
-
const lca = this.
|
|
147
|
+
const { account: lca } = this.state;
|
|
165
148
|
trace('lca', lca);
|
|
166
149
|
const delegatorAddress = await E(lca).getAddress();
|
|
167
150
|
trace('delegatorAddress', delegatorAddress);
|
|
@@ -183,16 +166,18 @@ export const prepareLocalChainAccountKit = (
|
|
|
183
166
|
* Starting a transfer revokes the account holder. The associated updater
|
|
184
167
|
* will get a special notification that the account is being transferred.
|
|
185
168
|
*/
|
|
186
|
-
makeTransferAccountInvitation() {
|
|
187
|
-
throw Error('not yet implemented');
|
|
188
|
-
},
|
|
189
169
|
/** @type {LocalChainAccount['deposit']} */
|
|
190
170
|
async deposit(payment, optAmountShape) {
|
|
191
|
-
return E(this.
|
|
171
|
+
return E(this.state.account).deposit(payment, optAmountShape);
|
|
192
172
|
},
|
|
193
173
|
/** @type {LocalChainAccount['withdraw']} */
|
|
194
174
|
async withdraw(amount) {
|
|
195
|
-
return E(this.
|
|
175
|
+
return E(this.state.account).withdraw(amount);
|
|
176
|
+
},
|
|
177
|
+
/** @type {LocalChainAccount['executeTx']} */
|
|
178
|
+
async executeTx(messages) {
|
|
179
|
+
// @ts-expect-error subtype
|
|
180
|
+
return E(this.state.account).executeTx(messages);
|
|
196
181
|
},
|
|
197
182
|
/**
|
|
198
183
|
* @returns {ChainAddress['address']}
|
|
@@ -225,7 +210,7 @@ export const prepareLocalChainAccountKit = (
|
|
|
225
210
|
? 0n
|
|
226
211
|
: await timestampHelper.getTimeoutTimestampNS());
|
|
227
212
|
|
|
228
|
-
const [result] = await E(this.
|
|
213
|
+
const [result] = await E(this.state.account).executeTx([
|
|
229
214
|
typedJson('/ibc.applications.transfer.v1.MsgTransfer', {
|
|
230
215
|
sourcePort: transferChannel.portId,
|
|
231
216
|
sourceChannel: transferChannel.channelId,
|
|
@@ -248,6 +233,6 @@ export const prepareLocalChainAccountKit = (
|
|
|
248
233
|
},
|
|
249
234
|
},
|
|
250
235
|
);
|
|
251
|
-
return
|
|
236
|
+
return makeLocalChainAccountKit;
|
|
252
237
|
};
|
|
253
238
|
/** @typedef {ReturnType<ReturnType<typeof prepareLocalChainAccountKit>>} LocalChainAccountKit */
|
|
@@ -36,7 +36,7 @@ export function prepareStakingAccountKit(baggage: Baggage, makeRecorderKit: <T>(
|
|
|
36
36
|
icqConnection: import("@endo/exo").Guarded<{
|
|
37
37
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
38
38
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
39
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
39
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
40
40
|
}>;
|
|
41
41
|
timer: TimerService;
|
|
42
42
|
}) => import("@endo/exo").GuardedKit<{
|
|
@@ -126,7 +126,7 @@ export type State = {
|
|
|
126
126
|
icqConnection: import("@endo/exo").Guarded<{
|
|
127
127
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
128
128
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
129
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
129
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
130
130
|
}>;
|
|
131
131
|
bondDenom: string;
|
|
132
132
|
timer: TimerService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stakingAccountKit.d.ts","sourceRoot":"","sources":["stakingAccountKit.js"],"names":[],"mappings":"AAiCA,mFAAmF;AACnF,kCAAsC;
|
|
1
|
+
{"version":3,"file":"stakingAccountKit.d.ts","sourceRoot":"","sources":["stakingAccountKit.js"],"names":[],"mappings":"AAiCA,mFAAmF;AACnF,kCAAsC;AActC;;;GAGG;AAEH;;;;;;;;;GASG;AAEH;;;;;;;;;GAeG;AAOI,yEAMN;AAED,6CAGE;AAaK,kCAFiD,CAAC,UAD9C,MAAM,gBACN,CAAC,CAAC,EAAE;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAC,KAAK,CAAC,KAYxD;AAUM,6FAeC,WAAU,GAAE,QAAS,OACnB,WAAK,EAAE,MAAM,CAAC,WAClB,CAAC,CAAC,0HAnBG,GAAG;;iBAmCC,WAAW;;;;;;;;;QAelB,wDAAwD;;;QAWxD;;;WAGG;;;;QAgBH;;;;WAIG;4DADQ,MAAM,CAAC,KAAK,CAAC;QAUxB;;;;WAIG;;QAaH,gDAAgD;;QAShD;;WAEG;;;QAYH;;;WAGG;;;;;;;;;;;QAmBH,8BAA8B;;QAI9B;;;;WAIG;;QAkBH;;;;;WAKG;;QAmBH;;;WAGG;;QAmBH;;;WAGG;;;QA0BH;;WAEG;;;GA2CV;;;;;;;;;;;;;eAlXc,MAAM;;;gCAoXP,UAAU,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;kCACvD,iBAAiB,CAAC,QAAQ,CAAC;6BAzYf,4BAA4B;iCADP,6CAA6C;kCADkD,aAAa;gCAAb,aAAa;kCAK5H,cAAc;+BALiG,aAAa;0BAGlI,kDAAkD;4CAHmE,aAAa;iCAAb,aAAa;gCAI5H,wDAAwD"}
|
|
@@ -38,7 +38,6 @@ export const maxClockSkew = 10n * 60n;
|
|
|
38
38
|
* @import {AmountArg, IcaAccount, ChainAddress, ChainAmount, CosmosValidatorAddress, ICQConnection, StakingAccountActions, DenomAmount} from '../types.js';
|
|
39
39
|
* @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
40
40
|
* @import {Baggage} from '@agoric/swingset-liveslots';
|
|
41
|
-
* @import {AnyJson} from '@agoric/cosmic-proto';
|
|
42
41
|
* @import { Coin } from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js';
|
|
43
42
|
* @import { Delegation } from '@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js';
|
|
44
43
|
* @import {TimerService} from '@agoric/time';
|
|
@@ -85,13 +84,6 @@ const PUBLIC_TOPICS = {
|
|
|
85
84
|
account: ['Staking Account holder status', M.any()],
|
|
86
85
|
};
|
|
87
86
|
|
|
88
|
-
// UNTIL https://github.com/cosmology-tech/telescope/issues/605
|
|
89
|
-
/**
|
|
90
|
-
* @param {Any} x
|
|
91
|
-
* @returns {AnyJson}
|
|
92
|
-
*/
|
|
93
|
-
const toAnyJSON = x => /** @type {AnyJson} */ (Any.toJSON(x));
|
|
94
|
-
|
|
95
87
|
export const encodeTxResponse = (response, toProtoMsg) => {
|
|
96
88
|
const protoMsg = toProtoMsg(response);
|
|
97
89
|
const any1 = Any.fromPartial(protoMsg);
|
|
@@ -304,7 +296,7 @@ export const prepareStakingAccountKit = (baggage, makeRecorderKit, zcf) => {
|
|
|
304
296
|
const { chainAddress } = this.state;
|
|
305
297
|
|
|
306
298
|
const result = await E(helper.owned()).executeEncodedTx([
|
|
307
|
-
|
|
299
|
+
Any.toJSON(
|
|
308
300
|
MsgDelegate.toProtoMsg({
|
|
309
301
|
delegatorAddress: chainAddress.address,
|
|
310
302
|
validatorAddress: validator.address,
|
|
@@ -328,7 +320,7 @@ export const prepareStakingAccountKit = (baggage, makeRecorderKit, zcf) => {
|
|
|
328
320
|
|
|
329
321
|
// NOTE: response, including completionTime, is currently discarded.
|
|
330
322
|
await E(helper.owned()).executeEncodedTx([
|
|
331
|
-
|
|
323
|
+
Any.toJSON(
|
|
332
324
|
MsgBeginRedelegate.toProtoMsg({
|
|
333
325
|
delegatorAddress: chainAddress.address,
|
|
334
326
|
validatorSrcAddress: srcValidator.address,
|
|
@@ -352,7 +344,7 @@ export const prepareStakingAccountKit = (baggage, makeRecorderKit, zcf) => {
|
|
|
352
344
|
validatorAddress: validator.address,
|
|
353
345
|
});
|
|
354
346
|
const account = helper.owned();
|
|
355
|
-
const result = await E(account).executeEncodedTx([
|
|
347
|
+
const result = await E(account).executeEncodedTx([Any.toJSON(msg)]);
|
|
356
348
|
const response = tryDecodeResponse(
|
|
357
349
|
result,
|
|
358
350
|
MsgWithdrawDelegatorRewardResponse.fromProtoMsg,
|
|
@@ -400,7 +392,7 @@ export const prepareStakingAccountKit = (baggage, makeRecorderKit, zcf) => {
|
|
|
400
392
|
|
|
401
393
|
const result = await E(helper.owned()).executeEncodedTx(
|
|
402
394
|
delegations.map(d =>
|
|
403
|
-
|
|
395
|
+
Any.toJSON(
|
|
404
396
|
MsgUndelegate.toProtoMsg({
|
|
405
397
|
delegatorAddress: chainAddress.address,
|
|
406
398
|
validatorAddress: d.validatorAddress,
|
package/src/facade.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export function makeOrchestrationFacade({ zone, timerService, zcf, storageNode,
|
|
|
8
8
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
9
9
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
10
10
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
11
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
11
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
12
12
|
}>>;
|
|
13
13
|
}>> | null;
|
|
14
14
|
localchain: Remote<import("@endo/exo").Guarded<{
|
|
@@ -568,7 +568,7 @@ export function addOrchestrationToClient({ consume: { client, orchestration } }:
|
|
|
568
568
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
569
569
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
570
570
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
571
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
571
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
572
572
|
}>>;
|
|
573
573
|
}>;
|
|
574
574
|
};
|
|
@@ -605,7 +605,7 @@ export type OrchestrationVats = {
|
|
|
605
605
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
606
606
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
607
607
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
608
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
608
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
609
609
|
}>>;
|
|
610
610
|
};
|
|
611
611
|
}>;
|
|
@@ -620,7 +620,7 @@ export type OrchestrationVats = {
|
|
|
620
620
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
621
621
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
622
622
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
623
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
623
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
624
624
|
}>>;
|
|
625
625
|
};
|
|
626
626
|
}>;
|
|
@@ -7,7 +7,7 @@ export function startStakeAtom({ consume: { agoricNames, board, chainStorage, ch
|
|
|
7
7
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
8
8
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
9
9
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
10
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
10
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
11
11
|
}>>;
|
|
12
12
|
}>;
|
|
13
13
|
storageNode: globalThis.StorageNode;
|
|
@@ -36,7 +36,7 @@ export function startStakeAtom({ consume: { agoricNames, board, chainStorage, ch
|
|
|
36
36
|
withdrawRewards(): never;
|
|
37
37
|
undelegate(delegations: import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation[]): Promise<void>;
|
|
38
38
|
}>>;
|
|
39
|
-
|
|
39
|
+
makeAccountInvitationMaker(): Promise<Invitation<{
|
|
40
40
|
publicSubscribers: {
|
|
41
41
|
account: {
|
|
42
42
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAYO,0OAHI,eAAe,GAAG;IAAE,YAAY,EAAE;QAAC,OAAO,EAAE;YAAC,SAAS,EAAE,YAAY,OAgCtB,IAAI,cACtD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAYO,0OAHI,eAAe,GAAG;IAAE,YAAY,EAAE;QAAC,OAAO,EAAE;YAAC,SAAS,EAAE,YAAY,OAgCtB,IAAI,cACtD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2GAsDs5I,OAAO,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;eAvFzyI,CAAA;SAAC,CAAA;KAAC,CAAA;CAAC;;kBAuDpI;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN;oCA3FgD,gCAAgC"}
|
|
@@ -46,7 +46,6 @@ export function startStakeBld({ consume: { board, chainStorage, chainTimerServic
|
|
|
46
46
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
47
47
|
}, undefined>>;
|
|
48
48
|
CloseAccount(): never;
|
|
49
|
-
TransferAccount(): never;
|
|
50
49
|
}>;
|
|
51
50
|
account: import("@endo/exo").Guarded<{
|
|
52
51
|
getPublicTopics(): {
|
|
@@ -60,9 +59,11 @@ export function startStakeBld({ consume: { board, chainStorage, chainTimerServic
|
|
|
60
59
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
61
60
|
}, undefined>>;
|
|
62
61
|
makeCloseAccountInvitation(): never;
|
|
63
|
-
makeTransferAccountInvitation(): never;
|
|
64
62
|
deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
|
|
65
63
|
withdraw(amount: Amount<"nat">): Promise<globalThis.Payment<"nat">>;
|
|
64
|
+
executeTx<MT extends {
|
|
65
|
+
'@type': string;
|
|
66
|
+
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto").ResponseTo<MT[K]>; }>;
|
|
66
67
|
getAddress(): string;
|
|
67
68
|
transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
|
|
68
69
|
}>;
|
|
@@ -79,13 +80,15 @@ export function startStakeBld({ consume: { board, chainStorage, chainTimerServic
|
|
|
79
80
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
80
81
|
}, undefined>>;
|
|
81
82
|
makeCloseAccountInvitation(): never;
|
|
82
|
-
makeTransferAccountInvitation(): never;
|
|
83
83
|
deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
|
|
84
84
|
withdraw(amount: Amount<"nat">): Promise<globalThis.Payment<"nat">>;
|
|
85
|
+
executeTx<MT extends {
|
|
86
|
+
'@type': string;
|
|
87
|
+
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto").ResponseTo<MT[K]>; }>;
|
|
85
88
|
getAddress(): string;
|
|
86
89
|
transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
|
|
87
90
|
}>>;
|
|
88
|
-
|
|
91
|
+
makeAccountInvitationMaker(): Promise<Invitation<{
|
|
89
92
|
publicSubscribers: {
|
|
90
93
|
account: {
|
|
91
94
|
description: string;
|
|
@@ -98,7 +101,6 @@ export function startStakeBld({ consume: { board, chainStorage, chainTimerServic
|
|
|
98
101
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
99
102
|
}, undefined>>;
|
|
100
103
|
CloseAccount(): never;
|
|
101
|
-
TransferAccount(): never;
|
|
102
104
|
}>;
|
|
103
105
|
account: import("@endo/exo").Guarded<{
|
|
104
106
|
getPublicTopics(): {
|
|
@@ -112,9 +114,11 @@ export function startStakeBld({ consume: { board, chainStorage, chainTimerServic
|
|
|
112
114
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
113
115
|
}, undefined>>;
|
|
114
116
|
makeCloseAccountInvitation(): never;
|
|
115
|
-
makeTransferAccountInvitation(): never;
|
|
116
117
|
deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
|
|
117
118
|
withdraw(amount: Amount<"nat">): Promise<globalThis.Payment<"nat">>;
|
|
119
|
+
executeTx<MT extends {
|
|
120
|
+
'@type': string;
|
|
121
|
+
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto").ResponseTo<MT[K]>; }>;
|
|
118
122
|
getAddress(): string;
|
|
119
123
|
transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
|
|
120
124
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-stakeBld.d.ts","sourceRoot":"","sources":["start-stakeBld.js"],"names":[],"mappings":"AAUO,kSAFI,eAAe,GAAG;IAAC,YAAY,EAAE;QAAC,OAAO,EAAE;YAAC,QAAQ,EAAE,YAAY,OAmBvE,GACL;;;;0CAoBK,MAAM,KAAK,CAAC;yCAoBR,QAAQ,KAAK,CAAC,mBACR,OAAO;yCAmBgJ,OAAO,KAAK,CAAC;;;uCAAgiB,EAAE;;mCAA6oE,OAAO,sBAAsB,EAAE,SAAS;;;wCAAyqB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;;;;;;;;;wBAtD/jH,OAAO,kBAAkB,EAAE,OAEzD
|
|
1
|
+
{"version":3,"file":"start-stakeBld.d.ts","sourceRoot":"","sources":["start-stakeBld.js"],"names":[],"mappings":"AAUO,kSAFI,eAAe,GAAG;IAAC,YAAY,EAAE;QAAC,OAAO,EAAE;YAAC,QAAQ,EAAE,YAAY,OAmBvE,GACL;;;;0CAoBK,MAAM,KAAK,CAAC;yCAoBR,QAAQ,KAAK,CAAC,mBACR,OAAO;yCAmBgJ,OAAO,KAAK,CAAC;;;uCAAgiB,EAAE;;mCAA6oE,OAAO,sBAAsB,EAAE,SAAS;;;wCAAyqB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;;;;;;;;;wBAtD/jH,OAAO,kBAAkB,EAAE,OAEzD;;;;;;;;;;;;;;;;;;;;;;;;yFAoDihE,OAAO,KAAK,CAAC;;;;6CApBrhE,QAAQ,KAAK,CAAC,mBACR,OAAO;6CAmBgJ,OAAO,KAAK,CAAC;;;2CAAgiB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAhFhlB,CAAA;SAAC,CAAA;KAAC,CAAA;CAAC,iBAkDxI;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BN;sBArFqB,gCAAgC"}
|
package/src/service.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export function prepareOrchestrationTools(zone: Zone): {
|
|
|
24
24
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
25
25
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
26
26
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
27
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
27
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
28
28
|
}>>;
|
|
29
29
|
};
|
|
30
30
|
}>;
|
|
@@ -47,7 +47,7 @@ export type ICQConnectionStore = import("@endo/pass-style").RemotableObject & im
|
|
|
47
47
|
connection: {
|
|
48
48
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
49
49
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
50
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
50
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
51
51
|
};
|
|
52
52
|
connectionHandler: {
|
|
53
53
|
onOpen(connection: Remote<import("@agoric/network").Connection>, localAddr: `/ibc-port/${string}`, remoteAddr: `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`): Promise<void>;
|
package/src/utils/packet.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @import {AnyJson,
|
|
2
|
+
* @import {AnyJson, JsonSafe} from '@agoric/cosmic-proto';
|
|
3
3
|
* @import {ResponseQuery} from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
4
4
|
* @import {InterchainAccountPacketData} from '@agoric/cosmic-proto/ibc/applications/interchain_accounts/v1/packet.js';
|
|
5
5
|
* @import {InterchainQueryPacketData} from '@agoric/cosmic-proto/icq/v1/packet.js';
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
* @returns {string} stringified InterchainAccountPacketData
|
|
14
14
|
* @throws {Error} if malformed messages are provided
|
|
15
15
|
*/
|
|
16
|
-
export function makeTxPacket(msgs:
|
|
16
|
+
export function makeTxPacket(msgs: JsonSafe<Any>[], opts?: Partial<Omit<TxBody, "messages">> | undefined): string;
|
|
17
17
|
/**
|
|
18
18
|
* Makes an IBC query packet from an array of query messages. Expects the `data` of each message
|
|
19
19
|
* to be base64 encoded bytes.
|
|
20
20
|
* Skips checks for malformed messages in favor of interface guards.
|
|
21
|
-
* @param {
|
|
21
|
+
* @param {JsonSafe<RequestQuery>[]} msgs
|
|
22
22
|
* @returns {string} stringified InterchainQueryPacketData
|
|
23
23
|
* @throws {Error} if malformed messages are provided
|
|
24
24
|
*/
|
|
25
|
-
export function makeQueryPacket(msgs:
|
|
25
|
+
export function makeQueryPacket(msgs: JsonSafe<RequestQuery>[]): string;
|
|
26
26
|
/**
|
|
27
27
|
* Looks for a result or error key in the response string, and returns
|
|
28
28
|
* a Base64Bytes string. This string can be decoded using the corresponding
|
|
@@ -40,13 +40,13 @@ export function parseTxPacket(response: string): string;
|
|
|
40
40
|
* decoded using the corresponding Query*Response objects.
|
|
41
41
|
* Error strings seem to be plain text and do not need decoding.
|
|
42
42
|
* @param {string} response
|
|
43
|
-
* @returns {
|
|
43
|
+
* @returns {JsonSafe<ResponseQuery>[]}
|
|
44
44
|
* @throws {Error} if error key is detected in response string, or result key is not found
|
|
45
45
|
*/
|
|
46
|
-
export function parseQueryPacket(response: string):
|
|
47
|
-
import
|
|
46
|
+
export function parseQueryPacket(response: string): JsonSafe<ResponseQuery>[];
|
|
47
|
+
import { Any } from '@agoric/cosmic-proto/google/protobuf/any.js';
|
|
48
|
+
import type { JsonSafe } from '@agoric/cosmic-proto';
|
|
48
49
|
import { TxBody } from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
49
50
|
import { RequestQuery } from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
50
51
|
import type { ResponseQuery } from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
51
|
-
import type { Base64Any } from '@agoric/cosmic-proto';
|
|
52
52
|
//# sourceMappingURL=packet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packet.d.ts","sourceRoot":"","sources":["packet.js"],"names":[],"mappings":"AAUA;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,
|
|
1
|
+
{"version":3,"file":"packet.d.ts","sourceRoot":"","sources":["packet.js"],"names":[],"mappings":"AAUA;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,2GAHa,MAAM,CAmBlB;AAGD;;;;;;;GAOG;AACH,iEAHa,MAAM,CAgBlB;AAGD;;;;;;;;GAQG;AACH,wCAJW,MAAM,GACJ,MAAM,CAQlB;AAGD;;;;;;;;;GASG;AACH,2CAJW,MAAM,6BAiBhB;oBA5GmB,6CAA6C;8BAU7B,sBAAsB;uBAXnC,8CAA8C;6BAExC,+CAA+C;mCAU5C,+CAA+C"}
|
package/src/utils/packet.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { Type as PacketType } from '@agoric/cosmic-proto/ibc/applications/interchain_accounts/v1/packet.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* @import {AnyJson,
|
|
12
|
+
* @import {AnyJson, JsonSafe} from '@agoric/cosmic-proto';
|
|
13
13
|
* @import {ResponseQuery} from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
14
14
|
* @import {InterchainAccountPacketData} from '@agoric/cosmic-proto/ibc/applications/interchain_accounts/v1/packet.js';
|
|
15
15
|
* @import {InterchainQueryPacketData} from '@agoric/cosmic-proto/icq/v1/packet.js';
|
|
@@ -34,7 +34,7 @@ export function makeTxPacket(msgs, opts) {
|
|
|
34
34
|
).finish();
|
|
35
35
|
|
|
36
36
|
return JSON.stringify(
|
|
37
|
-
/** @type {
|
|
37
|
+
/** @type {JsonSafe<InterchainAccountPacketData>} */ ({
|
|
38
38
|
type: PacketType.TYPE_EXECUTE_TX,
|
|
39
39
|
data: encodeBase64(bytes),
|
|
40
40
|
memo: '',
|
|
@@ -47,7 +47,7 @@ harden(makeTxPacket);
|
|
|
47
47
|
* Makes an IBC query packet from an array of query messages. Expects the `data` of each message
|
|
48
48
|
* to be base64 encoded bytes.
|
|
49
49
|
* Skips checks for malformed messages in favor of interface guards.
|
|
50
|
-
* @param {
|
|
50
|
+
* @param {JsonSafe<RequestQuery>[]} msgs
|
|
51
51
|
* @returns {string} stringified InterchainQueryPacketData
|
|
52
52
|
* @throws {Error} if malformed messages are provided
|
|
53
53
|
*/
|
|
@@ -59,7 +59,7 @@ export function makeQueryPacket(msgs) {
|
|
|
59
59
|
).finish();
|
|
60
60
|
|
|
61
61
|
return JSON.stringify(
|
|
62
|
-
/** @type {
|
|
62
|
+
/** @type {JsonSafe<InterchainQueryPacketData>} */ ({
|
|
63
63
|
data: encodeBase64(bytes),
|
|
64
64
|
memo: '',
|
|
65
65
|
}),
|
|
@@ -91,7 +91,7 @@ harden(parseTxPacket);
|
|
|
91
91
|
* decoded using the corresponding Query*Response objects.
|
|
92
92
|
* Error strings seem to be plain text and do not need decoding.
|
|
93
93
|
* @param {string} response
|
|
94
|
-
* @returns {
|
|
94
|
+
* @returns {JsonSafe<ResponseQuery>[]}
|
|
95
95
|
* @throws {Error} if error key is detected in response string, or result key is not found
|
|
96
96
|
*/
|
|
97
97
|
export function parseQueryPacket(response) {
|
|
@@ -101,6 +101,8 @@ export function parseQueryPacket(response) {
|
|
|
101
101
|
return harden(
|
|
102
102
|
responses.map(resp => ({
|
|
103
103
|
...resp,
|
|
104
|
+
height: String(resp.index),
|
|
105
|
+
index: String(resp.index),
|
|
104
106
|
key: encodeBase64(resp.key),
|
|
105
107
|
value: encodeBase64(resp.value),
|
|
106
108
|
})),
|
|
@@ -10,7 +10,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
|
|
|
10
10
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
11
11
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
12
12
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
13
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
13
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
14
14
|
}>>;
|
|
15
15
|
};
|
|
16
16
|
}>;
|
|
@@ -26,7 +26,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
|
|
|
26
26
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
27
27
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
28
28
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
|
29
|
-
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").
|
|
29
|
+
query(msgs: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").RequestQuery>[]): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/tendermint/abci/types.js").ResponseQuery>[]>;
|
|
30
30
|
}>>;
|
|
31
31
|
};
|
|
32
32
|
}>;
|