@ant-design/web3-wagmi 1.0.0 → 1.1.2
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/CHANGELOG.md +38 -0
- package/dist/esm/wagmi-provider/config-provider.d.ts +2 -1
- package/dist/esm/wagmi-provider/config-provider.js +5 -3
- package/dist/esm/wagmi-provider/index.d.ts +3 -2
- package/dist/esm/wagmi-provider/index.js +3 -1
- package/dist/esm/wallets/index.d.ts +2 -0
- package/dist/esm/wallets/index.js +3 -1
- package/dist/esm/wallets/safeheron.d.ts +2 -0
- package/dist/esm/wallets/safeheron.js +34 -0
- package/dist/esm/wallets/token-pocket.d.ts +2 -0
- package/dist/esm/wallets/token-pocket.js +34 -0
- package/dist/lib/wagmi-provider/config-provider.d.ts +2 -1
- package/dist/lib/wagmi-provider/config-provider.js +5 -3
- package/dist/lib/wagmi-provider/index.d.ts +3 -2
- package/dist/lib/wagmi-provider/index.js +2 -0
- package/dist/lib/wallets/index.d.ts +2 -0
- package/dist/lib/wallets/index.js +22 -0
- package/dist/lib/wallets/safeheron.d.ts +2 -0
- package/dist/lib/wallets/safeheron.js +18 -0
- package/dist/lib/wallets/token-pocket.d.ts +2 -0
- package/dist/lib/wallets/token-pocket.js +18 -0
- package/package.json +27 -9
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/interface.d.ts.map +0 -1
- package/dist/esm/utils.d.ts.map +0 -1
- package/dist/esm/wagmi-provider/config-provider.d.ts.map +0 -1
- package/dist/esm/wagmi-provider/index.d.ts.map +0 -1
- package/dist/esm/wagmi-provider/methods/addNameToAccount.d.ts.map +0 -1
- package/dist/esm/wagmi-provider/methods/getNFTMetadata.d.ts.map +0 -1
- package/dist/esm/wagmi-provider/methods/index.d.ts.map +0 -1
- package/dist/esm/wallets/coinbase-wallet.d.ts.map +0 -1
- package/dist/esm/wallets/index.d.ts.map +0 -1
- package/dist/esm/wallets/meta-mask.d.ts.map +0 -1
- package/dist/esm/wallets/wallet-connect.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @ant-design/web3-wagmi
|
|
2
2
|
|
|
3
|
+
## 1.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d6a5339: chore: release 1.1.2 for republish
|
|
8
|
+
- Updated dependencies [d6a5339]
|
|
9
|
+
- @ant-design/web3-assets@1.1.2
|
|
10
|
+
- @ant-design/web3-common@1.1.2
|
|
11
|
+
|
|
12
|
+
## 1.1.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 32f276a: chore: 1.1.1
|
|
17
|
+
- Updated dependencies [32f276a]
|
|
18
|
+
- @ant-design/web3-assets@1.1.1
|
|
19
|
+
- @ant-design/web3-common@1.1.1
|
|
20
|
+
|
|
21
|
+
## 1.1.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- b00a377: feat: add TokenPocket wallet icon and metadata
|
|
26
|
+
- b3e95c2: feat: support safeheron browser wallet
|
|
27
|
+
- 3547f6b: feat: ConnectButton support internationalization
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- 69a3597: fix: Improve the package.json information and add a main field to accommodate more projects.
|
|
32
|
+
- Updated dependencies [73e8e32]
|
|
33
|
+
- Updated dependencies [69a3597]
|
|
34
|
+
- Updated dependencies [b00a377]
|
|
35
|
+
- Updated dependencies [b3e95c2]
|
|
36
|
+
- Updated dependencies [3547f6b]
|
|
37
|
+
- Updated dependencies [9de319c]
|
|
38
|
+
- @ant-design/web3-common@1.1.0
|
|
39
|
+
- @ant-design/web3-assets@1.1.0
|
|
40
|
+
|
|
3
41
|
## 1.0.0
|
|
4
42
|
|
|
5
43
|
### Major Changes
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type Chain } from '@ant-design/web3-common';
|
|
2
|
+
import { type Chain, Locale } from '@ant-design/web3-common';
|
|
3
3
|
import { type Connector as WagmiConnector, type Chain as WagmiChain } from 'wagmi';
|
|
4
4
|
import type { WalletFactory } from '../interface';
|
|
5
5
|
export interface AntDesignWeb3ConfigProviderProps {
|
|
6
|
+
locale?: Locale;
|
|
6
7
|
assets?: (WalletFactory | Chain)[];
|
|
7
8
|
children?: React.ReactNode;
|
|
8
9
|
ens?: boolean;
|
|
@@ -20,7 +20,8 @@ export var AntDesignWeb3ConfigProvider = function AntDesignWeb3ConfigProvider(pr
|
|
|
20
20
|
availableChains = props.availableChains,
|
|
21
21
|
availableConnectors = props.availableConnectors,
|
|
22
22
|
ens = props.ens,
|
|
23
|
-
balance = props.balance
|
|
23
|
+
balance = props.balance,
|
|
24
|
+
locale = props.locale;
|
|
24
25
|
var _useAccount = useAccount(),
|
|
25
26
|
address = _useAccount.address,
|
|
26
27
|
isDisconnected = _useAccount.isDisconnected;
|
|
@@ -92,7 +93,7 @@ export var AntDesignWeb3ConfigProvider = function AntDesignWeb3ConfigProvider(pr
|
|
|
92
93
|
return item.name === connector.name;
|
|
93
94
|
});
|
|
94
95
|
if (!(walletFactory !== null && walletFactory !== void 0 && walletFactory.create)) {
|
|
95
|
-
console.error("Can not find wallet factory for ".concat(connector.name, ", you
|
|
96
|
+
console.error("Can not find wallet factory for ".concat(connector.name, ", you should config it in WagmiWeb3ConfigProvider 'assets'."));
|
|
96
97
|
return null;
|
|
97
98
|
}
|
|
98
99
|
return walletFactory.create(connector);
|
|
@@ -112,7 +113,7 @@ export var AntDesignWeb3ConfigProvider = function AntDesignWeb3ConfigProvider(pr
|
|
|
112
113
|
icon: c.icon
|
|
113
114
|
};
|
|
114
115
|
} else {
|
|
115
|
-
console.error("Can not find chain ".concat(item.id, ", you
|
|
116
|
+
console.error("Can not find chain ".concat(item.id, ", you should config it in WagmiWeb3ConfigProvider 'assets'."));
|
|
116
117
|
return null;
|
|
117
118
|
}
|
|
118
119
|
}).filter(function (item) {
|
|
@@ -142,6 +143,7 @@ export var AntDesignWeb3ConfigProvider = function AntDesignWeb3ConfigProvider(pr
|
|
|
142
143
|
return;
|
|
143
144
|
}, [chain, assets, availableChains, currentChain]);
|
|
144
145
|
return /*#__PURE__*/_jsx(Web3ConfigProvider, {
|
|
146
|
+
locale: locale,
|
|
145
147
|
availableChains: chainList,
|
|
146
148
|
chain: currentChain,
|
|
147
149
|
account: account,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PublicClient, WebSocketPublicClient, Config } from 'wagmi';
|
|
3
|
-
import type { Chain } from '@ant-design/web3-common';
|
|
3
|
+
import type { Chain, Locale } from '@ant-design/web3-common';
|
|
4
4
|
import type { WalletFactory } from '../interface';
|
|
5
5
|
export type WagmiWeb3ConfigProviderProps<TPublicClient extends PublicClient = PublicClient, TWebSocketPublicClient extends WebSocketPublicClient = WebSocketPublicClient> = {
|
|
6
6
|
config: Config<TPublicClient, TWebSocketPublicClient>;
|
|
7
|
+
locale?: Locale;
|
|
7
8
|
assets?: (Chain | WalletFactory)[];
|
|
8
9
|
ens?: boolean;
|
|
9
10
|
balance?: boolean;
|
|
10
11
|
};
|
|
11
|
-
export declare function WagmiWeb3ConfigProvider<TPublicClient extends PublicClient, TWebSocketPublicClient extends WebSocketPublicClient>({ children, assets, ens, balance, config, ...restProps }: React.PropsWithChildren<WagmiWeb3ConfigProviderProps<TPublicClient, TWebSocketPublicClient>>): React.ReactElement;
|
|
12
|
+
export declare function WagmiWeb3ConfigProvider<TPublicClient extends PublicClient, TWebSocketPublicClient extends WebSocketPublicClient>({ children, assets, ens, locale, balance, config, ...restProps }: React.PropsWithChildren<WagmiWeb3ConfigProviderProps<TPublicClient, TWebSocketPublicClient>>): React.ReactElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["children", "assets", "ens", "balance", "config"];
|
|
2
|
+
var _excluded = ["children", "assets", "ens", "locale", "balance", "config"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -27,6 +27,7 @@ export function WagmiWeb3ConfigProvider(_ref) {
|
|
|
27
27
|
_ref$assets = _ref.assets,
|
|
28
28
|
assets = _ref$assets === void 0 ? [] : _ref$assets,
|
|
29
29
|
ens = _ref.ens,
|
|
30
|
+
locale = _ref.locale,
|
|
30
31
|
balance = _ref.balance,
|
|
31
32
|
config = _ref.config,
|
|
32
33
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -63,6 +64,7 @@ export function WagmiWeb3ConfigProvider(_ref) {
|
|
|
63
64
|
config: config
|
|
64
65
|
}, restProps), {}, {
|
|
65
66
|
children: /*#__PURE__*/_jsx(AntDesignWeb3ConfigProvider, {
|
|
67
|
+
locale: locale,
|
|
66
68
|
assets: [].concat(_toConsumableArray(assets), [MetaMask, Mainnet, Goerli]),
|
|
67
69
|
availableChains: availableChains,
|
|
68
70
|
availableConnectors: config.connectors || [],
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
+
import { metadata_Safeheron } from '@ant-design/web3-assets';
|
|
11
|
+
export var SafeheronWallet = {
|
|
12
|
+
name: 'Safeheron',
|
|
13
|
+
create: function create(connector) {
|
|
14
|
+
return _objectSpread(_objectSpread({}, metadata_Safeheron), {}, {
|
|
15
|
+
hasWalletReady: function () {
|
|
16
|
+
var _hasWalletReady = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
17
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19
|
+
case 0:
|
|
20
|
+
return _context.abrupt("return", !!(connector !== null && connector !== void 0 && connector.ready));
|
|
21
|
+
case 1:
|
|
22
|
+
case "end":
|
|
23
|
+
return _context.stop();
|
|
24
|
+
}
|
|
25
|
+
}, _callee);
|
|
26
|
+
}));
|
|
27
|
+
function hasWalletReady() {
|
|
28
|
+
return _hasWalletReady.apply(this, arguments);
|
|
29
|
+
}
|
|
30
|
+
return hasWalletReady;
|
|
31
|
+
}()
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
+
import { metadata_TokenPocket } from '@ant-design/web3-assets';
|
|
11
|
+
export var TokenPocket = {
|
|
12
|
+
name: 'TokenPocket',
|
|
13
|
+
create: function create() {
|
|
14
|
+
return _objectSpread(_objectSpread({}, metadata_TokenPocket), {}, {
|
|
15
|
+
hasWalletReady: function () {
|
|
16
|
+
var _hasWalletReady = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
17
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19
|
+
case 0:
|
|
20
|
+
return _context.abrupt("return", true);
|
|
21
|
+
case 1:
|
|
22
|
+
case "end":
|
|
23
|
+
return _context.stop();
|
|
24
|
+
}
|
|
25
|
+
}, _callee);
|
|
26
|
+
}));
|
|
27
|
+
function hasWalletReady() {
|
|
28
|
+
return _hasWalletReady.apply(this, arguments);
|
|
29
|
+
}
|
|
30
|
+
return hasWalletReady;
|
|
31
|
+
}()
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type Chain } from '@ant-design/web3-common';
|
|
2
|
+
import { type Chain, Locale } from '@ant-design/web3-common';
|
|
3
3
|
import { type Connector as WagmiConnector, type Chain as WagmiChain } from 'wagmi';
|
|
4
4
|
import type { WalletFactory } from '../interface';
|
|
5
5
|
export interface AntDesignWeb3ConfigProviderProps {
|
|
6
|
+
locale?: Locale;
|
|
6
7
|
assets?: (WalletFactory | Chain)[];
|
|
7
8
|
children?: React.ReactNode;
|
|
8
9
|
ens?: boolean;
|
|
@@ -17,7 +17,8 @@ const AntDesignWeb3ConfigProvider = props => {
|
|
|
17
17
|
availableChains,
|
|
18
18
|
availableConnectors,
|
|
19
19
|
ens,
|
|
20
|
-
balance
|
|
20
|
+
balance,
|
|
21
|
+
locale
|
|
21
22
|
} = props;
|
|
22
23
|
const {
|
|
23
24
|
address,
|
|
@@ -59,7 +60,7 @@ const AntDesignWeb3ConfigProvider = props => {
|
|
|
59
60
|
return availableConnectors.map(connector => {
|
|
60
61
|
const walletFactory = assets?.find(item => item.name === connector.name);
|
|
61
62
|
if (!walletFactory?.create) {
|
|
62
|
-
console.error(`Can not find wallet factory for ${connector.name}, you
|
|
63
|
+
console.error(`Can not find wallet factory for ${connector.name}, you should config it in WagmiWeb3ConfigProvider 'assets'.`);
|
|
63
64
|
return null;
|
|
64
65
|
}
|
|
65
66
|
return walletFactory.create(connector);
|
|
@@ -77,7 +78,7 @@ const AntDesignWeb3ConfigProvider = props => {
|
|
|
77
78
|
icon: c.icon
|
|
78
79
|
};
|
|
79
80
|
} else {
|
|
80
|
-
console.error(`Can not find chain ${item.id}, you
|
|
81
|
+
console.error(`Can not find chain ${item.id}, you should config it in WagmiWeb3ConfigProvider 'assets'.`);
|
|
81
82
|
return null;
|
|
82
83
|
}
|
|
83
84
|
}).filter(item => item !== null);
|
|
@@ -102,6 +103,7 @@ const AntDesignWeb3ConfigProvider = props => {
|
|
|
102
103
|
return;
|
|
103
104
|
}, [chain, assets, availableChains, currentChain]);
|
|
104
105
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Common.Web3ConfigProvider, {
|
|
106
|
+
locale: locale,
|
|
105
107
|
availableChains: chainList,
|
|
106
108
|
chain: currentChain,
|
|
107
109
|
account: account,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PublicClient, WebSocketPublicClient, Config } from 'wagmi';
|
|
3
|
-
import type { Chain } from '@ant-design/web3-common';
|
|
3
|
+
import type { Chain, Locale } from '@ant-design/web3-common';
|
|
4
4
|
import type { WalletFactory } from '../interface';
|
|
5
5
|
export type WagmiWeb3ConfigProviderProps<TPublicClient extends PublicClient = PublicClient, TWebSocketPublicClient extends WebSocketPublicClient = WebSocketPublicClient> = {
|
|
6
6
|
config: Config<TPublicClient, TWebSocketPublicClient>;
|
|
7
|
+
locale?: Locale;
|
|
7
8
|
assets?: (Chain | WalletFactory)[];
|
|
8
9
|
ens?: boolean;
|
|
9
10
|
balance?: boolean;
|
|
10
11
|
};
|
|
11
|
-
export declare function WagmiWeb3ConfigProvider<TPublicClient extends PublicClient, TWebSocketPublicClient extends WebSocketPublicClient>({ children, assets, ens, balance, config, ...restProps }: React.PropsWithChildren<WagmiWeb3ConfigProviderProps<TPublicClient, TWebSocketPublicClient>>): React.ReactElement;
|
|
12
|
+
export declare function WagmiWeb3ConfigProvider<TPublicClient extends PublicClient, TWebSocketPublicClient extends WebSocketPublicClient>({ children, assets, ens, locale, balance, config, ...restProps }: React.PropsWithChildren<WagmiWeb3ConfigProviderProps<TPublicClient, TWebSocketPublicClient>>): React.ReactElement;
|
|
@@ -19,6 +19,7 @@ function WagmiWeb3ConfigProvider({
|
|
|
19
19
|
children,
|
|
20
20
|
assets = [],
|
|
21
21
|
ens,
|
|
22
|
+
locale,
|
|
22
23
|
balance,
|
|
23
24
|
config,
|
|
24
25
|
...restProps
|
|
@@ -42,6 +43,7 @@ function WagmiWeb3ConfigProvider({
|
|
|
42
43
|
config: config,
|
|
43
44
|
...restProps,
|
|
44
45
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_configProvider.AntDesignWeb3ConfigProvider, {
|
|
46
|
+
locale: locale,
|
|
45
47
|
assets: [...assets, _wallets.MetaMask, _web3Assets.Mainnet, _web3Assets.Goerli],
|
|
46
48
|
availableChains: availableChains,
|
|
47
49
|
availableConnectors: config.connectors || [],
|
|
@@ -35,4 +35,26 @@ Object.keys(_coinbaseWallet).forEach(function (key) {
|
|
|
35
35
|
return _coinbaseWallet[key];
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
+
});
|
|
39
|
+
var _tokenPocket = require("./token-pocket");
|
|
40
|
+
Object.keys(_tokenPocket).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _tokenPocket[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _tokenPocket[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _safeheron = require("./safeheron");
|
|
51
|
+
Object.keys(_safeheron).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _safeheron[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _safeheron[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
38
60
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SafeheronWallet = void 0;
|
|
7
|
+
var _web3Assets = require("@ant-design/web3-assets");
|
|
8
|
+
const SafeheronWallet = exports.SafeheronWallet = {
|
|
9
|
+
name: 'Safeheron',
|
|
10
|
+
create: connector => {
|
|
11
|
+
return {
|
|
12
|
+
..._web3Assets.metadata_Safeheron,
|
|
13
|
+
hasWalletReady: async () => {
|
|
14
|
+
return !!connector?.ready;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TokenPocket = void 0;
|
|
7
|
+
var _web3Assets = require("@ant-design/web3-assets");
|
|
8
|
+
const TokenPocket = exports.TokenPocket = {
|
|
9
|
+
name: 'TokenPocket',
|
|
10
|
+
create: () => {
|
|
11
|
+
return {
|
|
12
|
+
..._web3Assets.metadata_TokenPocket,
|
|
13
|
+
hasWalletReady: async () => {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
};
|
package/package.json
CHANGED
|
@@ -1,20 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/web3-wagmi",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"types": "./dist/esm/index.d.ts"
|
|
8
|
-
},
|
|
3
|
+
"version": "1.1.2",
|
|
4
|
+
"main": "dist/lib/index.js",
|
|
5
|
+
"module": "dist/esm/index.js",
|
|
6
|
+
"typings": "dist/esm/index.d.ts",
|
|
9
7
|
"files": [
|
|
10
8
|
"dist",
|
|
11
9
|
"CHANGELOG.md",
|
|
12
10
|
"README.md"
|
|
13
11
|
],
|
|
12
|
+
"keywords": [
|
|
13
|
+
"ant",
|
|
14
|
+
"component",
|
|
15
|
+
"components",
|
|
16
|
+
"design",
|
|
17
|
+
"framework",
|
|
18
|
+
"frontend",
|
|
19
|
+
"react",
|
|
20
|
+
"react-component",
|
|
21
|
+
"ui",
|
|
22
|
+
"web3"
|
|
23
|
+
],
|
|
24
|
+
"homepage": "https://we3.ant.design",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/ant-design/ant-design-web3/issues"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/ant-design/ant-design-web3"
|
|
31
|
+
},
|
|
14
32
|
"dependencies": {
|
|
15
33
|
"debug": "^4.3.4",
|
|
16
|
-
"@ant-design/web3-assets": "1.
|
|
17
|
-
"@ant-design/web3-common": "1.
|
|
34
|
+
"@ant-design/web3-assets": "1.1.2",
|
|
35
|
+
"@ant-design/web3-common": "1.1.2"
|
|
18
36
|
},
|
|
19
37
|
"devDependencies": {
|
|
20
38
|
"@types/debug": "^4.1.12",
|
|
@@ -26,6 +44,7 @@
|
|
|
26
44
|
"wagmi": "^1.4.12"
|
|
27
45
|
},
|
|
28
46
|
"publishConfig": {
|
|
47
|
+
"registry": "https://registry.npmjs.org",
|
|
29
48
|
"access": "public"
|
|
30
49
|
},
|
|
31
50
|
"browserslist": [
|
|
@@ -34,7 +53,6 @@
|
|
|
34
53
|
"> 1%",
|
|
35
54
|
"ie >= 11"
|
|
36
55
|
],
|
|
37
|
-
"repository": "git@github.com:ant-design/ant-design-web3.git",
|
|
38
56
|
"scripts": {
|
|
39
57
|
"dev": "father dev",
|
|
40
58
|
"build": "father build"
|
package/dist/esm/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,KAAK,MAAM,CAAC;CAC3C"}
|
package/dist/esm/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAA,MAAM,WAAW,cAAe,MAAM,mBAErC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-provider.d.ts","sourceRoot":"","sources":["config-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,KAAK,KAAK,EAGX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAOL,KAAK,SAAS,IAAI,cAAc,EAChC,KAAK,KAAK,IAAI,UAAU,EACzB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,WAAW,gCAAgC;IAC/C,MAAM,CAAC,EAAE,CAAC,aAAa,GAAG,KAAK,CAAC,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,UAAU,EAAE,CAAC;IAC9B,mBAAmB,EAAE,cAAc,EAAE,CAAC;CACvC;AAED,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,gCAAgC,CA+HlF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,EAAuB,MAAM,OAAO,CAAC;AAE9F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAMlD,MAAM,MAAM,4BAA4B,CACtC,aAAa,SAAS,YAAY,GAAG,YAAY,EACjD,sBAAsB,SAAS,qBAAqB,GAAG,qBAAqB,IAC1E;IACF,MAAM,EAAE,MAAM,CAAC,aAAa,EAAE,sBAAsB,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,CAAC,KAAK,GAAG,aAAa,CAAC,EAAE,CAAC;IACnC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAgB,uBAAuB,CACrC,aAAa,SAAS,YAAY,EAClC,sBAAsB,SAAS,qBAAqB,EACpD,EACA,QAAQ,EACR,MAAW,EACX,GAAG,EACH,OAAO,EACP,MAAM,EACN,GAAG,SAAS,EACb,EAAE,KAAK,CAAC,iBAAiB,CACxB,4BAA4B,CAAC,aAAa,EAAE,sBAAsB,CAAC,CACpE,GAAG,KAAK,CAAC,YAAY,CAgCrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addNameToAccount.d.ts","sourceRoot":"","sources":["addNameToAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGvD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAS3F"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getNFTMetadata.d.ts","sourceRoot":"","sources":["getNFTMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGhG,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,CAuBtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coinbase-wallet.d.ts","sourceRoot":"","sources":["coinbase-wallet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,eAAO,MAAM,cAAc,EAAE,aAU5B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta-mask.d.ts","sourceRoot":"","sources":["meta-mask.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,eAAO,MAAM,QAAQ,EAAE,aAUtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wallet-connect.d.ts","sourceRoot":"","sources":["wallet-connect.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,eAAO,MAAM,aAAa,EAAE,aAqB3B,CAAC"}
|