@agoric/smart-wallet 0.5.4-other-dev-1f26562.0 → 0.5.4-other-dev-3eb1a1d.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 +35 -26
- package/src/index.d.ts +2 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +2 -0
- package/src/invitations.d.ts +14 -10
- package/src/invitations.d.ts.map +1 -1
- package/src/invitations.js +35 -32
- package/src/marshal-contexts.d.ts +44 -41
- package/src/marshal-contexts.d.ts.map +1 -1
- package/src/marshal-contexts.js +68 -61
- package/src/offerWatcher.d.ts +52 -0
- package/src/offerWatcher.d.ts.map +1 -0
- package/src/offerWatcher.js +329 -0
- package/src/offers.d.ts +7 -31
- package/src/offers.d.ts.map +1 -1
- package/src/offers.js +9 -183
- package/src/proposals/upgrade-wallet-factory2-proposal.d.ts +23 -0
- package/src/proposals/upgrade-wallet-factory2-proposal.d.ts.map +1 -0
- package/src/proposals/upgrade-wallet-factory2-proposal.js +60 -0
- package/src/proposals/upgrade-walletFactory-proposal.d.ts +1 -1
- package/src/proposals/upgrade-walletFactory-proposal.d.ts.map +1 -1
- package/src/proposals/upgrade-walletFactory-proposal.js +46 -23
- package/src/smartWallet.d.ts +101 -66
- package/src/smartWallet.d.ts.map +1 -1
- package/src/smartWallet.js +576 -216
- package/src/typeGuards.d.ts +1 -1
- package/src/types-index.d.ts +2 -0
- package/src/types-index.js +2 -0
- package/src/types.d.ts +35 -41
- package/src/types.d.ts.map +1 -0
- package/src/types.ts +90 -0
- package/src/utils.d.ts +17 -14
- package/src/utils.d.ts.map +1 -1
- package/src/utils.js +19 -6
- package/src/walletFactory.d.ts +24 -78
- package/src/walletFactory.d.ts.map +1 -1
- package/src/walletFactory.js +61 -37
- package/CHANGELOG.md +0 -180
- package/src/payments.d.ts +0 -20
- package/src/payments.d.ts.map +0 -1
- package/src/payments.js +0 -89
package/package.json
CHANGED
|
@@ -1,44 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/smart-wallet",
|
|
3
|
-
"version": "0.5.4-other-dev-
|
|
3
|
+
"version": "0.5.4-other-dev-3eb1a1d.0+3eb1a1d",
|
|
4
4
|
"description": "Wallet contract",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "src/index.js",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"build": "yarn build:bundles",
|
|
8
9
|
"build:bundles": "node ./scripts/build-bundles.js",
|
|
9
|
-
"prepack": "tsc --build
|
|
10
|
-
"postpack": "git clean -f '*.d.ts*'",
|
|
10
|
+
"prepack": "tsc --build tsconfig.build.json",
|
|
11
|
+
"postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
|
|
11
12
|
"test": "ava",
|
|
12
13
|
"test:xs": "exit 0",
|
|
13
14
|
"lint": "run-s --continue-on-error lint:*",
|
|
14
15
|
"lint-fix": "yarn lint:eslint --fix",
|
|
15
|
-
"lint:types": "tsc
|
|
16
|
+
"lint:types": "tsc",
|
|
16
17
|
"lint:eslint": "eslint ."
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
19
|
-
"@agoric/
|
|
20
|
-
"@
|
|
21
|
-
"@
|
|
22
|
-
"@endo/
|
|
23
|
-
"
|
|
20
|
+
"@agoric/casting": "0.4.3-other-dev-3eb1a1d.0+3eb1a1d",
|
|
21
|
+
"@agoric/cosmic-proto": "0.4.1-other-dev-3eb1a1d.0+3eb1a1d",
|
|
22
|
+
"@agoric/swingset-vat": "0.32.3-other-dev-3eb1a1d.0+3eb1a1d",
|
|
23
|
+
"@endo/bundle-source": "^3.5.0",
|
|
24
|
+
"@endo/captp": "^4.4.3",
|
|
25
|
+
"@endo/init": "^1.1.7",
|
|
26
|
+
"ava": "^5.3.0",
|
|
24
27
|
"import-meta-resolve": "^2.2.1"
|
|
25
28
|
},
|
|
26
29
|
"dependencies": {
|
|
27
|
-
"@agoric/
|
|
28
|
-
"@agoric/
|
|
29
|
-
"@agoric/
|
|
30
|
-
"@agoric/
|
|
31
|
-
"@agoric/
|
|
32
|
-
"@agoric/
|
|
33
|
-
"@agoric/
|
|
34
|
-
"@agoric/
|
|
35
|
-
"@agoric/
|
|
36
|
-
"@
|
|
37
|
-
"@endo/eventual-send": "
|
|
38
|
-
"@endo/far": "
|
|
39
|
-
"@endo/marshal": "
|
|
40
|
-
"@endo/nat": "
|
|
41
|
-
"@endo/promise-kit": "
|
|
30
|
+
"@agoric/ertp": "0.16.3-other-dev-3eb1a1d.0+3eb1a1d",
|
|
31
|
+
"@agoric/internal": "0.3.3-other-dev-3eb1a1d.0+3eb1a1d",
|
|
32
|
+
"@agoric/notifier": "0.6.3-other-dev-3eb1a1d.0+3eb1a1d",
|
|
33
|
+
"@agoric/store": "0.9.3-other-dev-3eb1a1d.0+3eb1a1d",
|
|
34
|
+
"@agoric/vat-data": "0.5.3-other-dev-3eb1a1d.0+3eb1a1d",
|
|
35
|
+
"@agoric/vats": "0.15.2-other-dev-3eb1a1d.0+3eb1a1d",
|
|
36
|
+
"@agoric/vow": "0.1.1-other-dev-3eb1a1d.0+3eb1a1d",
|
|
37
|
+
"@agoric/zoe": "0.26.3-other-dev-3eb1a1d.0+3eb1a1d",
|
|
38
|
+
"@agoric/zone": "0.2.3-other-dev-3eb1a1d.0+3eb1a1d",
|
|
39
|
+
"@endo/errors": "^1.2.8",
|
|
40
|
+
"@endo/eventual-send": "^1.2.8",
|
|
41
|
+
"@endo/far": "^1.1.9",
|
|
42
|
+
"@endo/marshal": "^1.6.2",
|
|
43
|
+
"@endo/nat": "^5.0.13",
|
|
44
|
+
"@endo/promise-kit": "^1.1.8"
|
|
42
45
|
},
|
|
43
46
|
"files": [
|
|
44
47
|
"src/"
|
|
@@ -56,12 +59,18 @@
|
|
|
56
59
|
"homepage": "https://github.com/Agoric/agoric#readme",
|
|
57
60
|
"ava": {
|
|
58
61
|
"files": [
|
|
59
|
-
"test
|
|
62
|
+
"test/**/*.test.*"
|
|
63
|
+
],
|
|
64
|
+
"require": [
|
|
65
|
+
"@endo/init/debug.js"
|
|
60
66
|
],
|
|
61
67
|
"timeout": "2m"
|
|
62
68
|
},
|
|
63
69
|
"publishConfig": {
|
|
64
70
|
"access": "public"
|
|
65
71
|
},
|
|
66
|
-
"
|
|
72
|
+
"typeCoverage": {
|
|
73
|
+
"atLeast": 94.64
|
|
74
|
+
},
|
|
75
|
+
"gitHead": "3eb1a1d2d75b2b4a94807cd3bf759bc9fc531f05"
|
|
67
76
|
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":""}
|
package/src/index.js
ADDED
package/src/invitations.d.ts
CHANGED
|
@@ -1,45 +1,49 @@
|
|
|
1
|
-
export function makeInvitationsHelper(zoe: ERef<ZoeService>, agoricNames: ERef<NameHub>, invitationBrand: Brand<
|
|
1
|
+
export function makeInvitationsHelper(zoe: ERef<ZoeService>, agoricNames: ERef<import("@agoric/vats").NameHub>, invitationBrand: Brand<"set">, invitationsPurse: Purse<"set", InvitationDetails>, getInvitationContinuation: (fromOfferId: string) => import("./types.js").InvitationMakers): (spec: InvitationSpec) => ERef<Invitation>;
|
|
2
2
|
/**
|
|
3
3
|
* Specify how to produce an invitation. See each type in the union for details.
|
|
4
4
|
*/
|
|
5
5
|
export type InvitationSpec = AgoricContractInvitationSpec | ContractInvitationSpec | PurseInvitationSpec | ContinuingInvitationSpec;
|
|
6
6
|
/**
|
|
7
7
|
* source of invitation is a chain of calls starting with an agoricName
|
|
8
|
+
*
|
|
8
9
|
* - the start of the pipe is a lookup of instancePath within agoricNames
|
|
9
10
|
* - each entry in the callPipe executes a call on the preceding result
|
|
10
11
|
* - the end of the pipe is expected to return an Invitation
|
|
11
12
|
*/
|
|
12
13
|
export type AgoricContractInvitationSpec = {
|
|
13
|
-
source:
|
|
14
|
+
source: "agoricContract";
|
|
14
15
|
instancePath: string[];
|
|
15
|
-
callPipe:
|
|
16
|
+
callPipe: [methodName: string, methodArgs?: any[]][];
|
|
16
17
|
};
|
|
17
18
|
/**
|
|
18
19
|
* source is a contract (in which case this takes an Instance to look up in zoe)
|
|
19
20
|
*/
|
|
20
21
|
export type ContractInvitationSpec = {
|
|
21
|
-
source:
|
|
22
|
+
source: "contract";
|
|
22
23
|
instance: Instance;
|
|
23
24
|
publicInvitationMaker: string;
|
|
24
25
|
invitationArgs?: any[];
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
27
|
-
* the invitation is already in your Zoe "invitation" purse so we need to query
|
|
28
|
+
* the invitation is already in your Zoe "invitation" purse so we need to query
|
|
29
|
+
* it
|
|
30
|
+
*
|
|
28
31
|
* - use the find/query invitation by kvs thing
|
|
29
32
|
*/
|
|
30
33
|
export type PurseInvitationSpec = {
|
|
31
|
-
source:
|
|
34
|
+
source: "purse";
|
|
32
35
|
instance: Instance;
|
|
33
36
|
description: string;
|
|
34
37
|
};
|
|
35
38
|
/**
|
|
36
|
-
* continuing invitation in which the offer result from a previous invitation
|
|
39
|
+
* continuing invitation in which the offer result from a previous invitation
|
|
40
|
+
* had an `invitationMakers` property
|
|
37
41
|
*/
|
|
38
42
|
export type ContinuingInvitationSpec = {
|
|
39
|
-
source:
|
|
40
|
-
previousOffer: import(
|
|
43
|
+
source: "continuing";
|
|
44
|
+
previousOffer: import("./offers.js").OfferId;
|
|
41
45
|
invitationMakerName: string;
|
|
42
46
|
invitationArgs?: any[];
|
|
43
47
|
};
|
|
44
|
-
export type InvitationsPurseQuery = Pick<InvitationDetails,
|
|
48
|
+
export type InvitationsPurseQuery = Pick<InvitationDetails, "description" | "instance">;
|
|
45
49
|
//# sourceMappingURL=invitations.d.ts.map
|
package/src/invitations.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations.d.ts","sourceRoot":"","sources":["invitations.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"invitations.d.ts","sourceRoot":"","sources":["invitations.js"],"names":[],"mappings":"AAuEO,2CANI,IAAI,CAAC,UAAU,CAAC,eAChB,IAAI,CAAC,OAAO,cAAc,EAAE,OAAO,CAAC,mBACpC,KAAK,CAAC,KAAK,CAAC,oBACZ,KAAK,CAAC,KAAK,EAAE,iBAAiB,CAAC,6BAC/B,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,YAAY,EAAE,gBAAgB,UAoFrD,cAAc,KAAK,IAAI,CAAC,UAAU,CAAC,CAgBtD;;;;6BA9JY,4BAA4B,GAClC,sBAAsB,GACtB,mBAAmB,GACnB,wBAAwB;;;;;;;;2CAKlB;IACR,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;CACtD;;;;qCAQS;IACR,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;IACnB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC;CACxB;;;;;;;kCAGS;IACR,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;;;;;uCAOS;IACR,MAAM,EAAE,YAAY,CAAC;IACrB,aAAa,EAAE,OAAO,aAAa,EAAE,OAAO,CAAC;IAC7C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC;CACxB;oCAMS,IAAI,CAAC,iBAAiB,EAAE,aAAa,GAAG,UAAU,CAAC"}
|
package/src/invitations.js
CHANGED
|
@@ -1,56 +1,61 @@
|
|
|
1
1
|
import { AmountMath } from '@agoric/ertp';
|
|
2
2
|
import { mustMatch } from '@agoric/store';
|
|
3
|
-
import {
|
|
3
|
+
import { InvitationShape } from '@agoric/zoe/src/typeGuards.js';
|
|
4
|
+
import { Fail } from '@endo/errors';
|
|
4
5
|
import { E } from '@endo/far';
|
|
5
6
|
import { shape } from './typeGuards.js';
|
|
6
7
|
|
|
7
|
-
// Ambient types. Needed only for dev but this does a runtime import.
|
|
8
|
-
import '@agoric/zoe/exported.js';
|
|
9
|
-
|
|
10
|
-
const { Fail } = assert;
|
|
11
|
-
|
|
12
8
|
// A safety limit
|
|
13
9
|
const MAX_PIPE_LENGTH = 2;
|
|
14
10
|
|
|
15
11
|
/**
|
|
16
|
-
* @typedef {AgoricContractInvitationSpec
|
|
17
|
-
*
|
|
12
|
+
* @typedef {AgoricContractInvitationSpec
|
|
13
|
+
* | ContractInvitationSpec
|
|
14
|
+
* | PurseInvitationSpec
|
|
15
|
+
* | ContinuingInvitationSpec} InvitationSpec
|
|
16
|
+
* Specify how to produce an invitation. See each type in the union for details.
|
|
18
17
|
*/
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
20
|
* @typedef {{
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
21
|
+
* source: 'agoricContract';
|
|
22
|
+
* instancePath: string[];
|
|
23
|
+
* callPipe: [methodName: string, methodArgs?: any[]][];
|
|
25
24
|
* }} AgoricContractInvitationSpec
|
|
26
|
-
*
|
|
25
|
+
* source of invitation is a chain of calls starting with an agoricName
|
|
26
|
+
*
|
|
27
27
|
* - the start of the pipe is a lookup of instancePath within agoricNames
|
|
28
28
|
* - each entry in the callPipe executes a call on the preceding result
|
|
29
29
|
* - the end of the pipe is expected to return an Invitation
|
|
30
30
|
*
|
|
31
|
+
*
|
|
31
32
|
* @typedef {{
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
33
|
+
* source: 'contract';
|
|
34
|
+
* instance: Instance;
|
|
35
|
+
* publicInvitationMaker: string;
|
|
36
|
+
* invitationArgs?: any[];
|
|
36
37
|
* }} ContractInvitationSpec
|
|
37
|
-
*
|
|
38
|
+
* source is a contract (in which case this takes an Instance to look up in zoe)
|
|
38
39
|
*
|
|
39
40
|
* @typedef {{
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
41
|
+
* source: 'purse';
|
|
42
|
+
* instance: Instance;
|
|
43
|
+
* description: string;
|
|
43
44
|
* }} PurseInvitationSpec
|
|
44
|
-
*
|
|
45
|
+
* the invitation is already in your Zoe "invitation" purse so we need to query
|
|
46
|
+
* it
|
|
47
|
+
*
|
|
45
48
|
* - use the find/query invitation by kvs thing
|
|
46
49
|
*
|
|
50
|
+
*
|
|
47
51
|
* @typedef {{
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
+
* source: 'continuing';
|
|
53
|
+
* previousOffer: import('./offers.js').OfferId;
|
|
54
|
+
* invitationMakerName: string;
|
|
55
|
+
* invitationArgs?: any[];
|
|
52
56
|
* }} ContinuingInvitationSpec
|
|
53
|
-
*
|
|
57
|
+
* continuing invitation in which the offer result from a previous invitation
|
|
58
|
+
* had an `invitationMakers` property
|
|
54
59
|
*/
|
|
55
60
|
|
|
56
61
|
/**
|
|
@@ -59,10 +64,10 @@ const MAX_PIPE_LENGTH = 2;
|
|
|
59
64
|
|
|
60
65
|
/**
|
|
61
66
|
* @param {ERef<ZoeService>} zoe
|
|
62
|
-
* @param {ERef<NameHub>} agoricNames
|
|
67
|
+
* @param {ERef<import('@agoric/vats').NameHub>} agoricNames
|
|
63
68
|
* @param {Brand<'set'>} invitationBrand
|
|
64
|
-
* @param {Purse<'set'>} invitationsPurse
|
|
65
|
-
* @param {(fromOfferId: string) => import('./types').
|
|
69
|
+
* @param {Purse<'set', InvitationDetails>} invitationsPurse
|
|
70
|
+
* @param {(fromOfferId: string) => import('./types.js').InvitationMakers} getInvitationContinuation
|
|
66
71
|
*/
|
|
67
72
|
export const makeInvitationsHelper = (
|
|
68
73
|
zoe,
|
|
@@ -87,7 +92,7 @@ export const makeInvitationsHelper = (
|
|
|
87
92
|
}
|
|
88
93
|
|
|
89
94
|
const invitation = await eref;
|
|
90
|
-
mustMatch(invitation,
|
|
95
|
+
mustMatch(invitation, InvitationShape);
|
|
91
96
|
return invitation;
|
|
92
97
|
},
|
|
93
98
|
/** @type {(spec: ContractInvitationSpec) => Promise<Invitation>} */
|
|
@@ -103,9 +108,7 @@ export const makeInvitationsHelper = (
|
|
|
103
108
|
mustMatch(spec, shape.PurseInvitationSpec);
|
|
104
109
|
|
|
105
110
|
const { instance, description } = spec;
|
|
106
|
-
// @ts-expect-error TS thinks it's always true. I'm doubtful.
|
|
107
111
|
(instance && description) || Fail`missing instance or description`;
|
|
108
|
-
/** @type {Amount<'set'>} */
|
|
109
112
|
const purseAmount = await E(invitationsPurse).getCurrentAmount();
|
|
110
113
|
const invitations = AmountMath.getValue(invitationBrand, purseAmount);
|
|
111
114
|
|
|
@@ -1,65 +1,64 @@
|
|
|
1
1
|
export function makeExportContext(): {
|
|
2
|
-
toCapData: import("@endo/marshal
|
|
3
|
-
fromCapData: import("@endo/marshal
|
|
4
|
-
serialize: import("@endo/marshal
|
|
5
|
-
unserialize: import("@endo/marshal
|
|
6
|
-
savePurseActions: (val: Purse
|
|
7
|
-
savePaymentActions: (val: Payment
|
|
2
|
+
toCapData: import("@endo/marshal").ToCapData<string>;
|
|
3
|
+
fromCapData: import("@endo/marshal").FromCapData<string>;
|
|
4
|
+
serialize: import("@endo/marshal").ToCapData<string>;
|
|
5
|
+
unserialize: import("@endo/marshal").FromCapData<string>;
|
|
6
|
+
savePurseActions: (val: globalThis.Purse) => void;
|
|
7
|
+
savePaymentActions: (val: globalThis.Payment) => void;
|
|
8
8
|
/**
|
|
9
9
|
* @param {number} id
|
|
10
10
|
* @param {Purse} purse
|
|
11
11
|
*/
|
|
12
12
|
initPurseId: (id: number, purse: Purse) => void;
|
|
13
|
-
purseEntries: (keyPatt?:
|
|
13
|
+
purseEntries: (keyPatt?: Pattern, valuePatt?: Pattern) => Iterable<[number, globalThis.Purse]>;
|
|
14
14
|
/**
|
|
15
15
|
* @param {BoardId} id
|
|
16
|
-
* @param {
|
|
16
|
+
* @param {RemotableObject} val
|
|
17
17
|
*/
|
|
18
|
-
initBoardId: (id: BoardId, val:
|
|
18
|
+
initBoardId: (id: BoardId, val: RemotableObject) => void;
|
|
19
19
|
/**
|
|
20
20
|
* @param {BoardId} id
|
|
21
|
-
* @param {
|
|
21
|
+
* @param {RemotableObject} val
|
|
22
22
|
*/
|
|
23
|
-
ensureBoardId: (id: BoardId, val:
|
|
23
|
+
ensureBoardId: (id: BoardId, val: RemotableObject) => void;
|
|
24
24
|
};
|
|
25
|
-
export function makeImportContext(makePresence?: ((iface: string) =>
|
|
25
|
+
export function makeImportContext(makePresence?: ((iface: string) => PassableCap) | undefined): {
|
|
26
26
|
/**
|
|
27
27
|
* @param {BoardId} id
|
|
28
|
-
* @param {
|
|
28
|
+
* @param {PassableCap} val
|
|
29
29
|
*/
|
|
30
|
-
initBoardId: (id: BoardId, val:
|
|
30
|
+
initBoardId: (id: BoardId, val: PassableCap) => void;
|
|
31
31
|
/**
|
|
32
32
|
* @param {BoardId} id
|
|
33
|
-
* @param {
|
|
33
|
+
* @param {PassableCap} val
|
|
34
34
|
*/
|
|
35
|
-
ensureBoardId: (id: BoardId, val:
|
|
35
|
+
ensureBoardId: (id: BoardId, val: PassableCap) => void;
|
|
36
36
|
fromMyWallet: {
|
|
37
|
-
toCapData: import("@endo/marshal
|
|
38
|
-
fromCapData: import("@endo/marshal
|
|
39
|
-
serialize: import("@endo/marshal
|
|
40
|
-
unserialize: import("@endo/marshal
|
|
41
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
42
|
-
toCapData: import("@endo/marshal
|
|
43
|
-
fromCapData: import("@endo/marshal
|
|
44
|
-
serialize: import("@endo/marshal
|
|
45
|
-
unserialize: import("@endo/marshal
|
|
37
|
+
toCapData: import("@endo/marshal").ToCapData<string>;
|
|
38
|
+
fromCapData: import("@endo/marshal").FromCapData<string>;
|
|
39
|
+
serialize: import("@endo/marshal").ToCapData<string>;
|
|
40
|
+
unserialize: import("@endo/marshal").FromCapData<string>;
|
|
41
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
42
|
+
toCapData: import("@endo/marshal").ToCapData<string>;
|
|
43
|
+
fromCapData: import("@endo/marshal").FromCapData<string>;
|
|
44
|
+
serialize: import("@endo/marshal").ToCapData<string>;
|
|
45
|
+
unserialize: import("@endo/marshal").FromCapData<string>;
|
|
46
46
|
}>;
|
|
47
47
|
fromBoard: {
|
|
48
|
-
toCapData: import("@endo/marshal
|
|
49
|
-
fromCapData: import("@endo/marshal
|
|
50
|
-
serialize: import("@endo/marshal
|
|
51
|
-
unserialize: import("@endo/marshal
|
|
52
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
53
|
-
toCapData: import("@endo/marshal
|
|
54
|
-
fromCapData: import("@endo/marshal
|
|
55
|
-
serialize: import("@endo/marshal
|
|
56
|
-
unserialize: import("@endo/marshal
|
|
48
|
+
toCapData: import("@endo/marshal").ToCapData<string>;
|
|
49
|
+
fromCapData: import("@endo/marshal").FromCapData<string>;
|
|
50
|
+
serialize: import("@endo/marshal").ToCapData<string>;
|
|
51
|
+
unserialize: import("@endo/marshal").FromCapData<string>;
|
|
52
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
53
|
+
toCapData: import("@endo/marshal").ToCapData<string>;
|
|
54
|
+
fromCapData: import("@endo/marshal").FromCapData<string>;
|
|
55
|
+
serialize: import("@endo/marshal").ToCapData<string>;
|
|
56
|
+
unserialize: import("@endo/marshal").FromCapData<string>;
|
|
57
57
|
}>;
|
|
58
58
|
};
|
|
59
59
|
export function makeLoggingPresence(iface: string, log: (parts: unknown[]) => void): any;
|
|
60
|
-
export type BoardId = import('@agoric/vats/src/lib-board.js').BoardId;
|
|
61
60
|
/**
|
|
62
|
-
*
|
|
61
|
+
* When marshaling a purse, payment, etc. we partition the slots using prefixes.
|
|
63
62
|
*/
|
|
64
63
|
export type WalletSlot<T extends Record<string, IdTable<any, any>>> = `${string & keyof T}:${Digits}`;
|
|
65
64
|
/**
|
|
@@ -67,22 +66,26 @@ export type WalletSlot<T extends Record<string, IdTable<any, any>>> = `${string
|
|
|
67
66
|
*/
|
|
68
67
|
export type KindSlot<K extends string> = `${K}:${Digits}`;
|
|
69
68
|
/**
|
|
70
|
-
*
|
|
69
|
+
* Since KindSlots always include a colon and BoardIds never do, we an mix them
|
|
70
|
+
* without confusion.
|
|
71
71
|
*/
|
|
72
72
|
export type MixedSlot<T extends Record<string, IdTable<any, any>>> = WalletSlot<T> | BoardId;
|
|
73
73
|
/**
|
|
74
|
-
* - 1 or more digits.
|
|
75
|
-
*
|
|
76
|
-
* actual usage.
|
|
74
|
+
* - 1 or more digits. NOTE: the typescript
|
|
75
|
+
* definition here is more restrictive than actual usage.
|
|
77
76
|
*/
|
|
78
77
|
export type Digits = `1` | `12` | `123`;
|
|
79
78
|
/**
|
|
80
79
|
* <Value>
|
|
81
80
|
*/
|
|
82
|
-
export type IdTable<Slot, Val> = {
|
|
81
|
+
export type IdTable<Slot extends Key, Val extends PassableCap> = {
|
|
83
82
|
bySlot: MapStore<Slot, Val>;
|
|
84
83
|
byVal: MapStore<Val, Slot>;
|
|
85
84
|
};
|
|
86
85
|
export type ExportContext = ReturnType<typeof makeExportContext>;
|
|
87
86
|
export type ImportContext = ReturnType<typeof makeImportContext>;
|
|
87
|
+
import type { BoardId } from '@agoric/vats/src/lib-board.js';
|
|
88
|
+
import type { RemotableObject } from '@endo/marshal';
|
|
89
|
+
import type { PassableCap } from '@endo/marshal';
|
|
90
|
+
import type { Key } from '@endo/patterns';
|
|
88
91
|
//# sourceMappingURL=marshal-contexts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marshal-contexts.d.ts","sourceRoot":"","sources":["marshal-contexts.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"marshal-contexts.d.ts","sourceRoot":"","sources":["marshal-contexts.js"],"names":[],"mappings":"AAuHO;;;;;;;IAoFH;;;OAGG;sBAFQ,MAAM,SACN,KAAK;;IAMhB;;;OAGG;sBAFQ,OAAO,OACP,eAAe;IAK1B;;;OAGG;wBAFQ,OAAO,OACP,eAAe;EAW7B;AAcM,0DAFY,MAAM,KAAK,WAAW;IA8FrC;;;OAGG;sBAFQ,OAAO,OACP,WAAW;IAKtB;;;OAGG;wBAFQ,OAAO,OACP,WAAW;;;;;;;;;;;;;;;;;;;;;;;EAYzB;AA4BM,2CAHI,MAAM,OACN,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,OAapC;;;;uBAlXgD,CAAC,SAApC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAE,IACnC,GAAG,MAAM,GAAG,MAAM,CAAC,IAAI,MAAM,EAAE;;;;qBAGtB,CAAC,SAAV,MAAQ,IACR,GAAG,CAAC,IAAI,MAAM,EAAE;;;;;sBA0CoB,CAAC,SAApC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAE,IACnC,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO;;;;;qBAGvB,GAAG,GAAG,IAAI,GAAG,KAAK;;;;oBAKZ,IAAI,SAAV,GAAK,EACS,GAAG,SAAjB,WAAa,IACb;IACR,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC5B,KAAK,EAAE,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;CAC5B;4BAgJU,UAAU,CAAC,OAAO,iBAAiB,CAAC;4BA+HpC,UAAU,CAAC,OAAO,iBAAiB,CAAC;6BA5VxB,+BAA+B;qCAFV,eAAe;iCAAf,eAAe;yBACxC,gBAAgB"}
|