@zerodev/sdk 5.4.16 → 5.4.17
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/_cjs/actions/public/getKernelImplementationAddress.js +2 -2
- package/_cjs/actions/public/getKernelImplementationAddress.js.map +1 -1
- package/_cjs/actions/public/getKernelVersion.js +3 -3
- package/_cjs/actions/public/getKernelVersion.js.map +1 -1
- package/_esm/actions/public/getKernelImplementationAddress.js +1 -1
- package/_esm/actions/public/getKernelImplementationAddress.js.map +1 -1
- package/_esm/actions/public/getKernelVersion.js +1 -1
- package/_esm/actions/public/getKernelVersion.js.map +1 -1
- package/_types/actions/public/getKernelVersion.d.ts +1 -1
- package/_types/actions/public/getKernelVersion.d.ts.map +1 -1
- package/actions/public/getKernelImplementationAddress.ts +1 -1
- package/actions/public/getKernelVersion.ts +2 -2
- package/package.json +1 -1
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getKernelImplementationAddress = void 0;
|
|
4
4
|
const actions_1 = require("viem/actions");
|
|
5
5
|
const utils_1 = require("viem/utils");
|
|
6
|
-
const
|
|
6
|
+
const constants_js_1 = require("../../constants.js");
|
|
7
7
|
const getKernelImplementationAddress = async (client, args) => {
|
|
8
8
|
const { address } = args;
|
|
9
9
|
const storageValue = await (0, utils_1.getAction)(client, actions_1.getStorageAt, "getStorageAt")({
|
|
10
10
|
address,
|
|
11
|
-
slot:
|
|
11
|
+
slot: constants_js_1.KERNEL_IMPLEMENTATION_SLOT
|
|
12
12
|
});
|
|
13
13
|
if (!storageValue) {
|
|
14
14
|
throw new Error("Kernel implementation address not found");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getKernelImplementationAddress.js","sourceRoot":"","sources":["../../../actions/public/getKernelImplementationAddress.ts"],"names":[],"mappings":";;;AACA,0CAA2C;AAC3C,sCAAuE;AACvE
|
|
1
|
+
{"version":3,"file":"getKernelImplementationAddress.js","sourceRoot":"","sources":["../../../actions/public/getKernelImplementationAddress.ts"],"names":[],"mappings":";;;AACA,0CAA2C;AAC3C,sCAAuE;AACvE,qDAA+D;AA4BxD,MAAM,8BAA8B,GAAG,KAAK,EAC/C,MAAc,EACd,IAA0C,EAC1B,EAAE;IAClB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAExB,MAAM,YAAY,GAAG,MAAM,IAAA,iBAAS,EAChC,MAAM,EACN,sBAAY,EACZ,cAAc,CACjB,CAAC;QACE,OAAO;QACP,IAAI,EAAE,yCAA0B;KACnC,CAAC,CAAA;IACF,IAAI,CAAC,YAAY,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAA;IAC9D,CAAC;IACD,MAAM,YAAY,GAAG,IAAA,aAAK,EAAC,YAAY,EAAE,EAAE,CAAC,CAAA;IAC5C,MAAM,UAAU,GAAG,IAAA,aAAK,EAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAA,aAAK,EAAC,YAAY,CAAC,CAAA;IAC3E,OAAO,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAA;AACjC,CAAC,CAAA;AApBY,QAAA,8BAA8B,kCAoB1C"}
|
|
@@ -4,12 +4,12 @@ exports.getKernelVersion = void 0;
|
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
const actions_1 = require("viem/actions");
|
|
6
6
|
const utils_1 = require("viem/utils");
|
|
7
|
-
const
|
|
7
|
+
const constants_js_1 = require("../../constants.js");
|
|
8
8
|
const getKernelVersion = async (client, args) => {
|
|
9
9
|
const { address } = args;
|
|
10
10
|
const storageValue = await (0, utils_1.getAction)(client, actions_1.getStorageAt, "getStorageAt")({
|
|
11
11
|
address,
|
|
12
|
-
slot:
|
|
12
|
+
slot: constants_js_1.KERNEL_IMPLEMENTATION_SLOT
|
|
13
13
|
});
|
|
14
14
|
if (!storageValue) {
|
|
15
15
|
throw new Error("Kernel version not found");
|
|
@@ -20,7 +20,7 @@ const getKernelVersion = async (client, args) => {
|
|
|
20
20
|
if ((0, utils_1.isAddressEqual)(kernelImplementationAddress, viem_1.zeroAddress)) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
const kernelVersion = Object.keys(
|
|
23
|
+
const kernelVersion = Object.keys(constants_js_1.KernelVersionToAddressesMap).find((version) => (0, utils_1.isAddressEqual)(constants_js_1.KernelVersionToAddressesMap[version]
|
|
24
24
|
.accountImplementationAddress, kernelImplementationAddress));
|
|
25
25
|
if (!kernelVersion) {
|
|
26
26
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getKernelVersion.js","sourceRoot":"","sources":["../../../actions/public/getKernelVersion.ts"],"names":[],"mappings":";;;AAAA,+BAA6D;AAC7D,0CAA2C;AAC3C,sCAOmB;AACnB
|
|
1
|
+
{"version":3,"file":"getKernelVersion.js","sourceRoot":"","sources":["../../../actions/public/getKernelVersion.ts"],"names":[],"mappings":";;;AAAA,+BAA6D;AAC7D,0CAA2C;AAC3C,sCAOmB;AACnB,qDAG2B;AA6BpB,MAAM,gBAAgB,GAAG,KAAK,EACjC,MAAc,EACd,IAA4B,EACO,EAAE;IACrC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAExB,MAAM,YAAY,GAAG,MAAM,IAAA,iBAAS,EAChC,MAAM,EACN,sBAAY,EACZ,cAAc,CACjB,CAAC;QACE,OAAO;QACP,IAAI,EAAE,yCAA0B;KACnC,CAAC,CAAA;IACF,IAAI,CAAC,YAAY,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;IAC/C,CAAC;IACD,MAAM,YAAY,GAAG,IAAA,aAAK,EAAC,YAAY,EAAE,EAAE,CAAC,CAAA;IAC5C,MAAM,UAAU,GAAG,IAAA,aAAK,EAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAA,aAAK,EAAC,YAAY,CAAC,CAAA;IAC3E,MAAM,2BAA2B,GAAG,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAA;IAC1D,IAAI,IAAA,sBAAc,EAAC,2BAA2B,EAAE,kBAAW,CAAC,EAAE,CAAC;QAC3D,OAAO,IAAI,CAAA;IACf,CAAC;IACD,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,0CAA2B,CAAC,CAAC,IAAI,CAC/D,CAAC,OAAO,EAAE,EAAE,CACR,IAAA,sBAAc,EACV,0CAA2B,CAAC,OAA8B,CAAC;SACtD,4BAA4B,EACjC,2BAA2B,CAC9B,CACR,CAAA;IACD,IAAI,CAAC,aAAa,EAAE,CAAC;QACjB,OAAO,IAAI,CAAA;IACf,CAAC;IACD,OAAO,aAAoC,CAAA;AAC/C,CAAC,CAAA;AAnCY,QAAA,gBAAgB,oBAmC5B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getStorageAt } from "viem/actions";
|
|
2
2
|
import { getAction, getAddress, isHex, slice, toHex } from "viem/utils";
|
|
3
|
-
import { KERNEL_IMPLEMENTATION_SLOT } from "../../constants";
|
|
3
|
+
import { KERNEL_IMPLEMENTATION_SLOT } from "../../constants.js";
|
|
4
4
|
/**
|
|
5
5
|
* Returns the address of the kernel implementation.
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getKernelImplementationAddress.js","sourceRoot":"","sources":["../../../actions/public/getKernelImplementationAddress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getKernelImplementationAddress.js","sourceRoot":"","sources":["../../../actions/public/getKernelImplementationAddress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AAM/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,EAC/C,MAAc,EACd,IAA0C,EAC1B,EAAE;IAClB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAExB,MAAM,YAAY,GAAG,MAAM,SAAS,CAChC,MAAM,EACN,YAAY,EACZ,cAAc,CACjB,CAAC;QACE,OAAO;QACP,IAAI,EAAE,0BAA0B;KACnC,CAAC,CAAA;IACF,IAAI,CAAC,YAAY,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAA;IAC9D,CAAC;IACD,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,EAAE,EAAE,CAAC,CAAA;IAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IAC3E,OAAO,UAAU,CAAC,UAAU,CAAC,CAAA;AACjC,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { zeroAddress } from "viem";
|
|
2
2
|
import { getStorageAt } from "viem/actions";
|
|
3
3
|
import { getAction, getAddress, isAddressEqual, isHex, slice, toHex } from "viem/utils";
|
|
4
|
-
import { KERNEL_IMPLEMENTATION_SLOT, KernelVersionToAddressesMap } from "../../constants";
|
|
4
|
+
import { KERNEL_IMPLEMENTATION_SLOT, KernelVersionToAddressesMap } from "../../constants.js";
|
|
5
5
|
/**
|
|
6
6
|
* Returns the address of the kernel implementation.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getKernelVersion.js","sourceRoot":"","sources":["../../../actions/public/getKernelVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,EAAE,MAAM,MAAM,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EACH,SAAS,EACT,UAAU,EACV,cAAc,EACd,KAAK,EACL,KAAK,EACL,KAAK,EACR,MAAM,YAAY,CAAA;AACnB,OAAO,EACH,0BAA0B,EAC1B,2BAA2B,EAC9B,MAAM,
|
|
1
|
+
{"version":3,"file":"getKernelVersion.js","sourceRoot":"","sources":["../../../actions/public/getKernelVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,EAAE,MAAM,MAAM,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EACH,SAAS,EACT,UAAU,EACV,cAAc,EACd,KAAK,EACL,KAAK,EACL,KAAK,EACR,MAAM,YAAY,CAAA;AACnB,OAAO,EACH,0BAA0B,EAC1B,2BAA2B,EAC9B,MAAM,oBAAoB,CAAA;AAO3B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EACjC,MAAc,EACd,IAA4B,EACO,EAAE;IACrC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAExB,MAAM,YAAY,GAAG,MAAM,SAAS,CAChC,MAAM,EACN,YAAY,EACZ,cAAc,CACjB,CAAC;QACE,OAAO;QACP,IAAI,EAAE,0BAA0B;KACnC,CAAC,CAAA;IACF,IAAI,CAAC,YAAY,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;IAC/C,CAAC;IACD,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,EAAE,EAAE,CAAC,CAAA;IAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IAC3E,MAAM,2BAA2B,GAAG,UAAU,CAAC,UAAU,CAAC,CAAA;IAC1D,IAAI,cAAc,CAAC,2BAA2B,EAAE,WAAW,CAAC,EAAE,CAAC;QAC3D,OAAO,IAAI,CAAA;IACf,CAAC;IACD,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,IAAI,CAC/D,CAAC,OAAO,EAAE,EAAE,CACR,cAAc,CACV,2BAA2B,CAAC,OAA8B,CAAC;SACtD,4BAA4B,EACjC,2BAA2B,CAC9B,CACR,CAAA;IACD,IAAI,CAAC,aAAa,EAAE,CAAC;QACjB,OAAO,IAAI,CAAA;IACf,CAAC;IACD,OAAO,aAAoC,CAAA;AAC/C,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getKernelVersion.d.ts","sourceRoot":"","sources":["../../../actions/public/getKernelVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,MAAM,EAAe,MAAM,MAAM,CAAA;AAc7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getKernelVersion.d.ts","sourceRoot":"","sources":["../../../actions/public/getKernelVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,MAAM,EAAe,MAAM,MAAM,CAAA;AAc7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE/D,MAAM,MAAM,sBAAsB,GAAG;IACjC,OAAO,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,gBAAgB,WACjB,MAAM,QACR,sBAAsB,KAC7B,QAAQ,mBAAmB,GAAG,IAAI,CAgCpC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address, Client } from "viem"
|
|
2
2
|
import { getStorageAt } from "viem/actions"
|
|
3
3
|
import { getAction, getAddress, isHex, slice, toHex } from "viem/utils"
|
|
4
|
-
import { KERNEL_IMPLEMENTATION_SLOT } from "../../constants"
|
|
4
|
+
import { KERNEL_IMPLEMENTATION_SLOT } from "../../constants.js"
|
|
5
5
|
|
|
6
6
|
export type GetKernelImplementationAddressParams = {
|
|
7
7
|
address: Address
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
KERNEL_IMPLEMENTATION_SLOT,
|
|
13
13
|
KernelVersionToAddressesMap
|
|
14
|
-
} from "../../constants"
|
|
15
|
-
import type { KERNEL_VERSION_TYPE } from "../../types"
|
|
14
|
+
} from "../../constants.js"
|
|
15
|
+
import type { KERNEL_VERSION_TYPE } from "../../types/index.js"
|
|
16
16
|
|
|
17
17
|
export type GetKernelVersionParams = {
|
|
18
18
|
address: Address
|