@otim/sdk-core 0.0.3 → 0.0.4

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.
Files changed (80) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/abi-DW6AS0eM.d.mts +339 -0
  3. package/dist/abi-DW6AS0eM.d.mts.map +1 -0
  4. package/dist/abi-OUq-mx1W.d.cts +339 -0
  5. package/dist/abi-OUq-mx1W.d.cts.map +1 -0
  6. package/dist/account/index.cjs +1 -1
  7. package/dist/account/index.d.cts +5 -3
  8. package/dist/account/index.d.mts +5 -3
  9. package/dist/account/index.mjs +1 -1
  10. package/dist/{account-Bwm5PTcc.cjs → account-CRvC_dXT.cjs} +8 -3
  11. package/dist/account-CRvC_dXT.cjs.map +1 -0
  12. package/dist/{account-p4sxzIt3.mjs → account-D1NVta26.mjs} +8 -3
  13. package/dist/account-D1NVta26.mjs.map +1 -0
  14. package/dist/authorization-6anhDdQX.d.cts +210 -0
  15. package/dist/authorization-6anhDdQX.d.cts.map +1 -0
  16. package/dist/authorization-DnNpWjxB.d.mts +210 -0
  17. package/dist/authorization-DnNpWjxB.d.mts.map +1 -0
  18. package/dist/clients/index.cjs +2 -2
  19. package/dist/clients/index.d.cts +3 -3
  20. package/dist/clients/index.d.mts +3 -3
  21. package/dist/clients/index.mjs +2 -2
  22. package/dist/{clients-CVg-yW5b.cjs → clients-BCyzdTLc.cjs} +73 -127
  23. package/dist/clients-BCyzdTLc.cjs.map +1 -0
  24. package/dist/{clients-DnPvBXkX.mjs → clients-Bn4BUElo.mjs} +72 -126
  25. package/dist/clients-Bn4BUElo.mjs.map +1 -0
  26. package/dist/config/index.d.cts +2 -2
  27. package/dist/config/index.d.mts +2 -2
  28. package/dist/context/index.d.cts +4 -1
  29. package/dist/context/index.d.mts +4 -1
  30. package/dist/{index-DW_zBRKz.d.mts → index-BQMXYh9N.d.cts} +2 -13
  31. package/dist/index-BQMXYh9N.d.cts.map +1 -0
  32. package/dist/{index-B4fkcFy5.d.mts → index-C5c51xs0.d.mts} +5 -8
  33. package/dist/index-C5c51xs0.d.mts.map +1 -0
  34. package/dist/{index-DK-40z4V.d.cts → index-C8H-BPGH.d.cts} +5 -8
  35. package/dist/index-C8H-BPGH.d.cts.map +1 -0
  36. package/dist/{index-747pyuMH.d.mts → index-Ce_qYSJj.d.cts} +25 -38
  37. package/dist/index-Ce_qYSJj.d.cts.map +1 -0
  38. package/dist/{index-BH1YuouL.d.cts → index-CiyyA-wd.d.mts} +25 -38
  39. package/dist/index-CiyyA-wd.d.mts.map +1 -0
  40. package/dist/{index-BnP8vpJJ.d.cts → index-CnjY7cyS.d.mts} +2 -13
  41. package/dist/index-CnjY7cyS.d.mts.map +1 -0
  42. package/dist/{index-CcCMIBgF.d.mts → index-DWE1xfOE.d.mts} +4 -1
  43. package/dist/index-DWE1xfOE.d.mts.map +1 -0
  44. package/dist/{index-UnaahQgb.d.cts → index-D_7CTJDl.d.mts} +2 -2
  45. package/dist/{index-C4N2Xixk.d.mts.map → index-D_7CTJDl.d.mts.map} +1 -1
  46. package/dist/{index-C1HSAemv.d.cts → index-GSspyLr3.d.cts} +4 -1
  47. package/dist/index-GSspyLr3.d.cts.map +1 -0
  48. package/dist/{index-C4N2Xixk.d.mts → index-lW-Oor1B.d.cts} +2 -2
  49. package/dist/{index-UnaahQgb.d.cts.map → index-lW-Oor1B.d.cts.map} +1 -1
  50. package/dist/index.cjs +4 -4
  51. package/dist/index.d.cts +9 -8
  52. package/dist/index.d.mts +9 -8
  53. package/dist/index.mjs +3 -3
  54. package/dist/rpc-BDoNl1Sp.d.cts +6885 -0
  55. package/dist/rpc-BDoNl1Sp.d.cts.map +1 -0
  56. package/dist/rpc-CygBD_f7.d.mts +6885 -0
  57. package/dist/rpc-CygBD_f7.d.mts.map +1 -0
  58. package/dist/utils/index.d.cts +3 -3
  59. package/dist/utils/index.d.mts +3 -3
  60. package/package.json +5 -5
  61. package/dist/abi-Bd3X6gV9.d.mts +0 -154
  62. package/dist/abi-Bd3X6gV9.d.mts.map +0 -1
  63. package/dist/abi-CQuxrNCU.d.cts +0 -154
  64. package/dist/abi-CQuxrNCU.d.cts.map +0 -1
  65. package/dist/account-Bwm5PTcc.cjs.map +0 -1
  66. package/dist/account-p4sxzIt3.mjs.map +0 -1
  67. package/dist/clients-CVg-yW5b.cjs.map +0 -1
  68. package/dist/clients-DnPvBXkX.mjs.map +0 -1
  69. package/dist/index-747pyuMH.d.mts.map +0 -1
  70. package/dist/index-B4fkcFy5.d.mts.map +0 -1
  71. package/dist/index-BH1YuouL.d.cts.map +0 -1
  72. package/dist/index-BnP8vpJJ.d.cts.map +0 -1
  73. package/dist/index-C1HSAemv.d.cts.map +0 -1
  74. package/dist/index-CcCMIBgF.d.mts.map +0 -1
  75. package/dist/index-DK-40z4V.d.cts.map +0 -1
  76. package/dist/index-DW_zBRKz.d.mts.map +0 -1
  77. package/dist/misc-CX4pLJaA.d.mts +0 -42
  78. package/dist/misc-CX4pLJaA.d.mts.map +0 -1
  79. package/dist/misc-CpZxSPCP.d.cts +0 -42
  80. package/dist/misc-CpZxSPCP.d.cts.map +0 -1
@@ -1,4 +1,4 @@
1
- import "../abi-CQuxrNCU.cjs";
2
- import "../misc-CpZxSPCP.cjs";
3
- import { i as normalizeYParityValue, n as parseSignatureToVRS, r as createRlpEncodedAuthorization, t as createEIP2098Signature } from "../index-BnP8vpJJ.cjs";
1
+ import "../abi-OUq-mx1W.cjs";
2
+ import "../authorization-6anhDdQX.cjs";
3
+ import { i as normalizeYParityValue, n as parseSignatureToVRS, r as createRlpEncodedAuthorization, t as createEIP2098Signature } from "../index-BQMXYh9N.cjs";
4
4
  export { createEIP2098Signature, createRlpEncodedAuthorization, normalizeYParityValue, parseSignatureToVRS };
@@ -1,4 +1,4 @@
1
- import "../abi-Bd3X6gV9.mjs";
2
- import "../misc-CX4pLJaA.mjs";
3
- import { i as normalizeYParityValue, n as parseSignatureToVRS, r as createRlpEncodedAuthorization, t as createEIP2098Signature } from "../index-DW_zBRKz.mjs";
1
+ import "../abi-DW6AS0eM.mjs";
2
+ import "../authorization-DnNpWjxB.mjs";
3
+ import { i as normalizeYParityValue, n as parseSignatureToVRS, r as createRlpEncodedAuthorization, t as createEIP2098Signature } from "../index-CnjY7cyS.mjs";
4
4
  export { createEIP2098Signature, createRlpEncodedAuthorization, normalizeYParityValue, parseSignatureToVRS };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otim/sdk-core",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -95,8 +95,8 @@
95
95
  "homepage": "https://github.com/otimlabs/otim-ts-sdk#readme",
96
96
  "devDependencies": {
97
97
  "@arethetypeswrong/cli": "^0.18.2",
98
- "@otim/turnkey": "0.0.2",
99
- "@otim/utils": "0.0.2",
98
+ "@otim/turnkey": "0.0.3",
99
+ "@otim/utils": "0.0.3",
100
100
  "@playwright/test": "^1.56.1",
101
101
  "@types/adm-zip": "^0.5.7",
102
102
  "@types/node": "^24.10.1",
@@ -109,8 +109,8 @@
109
109
  "tsdown": "^0.16.5",
110
110
  "typescript-eslint": "^8.47.0",
111
111
  "vitest": "^4.0.10",
112
- "@otim/typescript-config": "0.0.0",
113
- "@otim/eslint-config": "0.0.1"
112
+ "@otim/eslint-config": "0.0.1",
113
+ "@otim/typescript-config": "0.0.0"
114
114
  },
115
115
  "dependencies": {
116
116
  "@t3-oss/env-core": "^0.13.8",
@@ -1,154 +0,0 @@
1
- //#region ../../node_modules/.pnpm/abitype@1.1.0_typescript@5.9.3_zod@4.1.12/node_modules/abitype/dist/types/register.d.ts
2
- interface Register {}
3
- type ResolvedRegister = {
4
- /**
5
- * TypeScript type to use for `address` values
6
- * @default `0x${string}`
7
- */
8
- addressType: Register extends {
9
- addressType: infer type;
10
- } ? type : Register extends {
11
- AddressType: infer type;
12
- } ? type : DefaultRegister['addressType'];
13
- /**
14
- * TypeScript type to use for `int<M>` and `uint<M>` values, where `M > 48`
15
- * @default bigint
16
- */
17
- bigIntType: Register extends {
18
- bigIntType: infer type;
19
- } ? type : Register extends {
20
- BigIntType: infer type;
21
- } ? type : DefaultRegister['bigIntType'];
22
- /**
23
- * TypeScript type to use for `bytes` values
24
- * @default { inputs: `0x${string}`; outputs: `0x${string}`; }
25
- */
26
- bytesType: Register extends {
27
- bytesType: infer type extends {
28
- inputs: unknown;
29
- outputs: unknown;
30
- };
31
- } ? type : Register extends {
32
- BytesType: infer type extends {
33
- inputs: unknown;
34
- outputs: unknown;
35
- };
36
- } ? type : DefaultRegister['bytesType'];
37
- /**
38
- * TypeScript type to use for `int<M>` and `uint<M>` values, where `M <= 48`
39
- * @default number
40
- */
41
- intType: Register extends {
42
- intType: infer type;
43
- } ? type : Register extends {
44
- IntType: infer type;
45
- } ? type : DefaultRegister['intType'];
46
- /**
47
- * Maximum depth for nested array types (e.g. string[][])
48
- *
49
- * Note: You probably only want to set this to a specific number if parsed types are returning as `unknown`
50
- * and you want to figure out why. If you set this, you should probably also reduce `FixedArrayMaxLength`.
51
- *
52
- * @default false
53
- */
54
- arrayMaxDepth: Register extends {
55
- arrayMaxDepth: infer type extends number | false;
56
- } ? type : Register extends {
57
- ArrayMaxDepth: infer type extends number | false;
58
- } ? type : DefaultRegister['arrayMaxDepth'];
59
- /**
60
- * Lower bound for fixed array length
61
- * @default 1
62
- */
63
- fixedArrayMinLength: Register extends {
64
- fixedArrayMinLength: infer type extends number;
65
- } ? type : Register extends {
66
- FixedArrayMinLength: infer type extends number;
67
- } ? type : DefaultRegister['fixedArrayMinLength'];
68
- /**
69
- * Upper bound for fixed array length
70
- * @default 99
71
- */
72
- fixedArrayMaxLength: Register extends {
73
- fixedArrayMaxLength: infer type extends number;
74
- } ? type : Register extends {
75
- FixedArrayMaxLength: infer type extends number;
76
- } ? type : DefaultRegister['fixedArrayMaxLength'];
77
- /**
78
- * When set, validates {@link AbiParameter}'s `type` against {@link AbiType}
79
- *
80
- * Note: You probably only want to set this to `true` if parsed types are returning as `unknown`
81
- * and you want to figure out why.
82
- *
83
- * @default false
84
- */
85
- strictAbiType: Register extends {
86
- strictAbiType: infer type extends boolean;
87
- } ? type : Register extends {
88
- StrictAbiType: infer type extends boolean;
89
- } ? type : DefaultRegister['strictAbiType'];
90
- /** @deprecated Use `addressType` instead */
91
- AddressType: ResolvedRegister['addressType'];
92
- /** @deprecated Use `addressType` instead */
93
- BigIntType: ResolvedRegister['bigIntType'];
94
- /** @deprecated Use `bytesType` instead */
95
- BytesType: ResolvedRegister['bytesType'];
96
- /** @deprecated Use `intType` instead */
97
- IntType: ResolvedRegister['intType'];
98
- /** @deprecated Use `arrayMaxDepth` instead */
99
- ArrayMaxDepth: ResolvedRegister['arrayMaxDepth'];
100
- /** @deprecated Use `fixedArrayMinLength` instead */
101
- FixedArrayMinLength: ResolvedRegister['fixedArrayMinLength'];
102
- /** @deprecated Use `fixedArrayMaxLength` instead */
103
- FixedArrayMaxLength: ResolvedRegister['fixedArrayMaxLength'];
104
- /** @deprecated Use `strictAbiType` instead */
105
- StrictAbiType: ResolvedRegister['strictAbiType'];
106
- };
107
- type DefaultRegister = {
108
- /** Maximum depth for nested array types (e.g. string[][]) */
109
- arrayMaxDepth: false;
110
- /** Lower bound for fixed array length */
111
- fixedArrayMinLength: 1;
112
- /** Upper bound for fixed array length */
113
- fixedArrayMaxLength: 99;
114
- /** TypeScript type to use for `address` values */
115
- addressType: `0x${string}`;
116
- /** TypeScript type to use for `bytes` values */
117
- bytesType: {
118
- /** TypeScript type to use for `bytes` input values */
119
- inputs: `0x${string}`;
120
- /** TypeScript type to use for `bytes` output values */
121
- outputs: `0x${string}`;
122
- };
123
- /** TypeScript type to use for `int<M>` and `uint<M>` values, where `M > 48` */
124
- bigIntType: bigint;
125
- /** TypeScript type to use for `int<M>` and `uint<M>` values, where `M <= 48` */
126
- intType: number;
127
- /** When set, validates {@link AbiParameter}'s `type` against {@link AbiType} */
128
- strictAbiType: false;
129
- /** @deprecated Use `arrayMaxDepth` instead */
130
- ArrayMaxDepth: DefaultRegister['arrayMaxDepth'];
131
- /** @deprecated Use `fixedArrayMinLength` instead */
132
- FixedArrayMinLength: DefaultRegister['fixedArrayMinLength'];
133
- /** @deprecated Use `fixedArrayMaxLength` instead */
134
- FixedArrayMaxLength: DefaultRegister['fixedArrayMaxLength'];
135
- /** @deprecated Use `addressType` instead */
136
- AddressType: DefaultRegister['addressType'];
137
- /** @deprecated Use `bytesType` instead */
138
- BytesType: {
139
- inputs: DefaultRegister['bytesType']['inputs'];
140
- outputs: DefaultRegister['bytesType']['outputs'];
141
- };
142
- /** @deprecated Use `bigIntType` instead */
143
- BigIntType: DefaultRegister['bigIntType'];
144
- /** @deprecated Use `intType` instead */
145
- IntType: DefaultRegister['intType'];
146
- /** @deprecated Use `strictAbiType` instead */
147
- StrictAbiType: DefaultRegister['strictAbiType'];
148
- };
149
- //#endregion
150
- //#region ../../node_modules/.pnpm/abitype@1.1.0_typescript@5.9.3_zod@4.1.12/node_modules/abitype/dist/types/abi.d.ts
151
- type Address = ResolvedRegister['addressType'];
152
- //#endregion
153
- export { Address as t };
154
- //# sourceMappingURL=abi-Bd3X6gV9.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abi-Bd3X6gV9.d.mts","names":["Register","ResolvedRegister","type","DefaultRegister","ResolvedRegister","Pretty","Range","Address","MBytes","MBits","SolidityAddress","SolidityBool","SolidityBytes","SolidityFunction","SolidityString","SolidityTuple","SolidityInt","SolidityFixedArrayRange","SolidityFixedArraySizeLookup","Prop","_BuildArrayTypes","T","Depth","SolidityArrayWithoutTuple","SolidityArrayWithTuple","SolidityArray","AbiType","ResolvedAbiType","AbiInternalType","AbiParameter","Exclude","AbiEventParameter","AbiStateMutability","AbiParameterKind","AbiFunction","AbiConstructor","Extract","AbiFallback","AbiReceive","AbiEvent","AbiError","AbiItemType","Abi","TypedDataDomain","TypedDataType","TypedDataParameter","TypedData","Record"],"sources":["../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.9.3_zod@4.1.12/node_modules/abitype/dist/types/register.d.ts","../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.9.3_zod@4.1.12/node_modules/abitype/dist/types/abi.d.ts"],"sourcesContent":["export interface Register {\n}\nexport type ResolvedRegister = {\n /**\n * TypeScript type to use for `address` values\n * @default `0x${string}`\n */\n addressType: Register extends {\n addressType: infer type;\n } ? type : Register extends {\n AddressType: infer type;\n } ? type : DefaultRegister['addressType'];\n /**\n * TypeScript type to use for `int<M>` and `uint<M>` values, where `M > 48`\n * @default bigint\n */\n bigIntType: Register extends {\n bigIntType: infer type;\n } ? type : Register extends {\n BigIntType: infer type;\n } ? type : DefaultRegister['bigIntType'];\n /**\n * TypeScript type to use for `bytes` values\n * @default { inputs: `0x${string}`; outputs: `0x${string}`; }\n */\n bytesType: Register extends {\n bytesType: infer type extends {\n inputs: unknown;\n outputs: unknown;\n };\n } ? type : Register extends {\n BytesType: infer type extends {\n inputs: unknown;\n outputs: unknown;\n };\n } ? type : DefaultRegister['bytesType'];\n /**\n * TypeScript type to use for `int<M>` and `uint<M>` values, where `M <= 48`\n * @default number\n */\n intType: Register extends {\n intType: infer type;\n } ? type : Register extends {\n IntType: infer type;\n } ? type : DefaultRegister['intType'];\n /**\n * Maximum depth for nested array types (e.g. string[][])\n *\n * Note: You probably only want to set this to a specific number if parsed types are returning as `unknown`\n * and you want to figure out why. If you set this, you should probably also reduce `FixedArrayMaxLength`.\n *\n * @default false\n */\n arrayMaxDepth: Register extends {\n arrayMaxDepth: infer type extends number | false;\n } ? type : Register extends {\n ArrayMaxDepth: infer type extends number | false;\n } ? type : DefaultRegister['arrayMaxDepth'];\n /**\n * Lower bound for fixed array length\n * @default 1\n */\n fixedArrayMinLength: Register extends {\n fixedArrayMinLength: infer type extends number;\n } ? type : Register extends {\n FixedArrayMinLength: infer type extends number;\n } ? type : DefaultRegister['fixedArrayMinLength'];\n /**\n * Upper bound for fixed array length\n * @default 99\n */\n fixedArrayMaxLength: Register extends {\n fixedArrayMaxLength: infer type extends number;\n } ? type : Register extends {\n FixedArrayMaxLength: infer type extends number;\n } ? type : DefaultRegister['fixedArrayMaxLength'];\n /**\n * When set, validates {@link AbiParameter}'s `type` against {@link AbiType}\n *\n * Note: You probably only want to set this to `true` if parsed types are returning as `unknown`\n * and you want to figure out why.\n *\n * @default false\n */\n strictAbiType: Register extends {\n strictAbiType: infer type extends boolean;\n } ? type : Register extends {\n StrictAbiType: infer type extends boolean;\n } ? type : DefaultRegister['strictAbiType'];\n /** @deprecated Use `addressType` instead */\n AddressType: ResolvedRegister['addressType'];\n /** @deprecated Use `addressType` instead */\n BigIntType: ResolvedRegister['bigIntType'];\n /** @deprecated Use `bytesType` instead */\n BytesType: ResolvedRegister['bytesType'];\n /** @deprecated Use `intType` instead */\n IntType: ResolvedRegister['intType'];\n /** @deprecated Use `arrayMaxDepth` instead */\n ArrayMaxDepth: ResolvedRegister['arrayMaxDepth'];\n /** @deprecated Use `fixedArrayMinLength` instead */\n FixedArrayMinLength: ResolvedRegister['fixedArrayMinLength'];\n /** @deprecated Use `fixedArrayMaxLength` instead */\n FixedArrayMaxLength: ResolvedRegister['fixedArrayMaxLength'];\n /** @deprecated Use `strictAbiType` instead */\n StrictAbiType: ResolvedRegister['strictAbiType'];\n};\nexport type DefaultRegister = {\n /** Maximum depth for nested array types (e.g. string[][]) */\n arrayMaxDepth: false;\n /** Lower bound for fixed array length */\n fixedArrayMinLength: 1;\n /** Upper bound for fixed array length */\n fixedArrayMaxLength: 99;\n /** TypeScript type to use for `address` values */\n addressType: `0x${string}`;\n /** TypeScript type to use for `bytes` values */\n bytesType: {\n /** TypeScript type to use for `bytes` input values */\n inputs: `0x${string}`;\n /** TypeScript type to use for `bytes` output values */\n outputs: `0x${string}`;\n };\n /** TypeScript type to use for `int<M>` and `uint<M>` values, where `M > 48` */\n bigIntType: bigint;\n /** TypeScript type to use for `int<M>` and `uint<M>` values, where `M <= 48` */\n intType: number;\n /** When set, validates {@link AbiParameter}'s `type` against {@link AbiType} */\n strictAbiType: false;\n /** @deprecated Use `arrayMaxDepth` instead */\n ArrayMaxDepth: DefaultRegister['arrayMaxDepth'];\n /** @deprecated Use `fixedArrayMinLength` instead */\n FixedArrayMinLength: DefaultRegister['fixedArrayMinLength'];\n /** @deprecated Use `fixedArrayMaxLength` instead */\n FixedArrayMaxLength: DefaultRegister['fixedArrayMaxLength'];\n /** @deprecated Use `addressType` instead */\n AddressType: DefaultRegister['addressType'];\n /** @deprecated Use `bytesType` instead */\n BytesType: {\n inputs: DefaultRegister['bytesType']['inputs'];\n outputs: DefaultRegister['bytesType']['outputs'];\n };\n /** @deprecated Use `bigIntType` instead */\n BigIntType: DefaultRegister['bigIntType'];\n /** @deprecated Use `intType` instead */\n IntType: DefaultRegister['intType'];\n /** @deprecated Use `strictAbiType` instead */\n StrictAbiType: DefaultRegister['strictAbiType'];\n};\n//# sourceMappingURL=register.d.ts.map","import type { ResolvedRegister } from './register.js';\nimport type { Pretty, Range } from './types.js';\nexport type Address = ResolvedRegister['addressType'];\ntype MBytes = '' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32;\nexport type MBits = '' | 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 88 | 96 | 104 | 112 | 120 | 128 | 136 | 144 | 152 | 160 | 168 | 176 | 184 | 192 | 200 | 208 | 216 | 224 | 232 | 240 | 248 | 256;\nexport type SolidityAddress = 'address';\nexport type SolidityBool = 'bool';\nexport type SolidityBytes = `bytes${MBytes}`;\nexport type SolidityFunction = 'function';\nexport type SolidityString = 'string';\nexport type SolidityTuple = 'tuple';\nexport type SolidityInt = `${'u' | ''}int${MBits}`;\nexport type SolidityFixedArrayRange = Range<ResolvedRegister['fixedArrayMinLength'], ResolvedRegister['fixedArrayMaxLength']>[number];\nexport type SolidityFixedArraySizeLookup = {\n [Prop in SolidityFixedArrayRange as `${Prop}`]: Prop;\n};\n/**\n * Recursively build arrays up to maximum depth\n * or use a more broad type when maximum depth is switched \"off\"\n */\ntype _BuildArrayTypes<T extends string, Depth extends readonly number[] = []> = ResolvedRegister['arrayMaxDepth'] extends false ? `${T}[${string}]` : Depth['length'] extends ResolvedRegister['arrayMaxDepth'] ? T : T extends `${any}[${SolidityFixedArrayRange | ''}]` ? _BuildArrayTypes<T | `${T}[${SolidityFixedArrayRange | ''}]`, [\n ...Depth,\n 1\n]> : _BuildArrayTypes<`${T}[${SolidityFixedArrayRange | ''}]`, [...Depth, 1]>;\nexport type SolidityArrayWithoutTuple = _BuildArrayTypes<SolidityAddress | SolidityBool | SolidityBytes | SolidityFunction | SolidityInt | SolidityString>;\nexport type SolidityArrayWithTuple = _BuildArrayTypes<SolidityTuple>;\nexport type SolidityArray = SolidityArrayWithoutTuple | SolidityArrayWithTuple;\nexport type AbiType = SolidityArray | SolidityAddress | SolidityBool | SolidityBytes | SolidityFunction | SolidityInt | SolidityString | SolidityTuple;\ntype ResolvedAbiType = ResolvedRegister['strictAbiType'] extends true ? AbiType : string;\nexport type AbiInternalType = ResolvedAbiType | `address ${string}` | `contract ${string}` | `enum ${string}` | `struct ${string}`;\nexport type AbiParameter = Pretty<{\n type: ResolvedAbiType;\n name?: string | undefined;\n /** Representation used by Solidity compiler */\n internalType?: AbiInternalType | undefined;\n} & ({\n type: Exclude<ResolvedAbiType, SolidityTuple | SolidityArrayWithTuple>;\n} | {\n type: SolidityTuple | SolidityArrayWithTuple;\n components: readonly AbiParameter[];\n})>;\nexport type AbiEventParameter = AbiParameter & {\n indexed?: boolean | undefined;\n};\n/**\n * State mutability for {@link AbiFunction}\n *\n * @see https://docs.soliditylang.org/en/latest/contracts.html#state-mutability\n */\nexport type AbiStateMutability = 'pure' | 'view' | 'nonpayable' | 'payable';\n/** Kind of {@link AbiParameter} */\nexport type AbiParameterKind = 'inputs' | 'outputs';\n/** ABI [\"function\"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type */\nexport type AbiFunction = {\n type: 'function';\n /**\n * @deprecated use `pure` or `view` from {@link AbiStateMutability} instead\n * @see https://github.com/ethereum/solidity/issues/992\n */\n constant?: boolean | undefined;\n /**\n * @deprecated Vyper used to provide gas estimates\n * @see https://github.com/vyperlang/vyper/issues/2151\n */\n gas?: number | undefined;\n inputs: readonly AbiParameter[];\n name: string;\n outputs: readonly AbiParameter[];\n /**\n * @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead\n * @see https://github.com/ethereum/solidity/issues/992\n */\n payable?: boolean | undefined;\n stateMutability: AbiStateMutability;\n};\n/** ABI [\"constructor\"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type */\nexport type AbiConstructor = {\n type: 'constructor';\n inputs: readonly AbiParameter[];\n /**\n * @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead\n * @see https://github.com/ethereum/solidity/issues/992\n */\n payable?: boolean | undefined;\n stateMutability: Extract<AbiStateMutability, 'payable' | 'nonpayable'>;\n};\n/** ABI [\"fallback\"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type */\nexport type AbiFallback = {\n type: 'fallback';\n /**\n * @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead\n * @see https://github.com/ethereum/solidity/issues/992\n */\n payable?: boolean | undefined;\n stateMutability: Extract<AbiStateMutability, 'payable' | 'nonpayable'>;\n};\n/** ABI [\"receive\"](https://docs.soliditylang.org/en/latest/contracts.html#receive-ether-function) type */\nexport type AbiReceive = {\n type: 'receive';\n stateMutability: Extract<AbiStateMutability, 'payable'>;\n};\n/** ABI [\"event\"](https://docs.soliditylang.org/en/latest/abi-spec.html#events) type */\nexport type AbiEvent = {\n type: 'event';\n anonymous?: boolean | undefined;\n inputs: readonly AbiEventParameter[];\n name: string;\n};\n/** ABI [\"error\"](https://docs.soliditylang.org/en/latest/abi-spec.html#errors) type */\nexport type AbiError = {\n type: 'error';\n inputs: readonly AbiParameter[];\n name: string;\n};\n/** `\"type\"` name for {@link Abi} items. */\nexport type AbiItemType = 'constructor' | 'error' | 'event' | 'fallback' | 'function' | 'receive';\n/**\n * Contract [ABI Specification](https://docs.soliditylang.org/en/latest/abi-spec.html#json)\n */\nexport type Abi = readonly (AbiConstructor | AbiError | AbiEvent | AbiFallback | AbiFunction | AbiReceive)[];\nexport type TypedDataDomain = {\n chainId?: number | bigint | undefined;\n name?: string | undefined;\n salt?: ResolvedRegister['bytesType']['outputs'] | undefined;\n verifyingContract?: Address | undefined;\n version?: string | undefined;\n};\nexport type TypedDataType = Exclude<AbiType, SolidityFunction | SolidityTuple | SolidityArrayWithTuple | 'int' | 'uint'>;\nexport type TypedDataParameter = {\n name: string;\n type: TypedDataType | keyof TypedData | `${keyof TypedData}[${string | ''}]`;\n};\n/**\n * [EIP-712](https://eips.ethereum.org/EIPS/eip-712#definition-of-typed-structured-data-%F0%9D%95%8A) Typed Data Specification\n */\nexport type TypedData = Pretty<Record<string, readonly TypedDataParameter[]> & {\n [_ in TypedDataType]?: never;\n}>;\nexport {};\n//# sourceMappingURL=abi.d.ts.map"],"x_google_ignoreList":[0,1],"mappings":";UAAiBA,QAAAA,EAAjB;AAEYC,KAAAA,gBAAAA,GAAgB;EAKXD;;;;EAIFG,WAAAA,EAJEH,QAIFG,SAAAA;IAKCH,WAAAA,EAAAA,KAAAA,KAAAA;EAERE,CAAAA,GATAA,IASAA,GATOF,QASPE,SAAAA;IAAOF,WAAAA,EAAAA,KAAAA,KAAAA;EAEPE,CAAAA,GATAA,IASAA,GATOC,eASPD,CAAAA,aAAAA,CAAAA;EAAOC;;;;EAePD,UAAAA,EAnBQF,QAmBRE,SAAAA;IAAOC,UAAAA,EAAAA,KAAAA,KAAAA;EAKFH,CAAAA,GAtBLE,IAsBKF,GAtBEA,QAsBFA,SAAAA;IAELE,UAAAA,EAAAA,KAAAA,K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;MAEPE,OAAOC;;eAEEF;;cAEDA;;aAEDA;;WAEFA;;iBAEMA;;uBAEMA;;uBAEAA;;iBAENA;;KAEPE,eAAAA;;;;;;;;;;;;;;;;;;;;;;;iBAuBOA;;uBAEMA;;uBAEAA;;eAERA;;;YAGDA;aACCA;;;cAGDA;;WAEHA;;iBAEMA;;;;AAhJPF,KCAAM,OAAAA,GAAUH,gBDAM,CAAA,aAAA,CAAA"}
@@ -1,154 +0,0 @@
1
- //#region ../../node_modules/.pnpm/abitype@1.1.0_typescript@5.9.3_zod@4.1.12/node_modules/abitype/dist/types/register.d.ts
2
- interface Register {}
3
- type ResolvedRegister = {
4
- /**
5
- * TypeScript type to use for `address` values
6
- * @default `0x${string}`
7
- */
8
- addressType: Register extends {
9
- addressType: infer type;
10
- } ? type : Register extends {
11
- AddressType: infer type;
12
- } ? type : DefaultRegister['addressType'];
13
- /**
14
- * TypeScript type to use for `int<M>` and `uint<M>` values, where `M > 48`
15
- * @default bigint
16
- */
17
- bigIntType: Register extends {
18
- bigIntType: infer type;
19
- } ? type : Register extends {
20
- BigIntType: infer type;
21
- } ? type : DefaultRegister['bigIntType'];
22
- /**
23
- * TypeScript type to use for `bytes` values
24
- * @default { inputs: `0x${string}`; outputs: `0x${string}`; }
25
- */
26
- bytesType: Register extends {
27
- bytesType: infer type extends {
28
- inputs: unknown;
29
- outputs: unknown;
30
- };
31
- } ? type : Register extends {
32
- BytesType: infer type extends {
33
- inputs: unknown;
34
- outputs: unknown;
35
- };
36
- } ? type : DefaultRegister['bytesType'];
37
- /**
38
- * TypeScript type to use for `int<M>` and `uint<M>` values, where `M <= 48`
39
- * @default number
40
- */
41
- intType: Register extends {
42
- intType: infer type;
43
- } ? type : Register extends {
44
- IntType: infer type;
45
- } ? type : DefaultRegister['intType'];
46
- /**
47
- * Maximum depth for nested array types (e.g. string[][])
48
- *
49
- * Note: You probably only want to set this to a specific number if parsed types are returning as `unknown`
50
- * and you want to figure out why. If you set this, you should probably also reduce `FixedArrayMaxLength`.
51
- *
52
- * @default false
53
- */
54
- arrayMaxDepth: Register extends {
55
- arrayMaxDepth: infer type extends number | false;
56
- } ? type : Register extends {
57
- ArrayMaxDepth: infer type extends number | false;
58
- } ? type : DefaultRegister['arrayMaxDepth'];
59
- /**
60
- * Lower bound for fixed array length
61
- * @default 1
62
- */
63
- fixedArrayMinLength: Register extends {
64
- fixedArrayMinLength: infer type extends number;
65
- } ? type : Register extends {
66
- FixedArrayMinLength: infer type extends number;
67
- } ? type : DefaultRegister['fixedArrayMinLength'];
68
- /**
69
- * Upper bound for fixed array length
70
- * @default 99
71
- */
72
- fixedArrayMaxLength: Register extends {
73
- fixedArrayMaxLength: infer type extends number;
74
- } ? type : Register extends {
75
- FixedArrayMaxLength: infer type extends number;
76
- } ? type : DefaultRegister['fixedArrayMaxLength'];
77
- /**
78
- * When set, validates {@link AbiParameter}'s `type` against {@link AbiType}
79
- *
80
- * Note: You probably only want to set this to `true` if parsed types are returning as `unknown`
81
- * and you want to figure out why.
82
- *
83
- * @default false
84
- */
85
- strictAbiType: Register extends {
86
- strictAbiType: infer type extends boolean;
87
- } ? type : Register extends {
88
- StrictAbiType: infer type extends boolean;
89
- } ? type : DefaultRegister['strictAbiType'];
90
- /** @deprecated Use `addressType` instead */
91
- AddressType: ResolvedRegister['addressType'];
92
- /** @deprecated Use `addressType` instead */
93
- BigIntType: ResolvedRegister['bigIntType'];
94
- /** @deprecated Use `bytesType` instead */
95
- BytesType: ResolvedRegister['bytesType'];
96
- /** @deprecated Use `intType` instead */
97
- IntType: ResolvedRegister['intType'];
98
- /** @deprecated Use `arrayMaxDepth` instead */
99
- ArrayMaxDepth: ResolvedRegister['arrayMaxDepth'];
100
- /** @deprecated Use `fixedArrayMinLength` instead */
101
- FixedArrayMinLength: ResolvedRegister['fixedArrayMinLength'];
102
- /** @deprecated Use `fixedArrayMaxLength` instead */
103
- FixedArrayMaxLength: ResolvedRegister['fixedArrayMaxLength'];
104
- /** @deprecated Use `strictAbiType` instead */
105
- StrictAbiType: ResolvedRegister['strictAbiType'];
106
- };
107
- type DefaultRegister = {
108
- /** Maximum depth for nested array types (e.g. string[][]) */
109
- arrayMaxDepth: false;
110
- /** Lower bound for fixed array length */
111
- fixedArrayMinLength: 1;
112
- /** Upper bound for fixed array length */
113
- fixedArrayMaxLength: 99;
114
- /** TypeScript type to use for `address` values */
115
- addressType: `0x${string}`;
116
- /** TypeScript type to use for `bytes` values */
117
- bytesType: {
118
- /** TypeScript type to use for `bytes` input values */
119
- inputs: `0x${string}`;
120
- /** TypeScript type to use for `bytes` output values */
121
- outputs: `0x${string}`;
122
- };
123
- /** TypeScript type to use for `int<M>` and `uint<M>` values, where `M > 48` */
124
- bigIntType: bigint;
125
- /** TypeScript type to use for `int<M>` and `uint<M>` values, where `M <= 48` */
126
- intType: number;
127
- /** When set, validates {@link AbiParameter}'s `type` against {@link AbiType} */
128
- strictAbiType: false;
129
- /** @deprecated Use `arrayMaxDepth` instead */
130
- ArrayMaxDepth: DefaultRegister['arrayMaxDepth'];
131
- /** @deprecated Use `fixedArrayMinLength` instead */
132
- FixedArrayMinLength: DefaultRegister['fixedArrayMinLength'];
133
- /** @deprecated Use `fixedArrayMaxLength` instead */
134
- FixedArrayMaxLength: DefaultRegister['fixedArrayMaxLength'];
135
- /** @deprecated Use `addressType` instead */
136
- AddressType: DefaultRegister['addressType'];
137
- /** @deprecated Use `bytesType` instead */
138
- BytesType: {
139
- inputs: DefaultRegister['bytesType']['inputs'];
140
- outputs: DefaultRegister['bytesType']['outputs'];
141
- };
142
- /** @deprecated Use `bigIntType` instead */
143
- BigIntType: DefaultRegister['bigIntType'];
144
- /** @deprecated Use `intType` instead */
145
- IntType: DefaultRegister['intType'];
146
- /** @deprecated Use `strictAbiType` instead */
147
- StrictAbiType: DefaultRegister['strictAbiType'];
148
- };
149
- //#endregion
150
- //#region ../../node_modules/.pnpm/abitype@1.1.0_typescript@5.9.3_zod@4.1.12/node_modules/abitype/dist/types/abi.d.ts
151
- type Address = ResolvedRegister['addressType'];
152
- //#endregion
153
- export { Address as t };
154
- //# sourceMappingURL=abi-CQuxrNCU.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abi-CQuxrNCU.d.cts","names":["Register","ResolvedRegister","type","DefaultRegister","ResolvedRegister","Pretty","Range","Address","MBytes","MBits","SolidityAddress","SolidityBool","SolidityBytes","SolidityFunction","SolidityString","SolidityTuple","SolidityInt","SolidityFixedArrayRange","SolidityFixedArraySizeLookup","Prop","_BuildArrayTypes","T","Depth","SolidityArrayWithoutTuple","SolidityArrayWithTuple","SolidityArray","AbiType","ResolvedAbiType","AbiInternalType","AbiParameter","Exclude","AbiEventParameter","AbiStateMutability","AbiParameterKind","AbiFunction","AbiConstructor","Extract","AbiFallback","AbiReceive","AbiEvent","AbiError","AbiItemType","Abi","TypedDataDomain","TypedDataType","TypedDataParameter","TypedData","Record"],"sources":["../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.9.3_zod@4.1.12/node_modules/abitype/dist/types/register.d.ts","../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.9.3_zod@4.1.12/node_modules/abitype/dist/types/abi.d.ts"],"sourcesContent":["export interface Register {\n}\nexport type ResolvedRegister = {\n /**\n * TypeScript type to use for `address` values\n * @default `0x${string}`\n */\n addressType: Register extends {\n addressType: infer type;\n } ? type : Register extends {\n AddressType: infer type;\n } ? type : DefaultRegister['addressType'];\n /**\n * TypeScript type to use for `int<M>` and `uint<M>` values, where `M > 48`\n * @default bigint\n */\n bigIntType: Register extends {\n bigIntType: infer type;\n } ? type : Register extends {\n BigIntType: infer type;\n } ? type : DefaultRegister['bigIntType'];\n /**\n * TypeScript type to use for `bytes` values\n * @default { inputs: `0x${string}`; outputs: `0x${string}`; }\n */\n bytesType: Register extends {\n bytesType: infer type extends {\n inputs: unknown;\n outputs: unknown;\n };\n } ? type : Register extends {\n BytesType: infer type extends {\n inputs: unknown;\n outputs: unknown;\n };\n } ? type : DefaultRegister['bytesType'];\n /**\n * TypeScript type to use for `int<M>` and `uint<M>` values, where `M <= 48`\n * @default number\n */\n intType: Register extends {\n intType: infer type;\n } ? type : Register extends {\n IntType: infer type;\n } ? type : DefaultRegister['intType'];\n /**\n * Maximum depth for nested array types (e.g. string[][])\n *\n * Note: You probably only want to set this to a specific number if parsed types are returning as `unknown`\n * and you want to figure out why. If you set this, you should probably also reduce `FixedArrayMaxLength`.\n *\n * @default false\n */\n arrayMaxDepth: Register extends {\n arrayMaxDepth: infer type extends number | false;\n } ? type : Register extends {\n ArrayMaxDepth: infer type extends number | false;\n } ? type : DefaultRegister['arrayMaxDepth'];\n /**\n * Lower bound for fixed array length\n * @default 1\n */\n fixedArrayMinLength: Register extends {\n fixedArrayMinLength: infer type extends number;\n } ? type : Register extends {\n FixedArrayMinLength: infer type extends number;\n } ? type : DefaultRegister['fixedArrayMinLength'];\n /**\n * Upper bound for fixed array length\n * @default 99\n */\n fixedArrayMaxLength: Register extends {\n fixedArrayMaxLength: infer type extends number;\n } ? type : Register extends {\n FixedArrayMaxLength: infer type extends number;\n } ? type : DefaultRegister['fixedArrayMaxLength'];\n /**\n * When set, validates {@link AbiParameter}'s `type` against {@link AbiType}\n *\n * Note: You probably only want to set this to `true` if parsed types are returning as `unknown`\n * and you want to figure out why.\n *\n * @default false\n */\n strictAbiType: Register extends {\n strictAbiType: infer type extends boolean;\n } ? type : Register extends {\n StrictAbiType: infer type extends boolean;\n } ? type : DefaultRegister['strictAbiType'];\n /** @deprecated Use `addressType` instead */\n AddressType: ResolvedRegister['addressType'];\n /** @deprecated Use `addressType` instead */\n BigIntType: ResolvedRegister['bigIntType'];\n /** @deprecated Use `bytesType` instead */\n BytesType: ResolvedRegister['bytesType'];\n /** @deprecated Use `intType` instead */\n IntType: ResolvedRegister['intType'];\n /** @deprecated Use `arrayMaxDepth` instead */\n ArrayMaxDepth: ResolvedRegister['arrayMaxDepth'];\n /** @deprecated Use `fixedArrayMinLength` instead */\n FixedArrayMinLength: ResolvedRegister['fixedArrayMinLength'];\n /** @deprecated Use `fixedArrayMaxLength` instead */\n FixedArrayMaxLength: ResolvedRegister['fixedArrayMaxLength'];\n /** @deprecated Use `strictAbiType` instead */\n StrictAbiType: ResolvedRegister['strictAbiType'];\n};\nexport type DefaultRegister = {\n /** Maximum depth for nested array types (e.g. string[][]) */\n arrayMaxDepth: false;\n /** Lower bound for fixed array length */\n fixedArrayMinLength: 1;\n /** Upper bound for fixed array length */\n fixedArrayMaxLength: 99;\n /** TypeScript type to use for `address` values */\n addressType: `0x${string}`;\n /** TypeScript type to use for `bytes` values */\n bytesType: {\n /** TypeScript type to use for `bytes` input values */\n inputs: `0x${string}`;\n /** TypeScript type to use for `bytes` output values */\n outputs: `0x${string}`;\n };\n /** TypeScript type to use for `int<M>` and `uint<M>` values, where `M > 48` */\n bigIntType: bigint;\n /** TypeScript type to use for `int<M>` and `uint<M>` values, where `M <= 48` */\n intType: number;\n /** When set, validates {@link AbiParameter}'s `type` against {@link AbiType} */\n strictAbiType: false;\n /** @deprecated Use `arrayMaxDepth` instead */\n ArrayMaxDepth: DefaultRegister['arrayMaxDepth'];\n /** @deprecated Use `fixedArrayMinLength` instead */\n FixedArrayMinLength: DefaultRegister['fixedArrayMinLength'];\n /** @deprecated Use `fixedArrayMaxLength` instead */\n FixedArrayMaxLength: DefaultRegister['fixedArrayMaxLength'];\n /** @deprecated Use `addressType` instead */\n AddressType: DefaultRegister['addressType'];\n /** @deprecated Use `bytesType` instead */\n BytesType: {\n inputs: DefaultRegister['bytesType']['inputs'];\n outputs: DefaultRegister['bytesType']['outputs'];\n };\n /** @deprecated Use `bigIntType` instead */\n BigIntType: DefaultRegister['bigIntType'];\n /** @deprecated Use `intType` instead */\n IntType: DefaultRegister['intType'];\n /** @deprecated Use `strictAbiType` instead */\n StrictAbiType: DefaultRegister['strictAbiType'];\n};\n//# sourceMappingURL=register.d.ts.map","import type { ResolvedRegister } from './register.js';\nimport type { Pretty, Range } from './types.js';\nexport type Address = ResolvedRegister['addressType'];\ntype MBytes = '' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32;\nexport type MBits = '' | 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 88 | 96 | 104 | 112 | 120 | 128 | 136 | 144 | 152 | 160 | 168 | 176 | 184 | 192 | 200 | 208 | 216 | 224 | 232 | 240 | 248 | 256;\nexport type SolidityAddress = 'address';\nexport type SolidityBool = 'bool';\nexport type SolidityBytes = `bytes${MBytes}`;\nexport type SolidityFunction = 'function';\nexport type SolidityString = 'string';\nexport type SolidityTuple = 'tuple';\nexport type SolidityInt = `${'u' | ''}int${MBits}`;\nexport type SolidityFixedArrayRange = Range<ResolvedRegister['fixedArrayMinLength'], ResolvedRegister['fixedArrayMaxLength']>[number];\nexport type SolidityFixedArraySizeLookup = {\n [Prop in SolidityFixedArrayRange as `${Prop}`]: Prop;\n};\n/**\n * Recursively build arrays up to maximum depth\n * or use a more broad type when maximum depth is switched \"off\"\n */\ntype _BuildArrayTypes<T extends string, Depth extends readonly number[] = []> = ResolvedRegister['arrayMaxDepth'] extends false ? `${T}[${string}]` : Depth['length'] extends ResolvedRegister['arrayMaxDepth'] ? T : T extends `${any}[${SolidityFixedArrayRange | ''}]` ? _BuildArrayTypes<T | `${T}[${SolidityFixedArrayRange | ''}]`, [\n ...Depth,\n 1\n]> : _BuildArrayTypes<`${T}[${SolidityFixedArrayRange | ''}]`, [...Depth, 1]>;\nexport type SolidityArrayWithoutTuple = _BuildArrayTypes<SolidityAddress | SolidityBool | SolidityBytes | SolidityFunction | SolidityInt | SolidityString>;\nexport type SolidityArrayWithTuple = _BuildArrayTypes<SolidityTuple>;\nexport type SolidityArray = SolidityArrayWithoutTuple | SolidityArrayWithTuple;\nexport type AbiType = SolidityArray | SolidityAddress | SolidityBool | SolidityBytes | SolidityFunction | SolidityInt | SolidityString | SolidityTuple;\ntype ResolvedAbiType = ResolvedRegister['strictAbiType'] extends true ? AbiType : string;\nexport type AbiInternalType = ResolvedAbiType | `address ${string}` | `contract ${string}` | `enum ${string}` | `struct ${string}`;\nexport type AbiParameter = Pretty<{\n type: ResolvedAbiType;\n name?: string | undefined;\n /** Representation used by Solidity compiler */\n internalType?: AbiInternalType | undefined;\n} & ({\n type: Exclude<ResolvedAbiType, SolidityTuple | SolidityArrayWithTuple>;\n} | {\n type: SolidityTuple | SolidityArrayWithTuple;\n components: readonly AbiParameter[];\n})>;\nexport type AbiEventParameter = AbiParameter & {\n indexed?: boolean | undefined;\n};\n/**\n * State mutability for {@link AbiFunction}\n *\n * @see https://docs.soliditylang.org/en/latest/contracts.html#state-mutability\n */\nexport type AbiStateMutability = 'pure' | 'view' | 'nonpayable' | 'payable';\n/** Kind of {@link AbiParameter} */\nexport type AbiParameterKind = 'inputs' | 'outputs';\n/** ABI [\"function\"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type */\nexport type AbiFunction = {\n type: 'function';\n /**\n * @deprecated use `pure` or `view` from {@link AbiStateMutability} instead\n * @see https://github.com/ethereum/solidity/issues/992\n */\n constant?: boolean | undefined;\n /**\n * @deprecated Vyper used to provide gas estimates\n * @see https://github.com/vyperlang/vyper/issues/2151\n */\n gas?: number | undefined;\n inputs: readonly AbiParameter[];\n name: string;\n outputs: readonly AbiParameter[];\n /**\n * @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead\n * @see https://github.com/ethereum/solidity/issues/992\n */\n payable?: boolean | undefined;\n stateMutability: AbiStateMutability;\n};\n/** ABI [\"constructor\"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type */\nexport type AbiConstructor = {\n type: 'constructor';\n inputs: readonly AbiParameter[];\n /**\n * @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead\n * @see https://github.com/ethereum/solidity/issues/992\n */\n payable?: boolean | undefined;\n stateMutability: Extract<AbiStateMutability, 'payable' | 'nonpayable'>;\n};\n/** ABI [\"fallback\"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type */\nexport type AbiFallback = {\n type: 'fallback';\n /**\n * @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead\n * @see https://github.com/ethereum/solidity/issues/992\n */\n payable?: boolean | undefined;\n stateMutability: Extract<AbiStateMutability, 'payable' | 'nonpayable'>;\n};\n/** ABI [\"receive\"](https://docs.soliditylang.org/en/latest/contracts.html#receive-ether-function) type */\nexport type AbiReceive = {\n type: 'receive';\n stateMutability: Extract<AbiStateMutability, 'payable'>;\n};\n/** ABI [\"event\"](https://docs.soliditylang.org/en/latest/abi-spec.html#events) type */\nexport type AbiEvent = {\n type: 'event';\n anonymous?: boolean | undefined;\n inputs: readonly AbiEventParameter[];\n name: string;\n};\n/** ABI [\"error\"](https://docs.soliditylang.org/en/latest/abi-spec.html#errors) type */\nexport type AbiError = {\n type: 'error';\n inputs: readonly AbiParameter[];\n name: string;\n};\n/** `\"type\"` name for {@link Abi} items. */\nexport type AbiItemType = 'constructor' | 'error' | 'event' | 'fallback' | 'function' | 'receive';\n/**\n * Contract [ABI Specification](https://docs.soliditylang.org/en/latest/abi-spec.html#json)\n */\nexport type Abi = readonly (AbiConstructor | AbiError | AbiEvent | AbiFallback | AbiFunction | AbiReceive)[];\nexport type TypedDataDomain = {\n chainId?: number | bigint | undefined;\n name?: string | undefined;\n salt?: ResolvedRegister['bytesType']['outputs'] | undefined;\n verifyingContract?: Address | undefined;\n version?: string | undefined;\n};\nexport type TypedDataType = Exclude<AbiType, SolidityFunction | SolidityTuple | SolidityArrayWithTuple | 'int' | 'uint'>;\nexport type TypedDataParameter = {\n name: string;\n type: TypedDataType | keyof TypedData | `${keyof TypedData}[${string | ''}]`;\n};\n/**\n * [EIP-712](https://eips.ethereum.org/EIPS/eip-712#definition-of-typed-structured-data-%F0%9D%95%8A) Typed Data Specification\n */\nexport type TypedData = Pretty<Record<string, readonly TypedDataParameter[]>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AAA,SAAAA,CAAAA;EAEDA;;;;;;;AAYf;EAuBmBE,aAAAA,EA5EAH,QA4EAG,SAAAA;IAEMA,aAAAA,EAAAA,KAAAA,cAAAA,MAAAA,GAAAA,KAAAA;EAEAA,CAAAA,GA9EjBD,IA8EiBC,GA9EVH,QA8EUG,SAAAA;IAERA,aAAAA,EAAAA,KAAAA,cAAAA,MAAAA,GAAAA,KAAAA;EAGDA,CAAAA,GAjFRD,IAiFQC,GAjFDA,eAiFCA,CAAAA,eAAAA,CAAAA;EACCA;;;;EAOiB,mBAAA,EApFTH,QAoFS,SAAA;;MAlF1BE,OAAOF;;EC9DHO,CAAAA,GDgEJL,IChEIK,GDgEGJ,eChEOC,CAAAA,qBAAgB,CAAA;;;;;uBDqEbJ;;MAEjBE,OAAOF;;MAEPE,OAAOC;;;;;;;;;iBASIH;;MAEXE,OAAOF;;MAEPE,OAAOC;;eAEEF;;cAEDA;;aAEDA;;WAEFA;;iBAEMA;;uBAEMA;;uBAEAA;;iBAENA;;KAEPE,eAAAA;;;;;;;;;;;;;;;;;;;;;;;iBAuBOA;;uBAEMA;;uBAEAA;;eAERA;;;YAGDA;aACCA;;;cAGDA;;WAEHA;;iBAEMA;;;;AAhJPF,KCAAM,OAAAA,GAAUH,gBDAM,CAAA,aAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"account-Bwm5PTcc.cjs","names":[],"sources":["../src/account/types.ts","../src/account/helpers.ts"],"sourcesContent":["import type { Environment } from \"@otim/sdk-core/config\";\nimport type { Hex } from \"viem\";\n\nexport const ServerAccountType = {\n PrivateKey: \"privateKey\",\n Api: \"api\",\n} as const;\nexport type ServerAccountType =\n (typeof ServerAccountType)[keyof typeof ServerAccountType];\n\nexport const AccountType = {\n ...ServerAccountType,\n} as const;\nexport type AccountType = (typeof AccountType)[keyof typeof AccountType];\n\n/**\n * Otim Account\n */\n\nexport type OtimAccountSignMessageArgs = {\n message: string | { raw: Hex | Uint8Array };\n};\n\nexport interface OtimAccount {\n initialize(): Promise<void>;\n signMessage(args: OtimAccountSignMessageArgs): Promise<Hex>;\n}\n\n/**\n * Account Config\n */\n\ninterface BaseAccountConfig {\n environment?: Environment;\n}\n\nexport interface ApiAccountConfig extends BaseAccountConfig {\n type: typeof ServerAccountType.Api;\n appId: string;\n privateKey: string;\n publicKey: string;\n apiKey?: string;\n}\n\nexport interface PrivateKeyAccountConfig extends BaseAccountConfig {\n type: typeof ServerAccountType.PrivateKey;\n privateKey: `0x${string}`;\n}\n\nexport type ServerAccountConfig = ApiAccountConfig | PrivateKeyAccountConfig;\n\nexport type AccountConfig = ServerAccountConfig;\n","import type {\n ApiAccountConfig,\n PrivateKeyAccountConfig,\n ServerAccountConfig,\n} from \"./types\";\nimport type { OtimServerClientContext } from \"@otim/sdk-core/context\";\n\nimport { ServerAccountType } from \"./types\";\n\nexport function isApiAccountConfig(\n config: ServerAccountConfig,\n): config is ApiAccountConfig {\n return config.type === ServerAccountType.Api;\n}\n\nexport function isPrivateKeyAccountConfig(\n config: ServerAccountConfig,\n): config is PrivateKeyAccountConfig {\n return config.type === ServerAccountType.PrivateKey;\n}\n\nexport function createClientContext(\n config: ServerAccountConfig,\n): OtimServerClientContext {\n const usesApiKeyAuth =\n isApiAccountConfig(config) && config.apiKey !== undefined;\n\n return { usesApiKeyAuth, config, accountType: config.type };\n}\n"],"mappings":";;AAGA,MAAa,oBAAoB;CAC/B,YAAY;CACZ,KAAK;CACN;AAID,MAAa,cAAc,EACzB,GAAG,mBACJ;;;;ACHD,SAAgB,mBACd,QAC4B;AAC5B,QAAO,OAAO,SAAS,kBAAkB;;AAG3C,SAAgB,0BACd,QACmC;AACnC,QAAO,OAAO,SAAS,kBAAkB;;AAG3C,SAAgB,oBACd,QACyB;AAIzB,QAAO;EAAE,gBAFP,mBAAmB,OAAO,IAAI,OAAO,WAAW;EAEzB;EAAQ,aAAa,OAAO;EAAM"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"account-p4sxzIt3.mjs","names":[],"sources":["../src/account/types.ts","../src/account/helpers.ts"],"sourcesContent":["import type { Environment } from \"@otim/sdk-core/config\";\nimport type { Hex } from \"viem\";\n\nexport const ServerAccountType = {\n PrivateKey: \"privateKey\",\n Api: \"api\",\n} as const;\nexport type ServerAccountType =\n (typeof ServerAccountType)[keyof typeof ServerAccountType];\n\nexport const AccountType = {\n ...ServerAccountType,\n} as const;\nexport type AccountType = (typeof AccountType)[keyof typeof AccountType];\n\n/**\n * Otim Account\n */\n\nexport type OtimAccountSignMessageArgs = {\n message: string | { raw: Hex | Uint8Array };\n};\n\nexport interface OtimAccount {\n initialize(): Promise<void>;\n signMessage(args: OtimAccountSignMessageArgs): Promise<Hex>;\n}\n\n/**\n * Account Config\n */\n\ninterface BaseAccountConfig {\n environment?: Environment;\n}\n\nexport interface ApiAccountConfig extends BaseAccountConfig {\n type: typeof ServerAccountType.Api;\n appId: string;\n privateKey: string;\n publicKey: string;\n apiKey?: string;\n}\n\nexport interface PrivateKeyAccountConfig extends BaseAccountConfig {\n type: typeof ServerAccountType.PrivateKey;\n privateKey: `0x${string}`;\n}\n\nexport type ServerAccountConfig = ApiAccountConfig | PrivateKeyAccountConfig;\n\nexport type AccountConfig = ServerAccountConfig;\n","import type {\n ApiAccountConfig,\n PrivateKeyAccountConfig,\n ServerAccountConfig,\n} from \"./types\";\nimport type { OtimServerClientContext } from \"@otim/sdk-core/context\";\n\nimport { ServerAccountType } from \"./types\";\n\nexport function isApiAccountConfig(\n config: ServerAccountConfig,\n): config is ApiAccountConfig {\n return config.type === ServerAccountType.Api;\n}\n\nexport function isPrivateKeyAccountConfig(\n config: ServerAccountConfig,\n): config is PrivateKeyAccountConfig {\n return config.type === ServerAccountType.PrivateKey;\n}\n\nexport function createClientContext(\n config: ServerAccountConfig,\n): OtimServerClientContext {\n const usesApiKeyAuth =\n isApiAccountConfig(config) && config.apiKey !== undefined;\n\n return { usesApiKeyAuth, config, accountType: config.type };\n}\n"],"mappings":";AAGA,MAAa,oBAAoB;CAC/B,YAAY;CACZ,KAAK;CACN;AAID,MAAa,cAAc,EACzB,GAAG,mBACJ;;;;ACHD,SAAgB,mBACd,QAC4B;AAC5B,QAAO,OAAO,SAAS,kBAAkB;;AAG3C,SAAgB,0BACd,QACmC;AACnC,QAAO,OAAO,SAAS,kBAAkB;;AAG3C,SAAgB,oBACd,QACyB;AAIzB,QAAO;EAAE,gBAFP,mBAAmB,OAAO,IAAI,OAAO,WAAW;EAEzB;EAAQ,aAAa,OAAO;EAAM"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"clients-CVg-yW5b.cjs","names":["apiClient: APIClient","apiClient: APIClient","account: OtimAccount","context: OtimClientContext","apiClient: APIClient","apiClient: APIClient","UnifiedPaymentSigner","ApiKeyClientSigningService","ServerWalletSigningService","apiClient: APIClient","account: OtimAccount","context: OtimClientContext","hexStringSchema","supportedChains","apiClient: APIClient","account: OtimAccount","context: OtimClientContext"],"sources":["../src/clients/activity.ts","../src/clients/auth.ts","../src/clients/config.ts","../src/clients/delegation.ts","../src/clients/helpers/payment-signer.ts","../src/clients/payment-requests.ts","../src/clients/orchestration.ts"],"sourcesContent":["import type {\n APIClient,\n GetInstructionActivityRequest,\n GetInstructionActivityResponse,\n} from \"@otim/utils/api\";\n\nexport class ActivityClient {\n constructor(private readonly apiClient: APIClient) {}\n\n async getInstructionActivity(\n request: GetInstructionActivityRequest,\n ): Promise<GetInstructionActivityResponse> {\n const response =\n await this.apiClient.activity.getInstructionActivity(request);\n\n return response.data;\n }\n}\n","import type { OtimAccount } from \"@otim/sdk-core/account\";\nimport type { OtimClientContext } from \"@otim/sdk-core/context\";\nimport type { APIClient, AuthLoginResponse, MeResponse } from \"@otim/utils/api\";\nimport type { Address } from \"viem\";\n\nimport { parseSignatureToVRS } from \"@otim/utils/helpers\";\n\nimport { createLoginSiweMessage } from \"@otim/sdk-core/config\";\nimport { assertRequiresAuth } from \"@otim/sdk-core/context\";\n\nexport interface LoginOptions {\n address: Address;\n}\n\nexport class AuthClient {\n constructor(\n private readonly apiClient: APIClient,\n private readonly account: OtimAccount,\n private readonly context: OtimClientContext,\n ) {}\n\n async login({ address }: LoginOptions): Promise<AuthLoginResponse> {\n assertRequiresAuth(this.context);\n\n const message = createLoginSiweMessage(address, Date.now().toString());\n const signature = await this.account.signMessage({ message });\n const vrsParsedSignature = parseSignatureToVRS(signature);\n\n const response = await this.apiClient.auth.login({\n siwe: message,\n signature: vrsParsedSignature,\n });\n\n return response.data;\n }\n\n async getCurrentUser(): Promise<MeResponse> {\n const response = await this.apiClient.auth.me();\n return response.data;\n }\n}\n","import type {\n APIClient,\n GetMaxPriorityFeePerGasEstimateRequest,\n GetMaxPriorityFeePerGasEstimateResponse,\n} from \"@otim/utils/api\";\n\nexport class ConfigClient {\n constructor(private readonly apiClient: APIClient) {}\n\n async getMaxPriorityFeeEstimate({\n chainId,\n }: GetMaxPriorityFeePerGasEstimateRequest): Promise<GetMaxPriorityFeePerGasEstimateResponse> {\n const response =\n await this.apiClient.config.getMaxPriorityFeePerGasEstimate({ chainId });\n\n return response.data;\n }\n}\n","import type {\n APIClient,\n DelegationCreateRequest,\n DelegationStatusRequest,\n DelegationStatusResponse,\n GetDelegateAddressRequest,\n GetDelegateAddressResponse,\n} from \"@otim/utils/api\";\n\nexport class DelegationClient {\n constructor(private readonly apiClient: APIClient) {}\n\n async getDelegateAddress({\n chainId,\n }: GetDelegateAddressRequest): Promise<GetDelegateAddressResponse> {\n const response = await this.apiClient.config.getDelegateAddress({\n chainId,\n });\n\n return response.data;\n }\n\n async getDelegationStatus(\n options: DelegationStatusRequest,\n ): Promise<DelegationStatusResponse> {\n const response = await this.apiClient.account.getDelegationStatus({\n address: options.address,\n chainId: options.chainId,\n });\n\n return response.data;\n }\n\n async createDelegation(\n delegationRequest: DelegationCreateRequest,\n ): Promise<void> {\n await this.apiClient.account.createDelegation(delegationRequest);\n }\n}\n","import type { OtimServerClientContext } from \"@otim/sdk-core/context\";\nimport type { PaymentResponseWithActionNames } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\nimport type { PublicClient } from \"viem\";\n\nimport {\n ApiKeyClientSigningService,\n ServerWalletSigningService,\n UnifiedPaymentSigner,\n} from \"@otim/turnkey/signing\";\nimport { createWalletClient, http } from \"viem\";\nimport { privateKeyToAccount } from \"viem/accounts\";\n\nimport { isApiAccountConfig } from \"@otim/sdk-core/account\";\n\nexport interface CreatePaymentSignerParams {\n context: OtimServerClientContext;\n buildResponse: PaymentResponseWithActionNames;\n publicClient: PublicClient;\n delegateAddressMap: Map<number, Address>;\n}\n\ntype CreatePaymentSignerResult = Awaited<\n ReturnType<UnifiedPaymentSigner[\"signAll\"]>\n>;\n\nexport async function createPaymentSigner(\n params: CreatePaymentSignerParams,\n): Promise<CreatePaymentSignerResult> {\n const { context, buildResponse, publicClient, delegateAddressMap } = params;\n\n if (isApiAccountConfig(context.config)) {\n const signingService = new ApiKeyClientSigningService(\n context.config.publicKey,\n context.config.privateKey,\n );\n\n const signer = new UnifiedPaymentSigner({\n buildResponse,\n signingService,\n publicClient,\n delegateAddressMap,\n });\n\n return signer.signAll();\n }\n\n const account = privateKeyToAccount(context.config.privateKey);\n const walletClient = createWalletClient({\n account,\n transport: http(),\n });\n\n const signingService =\n ServerWalletSigningService.fromViemWallet(walletClient);\n\n const signer = new UnifiedPaymentSigner({\n buildResponse,\n signingService,\n publicClient,\n delegateAddressMap,\n });\n\n return signer.signAll();\n}\n","import type { OtimAccount } from \"@otim/sdk-core/account\";\nimport type { OtimClientContext } from \"@otim/sdk-core/context\";\nimport type {\n APIClient,\n GetPaymentRequestsRequest,\n GetPaymentRequestsResponse,\n PaginatedServiceResponse,\n PaymentRequestBuildRequest,\n PaymentRequestDetailsRequest,\n PaymentRequestDetailsResponse,\n PaymentsListRequest,\n ServiceResponse,\n} from \"@otim/utils/api\";\nimport type { SupportedChainId } from \"@otim/utils/chains\";\nimport type { Nullable } from \"@otim/utils/helpers\";\nimport type { PaymentResponseWithActionNames } from \"@otim/utils/payments\";\nimport type { PaymentRequestMetadata } from \"@otim/utils/payments\";\nimport type { Address, Payments } from \"@otim/utils/schemas\";\nimport type { PublicClient } from \"viem\";\n\nimport {\n getChainById,\n getChainTokens,\n getTokenAddress,\n getTokenMetadata,\n supportedChains,\n} from \"@otim/utils/chains\";\nimport { validateIso8601Date } from \"@otim/utils/helpers\";\nimport {\n addActionNamesToInstructions,\n buildPaymentMetadata,\n createChainTokenConfigs,\n createComprehensivePaymentRequest,\n extractActionNamesMap,\n} from \"@otim/utils/payments\";\nimport { hexStringSchema } from \"@otim/utils/schemas\";\nimport { createPublicClient, http } from \"viem\";\n\nimport { assertServerContext } from \"@otim/sdk-core/context\";\n\nimport { createPaymentSigner } from \"./helpers/payment-signer\";\n\nexport interface CreatePaymentRequestParameters {\n amount: number;\n chainId: SupportedChainId;\n recipient: Address;\n token?: \"USDC\" | \"USDT\";\n payer?: Nullable<Address>;\n /**\n * ISO 8601 date format (e.g., \"2024-12-31T23:59:59.000Z\")\n */\n dueDate?: string;\n metadata?: PaymentRequestMetadata;\n note?: string;\n}\n\nexport interface CreatePaymentRequestResponse {\n requestId: string;\n ephemeralWalletAddress: Address;\n}\n\nexport interface ActivatePaymentRequestParams {\n buildResponse: PaymentResponseWithActionNames;\n settlementChainId: number;\n}\n\ntype PaymentInstruction =\n PaymentResponseWithActionNames[\"completionInstructions\"][number];\n\nexport class PaymentRequestsClient {\n constructor(\n private readonly apiClient: APIClient,\n private readonly account: OtimAccount,\n private readonly context: OtimClientContext,\n ) {}\n\n async create(\n params: CreatePaymentRequestParameters,\n ): Promise<CreatePaymentRequestResponse> {\n const {\n chainId,\n token = \"USDC\",\n recipient,\n amount,\n payer,\n note,\n dueDate,\n metadata: customMetadata,\n } = params;\n\n if (dueDate) {\n validateIso8601Date(dueDate);\n }\n\n const feeTokenAddress = this.validateAndGetTokenAddress(chainId, token);\n const metadata = this.buildMetadata({\n token,\n amount,\n recipient,\n note,\n dueDate,\n customMetadata,\n });\n const payload = this.createPayload({\n chainId,\n recipient,\n amount,\n payer,\n metadata,\n feeTokenAddress,\n });\n\n const buildResponse = await this.buildAndEnhancePaymentRequest(payload);\n\n await this.activate({ buildResponse, settlementChainId: chainId });\n\n return {\n requestId: buildResponse.requestId,\n ephemeralWalletAddress: buildResponse.ephemeralWalletAddress,\n };\n }\n\n async activate(params: ActivatePaymentRequestParams): Promise<void> {\n assertServerContext(this.context);\n\n const { buildResponse, settlementChainId } = params;\n const publicClient = this.createPublicClient(settlementChainId);\n\n const instructions = [\n ...buildResponse.completionInstructions,\n ...buildResponse.instructions,\n ];\n\n const delegateAddressMap = await this.fetchDelegateAddresses(instructions);\n\n const {\n signedAuthorization,\n completionInstructions,\n instructions: signedInstructions,\n } = await createPaymentSigner({\n context: this.context,\n buildResponse,\n publicClient,\n delegateAddressMap,\n });\n\n await this.apiClient.payments.newPaymentRequest({\n requestId: buildResponse.requestId,\n signedAuthorization,\n completionInstructions,\n instructions: signedInstructions,\n });\n }\n\n private validateAndGetTokenAddress(chainId: number, token: string): Address {\n const tokenAddress = getTokenAddress(chainId, token);\n if (!tokenAddress) {\n throw new Error(`Token ${token} not supported on chain ${chainId}`);\n }\n\n const tokenMetadata = getTokenMetadata(token);\n if (!tokenMetadata) {\n throw new Error(`Token ${token} metadata not found`);\n }\n\n return hexStringSchema.parse(tokenAddress);\n }\n\n private buildMetadata(params: {\n token: string;\n amount: number;\n recipient: Address;\n note?: string;\n dueDate?: string;\n customMetadata?: PaymentRequestMetadata;\n }): PaymentRequestMetadata {\n const { token, amount, recipient, note, dueDate, customMetadata } = params;\n\n const baseMetadata = buildPaymentMetadata({\n tokenSymbol: token,\n amountInUSD: amount,\n fromAccountAddress: recipient,\n note,\n dueDate,\n hasInvoiceMetadata: false,\n });\n\n return customMetadata\n ? { ...baseMetadata, ...customMetadata }\n : baseMetadata;\n }\n\n private createPayload(params: {\n chainId: number;\n recipient: Address;\n amount: number;\n payer?: Address | null;\n metadata: PaymentRequestMetadata;\n feeTokenAddress: Address;\n }): PaymentRequestBuildRequest {\n const { chainId, recipient, amount, payer, metadata, feeTokenAddress } =\n params;\n\n const tokens = Object.values(supportedChains.mainnet).flatMap((chain) =>\n getChainTokens(chain.id),\n );\n\n const chainTokenConfigs = createChainTokenConfigs(tokens);\n\n return createComprehensivePaymentRequest({\n settlementChainId: chainId,\n recipient,\n amount: amount.toString(),\n ephemeralWalletAddress: recipient,\n chainTokenConfigs,\n payerAddress: payer ?? null,\n metadata,\n feeToken: feeTokenAddress,\n });\n }\n\n private async buildAndEnhancePaymentRequest(\n payload: PaymentRequestBuildRequest,\n ): Promise<PaymentResponseWithActionNames> {\n const actionNames = extractActionNamesMap(\n payload.completionInstructions,\n payload.instructions,\n );\n\n const response = await this.apiClient.payments.buildPaymentRequest(payload);\n\n return addActionNamesToInstructions(response.data, actionNames);\n }\n\n private createPublicClient(chainId: number): PublicClient {\n const chain = getChainById(chainId);\n if (!chain) {\n throw new Error(`Chain with id ${chainId} not found`);\n }\n\n return createPublicClient({ chain, transport: http() });\n }\n\n private async fetchDelegateAddresses(\n instructions: PaymentInstruction[],\n ): Promise<Map<number, Address>> {\n const chainIds = Array.from(\n new Set(instructions.map((instruction) => instruction.chainId)),\n );\n\n const addresses = await Promise.all(\n chainIds.map(async (chainId) => {\n const response = await this.apiClient.config.getDelegateAddress({\n chainId,\n });\n const address = hexStringSchema.parse(\n response.data.otimDelegateAddress,\n );\n return [chainId, address] as const;\n }),\n );\n\n return new Map(addresses);\n }\n\n async getDetails(\n request: PaymentRequestDetailsRequest,\n ): Promise<ServiceResponse<PaymentRequestDetailsResponse>> {\n return this.apiClient.payments.getPaymentRequestDetails(request);\n }\n\n async listOutgoingPaymentRequests(\n request: PaymentsListRequest,\n ): Promise<PaginatedServiceResponse<Payments>> {\n return this.apiClient.payments.getOutgoingPaymentsList(request);\n }\n\n async listIncomingPaymentRequests(\n request: PaymentsListRequest,\n ): Promise<PaginatedServiceResponse<Payments>> {\n return this.apiClient.payments.getIncomingPaymentsList(request);\n }\n\n async list(\n request: GetPaymentRequestsRequest,\n ): Promise<PaginatedServiceResponse<GetPaymentRequestsResponse>> {\n return this.apiClient.payments.getPaymentRequests(request);\n }\n}\n","import type { OtimAccount } from \"@otim/sdk-core/account\";\nimport type { OtimClientContext } from \"@otim/sdk-core/context\";\nimport type { APIClient } from \"@otim/utils/api\";\n\nimport { PaymentRequestsClient } from \"./payment-requests\";\n\nexport class OrchestrationClient {\n public readonly paymentRequests: PaymentRequestsClient;\n\n constructor(\n private readonly apiClient: APIClient,\n private readonly account: OtimAccount,\n private readonly context: OtimClientContext,\n ) {\n this.paymentRequests = new PaymentRequestsClient(\n apiClient,\n account,\n context,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;AAMA,IAAa,iBAAb,MAA4B;CAC1B,YAAY,AAAiBA,WAAsB;EAAtB;;CAE7B,MAAM,uBACJ,SACyC;AAIzC,UAFE,MAAM,KAAK,UAAU,SAAS,uBAAuB,QAAQ,EAE/C;;;;;;ACDpB,IAAa,aAAb,MAAwB;CACtB,YACE,AAAiBC,WACjB,AAAiBC,SACjB,AAAiBC,SACjB;EAHiB;EACA;EACA;;CAGnB,MAAM,MAAM,EAAE,WAAqD;AACjE,kDAAmB,KAAK,QAAQ;EAEhC,MAAM,6DAAiC,SAAS,KAAK,KAAK,CAAC,UAAU,CAAC;EAEtE,MAAM,mEADY,MAAM,KAAK,QAAQ,YAAY,EAAE,SAAS,CAAC,CACJ;AAOzD,UALiB,MAAM,KAAK,UAAU,KAAK,MAAM;GAC/C,MAAM;GACN,WAAW;GACZ,CAAC,EAEc;;CAGlB,MAAM,iBAAsC;AAE1C,UADiB,MAAM,KAAK,UAAU,KAAK,IAAI,EAC/B;;;;;;AChCpB,IAAa,eAAb,MAA0B;CACxB,YAAY,AAAiBC,WAAsB;EAAtB;;CAE7B,MAAM,0BAA0B,EAC9B,WAC2F;AAI3F,UAFE,MAAM,KAAK,UAAU,OAAO,gCAAgC,EAAE,SAAS,CAAC,EAE1D;;;;;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iBC,SACjB;EAHiB;EACA;EACA;wBALH;AAOd,OAAK,kBAAkB,IAAI,sBACzB,WACA,SACA,QACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"clients-DnPvBXkX.mjs","names":["apiClient: APIClient","apiClient: APIClient","account: OtimAccount","context: OtimClientContext","apiClient: APIClient","apiClient: APIClient","apiClient: APIClient","account: OtimAccount","context: OtimClientContext","apiClient: APIClient","account: OtimAccount","context: OtimClientContext"],"sources":["../src/clients/activity.ts","../src/clients/auth.ts","../src/clients/config.ts","../src/clients/delegation.ts","../src/clients/helpers/payment-signer.ts","../src/clients/payment-requests.ts","../src/clients/orchestration.ts"],"sourcesContent":["import type {\n APIClient,\n GetInstructionActivityRequest,\n GetInstructionActivityResponse,\n} from \"@otim/utils/api\";\n\nexport class ActivityClient {\n constructor(private readonly apiClient: APIClient) {}\n\n async getInstructionActivity(\n request: GetInstructionActivityRequest,\n ): Promise<GetInstructionActivityResponse> {\n const response =\n await this.apiClient.activity.getInstructionActivity(request);\n\n return response.data;\n }\n}\n","import type { OtimAccount } from \"@otim/sdk-core/account\";\nimport type { OtimClientContext } from \"@otim/sdk-core/context\";\nimport type { APIClient, AuthLoginResponse, MeResponse } from \"@otim/utils/api\";\nimport type { Address } from \"viem\";\n\nimport { parseSignatureToVRS } from \"@otim/utils/helpers\";\n\nimport { createLoginSiweMessage } from \"@otim/sdk-core/config\";\nimport { assertRequiresAuth } from \"@otim/sdk-core/context\";\n\nexport interface LoginOptions {\n address: Address;\n}\n\nexport class AuthClient {\n constructor(\n private readonly apiClient: APIClient,\n private readonly account: OtimAccount,\n private readonly context: OtimClientContext,\n ) {}\n\n async login({ address }: LoginOptions): Promise<AuthLoginResponse> {\n assertRequiresAuth(this.context);\n\n const message = createLoginSiweMessage(address, Date.now().toString());\n const signature = await this.account.signMessage({ message });\n const vrsParsedSignature = parseSignatureToVRS(signature);\n\n const response = await this.apiClient.auth.login({\n siwe: message,\n signature: vrsParsedSignature,\n });\n\n return response.data;\n }\n\n async getCurrentUser(): Promise<MeResponse> {\n const response = await this.apiClient.auth.me();\n return response.data;\n }\n}\n","import type {\n APIClient,\n GetMaxPriorityFeePerGasEstimateRequest,\n GetMaxPriorityFeePerGasEstimateResponse,\n} from \"@otim/utils/api\";\n\nexport class ConfigClient {\n constructor(private readonly apiClient: APIClient) {}\n\n async getMaxPriorityFeeEstimate({\n chainId,\n }: GetMaxPriorityFeePerGasEstimateRequest): Promise<GetMaxPriorityFeePerGasEstimateResponse> {\n const response =\n await this.apiClient.config.getMaxPriorityFeePerGasEstimate({ chainId });\n\n return response.data;\n }\n}\n","import type {\n APIClient,\n DelegationCreateRequest,\n DelegationStatusRequest,\n DelegationStatusResponse,\n GetDelegateAddressRequest,\n GetDelegateAddressResponse,\n} from \"@otim/utils/api\";\n\nexport class DelegationClient {\n constructor(private readonly apiClient: APIClient) {}\n\n async getDelegateAddress({\n chainId,\n }: GetDelegateAddressRequest): Promise<GetDelegateAddressResponse> {\n const response = await this.apiClient.config.getDelegateAddress({\n chainId,\n });\n\n return response.data;\n }\n\n async getDelegationStatus(\n options: DelegationStatusRequest,\n ): Promise<DelegationStatusResponse> {\n const response = await this.apiClient.account.getDelegationStatus({\n address: options.address,\n chainId: options.chainId,\n });\n\n return response.data;\n }\n\n async createDelegation(\n delegationRequest: DelegationCreateRequest,\n ): Promise<void> {\n await this.apiClient.account.createDelegation(delegationRequest);\n }\n}\n","import type { OtimServerClientContext } from \"@otim/sdk-core/context\";\nimport type { PaymentResponseWithActionNames } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\nimport type { PublicClient } from \"viem\";\n\nimport {\n ApiKeyClientSigningService,\n ServerWalletSigningService,\n UnifiedPaymentSigner,\n} from \"@otim/turnkey/signing\";\nimport { createWalletClient, http } from \"viem\";\nimport { privateKeyToAccount } from \"viem/accounts\";\n\nimport { isApiAccountConfig } from \"@otim/sdk-core/account\";\n\nexport interface CreatePaymentSignerParams {\n context: OtimServerClientContext;\n buildResponse: PaymentResponseWithActionNames;\n publicClient: PublicClient;\n delegateAddressMap: Map<number, Address>;\n}\n\ntype CreatePaymentSignerResult = Awaited<\n ReturnType<UnifiedPaymentSigner[\"signAll\"]>\n>;\n\nexport async function createPaymentSigner(\n params: CreatePaymentSignerParams,\n): Promise<CreatePaymentSignerResult> {\n const { context, buildResponse, publicClient, delegateAddressMap } = params;\n\n if (isApiAccountConfig(context.config)) {\n const signingService = new ApiKeyClientSigningService(\n context.config.publicKey,\n context.config.privateKey,\n );\n\n const signer = new UnifiedPaymentSigner({\n buildResponse,\n signingService,\n publicClient,\n delegateAddressMap,\n });\n\n return signer.signAll();\n }\n\n const account = privateKeyToAccount(context.config.privateKey);\n const walletClient = createWalletClient({\n account,\n transport: http(),\n });\n\n const signingService =\n ServerWalletSigningService.fromViemWallet(walletClient);\n\n const signer = new UnifiedPaymentSigner({\n buildResponse,\n signingService,\n publicClient,\n delegateAddressMap,\n });\n\n return signer.signAll();\n}\n","import type { OtimAccount } from \"@otim/sdk-core/account\";\nimport type { OtimClientContext } from \"@otim/sdk-core/context\";\nimport type {\n APIClient,\n GetPaymentRequestsRequest,\n GetPaymentRequestsResponse,\n PaginatedServiceResponse,\n PaymentRequestBuildRequest,\n PaymentRequestDetailsRequest,\n PaymentRequestDetailsResponse,\n PaymentsListRequest,\n ServiceResponse,\n} from \"@otim/utils/api\";\nimport type { SupportedChainId } from \"@otim/utils/chains\";\nimport type { Nullable } from \"@otim/utils/helpers\";\nimport type { PaymentResponseWithActionNames } from \"@otim/utils/payments\";\nimport type { PaymentRequestMetadata } from \"@otim/utils/payments\";\nimport type { Address, Payments } from \"@otim/utils/schemas\";\nimport type { PublicClient } from \"viem\";\n\nimport {\n getChainById,\n getChainTokens,\n getTokenAddress,\n getTokenMetadata,\n supportedChains,\n} from \"@otim/utils/chains\";\nimport { validateIso8601Date } from \"@otim/utils/helpers\";\nimport {\n addActionNamesToInstructions,\n buildPaymentMetadata,\n createChainTokenConfigs,\n createComprehensivePaymentRequest,\n extractActionNamesMap,\n} from \"@otim/utils/payments\";\nimport { hexStringSchema } from \"@otim/utils/schemas\";\nimport { createPublicClient, http } from \"viem\";\n\nimport { assertServerContext } from \"@otim/sdk-core/context\";\n\nimport { createPaymentSigner } from \"./helpers/payment-signer\";\n\nexport interface CreatePaymentRequestParameters {\n amount: number;\n chainId: SupportedChainId;\n recipient: Address;\n token?: \"USDC\" | \"USDT\";\n payer?: Nullable<Address>;\n /**\n * ISO 8601 date format (e.g., \"2024-12-31T23:59:59.000Z\")\n */\n dueDate?: string;\n metadata?: PaymentRequestMetadata;\n note?: string;\n}\n\nexport interface CreatePaymentRequestResponse {\n requestId: string;\n ephemeralWalletAddress: Address;\n}\n\nexport interface ActivatePaymentRequestParams {\n buildResponse: PaymentResponseWithActionNames;\n settlementChainId: number;\n}\n\ntype PaymentInstruction =\n PaymentResponseWithActionNames[\"completionInstructions\"][number];\n\nexport class PaymentRequestsClient {\n constructor(\n private readonly apiClient: APIClient,\n private readonly account: OtimAccount,\n private readonly context: OtimClientContext,\n ) {}\n\n async create(\n params: CreatePaymentRequestParameters,\n ): Promise<CreatePaymentRequestResponse> {\n const {\n chainId,\n token = \"USDC\",\n recipient,\n amount,\n payer,\n note,\n dueDate,\n metadata: customMetadata,\n } = params;\n\n if (dueDate) {\n validateIso8601Date(dueDate);\n }\n\n const feeTokenAddress = this.validateAndGetTokenAddress(chainId, token);\n const metadata = this.buildMetadata({\n token,\n amount,\n recipient,\n note,\n dueDate,\n customMetadata,\n });\n const payload = this.createPayload({\n chainId,\n recipient,\n amount,\n payer,\n metadata,\n feeTokenAddress,\n });\n\n const buildResponse = await this.buildAndEnhancePaymentRequest(payload);\n\n await this.activate({ buildResponse, settlementChainId: chainId });\n\n return {\n requestId: buildResponse.requestId,\n ephemeralWalletAddress: buildResponse.ephemeralWalletAddress,\n };\n }\n\n async activate(params: ActivatePaymentRequestParams): Promise<void> {\n assertServerContext(this.context);\n\n const { buildResponse, settlementChainId } = params;\n const publicClient = this.createPublicClient(settlementChainId);\n\n const instructions = [\n ...buildResponse.completionInstructions,\n ...buildResponse.instructions,\n ];\n\n const delegateAddressMap = await this.fetchDelegateAddresses(instructions);\n\n const {\n signedAuthorization,\n completionInstructions,\n instructions: signedInstructions,\n } = await createPaymentSigner({\n context: this.context,\n buildResponse,\n publicClient,\n delegateAddressMap,\n });\n\n await this.apiClient.payments.newPaymentRequest({\n requestId: buildResponse.requestId,\n signedAuthorization,\n completionInstructions,\n instructions: signedInstructions,\n });\n }\n\n private validateAndGetTokenAddress(chainId: number, token: string): Address {\n const tokenAddress = getTokenAddress(chainId, token);\n if (!tokenAddress) {\n throw new Error(`Token ${token} not supported on chain ${chainId}`);\n }\n\n const tokenMetadata = getTokenMetadata(token);\n if (!tokenMetadata) {\n throw new Error(`Token ${token} metadata not found`);\n }\n\n return hexStringSchema.parse(tokenAddress);\n }\n\n private buildMetadata(params: {\n token: string;\n amount: number;\n recipient: Address;\n note?: string;\n dueDate?: string;\n customMetadata?: PaymentRequestMetadata;\n }): PaymentRequestMetadata {\n const { token, amount, recipient, note, dueDate, customMetadata } = params;\n\n const baseMetadata = buildPaymentMetadata({\n tokenSymbol: token,\n amountInUSD: amount,\n fromAccountAddress: recipient,\n note,\n dueDate,\n hasInvoiceMetadata: false,\n });\n\n return customMetadata\n ? { ...baseMetadata, ...customMetadata }\n : baseMetadata;\n }\n\n private createPayload(params: {\n chainId: number;\n recipient: Address;\n amount: number;\n payer?: Address | null;\n metadata: PaymentRequestMetadata;\n feeTokenAddress: Address;\n }): PaymentRequestBuildRequest {\n const { chainId, recipient, amount, payer, metadata, feeTokenAddress } =\n params;\n\n const tokens = Object.values(supportedChains.mainnet).flatMap((chain) =>\n getChainTokens(chain.id),\n );\n\n const chainTokenConfigs = createChainTokenConfigs(tokens);\n\n return createComprehensivePaymentRequest({\n settlementChainId: chainId,\n recipient,\n amount: amount.toString(),\n ephemeralWalletAddress: recipient,\n chainTokenConfigs,\n payerAddress: payer ?? null,\n metadata,\n feeToken: feeTokenAddress,\n });\n }\n\n private async buildAndEnhancePaymentRequest(\n payload: PaymentRequestBuildRequest,\n ): Promise<PaymentResponseWithActionNames> {\n const actionNames = extractActionNamesMap(\n payload.completionInstructions,\n payload.instructions,\n );\n\n const response = await this.apiClient.payments.buildPaymentRequest(payload);\n\n return addActionNamesToInstructions(response.data, actionNames);\n }\n\n private createPublicClient(chainId: number): PublicClient {\n const chain = getChainById(chainId);\n if (!chain) {\n throw new Error(`Chain with id ${chainId} not found`);\n }\n\n return createPublicClient({ chain, transport: http() });\n }\n\n private async fetchDelegateAddresses(\n instructions: PaymentInstruction[],\n ): Promise<Map<number, Address>> {\n const chainIds = Array.from(\n new Set(instructions.map((instruction) => instruction.chainId)),\n );\n\n const addresses = await Promise.all(\n chainIds.map(async (chainId) => {\n const response = await this.apiClient.config.getDelegateAddress({\n chainId,\n });\n const address = hexStringSchema.parse(\n response.data.otimDelegateAddress,\n );\n return [chainId, address] as const;\n }),\n );\n\n return new Map(addresses);\n }\n\n async getDetails(\n request: PaymentRequestDetailsRequest,\n ): Promise<ServiceResponse<PaymentRequestDetailsResponse>> {\n return this.apiClient.payments.getPaymentRequestDetails(request);\n }\n\n async listOutgoingPaymentRequests(\n request: PaymentsListRequest,\n ): Promise<PaginatedServiceResponse<Payments>> {\n return this.apiClient.payments.getOutgoingPaymentsList(request);\n }\n\n async listIncomingPaymentRequests(\n request: PaymentsListRequest,\n ): Promise<PaginatedServiceResponse<Payments>> {\n return this.apiClient.payments.getIncomingPaymentsList(request);\n }\n\n async list(\n request: GetPaymentRequestsRequest,\n ): Promise<PaginatedServiceResponse<GetPaymentRequestsResponse>> {\n return this.apiClient.payments.getPaymentRequests(request);\n }\n}\n","import type { OtimAccount } from \"@otim/sdk-core/account\";\nimport type { OtimClientContext } from \"@otim/sdk-core/context\";\nimport type { APIClient } from \"@otim/utils/api\";\n\nimport { PaymentRequestsClient } from \"./payment-requests\";\n\nexport class OrchestrationClient {\n public readonly paymentRequests: PaymentRequestsClient;\n\n constructor(\n private readonly apiClient: APIClient,\n private readonly account: OtimAccount,\n private readonly context: OtimClientContext,\n ) {\n this.paymentRequests = new PaymentRequestsClient(\n apiClient,\n account,\n context,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;AAMA,IAAa,iBAAb,MAA4B;CAC1B,YAAY,AAAiBA,WAAsB;EAAtB;;CAE7B,MAAM,uBACJ,SACyC;AAIzC,UAFE,MAAM,KAAK,UAAU,SAAS,uBAAuB,QAAQ,EAE/C;;;;;;ACDpB,IAAa,aAAb,MAAwB;CACtB,YACE,AAAiBC,WACjB,AAAiBC,SACjB,AAAiBC,SACjB;EAHiB;EACA;EACA;;CAGnB,MAAM,MAAM,EAAE,WAAqD;AACjE,qBAAmB,KAAK,QAAQ;EAEhC,MAAM,UAAU,uBAAuB,SAAS,KAAK,KAAK,CAAC,UAAU,CAAC;EAEtE,MAAM,qBAAqB,oBADT,MAAM,KAAK,QAAQ,YAAY,EAAE,SAAS,CAAC,CACJ;AAOzD,UALiB,MAAM,KAAK,UAAU,KAAK,MAAM;GAC/C,MAAM;GACN,WAAW;GACZ,CAAC,EAEc;;CAGlB,MAAM,iBAAsC;AAE1C,UADiB,MAAM,KAAK,UAAU,KAAK,IAAI,EAC/B;;;;;;AChCpB,IAAa,eAAb,MAA0B;CACxB,YAAY,AAAiBC,WAAsB;EAAtB;;CAE7B,MAAM,0BAA0B,EAC9B,WAC2F;AAI3F,UAFE,MAAM,KAAK,UAAU,OAAO,gCAAgC,EAAE,SAAS,CAAC,EAE1D;;;;;;ACNpB,IAAa,mBAAb,MAA8B;CAC5B,YAAY,AAAiBC,WAAsB;EAAtB;;CAE7B,MAAM,mBAAmB,EACvB,WACiE;AAKjE,UAJiB,MAAM,KAAK,UAAU,OAAO,mBAAmB,EAC9D,SACD,CAAC,EAEc;;CAGlB,MAAM,oBACJ,SACmC;AAMnC,UALiB,MAAM,KAAK,UAAU,QAAQ,oBAAoB;GAChE,SAAS,QAAQ;GACjB,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mBAAA,SACN,sBACP"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-BH1YuouL.d.cts","names":[],"sources":["../src/clients/activity.ts","../src/clients/auth.ts","../src/clients/config.ts","../src/clients/delegation.ts","../src/clients/payment-requests.ts","../src/clients/orchestration.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAMa,cAAA;;yBAC6B;kCAG7B,gCACR,QAAQ;;;;UCDI,YAAA;WACN;;cAGE,UAAA;;;EDRA,iBAAc,OAAA;EACe,WAAA,CAAA,SAAA,ECSV,SDTU,EAAA,OAAA,ECUZ,WDVY,EAAA,OAAA,ECWZ,iBDXY;EAG7B,KAAA,CAAA;IAAA;EAAA,CAAA,ECWc,YDXd,CAAA,ECW6B,ODX7B,CCWqC,iBDXrC,CAAA;EACA,cAAA,CAAA,CAAA,ECyBa,ODzBb,CCyBqB,UDzBrB,CAAA;;;;cELA,YAAA;;yBAC6B;;;KAIrC,yCAAyC,QAAQ;;;;cCFzC,gBAAA;;yBAC6B;;;KAIrC,4BAA4B,QAAQ;+BAS5B,0BACR,QAAQ;sCAUU,0BAClB;;;;UCOY,8BAAA;;EJpCJ,OAAA,EIsCF,gBJtCgB;EACe,SAAA,EIsC7B,OJtC6B;EAG7B,KAAA,CAAA,EAAA,MAAA,GAAA,MAAA;EACA,KAAA,CAAA,EIoCH,QJpCG,CIoCM,OJpCN,CAAA;EAAR;;;;aIyCQ;EH1CI,IAAA,CAAA,EAAA,MAAA;AAIjB;AAEgC,UGwCf,4BAAA,CHxCe;EACF,SAAA,EAAA,MAAA;EACA,sBAAA,EGwCJ,OHxCI;;AAGH,UGwCV,4BAAA,CHxCU;EAAuB,aAAA,EGyCjC,8BHzCiC;EAAR,iBAAA,EAAA,MAAA;;AAehB,cGiCb,qBAAA,CHjCa;EAAO,iBAAA,SAAA;;;yBGmCD,oBACF,sBACA;EFnEjB,MAAA,CAAA,MAAA,EEuED,8BFvEa,CAAA,EEwEpB,OFxEoB,CEwEZ,4BFxEY,CAAA;EACiB,QAAA,CAAA,MAAA,EEmHjB,4BFnHiB,CAAA,EEmHc,OFnHd,CAAA,IAAA,CAAA;EAGtC,QAAA,0BAAA;EACC,QAAA,aAAA;EAAiD,QAAA,aAAA;EAAR,QAAA,6BAAA;EAAO,QAAA,kBAAA;;sBE+PxC,+BACR,QAAQ,gBAAgB;uCAKhB,sBACR,QAAQ,yBAAyB;EDxQzB,2BAAgB,CAAA,OAAA,EC6QhB,mBD7QgB,CAAA,EC8QxB,OD9QwB,CC8QhB,wBD9QgB,CC8QS,QD9QT,CAAA,CAAA;EACa,IAAA,CAAA,OAAA,ECkR7B,yBDlR6B,CAAA,ECmRrC,ODnRqC,CCmR7B,wBDnR6B,CCmRJ,0BDnRI,CAAA,CAAA;;;;cEJ7B,mBAAA;;;;4BACsB;yBAGH,oBACF,sBACA;ALN9B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-BnP8vpJJ.d.cts","names":["Address","Hex","Signature","ExactPartial","OneOf","Authorization","uint32","signed","AuthorizationList","AuthorizationRequest","SignedAuthorization","SignedAuthorizationList","SerializedAuthorization","SerializedAuthorizationList"],"sources":["../../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.1.12/node_modules/viem/_types/types/authorization.d.ts","../src/utils/rlp.ts","../src/utils/vrs.ts"],"sourcesContent":["import type { Address } from 'abitype';\nimport type { Hex, Signature } from './misc.js';\nimport type { ExactPartial, OneOf } from './utils.js';\nexport type Authorization<uint32 = number, signed extends boolean = false> = {\n /** Address of the contract to delegate to. */\n address: Address;\n /** Chain ID. */\n chainId: uint32;\n /** Nonce of the EOA to delegate to. */\n nonce: uint32;\n} & (signed extends true ? Signature<uint32> : ExactPartial<Signature<uint32>>);\nexport type AuthorizationList<uint32 = number, signed extends boolean = false> = readonly Authorization<uint32, signed>[];\nexport type AuthorizationRequest<uint32 = number> = OneOf<{\n /** Address of the contract to delegate to. */\n address: Address;\n} | {\n /**\n * Address of the contract to delegate to.\n * @alias `address`\n */\n contractAddress: Address;\n}> & {\n /** Chain ID. */\n chainId: uint32;\n /** Nonce of the EOA to delegate to. */\n nonce: uint32;\n};\nexport type SignedAuthorization<uint32 = number> = Authorization<uint32, true>;\nexport type SignedAuthorizationList<uint32 = number> = readonly SignedAuthorization<uint32>[];\nexport type SerializedAuthorization = readonly [\n chainId: Hex,\n address: Hex,\n nonce: Hex,\n yParity: Hex,\n r: Hex,\n s: Hex\n];\nexport type SerializedAuthorizationList = readonly SerializedAuthorization[];\n//# sourceMappingURL=authorization.d.ts.map"],"x_google_ignoreList":[0],"mappings":";;;;;KAGYK;;EAAAA,OAAAA,EAECL,SAFY;EAEZA;EAEAM,OAAAA,EAAAA,MAAAA;EAEFA;EACNC,KAAAA,EADMD,MACNC;CAAgCD,GAAAA,CAAhCC,MAAgCD,SAAAA,IAAAA,GAAVJ,SAAUI,CAAAA,MAAAA,CAAAA,GAAUH,YAAVG,CAAuBJ,SAAvBI,CAAiCA,MAAjCA,CAAAA,CAAAA,CAAAA;;;cCaxB;iBAkCG,6BAAA,gBACC;iBAED,6BAAA;;;cCrBH,8BAA+B,QAAM;cAkBrC,4CAA2C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-C1HSAemv.d.cts","names":[],"sources":["../src/context/types.ts","../src/context/asserts.ts","../src/context/helpers.ts"],"sourcesContent":[],"mappings":";;;UAKiB,uBAAA;;EAAA,SAAA,MAAA,EAEE,mBAFqB;EAMvB,SAAA,WAAA,EAHO,iBAGe;AAEvC;UAFiB,sBAAA;KAEL,iBAAA,GACR,0BACA;;;iBCPY,kBAAA,UAA4B;iBAQ5B,mBAAA,UACL,uCACW;;;cChBT,2BACF,iCACG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-CcCMIBgF.d.mts","names":[],"sources":["../src/context/types.ts","../src/context/asserts.ts","../src/context/helpers.ts"],"sourcesContent":[],"mappings":";;;UAKiB,uBAAA;;EAAA,SAAA,MAAA,EAEE,mBAFqB;EAMvB,SAAA,WAAA,EAHO,iBAGe;AAEvC;UAFiB,sBAAA;KAEL,iBAAA,GACR,0BACA;;;iBCPY,kBAAA,UAA4B;iBAQ5B,mBAAA,UACL,uCACW;;;cChBT,2BACF,iCACG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-DK-40z4V.d.cts","names":[],"sources":["../src/account/types.ts","../src/account/helpers.ts"],"sourcesContent":[],"mappings":";;;;;cAGa;;;AAAb,CAAA;AAIY,KAAA,iBAAA,GAAiB,CAAA,OACnB,iBAAgC,CAAA,CAAA,MAAA,OAAA,iBAAiB,CAAA;AAE9C,cAAA,WAEH,EAAA;EACE,SAAA,UAAW,EAAA,YAAW;EAMtB,SAAA,GAAA,EAAA,KAAA;AAIZ,CAAA;AACgB,KAXJ,WAAA,GAWI,CAAA,OAXkB,WAWlB,CAAA,CAAA,MAAA,OAX4C,WAW5C,CAAA;;;;AACwC,KAN5C,0BAAA,GAM4C;EAO9C,OAAA,EAAA,MAAA,GAAA;IAIO,GAAA,EAhBU,GAgBV,GAhBgB,UAgBC;EAQjB,CAAA;AAKjB,CAAA;AAEY,UA5BK,WAAA,CA4BQ;gBA3BT;oBACI,6BAA6B,QAAQ;;AChBzD;AAMA;AAMA;UDWU,iBAAA;gBACM;;UAGC,gBAAA,SAAyB;eAC3B,iBAAA,CAAkB;;;;;;UAOhB,uBAAA,SAAgC;eAClC,iBAAA,CAAkB;;;KAIrB,mBAAA,GAAsB,mBAAmB;KAEzC,aAAA,GAAgB;;;iBC1CZ,kBAAA,SACN,gCACG;iBAIG,yBAAA,SACN,gCACG;iBAIG,mBAAA,SACN,sBACP"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-DW_zBRKz.d.mts","names":["Address","Hex","Signature","ExactPartial","OneOf","Authorization","uint32","signed","AuthorizationList","AuthorizationRequest","SignedAuthorization","SignedAuthorizationList","SerializedAuthorization","SerializedAuthorizationList"],"sources":["../../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.1.12/node_modules/viem/_types/types/authorization.d.ts","../src/utils/rlp.ts","../src/utils/vrs.ts"],"sourcesContent":["import type { Address } from 'abitype';\nimport type { Hex, Signature } from './misc.js';\nimport type { ExactPartial, OneOf } from './utils.js';\nexport type Authorization<uint32 = number, signed extends boolean = false> = {\n /** Address of the contract to delegate to. */\n address: Address;\n /** Chain ID. */\n chainId: uint32;\n /** Nonce of the EOA to delegate to. */\n nonce: uint32;\n} & (signed extends true ? Signature<uint32> : ExactPartial<Signature<uint32>>);\nexport type AuthorizationList<uint32 = number, signed extends boolean = false> = readonly Authorization<uint32, signed>[];\nexport type AuthorizationRequest<uint32 = number> = OneOf<{\n /** Address of the contract to delegate to. */\n address: Address;\n} | {\n /**\n * Address of the contract to delegate to.\n * @alias `address`\n */\n contractAddress: Address;\n}> & {\n /** Chain ID. */\n chainId: uint32;\n /** Nonce of the EOA to delegate to. */\n nonce: uint32;\n};\nexport type SignedAuthorization<uint32 = number> = Authorization<uint32, true>;\nexport type SignedAuthorizationList<uint32 = number> = readonly SignedAuthorization<uint32>[];\nexport type SerializedAuthorization = readonly [\n chainId: Hex,\n address: Hex,\n nonce: Hex,\n yParity: Hex,\n r: Hex,\n s: Hex\n];\nexport type SerializedAuthorizationList = readonly SerializedAuthorization[];\n//# sourceMappingURL=authorization.d.ts.map"],"x_google_ignoreList":[0],"mappings":";;;;;KAGYK;;EAAAA,OAAAA,EAECL,SAFY;EAEZA;EAEAM,OAAAA,EAAAA,MAAAA;EAEFA;EACNC,KAAAA,EADMD,MACNC;CAAgCD,GAAAA,CAAhCC,MAAgCD,SAAAA,IAAAA,GAAVJ,SAAUI,CAAAA,MAAAA,CAAAA,GAAUH,YAAVG,CAAuBJ,SAAvBI,CAAiCA,MAAjCA,CAAAA,CAAAA,CAAAA;;;cCaxB;iBAkCG,6BAAA,gBACC;iBAED,6BAAA;;;cCrBH,8BAA+B,QAAM;cAkBrC,4CAA2C"}