@wagmi/core 3.4.8 → 3.4.10

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.
@@ -1,2 +1,2 @@
1
- export const version = '3.4.8';
1
+ export const version = '3.4.10';
2
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAA"}
@@ -74,8 +74,6 @@ export declare namespace setup {
74
74
  providerParameters: Omit<AccountsProviderParameters, 'adapter' | 'chains'>;
75
75
  /** EIP-6963 reverse-DNS ID(s) for the connector. */
76
76
  rdns?: string | readonly string[] | undefined;
77
- /** Whether the connector's accounts can be hydrated for local signing. */
78
- signable?: boolean | undefined;
79
77
  /** Connector type. */
80
78
  type: string;
81
79
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Connectors.d.ts","sourceRoot":"","sources":["../../../src/tempo/Connectors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,IAAI,gBAAgB,EAC5B,GAAG,IAAI,WAAW,EAClB,mBAAmB,IAAI,0BAA0B,EACjD,MAAM,IAAI,cAAc,EACxB,QAAQ,IAAI,gBAAgB,EAC7B,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,KAAK,OAAO,EAOb,MAAM,MAAM,CAAA;AAMb,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,OAAO,cAAc,CAAA;IAC7B,QAAQ,EAAE,OAAO,gBAAgB,CAAA;IACjC,mBAAmB,EAAE,OAAO,0BAA0B,CAAA;IACtD,QAAQ,EAAE,OAAO,gBAAgB,CAAA;CAClC,CAAA;AACD,KAAK,wBAAwB,GAAG,WAAW,CACzC,UAAU,C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AAC,EAAE,gBAAgB,GAAG,OAAO,GAAG,SAAS,CAAA;KAC1D,CAAA;IAED,KAAY,iBAAiB,CAAC,gBAAgB,SAAS,OAAO,GAAG,KAAK,IAAI;QACxE,QAAQ,EAAE,gBAAgB,SAAS,IAAI,GACnC,SAAS,eAAe,EAAE,GAC1B,SAAS,OAAO,EAAE,CAAA;QACtB,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;CACF"}
@@ -7,5 +7,6 @@ export * as nonce from './nonce.js';
7
7
  export * as policy from './policy.js';
8
8
  export * as reward from './reward.js';
9
9
  export * as token from './token.js';
10
+ export * as wallet from './wallet.js';
10
11
  export * as zone from './zone.js';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tempo/actions/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tempo/actions/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA"}
@@ -0,0 +1,113 @@
1
+ import type { Account, Address, BaseErrorType } from 'viem';
2
+ import { Actions } from 'viem/tempo';
3
+ import { type GetConnectorClientErrorType } from '../../actions/getConnectorClient.js';
4
+ import type { Config } from '../../createConfig.js';
5
+ import type { ChainIdParameter, ConnectorParameter } from '../../types/properties.js';
6
+ import type { UnionCompute } from '../../types/utils.js';
7
+ type AccountParameter = {
8
+ /**
9
+ * Account to use for the connector client. Use `null` to let the wallet infer
10
+ * the account.
11
+ */
12
+ account?: Account | Address | null | undefined;
13
+ };
14
+ /**
15
+ * Opens the wallet send flow with optional pre-filled send fields.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * import { createConfig, http } from '@wagmi/core'
20
+ * import { tempo } from '@wagmi/core/chains'
21
+ * import { Actions } from '@wagmi/core/tempo'
22
+ *
23
+ * const config = createConfig({
24
+ * chains: [tempo],
25
+ * transports: {
26
+ * [tempo.id]: http(),
27
+ * },
28
+ * })
29
+ *
30
+ * const { receipt } = await Actions.wallet.send(config, {
31
+ * to: '0x...',
32
+ * token: '0x...',
33
+ * value: '1.5',
34
+ * })
35
+ * ```
36
+ *
37
+ * @param config - Config.
38
+ * @param parameters - Parameters.
39
+ * @returns The submitted send receipt and chain ID.
40
+ */
41
+ export declare function send<config extends Config>(config: config, parameters?: send.Parameters<config>): Promise<send.ReturnValue>;
42
+ export declare namespace send {
43
+ type Parameters<config extends Config> = UnionCompute<ChainIdParameter<config> & ConnectorParameter & AccountParameter & Actions.wallet.send.Parameters>;
44
+ type ReturnValue = Actions.wallet.send.ReturnValue;
45
+ type ErrorType = GetConnectorClientErrorType | BaseErrorType | Actions.wallet.send.ErrorType;
46
+ }
47
+ /**
48
+ * Opens the wallet swap flow with optional pre-filled swap fields.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * import { createConfig, http } from '@wagmi/core'
53
+ * import { tempo } from '@wagmi/core/chains'
54
+ * import { Actions } from '@wagmi/core/tempo'
55
+ *
56
+ * const config = createConfig({
57
+ * chains: [tempo],
58
+ * transports: {
59
+ * [tempo.id]: http(),
60
+ * },
61
+ * })
62
+ *
63
+ * const { receipt } = await Actions.wallet.swap(config, {
64
+ * amount: '1.5',
65
+ * token: '0x...',
66
+ * type: 'sell',
67
+ * })
68
+ * ```
69
+ *
70
+ * @param config - Config.
71
+ * @param parameters - Parameters.
72
+ * @returns The submitted swap receipt.
73
+ */
74
+ export declare function swap<config extends Config>(config: config, parameters?: swap.Parameters<config>): Promise<swap.ReturnValue>;
75
+ export declare namespace swap {
76
+ type Parameters<config extends Config> = UnionCompute<ChainIdParameter<config> & ConnectorParameter & AccountParameter & Actions.wallet.swap.Parameters>;
77
+ type ReturnValue = Actions.wallet.swap.ReturnValue;
78
+ type ErrorType = GetConnectorClientErrorType | BaseErrorType | Actions.wallet.swap.ErrorType;
79
+ }
80
+ /**
81
+ * Opens the wallet deposit flow with optional pre-filled deposit fields.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * import { createConfig, http } from '@wagmi/core'
86
+ * import { mainnet } from '@wagmi/core/chains'
87
+ * import { Actions } from '@wagmi/core/tempo'
88
+ *
89
+ * const config = createConfig({
90
+ * chains: [mainnet],
91
+ * transports: {
92
+ * [mainnet.id]: http(),
93
+ * },
94
+ * })
95
+ *
96
+ * const result = await Actions.wallet.deposit(config, {
97
+ * token: '0x...',
98
+ * value: '1.5',
99
+ * })
100
+ * ```
101
+ *
102
+ * @param config - Config.
103
+ * @param parameters - Parameters.
104
+ * @returns Receipts for onchain deposit operations, when applicable.
105
+ */
106
+ export declare function deposit<config extends Config>(config: config, parameters?: deposit.Parameters<config>): Promise<deposit.ReturnValue>;
107
+ export declare namespace deposit {
108
+ type Parameters<config extends Config> = UnionCompute<ChainIdParameter<config> & ConnectorParameter & AccountParameter & Omit<Actions.wallet.deposit.Parameters, 'chainId'>>;
109
+ type ReturnValue = Actions.wallet.deposit.ReturnValue;
110
+ type ErrorType = GetConnectorClientErrorType | BaseErrorType | Actions.wallet.deposit.ErrorType;
111
+ }
112
+ export {};
113
+ //# sourceMappingURL=wallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../../../src/tempo/actions/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,KAAK,gBAAgB,GAAG;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;CAC/C,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,IAAI,CAAC,MAAM,SAAS,MAAM,EAC9C,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAM,GACvC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAW3B;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,KAAY,UAAU,CAAC,MAAM,SAAS,MAAM,IAAI,YAAY,CAC1D,gBAAgB,CAAC,MAAM,CAAC,GACtB,kBAAkB,GAClB,gBAAgB,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C,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,CACrD,CAAA;IAED,KAAY,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAA;IAE5D,KAAY,SAAS,GACjB,2BAA2B,GAC3B,aAAa,GACb,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAA;CACrC"}
@@ -1,2 +1,2 @@
1
- export declare const version = "3.4.8";
1
+ export declare const version = "3.4.10";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAA"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wagmi/core",
3
3
  "description": "VanillaJS library for Ethereum",
4
- "version": "3.4.8",
4
+ "version": "3.4.10",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -126,7 +126,6 @@ export function webAuthn(parameters: webAuthn.Parameters = {}) {
126
126
  name: name ?? 'EOA (WebAuthn)',
127
127
  providerParameters,
128
128
  rdns,
129
- signable: true,
130
129
  type: 'webAuthn',
131
130
  })
132
131
  }
@@ -162,7 +161,6 @@ export function dangerous_secp256k1(
162
161
  name: name ?? 'EOA (Secp256k1)',
163
162
  providerParameters,
164
163
  rdns,
165
- signable: true,
166
164
  type: 'secp256k1',
167
165
  })
168
166
  }
@@ -201,6 +199,7 @@ function _setup(parameters: setup.Parameters) {
201
199
  ...parameters.providerParameters,
202
200
  adapter: parameters.createAdapter(accounts),
203
201
  chains: config.chains as never,
202
+ transports: config.transports as never,
204
203
  }) as unknown as Provider
205
204
  })()
206
205
 
@@ -309,7 +308,9 @@ function _setup(parameters: setup.Parameters) {
309
308
  async getClient({ chainId } = {}) {
310
309
  const provider = await getProvider()
311
310
  return Object.assign(provider.getClient({ chainId }), {
312
- account: provider.getAccount({ signable: parameters.signable }),
311
+ // Always use the root account; the SDK provider performs
312
+ // access key orchestration internally before signing.
313
+ account: provider.getAccount({ accessKey: false }),
313
314
  }) as never
314
315
  },
315
316
  async getProvider() {
@@ -411,8 +412,6 @@ export declare namespace setup {
411
412
  providerParameters: Omit<AccountsProviderParameters, 'adapter' | 'chains'>
412
413
  /** EIP-6963 reverse-DNS ID(s) for the connector. */
413
414
  rdns?: string | readonly string[] | undefined
414
- /** Whether the connector's accounts can be hydrated for local signing. */
415
- signable?: boolean | undefined
416
415
  /** Connector type. */
417
416
  type: string
418
417
  }
@@ -8,4 +8,5 @@ export * as nonce from './nonce.js'
8
8
  export * as policy from './policy.js'
9
9
  export * as reward from './reward.js'
10
10
  export * as token from './token.js'
11
+ export * as wallet from './wallet.js'
11
12
  export * as zone from './zone.js'
@@ -0,0 +1,196 @@
1
+ import type { Account, Address, BaseErrorType } from 'viem'
2
+ import { Actions } from 'viem/tempo'
3
+ import {
4
+ type GetConnectorClientErrorType,
5
+ getConnectorClient,
6
+ } from '../../actions/getConnectorClient.js'
7
+ import type { Config } from '../../createConfig.js'
8
+ import type {
9
+ ChainIdParameter,
10
+ ConnectorParameter,
11
+ } from '../../types/properties.js'
12
+ import type { UnionCompute } from '../../types/utils.js'
13
+
14
+ type AccountParameter = {
15
+ /**
16
+ * Account to use for the connector client. Use `null` to let the wallet infer
17
+ * the account.
18
+ */
19
+ account?: Account | Address | null | undefined
20
+ }
21
+
22
+ /**
23
+ * Opens the wallet send flow with optional pre-filled send fields.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * import { createConfig, http } from '@wagmi/core'
28
+ * import { tempo } from '@wagmi/core/chains'
29
+ * import { Actions } from '@wagmi/core/tempo'
30
+ *
31
+ * const config = createConfig({
32
+ * chains: [tempo],
33
+ * transports: {
34
+ * [tempo.id]: http(),
35
+ * },
36
+ * })
37
+ *
38
+ * const { receipt } = await Actions.wallet.send(config, {
39
+ * to: '0x...',
40
+ * token: '0x...',
41
+ * value: '1.5',
42
+ * })
43
+ * ```
44
+ *
45
+ * @param config - Config.
46
+ * @param parameters - Parameters.
47
+ * @returns The submitted send receipt and chain ID.
48
+ */
49
+ export async function send<config extends Config>(
50
+ config: config,
51
+ parameters: send.Parameters<config> = {},
52
+ ): Promise<send.ReturnValue> {
53
+ const { account, chainId, connector, ...rest } = parameters
54
+
55
+ const client = await getConnectorClient(config, {
56
+ account,
57
+ assertChainId: false,
58
+ chainId,
59
+ connector,
60
+ })
61
+
62
+ return Actions.wallet.send(client, rest)
63
+ }
64
+
65
+ export declare namespace send {
66
+ export type Parameters<config extends Config> = UnionCompute<
67
+ ChainIdParameter<config> &
68
+ ConnectorParameter &
69
+ AccountParameter &
70
+ Actions.wallet.send.Parameters
71
+ >
72
+
73
+ export type ReturnValue = Actions.wallet.send.ReturnValue
74
+
75
+ export type ErrorType =
76
+ | GetConnectorClientErrorType
77
+ | BaseErrorType
78
+ | Actions.wallet.send.ErrorType
79
+ }
80
+
81
+ /**
82
+ * Opens the wallet swap flow with optional pre-filled swap fields.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * import { createConfig, http } from '@wagmi/core'
87
+ * import { tempo } from '@wagmi/core/chains'
88
+ * import { Actions } from '@wagmi/core/tempo'
89
+ *
90
+ * const config = createConfig({
91
+ * chains: [tempo],
92
+ * transports: {
93
+ * [tempo.id]: http(),
94
+ * },
95
+ * })
96
+ *
97
+ * const { receipt } = await Actions.wallet.swap(config, {
98
+ * amount: '1.5',
99
+ * token: '0x...',
100
+ * type: 'sell',
101
+ * })
102
+ * ```
103
+ *
104
+ * @param config - Config.
105
+ * @param parameters - Parameters.
106
+ * @returns The submitted swap receipt.
107
+ */
108
+ export async function swap<config extends Config>(
109
+ config: config,
110
+ parameters: swap.Parameters<config> = {},
111
+ ): Promise<swap.ReturnValue> {
112
+ const { account, chainId, connector, ...rest } = parameters
113
+
114
+ const client = await getConnectorClient(config, {
115
+ account,
116
+ assertChainId: false,
117
+ chainId,
118
+ connector,
119
+ })
120
+
121
+ return Actions.wallet.swap(client, rest)
122
+ }
123
+
124
+ export declare namespace swap {
125
+ export type Parameters<config extends Config> = UnionCompute<
126
+ ChainIdParameter<config> &
127
+ ConnectorParameter &
128
+ AccountParameter &
129
+ Actions.wallet.swap.Parameters
130
+ >
131
+
132
+ export type ReturnValue = Actions.wallet.swap.ReturnValue
133
+
134
+ export type ErrorType =
135
+ | GetConnectorClientErrorType
136
+ | BaseErrorType
137
+ | Actions.wallet.swap.ErrorType
138
+ }
139
+
140
+ /**
141
+ * Opens the wallet deposit flow with optional pre-filled deposit fields.
142
+ *
143
+ * @example
144
+ * ```ts
145
+ * import { createConfig, http } from '@wagmi/core'
146
+ * import { mainnet } from '@wagmi/core/chains'
147
+ * import { Actions } from '@wagmi/core/tempo'
148
+ *
149
+ * const config = createConfig({
150
+ * chains: [mainnet],
151
+ * transports: {
152
+ * [mainnet.id]: http(),
153
+ * },
154
+ * })
155
+ *
156
+ * const result = await Actions.wallet.deposit(config, {
157
+ * token: '0x...',
158
+ * value: '1.5',
159
+ * })
160
+ * ```
161
+ *
162
+ * @param config - Config.
163
+ * @param parameters - Parameters.
164
+ * @returns Receipts for onchain deposit operations, when applicable.
165
+ */
166
+ export async function deposit<config extends Config>(
167
+ config: config,
168
+ parameters: deposit.Parameters<config> = {},
169
+ ): Promise<deposit.ReturnValue> {
170
+ const { account, chainId, connector, ...rest } = parameters
171
+
172
+ const client = await getConnectorClient(config, {
173
+ account,
174
+ assertChainId: false,
175
+ chainId,
176
+ connector,
177
+ })
178
+
179
+ return Actions.wallet.deposit(client, { ...rest, chainId })
180
+ }
181
+
182
+ export declare namespace deposit {
183
+ export type Parameters<config extends Config> = UnionCompute<
184
+ ChainIdParameter<config> &
185
+ ConnectorParameter &
186
+ AccountParameter &
187
+ Omit<Actions.wallet.deposit.Parameters, 'chainId'>
188
+ >
189
+
190
+ export type ReturnValue = Actions.wallet.deposit.ReturnValue
191
+
192
+ export type ErrorType =
193
+ | GetConnectorClientErrorType
194
+ | BaseErrorType
195
+ | Actions.wallet.deposit.ErrorType
196
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '3.4.8'
1
+ export const version = '3.4.10'