agoric 0.21.2-dev-00cccfc.0 → 0.21.2-dev-db0b9d7.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 +21 -21
- package/src/commands/inter.js +4 -4
- package/src/lib/format.js +4 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agoric",
|
|
3
|
-
"version": "0.21.2-dev-
|
|
3
|
+
"version": "0.21.2-dev-db0b9d7.0+db0b9d7",
|
|
4
4
|
"description": "Manage the Agoric Javascript smart contract platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main.js",
|
|
@@ -29,29 +29,29 @@
|
|
|
29
29
|
"lint:eslint": "eslint ."
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@agoric/cosmic-swingset": "0.41.4-dev-
|
|
33
|
-
"@agoric/deploy-script-support": "0.10.4-dev-
|
|
32
|
+
"@agoric/cosmic-swingset": "0.41.4-dev-db0b9d7.0+db0b9d7",
|
|
33
|
+
"@agoric/deploy-script-support": "0.10.4-dev-db0b9d7.0+db0b9d7",
|
|
34
34
|
"ava": "^5.3.0",
|
|
35
35
|
"c8": "^9.1.0",
|
|
36
36
|
"dd-trace": "^4.11.1"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@agoric/access-token": "0.4.22-dev-
|
|
40
|
-
"@agoric/assert": "0.6.1-dev-
|
|
41
|
-
"@agoric/cache": "0.3.3-dev-
|
|
42
|
-
"@agoric/casting": "0.4.3-dev-
|
|
43
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
44
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
45
|
-
"@agoric/governance": "0.10.4-dev-
|
|
46
|
-
"@agoric/inter-protocol": "0.16.2-dev-
|
|
47
|
-
"@agoric/internal": "0.3.3-dev-
|
|
48
|
-
"@agoric/network": "0.1.1-dev-
|
|
49
|
-
"@agoric/smart-wallet": "0.5.4-dev-
|
|
50
|
-
"@agoric/store": "0.9.3-dev-
|
|
51
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
52
|
-
"@agoric/vats": "0.15.2-dev-
|
|
53
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
54
|
-
"@agoric/zone": "0.2.3-dev-
|
|
39
|
+
"@agoric/access-token": "0.4.22-dev-db0b9d7.0+db0b9d7",
|
|
40
|
+
"@agoric/assert": "0.6.1-dev-db0b9d7.0+db0b9d7",
|
|
41
|
+
"@agoric/cache": "0.3.3-dev-db0b9d7.0+db0b9d7",
|
|
42
|
+
"@agoric/casting": "0.4.3-dev-db0b9d7.0+db0b9d7",
|
|
43
|
+
"@agoric/cosmic-proto": "0.4.1-dev-db0b9d7.0+db0b9d7",
|
|
44
|
+
"@agoric/ertp": "0.16.3-dev-db0b9d7.0+db0b9d7",
|
|
45
|
+
"@agoric/governance": "0.10.4-dev-db0b9d7.0+db0b9d7",
|
|
46
|
+
"@agoric/inter-protocol": "0.16.2-dev-db0b9d7.0+db0b9d7",
|
|
47
|
+
"@agoric/internal": "0.3.3-dev-db0b9d7.0+db0b9d7",
|
|
48
|
+
"@agoric/network": "0.1.1-dev-db0b9d7.0+db0b9d7",
|
|
49
|
+
"@agoric/smart-wallet": "0.5.4-dev-db0b9d7.0+db0b9d7",
|
|
50
|
+
"@agoric/store": "0.9.3-dev-db0b9d7.0+db0b9d7",
|
|
51
|
+
"@agoric/swingset-vat": "0.32.3-dev-db0b9d7.0+db0b9d7",
|
|
52
|
+
"@agoric/vats": "0.15.2-dev-db0b9d7.0+db0b9d7",
|
|
53
|
+
"@agoric/zoe": "0.26.3-dev-db0b9d7.0+db0b9d7",
|
|
54
|
+
"@agoric/zone": "0.2.3-dev-db0b9d7.0+db0b9d7",
|
|
55
55
|
"@confio/relayer": "^0.11.3",
|
|
56
56
|
"@cosmjs/crypto": "^0.32.3",
|
|
57
57
|
"@cosmjs/encoding": "^0.32.3",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"workerThreads": false
|
|
99
99
|
},
|
|
100
100
|
"typeCoverage": {
|
|
101
|
-
"atLeast":
|
|
101
|
+
"atLeast": 76.98
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "db0b9d70315699b173561f9b422d81f4068576de"
|
|
104
104
|
}
|
package/src/commands/inter.js
CHANGED
|
@@ -33,8 +33,8 @@ const bidInvitationShape = harden({
|
|
|
33
33
|
callPipe: [['makeBidInvitation', M.any()]],
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
/** @
|
|
37
|
-
/** @
|
|
36
|
+
/** @import {VBankAssetDetail} from '@agoric/vats/tools/board-utils.js'; */
|
|
37
|
+
/** @import {TryExitOfferAction} from '@agoric/smart-wallet/src/smartWallet.js'; */
|
|
38
38
|
/** @import {OfferSpec as BidSpec} from '@agoric/inter-protocol/src/auction/auctionBook.js' */
|
|
39
39
|
/** @import {ScheduleNotification} from '@agoric/inter-protocol/src/auction/scheduler.js' */
|
|
40
40
|
/** @import {BookDataNotification} from '@agoric/inter-protocol/src/auction/auctionBook.js' */
|
|
@@ -42,7 +42,7 @@ const bidInvitationShape = harden({
|
|
|
42
42
|
/**
|
|
43
43
|
* Format amounts, prices etc. based on brand board Ids, displayInfo
|
|
44
44
|
*
|
|
45
|
-
* @param {
|
|
45
|
+
* @param {VBankAssetDetail[]} assets
|
|
46
46
|
*/
|
|
47
47
|
const makeFormatters = assets => {
|
|
48
48
|
const r4 = x => Math.round(x * 10_000) / 10_000;
|
|
@@ -138,7 +138,7 @@ const coerceBid = (offerStatus, agoricNames, warn) => {
|
|
|
138
138
|
*
|
|
139
139
|
* @param {import('@agoric/smart-wallet/src/offers.js').OfferStatus &
|
|
140
140
|
* { offerArgs: BidSpec}} bid
|
|
141
|
-
* @param {
|
|
141
|
+
* @param {VBankAssetDetail[]} assets
|
|
142
142
|
*/
|
|
143
143
|
export const fmtBid = (bid, assets) => {
|
|
144
144
|
const fmt = makeFormatters(assets);
|
package/src/lib/format.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { makeBoardRemote } from '@agoric/vats/tools/board-utils.js';
|
|
4
4
|
|
|
5
5
|
/** @import {BoardRemote} from '@agoric/vats/tools/board-utils.js' */
|
|
6
|
+
/** @import {VBankAssetDetail} from '@agoric/vats/tools/board-utils.js'; */
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Like @endo/nat but coerces
|
|
@@ -26,7 +27,7 @@ export const Natural = str => {
|
|
|
26
27
|
*/
|
|
27
28
|
export const bigintReplacer = (k, v) => (typeof v === 'bigint' ? `${v}` : v);
|
|
28
29
|
|
|
29
|
-
/** @type {Partial<
|
|
30
|
+
/** @type {Partial<VBankAssetDetail>} */
|
|
30
31
|
// eslint-disable-next-line no-unused-vars
|
|
31
32
|
const exampleAsset = {
|
|
32
33
|
brand: makeBoardRemote({ boardId: 'board0425', iface: 'Alleged: BLD brand' }),
|
|
@@ -35,10 +36,8 @@ const exampleAsset = {
|
|
|
35
36
|
proposedName: 'Agoric staking token',
|
|
36
37
|
};
|
|
37
38
|
|
|
38
|
-
/** @typedef {import('@agoric/vats/tools/board-utils.js').VBankAssetDetail } AssetDescriptor */
|
|
39
|
-
|
|
40
39
|
/**
|
|
41
|
-
* @param {
|
|
40
|
+
* @param {VBankAssetDetail[]} assets
|
|
42
41
|
* @returns {(a: Amount & { brand: BoardRemote }) => [string | null, number | any[]]}
|
|
43
42
|
*/
|
|
44
43
|
export const makeAmountFormatter = assets => amt => {
|
|
@@ -90,7 +89,7 @@ export const asBoardRemote = x => {
|
|
|
90
89
|
* Summarize the balances array as user-facing informative tuples
|
|
91
90
|
*
|
|
92
91
|
* @param {import('@agoric/smart-wallet/src/smartWallet.js').CurrentWalletRecord['purses']} purses
|
|
93
|
-
* @param {
|
|
92
|
+
* @param {VBankAssetDetail[]} assets
|
|
94
93
|
*/
|
|
95
94
|
export const purseBalanceTuples = (purses, assets) => {
|
|
96
95
|
const fmt = makeAmountFormatter(assets);
|