@reef-knot/wallet-adapter-coinbase-smart-wallet 3.2.0-alpha.2 → 4.0.0-alpha.1
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/dist/icons/coinbase.js +53 -0
- package/dist/icons/index.js +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -26
- package/package.json +10 -7
- package/dist/icons/coinbase.svg.js +0 -54
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { memo } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/icons/coinbase.svg
|
|
5
|
+
var _circle, _path, _rect, _defs;
|
|
6
|
+
function _extends() {
|
|
7
|
+
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
8
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
9
|
+
var t = arguments[e];
|
|
10
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
11
|
+
}
|
|
12
|
+
return n;
|
|
13
|
+
}, _extends.apply(null, arguments);
|
|
14
|
+
}
|
|
15
|
+
var Memo = /* @__PURE__ */ memo(function SvgCoinbase(props) {
|
|
16
|
+
return /* @__PURE__ */ React.createElement("svg", _extends({
|
|
17
|
+
width: 40,
|
|
18
|
+
height: 40,
|
|
19
|
+
viewBox: "0 0 40 40",
|
|
20
|
+
fill: "none",
|
|
21
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
22
|
+
}, props), _circle || (_circle = /* @__PURE__ */ React.createElement("circle", {
|
|
23
|
+
cx: 20,
|
|
24
|
+
cy: 20,
|
|
25
|
+
r: 15,
|
|
26
|
+
fill: "#fff"
|
|
27
|
+
})), _path || (_path = /* @__PURE__ */ React.createElement("path", {
|
|
28
|
+
fillRule: "evenodd",
|
|
29
|
+
clipRule: "evenodd",
|
|
30
|
+
d: "M20 40c11.046 0 20-8.954 20-20S31.046 0 20 0 0 8.954 0 20s8.954 20 20 20zm0-8c6.627 0 12-5.373 12-12S26.627 8 20 8 8 13.373 8 20s5.373 12 12 12z",
|
|
31
|
+
fill: "url(#a)"
|
|
32
|
+
})), _rect || (_rect = /* @__PURE__ */ React.createElement("rect", {
|
|
33
|
+
x: 16,
|
|
34
|
+
y: 16,
|
|
35
|
+
width: 8,
|
|
36
|
+
height: 8,
|
|
37
|
+
rx: 1,
|
|
38
|
+
fill: "#2952EA"
|
|
39
|
+
})), _defs || (_defs = /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("linearGradient", {
|
|
40
|
+
id: "a",
|
|
41
|
+
x1: 20,
|
|
42
|
+
y1: 0,
|
|
43
|
+
x2: 20,
|
|
44
|
+
y2: 40,
|
|
45
|
+
gradientUnits: "userSpaceOnUse"
|
|
46
|
+
}, /* @__PURE__ */ React.createElement("stop", { stopColor: "#345FF8" }), /* @__PURE__ */ React.createElement("stop", {
|
|
47
|
+
offset: 1,
|
|
48
|
+
stopColor: "#1D44DC"
|
|
49
|
+
})))));
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { Memo as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import Memo from "./coinbase.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,eAAO,MAAM,EAAE,wBAAwB,CAAC;AACxC,eAAO,MAAM,IAAI,0BAA0B,CAAC;AAC5C,eAAO,MAAM,IAAI,wBAAwB,CAAC;AAE1C,KAAK,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnE,eAAO,MAAM,+BAA+B,WAAY,UAAU;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,eAAO,MAAM,EAAE,wBAAwB,CAAC;AACxC,eAAO,MAAM,IAAI,0BAA0B,CAAC;AAC5C,eAAO,MAAM,IAAI,wBAAwB,CAAC;AAE1C,KAAK,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnE,eAAO,MAAM,+BAA+B,WAAY,UAAU;;;;;;;;eAsBwT,CAAC;sBAA4C,CAAC;wBAA+C,CAAC;;;;;;;;eApB9a,CAAC;yBACD,CAAC;sBAGd,CAAC;wBAG1B,CAAD;;;;;;;;;;;eAag5B,CAAC;;;;;eAA0G,CAAC;;;;iCAAyK,CAAC;;;;;;;;CAVxqC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAOhC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import Memo from "./icons/coinbase.js";
|
|
2
|
+
import "./icons/index.js";
|
|
3
|
+
import { coinbaseWallet } from "wagmi/connectors";
|
|
4
|
+
import { isProviderExistsEIP6963 } from "@reef-knot/wallets-helpers";
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
6
|
+
//#region src/index.ts
|
|
7
|
+
const id = "coinbaseSmartWallet";
|
|
8
|
+
const name = "Coinbase Smart Wallet";
|
|
9
|
+
const rdns = "com.coinbase.wallet";
|
|
10
|
+
const getCoinbaseSmartWalletConnector = (config) => {
|
|
11
|
+
return {
|
|
12
|
+
...coinbaseWallet({
|
|
13
|
+
preference: { options: "smartWalletOnly" },
|
|
14
|
+
appName: globalThis.window?.location?.hostname
|
|
15
|
+
})(config),
|
|
16
|
+
name
|
|
17
|
+
};
|
|
18
18
|
};
|
|
19
|
-
const CoinbaseSmartWallet = ({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
detector: () => isProviderExistsEIP6963(providersStore, rdns),
|
|
27
|
-
createConnectorFn: getCoinbaseSmartWalletConnector
|
|
19
|
+
const CoinbaseSmartWallet = ({ providersStore }) => ({
|
|
20
|
+
walletName: name,
|
|
21
|
+
walletId: id,
|
|
22
|
+
type: coinbaseWallet.type,
|
|
23
|
+
icon: Memo,
|
|
24
|
+
detector: () => isProviderExistsEIP6963(providersStore, rdns),
|
|
25
|
+
createConnectorFn: getCoinbaseSmartWalletConnector
|
|
28
26
|
});
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
//#endregion
|
|
29
|
+
export { CoinbaseSmartWallet, getCoinbaseSmartWalletConnector, id, name, rdns };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reef-knot/wallet-adapter-coinbase-smart-wallet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -32,17 +32,20 @@
|
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
|
-
"build": "
|
|
36
|
-
"dev": "
|
|
37
|
-
"lint": "eslint --ext ts,tsx,js,mjs ."
|
|
35
|
+
"build": "yarn run -T tsdown",
|
|
36
|
+
"dev": "yarn run -T tsdown --watch",
|
|
37
|
+
"lint": "eslint --ext ts,tsx,js,mjs .",
|
|
38
|
+
"typecheck": "tsc --noEmit"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@reef-knot/types": "4.2.0-alpha.
|
|
41
|
-
"@
|
|
41
|
+
"@reef-knot/types": "4.2.0-alpha.3",
|
|
42
|
+
"@reef-knot/wallets-helpers": "2.3.0-alpha.3",
|
|
43
|
+
"build-config": "*",
|
|
42
44
|
"eslint-config-custom": "*"
|
|
43
45
|
},
|
|
44
46
|
"peerDependencies": {
|
|
45
|
-
"@reef-knot/types": "4.2.0-alpha.
|
|
47
|
+
"@reef-knot/types": "4.2.0-alpha.3",
|
|
48
|
+
"@reef-knot/wallets-helpers": "2.3.0-alpha.3",
|
|
46
49
|
"@tanstack/react-query": "^5.29.0",
|
|
47
50
|
"wagmi": ">=3.3"
|
|
48
51
|
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
|
|
4
|
-
var _circle, _path, _rect, _defs;
|
|
5
|
-
function _extends() {
|
|
6
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
7
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
8
|
-
var t = arguments[e];
|
|
9
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
10
|
-
}
|
|
11
|
-
return n;
|
|
12
|
-
}, _extends.apply(null, arguments);
|
|
13
|
-
}
|
|
14
|
-
var SvgCoinbase = function SvgCoinbase(props) {
|
|
15
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
16
|
-
width: 40,
|
|
17
|
-
height: 40,
|
|
18
|
-
viewBox: "0 0 40 40",
|
|
19
|
-
fill: "none",
|
|
20
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
21
|
-
}, props), _circle || (_circle = /*#__PURE__*/React.createElement("circle", {
|
|
22
|
-
cx: 20,
|
|
23
|
-
cy: 20,
|
|
24
|
-
r: 15,
|
|
25
|
-
fill: "#fff"
|
|
26
|
-
})), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
27
|
-
fillRule: "evenodd",
|
|
28
|
-
clipRule: "evenodd",
|
|
29
|
-
d: "M20 40c11.046 0 20-8.954 20-20S31.046 0 20 0 0 8.954 0 20s8.954 20 20 20zm0-8c6.627 0 12-5.373 12-12S26.627 8 20 8 8 13.373 8 20s5.373 12 12 12z",
|
|
30
|
-
fill: "url(#a)"
|
|
31
|
-
})), _rect || (_rect = /*#__PURE__*/React.createElement("rect", {
|
|
32
|
-
x: 16,
|
|
33
|
-
y: 16,
|
|
34
|
-
width: 8,
|
|
35
|
-
height: 8,
|
|
36
|
-
rx: 1,
|
|
37
|
-
fill: "#2952EA"
|
|
38
|
-
})), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
39
|
-
id: "a",
|
|
40
|
-
x1: 20,
|
|
41
|
-
y1: 0,
|
|
42
|
-
x2: 20,
|
|
43
|
-
y2: 40,
|
|
44
|
-
gradientUnits: "userSpaceOnUse"
|
|
45
|
-
}, /*#__PURE__*/React.createElement("stop", {
|
|
46
|
-
stopColor: "#345FF8"
|
|
47
|
-
}), /*#__PURE__*/React.createElement("stop", {
|
|
48
|
-
offset: 1,
|
|
49
|
-
stopColor: "#1D44DC"
|
|
50
|
-
})))));
|
|
51
|
-
};
|
|
52
|
-
var Memo = /*#__PURE__*/memo(SvgCoinbase);
|
|
53
|
-
|
|
54
|
-
export { Memo as default };
|