@agoric/orchestration 0.1.1-dev-9d7a377.0 → 0.1.1-dev-d54b98a.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/README.md +2 -1
- package/package.json +14 -14
- package/src/{contracts → examples}/stakeAtom.contract.js +3 -3
- package/src/{contracts → examples}/stakeBld.contract.js +3 -3
- package/src/{contracts/localchainAccountHolder.js → exos/localchainAccountKit.js} +2 -1
- package/src/{contracts/stakingAccountHolder.js → exos/stakingAccountKit.js} +4 -3
- package/src/proposals/start-stakeAtom.js +2 -2
- package/src/proposals/start-stakeBld.js +2 -2
- /package/src/{contracts → examples}/swapExample.contract.js +0 -0
- /package/src/{contracts → examples}/unbondExample.contract.js +0 -0
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Orchestration
|
|
2
2
|
|
|
3
|
+
Build feature-rich applications that can orchestrate assets and services across the interchain.
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
Usage examples can be found under [src/examples](https://github.com/Agoric/agoric-sdk/tree/master/packages/orchestration/src/examples). They are exported for integration testing with other packages.
|
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-d54b98a.0+d54b98a",
|
|
4
4
|
"description": "Chain abstraction for Agoric's orchestration clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@agoric/assert": "0.6.1-dev-
|
|
33
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
34
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
35
|
-
"@agoric/internal": "0.3.3-dev-
|
|
36
|
-
"@agoric/network": "0.1.1-dev-
|
|
37
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
38
|
-
"@agoric/store": "0.9.3-dev-
|
|
39
|
-
"@agoric/time": "0.3.3-dev-
|
|
40
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
41
|
-
"@agoric/vats": "0.15.2-dev-
|
|
42
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
43
|
-
"@agoric/zone": "0.2.3-dev-
|
|
32
|
+
"@agoric/assert": "0.6.1-dev-d54b98a.0+d54b98a",
|
|
33
|
+
"@agoric/cosmic-proto": "0.4.1-dev-d54b98a.0+d54b98a",
|
|
34
|
+
"@agoric/ertp": "0.16.3-dev-d54b98a.0+d54b98a",
|
|
35
|
+
"@agoric/internal": "0.3.3-dev-d54b98a.0+d54b98a",
|
|
36
|
+
"@agoric/network": "0.1.1-dev-d54b98a.0+d54b98a",
|
|
37
|
+
"@agoric/notifier": "0.6.3-dev-d54b98a.0+d54b98a",
|
|
38
|
+
"@agoric/store": "0.9.3-dev-d54b98a.0+d54b98a",
|
|
39
|
+
"@agoric/time": "0.3.3-dev-d54b98a.0+d54b98a",
|
|
40
|
+
"@agoric/vat-data": "0.5.3-dev-d54b98a.0+d54b98a",
|
|
41
|
+
"@agoric/vats": "0.15.2-dev-d54b98a.0+d54b98a",
|
|
42
|
+
"@agoric/zoe": "0.26.3-dev-d54b98a.0+d54b98a",
|
|
43
|
+
"@agoric/zone": "0.2.3-dev-d54b98a.0+d54b98a",
|
|
44
44
|
"@endo/base64": "^1.0.4",
|
|
45
45
|
"@endo/far": "^1.1.1",
|
|
46
46
|
"@endo/marshal": "^1.4.1",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"typeCoverage": {
|
|
83
83
|
"atLeast": 96.39
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "d54b98a4d2633c51f42d1c177ab5dbce0dfe79c6"
|
|
86
86
|
}
|
|
@@ -7,7 +7,7 @@ import { makeDurableZone } from '@agoric/zone/durable.js';
|
|
|
7
7
|
import { V as E } from '@agoric/vat-data/vow.js';
|
|
8
8
|
import { M } from '@endo/patterns';
|
|
9
9
|
import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport';
|
|
10
|
-
import {
|
|
10
|
+
import { prepareStakingAccountKit } from '../exos/stakingAccountKit.js';
|
|
11
11
|
|
|
12
12
|
const trace = makeTracer('StakeAtom');
|
|
13
13
|
/**
|
|
@@ -41,7 +41,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
41
41
|
|
|
42
42
|
const { makeRecorderKit } = prepareRecorderKitMakers(baggage, marshaller);
|
|
43
43
|
|
|
44
|
-
const
|
|
44
|
+
const makeStakingAccountKit = prepareStakingAccountKit(
|
|
45
45
|
baggage,
|
|
46
46
|
makeRecorderKit,
|
|
47
47
|
zcf,
|
|
@@ -54,7 +54,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
54
54
|
);
|
|
55
55
|
const accountAddress = await E(account).getAccountAddress();
|
|
56
56
|
trace('account address', accountAddress);
|
|
57
|
-
const { holder, invitationMakers } =
|
|
57
|
+
const { holder, invitationMakers } = makeStakingAccountKit(
|
|
58
58
|
account,
|
|
59
59
|
storageNode,
|
|
60
60
|
accountAddress,
|
|
@@ -10,7 +10,7 @@ import { M } from '@endo/patterns';
|
|
|
10
10
|
import { E } from '@endo/far';
|
|
11
11
|
import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
12
12
|
import { atomicTransfer } from '@agoric/zoe/src/contractSupport/atomicTransfer.js';
|
|
13
|
-
import {
|
|
13
|
+
import { prepareLocalchainAccountKit } from '../exos/localchainAccountKit.js';
|
|
14
14
|
|
|
15
15
|
const trace = makeTracer('StakeBld');
|
|
16
16
|
|
|
@@ -35,7 +35,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
35
35
|
baggage,
|
|
36
36
|
privateArgs.marshaller,
|
|
37
37
|
);
|
|
38
|
-
const
|
|
38
|
+
const makeLocalchainAccountKit = prepareLocalchainAccountKit(
|
|
39
39
|
baggage,
|
|
40
40
|
makeRecorderKit,
|
|
41
41
|
zcf,
|
|
@@ -56,7 +56,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
56
56
|
await E(lcaSeatKit.userSeat).tryExit();
|
|
57
57
|
trace('awaiting payouts');
|
|
58
58
|
const payouts = await E(lcaSeatKit.userSeat).getPayouts();
|
|
59
|
-
const { holder, invitationMakers } =
|
|
59
|
+
const { holder, invitationMakers } = makeLocalchainAccountKit(
|
|
60
60
|
account,
|
|
61
61
|
privateArgs.storageNode,
|
|
62
62
|
);
|
|
@@ -40,7 +40,7 @@ const PUBLIC_TOPICS = {
|
|
|
40
40
|
* @param {import('@agoric/zoe/src/contractSupport/recorder.js').MakeRecorderKit} makeRecorderKit
|
|
41
41
|
* @param {ZCF} zcf
|
|
42
42
|
*/
|
|
43
|
-
export const
|
|
43
|
+
export const prepareLocalchainAccountKit = (baggage, makeRecorderKit, zcf) => {
|
|
44
44
|
const makeAccountHolderKit = prepareExoClassKit(
|
|
45
45
|
baggage,
|
|
46
46
|
'Account Holder',
|
|
@@ -152,3 +152,4 @@ export const prepareAccountHolder = (baggage, makeRecorderKit, zcf) => {
|
|
|
152
152
|
);
|
|
153
153
|
return makeAccountHolderKit;
|
|
154
154
|
};
|
|
155
|
+
/** @typedef {ReturnType<ReturnType<typeof prepareLocalchainAccountKit>>} LocalchainAccountKit */
|
|
@@ -54,8 +54,8 @@ const PUBLIC_TOPICS = {
|
|
|
54
54
|
* @param {MakeRecorderKit} makeRecorderKit
|
|
55
55
|
* @param {ZCF} zcf
|
|
56
56
|
*/
|
|
57
|
-
export const
|
|
58
|
-
const
|
|
57
|
+
export const prepareStakingAccountKit = (baggage, makeRecorderKit, zcf) => {
|
|
58
|
+
const makeStakingAccountKit = prepareExoClassKit(
|
|
59
59
|
baggage,
|
|
60
60
|
'Staking Account Holder',
|
|
61
61
|
{
|
|
@@ -193,5 +193,6 @@ export const prepareStakingAccountHolder = (baggage, makeRecorderKit, zcf) => {
|
|
|
193
193
|
},
|
|
194
194
|
},
|
|
195
195
|
);
|
|
196
|
-
return
|
|
196
|
+
return makeStakingAccountKit;
|
|
197
197
|
};
|
|
198
|
+
/** @typedef {ReturnType<ReturnType<typeof prepareStakingAccountKit>>} StakingAccountKit */
|
|
@@ -3,12 +3,12 @@ import { makeTracer } from '@agoric/internal';
|
|
|
3
3
|
import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js';
|
|
4
4
|
import { E } from '@endo/far';
|
|
5
5
|
|
|
6
|
-
/** @import { StakeAtomSF, StakeAtomTerms} from '../
|
|
6
|
+
/** @import { StakeAtomSF, StakeAtomTerms} from '../examples/stakeAtom.contract' */
|
|
7
7
|
|
|
8
8
|
const trace = makeTracer('StartStakeAtom', true);
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* @param {BootstrapPowers & { installation: {consume: {stakeAtom: Installation<import('../
|
|
11
|
+
* @param {BootstrapPowers & { installation: {consume: {stakeAtom: Installation<import('../examples/stakeAtom.contract.js').start>}}}} powers
|
|
12
12
|
* @param {{options: StakeAtomTerms }} options
|
|
13
13
|
*/
|
|
14
14
|
export const startStakeAtom = async (
|
|
@@ -6,7 +6,7 @@ import { E } from '@endo/far';
|
|
|
6
6
|
const trace = makeTracer('StartStakeBld', true);
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @param {BootstrapPowers & {installation: {consume: {stakeBld: Installation<import('
|
|
9
|
+
* @param {BootstrapPowers & {installation: {consume: {stakeBld: Installation<import('../../test/examples/stakeBld.contract.js').start>}}}} powers
|
|
10
10
|
*/
|
|
11
11
|
export const startStakeBld = async ({
|
|
12
12
|
consume: { board, chainStorage, localchain, startUpgradable },
|
|
@@ -29,7 +29,7 @@ export const startStakeBld = async ({
|
|
|
29
29
|
const marshaller = await E(board).getPublishingMarshaller();
|
|
30
30
|
|
|
31
31
|
// FIXME this isn't detecting missing privateArgs
|
|
32
|
-
/** @type {StartUpgradableOpts<import('
|
|
32
|
+
/** @type {StartUpgradableOpts<import('../../test/examples/stakeBld.contract.js').start>} */
|
|
33
33
|
const startOpts = {
|
|
34
34
|
label: 'stakeBld',
|
|
35
35
|
installation: stakeBld,
|
|
File without changes
|
|
File without changes
|