@agoric/orchestration 0.1.1-dev-c9ce088.0 → 0.1.1-dev-813e54c.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/orchestration",
3
- "version": "0.1.1-dev-c9ce088.0+c9ce088",
3
+ "version": "0.1.1-dev-813e54c.0+813e54c",
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-c9ce088.0+c9ce088",
37
- "@agoric/cosmic-proto": "0.4.1-dev-c9ce088.0+c9ce088",
38
- "@agoric/ertp": "0.16.3-dev-c9ce088.0+c9ce088",
39
- "@agoric/internal": "0.3.3-dev-c9ce088.0+c9ce088",
40
- "@agoric/network": "0.1.1-dev-c9ce088.0+c9ce088",
41
- "@agoric/notifier": "0.6.3-dev-c9ce088.0+c9ce088",
42
- "@agoric/store": "0.9.3-dev-c9ce088.0+c9ce088",
43
- "@agoric/time": "0.3.3-dev-c9ce088.0+c9ce088",
44
- "@agoric/vat-data": "0.5.3-dev-c9ce088.0+c9ce088",
45
- "@agoric/vats": "0.15.2-dev-c9ce088.0+c9ce088",
46
- "@agoric/vow": "0.1.1-dev-c9ce088.0+c9ce088",
47
- "@agoric/zoe": "0.26.3-dev-c9ce088.0+c9ce088",
48
- "@agoric/zone": "0.2.3-dev-c9ce088.0+c9ce088",
36
+ "@agoric/async-flow": "0.1.1-dev-813e54c.0+813e54c",
37
+ "@agoric/cosmic-proto": "0.4.1-dev-813e54c.0+813e54c",
38
+ "@agoric/ertp": "0.16.3-dev-813e54c.0+813e54c",
39
+ "@agoric/internal": "0.3.3-dev-813e54c.0+813e54c",
40
+ "@agoric/network": "0.1.1-dev-813e54c.0+813e54c",
41
+ "@agoric/notifier": "0.6.3-dev-813e54c.0+813e54c",
42
+ "@agoric/store": "0.9.3-dev-813e54c.0+813e54c",
43
+ "@agoric/time": "0.3.3-dev-813e54c.0+813e54c",
44
+ "@agoric/vat-data": "0.5.3-dev-813e54c.0+813e54c",
45
+ "@agoric/vats": "0.15.2-dev-813e54c.0+813e54c",
46
+ "@agoric/vow": "0.1.1-dev-813e54c.0+813e54c",
47
+ "@agoric/zoe": "0.26.3-dev-813e54c.0+813e54c",
48
+ "@agoric/zone": "0.2.3-dev-813e54c.0+813e54c",
49
49
  "@endo/base64": "^1.0.7",
50
50
  "@endo/errors": "^1.2.5",
51
51
  "@endo/far": "^1.1.5",
@@ -54,7 +54,7 @@
54
54
  "@noble/hashes": "^1.5.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@agoric/swingset-liveslots": "0.10.3-dev-c9ce088.0+c9ce088",
57
+ "@agoric/swingset-liveslots": "0.10.3-dev-813e54c.0+813e54c",
58
58
  "@chain-registry/client": "^1.47.4",
59
59
  "@cosmjs/amino": "^0.32.3",
60
60
  "@cosmjs/proto-signing": "^0.32.3",
@@ -94,5 +94,5 @@
94
94
  "typeCoverage": {
95
95
  "atLeast": 97.3
96
96
  },
97
- "gitHead": "c9ce08800ded20a0dc4039b64f470cafbbd96277"
97
+ "gitHead": "813e54cca3ee175be6251ecc55336c2ef6f8a26b"
98
98
  }
@@ -1 +1 @@
1
- {"version":3,"file":"send-anywhere.contract.d.ts","sourceRoot":"","sources":["send-anywhere.contract.js"],"names":[],"mappings":"AAUA;;;;GAIG;AAEH,qEAKE;AAaK,8BAPI,GAAG,eACH,mBAAmB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,QACO,IAAI,oDACJ,kBAAkB;;;;;;;;;;;GA8C5B;AAGD;gBApDiB,UAAU;;;;;;;;;;;;;;;;;;;GAoDsB;yCApES,0BAA0B;0BAD7D,cAAc;wCACqB,0BAA0B;yBAF9D,aAAa"}
1
+ {"version":3,"file":"send-anywhere.contract.d.ts","sourceRoot":"","sources":["send-anywhere.contract.js"],"names":[],"mappings":"AASA;;;;GAIG;AAEH,qEAKE;AAaK,8BAPI,GAAG,eACH,mBAAmB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,QACO,IAAI,oDACJ,kBAAkB;;;;;;;;;;;GAsD5B;AAGD;gBA5DiB,UAAU;;;;;;;;;;;;;;;;;;;GA4DsB;yCA5ES,0BAA0B;0BAD7D,cAAc;wCACqB,0BAA0B;yBAF9D,aAAa"}
@@ -1,5 +1,3 @@
1
- import { makeSharedStateRecord } from '@agoric/async-flow';
2
-
3
1
  import { InvitationShape } from '@agoric/zoe/src/typeGuards.js';
4
2
  import { E } from '@endo/far';
5
3
  import { M } from '@endo/patterns';
@@ -7,6 +5,7 @@ import { prepareChainHubAdmin } from '../exos/chain-hub-admin.js';
7
5
  import { AnyNatAmountShape } from '../typeGuards.js';
8
6
  import { withOrchestration } from '../utils/start-helper.js';
9
7
  import * as flows from './send-anywhere.flows.js';
8
+ import * as sharedFlows from './shared.flows.js';
10
9
 
11
10
  /**
12
11
  * @import {Vow} from '@agoric/vow';
@@ -38,12 +37,6 @@ export const contract = async (
38
37
  zone,
39
38
  { chainHub, orchestrateAll, vowTools, zoeTools },
40
39
  ) => {
41
- const contractState = makeSharedStateRecord(
42
- /** @type {{ account: OrchestrationAccount<any> | undefined }} */ {
43
- localAccount: undefined,
44
- },
45
- );
46
-
47
40
  const creatorFacet = prepareChainHubAdmin(zone, chainHub);
48
41
 
49
42
  // UNTIL https://github.com/Agoric/agoric-sdk/issues/9066
@@ -51,10 +44,24 @@ export const contract = async (
51
44
  /** @type {(msg: string) => Vow<void>} */
52
45
  const log = msg => vowTools.watch(E(logNode).setValue(msg));
53
46
 
47
+ const { makeLocalAccount } = orchestrateAll(sharedFlows, {});
48
+ /**
49
+ * Setup a shared local account for use in async-flow functions. Typically,
50
+ * exo initState functions need to resolve synchronously, but `makeOnce`
51
+ * allows us to provide a Promise. When using this inside a flow, we must
52
+ * await it to ensure the account is available for use.
53
+ *
54
+ * @type {any} sharedLocalAccountP expects a Promise but this is a vow
55
+ * https://github.com/Agoric/agoric-sdk/issues/9822
56
+ */
57
+ const sharedLocalAccountP = zone.makeOnce('localAccount', () =>
58
+ makeLocalAccount(),
59
+ );
60
+
54
61
  // orchestrate uses the names on orchestrationFns to do a "prepare" of the associated behavior
55
62
  const orchFns = orchestrateAll(flows, {
56
- contractState,
57
63
  log,
64
+ sharedLocalAccountP,
58
65
  zoeTools,
59
66
  });
60
67
 
@@ -1,7 +1,5 @@
1
- export function sendIt(orch: Orchestrator, { contractState, log, zoeTools: { localTransfer, withdrawToSeat } }: {
2
- contractState: {
3
- localAccount?: OrchestrationAccountI & LocalAccountMethods;
4
- };
1
+ export function sendIt(orch: Orchestrator, { sharedLocalAccountP, log, zoeTools: { localTransfer, withdrawToSeat } }: {
2
+ sharedLocalAccountP: Promise<GuestInterface<LocalOrchestrationAccountKit["holder"]>>;
5
3
  zoeTools: GuestInterface<ZoeTools>;
6
4
  log: GuestOf<(msg: string) => Vow<void>>;
7
5
  }, seat: ZCFSeat, offerArgs: {
@@ -9,10 +7,9 @@ export function sendIt(orch: Orchestrator, { contractState, log, zoeTools: { loc
9
7
  destAddr: string;
10
8
  }): Promise<void>;
11
9
  import type { Orchestrator } from '../types.js';
12
- import type { OrchestrationAccountI } from '../types.js';
13
- import type { LocalAccountMethods } from '../types.js';
14
- import type { ZoeTools } from '../utils/zoe-tools.js';
10
+ import type { LocalOrchestrationAccountKit } from '../exos/local-orchestration-account.js';
15
11
  import type { GuestInterface } from '@agoric/async-flow';
12
+ import type { ZoeTools } from '../utils/zoe-tools.js';
16
13
  import type { Vow } from '@agoric/vow';
17
14
  import type { GuestOf } from '@agoric/async-flow';
18
15
  //# sourceMappingURL=send-anywhere.flows.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"send-anywhere.flows.d.ts","sourceRoot":"","sources":["send-anywhere.flows.js"],"names":[],"mappings":"AA0BO,6BARI,YAAY,uEAEpB;IAA4E,aAAa,EAAjF;QAAE,YAAY,CAAC,EAAE,qBAAqB,GAAG,mBAAmB,CAAA;KAAE;IAChC,QAAQ,EAAtC,eAAe,QAAQ,CAAC;IACiB,GAAG,EAA5C,QAAQ,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC;CAC3C,QAAQ,OAAO,aACP;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,iBAyDjD;kCAzE6F,aAAa;2CAAb,aAAa;yCAAb,aAAa;8BADhF,uBAAuB;oCAFR,oBAAoB;yBACxC,aAAa;6BADO,oBAAoB"}
1
+ {"version":3,"file":"send-anywhere.flows.d.ts","sourceRoot":"","sources":["send-anywhere.flows.js"],"names":[],"mappings":"AA2BO,6BARI,YAAY,6EAEpB;IAA6E,mBAAmB,EAAxF,OAAO,CAAC,eAAe,4BAA4B,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjC,QAAQ,EAAtC,eAAe,QAAQ,CAAC;IACiB,GAAG,EAA5C,QAAQ,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC;CAC3C,QAAQ,OAAO,aACP;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,iBAyDjD;kCAzEsE,aAAa;kDAFrC,wCAAwC;oCAF7C,oBAAoB;8BAGnC,uBAAuB;yBAF5B,aAAa;6BADO,oBAAoB"}
@@ -5,8 +5,9 @@ import { M, mustMatch } from '@endo/patterns';
5
5
  /**
6
6
  * @import {GuestInterface, GuestOf} from '@agoric/async-flow';
7
7
  * @import {Vow} from '@agoric/vow';
8
+ * @import {LocalOrchestrationAccountKit} from '../exos/local-orchestration-account.js';
8
9
  * @import {ZoeTools} from '../utils/zoe-tools.js';
9
- * @import {Orchestrator, LocalAccountMethods, OrchestrationAccountI, OrchestrationFlow} from '../types.js';
10
+ * @import {Orchestrator, OrchestrationFlow, LocalAccountMethods} from '../types.js';
10
11
  */
11
12
 
12
13
  const { entries } = Object;
@@ -18,7 +19,7 @@ const { entries } = Object;
18
19
  * @satisfies {OrchestrationFlow}
19
20
  * @param {Orchestrator} orch
20
21
  * @param {object} ctx
21
- * @param {{ localAccount?: OrchestrationAccountI & LocalAccountMethods }} ctx.contractState
22
+ * @param {Promise<GuestInterface<LocalOrchestrationAccountKit['holder']>>} ctx.sharedLocalAccountP
22
23
  * @param {GuestInterface<ZoeTools>} ctx.zoeTools
23
24
  * @param {GuestOf<(msg: string) => Vow<void>>} ctx.log
24
25
  * @param {ZCFSeat} seat
@@ -26,7 +27,7 @@ const { entries } = Object;
26
27
  */
27
28
  export const sendIt = async (
28
29
  orch,
29
- { contractState, log, zoeTools: { localTransfer, withdrawToSeat } },
30
+ { sharedLocalAccountP, log, zoeTools: { localTransfer, withdrawToSeat } },
30
31
  seat,
31
32
  offerArgs,
32
33
  ) => {
@@ -44,23 +45,23 @@ export const sendIt = async (
44
45
  `${amt.brand} not registered in vbank`,
45
46
  );
46
47
 
47
- // FIXME racy
48
- if (!contractState.localAccount) {
49
- contractState.localAccount = await agoric.makeAccount();
50
- }
51
-
52
48
  const chain = await orch.getChain(chainName);
53
49
  const info = await chain.getChainInfo();
54
50
  const { chainId } = info;
55
51
  assert(typeof chainId === 'string', 'bad chainId');
56
52
  void log(`got info for chain: ${chainName} ${chainId}`);
57
53
 
58
- await localTransfer(seat, contractState.localAccount, give);
54
+ /**
55
+ * @type {any} XXX methods returning vows
56
+ * https://github.com/Agoric/agoric-sdk/issues/9822
57
+ */
58
+ const sharedLocalAccount = await sharedLocalAccountP;
59
+ await localTransfer(seat, sharedLocalAccount, give);
59
60
 
60
61
  void log(`completed transfer to localAccount`);
61
62
 
62
63
  try {
63
- await contractState.localAccount.transfer(
64
+ await sharedLocalAccount.transfer(
64
65
  {
65
66
  value: destAddr,
66
67
  encoding: 'bech32',
@@ -70,7 +71,7 @@ export const sendIt = async (
70
71
  );
71
72
  void log(`completed transfer to ${destAddr}`);
72
73
  } catch (e) {
73
- await withdrawToSeat(contractState.localAccount, seat, give);
74
+ await withdrawToSeat(sharedLocalAccount, seat, give);
74
75
  const errorMsg = `IBC Transfer failed ${q(e)}`;
75
76
  void log(`ERROR: ${errorMsg}`);
76
77
  seat.exit(errorMsg);
@@ -0,0 +1,4 @@
1
+ export function makeLocalAccount(orch: Orchestrator): Promise<LocalAccountMethods>;
2
+ import type { Orchestrator } from '../types.js';
3
+ import type { LocalAccountMethods } from '../types.js';
4
+ //# sourceMappingURL=shared.flows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.flows.d.ts","sourceRoot":"","sources":["shared.flows.js"],"names":[],"mappings":"AAgBO,uCAHI,YAAY,GACV,OAAO,CAAC,mBAAmB,CAAC,CAKxC;kCAXsE,aAAa;yCAAb,aAAa"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @file Flows shared by multiple examples
3
+ *
4
+ * A module with flows can be used be reused across multiple contracts. They are
5
+ * bound to a particular contract's context via orchestrateAll. See
6
+ * ./send-anywhere.contract.js for example usage.
7
+ */
8
+ /**
9
+ * @import {Orchestrator, OrchestrationFlow, LocalAccountMethods} from '../types.js';
10
+ */
11
+
12
+ /**
13
+ * @satisfies {OrchestrationFlow}
14
+ * @param {Orchestrator} orch
15
+ * @returns {Promise<LocalAccountMethods>}
16
+ */
17
+ export const makeLocalAccount = async orch => {
18
+ const agoricChain = await orch.getChain('agoric');
19
+ return agoricChain.makeAccount();
20
+ };
21
+ harden(makeLocalAccount);
@@ -17,8 +17,8 @@ export function start(zcf: ZCF, privateArgs: {
17
17
  getPublicTopics(): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>>>>;
18
18
  delegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<Record<unknown, unknown>>;
19
19
  undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<void | import("@agoric/time").TimestampRecord>;
20
- deposit(payment: globalThis.ERef<globalThis.Payment<"nat">>, optAmountShape?: globalThis.Pattern): import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount | import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
21
- withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): import("@agoric/vow").Vow<globalThis.Payment<"nat"> | import("@agoric/vow").Vow<globalThis.Payment<"nat">>>;
20
+ deposit(payment: globalThis.Payment<"nat">): import("@agoric/vow").Vow<void>;
21
+ withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): import("@agoric/vow").Vow<globalThis.Payment<"nat">>;
22
22
  executeTx(messages: {
23
23
  '@type': string;
24
24
  }[]): import("@agoric/vow").Vow<{
@@ -34,7 +34,7 @@ export function start(zcf: ZCF, privateArgs: {
34
34
  resolver: import("@agoric/vow").VowResolver<any>;
35
35
  match: import("@agoric/vow").Vow<any>;
36
36
  }>>;
37
- monitorTransfers(tap: import("@agoric/vats/src/bridge-target.js").TargetApp): import("@agoric/vow").Vow<import("@agoric/vow").Vow<import("@agoric/vats/src/bridge-target.js").TargetRegistration> | import("@agoric/async-flow").HostInterface<import("@agoric/vats/src/bridge-target.js").TargetRegistration>>;
37
+ monitorTransfers(tap: import("@agoric/vats/src/bridge-target.js").TargetApp): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<import("@agoric/vats/src/bridge-target.js").TargetRegistration>>;
38
38
  }>>;
39
39
  /**
40
40
  * Invitation to make an account, without any funds
@@ -1 +1 @@
1
- {"version":3,"file":"stake-bld.contract.d.ts","sourceRoot":"","sources":["stake-bld.contract.js"],"names":[],"mappings":"AAoCO,2BAVI,GAAG,eACH;IACN,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;IAC7B,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,YAAY,CAAC;CAC5B,WACO,OAAO,kBAAkB,EAAE,OAAO;;QAsEvC;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA0BH;;WAEG;;;GAaR;6BAlIyB,cAAc;4BACf,kBAAkB;gCAEd,gCAAgC;kCAD9B,cAAc"}
1
+ {"version":3,"file":"stake-bld.contract.d.ts","sourceRoot":"","sources":["stake-bld.contract.js"],"names":[],"mappings":"AAoCO,2BAVI,GAAG,eACH;IACN,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;IAC7B,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,YAAY,CAAC;CAC5B,WACO,OAAO,kBAAkB,EAAE,OAAO;;QAsEvC;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA4BH;;WAEG;;;GAaR;6BApIyB,cAAc;4BACf,kBAAkB;gCAEd,gCAAgC;kCAD9B,cAAc"}
@@ -111,6 +111,8 @@ export const start = async (zcf, privateArgs, baggage) => {
111
111
  const { give } = seat.getProposal();
112
112
  trace('makeStakeBldInvitation', give);
113
113
  const { holder } = await makeLocalAccountKit();
114
+ /** @type {Record<string, Payment<'nat'>>} */
115
+ // @ts-expect-error XXX PaymentPKeywordRecord throught deeplyFulfilled will be a PaymnentKeywordRecord
114
116
  const { In } = await deeplyFulfilled(
115
117
  withdrawFromSeat(zcf, seat, give),
116
118
  );
@@ -1 +1 @@
1
- {"version":3,"file":"staking-combinations.contract.d.ts","sourceRoot":"","sources":["staking-combinations.contract.js"],"names":[],"mappings":"AA8JA;gBAzHiB,UAAU;;;;;;;;;;;;;;;;;;GAyHsB;yCA1IS,0BAA0B"}
1
+ {"version":3,"file":"staking-combinations.contract.d.ts","sourceRoot":"","sources":["staking-combinations.contract.js"],"names":[],"mappings":"AAkKA;gBA7HiB,UAAU;;;;;;;;;;;;;;;;;;GA6HsB;yCA9IS,0BAA0B"}
@@ -5,7 +5,6 @@
5
5
  * The primary offer result is a power for invitation makers that can perform
6
6
  * actions with an ICA account.
7
7
  */
8
- import { makeSharedStateRecord } from '@agoric/async-flow';
9
8
  import { AmountShape } from '@agoric/ertp';
10
9
  import { M } from '@endo/patterns';
11
10
  import { prepareCombineInvitationMakers } from '../exos/combine-invitation-makers.js';
@@ -13,6 +12,7 @@ import { CosmosOrchestrationInvitationMakersI } from '../exos/cosmos-orchestrati
13
12
  import { ChainAddressShape, DelegationShape } from '../typeGuards.js';
14
13
  import { withOrchestration } from '../utils/start-helper.js';
15
14
  import * as flows from './staking-combinations.flows.js';
15
+ import * as sharedFlows from './shared.flows.js';
16
16
  import { prepareChainHubAdmin } from '../exos/chain-hub-admin.js';
17
17
 
18
18
  /**
@@ -46,16 +46,6 @@ const contract = async (
46
46
  zone,
47
47
  { orchestrateAll, zoeTools, chainHub },
48
48
  ) => {
49
- const contractState = makeSharedStateRecord(
50
- /**
51
- * @type {{
52
- * account: (OrchestrationAccount<any> & LocalAccountMethods) | undefined;
53
- * }}
54
- */ {
55
- localAccount: undefined,
56
- },
57
- );
58
-
59
49
  const StakingCombinationsInvitationMakersI = M.interface(
60
50
  'StakingCombinationsInvitationMakersI',
61
51
  {
@@ -128,8 +118,22 @@ const contract = async (
128
118
  StakingCombinationsInvitationMakersI,
129
119
  );
130
120
 
121
+ const { makeLocalAccount } = orchestrateAll(sharedFlows, {});
122
+ /**
123
+ * Setup a shared local account for use in async-flow functions. Typically,
124
+ * exo initState functions need to resolve synchronously, but `makeOnce`
125
+ * allows us to provide a Promise. When using this inside a flow, we must
126
+ * await it to ensure the account is available for use.
127
+ *
128
+ * @type {any} sharedLocalAccountP expects a Promise but this is a vow
129
+ * https://github.com/Agoric/agoric-sdk/issues/9822
130
+ */
131
+ const sharedLocalAccountP = zone.makeOnce('localAccount', () =>
132
+ makeLocalAccount(),
133
+ );
134
+
131
135
  const orchFns = orchestrateAll(flows, {
132
- contractState,
136
+ sharedLocalAccountP,
133
137
  makeCombineInvitationMakers,
134
138
  makeExtraInvitationMaker,
135
139
  flows,
@@ -4,10 +4,8 @@ export function makeAccount(orch: Orchestrator, ctx: {
4
4
  }, _seat: ZCFSeat, { chainName }: {
5
5
  chainName: string;
6
6
  }): Promise<ResolvedContinuingOfferResult>;
7
- export function depositAndDelegate(orch: Orchestrator, { contractState, zoeTools }: {
8
- contractState: {
9
- localAccount?: OrchestrationAccountI & LocalAccountMethods;
10
- };
7
+ export function depositAndDelegate(orch: Orchestrator, { sharedLocalAccountP, zoeTools }: {
8
+ sharedLocalAccountP: Promise<GuestInterface<LocalOrchestrationAccountKit["holder"]>>;
11
9
  zoeTools: GuestInterface<ZoeTools>;
12
10
  }, account: GuestInterface<CosmosOrchestrationAccount>, seat: ZCFSeat, validator: CosmosValidatorAddress): Promise<void>;
13
11
  export function undelegateAndTransfer(orch: Orchestrator, ctx: object, account: GuestInterface<CosmosOrchestrationAccount>, { delegations, destination }: {
@@ -21,10 +19,9 @@ import type { Orchestrator } from '../types.js';
21
19
  import type { MakeCombineInvitationMakers } from '../exos/combine-invitation-makers.js';
22
20
  import type { InvitationMakers } from '@agoric/smart-wallet/src/types.js';
23
21
  import type { ResolvedContinuingOfferResult } from '../utils/zoe-tools.js';
24
- import type { OrchestrationAccountI } from '../types.js';
25
- import type { LocalAccountMethods } from '../types.js';
26
- import type { ZoeTools } from '../utils/zoe-tools.js';
22
+ import type { LocalOrchestrationAccountKit } from '../exos/local-orchestration-account.js';
27
23
  import type { GuestInterface } from '@agoric/async-flow';
24
+ import type { ZoeTools } from '../utils/zoe-tools.js';
28
25
  import type { CosmosOrchestrationAccount } from '../exos/cosmos-orchestration-account.js';
29
26
  import type { CosmosValidatorAddress } from '../types.js';
30
27
  import type { AmountArg } from '../types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"staking-combinations.flows.d.ts","sourceRoot":"","sources":["staking-combinations.flows.js"],"names":[],"mappings":"AA2BO,kCATI,YAAY,OACZ;IACN,2BAA2B,EAAE,2BAA2B,CAAC;IACzD,wBAAwB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,gBAAgB,CAAC;CAC9D,SACO,OAAO,iBACP;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GACnB,OAAO,CAAC,6BAA6B,CAAC,CAiBlD;AAcM,yCATI,YAAY,+BAEpB;IAA4E,aAAa,EAAjF;QAAE,YAAY,CAAC,EAAE,qBAAqB,GAAG,mBAAmB,CAAA;KAAE;IAChC,QAAQ,EAAtC,eAAe,QAAQ,CAAC;CAChC,WAAQ,eAAe,0BAA0B,CAAC,QAC1C,OAAO,aACP,sBAAsB,GACpB,OAAO,CAAC,IAAI,CAAC,CA8BzB;AAcM,4CATI,YAAY,OACZ,MAAM,WACN,eAAe,0BAA0B,CAAC,gCAC1C;IACN,WAAW,EAAE;QAAE,MAAM,EAAE,SAAS,CAAC;QAAC,SAAS,EAAE,sBAAsB,CAAA;KAAE,EAAE,CAAC;IACxE,WAAW,EAAE,YAAY,CAAC;CAC3B,GACS,OAAO,CAAC,IAAI,CAAC,CAYzB;kCA1G8I,aAAa;iDAE9G,sCAAsC;sCAD1B,mCAAmC;mDAGnC,uBAAuB;2CAJ8D,aAAa;yCAAb,aAAa;8BAIlG,uBAAuB;oCALhD,oBAAoB;gDAIR,yCAAyC;4CAHyD,aAAa;+BAAb,aAAa;kCAAb,aAAa"}
1
+ {"version":3,"file":"staking-combinations.flows.d.ts","sourceRoot":"","sources":["staking-combinations.flows.js"],"names":[],"mappings":"AA4BO,kCATI,YAAY,OACZ;IACN,2BAA2B,EAAE,2BAA2B,CAAC;IACzD,wBAAwB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,gBAAgB,CAAC;CAC9D,SACO,OAAO,iBACP;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GACnB,OAAO,CAAC,6BAA6B,CAAC,CAiBlD;AAcM,yCATI,YAAY,qCAEpB;IAA6E,mBAAmB,EAAxF,OAAO,CAAC,eAAe,4BAA4B,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjC,QAAQ,EAAtC,eAAe,QAAQ,CAAC;CAChC,WAAQ,eAAe,0BAA0B,CAAC,QAC1C,OAAO,aACP,sBAAsB,GACpB,OAAO,CAAC,IAAI,CAAC,CAgCzB;AAcM,4CATI,YAAY,OACZ,MAAM,WACN,eAAe,0BAA0B,CAAC,gCAC1C;IACN,WAAW,EAAE;QAAE,MAAM,EAAE,SAAS,CAAC;QAAC,SAAS,EAAE,sBAAsB,CAAA;KAAE,EAAE,CAAC;IACxE,WAAW,EAAE,YAAY,CAAC;CAC3B,GACS,OAAO,CAAC,IAAI,CAAC,CAYzB;kCA7G8I,aAAa;iDAG9G,sCAAsC;sCAF1B,mCAAmC;mDAInC,uBAAuB;kDAHlC,wCAAwC;oCAHtD,oBAAoB;8BAMK,uBAAuB;gDADpC,yCAAyC;4CAJyD,aAAa;+BAAb,aAAa;kCAAb,aAAa"}
@@ -2,6 +2,7 @@
2
2
  * @import {GuestInterface} from '@agoric/async-flow';
3
3
  * @import {Orchestrator, OrchestrationFlow, AmountArg, CosmosValidatorAddress, ChainAddress, LocalAccountMethods, OrchestrationAccountI} from '../types.js'
4
4
  * @import {ContinuingOfferResult, InvitationMakers} from '@agoric/smart-wallet/src/types.js';
5
+ * @import {LocalOrchestrationAccountKit} from '../exos/local-orchestration-account.js';
5
6
  * @import {MakeCombineInvitationMakers} from '../exos/combine-invitation-makers.js';
6
7
  * @import {CosmosOrchestrationAccount} from '../exos/cosmos-orchestration-account.js';
7
8
  * @import {ResolvedContinuingOfferResult, ZoeTools} from '../utils/zoe-tools.js';
@@ -47,7 +48,7 @@ harden(makeAccount);
47
48
  * @satisfies {OrchestrationFlow}
48
49
  * @param {Orchestrator} orch
49
50
  * @param {object} ctx
50
- * @param {{ localAccount?: OrchestrationAccountI & LocalAccountMethods }} ctx.contractState
51
+ * @param {Promise<GuestInterface<LocalOrchestrationAccountKit['holder']>>} ctx.sharedLocalAccountP
51
52
  * @param {GuestInterface<ZoeTools>} ctx.zoeTools
52
53
  * @param {GuestInterface<CosmosOrchestrationAccount>} account
53
54
  * @param {ZCFSeat} seat
@@ -56,7 +57,7 @@ harden(makeAccount);
56
57
  */
57
58
  export const depositAndDelegate = async (
58
59
  orch,
59
- { contractState, zoeTools },
60
+ { sharedLocalAccountP, zoeTools },
60
61
  account,
61
62
  seat,
62
63
  validator,
@@ -64,18 +65,20 @@ export const depositAndDelegate = async (
64
65
  await null;
65
66
  trace('depositAndDelegate', account, seat, validator);
66
67
  mustMatch(validator, ChainAddressShape);
67
- if (!contractState.localAccount) {
68
- const agoricChain = await orch.getChain('agoric');
69
- contractState.localAccount = await agoricChain.makeAccount();
70
- }
68
+
71
69
  const { give } = seat.getProposal();
72
- await zoeTools.localTransfer(seat, contractState.localAccount, give);
70
+ /**
71
+ * @type {any} XXX methods returning vows
72
+ * https://github.com/Agoric/agoric-sdk/issues/9822
73
+ */
74
+ const sharedLocalAccount = await sharedLocalAccountP;
75
+ await zoeTools.localTransfer(seat, sharedLocalAccount, give);
73
76
 
74
77
  const address = account.getAddress();
75
78
  try {
76
- await contractState.localAccount.transfer(address, give.Stake);
79
+ await sharedLocalAccount.transfer(address, give.Stake);
77
80
  } catch (cause) {
78
- await zoeTools.withdrawToSeat(contractState.localAccount, seat, give);
81
+ await zoeTools.withdrawToSeat(sharedLocalAccount, seat, give);
79
82
  const errMsg = makeError(`ibc transfer failed ${q(cause)}`);
80
83
  seat.exit(errMsg);
81
84
  throw errMsg;
@@ -205,7 +205,7 @@ export const makeChainHub = (zone, agoricNames, vowTools) => {
205
205
  valueShape: M.string(),
206
206
  });
207
207
 
208
- const lookupChainInfo = vowTools.retriable(
208
+ const lookupChainInfo = vowTools.retryable(
209
209
  zone,
210
210
  'lookupChainInfo',
211
211
  /** @param {string} chainName */
@@ -227,7 +227,7 @@ export const makeChainHub = (zone, agoricNames, vowTools) => {
227
227
  },
228
228
  );
229
229
 
230
- const lookupConnectionInfo = vowTools.retriable(
230
+ const lookupConnectionInfo = vowTools.retryable(
231
231
  zone,
232
232
  'lookupConnectionInfo',
233
233
  /**
@@ -258,7 +258,7 @@ export const makeChainHub = (zone, agoricNames, vowTools) => {
258
258
  );
259
259
 
260
260
  /* eslint-disable no-use-before-define -- chainHub defined below */
261
- const lookupChainsAndConnection = vowTools.retriable(
261
+ const lookupChainsAndConnection = vowTools.retryable(
262
262
  zone,
263
263
  'lookupChainsAndConnection',
264
264
  /**
@@ -171,10 +171,10 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
171
171
  * updater will get a special notification that the account is being
172
172
  * transferred.
173
173
  */
174
- /** @type {HostOf<LocalChainAccount['deposit']>} */
175
- deposit(payment: globalThis.ERef<globalThis.Payment<"nat">>, optAmountShape?: globalThis.Pattern): Vow<import("@agoric/ertp/src/types.js").NatAmount | Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
176
- /** @type {HostOf<LocalChainAccount['withdraw']>} */
177
- withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): Vow<globalThis.Payment<"nat"> | Vow<globalThis.Payment<"nat">>>;
174
+ /** @type {HostOf<LocalAccountMethods['deposit']>} */
175
+ deposit(payment: globalThis.Payment<"nat">): Vow<void>;
176
+ /** @type {HostOf<LocalAccountMethods['withdraw']>} */
177
+ withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): Vow<globalThis.Payment<"nat">>;
178
178
  /** @type {HostOf<LocalChainAccount['executeTx']>} */
179
179
  executeTx(messages: {
180
180
  '@type': string;
@@ -214,8 +214,8 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
214
214
  resolver: import("@agoric/vow").VowResolver<any>;
215
215
  match: Vow<any>;
216
216
  }>>;
217
- /** @type {HostOf<LocalChainAccount['monitorTransfers']>} */
218
- monitorTransfers(tap: import("@agoric/vats/src/bridge-target.js").TargetApp): Vow<Vow<import("@agoric/vats/src/bridge-target.js").TargetRegistration> | import("@agoric/async-flow").HostInterface<import("@agoric/vats/src/bridge-target.js").TargetRegistration>>;
217
+ /** @type {HostOf<LocalAccountMethods['monitorTransfers']>} */
218
+ monitorTransfers(tap: import("@agoric/vats/src/bridge-target.js").TargetApp): Vow<import("@agoric/async-flow").HostInterface<import("@agoric/vats/src/bridge-target.js").TargetRegistration>>;
219
219
  };
220
220
  }>;
221
221
  export type LocalChainAccountNotification = {
@@ -1 +1 @@
1
- {"version":3,"file":"local-orchestration-account.d.ts","sourceRoot":"","sources":["local-orchestration-account.js"],"names":[],"mappings":"AAiGO,0DAVI,IAAI,qFAEZ;IAAgC,eAAe,EAAvC,eAAe;IACH,GAAG,EAAf,GAAG;IAC0B,YAAY,EAAzC,OAAO,YAAY,CAAC;IACH,QAAQ,EAAzB,QAAQ;IACS,QAAQ,EAAzB,QAAQ;IACmB,UAAU,EAArC,OAAO,UAAU,CAAC;IACD,QAAQ,EAAzB,QAAQ;CAClB;aAsFc,iBAAiB;aACjB,YAAY;iBACZ,OAAO,WAAW,CAAC;;;QAc1B;;;WAGG;6BAFQ,SAAS,GACP,IAAI;;;QAOjB;;;WAGG;mCAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;;QAiCxB;;;WAGG;qCAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;;;uBAmBJ,YAAY;oBAAU,SAAS;;;uBAa/B,YAAY;qBAAW,SAAS,EAAE;;;oBAcrC,SAAS;yBACJ,YAAY;mBAClB,qBAAqB;;;;;QAmCrC;;;;;;WAMG;8BALQ,CACV,SACA,UAAgB,+CAA+C,CAAC,CAC3D,CACF;;;QAcJ;;;;;;;;;;WAUG;6DATQ,CACV;YAAM,eAAe,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;SAAE,EAC7D,MAAU,CACP,iCACO;YACN,WAAW,EAAE,YAAY,CAAC;YAC1B,IAAI,CAAC,EAAE,qBAAqB,CAAC;YAC7B,MAAM,EAA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0qBU,UAAU,CAAC,OAAO,mCAAmC,CAAC;2CACtD,UAAU,CAAC,gCAAgC,CAAC;0BA1sBnC,cAAc;qCADU,6CAA6C;kCAI5C,cAAc;4BAFrC,kBAAkB;8BAGX,aAAa;8BAIlB,gBAAgB;gCAXK,gCAAgC;8BAarD,uBAAuB;uCAbF,gCAAgC;kCAC6D,uBAAuB;+BAAvB,uBAAuB;0BAQ7I,kDAAkD;yBAFzC,aAAa;qCADG,cAAc;2CAL+E,uBAAuB;+BAOlH,sBAAsB;8BAAtB,sBAAsB;uCAPqE,uBAAuB;iCAAvB,uBAAuB;gCAOlH,sBAAsB;iCANzB,6CAA6C;iCAU9D,mBAAmB"}
@@ -28,7 +28,7 @@ import { coerceCoin, coerceDenomAmount } from '../utils/amounts.js';
28
28
  /**
29
29
  * @import {HostOf} from '@agoric/async-flow';
30
30
  * @import {LocalChain, LocalChainAccount} from '@agoric/vats/src/localchain.js';
31
- * @import {AmountArg, ChainAddress, DenomAmount, IBCMsgTransferOptions, IBCConnectionInfo, OrchestrationAccountI} from '@agoric/orchestration';
31
+ * @import {AmountArg, ChainAddress, DenomAmount, IBCMsgTransferOptions, IBCConnectionInfo, OrchestrationAccountI, LocalAccountMethods} from '@agoric/orchestration';
32
32
  * @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'.
33
33
  * @import {Zone} from '@agoric/zone';
34
34
  * @import {Remote} from '@agoric/internal';
@@ -613,14 +613,14 @@ export const prepareLocalOrchestrationAccountKit = (
613
613
  * updater will get a special notification that the account is being
614
614
  * transferred.
615
615
  */
616
- /** @type {HostOf<LocalChainAccount['deposit']>} */
616
+ /** @type {HostOf<LocalAccountMethods['deposit']>} */
617
617
  deposit(payment) {
618
618
  return watch(
619
619
  E(this.state.account).deposit(payment),
620
620
  this.facets.returnVoidWatcher,
621
621
  );
622
622
  },
623
- /** @type {HostOf<LocalChainAccount['withdraw']>} */
623
+ /** @type {HostOf<LocalAccountMethods['withdraw']>} */
624
624
  withdraw(amount) {
625
625
  return watch(E(this.state.account).withdraw(amount));
626
626
  },
@@ -733,7 +733,7 @@ export const prepareLocalOrchestrationAccountKit = (
733
733
  matchFirstPacket(patternV) {
734
734
  return watch(E(this.state.packetTools).matchFirstPacket(patternV));
735
735
  },
736
- /** @type {HostOf<LocalChainAccount['monitorTransfers']>} */
736
+ /** @type {HostOf<LocalAccountMethods['monitorTransfers']>} */
737
737
  monitorTransfers(tap) {
738
738
  return watch(E(this.state.packetTools).monitorTransfers(tap));
739
739
  },
@@ -17,8 +17,8 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
17
17
  getPublicTopics(): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>>>>;
18
18
  delegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<Record<unknown, unknown>>;
19
19
  undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<void | import("@agoric/time").TimestampRecord>;
20
- deposit(payment: globalThis.ERef<globalThis.Payment<"nat">>, optAmountShape?: globalThis.Pattern): import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount | import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
21
- withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): import("@agoric/vow").Vow<globalThis.Payment<"nat"> | import("@agoric/vow").Vow<globalThis.Payment<"nat">>>;
20
+ deposit(payment: globalThis.Payment<"nat">): import("@agoric/vow").Vow<void>;
21
+ withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): import("@agoric/vow").Vow<globalThis.Payment<"nat">>;
22
22
  executeTx(messages: {
23
23
  '@type': string;
24
24
  }[]): import("@agoric/vow").Vow<{
@@ -34,7 +34,7 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
34
34
  resolver: import("@agoric/vow").VowResolver<any>;
35
35
  match: import("@agoric/vow").Vow<any>;
36
36
  }>>;
37
- monitorTransfers(tap: import("@agoric/vats/src/bridge-target.js").TargetApp): import("@agoric/vow").Vow<import("@agoric/vow").Vow<import("@agoric/vats/src/bridge-target.js").TargetRegistration> | import("@agoric/async-flow").HostInterface<import("@agoric/vats/src/bridge-target.js").TargetRegistration>>;
37
+ monitorTransfers(tap: import("@agoric/vats/src/bridge-target.js").TargetApp): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<import("@agoric/vats/src/bridge-target.js").TargetRegistration>>;
38
38
  }>>;
39
39
  makeAccountInvitationMaker(): Promise<Invitation<import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult>>, undefined>>;
40
40
  }>;
@@ -80,7 +80,7 @@ export const makeZoeTools = (zcf, { when, allVows, allSettled, asVow }) => {
80
80
  // const { zcfSeat: tempSeat, userSeat: userSeatP } =
81
81
  // zcf.makeEmptySeatKit();
82
82
  // const uSeat = await userSeatP;
83
- // // TODO how do I store in the place for this retriable?
83
+ // // TODO how do I store in the place for this retryable?
84
84
  // atomicTransfer(zcf, srcSeat, tempSeat, amounts);
85
85
  // tempSeat.exit();
86
86
  // return uSeat;