@agoric/smart-wallet 0.5.4-dev-d756c83.0.d756c83 → 0.5.4-dev-e9efaa1.0.e9efaa1

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.
Files changed (3) hide show
  1. package/package.json +16 -16
  2. package/src/types.js +90 -0
  3. package/src/types.ts +0 -90
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@agoric/smart-wallet",
3
- "version": "0.5.4-dev-d756c83.0.d756c83",
3
+ "version": "0.5.4-dev-e9efaa1.0.e9efaa1",
4
4
  "description": "Wallet contract",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "scripts": {
8
8
  "build": "yarn build:bundles",
9
9
  "build:bundles": "node ./scripts/build-bundles.js",
10
- "prepack": "yarn run -T tsc --build tsconfig.build.json",
11
- "postpack": "git clean -f '*.d.*ts*' '*.tsbuildinfo'",
10
+ "prepack": "yarn run -T prepack-package",
11
+ "postpack": "yarn run -T postpack-package",
12
12
  "test": "ava",
13
13
  "test:c8": "c8 --all $C8_OPTIONS ava",
14
14
  "test:xs": "exit 0",
@@ -18,9 +18,9 @@
18
18
  "lint:eslint": "yarn run -T eslint ."
19
19
  },
20
20
  "devDependencies": {
21
- "@agoric/casting": "0.4.3-dev-d756c83.0.d756c83",
22
- "@agoric/cosmic-proto": "0.4.1-dev-d756c83.0.d756c83",
23
- "@agoric/swingset-vat": "0.32.3-dev-d756c83.0.d756c83",
21
+ "@agoric/casting": "0.4.3-dev-e9efaa1.0.e9efaa1",
22
+ "@agoric/cosmic-proto": "0.4.1-dev-e9efaa1.0.e9efaa1",
23
+ "@agoric/swingset-vat": "0.32.3-dev-e9efaa1.0.e9efaa1",
24
24
  "@endo/bundle-source": "^4.1.2",
25
25
  "@endo/captp": "^4.4.8",
26
26
  "@endo/init": "^1.1.12",
@@ -28,15 +28,15 @@
28
28
  "import-meta-resolve": "^4.1.0"
29
29
  },
30
30
  "dependencies": {
31
- "@agoric/ertp": "0.16.3-dev-d756c83.0.d756c83",
32
- "@agoric/internal": "0.3.3-dev-d756c83.0.d756c83",
33
- "@agoric/notifier": "0.6.3-dev-d756c83.0.d756c83",
34
- "@agoric/store": "0.9.3-dev-d756c83.0.d756c83",
35
- "@agoric/vat-data": "0.5.3-dev-d756c83.0.d756c83",
36
- "@agoric/vats": "0.15.2-dev-d756c83.0.d756c83",
37
- "@agoric/vow": "0.1.1-dev-d756c83.0.d756c83",
38
- "@agoric/zoe": "0.26.3-dev-d756c83.0.d756c83",
39
- "@agoric/zone": "0.2.3-dev-d756c83.0.d756c83",
31
+ "@agoric/ertp": "0.16.3-dev-e9efaa1.0.e9efaa1",
32
+ "@agoric/internal": "0.3.3-dev-e9efaa1.0.e9efaa1",
33
+ "@agoric/notifier": "0.6.3-dev-e9efaa1.0.e9efaa1",
34
+ "@agoric/store": "0.9.3-dev-e9efaa1.0.e9efaa1",
35
+ "@agoric/vat-data": "0.5.3-dev-e9efaa1.0.e9efaa1",
36
+ "@agoric/vats": "0.15.2-dev-e9efaa1.0.e9efaa1",
37
+ "@agoric/vow": "0.1.1-dev-e9efaa1.0.e9efaa1",
38
+ "@agoric/zoe": "0.26.3-dev-e9efaa1.0.e9efaa1",
39
+ "@agoric/zone": "0.2.3-dev-e9efaa1.0.e9efaa1",
40
40
  "@endo/errors": "^1.2.13",
41
41
  "@endo/eventual-send": "^1.3.4",
42
42
  "@endo/far": "^1.1.14",
@@ -77,5 +77,5 @@
77
77
  "engines": {
78
78
  "node": "^20.9 || ^22.11"
79
79
  },
80
- "gitHead": "d756c838c7eb3e3cec4a8bdf5c24b97f942b754e"
80
+ "gitHead": "e9efaa12254f2c9a6faffc40ade2f1d9a70b87ae"
81
81
  }
package/src/types.js ADDED
@@ -0,0 +1,90 @@
1
+ /**
2
+ * @file Some types for smart-wallet contract
3
+ *
4
+ * Similar to types.js but in TypeScript syntax because some types here need it.
5
+ * Downside is it can't reference any ambient types, which most of agoric-sdk type are presently.
6
+ */
7
+
8
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- fails to notice the @see uses
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+ // Match the type in Zoe, which can't be imported because it's ambient.
17
+ // This omits the parameters that aren't used in this module.
18
+
19
+
20
+ /**
21
+ * A petname can either be a plain string or a path for which the first element
22
+ * is a petname for the origin, and the rest of the elements are a snapshot of
23
+ * the names that were first given by that origin. We are migrating away from
24
+ * using plain strings, for consistency.
25
+ */
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+ /**
46
+ * Defined by walletAction struct in msg_server.go
47
+ *
48
+ * @see {agoric.swingset.MsgWalletAction} and walletSpendAction in msg_server.go
49
+ */
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ /**
61
+ * Defined by walletSpendAction struct in msg_server.go
62
+ *
63
+ * @see {agoric.swingset.MsgWalletSpendAction} and walletSpendAction in msg_server.go
64
+ */
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+ /**
76
+ * Messages transmitted over Cosmos chain, cryptographically verifying that the
77
+ * message came from the 'owner'.
78
+ *
79
+ * The two wallet actions are distinguished by whether the user had to confirm
80
+ * the sending of the message (as is the case for WALLET_SPEND_ACTION).
81
+ */
82
+
83
+
84
+ /**
85
+ * Used for clientSupport helpers
86
+ */
87
+
88
+
89
+
90
+
package/src/types.ts DELETED
@@ -1,90 +0,0 @@
1
- /**
2
- * @file Some types for smart-wallet contract
3
- *
4
- * Similar to types.js but in TypeScript syntax because some types here need it.
5
- * Downside is it can't reference any ambient types, which most of agoric-sdk type are presently.
6
- */
7
-
8
- // eslint-disable-next-line @typescript-eslint/no-unused-vars -- fails to notice the @see uses
9
- import type { agoric } from '@agoric/cosmic-proto/agoric/bundle.js';
10
- import type { Payment } from '@agoric/ertp';
11
- import type { AgoricNamesRemotes } from '@agoric/vats/tools/board-utils.js';
12
- import type { InvitationDetails } from '@agoric/zoe';
13
- import type { PublicTopic } from '@agoric/zoe/src/contractSupport/topics.js';
14
- import type { OfferSpec } from './offers.js';
15
-
16
- // Match the type in Zoe, which can't be imported because it's ambient.
17
- // This omits the parameters that aren't used in this module.
18
- type Invitation = Payment<'set', InvitationDetails>;
19
-
20
- /**
21
- * A petname can either be a plain string or a path for which the first element
22
- * is a petname for the origin, and the rest of the elements are a snapshot of
23
- * the names that were first given by that origin. We are migrating away from
24
- * using plain strings, for consistency.
25
- */
26
- export type Petname = string | string[];
27
-
28
- export type InvitationMakers = Record<
29
- string,
30
- (...args: any[]) => Promise<Invitation>
31
- >;
32
-
33
- export type PublicSubscribers = Record<string, PublicTopic<unknown>>;
34
-
35
- export interface ContinuingOfferResult {
36
- invitationMakers: InvitationMakers;
37
- publicSubscribers: PublicSubscribers;
38
- }
39
-
40
- export type Cell<T> = {
41
- get: () => T;
42
- set(val: T): void;
43
- };
44
-
45
- /**
46
- * Defined by walletAction struct in msg_server.go
47
- *
48
- * @see {agoric.swingset.MsgWalletAction} and walletSpendAction in msg_server.go
49
- */
50
- export type WalletActionMsg = {
51
- type: 'WALLET_ACTION';
52
- /** base64 of Uint8Array of bech32 data */
53
- owner: string;
54
- /** JSON of marshalled BridgeAction */
55
- action: string;
56
- blockHeight: unknown; // int64
57
- blockTime: unknown; // int64
58
- };
59
-
60
- /**
61
- * Defined by walletSpendAction struct in msg_server.go
62
- *
63
- * @see {agoric.swingset.MsgWalletSpendAction} and walletSpendAction in msg_server.go
64
- */
65
- export type WalletSpendActionMsg = {
66
- type: 'WALLET_SPEND_ACTION';
67
- /** base64 of Uint8Array of bech32 data */
68
- owner: string;
69
- /** JSON of BridgeActionCapData */
70
- spendAction: string;
71
- blockHeight: unknown; // int64
72
- blockTime: unknown; // int64
73
- };
74
-
75
- /**
76
- * Messages transmitted over Cosmos chain, cryptographically verifying that the
77
- * message came from the 'owner'.
78
- *
79
- * The two wallet actions are distinguished by whether the user had to confirm
80
- * the sending of the message (as is the case for WALLET_SPEND_ACTION).
81
- */
82
- export type WalletBridgeMsg = WalletActionMsg | WalletSpendActionMsg;
83
-
84
- /**
85
- * Used for clientSupport helpers
86
- */
87
- export type OfferMaker = (
88
- agoricNames: AgoricNamesRemotes,
89
- ...rest: any[]
90
- ) => OfferSpec;