@agoric/orchestration 0.1.1-dev-3190128.0 → 0.1.1-dev-decd4ff.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/orchestration",
3
- "version": "0.1.1-dev-3190128.0+3190128",
3
+ "version": "0.1.1-dev-decd4ff.0+decd4ff",
4
4
  "description": "Chain abstraction for Agoric's orchestration clients",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -33,19 +33,19 @@
33
33
  },
34
34
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
35
35
  "dependencies": {
36
- "@agoric/async-flow": "0.1.1-dev-3190128.0+3190128",
37
- "@agoric/cosmic-proto": "0.4.1-dev-3190128.0+3190128",
38
- "@agoric/ertp": "0.16.3-dev-3190128.0+3190128",
39
- "@agoric/internal": "0.3.3-dev-3190128.0+3190128",
40
- "@agoric/network": "0.1.1-dev-3190128.0+3190128",
41
- "@agoric/notifier": "0.6.3-dev-3190128.0+3190128",
42
- "@agoric/store": "0.9.3-dev-3190128.0+3190128",
43
- "@agoric/time": "0.3.3-dev-3190128.0+3190128",
44
- "@agoric/vat-data": "0.5.3-dev-3190128.0+3190128",
45
- "@agoric/vats": "0.15.2-dev-3190128.0+3190128",
46
- "@agoric/vow": "0.1.1-dev-3190128.0+3190128",
47
- "@agoric/zoe": "0.26.3-dev-3190128.0+3190128",
48
- "@agoric/zone": "0.2.3-dev-3190128.0+3190128",
36
+ "@agoric/async-flow": "0.1.1-dev-decd4ff.0+decd4ff",
37
+ "@agoric/cosmic-proto": "0.4.1-dev-decd4ff.0+decd4ff",
38
+ "@agoric/ertp": "0.16.3-dev-decd4ff.0+decd4ff",
39
+ "@agoric/internal": "0.3.3-dev-decd4ff.0+decd4ff",
40
+ "@agoric/network": "0.1.1-dev-decd4ff.0+decd4ff",
41
+ "@agoric/notifier": "0.6.3-dev-decd4ff.0+decd4ff",
42
+ "@agoric/store": "0.9.3-dev-decd4ff.0+decd4ff",
43
+ "@agoric/time": "0.3.3-dev-decd4ff.0+decd4ff",
44
+ "@agoric/vat-data": "0.5.3-dev-decd4ff.0+decd4ff",
45
+ "@agoric/vats": "0.15.2-dev-decd4ff.0+decd4ff",
46
+ "@agoric/vow": "0.1.1-dev-decd4ff.0+decd4ff",
47
+ "@agoric/zoe": "0.26.3-dev-decd4ff.0+decd4ff",
48
+ "@agoric/zone": "0.2.3-dev-decd4ff.0+decd4ff",
49
49
  "@cosmjs/encoding": "^0.32.4",
50
50
  "@endo/base64": "^1.0.9",
51
51
  "@endo/errors": "^1.2.10",
@@ -55,7 +55,7 @@
55
55
  "@noble/hashes": "^1.5.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@agoric/swingset-liveslots": "0.10.3-dev-3190128.0+3190128",
58
+ "@agoric/swingset-liveslots": "0.10.3-dev-decd4ff.0+decd4ff",
59
59
  "@chain-registry/client": "^1.47.4",
60
60
  "@cosmjs/amino": "^0.33.0",
61
61
  "@cosmjs/proto-signing": "^0.33.0",
@@ -98,5 +98,5 @@
98
98
  "typeCoverage": {
99
99
  "atLeast": 97.84
100
100
  },
101
- "gitHead": "319012817be4498d42ea95c0f8460e1edb2ecb9c"
101
+ "gitHead": "decd4fff2577c63c48facbadb8f9ea45080a5e11"
102
102
  }
@@ -5,6 +5,7 @@ export function findAddressField(remoteAddressString: RemoteIbcAddress): CosmosC
5
5
  export function getBech32Prefix(address: Bech32Address | string): string;
6
6
  export function parseAccountIdArg(idArg: AccountIdArg): Caip10Record;
7
7
  export function parseAccountId(accountId: AccountId): Caip10Record;
8
+ export function chainOfAccount(accountIdArg: AccountIdArg): CaipChainId;
8
9
  export function leftPadEthAddressTo32Bytes(rawAddress: string): Uint8Array<ArrayBufferLike>;
9
10
  export function accountIdTo32Bytes(accountId: AccountId): Uint8Array;
10
11
  export type ICAChannelAddressOpts = {
@@ -34,4 +35,5 @@ import type { Bech32Address } from '../types.js';
34
35
  import type { AccountIdArg } from '../orchestration-api.js';
35
36
  import type { Caip10Record } from '../orchestration-api.js';
36
37
  import type { AccountId } from '../orchestration-api.js';
38
+ import type { CaipChainId } from '../types.js';
37
39
  //# sourceMappingURL=address.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["address.js"],"names":[],"mappings":"AA0BO,wDALI,eAAe,0BACf,eAAe,6CACf,qBAAqB,GACnB,gBAAgB,CAuB5B;AAGD,kCAAmC,OAAO,CAAC;AAOpC,8DAJI,eAAe,YACf,MAAM,GACJ,gBAAgB,CAQ5B;AAaM,sDAJI,gBAAgB,GAEd,kBAAkB,CAAC,OAAO,CAAC,GAAG,SAAS,CAYnD;AAaM,yCAHI,aAAa,GAAG,MAAM,GACpB,MAAM,CAQlB;AASM,yCAJI,YAAY,GAEV,YAAY,CAaxB;AASM,0CAHI,SAAS,GACP,YAAY,CAaxB;AAUM,uDAFI,MAAM,+BAOhB;AAOM,8CAJI,SAAS,GACP,UAAU,CAWtB;;;;;;;;;;;;;;;;;;;;;qCA3KiC,cAAc;sCAGb,iCAAiC;wCAFH,aAAa;mCAAb,aAAa;kCACtB,yBAAyB;kCAAzB,yBAAyB;+BAAzB,yBAAyB"}
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["address.js"],"names":[],"mappings":"AA0BO,wDALI,eAAe,0BACf,eAAe,6CACf,qBAAqB,GACnB,gBAAgB,CAuB5B;AAGD,kCAAmC,OAAO,CAAC;AAOpC,8DAJI,eAAe,YACf,MAAM,GACJ,gBAAgB,CAQ5B;AAaM,sDAJI,gBAAgB,GAEd,kBAAkB,CAAC,OAAO,CAAC,GAAG,SAAS,CAYnD;AAaM,yCAHI,aAAa,GAAG,MAAM,GACpB,MAAM,CAQlB;AASM,yCAJI,YAAY,GAEV,YAAY,CAaxB;AASM,0CAHI,SAAS,GACP,YAAY,CAaxB;AAUM,6CAJI,YAAY,GAEV,WAAW,CAKvB;AASM,uDAFI,MAAM,+BAOhB;AAOM,8CAJI,SAAS,GACP,UAAU,CAWtB;;;;;;;;;;;;;;;;;;;;;qCAvLiC,cAAc;sCAGb,iCAAiC;wCAFH,aAAa;mCAAb,aAAa;kCACtB,yBAAyB;kCAAzB,yBAAyB;+BAAzB,yBAAyB;iCADhB,aAAa"}
@@ -146,6 +146,18 @@ export const parseAccountId = accountId => {
146
146
  };
147
147
  harden(parseAccountId);
148
148
 
149
+ /**
150
+ * Extract a {@link CaipChainId} from an account ID or unscoped chain address.
151
+ *
152
+ * @param {AccountIdArg} accountIdArg CAIP-10 account ID or unscoped chain
153
+ * address
154
+ * @returns {CaipChainId}
155
+ */
156
+ export const chainOfAccount = accountIdArg => {
157
+ const { namespace, reference } = parseAccountIdArg(accountIdArg);
158
+ return `${namespace}:${reference}`;
159
+ };
160
+
149
161
  /**
150
162
  * Left pad the mint recipient address with 0's to 32 bytes. standard ETH
151
163
  * addresses are 20 bytes, but for ABI data structures and other reasons, 32