@hyperlane-xyz/sdk 1.0.0-beta2 → 1.0.0-beta3

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.
@@ -0,0 +1,17 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,50 @@
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
@@ -0,0 +1 @@
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"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@hyperlane-xyz/sdk",
3
3
  "description": "The official SDK for the Hyperlane Network",
4
- "version": "1.0.0-beta2",
4
+ "version": "1.0.0-beta3",
5
5
  "dependencies": {
6
6
  "@hyperlane-xyz/celo-ethers-provider": "^0.1.1",
7
- "@hyperlane-xyz/core": "1.0.0-beta2",
8
- "@hyperlane-xyz/utils": "1.0.0-beta2",
9
- "@types/debug": "^4.1.7",
7
+ "@hyperlane-xyz/core": "1.0.0-beta3",
8
+ "@hyperlane-xyz/utils": "1.0.0-beta3",
9
+ "@wagmi/chains": "^0.1.3",
10
10
  "coingecko-api": "^1.0.10",
11
11
  "cross-fetch": "^3.1.5",
12
12
  "debug": "^4.3.4",
@@ -16,8 +16,8 @@
16
16
  "@nomiclabs/hardhat-ethers": "^2.0.5",
17
17
  "@nomiclabs/hardhat-waffle": "^2.0.2",
18
18
  "@types/coingecko-api": "^1.0.10",
19
+ "@types/debug": "^4.1.7",
19
20
  "@types/node": "^16.9.1",
20
- "@wagmi/chains": "^0.1.3",
21
21
  "chai": "^4.3.6",
22
22
  "dotenv": "^10.0.0",
23
23
  "ethereum-waffle": "^3.4.4",
@@ -52,5 +52,6 @@
52
52
  "test:unit": "mocha --config .mocharc.json './src/**/*.test.ts'",
53
53
  "test:hardhat": "hardhat test ./src/**/*.hardhat-test.ts"
54
54
  },
55
- "types": "dist/index.d.ts"
55
+ "types": "dist/index.d.ts",
56
+ "stableVersion": "1.0.0-beta2"
56
57
  }