@reef-knot/wallet-adapter-coinbase-smart-wallet 4.2.1 → 4.3.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 +2 -0
- package/dist/icons/coinbase.js.map +1 -0
- package/dist/icons/index.js +1 -2
- package/dist/index.d.ts +52 -50
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -0
- package/package.json +6 -9
- package/dist/icons/index.d.ts +0 -2
- package/dist/icons/index.d.ts.map +0 -1
package/dist/icons/coinbase.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coinbase.js","names":[],"sources":["../../src/icons/coinbase.svg"],"sourcesContent":["<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"20\" cy=\"20\" r=\"15\" fill=\"#fff\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" 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\" fill=\"url(#a)\"/><rect x=\"16\" y=\"16\" width=\"8\" height=\"8\" rx=\"1\" fill=\"#2952EA\"/><defs><linearGradient id=\"a\" x1=\"20\" y1=\"0\" x2=\"20\" y2=\"40\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#345FF8\"/><stop offset=\"1\" stop-color=\"#1D44DC\"/></linearGradient></defs></svg>\n"],"mappings":";;;AAAA,IAAI;AAAS,IAAA;AAAO,IAAA;AAAO,IAAA;AAC3B,SAAS,WAAW;CAAE,OAAO,WAAW,OAAO,SAAS,OAAO,OAAO,KAAK,IAAI,SAAU,GAAG;EAAE,KAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;GAAE,IAAI,IAAI,UAAU;GAAI,KAAK,IAAI,KAAK,GAAG,CAAC,CAAC,EAAA,CAAG,eAAe,KAAK,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE;EAAK;EAAE,OAAO;CAAG,GAAG,SAAS,MAAM,MAAM,SAAS;AAAG;AAyCnR,IAAI,OAAoB,mBAAK,SAtCF,YAAY,OAAO;CAC5C,OAAoB,oBAAM,cAAc,OAAO,SAAS;EACtD,OAAO;EACP,QAAQ;EACR,SAAS;EACT,MAAM;EACN,OAAO;CACT,GAAG,KAAK,GAAG,YAAY,UAAuB,oBAAM,cAAc,UAAU;EAC1E,IAAI;EACJ,IAAI;EACJ,GAAG;EACH,MAAM;CACR,CAAC,IAAI,UAAU,QAAqB,oBAAM,cAAc,QAAQ;EAC9D,UAAU;EACV,UAAU;EACV,GAAG;EACH,MAAM;CACR,CAAC,IAAI,UAAU,QAAqB,oBAAM,cAAc,QAAQ;EAC9D,GAAG;EACH,GAAG;EACH,OAAO;EACP,QAAQ;EACR,IAAI;EACJ,MAAM;CACR,CAAC,IAAI,UAAU,QAAqB,oBAAM,cAAc,QAAQ,MAAmB,oBAAM,cAAc,kBAAkB;EACvH,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,eAAe;CACjB,GAAgB,oBAAM,cAAc,QAAQ,EAC1C,WAAW,UACb,CAAC,GAAgB,oBAAM,cAAc,QAAQ;EAC3C,QAAQ;EACR,WAAW;CACb,CAAC,CAAC,CAAC,EAAE;AACP,CACwC"}
|
package/dist/icons/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Memo as WalletIcon };
|
|
1
|
+
export { default as WalletIcon } from "./coinbase.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import { WalletAdapterType } from
|
|
2
|
-
import { coinbaseWallet } from
|
|
1
|
+
import { WalletAdapterType } from "@reef-knot/wallets-helpers";
|
|
2
|
+
import { coinbaseWallet } from "wagmi/connectors";
|
|
3
|
+
//#region src/index.d.ts
|
|
3
4
|
export declare const id = "coinbaseSmartWallet";
|
|
4
5
|
export declare const name = "Coinbase Smart Wallet";
|
|
5
6
|
export declare const rdns = "com.coinbase.wallet";
|
|
6
7
|
type ConfigType = Parameters<ReturnType<typeof coinbaseWallet>>[0];
|
|
7
8
|
export declare const getCoinbaseSmartWalletConnector: (config: ConfigType) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
9
|
+
icon?: string | undefined;
|
|
10
|
+
id: string;
|
|
11
|
+
rdns?: string | readonly string[] | undefined;
|
|
12
|
+
type: string;
|
|
13
|
+
setup?: (() => Promise<void>) | undefined;
|
|
14
|
+
connect: (<withCapabilities extends boolean = false>(parameters?: {
|
|
15
|
+
chainId?: number | undefined;
|
|
16
|
+
isReconnecting?: boolean | undefined;
|
|
17
|
+
withCapabilities?: withCapabilities | boolean | undefined;
|
|
18
|
+
} | undefined) => Promise<{
|
|
19
|
+
accounts: withCapabilities extends true ? readonly {
|
|
20
|
+
address: import("abitype").Address;
|
|
21
|
+
capabilities: Record<string, unknown>;
|
|
22
|
+
}[] : readonly import("abitype").Address[];
|
|
23
|
+
chainId: number;
|
|
24
|
+
}>) & (<withCapabilities extends boolean = false>(parameters?: {
|
|
25
|
+
chainId?: number | undefined;
|
|
26
|
+
instantOnboarding?: boolean | undefined;
|
|
27
|
+
isReconnecting?: boolean | undefined;
|
|
28
|
+
withCapabilities?: withCapabilities | boolean | undefined;
|
|
29
|
+
}) => Promise<{
|
|
30
|
+
accounts: withCapabilities extends true ? readonly {
|
|
31
|
+
address: import("abitype").Address;
|
|
32
|
+
}[] : readonly import("abitype").Address[];
|
|
33
|
+
chainId: number;
|
|
34
|
+
}>);
|
|
35
|
+
disconnect: () => Promise<void>;
|
|
36
|
+
getAccounts: () => Promise<readonly import("abitype").Address[]>;
|
|
37
|
+
getChainId: () => Promise<number>;
|
|
38
|
+
getProvider: (parameters?: {
|
|
39
|
+
chainId?: number | undefined;
|
|
40
|
+
} | undefined) => Promise<import("@coinbase/wallet-sdk").ProviderInterface & {
|
|
41
|
+
close?(): void;
|
|
42
|
+
}>;
|
|
43
|
+
getClient?: ((parameters?: {
|
|
44
|
+
chainId?: number | undefined;
|
|
45
|
+
} | undefined) => Promise<import("viem").Client>) | undefined;
|
|
46
|
+
isAuthorized: () => Promise<boolean>;
|
|
47
|
+
switchChain?: ((parameters: import("@wagmi/core/internal").Compute<{
|
|
48
|
+
addEthereumChainParameter?: import("@wagmi/core/internal").ExactPartial<import("@wagmi/core/internal").Omit<import("viem").AddEthereumChainParameter, 'chainId'>> | undefined;
|
|
49
|
+
chainId: number;
|
|
50
|
+
}>) => Promise<import("viem").Chain>) | undefined;
|
|
51
|
+
onAccountsChanged: (accounts: string[]) => void;
|
|
52
|
+
onChainChanged: (chainId: string) => void;
|
|
53
|
+
onConnect?: ((connectInfo: import("viem").ProviderConnectInfo) => void) | undefined;
|
|
54
|
+
onDisconnect: (error?: Error | undefined) => void;
|
|
55
|
+
onMessage?: ((message: import("viem").ProviderMessage) => void) | undefined;
|
|
56
|
+
name: string;
|
|
56
57
|
};
|
|
57
58
|
export declare const CoinbaseSmartWallet: WalletAdapterType;
|
|
59
|
+
//#endregion
|
|
58
60
|
export {};
|
|
59
61
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;qBAOa;qBACA;qBACA;KAER,aAAa,WAAW,kBAAkB;qBAElC,kCAA+B,QAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAc3C,qBAAqB"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Memo from "./icons/coinbase.js";
|
|
2
2
|
import "./icons/index.js";
|
|
3
|
-
import { coinbaseWallet } from "wagmi/connectors";
|
|
4
3
|
import { isProviderExistsEIP6963 } from "@reef-knot/wallets-helpers";
|
|
4
|
+
import { coinbaseWallet } from "wagmi/connectors";
|
|
5
5
|
//#region src/index.ts
|
|
6
6
|
const id = "coinbaseSmartWallet";
|
|
7
7
|
const name = "Coinbase Smart Wallet";
|
|
@@ -26,3 +26,5 @@ const CoinbaseSmartWallet = ({ providersStore }) => ({
|
|
|
26
26
|
});
|
|
27
27
|
//#endregion
|
|
28
28
|
export { CoinbaseSmartWallet, getCoinbaseSmartWalletConnector, id, name, rdns };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["WalletIcon"],"sources":["../src/index.ts"],"sourcesContent":["import {\n WalletAdapterType,\n isProviderExistsEIP6963,\n} from '@reef-knot/wallets-helpers';\nimport { coinbaseWallet } from 'wagmi/connectors';\nimport { WalletIcon } from './icons/index.js';\n\nexport const id = 'coinbaseSmartWallet';\nexport const name = 'Coinbase Smart Wallet';\nexport const rdns = 'com.coinbase.wallet';\n\ntype ConfigType = Parameters<ReturnType<typeof coinbaseWallet>>[0];\n\nexport const getCoinbaseSmartWalletConnector = (config: ConfigType) => {\n const coinbaseCreateConnectorFn = coinbaseWallet({\n preference: { options: 'smartWalletOnly' },\n appName: globalThis.window?.location?.hostname,\n });\n\n const coinbaseConnector = coinbaseCreateConnectorFn(config);\n\n return {\n ...coinbaseConnector,\n name,\n };\n};\n\nexport const CoinbaseSmartWallet: WalletAdapterType = ({ providersStore }) => ({\n walletName: name,\n walletId: id,\n type: coinbaseWallet.type,\n rdns,\n icon: WalletIcon,\n detector: () => isProviderExistsEIP6963(providersStore, rdns),\n createConnectorFn: getCoinbaseSmartWalletConnector,\n});\n"],"mappings":";;;;;AAOA,MAAa,KAAK;AAClB,MAAa,OAAO;AACpB,MAAa,OAAO;AAIpB,MAAa,mCAAmC,WAAuB;CAQrE,OAAO;EACL,GARgC,eAAe;GAC/C,YAAY,EAAE,SAAS,kBAAkB;GACzC,SAAS,WAAW,QAAQ,UAAU;EACxC,CAEkD,CAAC,CAAC,MAG/B;EACnB;CACF;AACF;AAEA,MAAa,uBAA0C,EAAE,sBAAsB;CAC7E,YAAY;CACZ,UAAU;CACV,MAAM,eAAe;CACrB;CACA,MAAMA;CACN,gBAAgB,wBAAwB,gBAAgB,IAAI;CAC5D,mBAAmB;AACrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reef-knot/wallet-adapter-coinbase-smart-wallet",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0-alpha.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -34,18 +34,15 @@
|
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "yarn run -T tsdown",
|
|
36
36
|
"dev": "yarn run -T tsdown --watch",
|
|
37
|
-
"lint": "
|
|
38
|
-
"typecheck": "tsc --noEmit"
|
|
37
|
+
"lint": "yarn run -T eslint .",
|
|
38
|
+
"typecheck": "yarn run -T tsc --noEmit"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@reef-knot/
|
|
42
|
-
"
|
|
43
|
-
"build-config": "*",
|
|
44
|
-
"eslint-config-custom": "*"
|
|
41
|
+
"@reef-knot/wallets-helpers": "3.2.0-alpha.1",
|
|
42
|
+
"build-config": "*"
|
|
45
43
|
},
|
|
46
44
|
"peerDependencies": {
|
|
47
|
-
"@reef-knot/
|
|
48
|
-
"@reef-knot/wallets-helpers": "3.1.0",
|
|
45
|
+
"@reef-knot/wallets-helpers": "3.2.0-alpha.1",
|
|
49
46
|
"@tanstack/react-query": "^5.29.0",
|
|
50
47
|
"wagmi": ">=3.6"
|
|
51
48
|
}
|
package/dist/icons/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|