@agoric/orchestration 0.1.1-dev-316a778.0 → 0.1.1-dev-04bd001.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/utils/address.d.ts +2 -1
- package/src/utils/address.d.ts.map +1 -1
- package/src/utils/address.js +18 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/orchestration",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-04bd001.0+04bd001",
|
|
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-
|
|
37
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
38
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
39
|
-
"@agoric/internal": "0.3.3-dev-
|
|
40
|
-
"@agoric/network": "0.1.1-dev-
|
|
41
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
42
|
-
"@agoric/store": "0.9.3-dev-
|
|
43
|
-
"@agoric/time": "0.3.3-dev-
|
|
44
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
45
|
-
"@agoric/vats": "0.15.2-dev-
|
|
46
|
-
"@agoric/vow": "0.1.1-dev-
|
|
47
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
48
|
-
"@agoric/zone": "0.2.3-dev-
|
|
36
|
+
"@agoric/async-flow": "0.1.1-dev-04bd001.0+04bd001",
|
|
37
|
+
"@agoric/cosmic-proto": "0.4.1-dev-04bd001.0+04bd001",
|
|
38
|
+
"@agoric/ertp": "0.16.3-dev-04bd001.0+04bd001",
|
|
39
|
+
"@agoric/internal": "0.3.3-dev-04bd001.0+04bd001",
|
|
40
|
+
"@agoric/network": "0.1.1-dev-04bd001.0+04bd001",
|
|
41
|
+
"@agoric/notifier": "0.6.3-dev-04bd001.0+04bd001",
|
|
42
|
+
"@agoric/store": "0.9.3-dev-04bd001.0+04bd001",
|
|
43
|
+
"@agoric/time": "0.3.3-dev-04bd001.0+04bd001",
|
|
44
|
+
"@agoric/vat-data": "0.5.3-dev-04bd001.0+04bd001",
|
|
45
|
+
"@agoric/vats": "0.15.2-dev-04bd001.0+04bd001",
|
|
46
|
+
"@agoric/vow": "0.1.1-dev-04bd001.0+04bd001",
|
|
47
|
+
"@agoric/zoe": "0.26.3-dev-04bd001.0+04bd001",
|
|
48
|
+
"@agoric/zone": "0.2.3-dev-04bd001.0+04bd001",
|
|
49
49
|
"@cosmjs/encoding": "^0.32.4",
|
|
50
50
|
"@endo/base64": "^1.0.9",
|
|
51
51
|
"@endo/errors": "^1.2.10",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"bs58": "^6.0.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
60
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-04bd001.0+04bd001",
|
|
61
61
|
"@chain-registry/client": "^1.47.4",
|
|
62
62
|
"@cosmjs/amino": "^0.33.0",
|
|
63
63
|
"@cosmjs/proto-signing": "^0.33.0",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"typeCoverage": {
|
|
101
101
|
"atLeast": 97.7
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "04bd00182bbe799103f5b330c89c16da082590ba"
|
|
104
104
|
}
|
package/src/utils/address.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export const DEFAULT_ICQ_VERSION: "icq-1";
|
|
|
3
3
|
export function makeICQChannelAddress(controllerConnectionId: IBCConnectionID, version?: string): RemoteIbcAddress;
|
|
4
4
|
export function findAddressField(remoteAddressString: RemoteIbcAddress): CosmosChainAddress["value"] | undefined;
|
|
5
5
|
export function getBech32Prefix(address: Bech32Address | string): string;
|
|
6
|
+
export function coerceAccountId(idArg: AccountIdArg): AccountId;
|
|
6
7
|
export function parseAccountIdArg(idArg: AccountIdArg): Caip10Record;
|
|
7
8
|
export function parseAccountId(accountId: AccountId): Caip10Record;
|
|
8
9
|
export function chainOfAccount(accountIdArg: AccountIdArg): CaipChainId;
|
|
@@ -33,7 +34,7 @@ import type { RemoteIbcAddress } from '@agoric/vats/tools/ibc-utils.js';
|
|
|
33
34
|
import type { CosmosChainAddress } from '../types.js';
|
|
34
35
|
import type { Bech32Address } from '../types.js';
|
|
35
36
|
import type { AccountIdArg } from '../orchestration-api.js';
|
|
36
|
-
import type { Caip10Record } from '../orchestration-api.js';
|
|
37
37
|
import type { AccountId } from '../orchestration-api.js';
|
|
38
|
+
import type { Caip10Record } from '../orchestration-api.js';
|
|
38
39
|
import type { CaipChainId } from '../types.js';
|
|
39
40
|
//# sourceMappingURL=address.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["address.js"],"names":[],"mappings":"AA2BO,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;
|
|
1
|
+
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["address.js"],"names":[],"mappings":"AA2BO,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;AAWM,uCAJI,YAAY,GAEV,SAAS,CAQrB;AAUM,yCAJI,YAAY,GAEV,YAAY,CAaxB;AASM,0CAHI,SAAS,GACP,YAAY,CAaxB;AAUM,6CAJI,YAAY,GAEV,WAAW,CAKvB;AASM,uDAFI,MAAM,+BAOhB;AAWM,8CAJI,SAAS,GACP,UAAU,CAatB;;;;;;;;;;;;;;;;;;;;;qCA/MiC,cAAc;sCAGb,iCAAiC;wCAFH,aAAa;mCAAb,aAAa;kCACtB,yBAAyB;+BAAzB,yBAAyB;kCAAzB,yBAAyB;iCADhB,aAAa"}
|
package/src/utils/address.js
CHANGED
|
@@ -106,6 +106,24 @@ export const getBech32Prefix = address => {
|
|
|
106
106
|
return address.slice(0, split);
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Coerce an AccountIdArg into a plain AccountId. The latter is now preferred so
|
|
111
|
+
* this utility can be used to adapt legacy calls, in particular from vows
|
|
112
|
+
* outstanding from previous incarnations.
|
|
113
|
+
*
|
|
114
|
+
* @param {AccountIdArg} idArg CAIP-10 account ID or an unscoped on-chain
|
|
115
|
+
* address
|
|
116
|
+
* @returns {AccountId} - The parsed account details.
|
|
117
|
+
*/
|
|
118
|
+
export const coerceAccountId = idArg => {
|
|
119
|
+
if (typeof idArg === 'string') {
|
|
120
|
+
return idArg;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return `cosmos:${idArg.chainId}:${idArg.value}`;
|
|
124
|
+
};
|
|
125
|
+
harden(coerceAccountId);
|
|
126
|
+
|
|
109
127
|
/**
|
|
110
128
|
* Parse an account ID into a structured format following CAIP-10 standards.
|
|
111
129
|
*
|