@agoric/orchestration 0.1.1-dev-decd4ff.0 → 0.1.1-dev-9f8732f.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 +18 -17
- package/src/utils/address.d.ts.map +1 -1
- package/src/utils/address.js +8 -1
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-9f8732f.0+9f8732f",
|
|
4
4
|
"description": "Chain abstraction for Agoric's orchestration clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -33,29 +33,30 @@
|
|
|
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-9f8732f.0+9f8732f",
|
|
37
|
+
"@agoric/cosmic-proto": "0.4.1-dev-9f8732f.0+9f8732f",
|
|
38
|
+
"@agoric/ertp": "0.16.3-dev-9f8732f.0+9f8732f",
|
|
39
|
+
"@agoric/internal": "0.3.3-dev-9f8732f.0+9f8732f",
|
|
40
|
+
"@agoric/network": "0.1.1-dev-9f8732f.0+9f8732f",
|
|
41
|
+
"@agoric/notifier": "0.6.3-dev-9f8732f.0+9f8732f",
|
|
42
|
+
"@agoric/store": "0.9.3-dev-9f8732f.0+9f8732f",
|
|
43
|
+
"@agoric/time": "0.3.3-dev-9f8732f.0+9f8732f",
|
|
44
|
+
"@agoric/vat-data": "0.5.3-dev-9f8732f.0+9f8732f",
|
|
45
|
+
"@agoric/vats": "0.15.2-dev-9f8732f.0+9f8732f",
|
|
46
|
+
"@agoric/vow": "0.1.1-dev-9f8732f.0+9f8732f",
|
|
47
|
+
"@agoric/zoe": "0.26.3-dev-9f8732f.0+9f8732f",
|
|
48
|
+
"@agoric/zone": "0.2.3-dev-9f8732f.0+9f8732f",
|
|
49
49
|
"@cosmjs/encoding": "^0.32.4",
|
|
50
50
|
"@endo/base64": "^1.0.9",
|
|
51
51
|
"@endo/errors": "^1.2.10",
|
|
52
52
|
"@endo/far": "^1.1.11",
|
|
53
53
|
"@endo/marshal": "^1.6.4",
|
|
54
54
|
"@endo/patterns": "^1.5.0",
|
|
55
|
-
"@noble/hashes": "^1.5.0"
|
|
55
|
+
"@noble/hashes": "^1.5.0",
|
|
56
|
+
"bs58": "^6.0.0"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
59
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-9f8732f.0+9f8732f",
|
|
59
60
|
"@chain-registry/client": "^1.47.4",
|
|
60
61
|
"@cosmjs/amino": "^0.33.0",
|
|
61
62
|
"@cosmjs/proto-signing": "^0.33.0",
|
|
@@ -98,5 +99,5 @@
|
|
|
98
99
|
"typeCoverage": {
|
|
99
100
|
"atLeast": 97.84
|
|
100
101
|
},
|
|
101
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "9f8732f9cd1536e2453a74a95b5b14e456e9e119"
|
|
102
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["address.js"],"names":[],"mappings":"
|
|
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;AASM,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;;;;;;;;;;;;;;;;;;;;;qCA7LiC,cAAc;sCAGb,iCAAiC;wCAFH,aAAa;mCAAb,aAAa;kCACtB,yBAAyB;kCAAzB,yBAAyB;+BAAzB,yBAAyB;iCADhB,aAAa"}
|
package/src/utils/address.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Fail, q } from '@endo/errors';
|
|
2
1
|
import { fromHex } from '@cosmjs/encoding';
|
|
2
|
+
import { Fail, q } from '@endo/errors';
|
|
3
|
+
import bs58 from 'bs58';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @import {IBCConnectionID} from '@agoric/vats';
|
|
@@ -172,6 +173,10 @@ export const leftPadEthAddressTo32Bytes = rawAddress => {
|
|
|
172
173
|
return fromHex(paddedAddress);
|
|
173
174
|
};
|
|
174
175
|
|
|
176
|
+
/** @param {string} solanaAddress */
|
|
177
|
+
const solanaAddressToCctpRecipient = solanaAddress =>
|
|
178
|
+
bs58.decode(solanaAddress);
|
|
179
|
+
|
|
175
180
|
/**
|
|
176
181
|
* @param {AccountId} accountId
|
|
177
182
|
* @returns {Uint8Array}
|
|
@@ -182,6 +187,8 @@ export const accountIdTo32Bytes = accountId => {
|
|
|
182
187
|
switch (namespace) {
|
|
183
188
|
case 'eip155':
|
|
184
189
|
return leftPadEthAddressTo32Bytes(accountAddress);
|
|
190
|
+
case 'solana':
|
|
191
|
+
return solanaAddressToCctpRecipient(accountAddress);
|
|
185
192
|
default:
|
|
186
193
|
throw new Error(`namespace ${namespace} not supported`);
|
|
187
194
|
}
|