@agoric/orchestration 0.1.1-dev-33eb3c9.0 → 0.1.1-dev-c962ba0.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 +16 -16
- package/src/examples/send-anywhere.contract.d.ts.map +1 -1
- package/src/examples/send-anywhere.contract.js +9 -7
- package/src/examples/stake-ica.contract.d.ts +24 -23
- package/src/examples/stake-ica.contract.d.ts.map +1 -1
- package/src/examples/stake-ica.contract.js +1 -1
- package/src/fixtures/query-flows.contract.d.ts +9 -2
- package/src/fixtures/query-flows.contract.d.ts.map +1 -1
- package/src/fixtures/query-flows.contract.js +18 -2
- package/src/proposals/start-stakeAtom.js +29 -16
- package/src/proposals/start-stakeOsmo.js +29 -16
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-c962ba0.0+c962ba0",
|
|
4
4
|
"description": "Chain abstraction for Agoric's orchestration clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@agoric/async-flow": "0.1.1-dev-
|
|
37
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
38
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
39
|
-
"@agoric/internal": "0.3.3-dev-
|
|
40
|
-
"@agoric/network": "0.1.1-dev-
|
|
41
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
42
|
-
"@agoric/store": "0.9.3-dev-
|
|
43
|
-
"@agoric/time": "0.3.3-dev-
|
|
44
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
45
|
-
"@agoric/vats": "0.15.2-dev-
|
|
46
|
-
"@agoric/vow": "0.1.1-dev-
|
|
47
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
48
|
-
"@agoric/zone": "0.2.3-dev-
|
|
36
|
+
"@agoric/async-flow": "0.1.1-dev-c962ba0.0+c962ba0",
|
|
37
|
+
"@agoric/cosmic-proto": "0.4.1-dev-c962ba0.0+c962ba0",
|
|
38
|
+
"@agoric/ertp": "0.16.3-dev-c962ba0.0+c962ba0",
|
|
39
|
+
"@agoric/internal": "0.3.3-dev-c962ba0.0+c962ba0",
|
|
40
|
+
"@agoric/network": "0.1.1-dev-c962ba0.0+c962ba0",
|
|
41
|
+
"@agoric/notifier": "0.6.3-dev-c962ba0.0+c962ba0",
|
|
42
|
+
"@agoric/store": "0.9.3-dev-c962ba0.0+c962ba0",
|
|
43
|
+
"@agoric/time": "0.3.3-dev-c962ba0.0+c962ba0",
|
|
44
|
+
"@agoric/vat-data": "0.5.3-dev-c962ba0.0+c962ba0",
|
|
45
|
+
"@agoric/vats": "0.15.2-dev-c962ba0.0+c962ba0",
|
|
46
|
+
"@agoric/vow": "0.1.1-dev-c962ba0.0+c962ba0",
|
|
47
|
+
"@agoric/zoe": "0.26.3-dev-c962ba0.0+c962ba0",
|
|
48
|
+
"@agoric/zone": "0.2.3-dev-c962ba0.0+c962ba0",
|
|
49
49
|
"@cosmjs/encoding": "^0.32.4",
|
|
50
50
|
"@endo/base64": "^1.0.9",
|
|
51
51
|
"@endo/errors": "^1.2.10",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"bs58": "^6.0.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
59
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-c962ba0.0+c962ba0",
|
|
60
60
|
"@chain-registry/client": "^1.47.4",
|
|
61
61
|
"@cosmjs/amino": "^0.33.0",
|
|
62
62
|
"@cosmjs/proto-signing": "^0.33.0",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"typeCoverage": {
|
|
100
100
|
"atLeast": 97.7
|
|
101
101
|
},
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "c962ba0771022947027b9bd76339a3ab21406b20"
|
|
103
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-anywhere.contract.d.ts","sourceRoot":"","sources":["send-anywhere.contract.js"],"names":[],"mappings":"AAaA;;;;;GAKG;AAEH,qEAKE;AAoBK,8BAVI,GAAG,eACH,mBAAmB,GAAG;IAC5B,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;CAClC,QACO,IAAI,iDACJ,kBAAkB;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"send-anywhere.contract.d.ts","sourceRoot":"","sources":["send-anywhere.contract.js"],"names":[],"mappings":"AAaA;;;;;GAKG;AAEH,qEAKE;AAoBK,8BAVI,GAAG,eACH,mBAAmB,GAAG;IAC5B,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;CAClC,QACO,IAAI,iDACJ,kBAAkB;;;;;;;;;;;GAoF5B;AAGD;gBA7FiB,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE;gBAC9C,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;gBAC/B,UAAU;iBACT,OAAO,WAAW,CAAC;;;;;;;;;;;;GA0F0C;yCAlHrB,0BAA0B;2BAC9B,uBAAuB;iCAAvB,uBAAuB;qCAAvB,uBAAuB;4BAH/C,aAAa;0BACpB,cAAc;wCACqB,0BAA0B;yBAFtD,aAAa"}
|
|
@@ -69,6 +69,15 @@ export const contract = async (
|
|
|
69
69
|
|
|
70
70
|
const { brands } = zcf.getTerms();
|
|
71
71
|
|
|
72
|
+
/**
|
|
73
|
+
* ensure ChainHub is populated before trying to use it in flows
|
|
74
|
+
*/
|
|
75
|
+
registerChainsAndAssets(
|
|
76
|
+
chainHub,
|
|
77
|
+
zcf.getTerms().brands,
|
|
78
|
+
privateArgs.chainInfo,
|
|
79
|
+
privateArgs.assetInfo,
|
|
80
|
+
);
|
|
72
81
|
/**
|
|
73
82
|
* Set up a shared local account for use in async-flow functions. Typically,
|
|
74
83
|
* exo initState functions need to resolve synchronously, but `makeOnce`
|
|
@@ -115,13 +124,6 @@ export const contract = async (
|
|
|
115
124
|
},
|
|
116
125
|
);
|
|
117
126
|
|
|
118
|
-
registerChainsAndAssets(
|
|
119
|
-
chainHub,
|
|
120
|
-
zcf.getTerms().brands,
|
|
121
|
-
privateArgs.chainInfo,
|
|
122
|
-
privateArgs.assetInfo,
|
|
123
|
-
);
|
|
124
|
-
|
|
125
127
|
return { publicFacet, creatorFacet };
|
|
126
128
|
};
|
|
127
129
|
harden(contract);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {Baggage} from '@agoric/vat-data';
|
|
3
3
|
* @import {Remote} from '@agoric/internal';
|
|
4
|
+
* @import {CosmosChainInfo, CosmosInterchainService, Denom, DenomDetail} from '@agoric/orchestration';
|
|
4
5
|
* @import {ContractMeta, Invitation, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
5
6
|
* @import {IBCConnectionID, NameHub} from '@agoric/vats';
|
|
6
7
|
* @import {TimerService} from '@agoric/time';
|
|
7
8
|
* @import {ResolvedContinuingOfferResult} from '../utils/zoe-tools.js';
|
|
8
|
-
* @import {ICQConnection, CosmosInterchainService, ChainHub} from '../types.js';
|
|
9
9
|
*/
|
|
10
10
|
/** @type {ContractMeta<typeof start>} */
|
|
11
11
|
export const meta: ContractMeta<typeof start>;
|
|
@@ -27,29 +27,29 @@ export function start(zcf: ZCF<StakeIcaTerms>, privateArgs: {
|
|
|
27
27
|
makeAccount(): Promise<import("@endo/exo").Guarded<{
|
|
28
28
|
asContinuingOffer(): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<ResolvedContinuingOfferResult>>;
|
|
29
29
|
getPublicTopics(): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>>>>;
|
|
30
|
-
getAddress(): import("@agoric/async-flow").HostInterface<import("
|
|
31
|
-
delegate(validator: import("
|
|
32
|
-
redelegate(srcValidator: import("
|
|
33
|
-
withdrawReward(validator: import("
|
|
34
|
-
getBalance(denom: import("
|
|
35
|
-
getBalances(): import("@agoric/vow").Vow<import("
|
|
36
|
-
send(toAccount: import("
|
|
37
|
-
sendAll(toAccount: import("
|
|
38
|
-
transfer(destination: import("
|
|
39
|
-
transferSteps(amount: import("
|
|
40
|
-
withdrawRewards(): import("@agoric/vow").Vow<import("
|
|
30
|
+
getAddress(): import("@agoric/async-flow").HostInterface<import("@agoric/orchestration").CosmosChainAddress>;
|
|
31
|
+
delegate(validator: import("@agoric/orchestration").CosmosValidatorAddress, amount: import("@agoric/orchestration").AmountArg): import("@agoric/vow").Vow<void>;
|
|
32
|
+
redelegate(srcValidator: import("@agoric/orchestration").CosmosValidatorAddress, dstValidator: import("@agoric/orchestration").CosmosValidatorAddress, amount: import("@agoric/orchestration").AmountArg): import("@agoric/vow").Vow<void>;
|
|
33
|
+
withdrawReward(validator: import("@agoric/orchestration").CosmosValidatorAddress): import("@agoric/vow").Vow<import("@agoric/orchestration").DenomAmount[]>;
|
|
34
|
+
getBalance(denom: import("@agoric/orchestration").DenomArg): import("@agoric/vow").Vow<import("@agoric/orchestration").DenomAmount>;
|
|
35
|
+
getBalances(): import("@agoric/vow").Vow<import("@agoric/orchestration").DenomAmount[]>;
|
|
36
|
+
send(toAccount: import("@agoric/orchestration").AccountIdArg, amount: import("@agoric/orchestration").AmountArg): import("@agoric/vow").Vow<void>;
|
|
37
|
+
sendAll(toAccount: import("@agoric/orchestration").CosmosChainAddress, amounts: import("@agoric/orchestration").AmountArg[]): import("@agoric/vow").Vow<void>;
|
|
38
|
+
transfer(destination: import("@agoric/orchestration").AccountIdArg, amount: import("@agoric/orchestration").AmountArg, opts?: import("@agoric/orchestration").IBCMsgTransferOptions | undefined): import("@agoric/vow").Vow<void>;
|
|
39
|
+
transferSteps(amount: import("@agoric/orchestration").AmountArg, msg: import("@agoric/orchestration").TransferMsg): import("@agoric/vow").Vow<void>;
|
|
40
|
+
withdrawRewards(): import("@agoric/vow").Vow<import("@agoric/orchestration").DenomAmount[]>;
|
|
41
41
|
undelegate(delegations: {
|
|
42
|
-
amount: import("
|
|
43
|
-
delegator?: import("
|
|
44
|
-
validator: import("
|
|
42
|
+
amount: import("@agoric/orchestration").AmountArg;
|
|
43
|
+
delegator?: import("@agoric/orchestration").CosmosChainAddress;
|
|
44
|
+
validator: import("@agoric/orchestration").CosmosValidatorAddress;
|
|
45
45
|
}[]): import("@agoric/vow").Vow<void>;
|
|
46
46
|
deactivate(): import("@agoric/vow").Vow<void>;
|
|
47
47
|
reactivate(): import("@agoric/vow").Vow<void>;
|
|
48
|
-
getDelegation(validator: import("
|
|
48
|
+
getDelegation(validator: import("@agoric/orchestration").CosmosValidatorAddress): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<import("@agoric/orchestration").CosmosDelegationResponse>>;
|
|
49
49
|
getDelegations(): import("@agoric/vow").Vow<{
|
|
50
50
|
delegator: {
|
|
51
51
|
chainId: string;
|
|
52
|
-
value: import("
|
|
52
|
+
value: import("@agoric/orchestration").Bech32Address;
|
|
53
53
|
encoding: "bech32";
|
|
54
54
|
};
|
|
55
55
|
validator: {
|
|
@@ -122,11 +122,11 @@ export function start(zcf: ZCF<StakeIcaTerms>, privateArgs: {
|
|
|
122
122
|
encoding: "bech32";
|
|
123
123
|
};
|
|
124
124
|
amount: {
|
|
125
|
-
denom:
|
|
125
|
+
denom: Denom;
|
|
126
126
|
value: bigint;
|
|
127
127
|
};
|
|
128
128
|
}[]>;
|
|
129
|
-
getUnbondingDelegation(validator: import("
|
|
129
|
+
getUnbondingDelegation(validator: import("@agoric/orchestration").CosmosValidatorAddress): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").UnbondingDelegation>>;
|
|
130
130
|
getUnbondingDelegations(): import("@agoric/vow").Vow<{
|
|
131
131
|
delegatorAddress: string;
|
|
132
132
|
validatorAddress: string;
|
|
@@ -168,14 +168,14 @@ export function start(zcf: ZCF<StakeIcaTerms>, privateArgs: {
|
|
|
168
168
|
balance: string;
|
|
169
169
|
}[];
|
|
170
170
|
}[]>;
|
|
171
|
-
getReward(validator: import("
|
|
172
|
-
getRewards(): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<import("
|
|
171
|
+
getReward(validator: import("@agoric/orchestration").CosmosValidatorAddress): import("@agoric/vow").Vow<import("@agoric/orchestration").DenomAmount[]>;
|
|
172
|
+
getRewards(): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<import("@agoric/orchestration").CosmosRewardsResponse>>;
|
|
173
173
|
executeEncodedTx(msgs: {
|
|
174
174
|
$typeUrl?: "/google.protobuf.Any" | string | undefined;
|
|
175
175
|
typeUrl: string;
|
|
176
176
|
value: string;
|
|
177
177
|
}[], opts?: Partial<Omit<import("@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js").TxBody, "messages">> | undefined): import("@agoric/vow").Vow<string>;
|
|
178
|
-
depositForBurn(mintRecipient: `${string}:${string}:${string}`, amount: import("
|
|
178
|
+
depositForBurn(mintRecipient: `${string}:${string}:${string}`, amount: import("@agoric/orchestration").AmountArg, caller?: `${string}:${string}:${string}` | undefined): import("@agoric/vow").Vow<void>;
|
|
179
179
|
}>>;
|
|
180
180
|
makeAccountInvitationMaker(): Promise<Invitation<ResolvedContinuingOfferResult, undefined>>;
|
|
181
181
|
}>;
|
|
@@ -191,10 +191,11 @@ import type { ContractMeta } from '@agoric/zoe';
|
|
|
191
191
|
import type { ZCF } from '@agoric/zoe';
|
|
192
192
|
import type { NameHub } from '@agoric/vats';
|
|
193
193
|
import type { Remote } from '@agoric/internal';
|
|
194
|
-
import type { CosmosInterchainService } from '
|
|
194
|
+
import type { CosmosInterchainService } from '@agoric/orchestration';
|
|
195
195
|
import type { TimerService } from '@agoric/time';
|
|
196
196
|
import type { Baggage } from '@agoric/vat-data';
|
|
197
197
|
import type { ResolvedContinuingOfferResult } from '../utils/zoe-tools.js';
|
|
198
|
+
import type { Denom } from '@agoric/orchestration';
|
|
198
199
|
import type { Invitation } from '@agoric/zoe';
|
|
199
200
|
import type { IBCConnectionID } from '@agoric/vats';
|
|
200
201
|
//# sourceMappingURL=stake-ica.contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stake-ica.contract.d.ts","sourceRoot":"","sources":["stake-ica.contract.js"],"names":[],"mappings":"AAgBA;;;;;;;;GAQG;AAEH,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAelC;AAEH;;;;;;cAAsD;AAuB/C,2BAVI,IAAI,aAAa,CAAC,eAClB;IACN,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;IAC7B,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,YAAY,CAAC;CACrB,WACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyGjB;4BA1HY;IACR,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,eAAe,CAAC;IAClC,sBAAsB,EAAE,eAAe,CAAC;IACxC,UAAU,EAAE,OAAO,CAAC;CACrB;yBAwHU,OAAO,KAAK;
|
|
1
|
+
{"version":3,"file":"stake-ica.contract.d.ts","sourceRoot":"","sources":["stake-ica.contract.js"],"names":[],"mappings":"AAgBA;;;;;;;;GAQG;AAEH,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAelC;AAEH;;;;;;cAAsD;AAuB/C,2BAVI,IAAI,aAAa,CAAC,eAClB;IACN,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;IAC7B,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,YAAY,CAAC;CACrB,WACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyGjB;4BA1HY;IACR,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,eAAe,CAAC;IAClC,sBAAsB,EAAE,eAAe,CAAC;IACxC,UAAU,EAAE,OAAO,CAAC;CACrB;yBAwHU,OAAO,KAAK;kCAxJ+B,aAAa;yBAAb,aAAa;6BAC3B,cAAc;4BAHhC,kBAAkB;6CACoC,uBAAuB;kCAGvE,cAAc;6BALnB,kBAAkB;mDAMI,uBAAuB;2BAJQ,uBAAuB;gCAC7C,aAAa;qCAC3B,cAAc"}
|
|
@@ -17,11 +17,11 @@ const trace = makeTracer('StakeIca');
|
|
|
17
17
|
/**
|
|
18
18
|
* @import {Baggage} from '@agoric/vat-data';
|
|
19
19
|
* @import {Remote} from '@agoric/internal';
|
|
20
|
+
* @import {CosmosChainInfo, CosmosInterchainService, Denom, DenomDetail} from '@agoric/orchestration';
|
|
20
21
|
* @import {ContractMeta, Invitation, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
21
22
|
* @import {IBCConnectionID, NameHub} from '@agoric/vats';
|
|
22
23
|
* @import {TimerService} from '@agoric/time';
|
|
23
24
|
* @import {ResolvedContinuingOfferResult} from '../utils/zoe-tools.js';
|
|
24
|
-
* @import {ICQConnection, CosmosInterchainService, ChainHub} from '../types.js';
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
/** @type {ContractMeta<typeof start>} */
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: OrchestrationPowers & {
|
|
2
2
|
marshaller: Marshaller;
|
|
3
|
+
chainInfo?: Record<string, CosmosChainInfo>;
|
|
4
|
+
assetInfo?: [Denom, DenomDetail & {
|
|
5
|
+
brandKey?: string;
|
|
6
|
+
}][];
|
|
3
7
|
}, baggage: import("@agoric/vat-data").Baggage) => Promise<{
|
|
4
8
|
publicFacet: import("@endo/exo").Guarded<{
|
|
5
9
|
makeSendICQQueryInvitation(): Promise<globalThis.Invitation<import("@agoric/vow").Vow<string>, {
|
|
6
10
|
chainName: string;
|
|
7
|
-
msgs: Parameters<import("
|
|
11
|
+
msgs: Parameters<import("@agoric/orchestration").ICQQueryFunction>[0];
|
|
8
12
|
}>>;
|
|
9
13
|
makeAccountAndGetBalanceQueryInvitation(): Promise<globalThis.Invitation<import("@agoric/vow").Vow<string>, {
|
|
10
14
|
chainName: string;
|
|
11
|
-
denom: import("
|
|
15
|
+
denom: import("@agoric/orchestration").DenomArg;
|
|
12
16
|
}>>;
|
|
13
17
|
makeAccountAndGetBalancesQueryInvitation(): Promise<globalThis.Invitation<import("@agoric/vow").Vow<string>, {
|
|
14
18
|
chainName: string;
|
|
@@ -21,4 +25,7 @@ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: Orchestrati
|
|
|
21
25
|
export type QueryFlowsSF = typeof start;
|
|
22
26
|
import type { ZCF } from '@agoric/zoe';
|
|
23
27
|
import type { OrchestrationPowers } from '..//utils/start-helper.js';
|
|
28
|
+
import type { CosmosChainInfo } from '@agoric/orchestration';
|
|
29
|
+
import type { Denom } from '@agoric/orchestration';
|
|
30
|
+
import type { DenomDetail } from '@agoric/orchestration';
|
|
24
31
|
//# sourceMappingURL=query-flows.contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-flows.contract.d.ts","sourceRoot":"","sources":["query-flows.contract.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"query-flows.contract.d.ts","sourceRoot":"","sources":["query-flows.contract.js"],"names":[],"mappings":"AAmFA;gBA/DiB,UAAU;gBACV,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;gBAC/B,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE;;;;;;;;;;;;;;;;;;GA6DgB;2BAGjE,OAAO,KAAK;yBA5EJ,aAAa;yCAGG,2BAA2B;qCADX,uBAAuB;2BAAvB,uBAAuB;iCAAvB,uBAAuB"}
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
import { InvitationShape } from '@agoric/zoe/src/typeGuards.js';
|
|
5
5
|
import { M } from '@endo/patterns';
|
|
6
6
|
import { withOrchestration } from '../utils/start-helper.js';
|
|
7
|
+
import { registerChainsAndAssets } from '../utils/chain-hub-helper.js';
|
|
7
8
|
import * as flows from './query-flows.flows.js';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @import {ZCF} from '@agoric/zoe';
|
|
11
12
|
* @import {Zone} from '@agoric/zone';
|
|
13
|
+
* @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
|
|
12
14
|
* @import {OrchestrationPowers} from '..//utils/start-helper.js';
|
|
13
15
|
* @import {OrchestrationTools} from '../utils/start-helper.js';
|
|
14
16
|
*/
|
|
@@ -17,11 +19,18 @@ import * as flows from './query-flows.flows.js';
|
|
|
17
19
|
* @param {ZCF} zcf
|
|
18
20
|
* @param {OrchestrationPowers & {
|
|
19
21
|
* marshaller: Marshaller;
|
|
20
|
-
*
|
|
22
|
+
* chainInfo?: Record<string, CosmosChainInfo>;
|
|
23
|
+
* assetInfo?: [Denom, DenomDetail & { brandKey?: string }][];
|
|
24
|
+
* }} privateArgs
|
|
21
25
|
* @param {Zone} zone
|
|
22
26
|
* @param {OrchestrationTools} tools
|
|
23
27
|
*/
|
|
24
|
-
const contract = async (
|
|
28
|
+
const contract = async (
|
|
29
|
+
zcf,
|
|
30
|
+
privateArgs,
|
|
31
|
+
zone,
|
|
32
|
+
{ chainHub, orchestrateAll },
|
|
33
|
+
) => {
|
|
25
34
|
const orchFns = orchestrateAll(flows, {});
|
|
26
35
|
|
|
27
36
|
const publicFacet = zone.exo(
|
|
@@ -62,6 +71,13 @@ const contract = async (zcf, _privateArgs, zone, { orchestrateAll }) => {
|
|
|
62
71
|
},
|
|
63
72
|
);
|
|
64
73
|
|
|
74
|
+
registerChainsAndAssets(
|
|
75
|
+
chainHub,
|
|
76
|
+
zcf.getTerms().brands,
|
|
77
|
+
privateArgs.chainInfo,
|
|
78
|
+
privateArgs.assetInfo,
|
|
79
|
+
);
|
|
80
|
+
|
|
65
81
|
return { publicFacet };
|
|
66
82
|
};
|
|
67
83
|
|
|
@@ -4,8 +4,10 @@ import { prepareVowTools } from '@agoric/vow';
|
|
|
4
4
|
import { makeHeapZone } from '@agoric/zone';
|
|
5
5
|
import { E } from '@endo/far';
|
|
6
6
|
import { makeChainHub } from '../exos/chain-hub.js';
|
|
7
|
+
import { registerChainsAndAssets } from '../utils/chain-hub-helper.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
10
|
+
* @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
|
|
9
11
|
* @import {IBCConnectionID} from '@agoric/vats';
|
|
10
12
|
* @import {StakeIcaSF, StakeIcaTerms} from '../examples/stake-ica.contract';
|
|
11
13
|
*/
|
|
@@ -22,23 +24,32 @@ const trace = makeTracer('StartStakeAtom', true);
|
|
|
22
24
|
* };
|
|
23
25
|
* };
|
|
24
26
|
* }} powers
|
|
27
|
+
* @param {{
|
|
28
|
+
* options: {
|
|
29
|
+
* chainInfo: Record<string, CosmosChainInfo>;
|
|
30
|
+
* assetInfo: [Denom, DenomDetail & { brandKey?: string }][];
|
|
31
|
+
* };
|
|
32
|
+
* }} config
|
|
25
33
|
*/
|
|
26
|
-
export const startStakeAtom = async (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
export const startStakeAtom = async (
|
|
35
|
+
{
|
|
36
|
+
consume: {
|
|
37
|
+
agoricNames,
|
|
38
|
+
board,
|
|
39
|
+
chainStorage,
|
|
40
|
+
chainTimerService: timer,
|
|
41
|
+
cosmosInterchainService,
|
|
42
|
+
startUpgradable,
|
|
43
|
+
},
|
|
44
|
+
installation: {
|
|
45
|
+
consume: { stakeIca },
|
|
46
|
+
},
|
|
47
|
+
instance: {
|
|
48
|
+
produce: { stakeAtom: produceInstance },
|
|
49
|
+
},
|
|
40
50
|
},
|
|
41
|
-
|
|
51
|
+
{ options: { chainInfo, assetInfo } },
|
|
52
|
+
) => {
|
|
42
53
|
const VSTORAGE_PATH = 'stakeAtom';
|
|
43
54
|
trace('startStakeAtom');
|
|
44
55
|
await null;
|
|
@@ -54,6 +65,8 @@ export const startStakeAtom = async ({
|
|
|
54
65
|
vt,
|
|
55
66
|
);
|
|
56
67
|
|
|
68
|
+
registerChainsAndAssets(chainHub, {}, chainInfo, assetInfo);
|
|
69
|
+
|
|
57
70
|
const [_, cosmoshub, connectionInfo] = await vt.when(
|
|
58
71
|
chainHub.getChainsAndConnection('agoric', 'cosmoshub'),
|
|
59
72
|
);
|
|
@@ -86,7 +99,7 @@ harden(startStakeAtom);
|
|
|
86
99
|
|
|
87
100
|
export const getManifestForStakeAtom = (
|
|
88
101
|
{ restoreRef },
|
|
89
|
-
{ installKeys,
|
|
102
|
+
{ installKeys, options },
|
|
90
103
|
) => {
|
|
91
104
|
return {
|
|
92
105
|
manifest: {
|
|
@@ -4,8 +4,10 @@ import { prepareVowTools } from '@agoric/vow';
|
|
|
4
4
|
import { makeHeapZone } from '@agoric/zone';
|
|
5
5
|
import { E } from '@endo/far';
|
|
6
6
|
import { makeChainHub } from '../exos/chain-hub.js';
|
|
7
|
+
import { registerChainsAndAssets } from '../utils/chain-hub-helper.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
10
|
+
* @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
|
|
9
11
|
* @import {IBCConnectionID} from '@agoric/vats';
|
|
10
12
|
* @import {StakeIcaSF} from '../examples/stake-ica.contract';
|
|
11
13
|
*/
|
|
@@ -27,23 +29,32 @@ const trace = makeTracer('StartStakeOsmo', true);
|
|
|
27
29
|
* };
|
|
28
30
|
* };
|
|
29
31
|
* }} powers
|
|
32
|
+
* @param {{
|
|
33
|
+
* options: {
|
|
34
|
+
* chainInfo: Record<string, CosmosChainInfo>;
|
|
35
|
+
* assetInfo: [Denom, DenomDetail & { brandKey?: string }][];
|
|
36
|
+
* };
|
|
37
|
+
* }} config
|
|
30
38
|
*/
|
|
31
|
-
export const startStakeOsmo = async (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
export const startStakeOsmo = async (
|
|
40
|
+
{
|
|
41
|
+
consume: {
|
|
42
|
+
agoricNames,
|
|
43
|
+
board,
|
|
44
|
+
chainStorage,
|
|
45
|
+
chainTimerService: timer,
|
|
46
|
+
cosmosInterchainService,
|
|
47
|
+
startUpgradable,
|
|
48
|
+
},
|
|
49
|
+
installation: {
|
|
50
|
+
consume: { stakeIca },
|
|
51
|
+
},
|
|
52
|
+
instance: {
|
|
53
|
+
produce: { stakeOsmo: produceInstance },
|
|
54
|
+
},
|
|
45
55
|
},
|
|
46
|
-
|
|
56
|
+
{ options: { chainInfo, assetInfo } },
|
|
57
|
+
) => {
|
|
47
58
|
const VSTORAGE_PATH = 'stakeOsmo';
|
|
48
59
|
trace('startStakeOsmo');
|
|
49
60
|
await null;
|
|
@@ -59,6 +70,8 @@ export const startStakeOsmo = async ({
|
|
|
59
70
|
vt,
|
|
60
71
|
);
|
|
61
72
|
|
|
73
|
+
registerChainsAndAssets(chainHub, {}, chainInfo, assetInfo);
|
|
74
|
+
|
|
62
75
|
const [_, osmosis, connectionInfo] = await vt.when(
|
|
63
76
|
chainHub.getChainsAndConnection('agoric', 'osmosis'),
|
|
64
77
|
);
|
|
@@ -91,7 +104,7 @@ harden(startStakeOsmo);
|
|
|
91
104
|
|
|
92
105
|
export const getManifestForStakeOsmo = (
|
|
93
106
|
{ restoreRef },
|
|
94
|
-
{ installKeys,
|
|
107
|
+
{ installKeys, options },
|
|
95
108
|
) => {
|
|
96
109
|
return {
|
|
97
110
|
manifest: {
|