viem 2.9.30 → 2.9.31
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 +6 -0
- package/_cjs/errors/version.js +1 -1
- package/_cjs/experimental/eip5792/actions/getCapabilities.js.map +1 -1
- package/_cjs/experimental/index.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/experimental/eip5792/actions/getCapabilities.js.map +1 -1
- package/_esm/experimental/index.js.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/experimental/eip5792/actions/getCapabilities.d.ts +3 -3
- package/_types/experimental/eip5792/actions/getCapabilities.d.ts.map +1 -1
- package/_types/experimental/eip5792/decorators/eip5792.d.ts +2 -2
- package/_types/experimental/eip5792/decorators/eip5792.d.ts.map +1 -1
- package/_types/experimental/index.d.ts +1 -1
- package/_types/experimental/index.d.ts.map +1 -1
- package/errors/version.ts +1 -1
- package/experimental/eip5792/actions/getCapabilities.ts +4 -7
- package/experimental/eip5792/decorators/eip5792.ts +2 -2
- package/experimental/index.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# viem
|
2
2
|
|
3
|
+
## 2.9.31
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [`8a2fb73e06073af2f0cb3e21f4a964b59dc13ba2`](https://github.com/wevm/viem/commit/8a2fb73e06073af2f0cb3e21f4a964b59dc13ba2) Thanks [@jxom](https://github.com/jxom)! - **Experimental:** Fixed `getCapabilities` parameter type.
|
8
|
+
|
3
9
|
## 2.9.30
|
4
10
|
|
5
11
|
### Patch Changes
|
package/_cjs/errors/version.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getCapabilities.js","sourceRoot":"","sources":["../../../../experimental/eip5792/actions/getCapabilities.ts"],"names":[],"mappings":";;;AAEA,2DAAiE;
|
1
|
+
{"version":3,"file":"getCapabilities.js","sourceRoot":"","sources":["../../../../experimental/eip5792/actions/getCapabilities.ts"],"names":[],"mappings":";;;AAEA,2DAAiE;AASjE,4DAAyD;AAiClD,KAAK,UAAU,eAAe,CAInC,GAAG,UAUE;IAEL,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,UAAU,CAAA;IACjC,MAAM,WAAW,GAAG,IAAI,EAAE,OAAO,IAAI,MAAM,CAAC,OAAO,CAAA;IAEnD,IAAI,CAAC,WAAW;QAAE,MAAM,IAAI,iCAAoB,EAAE,CAAA;IAClD,MAAM,OAAO,GAAG,IAAA,0BAAY,EAAC,WAAW,CAAC,CAAA;IAEzC,MAAM,gBAAgB,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAC5C,MAAM,EAAE,wBAAwB;QAChC,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;KAC1B,CAAC,CAAA;IAEF,MAAM,YAAY,GAAG,EAGpB,CAAA;IACD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC;QACzD,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAA;IACnC,OAAO,YAAY,CAAA;AACrB,CAAC;AAlCD,0CAkCC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../experimental/index.ts"],"names":[],"mappings":";;;AAAA,2EAK6C;AAD3C,qHAAA,eAAe,OAAA;AAEjB,6FAKqD;AADnD,yIAAA,yBAAyB,OAAA;AAE3B,6EAK6C;AAD3C,yHAAA,iBAAiB,OAAA;AAEnB,8DAGwC;AADtC,kHAAA,oBAAoB,OAAA;AAEtB,kEAUyC;AADvC,2GAAA,UAAU,OAAA;AAEZ,uFAGuD;AADrD,yHAAA,iBAAiB,OAAA;AAEnB,yFAKwD;AADtD,2HAAA,kBAAkB,OAAA;AAGpB,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../experimental/index.ts"],"names":[],"mappings":";;;AAAA,2EAK6C;AAD3C,qHAAA,eAAe,OAAA;AAEjB,6FAKqD;AADnD,yIAAA,yBAAyB,OAAA;AAE3B,6EAK6C;AAD3C,yHAAA,iBAAiB,OAAA;AAEnB,8DAGwC;AADtC,kHAAA,oBAAoB,OAAA;AAEtB,kEAUyC;AADvC,2GAAA,UAAU,OAAA;AAEZ,uFAGuD;AADrD,yHAAA,iBAAiB,OAAA;AAEnB,yFAKwD;AADtD,2HAAA,kBAAkB,OAAA;AAGpB,2EAK6C;AAD3C,qHAAA,eAAe,OAAA;AAEjB,+DAKuC;AADrC,yGAAA,SAAS,OAAA;AAEX,yEAK4C;AAD1C,mHAAA,cAAc,OAAA;AAEhB,2EAK6C;AAD3C,qHAAA,eAAe,OAAA;AAEjB,yEAK4C;AAD1C,mHAAA,cAAc,OAAA;AAEhB,8DAGwC;AADtC,kHAAA,oBAAoB,OAAA"}
|
package/_esm/errors/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export const version = '2.9.
|
1
|
+
export const version = '2.9.31';
|
2
2
|
//# sourceMappingURL=version.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getCapabilities.js","sourceRoot":"","sources":["../../../../experimental/eip5792/actions/getCapabilities.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;
|
1
|
+
{"version":3,"file":"getCapabilities.js","sourceRoot":"","sources":["../../../../experimental/eip5792/actions/getCapabilities.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AASjE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAazD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAInC,GAAG,UAUE;IAEL,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,UAAU,CAAA;IACjC,MAAM,WAAW,GAAG,IAAI,EAAE,OAAO,IAAI,MAAM,CAAC,OAAO,CAAA;IAEnD,IAAI,CAAC,WAAW;QAAE,MAAM,IAAI,oBAAoB,EAAE,CAAA;IAClD,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,CAAC,CAAA;IAEzC,MAAM,gBAAgB,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAC5C,MAAM,EAAE,wBAAwB;QAChC,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;KAC1B,CAAC,CAAA;IAEF,MAAM,YAAY,GAAG,EAGpB,CAAA;IACD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC;QACzD,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAA;IACnC,OAAO,YAAY,CAAA;AACrB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../experimental/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,eAAe,GAChB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAIL,yBAAyB,GAC1B,MAAM,8CAA8C,CAAA;AACrD,OAAO,EAIL,iBAAiB,GAClB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAEL,oBAAoB,GACrB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EASL,UAAU,GACX,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAEL,iBAAiB,GAClB,MAAM,gDAAgD,CAAA;AACvD,OAAO,EAIL,kBAAkB,GACnB,MAAM,iDAAiD,CAAA;AAExD,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../experimental/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,eAAe,GAChB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAIL,yBAAyB,GAC1B,MAAM,8CAA8C,CAAA;AACrD,OAAO,EAIL,iBAAiB,GAClB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAEL,oBAAoB,GACrB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EASL,UAAU,GACX,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAEL,iBAAiB,GAClB,MAAM,gDAAgD,CAAA;AACvD,OAAO,EAIL,kBAAkB,GACnB,MAAM,iDAAiD,CAAA;AAExD,OAAO,EAIL,eAAe,GAChB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAIL,SAAS,GACV,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAIL,cAAc,GACf,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAIL,eAAe,GAChB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAIL,cAAc,GACf,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAEL,oBAAoB,GACrB,MAAM,iCAAiC,CAAA"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const version = "2.9.
|
1
|
+
export declare const version = "2.9.31";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import type { Client } from '../../../clients/createClient.js';
|
2
2
|
import type { Transport } from '../../../clients/transports/createTransport.js';
|
3
3
|
import type { ErrorType } from '../../../errors/utils.js';
|
4
|
-
import type {
|
4
|
+
import type { Account, GetAccountParameter } from '../../../types/account.js';
|
5
5
|
import type { Chain } from '../../../types/chain.js';
|
6
6
|
import type { WalletCapabilities, WalletCapabilitiesRecord } from '../../../types/eip1193.js';
|
7
7
|
import type { Prettify } from '../../../types/utils.js';
|
8
8
|
import type { RequestErrorType } from '../../../utils/buildRequest.js';
|
9
|
-
export type GetCapabilitiesParameters<account extends
|
9
|
+
export type GetCapabilitiesParameters<account extends Account | undefined = Account | undefined> = GetAccountParameter<account>;
|
10
10
|
export type GetCapabilitiesReturnType = Prettify<WalletCapabilitiesRecord<WalletCapabilities, number>>;
|
11
11
|
export type GetCapabilitiesErrorType = RequestErrorType | ErrorType;
|
12
12
|
/**
|
@@ -29,7 +29,7 @@ export type GetCapabilitiesErrorType = RequestErrorType | ErrorType;
|
|
29
29
|
* })
|
30
30
|
* const capabilities = await getCapabilities(client)
|
31
31
|
*/
|
32
|
-
export declare function getCapabilities<chain extends Chain | undefined, account extends
|
32
|
+
export declare function getCapabilities<chain extends Chain | undefined, account extends Account | undefined = undefined>(...parameters: account extends Account ? [client: Client<Transport, chain, account>] | [
|
33
33
|
client: Client<Transport, chain, account>,
|
34
34
|
parameters: GetCapabilitiesParameters<account>
|
35
35
|
] : [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getCapabilities.d.ts","sourceRoot":"","sources":["../../../../experimental/eip5792/actions/getCapabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAE/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"getCapabilities.d.ts","sourceRoot":"","sources":["../../../../experimental/eip5792/actions/getCapabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAE/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,KAAK,EACV,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAEtE,MAAM,MAAM,yBAAyB,CACnC,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,IACvD,mBAAmB,CAAC,OAAO,CAAC,CAAA;AAEhC,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAC9C,wBAAwB,CAAC,kBAAkB,EAAE,MAAM,CAAC,CACrD,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,GAAG,SAAS,CAAA;AAEnE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,eAAe,CACnC,KAAK,SAAS,KAAK,GAAG,SAAS,EAC/B,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAE/C,GAAG,UAAU,EAAE,OAAO,SAAS,OAAO,GAE9B,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,GAC3C;IACE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC;IACzC,UAAU,EAAE,yBAAyB,CAAC,OAAO,CAAC;CAC/C,GACL;IACE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC;IACzC,UAAU,EAAE,yBAAyB,CAAC,OAAO,CAAC;CAC/C,GACJ,OAAO,CAAC,yBAAyB,CAAC,CAmBpC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { Client } from '../../../clients/createClient.js';
|
2
2
|
import type { Transport } from '../../../clients/transports/createTransport.js';
|
3
|
-
import type { Account
|
3
|
+
import type { Account } from '../../../types/account.js';
|
4
4
|
import type { Chain } from '../../../types/chain.js';
|
5
5
|
import { type GetCallsStatusParameters, type GetCallsStatusReturnType } from '../actions/getCallsStatus.js';
|
6
6
|
import { type GetCapabilitiesParameters, type GetCapabilitiesReturnType } from '../actions/getCapabilities.js';
|
@@ -53,7 +53,7 @@ export type WalletActionsEip5792<chain extends Chain | undefined = Chain | undef
|
|
53
53
|
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
54
54
|
* })
|
55
55
|
*/
|
56
|
-
getCapabilities: (...parameters: account extends
|
56
|
+
getCapabilities: (...parameters: account extends Account ? [] | [parameters: GetCapabilitiesParameters<account>] : [parameters: GetCapabilitiesParameters<undefined>]) => Promise<GetCapabilitiesReturnType>;
|
57
57
|
/**
|
58
58
|
* Requests the connected wallet to send a batch of calls.
|
59
59
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"eip5792.d.ts","sourceRoot":"","sources":["../../../../experimental/eip5792/decorators/eip5792.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"eip5792.d.ts","sourceRoot":"","sources":["../../../../experimental/eip5792/decorators/eip5792.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAE9B,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAE/B,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EAEzB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAE/B,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB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G;AACH,wBAAgB,oBAAoB,0JAMxB,OAAO,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,KACxC,qBAAqB,KAAK,EAAE,OAAO,CAAC,CAUxC"}
|
@@ -5,7 +5,7 @@ export { type WalletActionsEip3074, walletActionsEip3074, } from './eip3074/deco
|
|
5
5
|
export { type GetInvokerErrorType, type GetInvokerParameters, type Invoker, type InvokerArgs, type InvokerExecuteErrorType, type InvokerExecuteParameters, type InvokerSignErrorType, type InvokerSignParameters, getInvoker, } from './eip3074/invokers/getInvoker.js';
|
6
6
|
export { type BatchInvokerArgs, batchInvokerCoder, } from './eip3074/invokers/coders/batchInvokerCoder.js';
|
7
7
|
export { type DefineInvokerCoderParameters, type DefineInvokerCoderReturnType, type InvokerCoder, defineInvokerCoder, } from './eip3074/invokers/coders/defineInvokerCoder.js';
|
8
|
-
export { type GetCapabilitiesErrorType, type GetCapabilitiesReturnType, getCapabilities, } from './eip5792/actions/getCapabilities.js';
|
8
|
+
export { type GetCapabilitiesParameters, type GetCapabilitiesErrorType, type GetCapabilitiesReturnType, getCapabilities, } from './eip5792/actions/getCapabilities.js';
|
9
9
|
export { type SendCallsErrorType, type SendCallsParameters, type SendCallsReturnType, sendCalls, } from './eip5792/actions/sendCalls.js';
|
10
10
|
export { type GetCallsStatusErrorType, type GetCallsStatusParameters, type GetCallsStatusReturnType, getCallsStatus, } from './eip5792/actions/getCallsStatus.js';
|
11
11
|
export { type ShowCallsStatusErrorType, type ShowCallsStatusParameters, type ShowCallsStatusReturnType, showCallsStatus, } from './eip5792/actions/showCallsStatus.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../experimental/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,eAAe,GAChB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EACL,KAAK,mCAAmC,EACxC,KAAK,mC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B,oBAAoB,GACrB,MAAM,iCAAiC,CAAA"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../experimental/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,eAAe,GAChB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EACL,KAAK,mCAAmC,EACxC,KAAK,mCAAmC,EACxC,KAAK,kCAAkC,EACvC,yBAAyB,GAC1B,MAAM,8CAA8C,CAAA;AACrD,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,iBAAiB,GAClB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EACL,KAAK,oBAAoB,EACzB,oBAAoB,GACrB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,UAAU,GACX,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,KAAK,gBAAgB,EACrB,iBAAiB,GAClB,MAAM,gDAAgD,CAAA;AACvD,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,YAAY,EACjB,kBAAkB,GACnB,MAAM,iDAAiD,CAAA;AAExD,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,eAAe,GAChB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,SAAS,GACV,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,cAAc,GACf,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,eAAe,GAChB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,cAAc,GACf,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,KAAK,oBAAoB,EACzB,oBAAoB,GACrB,MAAM,iCAAiC,CAAA"}
|
package/errors/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = '2.9.
|
1
|
+
export const version = '2.9.31'
|
@@ -2,10 +2,7 @@ import type { Client } from '../../../clients/createClient.js'
|
|
2
2
|
import type { Transport } from '../../../clients/transports/createTransport.js'
|
3
3
|
import { AccountNotFoundError } from '../../../errors/account.js'
|
4
4
|
import type { ErrorType } from '../../../errors/utils.js'
|
5
|
-
import type {
|
6
|
-
GetAccountParameter,
|
7
|
-
JsonRpcAccount,
|
8
|
-
} from '../../../types/account.js'
|
5
|
+
import type { Account, GetAccountParameter } from '../../../types/account.js'
|
9
6
|
import type { Chain } from '../../../types/chain.js'
|
10
7
|
import type {
|
11
8
|
WalletCapabilities,
|
@@ -16,7 +13,7 @@ import { parseAccount } from '../../../utils/accounts.js'
|
|
16
13
|
import type { RequestErrorType } from '../../../utils/buildRequest.js'
|
17
14
|
|
18
15
|
export type GetCapabilitiesParameters<
|
19
|
-
account extends
|
16
|
+
account extends Account | undefined = Account | undefined,
|
20
17
|
> = GetAccountParameter<account>
|
21
18
|
|
22
19
|
export type GetCapabilitiesReturnType = Prettify<
|
@@ -47,9 +44,9 @@ export type GetCapabilitiesErrorType = RequestErrorType | ErrorType
|
|
47
44
|
*/
|
48
45
|
export async function getCapabilities<
|
49
46
|
chain extends Chain | undefined,
|
50
|
-
account extends
|
47
|
+
account extends Account | undefined = undefined,
|
51
48
|
>(
|
52
|
-
...parameters: account extends
|
49
|
+
...parameters: account extends Account
|
53
50
|
?
|
54
51
|
| [client: Client<Transport, chain, account>]
|
55
52
|
| [
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { Client } from '../../../clients/createClient.js'
|
2
2
|
import type { Transport } from '../../../clients/transports/createTransport.js'
|
3
|
-
import type { Account
|
3
|
+
import type { Account } from '../../../types/account.js'
|
4
4
|
import type { Chain } from '../../../types/chain.js'
|
5
5
|
import {
|
6
6
|
type GetCallsStatusParameters,
|
@@ -80,7 +80,7 @@ export type WalletActionsEip5792<
|
|
80
80
|
* })
|
81
81
|
*/
|
82
82
|
getCapabilities: (
|
83
|
-
...parameters: account extends
|
83
|
+
...parameters: account extends Account
|
84
84
|
? [] | [parameters: GetCapabilitiesParameters<account>]
|
85
85
|
: [parameters: GetCapabilitiesParameters<undefined>]
|
86
86
|
) => Promise<GetCapabilitiesReturnType>
|
package/experimental/index.ts
CHANGED