@hyperlane-xyz/sdk 1.0.0-beta1 → 1.0.0-beta2
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/README.md +30 -3
- package/dist/consts/chainConnectionConfigs.d.ts +13 -22
- package/dist/consts/chainConnectionConfigs.d.ts.map +1 -1
- package/dist/consts/chainConnectionConfigs.js +26 -127
- package/dist/consts/chainConnectionConfigs.js.map +1 -1
- package/dist/consts/chainMetadata.d.ts +80 -25
- package/dist/consts/chainMetadata.d.ts.map +1 -1
- package/dist/consts/chainMetadata.js +479 -89
- package/dist/consts/chainMetadata.js.map +1 -1
- package/dist/consts/chains.d.ts +18 -14
- package/dist/consts/chains.d.ts.map +1 -1
- package/dist/consts/chains.js +29 -13
- package/dist/consts/chains.js.map +1 -1
- package/dist/deploy/middleware/deploy.js +1 -1
- package/dist/deploy/middleware/deploy.js.map +1 -1
- package/dist/domains.d.ts +1 -1
- package/dist/events.js +16 -16
- package/dist/events.js.map +1 -1
- package/dist/gas/calculator.js +1 -1
- package/dist/gas/calculator.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/providers/ChainConnection.d.ts +1 -1
- package/dist/providers/ChainConnection.d.ts.map +1 -1
- package/dist/providers/ChainConnection.js +2 -3
- package/dist/providers/ChainConnection.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/logos/black/arbitrum.svg +1 -0
- package/logos/black/avalanche.svg +1 -0
- package/logos/black/bsc.svg +1 -0
- package/logos/black/celo.svg +1 -0
- package/logos/black/ethereum.svg +8 -0
- package/logos/black/hyperlane.svg +1 -0
- package/logos/black/moonbeam.svg +3 -0
- package/logos/black/near.svg +1 -0
- package/logos/black/optimism.svg +1 -0
- package/logos/black/polygon.svg +1 -0
- package/logos/color/arbitrum.svg +1 -0
- package/logos/color/avalanche.svg +1 -0
- package/logos/color/bsc.svg +1 -0
- package/logos/color/celo.svg +1 -0
- package/logos/color/ethereum.svg +1 -0
- package/logos/color/hyperlane.svg +1 -0
- package/logos/color/moonbeam.svg +1 -0
- package/logos/color/optimism.svg +1 -0
- package/logos/color/polygon.svg +1 -0
- package/package.json +6 -4
- package/dist/consts/metamask.d.ts +0 -17
- package/dist/consts/metamask.d.ts.map +0 -1
- package/dist/consts/metamask.js +0 -50
- package/dist/consts/metamask.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -0.1 38.3 33.7" xml:space="preserve"><path d="M29 10.2c-.7-.4-1.6-.4-2.4 0L21 13.5l-3.8 2.1-5.5 3.3c-.7.4-1.6.4-2.4 0L5 16.3c-.7-.4-1.2-1.2-1.2-2.1v-5c0-.8.4-1.6 1.2-2.1l4.3-2.5c.7-.4 1.6-.4 2.4 0L16 7.2c.7.4 1.2 1.2 1.2 2.1v3.3l3.8-2.2V7c0-.8-.4-1.6-1.2-2.1l-8-4.7c-.7-.4-1.6-.4-2.4 0L1.2 5C.4 5.4 0 6.2 0 7v9.4c0 .8.4 1.6 1.2 2.1l8.1 4.7c.7.4 1.6.4 2.4 0l5.5-3.2 3.8-2.2 5.5-3.2c.7-.4 1.6-.4 2.4 0l4.3 2.5c.7.4 1.2 1.2 1.2 2.1v5c0 .8-.4 1.6-1.2 2.1L29 28.8c-.7.4-1.6.4-2.4 0l-4.3-2.5c-.7-.4-1.2-1.2-1.2-2.1V21l-3.8 2.2v3.3c0 .8.4 1.6 1.2 2.1l8.1 4.7c.7.4 1.6.4 2.4 0l8.1-4.7c.7-.4 1.2-1.2 1.2-2.1V17c0-.8-.4-1.6-1.2-2.1L29 10.2z" fill="#8247e5"/></svg>
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperlane-xyz/sdk",
|
|
3
3
|
"description": "The official SDK for the Hyperlane Network",
|
|
4
|
-
"version": "1.0.0-
|
|
4
|
+
"version": "1.0.0-beta2",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@hyperlane-xyz/celo-ethers-provider": "^0.1.1",
|
|
7
|
-
"@hyperlane-xyz/core": "1.0.0-
|
|
8
|
-
"@hyperlane-xyz/utils": "1.0.0-
|
|
7
|
+
"@hyperlane-xyz/core": "1.0.0-beta2",
|
|
8
|
+
"@hyperlane-xyz/utils": "1.0.0-beta2",
|
|
9
9
|
"@types/debug": "^4.1.7",
|
|
10
10
|
"coingecko-api": "^1.0.10",
|
|
11
11
|
"cross-fetch": "^3.1.5",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"@nomiclabs/hardhat-waffle": "^2.0.2",
|
|
18
18
|
"@types/coingecko-api": "^1.0.10",
|
|
19
19
|
"@types/node": "^16.9.1",
|
|
20
|
+
"@wagmi/chains": "^0.1.3",
|
|
20
21
|
"chai": "^4.3.6",
|
|
21
22
|
"dotenv": "^10.0.0",
|
|
22
23
|
"ethereum-waffle": "^3.4.4",
|
|
@@ -29,7 +30,8 @@
|
|
|
29
30
|
"typescript": "^4.7.2"
|
|
30
31
|
},
|
|
31
32
|
"files": [
|
|
32
|
-
"/dist"
|
|
33
|
+
"/dist",
|
|
34
|
+
"/logos"
|
|
33
35
|
],
|
|
34
36
|
"homepage": "https://www.hyperlane.xyz",
|
|
35
37
|
"keywords": [
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare type MetamaskNetwork = {
|
|
2
|
-
chainId: string;
|
|
3
|
-
chainName: string;
|
|
4
|
-
nativeCurrency: {
|
|
5
|
-
name: string;
|
|
6
|
-
symbol: string;
|
|
7
|
-
decimals: number;
|
|
8
|
-
};
|
|
9
|
-
rpcUrls: string[];
|
|
10
|
-
blockExplorerUrls: string[];
|
|
11
|
-
iconUrls: string[];
|
|
12
|
-
};
|
|
13
|
-
export declare const CELO_PARAMS: MetamaskNetwork;
|
|
14
|
-
export declare const ALFAJORES_PARAMS: MetamaskNetwork;
|
|
15
|
-
export declare const BAKLAVA_PARAMS: MetamaskNetwork;
|
|
16
|
-
export declare function connect(params: MetamaskNetwork): Promise<void>;
|
|
17
|
-
//# sourceMappingURL=metamask.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metamask.d.ts","sourceRoot":"","sources":["../../src/consts/metamask.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAOzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAO9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAO5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CASpE"}
|
package/dist/consts/metamask.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.connect = exports.BAKLAVA_PARAMS = exports.ALFAJORES_PARAMS = exports.CELO_PARAMS = void 0;
|
|
13
|
-
exports.CELO_PARAMS = {
|
|
14
|
-
chainId: '0xa4ec',
|
|
15
|
-
chainName: 'Celo',
|
|
16
|
-
nativeCurrency: { name: 'Celo', symbol: 'CELO', decimals: 18 },
|
|
17
|
-
rpcUrls: ['https://forno.celo.org'],
|
|
18
|
-
blockExplorerUrls: ['https://explorer.celo.org/'],
|
|
19
|
-
iconUrls: ['future'],
|
|
20
|
-
};
|
|
21
|
-
exports.ALFAJORES_PARAMS = {
|
|
22
|
-
chainId: '0xaef3',
|
|
23
|
-
chainName: 'Alfajores Testnet',
|
|
24
|
-
nativeCurrency: { name: 'Alfajores Celo', symbol: 'A-CELO', decimals: 18 },
|
|
25
|
-
rpcUrls: ['https://alfajores-forno.celo-testnet.org'],
|
|
26
|
-
blockExplorerUrls: ['https://alfajores-blockscout.celo-testnet.org/'],
|
|
27
|
-
iconUrls: ['future'],
|
|
28
|
-
};
|
|
29
|
-
exports.BAKLAVA_PARAMS = {
|
|
30
|
-
chainId: '0xf370',
|
|
31
|
-
chainName: 'Baklava Testnet',
|
|
32
|
-
nativeCurrency: { name: 'Baklava Celo', symbol: 'B-CELO', decimals: 18 },
|
|
33
|
-
rpcUrls: ['https://baklava-forno.celo-testnet.org'],
|
|
34
|
-
blockExplorerUrls: ['https://baklava-blockscout.celo-testnet.org/'],
|
|
35
|
-
iconUrls: ['future'],
|
|
36
|
-
};
|
|
37
|
-
function connect(params) {
|
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
|
-
const w = window;
|
|
41
|
-
if (w.ethereum) {
|
|
42
|
-
yield w.ethereum.request({
|
|
43
|
-
method: 'wallet_addEthereumChain',
|
|
44
|
-
params: [params],
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
exports.connect = connect;
|
|
50
|
-
//# sourceMappingURL=metamask.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metamask.js","sourceRoot":"","sources":["../../src/consts/metamask.ts"],"names":[],"mappings":";;;;;;;;;;;;AASa,QAAA,WAAW,GAAoB;IAC1C,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,MAAM;IACjB,cAAc,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9D,OAAO,EAAE,CAAC,wBAAwB,CAAC;IACnC,iBAAiB,EAAE,CAAC,4BAA4B,CAAC;IACjD,QAAQ,EAAE,CAAC,QAAQ,CAAC;CACrB,CAAC;AAEW,QAAA,gBAAgB,GAAoB;IAC/C,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,mBAAmB;IAC9B,cAAc,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC1E,OAAO,EAAE,CAAC,0CAA0C,CAAC;IACrD,iBAAiB,EAAE,CAAC,gDAAgD,CAAC;IACrE,QAAQ,EAAE,CAAC,QAAQ,CAAC;CACrB,CAAC;AAEW,QAAA,cAAc,GAAoB;IAC7C,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,iBAAiB;IAC5B,cAAc,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxE,OAAO,EAAE,CAAC,wCAAwC,CAAC;IACnD,iBAAiB,EAAE,CAAC,8CAA8C,CAAC;IACnE,QAAQ,EAAE,CAAC,QAAQ,CAAC;CACrB,CAAC;AAEF,SAAsB,OAAO,CAAC,MAAuB;;QACnD,8DAA8D;QAC9D,MAAM,CAAC,GAAG,MAAa,CAAC;QACxB,IAAI,CAAC,CAAC,QAAQ,EAAE;YACd,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACvB,MAAM,EAAE,yBAAyB;gBACjC,MAAM,EAAE,CAAC,MAAM,CAAC;aACjB,CAAC,CAAC;SACJ;IACH,CAAC;CAAA;AATD,0BASC"}
|