@otim/sdk-core 0.0.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/LICENSE +201 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/abi-Bd3X6gV9.d.mts +154 -0
- package/dist/abi-Bd3X6gV9.d.mts.map +1 -0
- package/dist/abi-CQuxrNCU.d.cts +154 -0
- package/dist/abi-CQuxrNCU.d.cts.map +1 -0
- package/dist/account/index.cjs +7 -0
- package/dist/account/index.d.cts +3 -0
- package/dist/account/index.d.mts +3 -0
- package/dist/account/index.mjs +3 -0
- package/dist/account-Bwm5PTcc.cjs +56 -0
- package/dist/account-Bwm5PTcc.cjs.map +1 -0
- package/dist/account-p4sxzIt3.mjs +26 -0
- package/dist/account-p4sxzIt3.mjs.map +1 -0
- package/dist/clients/index.cjs +7 -0
- package/dist/clients/index.d.cts +3 -0
- package/dist/clients/index.d.mts +3 -0
- package/dist/clients/index.mjs +3 -0
- package/dist/clients-DBRhkU4y.cjs +297 -0
- package/dist/clients-DBRhkU4y.cjs.map +1 -0
- package/dist/clients-DMKeLhcJ.mjs +268 -0
- package/dist/clients-DMKeLhcJ.mjs.map +1 -0
- package/dist/config/index.cjs +10 -0
- package/dist/config/index.d.cts +3 -0
- package/dist/config/index.d.mts +3 -0
- package/dist/config/index.mjs +3 -0
- package/dist/config-C_nc1DXn.mjs +67 -0
- package/dist/config-C_nc1DXn.mjs.map +1 -0
- package/dist/config-CjGpscVk.cjs +114 -0
- package/dist/config-CjGpscVk.cjs.map +1 -0
- package/dist/context/index.cjs +5 -0
- package/dist/context/index.d.cts +2 -0
- package/dist/context/index.d.mts +2 -0
- package/dist/context/index.mjs +3 -0
- package/dist/context-B-Wcmhb3.cjs +38 -0
- package/dist/context-B-Wcmhb3.cjs.map +1 -0
- package/dist/context-uTye69B0.mjs +20 -0
- package/dist/context-uTye69B0.mjs.map +1 -0
- package/dist/index-B4fkcFy5.d.mts +54 -0
- package/dist/index-B4fkcFy5.d.mts.map +1 -0
- package/dist/index-BnP8vpJJ.d.cts +25 -0
- package/dist/index-BnP8vpJJ.d.cts.map +1 -0
- package/dist/index-C1HSAemv.d.cts +20 -0
- package/dist/index-C1HSAemv.d.cts.map +1 -0
- package/dist/index-C4N2Xixk.d.mts +27 -0
- package/dist/index-C4N2Xixk.d.mts.map +1 -0
- package/dist/index-CcCMIBgF.d.mts +20 -0
- package/dist/index-CcCMIBgF.d.mts.map +1 -0
- package/dist/index-DK-40z4V.d.cts +54 -0
- package/dist/index-DK-40z4V.d.cts.map +1 -0
- package/dist/index-DW_zBRKz.d.mts +25 -0
- package/dist/index-DW_zBRKz.d.mts.map +1 -0
- package/dist/index-De8OZ-Be.d.cts +96 -0
- package/dist/index-De8OZ-Be.d.cts.map +1 -0
- package/dist/index-UnaahQgb.d.cts +27 -0
- package/dist/index-UnaahQgb.d.cts.map +1 -0
- package/dist/index-e5BLgzcW.d.mts +96 -0
- package/dist/index-e5BLgzcW.d.mts.map +1 -0
- package/dist/index.cjs +31 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.mjs +7 -0
- package/dist/misc-CX4pLJaA.d.mts +42 -0
- package/dist/misc-CX4pLJaA.d.mts.map +1 -0
- package/dist/misc-CpZxSPCP.d.cts +42 -0
- package/dist/misc-CpZxSPCP.d.cts.map +1 -0
- package/dist/utils/index.cjs +6 -0
- package/dist/utils/index.d.cts +4 -0
- package/dist/utils/index.d.mts +4 -0
- package/dist/utils/index.mjs +3 -0
- package/dist/utils-CVQFvsfl.cjs +104 -0
- package/dist/utils-CVQFvsfl.cjs.map +1 -0
- package/dist/utils-DziAHBiz.mjs +81 -0
- package/dist/utils-DziAHBiz.mjs.map +1 -0
- package/package.json +162 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { toHex, toRlp } from "viem";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/rlp.ts
|
|
4
|
+
const ensureHexPrefix = (value) => value.startsWith("0x") ? value : `0x${value}`;
|
|
5
|
+
const normalizeYParityValue = (value) => {
|
|
6
|
+
if (value === void 0 || value === null) return 0;
|
|
7
|
+
let numericValue;
|
|
8
|
+
if (typeof value === "number") numericValue = value;
|
|
9
|
+
else if (typeof value === "bigint") numericValue = Number(value);
|
|
10
|
+
else if (typeof value === "string") {
|
|
11
|
+
const trimmed = value.trim();
|
|
12
|
+
const parsed = trimmed.startsWith("0x") ? parseInt(trimmed, 16) : parseInt(trimmed, 10);
|
|
13
|
+
if (Number.isNaN(parsed)) throw new Error("invalid yParity value");
|
|
14
|
+
numericValue = parsed;
|
|
15
|
+
} else throw new Error("invalid yParity type");
|
|
16
|
+
return Math.abs(numericValue) % 2 === 0 ? 0 : 1;
|
|
17
|
+
};
|
|
18
|
+
function createRlpEncodedAuthorization(authorizationOrChainId, delegateAddress, nonce, yParity, r, s) {
|
|
19
|
+
if (typeof authorizationOrChainId === "object") {
|
|
20
|
+
const authorization = authorizationOrChainId;
|
|
21
|
+
const normalizedYParity = normalizeYParityValue(authorization.yParity);
|
|
22
|
+
return toRlp([
|
|
23
|
+
toHex(authorization.chainId),
|
|
24
|
+
ensureHexPrefix(authorization.address),
|
|
25
|
+
authorization.nonce === 0 ? "0x" : toHex(authorization.nonce),
|
|
26
|
+
normalizedYParity === 0 ? "0x" : toHex(normalizedYParity),
|
|
27
|
+
authorization.r,
|
|
28
|
+
authorization.s
|
|
29
|
+
]);
|
|
30
|
+
} else {
|
|
31
|
+
const chainId = authorizationOrChainId;
|
|
32
|
+
const normalizedYParity = normalizeYParityValue(yParity);
|
|
33
|
+
return toRlp([
|
|
34
|
+
toHex(chainId),
|
|
35
|
+
ensureHexPrefix(delegateAddress),
|
|
36
|
+
nonce === 0 ? "0x" : toHex(nonce),
|
|
37
|
+
normalizedYParity === 0 ? "0x" : toHex(normalizedYParity),
|
|
38
|
+
r,
|
|
39
|
+
s
|
|
40
|
+
]);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/utils/vrs.ts
|
|
46
|
+
const isValidV = (v) => {
|
|
47
|
+
return v === 0 || v === 1 || v === 27 || v === 28 || v >= 35;
|
|
48
|
+
};
|
|
49
|
+
const normalizeV = (v) => {
|
|
50
|
+
if (!isValidV(v)) return 0;
|
|
51
|
+
const cmp = v <= 1 ? 1 : 0;
|
|
52
|
+
const result = v % 2 === cmp;
|
|
53
|
+
return Number(result) % 2;
|
|
54
|
+
};
|
|
55
|
+
const createEIP2098Signature = (vrs) => {
|
|
56
|
+
const v = vrs.v;
|
|
57
|
+
const r = vrs.r;
|
|
58
|
+
const s = vrs.s;
|
|
59
|
+
return {
|
|
60
|
+
yParity: normalizeV(v),
|
|
61
|
+
r,
|
|
62
|
+
s
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
const parseSignatureToVRS = (signature) => {
|
|
66
|
+
if (typeof signature !== "string") throw new Error("Signature must be a string");
|
|
67
|
+
if (!signature.startsWith("0x")) throw new Error("Signature must start with \"0x\"");
|
|
68
|
+
if (signature.length !== 132) throw new Error("Signature must be 65 bytes (130 hex chars) plus \"0x\" = 132 total length");
|
|
69
|
+
const r = signature.slice(2, 66);
|
|
70
|
+
const s = signature.slice(66, 130);
|
|
71
|
+
const vHex = signature.slice(130, 132);
|
|
72
|
+
return {
|
|
73
|
+
v: parseInt(vHex, 16),
|
|
74
|
+
r: `0x${r}`,
|
|
75
|
+
s: `0x${s}`
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
//#endregion
|
|
80
|
+
export { normalizeYParityValue as i, parseSignatureToVRS as n, createRlpEncodedAuthorization as r, createEIP2098Signature as t };
|
|
81
|
+
//# sourceMappingURL=utils-DziAHBiz.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-DziAHBiz.mjs","names":["numericValue: number"],"sources":["../src/utils/rlp.ts","../src/utils/vrs.ts"],"sourcesContent":["import type { Authorization } from \"viem\";\n\nimport { toHex, toRlp } from \"viem\";\n\n/*\n * RLP (recursive length prefix) encoding utilities for EIP-7702 auth tuples.\n * RLP is a serialization format used in Ethereum to encode structured data.\n *\n * EIP-7702 authorizations are encoded as:\n * [chainId, address, nonce, yParity, r, s]\n */\n\n// Ensures the value has a \"0x\" prefix for proper hex encoding.\nconst ensureHexPrefix = (value: string): `0x${string}` =>\n value.startsWith(\"0x\") ? (value as `0x${string}`) : `0x${value}`;\n\n/*\n * Normalizes yParity to 0 or 1 for EIP-2098 compact signatures.\n * yParity indicate which of two possible points on the elliptic curve was used.\n * Handles various input formats: number, bigint, hex string, or decimal string.\n * - Even values (0, 2, 4, 27, etc.) normalize to 0\n * - Odd values (1, 3, 5, 28, etc.) normalize to 1\n */\nexport const normalizeYParityValue = (\n value: number | bigint | string | undefined | null,\n): 0 | 1 => {\n if (value === undefined || value === null) return 0;\n\n let numericValue: number;\n if (typeof value === \"number\") {\n numericValue = value;\n } else if (typeof value === \"bigint\") {\n numericValue = Number(value);\n } else if (typeof value === \"string\") {\n const trimmed = value.trim();\n const parsed = trimmed.startsWith(\"0x\")\n ? parseInt(trimmed, 16)\n : parseInt(trimmed, 10);\n if (Number.isNaN(parsed)) throw new Error(\"invalid yParity value\");\n numericValue = parsed;\n } else {\n throw new Error(\"invalid yParity type\");\n }\n\n return (Math.abs(numericValue) % 2 === 0 ? 0 : 1) as 0 | 1;\n};\n\n/*\n * Creates an RLP-encoded authorization tuple for EIP-7702 delegations.\n * This encoded value is submitted to the Otim API for processing on-chain.\n *\n * Accepts either:\n * 1. A complete authorization object (from viem)\n * 2. Individual parameters (chainId, address, nonce, signature components)\n *\n * Returns hex-encoded RLP bytes ready for submission.\n */\nexport function createRlpEncodedAuthorization(\n authorization: Authorization,\n): `0x${string}`;\nexport function createRlpEncodedAuthorization(\n chainId: number,\n delegateAddress: string,\n nonce: number,\n yParity: number | bigint,\n r: `0x${string}`,\n s: `0x${string}`,\n): `0x${string}`;\nexport function createRlpEncodedAuthorization(\n authorizationOrChainId: Authorization | number,\n delegateAddress?: string,\n nonce?: number,\n yParity?: number | bigint,\n r?: `0x${string}`,\n s?: `0x${string}`,\n) {\n if (typeof authorizationOrChainId === \"object\") {\n // Authorization object provided - extract fields.\n const authorization = authorizationOrChainId;\n const normalizedYParity = normalizeYParityValue(\n authorization.yParity as unknown as number | bigint | string | undefined,\n );\n /**\n * RLP encoding requires specific format for zero values:\n * - \"0x\" instead of \"0x00\".\n */\n const rlpInput = [\n toHex(authorization.chainId),\n ensureHexPrefix(authorization.address),\n authorization.nonce === 0 ? \"0x\" : toHex(authorization.nonce),\n normalizedYParity === 0 ? \"0x\" : toHex(normalizedYParity),\n authorization.r!,\n authorization.s!,\n ] as const;\n\n return toRlp(rlpInput);\n } else {\n // Individual parameters provided - construct tuple.\n const chainId = authorizationOrChainId;\n const normalizedYParity = normalizeYParityValue(yParity);\n const rlpInput = [\n toHex(chainId),\n ensureHexPrefix(delegateAddress!),\n nonce === 0 ? \"0x\" : toHex(nonce!),\n normalizedYParity === 0 ? \"0x\" : toHex(normalizedYParity),\n r!,\n s!,\n ] as const;\n\n return toRlp(rlpInput);\n }\n}\n","import type { EIP2098Signature, VRS } from \"@otim/utils/schemas\";\n\n/*\n * Signature utilities for handling ECDSA signature components.\n * VRS = {v, r, s} where:\n * - v: Recovery id (indicates which point on elliptic curve)\n * - r: First 32 bytes of signature\n * - s: Last 32 bytes of signature\n */\n\n/*\n * Checks if the v value is valid according to Ethereum signature standards.\n * - 0/1: EIP-2098 compact format (yParity)\n * - 27/28: Legacy Ethereum format\n * - 35+: EIP-155 format (includes chain id)\n */\nconst isValidV = (v: number): boolean => {\n return v === 0 || v === 1 || v === 27 || v === 28 || v >= 35;\n};\n\n/*\n * Normalizes v to yParity (0 or 1) for EIP-2098 compact signatures.\n * Handles all v formats: 0/1 (yParity), 27/28 (legacy), 35+ (EIP-155).\n * Returns 0 or 1 based on parity.\n */\nconst normalizeV = (v: number) => {\n if (!isValidV(v)) return 0;\n\n const cmp = v <= 1 ? 1 : 0;\n const result = v % 2 === cmp;\n\n return Number(result) % 2;\n};\n\n/*\n * Converts a standard VRS signature to EIP-2098 compact format.\n * EIP-2098 uses yParity (0/1) instead of v (27/28 or higher).\n * This saves 1 byte in the signature encoding.\n */\nexport const createEIP2098Signature = (vrs: VRS): EIP2098Signature => {\n const v = vrs.v;\n const r = vrs.r as `0x${string}`;\n const s = vrs.s as `0x${string}`;\n\n return { yParity: normalizeV(v), r, s };\n};\n\n/*\n * Parses a hex-encoded signature string into VRS components.\n\n * Expects standard Ethereum signature format:\n * 0x + 64 chars (r) + 64 chars (s) + 2 chars (v).\n *\n * Total length: 132 characters (0x + 130 hex chars = 65 bytes).\n *\n * Example: \"0x\" + r (32 bytes) + s (32 bytes) + v (1 byte).\n */\nexport const parseSignatureToVRS = (signature: string): VRS => {\n if (typeof signature !== \"string\") {\n throw new Error(\"Signature must be a string\");\n }\n\n if (!signature.startsWith(\"0x\")) {\n throw new Error('Signature must start with \"0x\"');\n }\n\n if (signature.length !== 132) {\n throw new Error(\n 'Signature must be 65 bytes (130 hex chars) plus \"0x\" = 132 total length',\n );\n }\n\n /* Extract components: r (bytes 0-32), s (bytes 32-64), v (byte 64). */\n const r = signature.slice(2, 66);\n const s = signature.slice(66, 130);\n const vHex = signature.slice(130, 132);\n const v = parseInt(vHex, 16);\n return { v, r: `0x${r}`, s: `0x${s}` };\n};\n"],"mappings":";;;AAaA,MAAM,mBAAmB,UACvB,MAAM,WAAW,KAAK,GAAI,QAA0B,KAAK;AAS3D,MAAa,yBACX,UACU;AACV,KAAI,UAAU,UAAa,UAAU,KAAM,QAAO;CAElD,IAAIA;AACJ,KAAI,OAAO,UAAU,SACnB,gBAAe;UACN,OAAO,UAAU,SAC1B,gBAAe,OAAO,MAAM;UACnB,OAAO,UAAU,UAAU;EACpC,MAAM,UAAU,MAAM,MAAM;EAC5B,MAAM,SAAS,QAAQ,WAAW,KAAK,GACnC,SAAS,SAAS,GAAG,GACrB,SAAS,SAAS,GAAG;AACzB,MAAI,OAAO,MAAM,OAAO,CAAE,OAAM,IAAI,MAAM,wBAAwB;AAClE,iBAAe;OAEf,OAAM,IAAI,MAAM,uBAAuB;AAGzC,QAAQ,KAAK,IAAI,aAAa,GAAG,MAAM,IAAI,IAAI;;AAwBjD,SAAgB,8BACd,wBACA,iBACA,OACA,SACA,GACA,GACA;AACA,KAAI,OAAO,2BAA2B,UAAU;EAE9C,MAAM,gBAAgB;EACtB,MAAM,oBAAoB,sBACxB,cAAc,QACf;AAcD,SAAO,MATU;GACf,MAAM,cAAc,QAAQ;GAC5B,gBAAgB,cAAc,QAAQ;GACtC,cAAc,UAAU,IAAI,OAAO,MAAM,cAAc,MAAM;GAC7D,sBAAsB,IAAI,OAAO,MAAM,kBAAkB;GACzD,cAAc;GACd,cAAc;GACf,CAEqB;QACjB;EAEL,MAAM,UAAU;EAChB,MAAM,oBAAoB,sBAAsB,QAAQ;AAUxD,SAAO,MATU;GACf,MAAM,QAAQ;GACd,gBAAgB,gBAAiB;GACjC,UAAU,IAAI,OAAO,MAAM,MAAO;GAClC,sBAAsB,IAAI,OAAO,MAAM,kBAAkB;GACzD;GACA;GACD,CAEqB;;;;;;AC7F1B,MAAM,YAAY,MAAuB;AACvC,QAAO,MAAM,KAAK,MAAM,KAAK,MAAM,MAAM,MAAM,MAAM,KAAK;;AAQ5D,MAAM,cAAc,MAAc;AAChC,KAAI,CAAC,SAAS,EAAE,CAAE,QAAO;CAEzB,MAAM,MAAM,KAAK,IAAI,IAAI;CACzB,MAAM,SAAS,IAAI,MAAM;AAEzB,QAAO,OAAO,OAAO,GAAG;;AAQ1B,MAAa,0BAA0B,QAA+B;CACpE,MAAM,IAAI,IAAI;CACd,MAAM,IAAI,IAAI;CACd,MAAM,IAAI,IAAI;AAEd,QAAO;EAAE,SAAS,WAAW,EAAE;EAAE;EAAG;EAAG;;AAazC,MAAa,uBAAuB,cAA2B;AAC7D,KAAI,OAAO,cAAc,SACvB,OAAM,IAAI,MAAM,6BAA6B;AAG/C,KAAI,CAAC,UAAU,WAAW,KAAK,CAC7B,OAAM,IAAI,MAAM,mCAAiC;AAGnD,KAAI,UAAU,WAAW,IACvB,OAAM,IAAI,MACR,4EACD;CAIH,MAAM,IAAI,UAAU,MAAM,GAAG,GAAG;CAChC,MAAM,IAAI,UAAU,MAAM,IAAI,IAAI;CAClC,MAAM,OAAO,UAAU,MAAM,KAAK,IAAI;AAEtC,QAAO;EAAE,GADC,SAAS,MAAM,GAAG;EAChB,GAAG,KAAK;EAAK,GAAG,KAAK;EAAK"}
|
package/package.json
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@otim/sdk-core",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.mts",
|
|
12
|
+
"default": "./dist/index.mjs"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.cts",
|
|
16
|
+
"default": "./dist/index.cjs"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"./account": {
|
|
20
|
+
"import": {
|
|
21
|
+
"types": "./dist/account/index.d.mts",
|
|
22
|
+
"default": "./dist/account/index.mjs"
|
|
23
|
+
},
|
|
24
|
+
"require": {
|
|
25
|
+
"types": "./dist/account/index.d.cts",
|
|
26
|
+
"default": "./dist/account/index.cjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"./clients": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./dist/clients/index.d.mts",
|
|
32
|
+
"default": "./dist/clients/index.mjs"
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"types": "./dist/clients/index.d.cts",
|
|
36
|
+
"default": "./dist/clients/index.cjs"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"./config": {
|
|
40
|
+
"import": {
|
|
41
|
+
"types": "./dist/config/index.d.mts",
|
|
42
|
+
"default": "./dist/config/index.mjs"
|
|
43
|
+
},
|
|
44
|
+
"require": {
|
|
45
|
+
"types": "./dist/config/index.d.cts",
|
|
46
|
+
"default": "./dist/config/index.cjs"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"./context": {
|
|
50
|
+
"import": {
|
|
51
|
+
"types": "./dist/context/index.d.mts",
|
|
52
|
+
"default": "./dist/context/index.mjs"
|
|
53
|
+
},
|
|
54
|
+
"require": {
|
|
55
|
+
"types": "./dist/context/index.d.cts",
|
|
56
|
+
"default": "./dist/context/index.cjs"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"./utils": {
|
|
60
|
+
"import": {
|
|
61
|
+
"types": "./dist/utils/index.d.mts",
|
|
62
|
+
"default": "./dist/utils/index.mjs"
|
|
63
|
+
},
|
|
64
|
+
"require": {
|
|
65
|
+
"types": "./dist/utils/index.d.cts",
|
|
66
|
+
"default": "./dist/utils/index.cjs"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"./package.json": "./package.json"
|
|
70
|
+
},
|
|
71
|
+
"files": [
|
|
72
|
+
"dist",
|
|
73
|
+
"README.md",
|
|
74
|
+
"LICENSE"
|
|
75
|
+
],
|
|
76
|
+
"sideEffects": false,
|
|
77
|
+
"keywords": [
|
|
78
|
+
"otim",
|
|
79
|
+
"sdk",
|
|
80
|
+
"ethereum",
|
|
81
|
+
"blockchain",
|
|
82
|
+
"defi",
|
|
83
|
+
"smart-contracts",
|
|
84
|
+
"typescript"
|
|
85
|
+
],
|
|
86
|
+
"license": "Apache-2.0",
|
|
87
|
+
"repository": {
|
|
88
|
+
"type": "git",
|
|
89
|
+
"url": "https://github.com/otimlabs/otim-ts-sdk.git",
|
|
90
|
+
"directory": "packages/core"
|
|
91
|
+
},
|
|
92
|
+
"bugs": {
|
|
93
|
+
"url": "https://github.com/otimlabs/otim-ts-sdk/issues"
|
|
94
|
+
},
|
|
95
|
+
"homepage": "https://github.com/otimlabs/otim-ts-sdk#readme",
|
|
96
|
+
"devDependencies": {
|
|
97
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
98
|
+
"@otim/turnkey": "0.0.2-development.0",
|
|
99
|
+
"@otim/utils": "0.0.2-development.0",
|
|
100
|
+
"@playwright/test": "^1.56.1",
|
|
101
|
+
"@types/adm-zip": "^0.5.7",
|
|
102
|
+
"@types/node": "^24.10.1",
|
|
103
|
+
"@types/node-fetch": "^2.6.13",
|
|
104
|
+
"adm-zip": "^0.5.16",
|
|
105
|
+
"dotenv": "^17.2.3",
|
|
106
|
+
"eslint": "^9.39.1",
|
|
107
|
+
"msw": "^2.12.2",
|
|
108
|
+
"node-fetch": "^3.3.2",
|
|
109
|
+
"tsdown": "^0.16.5",
|
|
110
|
+
"typescript-eslint": "^8.47.0",
|
|
111
|
+
"vitest": "^4.0.10",
|
|
112
|
+
"@otim/eslint-config": "0.0.1",
|
|
113
|
+
"@otim/typescript-config": "0.0.0"
|
|
114
|
+
},
|
|
115
|
+
"dependencies": {
|
|
116
|
+
"@t3-oss/env-core": "^0.13.8",
|
|
117
|
+
"@testing-library/user-event": "^14.6.1",
|
|
118
|
+
"@turnkey/api-key-stamper": "^0.5.0",
|
|
119
|
+
"@turnkey/core": "^1.7.0",
|
|
120
|
+
"@turnkey/sdk-server": "^4.12.0",
|
|
121
|
+
"@turnkey/viem": "^0.14.13",
|
|
122
|
+
"@wagmi/connectors": "^7.0.0",
|
|
123
|
+
"@wagmi/core": "^3.0.0",
|
|
124
|
+
"abitype": "^1.1.2",
|
|
125
|
+
"axios": "^1.13.2",
|
|
126
|
+
"viem": "^2.39.3",
|
|
127
|
+
"zod": "^4.1.12"
|
|
128
|
+
},
|
|
129
|
+
"peerDependencies": {
|
|
130
|
+
"typescript": ">=5.0.4",
|
|
131
|
+
"viem": "2.x"
|
|
132
|
+
},
|
|
133
|
+
"peerDependenciesMeta": {
|
|
134
|
+
"viem": {
|
|
135
|
+
"optional": false
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"engines": {
|
|
139
|
+
"node": ">=18.0.0"
|
|
140
|
+
},
|
|
141
|
+
"publishConfig": {
|
|
142
|
+
"access": "public"
|
|
143
|
+
},
|
|
144
|
+
"scripts": {
|
|
145
|
+
"build": "tsdown",
|
|
146
|
+
"dev": "tsdown --watch",
|
|
147
|
+
"dev:clear": "tsc --watch --pretty --preserveWatchOutput",
|
|
148
|
+
"lint": "eslint .",
|
|
149
|
+
"lint:check": "eslint .",
|
|
150
|
+
"lint:fix": "eslint . --fix",
|
|
151
|
+
"check-types": "tsc --noEmit",
|
|
152
|
+
"check-exports": "attw --pack . --format=table --ignore-rules=no-resolution untyped-resolution fallback-condition || true",
|
|
153
|
+
"clean": "rm -rf dist",
|
|
154
|
+
"ci": "pnpm run lint:check && pnpm run check-types && pnpm run build && pnpm run check-exports",
|
|
155
|
+
"test": "vitest run",
|
|
156
|
+
"test:watch": "vitest --watch",
|
|
157
|
+
"test:coverage": "vitest run --coverage",
|
|
158
|
+
"test:e2e": "playwright test",
|
|
159
|
+
"e2e": "playwright test",
|
|
160
|
+
"e2e:ui": "playwright test --ui"
|
|
161
|
+
}
|
|
162
|
+
}
|