@agoric/vats 0.15.2-dev-2347e82.0 → 0.15.2-dev-5a4779a.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/localchain.d.ts +2 -2
- package/src/localchain.js +7 -7
- package/src/priceAuthorityRegistry.d.ts +2 -1
- package/src/priceAuthorityRegistry.d.ts.map +1 -1
- package/src/priceAuthorityRegistry.js +5 -0
- package/src/proposals/localchain-test.js +1 -1
- package/src/vat-localchain.d.ts +2 -2
- package/src/vat-localchain.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/vats",
|
|
3
|
-
"version": "0.15.2-dev-
|
|
3
|
+
"version": "0.15.2-dev-5a4779a.0+5a4779a",
|
|
4
4
|
"description": "Agoric's Vat library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/assert": "0.6.1-dev-
|
|
26
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
27
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
28
|
-
"@agoric/governance": "0.10.4-dev-
|
|
29
|
-
"@agoric/internal": "0.3.3-dev-
|
|
30
|
-
"@agoric/network": "0.1.1-dev-
|
|
31
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
32
|
-
"@agoric/store": "0.9.3-dev-
|
|
33
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
34
|
-
"@agoric/time": "0.3.3-dev-
|
|
35
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
36
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
37
|
-
"@agoric/zone": "0.2.3-dev-
|
|
25
|
+
"@agoric/assert": "0.6.1-dev-5a4779a.0+5a4779a",
|
|
26
|
+
"@agoric/cosmic-proto": "0.4.1-dev-5a4779a.0+5a4779a",
|
|
27
|
+
"@agoric/ertp": "0.16.3-dev-5a4779a.0+5a4779a",
|
|
28
|
+
"@agoric/governance": "0.10.4-dev-5a4779a.0+5a4779a",
|
|
29
|
+
"@agoric/internal": "0.3.3-dev-5a4779a.0+5a4779a",
|
|
30
|
+
"@agoric/network": "0.1.1-dev-5a4779a.0+5a4779a",
|
|
31
|
+
"@agoric/notifier": "0.6.3-dev-5a4779a.0+5a4779a",
|
|
32
|
+
"@agoric/store": "0.9.3-dev-5a4779a.0+5a4779a",
|
|
33
|
+
"@agoric/swingset-vat": "0.32.3-dev-5a4779a.0+5a4779a",
|
|
34
|
+
"@agoric/time": "0.3.3-dev-5a4779a.0+5a4779a",
|
|
35
|
+
"@agoric/vat-data": "0.5.3-dev-5a4779a.0+5a4779a",
|
|
36
|
+
"@agoric/zoe": "0.26.3-dev-5a4779a.0+5a4779a",
|
|
37
|
+
"@agoric/zone": "0.2.3-dev-5a4779a.0+5a4779a",
|
|
38
38
|
"@endo/base64": "^1.0.4",
|
|
39
39
|
"@endo/far": "^1.1.1",
|
|
40
40
|
"@endo/import-bundle": "^1.1.1",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"jessie.js": "^0.3.4"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
49
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-5a4779a.0+5a4779a",
|
|
50
50
|
"@endo/bundle-source": "^3.2.2",
|
|
51
51
|
"@endo/init": "^1.1.1",
|
|
52
52
|
"ava": "^5.3.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"typeCoverage": {
|
|
80
80
|
"atLeast": 91.5
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "5a4779a5b0240bccd150607474d80beac23da3cd"
|
|
83
83
|
}
|
package/src/localchain.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export const LocalChainAccountI: import("@endo/patterns").InterfaceGuard<{
|
|
|
9
9
|
* >} LocalChainAccount
|
|
10
10
|
*/
|
|
11
11
|
export const LocalChainI: import("@endo/patterns").InterfaceGuard<{
|
|
12
|
-
|
|
12
|
+
makeAccount: import("@endo/patterns").MethodGuard;
|
|
13
13
|
query: import("@endo/patterns").MethodGuard;
|
|
14
14
|
queryMany: import("@endo/patterns").MethodGuard;
|
|
15
15
|
}>;
|
|
@@ -33,7 +33,7 @@ export function prepareLocalChainTools(zone: import("@agoric/base-zone").Zone):
|
|
|
33
33
|
* x/vlocalchain/keeper/keeper.go AllocateAddress for the use of the app
|
|
34
34
|
* hash and block data hash.
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
makeAccount(): Promise<import("@endo/exo").Guarded<{
|
|
37
37
|
getAddress(): Promise<string>;
|
|
38
38
|
/**
|
|
39
39
|
* Deposit a payment into the bank purse that matches the alleged brand.
|
package/src/localchain.js
CHANGED
|
@@ -95,7 +95,7 @@ const prepareLocalChainAccount = zone =>
|
|
|
95
95
|
*/
|
|
96
96
|
|
|
97
97
|
export const LocalChainI = M.interface('LocalChain', {
|
|
98
|
-
|
|
98
|
+
makeAccount: M.callWhen().returns(M.remotable('LocalChainAccount')),
|
|
99
99
|
query: M.callWhen(M.record()).returns(M.record()),
|
|
100
100
|
queryMany: M.callWhen(M.arrayOf(M.record())).returns(M.arrayOf(M.record())),
|
|
101
101
|
});
|
|
@@ -106,9 +106,9 @@ export const LocalChainAdminI = M.interface('LocalChainAdmin', {
|
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
108
|
* @param {import('@agoric/base-zone').Zone} zone
|
|
109
|
-
* @param {ReturnType<typeof prepareLocalChainAccount>}
|
|
109
|
+
* @param {ReturnType<typeof prepareLocalChainAccount>} makeAccount
|
|
110
110
|
*/
|
|
111
|
-
const prepareLocalChain = (zone,
|
|
111
|
+
const prepareLocalChain = (zone, makeAccount) =>
|
|
112
112
|
zone.exoClassKit(
|
|
113
113
|
'LocalChain',
|
|
114
114
|
{ public: LocalChainI, admin: LocalChainAdminI },
|
|
@@ -151,13 +151,13 @@ const prepareLocalChain = (zone, createAccount) =>
|
|
|
151
151
|
* x/vlocalchain/keeper/keeper.go AllocateAddress for the use of the app
|
|
152
152
|
* hash and block data hash.
|
|
153
153
|
*/
|
|
154
|
-
async
|
|
154
|
+
async makeAccount() {
|
|
155
155
|
const { powers } = this.state;
|
|
156
156
|
const system = getPower(powers, 'system');
|
|
157
157
|
const address = await E(system).toBridge({
|
|
158
158
|
type: 'VLOCALCHAIN_ALLOCATE_ADDRESS',
|
|
159
159
|
});
|
|
160
|
-
return
|
|
160
|
+
return makeAccount(address, powers);
|
|
161
161
|
},
|
|
162
162
|
/**
|
|
163
163
|
* Make a single query to the local chain. Will reject with an error if
|
|
@@ -205,8 +205,8 @@ const prepareLocalChain = (zone, createAccount) =>
|
|
|
205
205
|
|
|
206
206
|
/** @param {import('@agoric/base-zone').Zone} zone */
|
|
207
207
|
export const prepareLocalChainTools = zone => {
|
|
208
|
-
const
|
|
209
|
-
const makeLocalChain = prepareLocalChain(zone,
|
|
208
|
+
const makeAccount = prepareLocalChainAccount(zone);
|
|
209
|
+
const makeLocalChain = prepareLocalChain(zone, makeAccount);
|
|
210
210
|
|
|
211
211
|
return harden({ makeLocalChain });
|
|
212
212
|
};
|
|
@@ -6,7 +6,7 @@ export type PriceAuthorityRegistryAdmin = {
|
|
|
6
6
|
/**
|
|
7
7
|
* Add a unique price authority for a given pair
|
|
8
8
|
*/
|
|
9
|
-
registerPriceAuthority: (pa: ERef<PriceAuthority>, brandIn: Brand, brandOut: Brand, force?: boolean) => Promise<Deleter>;
|
|
9
|
+
registerPriceAuthority: (pa: globalThis.ERef<PriceAuthority>, brandIn: Brand, brandOut: Brand, force?: boolean) => Promise<Deleter>;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* A price authority that is a facade
|
|
@@ -17,4 +17,5 @@ export type PriceAuthorityRegistry = {
|
|
|
17
17
|
priceAuthority: PriceAuthority;
|
|
18
18
|
adminFacet: PriceAuthorityRegistryAdmin;
|
|
19
19
|
};
|
|
20
|
+
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
20
21
|
//# sourceMappingURL=priceAuthorityRegistry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAuthorityRegistry.d.ts","sourceRoot":"","sources":["priceAuthorityRegistry.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priceAuthorityRegistry.d.ts","sourceRoot":"","sources":["priceAuthorityRegistry.js"],"names":[],"mappings":"AAiDO,uDAHI,OAAO,kBAAkB,EAAE,OAAO,GAChC,sBAAsB,CA4KlC;;YAtMa,MAAM,IAAI;;;;;;2EAOV,KAAK,YACJ,KAAK,UACP,OAAO,KACZ,OAAO,CAAC,OAAO,CAAC;;;;;;;;;gBASV,2BAA2B;;oCA1BgD,4BAA4B"}
|
|
@@ -10,6 +10,11 @@ import { E } from '@endo/far';
|
|
|
10
10
|
import { Far } from '@endo/marshal';
|
|
11
11
|
import { PriceAuthorityI } from '@agoric/zoe/src/contractSupport/priceAuthority.js';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
15
|
+
* @import {MutableQuote, PriceAuthority, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
16
|
+
*/
|
|
17
|
+
|
|
13
18
|
const { Fail } = assert;
|
|
14
19
|
|
|
15
20
|
/**
|
|
@@ -28,7 +28,7 @@ export const testLocalChain = async (
|
|
|
28
28
|
|
|
29
29
|
let result;
|
|
30
30
|
try {
|
|
31
|
-
const lca = await E(localchain).
|
|
31
|
+
const lca = await E(localchain).makeAccount();
|
|
32
32
|
console.info('created account', lca);
|
|
33
33
|
const address = await E(lca).getAddress();
|
|
34
34
|
console.info('address', address);
|
package/src/vat-localchain.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
|
|
|
10
10
|
setPower<K extends keyof import("./localchain.js").LocalChainPowers>(name: K, power?: import("./localchain.js").LocalChainPowers[K] | undefined): void;
|
|
11
11
|
};
|
|
12
12
|
public: {
|
|
13
|
-
|
|
13
|
+
makeAccount(): Promise<import("@endo/exo").Guarded<{
|
|
14
14
|
getAddress(): Promise<string>;
|
|
15
15
|
deposit(payment: Payment): Promise<globalThis.Amount<globalThis.AssetKind>>;
|
|
16
16
|
executeTx(messages: import("@agoric/cosmic-proto").TypedJson<unknown>[]): Promise<{
|
|
@@ -40,7 +40,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
|
|
|
40
40
|
setPower<K extends keyof import("./localchain.js").LocalChainPowers>(name: K, power?: import("./localchain.js").LocalChainPowers[K] | undefined): void;
|
|
41
41
|
};
|
|
42
42
|
public: {
|
|
43
|
-
|
|
43
|
+
makeAccount(): Promise<import("@endo/exo").Guarded<{
|
|
44
44
|
getAddress(): Promise<string>;
|
|
45
45
|
deposit(payment: Payment): Promise<globalThis.Amount<globalThis.AssetKind>>;
|
|
46
46
|
executeTx(messages: import("@agoric/cosmic-proto").TypedJson<unknown>[]): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vat-localchain.d.ts","sourceRoot":"","sources":["vat-localchain.js"],"names":[],"mappings":"AAMO;IAKH;;;;;OAKG;;;
|
|
1
|
+
{"version":3,"file":"vat-localchain.d.ts","sourceRoot":"","sources":["vat-localchain.js"],"names":[],"mappings":"AAMO;IAKH;;;;;OAKG;;;uFAQ6yG,CAAC;;;;;iCAAz8E,OAAO;oCAA6b,OAAO,sBAAsB,EAAE,SAAS,SAAS,EAAE;;;;2BAAsvG,OAAO,sBAAsB,EAAE,SAAS;;;gCAAwtB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;;IAb/3K;;;;;OAKG;;;;;;;;;mEAQw0C,SAAS;;;;0DAAgyG,SAAS;;;+DAAuvB,SAAS;;;;;;;;GAHh4K;4BAEa,UAAU,CAAC,OAAO,eAAe,CAAC"}
|