@agoric/orchestration 0.1.1-dev-19f738b.0.19f738b → 0.1.1-dev-82a1d65.0.82a1d65

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/orchestration",
3
- "version": "0.1.1-dev-19f738b.0.19f738b",
3
+ "version": "0.1.1-dev-82a1d65.0.82a1d65",
4
4
  "description": "Chain abstraction for Agoric's orchestration clients",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -35,18 +35,18 @@
35
35
  },
36
36
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
37
37
  "dependencies": {
38
- "@agoric/async-flow": "0.1.1-dev-19f738b.0.19f738b",
39
- "@agoric/cosmic-proto": "0.4.1-dev-19f738b.0.19f738b",
40
- "@agoric/ertp": "0.16.3-dev-19f738b.0.19f738b",
41
- "@agoric/internal": "0.3.3-dev-19f738b.0.19f738b",
42
- "@agoric/network": "0.1.1-dev-19f738b.0.19f738b",
43
- "@agoric/notifier": "0.6.3-dev-19f738b.0.19f738b",
44
- "@agoric/store": "0.9.3-dev-19f738b.0.19f738b",
45
- "@agoric/time": "0.3.3-dev-19f738b.0.19f738b",
46
- "@agoric/vat-data": "0.5.3-dev-19f738b.0.19f738b",
47
- "@agoric/vow": "0.1.1-dev-19f738b.0.19f738b",
48
- "@agoric/zoe": "0.26.3-dev-19f738b.0.19f738b",
49
- "@agoric/zone": "0.2.3-dev-19f738b.0.19f738b",
38
+ "@agoric/async-flow": "0.1.1-dev-82a1d65.0.82a1d65",
39
+ "@agoric/cosmic-proto": "0.4.1-dev-82a1d65.0.82a1d65",
40
+ "@agoric/ertp": "0.16.3-dev-82a1d65.0.82a1d65",
41
+ "@agoric/internal": "0.3.3-dev-82a1d65.0.82a1d65",
42
+ "@agoric/network": "0.1.1-dev-82a1d65.0.82a1d65",
43
+ "@agoric/notifier": "0.6.3-dev-82a1d65.0.82a1d65",
44
+ "@agoric/store": "0.9.3-dev-82a1d65.0.82a1d65",
45
+ "@agoric/time": "0.3.3-dev-82a1d65.0.82a1d65",
46
+ "@agoric/vat-data": "0.5.3-dev-82a1d65.0.82a1d65",
47
+ "@agoric/vow": "0.1.1-dev-82a1d65.0.82a1d65",
48
+ "@agoric/zoe": "0.26.3-dev-82a1d65.0.82a1d65",
49
+ "@agoric/zone": "0.2.3-dev-82a1d65.0.82a1d65",
50
50
  "@cosmjs/encoding": "^0.36.0",
51
51
  "@endo/base64": "^1.1.1",
52
52
  "@endo/common": "^1.4.0",
@@ -61,9 +61,9 @@
61
61
  "bs58": "^6.0.0"
62
62
  },
63
63
  "devDependencies": {
64
- "@agoric/swingset-liveslots": "0.10.3-dev-19f738b.0.19f738b",
65
- "@agoric/vats": "0.15.2-dev-19f738b.0.19f738b",
66
- "@agoric/xsnap": "0.14.3-dev-19f738b.0.19f738b",
64
+ "@agoric/swingset-liveslots": "0.10.3-dev-82a1d65.0.82a1d65",
65
+ "@agoric/vats": "0.15.2-dev-82a1d65.0.82a1d65",
66
+ "@agoric/xsnap": "0.14.3-dev-82a1d65.0.82a1d65",
67
67
  "@chain-registry/client": "^1.53.194",
68
68
  "@cosmjs/amino": "^0.36.0",
69
69
  "@cosmjs/proto-signing": "^0.36.0",
@@ -100,5 +100,5 @@
100
100
  "typeCoverage": {
101
101
  "atLeast": 96.68
102
102
  },
103
- "gitHead": "19f738b22be4dbf7710ff9a638884b7ae9b031cf"
103
+ "gitHead": "82a1d65dcde4d1da305f8ce43539075c764bd510"
104
104
  }
@@ -10,6 +10,7 @@ export {
10
10
  isHex,
11
11
  hashStruct,
12
12
  hashTypedData,
13
+ recoverAddress,
13
14
  recoverTypedDataAddress,
14
15
  verifyTypedData,
15
16
  serializeTypedData,
@@ -20,6 +20,48 @@ import {
20
20
  toHex
21
21
  } from "./chunk-UQHGCCOH.js";
22
22
 
23
+ // ../../node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js
24
+ function publicKeyToAddress(publicKey) {
25
+ const address = keccak256(`0x${publicKey.substring(4)}`).substring(26);
26
+ return checksumAddress(`0x${address}`);
27
+ }
28
+
29
+ // ../../node_modules/viem/_esm/utils/signature/recoverPublicKey.js
30
+ async function recoverPublicKey({ hash, signature }) {
31
+ const hashHex = isHex(hash) ? hash : toHex(hash);
32
+ const { secp256k1 } = await import("@noble/curves/secp256k1");
33
+ const signature_ = (() => {
34
+ if (typeof signature === "object" && "r" in signature && "s" in signature) {
35
+ const { r, s, v, yParity } = signature;
36
+ const yParityOrV2 = Number(yParity ?? v);
37
+ const recoveryBit2 = toRecoveryBit(yParityOrV2);
38
+ return new secp256k1.Signature(hexToBigInt(r), hexToBigInt(s)).addRecoveryBit(recoveryBit2);
39
+ }
40
+ const signatureHex = isHex(signature) ? signature : toHex(signature);
41
+ if (size(signatureHex) !== 65)
42
+ throw new Error("invalid signature length");
43
+ const yParityOrV = hexToNumber(`0x${signatureHex.slice(130)}`);
44
+ const recoveryBit = toRecoveryBit(yParityOrV);
45
+ return secp256k1.Signature.fromCompact(signatureHex.substring(2, 130)).addRecoveryBit(recoveryBit);
46
+ })();
47
+ const publicKey = signature_.recoverPublicKey(hashHex.substring(2)).toHex(false);
48
+ return `0x${publicKey}`;
49
+ }
50
+ function toRecoveryBit(yParityOrV) {
51
+ if (yParityOrV === 0 || yParityOrV === 1)
52
+ return yParityOrV;
53
+ if (yParityOrV === 27)
54
+ return 0;
55
+ if (yParityOrV === 28)
56
+ return 1;
57
+ throw new Error("Invalid yParityOrV value");
58
+ }
59
+
60
+ // ../../node_modules/viem/_esm/utils/signature/recoverAddress.js
61
+ async function recoverAddress({ hash, signature }) {
62
+ return publicKeyToAddress(await recoverPublicKey({ hash, signature }));
63
+ }
64
+
23
65
  // ../../node_modules/viem/_esm/errors/typedData.js
24
66
  var InvalidDomainError = class extends BaseError {
25
67
  constructor({ domain }) {
@@ -245,48 +287,6 @@ function validateReference(type) {
245
287
  throw new InvalidStructTypeError({ type });
246
288
  }
247
289
 
248
- // ../../node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js
249
- function publicKeyToAddress(publicKey) {
250
- const address = keccak256(`0x${publicKey.substring(4)}`).substring(26);
251
- return checksumAddress(`0x${address}`);
252
- }
253
-
254
- // ../../node_modules/viem/_esm/utils/signature/recoverPublicKey.js
255
- async function recoverPublicKey({ hash, signature }) {
256
- const hashHex = isHex(hash) ? hash : toHex(hash);
257
- const { secp256k1 } = await import("@noble/curves/secp256k1");
258
- const signature_ = (() => {
259
- if (typeof signature === "object" && "r" in signature && "s" in signature) {
260
- const { r, s, v, yParity } = signature;
261
- const yParityOrV2 = Number(yParity ?? v);
262
- const recoveryBit2 = toRecoveryBit(yParityOrV2);
263
- return new secp256k1.Signature(hexToBigInt(r), hexToBigInt(s)).addRecoveryBit(recoveryBit2);
264
- }
265
- const signatureHex = isHex(signature) ? signature : toHex(signature);
266
- if (size(signatureHex) !== 65)
267
- throw new Error("invalid signature length");
268
- const yParityOrV = hexToNumber(`0x${signatureHex.slice(130)}`);
269
- const recoveryBit = toRecoveryBit(yParityOrV);
270
- return secp256k1.Signature.fromCompact(signatureHex.substring(2, 130)).addRecoveryBit(recoveryBit);
271
- })();
272
- const publicKey = signature_.recoverPublicKey(hashHex.substring(2)).toHex(false);
273
- return `0x${publicKey}`;
274
- }
275
- function toRecoveryBit(yParityOrV) {
276
- if (yParityOrV === 0 || yParityOrV === 1)
277
- return yParityOrV;
278
- if (yParityOrV === 27)
279
- return 0;
280
- if (yParityOrV === 28)
281
- return 1;
282
- throw new Error("Invalid yParityOrV value");
283
- }
284
-
285
- // ../../node_modules/viem/_esm/utils/signature/recoverAddress.js
286
- async function recoverAddress({ hash, signature }) {
287
- return publicKeyToAddress(await recoverPublicKey({ hash, signature }));
288
- }
289
-
290
290
  // ../../node_modules/viem/_esm/utils/signature/recoverTypedDataAddress.js
291
291
  async function recoverTypedDataAddress(parameters) {
292
292
  const { domain, message, primaryType, signature, types } = parameters;
@@ -314,6 +314,7 @@ async function verifyTypedData(parameters) {
314
314
  }
315
315
 
316
316
  export {
317
+ recoverAddress,
317
318
  serializeTypedData,
318
319
  validateTypedData,
319
320
  getTypesForEIP712Domain,
@@ -1,4 +1,4 @@
1
- import "./chunk-XNGNAKRR.js";
1
+ import "./chunk-7BNMBC44.js";
2
2
  import {
3
3
  decodeAbiParameters,
4
4
  encodeAbiParameters,
@@ -1,4 +1,4 @@
1
- import "./chunk-XNGNAKRR.js";
1
+ import "./chunk-7BNMBC44.js";
2
2
  import {
3
3
  getAddress,
4
4
  isAddress,
@@ -1,4 +1,4 @@
1
- export { hashStruct, hashTypedData, isHex, recoverTypedDataAddress, serializeTypedData, validateTypedData, verifyTypedData } from 'viem/utils';
1
+ export { hashStruct, hashTypedData, isHex, recoverAddress, recoverTypedDataAddress, serializeTypedData, validateTypedData, verifyTypedData } from 'viem/utils';
2
2
  export { getTypesForEIP712Domain } from 'viem';
3
3
 
4
4
  /**
@@ -2,11 +2,12 @@ import {
2
2
  getTypesForEIP712Domain,
3
3
  hashStruct,
4
4
  hashTypedData,
5
+ recoverAddress,
5
6
  recoverTypedDataAddress,
6
7
  serializeTypedData,
7
8
  validateTypedData,
8
9
  verifyTypedData
9
- } from "./chunk-XNGNAKRR.js";
10
+ } from "./chunk-7BNMBC44.js";
10
11
  import {
11
12
  isHex
12
13
  } from "./chunk-UQHGCCOH.js";
@@ -47,6 +48,7 @@ export {
47
48
  hashStruct,
48
49
  hashTypedData,
49
50
  isHex,
51
+ recoverAddress,
50
52
  recoverTypedDataAddress,
51
53
  serializeTypedData,
52
54
  validateTypedData,