@agoric/pegasus 0.7.13-other-dev-d15096d.0.d15096d → 0.7.13-other-dev-ecf44df.0.ecf44df
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 +23 -32
- package/src/contract.js +28 -23
- package/src/courier.js +12 -1
- package/src/ibc-trace.js +4 -0
- package/src/ics20.js +8 -0
- package/src/once-promise-kit.js +4 -0
- package/src/pegasus.js +25 -1
- package/src/types.js +3 -1
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/pegasus",
|
|
3
|
-
"version": "0.7.13-other-dev-
|
|
3
|
+
"version": "0.7.13-other-dev-ecf44df.0.ecf44df",
|
|
4
4
|
"description": "Peg-as-us contract",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/pegasus.js",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": "^
|
|
8
|
+
"node": "^22.11 || ^24.14"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "exit 0",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"test:xs": "exit 0",
|
|
15
15
|
"lint-fix": "yarn lint:eslint --fix",
|
|
16
16
|
"lint": "yarn run -T run-s --continue-on-error 'lint:*'",
|
|
17
|
-
"lint:eslint": "
|
|
18
|
-
"lint:types": "yarn run -T
|
|
17
|
+
"lint:eslint": "node ../../scripts/eslint-repo.mjs .",
|
|
18
|
+
"lint:types": "yarn run -T tsgo --tsBuildInfoFile tsconfig.tsgo.tsbuildinfo"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
@@ -28,27 +28,27 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@agoric/ertp": "0.16.3-other-dev-
|
|
32
|
-
"@agoric/internal": "0.3.3-other-dev-
|
|
33
|
-
"@agoric/network": "0.1.1-other-dev-
|
|
34
|
-
"@agoric/notifier": "0.6.3-other-dev-
|
|
35
|
-
"@agoric/store": "0.9.3-other-dev-
|
|
36
|
-
"@agoric/swingset-vat": "0.32.3-other-dev-
|
|
37
|
-
"@agoric/vats": "0.15.2-other-dev-
|
|
38
|
-
"@agoric/vow": "0.1.1-other-dev-
|
|
39
|
-
"@agoric/zoe": "0.26.3-other-dev-
|
|
40
|
-
"@agoric/zone": "0.2.3-other-dev-
|
|
41
|
-
"@endo/bundle-source": "^4.
|
|
42
|
-
"@endo/captp": "^4.
|
|
43
|
-
"@endo/errors": "^1.
|
|
31
|
+
"@agoric/ertp": "0.16.3-other-dev-ecf44df.0.ecf44df",
|
|
32
|
+
"@agoric/internal": "0.3.3-other-dev-ecf44df.0.ecf44df",
|
|
33
|
+
"@agoric/network": "0.1.1-other-dev-ecf44df.0.ecf44df",
|
|
34
|
+
"@agoric/notifier": "0.6.3-other-dev-ecf44df.0.ecf44df",
|
|
35
|
+
"@agoric/store": "0.9.3-other-dev-ecf44df.0.ecf44df",
|
|
36
|
+
"@agoric/swingset-vat": "0.32.3-other-dev-ecf44df.0.ecf44df",
|
|
37
|
+
"@agoric/vats": "0.15.2-other-dev-ecf44df.0.ecf44df",
|
|
38
|
+
"@agoric/vow": "0.1.1-other-dev-ecf44df.0.ecf44df",
|
|
39
|
+
"@agoric/zoe": "0.26.3-other-dev-ecf44df.0.ecf44df",
|
|
40
|
+
"@agoric/zone": "0.2.3-other-dev-ecf44df.0.ecf44df",
|
|
41
|
+
"@endo/bundle-source": "^4.3.2",
|
|
42
|
+
"@endo/captp": "^4.5.1",
|
|
43
|
+
"@endo/errors": "^1.3.1",
|
|
44
44
|
"@endo/far": "^1.1.14",
|
|
45
|
-
"@endo/init": "^1.1.
|
|
46
|
-
"@endo/nat": "^5.
|
|
47
|
-
"@endo/promise-kit": "^1.1
|
|
45
|
+
"@endo/init": "^1.1.13",
|
|
46
|
+
"@endo/nat": "^5.2.0",
|
|
47
|
+
"@endo/promise-kit": "^1.2.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@agoric/vat-data": "0.5.3-other-dev-
|
|
51
|
-
"ava": "^
|
|
50
|
+
"@agoric/vat-data": "0.5.3-other-dev-ecf44df.0.ecf44df",
|
|
51
|
+
"ava": "^8.0.1",
|
|
52
52
|
"c8": "^10.1.3",
|
|
53
53
|
"import-meta-resolve": "^4.1.0"
|
|
54
54
|
},
|
|
@@ -57,20 +57,11 @@
|
|
|
57
57
|
"src/",
|
|
58
58
|
"NEWS.md"
|
|
59
59
|
],
|
|
60
|
-
"ava": {
|
|
61
|
-
"files": [
|
|
62
|
-
"test/**/*.test.*"
|
|
63
|
-
],
|
|
64
|
-
"require": [
|
|
65
|
-
"@endo/init/debug.js"
|
|
66
|
-
],
|
|
67
|
-
"timeout": "10m"
|
|
68
|
-
},
|
|
69
60
|
"publishConfig": {
|
|
70
61
|
"access": "public"
|
|
71
62
|
},
|
|
72
63
|
"typeCoverage": {
|
|
73
64
|
"atLeast": 91.21
|
|
74
65
|
},
|
|
75
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "ecf44df5eadcc7a1d68745f056fca19155fb5231"
|
|
76
67
|
}
|
package/src/contract.js
CHANGED
|
@@ -8,33 +8,38 @@ import { makePegasus } from './pegasus.js';
|
|
|
8
8
|
* @import {ContractStartFn} from '@agoric/zoe';
|
|
9
9
|
* @import {Pegasus} from './pegasus.js';
|
|
10
10
|
* @import {NameHub} from '@agoric/vats';
|
|
11
|
+
* @import {BoardDepositFacet} from './types.js';
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
export const start =
|
|
15
|
+
/**
|
|
16
|
+
* @type {ContractStartFn<Pegasus, never, {}, {
|
|
17
|
+
* board: Remote<BoardDepositFacet>,
|
|
18
|
+
* namesByAddress: Remote<NameHub>
|
|
19
|
+
* }>}
|
|
20
|
+
*/
|
|
21
|
+
(
|
|
22
|
+
/** @type {unknown} */ (
|
|
23
|
+
(zcf, privateArgs, baggage) => {
|
|
24
|
+
const zone = makeDurableZone(baggage);
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
const whenZone = zone.subZone('when');
|
|
27
|
+
const { when } = prepareVowTools(whenZone);
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
const { board, namesByAddress } = privateArgs;
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
// start requires that the object passed in must be durable. Given that we
|
|
32
|
+
// haven't made pegasus durable yet, we'll wrap its non-durable methods within
|
|
33
|
+
// an exo object to workaround this requirement.
|
|
34
|
+
// @ts-expect-error makePegasus returns a remotable object
|
|
35
|
+
const publicFacet = zone.exo('PublicFacet', undefined, {
|
|
36
|
+
...makePegasus({ zcf, board, namesByAddress, when }),
|
|
37
|
+
});
|
|
34
38
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
return harden({
|
|
40
|
+
publicFacet,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
);
|
|
40
45
|
harden(start);
|
package/src/courier.js
CHANGED
|
@@ -7,10 +7,21 @@ import { E, Far } from '@endo/far';
|
|
|
7
7
|
import { makeOncePromiseKit } from './once-promise-kit.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* @import {DepositFacet} from '@agoric/ertp/src/types.js'
|
|
10
|
+
* @import {Brand, DepositFacet} from '@agoric/ertp/src/types.js'
|
|
11
11
|
* @import {Connection} from '@agoric/network';
|
|
12
12
|
* @import {Remote} from '@agoric/vow';
|
|
13
13
|
* @import {prepareVowTools} from '@agoric/vow';
|
|
14
|
+
* @import {Courier} from './types.js';
|
|
15
|
+
* @import {BoardDepositFacet} from './types.js';
|
|
16
|
+
* @import {Denom} from './types.js';
|
|
17
|
+
* @import {TransferProtocol} from './types.js';
|
|
18
|
+
* @import {Sender} from './types.js';
|
|
19
|
+
* @import {Receiver} from './types.js';
|
|
20
|
+
* @import {LegacyMap} from '@agoric/store';
|
|
21
|
+
* @import {ZCF} from '@agoric/zoe';
|
|
22
|
+
* @import {ZCFSeat} from '@agoric/zoe';
|
|
23
|
+
* @import {AmountKeywordRecord} from '@agoric/zoe';
|
|
24
|
+
* @import {PromiseRecord} from '@endo/promise-kit';
|
|
14
25
|
*/
|
|
15
26
|
|
|
16
27
|
/**
|
package/src/ibc-trace.js
CHANGED
package/src/ics20.js
CHANGED
|
@@ -3,6 +3,14 @@ import { assert, X, Fail, annotateError } from '@endo/errors';
|
|
|
3
3
|
import { Nat } from '@endo/nat';
|
|
4
4
|
import { Far } from '@endo/far';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @import {Denom} from './types.js';
|
|
8
|
+
* @import {DepositAddress} from './types.js';
|
|
9
|
+
* @import {Bytes} from '@agoric/network';
|
|
10
|
+
* @import {PacketParts} from './types.js';
|
|
11
|
+
* @import {TransferProtocol} from './types.js';
|
|
12
|
+
*/
|
|
13
|
+
|
|
6
14
|
/**
|
|
7
15
|
* @typedef {object} ICS20TransferPacket Packet shape defined at:
|
|
8
16
|
* https://github.com/cosmos/ibc/tree/HEAD/spec/app/ics-020-fungible-token-transfer#data-structures
|
package/src/once-promise-kit.js
CHANGED
package/src/pegasus.js
CHANGED
|
@@ -14,9 +14,33 @@ import { ICS20TransferProtocol } from './ics20.js';
|
|
|
14
14
|
import { makeCourierMaker, getCourierPK } from './courier.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* @import {CloseReason, Connection} from '@agoric/network';
|
|
17
|
+
* @import {CloseReason, Connection, ConnectionHandler} from '@agoric/network';
|
|
18
18
|
* @import {Remote} from '@agoric/vow';
|
|
19
19
|
* @import {prepareVowTools} from '@agoric/vow';
|
|
20
|
+
* @import {BoardDepositFacet} from './types.js';
|
|
21
|
+
* @import {Denom} from './types.js';
|
|
22
|
+
* @import {Courier} from './types.js';
|
|
23
|
+
* @import {Peg} from './types.js';
|
|
24
|
+
* @import {TransferProtocol} from './types.js';
|
|
25
|
+
* @import {DenomTransformer} from './types.js';
|
|
26
|
+
* @import {PegasusConnectionActions} from './types.js';
|
|
27
|
+
* @import {PegasusConnectionKit} from './types.js';
|
|
28
|
+
* @import {PegasusConnection} from './types.js';
|
|
29
|
+
* @import {DepositAddress} from './types.js';
|
|
30
|
+
* @import {SenderOptions} from './types.js';
|
|
31
|
+
* @import {ZCF} from '@agoric/zoe';
|
|
32
|
+
* @import {LegacyMap} from '@agoric/store';
|
|
33
|
+
* @import {IterationObserver} from '@agoric/notifier';
|
|
34
|
+
* @import {Subscription} from '@agoric/notifier';
|
|
35
|
+
* @import {LegacyWeakMap} from '@agoric/store';
|
|
36
|
+
* @import {Brand} from '@agoric/ertp';
|
|
37
|
+
* @import {Amount} from '@agoric/ertp';
|
|
38
|
+
* @import {Keyword} from '@agoric/zoe';
|
|
39
|
+
* @import {ZCFSeat} from '@agoric/zoe';
|
|
40
|
+
* @import {SubscriptionRecord} from '@agoric/notifier';
|
|
41
|
+
* @import {PromiseRecord} from '@endo/promise-kit';
|
|
42
|
+
* @import {Invitation} from '@agoric/zoe';
|
|
43
|
+
* @import {OfferHandler} from '@agoric/zoe';
|
|
20
44
|
*/
|
|
21
45
|
|
|
22
46
|
const DEFAULT_DENOM_TRANSFORMER = IBCSourceTraceDenomTransformer;
|
package/src/types.js
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
/// <reference types="ses" />
|
|
4
4
|
/**
|
|
5
5
|
* @import {Bytes, ConnectionHandler} from '@agoric/network';
|
|
6
|
-
* @import {AmountValue} from '@agoric/ertp/src/types.js';
|
|
6
|
+
* @import {AmountValue, AssetKind, Brand, DisplayInfo, Issuer} from '@agoric/ertp/src/types.js';
|
|
7
|
+
* @import {ZCFSeat} from '@agoric/zoe';
|
|
8
|
+
* @import {Subscription} from '@agoric/notifier';
|
|
7
9
|
*/
|
|
8
10
|
|
|
9
11
|
/**
|