@reef-knot/wallet-adapter-coinbase-smart-wallet 3.2.0-alpha.1 → 3.2.0-alpha.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/dist/index.d.ts CHANGED
@@ -9,55 +9,27 @@ export declare const getCoinbaseSmartWalletConnector: (config: ConfigType) => {
9
9
  icon?: string | undefined;
10
10
  id: string;
11
11
  rdns?: string | readonly string[] | undefined;
12
- supportsSimulation?: boolean | undefined;
13
12
  type: string;
14
13
  setup?: (() => Promise<void>) | undefined;
15
- connect: (parameters?: {
14
+ connect: (<withCapabilities extends boolean = false>(parameters?: {
16
15
  chainId?: number | undefined;
17
16
  isReconnecting?: boolean | undefined;
17
+ withCapabilities?: withCapabilities | boolean | undefined;
18
18
  } | undefined) => Promise<{
19
- accounts: readonly import("abitype").Address[];
19
+ accounts: withCapabilities extends true ? readonly {
20
+ address: import("abitype").Address;
21
+ capabilities: Record<string, unknown>;
22
+ }[] : readonly import("abitype").Address[];
20
23
  chainId: number;
21
- }>;
22
- disconnect: () => Promise<void>;
23
- getAccounts: () => Promise<readonly import("abitype").Address[]>;
24
- getChainId: () => Promise<number>;
25
- getProvider: (parameters?: {
26
- chainId?: number | undefined;
27
- } | undefined) => Promise<import("cbw-sdk").CoinbaseWalletProvider>;
28
- getClient?: ((parameters?: {
29
- chainId?: number | undefined;
30
- } | undefined) => Promise<import("viem").Client>) | undefined;
31
- isAuthorized: () => Promise<boolean>;
32
- switchChain?: ((parameters: import("@wagmi/core/internal").Compute<{
33
- addEthereumChainParameter?: import("@wagmi/core/internal").ExactPartial<import("@wagmi/core/internal").Omit<import("viem").AddEthereumChainParameter, "chainId">> | undefined;
34
- chainId: number;
35
- }>) => Promise<import("viem").Chain>) | undefined;
36
- onAccountsChanged: (accounts: string[]) => void;
37
- onChainChanged: (chainId: string) => void;
38
- onConnect?: ((connectInfo: import("viem").ProviderConnectInfo) => void) | undefined;
39
- onDisconnect: (error?: Error | undefined) => void;
40
- onMessage?: ((message: import("viem").ProviderMessage) => void) | undefined;
41
- } | {
42
- name: string;
43
- icon?: string | undefined;
44
- id: string;
45
- rdns?: string | readonly string[] | undefined;
46
- supportsSimulation?: boolean | undefined;
47
- type: string;
48
- setup?: (() => Promise<void>) | undefined;
49
- connect: ((parameters?: {
50
- chainId?: number | undefined;
51
- isReconnecting?: boolean | undefined;
52
- } | undefined) => Promise<{
53
- accounts: readonly import("abitype").Address[];
54
- chainId: number;
55
- }>) & ((parameters?: {
24
+ }>) & (<withCapabilities extends boolean = false>(parameters?: {
56
25
  chainId?: number | undefined;
57
26
  instantOnboarding?: boolean | undefined;
58
27
  isReconnecting?: boolean | undefined;
28
+ withCapabilities?: withCapabilities | boolean | undefined;
59
29
  }) => Promise<{
60
- accounts: readonly import("abitype").Address[];
30
+ accounts: withCapabilities extends true ? readonly {
31
+ address: import("abitype").Address;
32
+ }[] : readonly import("abitype").Address[];
61
33
  chainId: number;
62
34
  }>);
63
35
  disconnect: () => Promise<void>;
@@ -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;;;;;;;;;eAsByW,CAAC;sBAA4C,CAAC;;;;;;;;;eAA8R,CAAC;;;eAA0G,CAAC;;;;iCAAyK,CAAC;;;;;;;;;;;;;;;;;eAAlmB,CAAC;sBAA4C,CAAC;;;;;eAA4M,CAAC;yBAA+C,CAAC;sBAA6C,CAAC;;;;;;;;;eAAb,CAAC;;;;;eAA0G,CAAC;;;;iCAAyK,CAAC;;;;;;;;CAV5gC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAOhC,CAAC"}
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;;;;;;;;eAsBqU,CAAC;sBAA4C,CAAC;wBAA+C,CAAC;;;;;;;;eAnB9d,CAAC;yBACL,CAAC;sBAEsC,CAAC;wBAG5B,CAAC;;;;;;;;;;;eAag5B,CAAC;;;;;eAA0G,CAAC;;;;iCAAyK,CAAC;;;;;;;;CAVrrC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAOhC,CAAC"}
package/dist/index.js CHANGED
@@ -6,15 +6,15 @@ const id = 'coinbaseSmartWallet';
6
6
  const name = 'Coinbase Smart Wallet';
7
7
  const rdns = 'com.coinbase.wallet';
8
8
  const getCoinbaseSmartWalletConnector = config => {
9
- var _a, _b;
10
9
  const coinbaseCreateConnectorFn = coinbaseWallet({
11
10
  preference: 'smartWalletOnly',
12
- appName: (_b = (_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.location) === null || _b === void 0 ? void 0 : _b.hostname
11
+ appName: globalThis.window?.location?.hostname
13
12
  });
14
13
  const coinbaseConnector = coinbaseCreateConnectorFn(config);
15
- return Object.assign(Object.assign({}, coinbaseConnector), {
14
+ return {
15
+ ...coinbaseConnector,
16
16
  name
17
- });
17
+ };
18
18
  };
19
19
  const CoinbaseSmartWallet = ({
20
20
  providersStore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-knot/wallet-adapter-coinbase-smart-wallet",
3
- "version": "3.2.0-alpha.1",
3
+ "version": "3.2.0-alpha.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -37,13 +37,13 @@
37
37
  "lint": "eslint --ext ts,tsx,js,mjs ."
38
38
  },
39
39
  "devDependencies": {
40
- "@reef-knot/types": "4.2.0-alpha.1",
40
+ "@reef-knot/types": "4.2.0-alpha.2",
41
41
  "@svgr/rollup": "^6.5.1",
42
42
  "eslint-config-custom": "*"
43
43
  },
44
44
  "peerDependencies": {
45
- "@reef-knot/types": "4.2.0-alpha.1",
45
+ "@reef-knot/types": "4.2.0-alpha.2",
46
46
  "@tanstack/react-query": "^5.29.0",
47
- "wagmi": ">=2.14"
47
+ "wagmi": ">=3.3"
48
48
  }
49
49
  }