@evergonlabs/tmi-protocol-api 0.1.5 → 0.2.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.
Files changed (68) hide show
  1. package/dist/app.d.ts +56 -0
  2. package/dist/app.d.ts.map +1 -1
  3. package/dist/app.js +2 -0
  4. package/dist/client.d.ts +68 -0
  5. package/dist/client.d.ts.map +1 -1
  6. package/dist/fractions/deployMarket/v0/index.d.ts +3 -0
  7. package/dist/fractions/deployMarket/v0/index.d.ts.map +1 -0
  8. package/dist/fractions/deployMarket/v0/index.js +2 -0
  9. package/dist/fractions/sales/searchActivity.route.js +2 -2
  10. package/dist/fractions/sales/searchSaleEvents/v0/searchSaleEvents.js +6 -6
  11. package/dist/issuance/deploy.d.ts +63 -0
  12. package/dist/issuance/deploy.d.ts.map +1 -1
  13. package/dist/issuance/deploy.js +78 -0
  14. package/dist/issuance/index.d.ts +56 -0
  15. package/dist/issuance/index.d.ts.map +1 -1
  16. package/dist/issuance/index.js +6 -2
  17. package/dist/issuance/upgrade.d.ts +82 -0
  18. package/dist/issuance/upgrade.d.ts.map +1 -0
  19. package/dist/issuance/upgrade.js +45 -0
  20. package/dist/lending/buyBackAfterLiquidation/v0/buyBackAfterLiquidation.routes.d.ts +57 -0
  21. package/dist/lending/buyBackAfterLiquidation/v0/buyBackAfterLiquidation.routes.d.ts.map +1 -0
  22. package/dist/lending/buyBackAfterLiquidation/v0/buyBackAfterLiquidation.routes.js +33 -0
  23. package/dist/lending/buyBackAfterLiquidation/v0/buyBackAfterLiquidation.schema.d.ts +12 -0
  24. package/dist/lending/buyBackAfterLiquidation/v0/buyBackAfterLiquidation.schema.d.ts.map +1 -0
  25. package/dist/lending/buyBackAfterLiquidation/v0/buyBackAfterLiquidation.schema.js +10 -0
  26. package/dist/lending/buyback/v0/buyback.routes.d.ts +61 -0
  27. package/dist/lending/buyback/v0/buyback.routes.d.ts.map +1 -0
  28. package/dist/lending/buyback/v0/buyback.routes.js +33 -0
  29. package/dist/lending/buyback/v0/buyback.schema.d.ts +15 -0
  30. package/dist/lending/buyback/v0/buyback.schema.d.ts.map +1 -0
  31. package/dist/lending/buyback/v0/buyback.schema.js +13 -0
  32. package/dist/lending/createLendingSale.d.ts +585 -0
  33. package/dist/lending/createLendingSale.d.ts.map +1 -0
  34. package/dist/lending/createLendingSale.js +81 -0
  35. package/dist/lending/deployMarket/v0/deployMarket.routes.d.ts +117 -0
  36. package/dist/lending/deployMarket/v0/deployMarket.routes.d.ts.map +1 -0
  37. package/dist/lending/deployMarket/v0/deployMarket.routes.js +34 -0
  38. package/dist/lending/deployMarket/v0/deployMarket.schema.d.ts +105 -0
  39. package/dist/lending/deployMarket/v0/deployMarket.schema.d.ts.map +1 -0
  40. package/dist/lending/deployMarket/v0/deployMarket.schema.js +12 -0
  41. package/dist/lending/deployMarket/v0/lending.routes.d.ts +105 -0
  42. package/dist/lending/deployMarket/v0/lending.routes.d.ts.map +1 -0
  43. package/dist/lending/deployMarket/v0/lending.routes.js +35 -0
  44. package/dist/lending/deployMarket/v0/lending.schema.d.ts +99 -0
  45. package/dist/lending/deployMarket/v0/lending.schema.d.ts.map +1 -0
  46. package/dist/lending/deployMarket/v0/lending.schema.js +14 -0
  47. package/dist/lending/forcefullyUnlockWrappersNft/v0/forcefullyUnlockWrappersNft.routes.d.ts +57 -0
  48. package/dist/lending/forcefullyUnlockWrappersNft/v0/forcefullyUnlockWrappersNft.routes.d.ts.map +1 -0
  49. package/dist/lending/forcefullyUnlockWrappersNft/v0/forcefullyUnlockWrappersNft.routes.js +33 -0
  50. package/dist/lending/forcefullyUnlockWrappersNft/v0/forcefullyUnlockWrappersNft.schema.d.ts +12 -0
  51. package/dist/lending/forcefullyUnlockWrappersNft/v0/forcefullyUnlockWrappersNft.schema.d.ts.map +1 -0
  52. package/dist/lending/forcefullyUnlockWrappersNft/v0/forcefullyUnlockWrappersNft.schema.js +10 -0
  53. package/dist/lending/index.d.ts +226 -0
  54. package/dist/lending/index.d.ts.map +1 -0
  55. package/dist/lending/index.js +24 -0
  56. package/dist/lending/setCollateralPrice/v0/setCollateralPrice.routes.d.ts +61 -0
  57. package/dist/lending/setCollateralPrice/v0/setCollateralPrice.routes.d.ts.map +1 -0
  58. package/dist/lending/setCollateralPrice/v0/setCollateralPrice.routes.js +33 -0
  59. package/dist/lending/setCollateralPrice/v0/setCollateralPrice.schema.d.ts +15 -0
  60. package/dist/lending/setCollateralPrice/v0/setCollateralPrice.schema.d.ts.map +1 -0
  61. package/dist/lending/setCollateralPrice/v0/setCollateralPrice.schema.js +13 -0
  62. package/package.json +5 -5
  63. package/dist/fractions/sales/searchClaim.route.d.ts +0 -62
  64. package/dist/fractions/sales/searchClaim.route.d.ts.map +0 -1
  65. package/dist/fractions/sales/searchClaim.route.js +0 -47
  66. package/dist/fractions/sales/searchPurchase.route.d.ts +0 -120
  67. package/dist/fractions/sales/searchPurchase.route.d.ts.map +0 -1
  68. package/dist/fractions/sales/searchPurchase.route.js +0 -70
package/dist/app.d.ts CHANGED
@@ -2498,6 +2498,62 @@ export declare function getApp(factory: Factory): import("hono/hono-base").HonoB
2498
2498
  status: import("hono/utils/http-status").ContentfulStatusCode;
2499
2499
  };
2500
2500
  };
2501
+ } & {
2502
+ "/proxy/deployTransparentProxy": {
2503
+ $post: {
2504
+ input: {
2505
+ json: {
2506
+ implementation: `0x${string}`;
2507
+ proxyAdmin: `0x${string}`;
2508
+ data?: `0x${string}` | undefined;
2509
+ };
2510
+ };
2511
+ output: {
2512
+ abi: any[];
2513
+ args: any[];
2514
+ bytecode: `0x${string}`;
2515
+ };
2516
+ outputFormat: "json";
2517
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2518
+ };
2519
+ };
2520
+ } & {
2521
+ "/proxy/deployProxyAdmin": {
2522
+ $get: {
2523
+ input: {};
2524
+ output: {
2525
+ abi: any[];
2526
+ bytecode: `0x${string}`;
2527
+ };
2528
+ outputFormat: "json";
2529
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2530
+ };
2531
+ };
2532
+ } & {
2533
+ "/proxy/upgradeTransparentProxy": {
2534
+ $post: {
2535
+ input: {
2536
+ json: {
2537
+ newImplementation: `0x${string}`;
2538
+ proxyAdminAddress: `0x${string}`;
2539
+ proxyAddress: `0x${string}`;
2540
+ data?: `0x${string}` | undefined;
2541
+ };
2542
+ };
2543
+ output: {
2544
+ data: `0x${string}`;
2545
+ to: `0x${string}`;
2546
+ details: {
2547
+ functionName: string;
2548
+ address: `0x${string}`;
2549
+ abi: any[];
2550
+ args: any[];
2551
+ };
2552
+ };
2553
+ outputFormat: "json";
2554
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2555
+ };
2556
+ };
2501
2557
  }, "/issuance">, "/">, "/">;
2502
2558
  export type IApp = ReturnType<typeof getApp>;
2503
2559
  export declare const appConfig: {
package/dist/app.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAUvC,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAWtC;AAED,MAAM,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AAE7C,eAAO,MAAM,SAAS;;;CAGpB,CAAC"}
package/dist/app.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { cors } from "hono/cors";
2
+ import { logger } from "hono/logger";
2
3
  import { stakingApi } from "./staking/index.js";
3
4
  import { stakingTemplatesApi } from "./staking-templates/index.js";
4
5
  import { createErrorHandler } from "./error.js";
@@ -10,6 +11,7 @@ export function getApp(factory) {
10
11
  return factory
11
12
  .createApp()
12
13
  .use("/*", cors())
14
+ .use("/*", logger())
13
15
  .route("/", stakingApi.createApp(factory))
14
16
  .route("/", stakingTemplatesApi.createApp(factory))
15
17
  .route("/", fractionsApi.createApp(factory))
package/dist/client.d.ts CHANGED
@@ -3046,6 +3046,74 @@ export declare function createClient(...args: Parameters<typeof hc>): {
3046
3046
  }>;
3047
3047
  };
3048
3048
  };
3049
+ } & {
3050
+ issuance: {
3051
+ proxy: {
3052
+ deployTransparentProxy: import("hono/client").ClientRequest<{
3053
+ $post: {
3054
+ input: {
3055
+ json: {
3056
+ implementation: `0x${string}`;
3057
+ proxyAdmin: `0x${string}`;
3058
+ data?: `0x${string}` | undefined;
3059
+ };
3060
+ };
3061
+ output: {
3062
+ abi: any[];
3063
+ args: any[];
3064
+ bytecode: `0x${string}`;
3065
+ };
3066
+ outputFormat: "json";
3067
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3068
+ };
3069
+ }>;
3070
+ };
3071
+ };
3072
+ } & {
3073
+ issuance: {
3074
+ proxy: {
3075
+ deployProxyAdmin: import("hono/client").ClientRequest<{
3076
+ $get: {
3077
+ input: {};
3078
+ output: {
3079
+ abi: any[];
3080
+ bytecode: `0x${string}`;
3081
+ };
3082
+ outputFormat: "json";
3083
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3084
+ };
3085
+ }>;
3086
+ };
3087
+ };
3088
+ } & {
3089
+ issuance: {
3090
+ proxy: {
3091
+ upgradeTransparentProxy: import("hono/client").ClientRequest<{
3092
+ $post: {
3093
+ input: {
3094
+ json: {
3095
+ newImplementation: `0x${string}`;
3096
+ proxyAdminAddress: `0x${string}`;
3097
+ proxyAddress: `0x${string}`;
3098
+ data?: `0x${string}` | undefined;
3099
+ };
3100
+ };
3101
+ output: {
3102
+ data: `0x${string}`;
3103
+ to: `0x${string}`;
3104
+ details: {
3105
+ functionName: string;
3106
+ address: `0x${string}`;
3107
+ abi: any[];
3108
+ args: any[];
3109
+ };
3110
+ };
3111
+ outputFormat: "json";
3112
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3113
+ };
3114
+ }>;
3115
+ };
3116
+ };
3049
3117
  };
3050
3118
  export type IApi = ReturnType<typeof createClient>;
3051
3119
  export type { InferRequestType, InferResponseType } from "hono/client";
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGjC,wBAAgB,YAAY,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1D;AAED,MAAM,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACnD,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACvE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./deployMarket.routes.js";
2
+ export * from "./initNid.route.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/fractions/deployMarket/v0/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./deployMarket.routes.js";
2
+ export * from "./initNid.route.js";
@@ -1,6 +1,6 @@
1
1
  import { describeRoute } from "hono-openapi";
2
2
  import { resolver, validator } from "hono-openapi/zod";
3
- import { and, desc, eq } from "@ponder/client";
3
+ import { and, eq } from "@ponder/client";
4
4
  import { z } from "../../common/zod.js";
5
5
  import { indexerClient } from "../../common/indexer/index.js";
6
6
  import { indexerSchemas } from "../../common/indexer/schemas.js";
@@ -50,7 +50,7 @@ export function createSearchActivityV0App(factory) {
50
50
  where: and(filter.chainId ? eq(fractionsSaleActivity.chainId, Number(filter.chainId)) : undefined, filter.platform ? eq(fractionsSaleActivity.diamondAddress, filter.platform) : undefined, typeof filter.campaignId === "bigint" ? eq(fractionsSaleActivity.saleId, filter.campaignId) : undefined),
51
51
  limit: page.limit,
52
52
  offset: page.skip,
53
- orderBy: desc(fractionsSaleActivity.createdAt),
53
+ orderBy: fractionsSaleActivity.createdAt,
54
54
  });
55
55
  return c.json(result.map((i) => FractionsSaleActivitySchema.parse({
56
56
  chainId: i.chainId,
@@ -59,23 +59,23 @@ export function createSearchSaleEventsV0App(factory) {
59
59
  const { page, filter } = c.req.valid("json");
60
60
  const result = await indexerClient.db
61
61
  .select()
62
- .from(indexerSchemas.fractions.fractionsSales)
62
+ .from(indexerSchemas.fractions.fractionEvents)
63
63
  .limit(page.limit)
64
64
  .offset(page.skip)
65
- .orderBy(indexerSchemas.fractions.fractionsSales.createdAt)
66
- .where(and(filter.chainId ? eq(indexerSchemas.fractions.fractionsSales.chainId, Number(filter.chainId)) : undefined, filter.owner ? eq(indexerSchemas.fractions.fractionsSales.creator, filter.owner) : undefined, filter.platform ? eq(indexerSchemas.fractions.fractionsSales.diamondAddress, filter.platform) : undefined, typeof filter.campaignId === "number"
67
- ? eq(indexerSchemas.fractions.fractionsSales.saleId, BigInt(filter.campaignId))
65
+ .orderBy(indexerSchemas.fractions.fractionEvents.createdAt)
66
+ .where(and(filter.chainId ? eq(indexerSchemas.fractions.fractionEvents.chainId, Number(filter.chainId)) : undefined, filter.owner ? eq(indexerSchemas.fractions.fractionEvents.walletAddress, filter.owner) : undefined, filter.platform ? eq(indexerSchemas.fractions.fractionEvents.diamondAddress, filter.platform) : undefined, typeof filter.campaignId === "number"
67
+ ? eq(indexerSchemas.fractions.fractionEvents.saleId, BigInt(filter.campaignId))
68
68
  : undefined));
69
69
  return c.json(result.map((x) => toSaleEvent(x)), 200);
70
70
  });
71
71
  }
72
72
  function toSaleEvent(raw) {
73
73
  return {
74
- id: "0",
74
+ id: raw.id,
75
75
  txHash: raw.txHash,
76
76
  chainId: TmiChainIdSchema.parse(raw.chainId),
77
77
  platform: raw.diamondAddress,
78
- owner: raw.creator,
78
+ owner: raw.walletAddress,
79
79
  campaignId: raw.saleId ? PoolIdSchema.parse(raw.saleId) : undefined,
80
80
  createdAt: unixToDate(raw.createdAt).toISOString(),
81
81
  };
@@ -85,4 +85,67 @@ export declare function createErc1967Proxy<E extends Env>(factory: Factory<E>):
85
85
  args: any[];
86
86
  bytecode: `0x${string}`;
87
87
  }, import("hono/utils/http-status").ContentfulStatusCode, "json">>>];
88
+ export declare const DeployTransparentProxySchema: z.ZodObject<{
89
+ implementation: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
90
+ proxyAdmin: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
91
+ data: z.ZodOptional<z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ implementation: `0x${string}`;
94
+ proxyAdmin: `0x${string}`;
95
+ data?: `0x${string}` | undefined;
96
+ }, {
97
+ implementation: `0x${string}`;
98
+ proxyAdmin: `0x${string}`;
99
+ data?: `0x${string}` | undefined;
100
+ }>;
101
+ export declare function createTransparentProxy<E extends Env>(factory: Factory<E>): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<{
102
+ abi: any[];
103
+ args: any[];
104
+ bytecode: `0x${string}`;
105
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">>>, import("hono/types").H<Env, string, {
106
+ in: {
107
+ json: {
108
+ implementation: `0x${string}`;
109
+ proxyAdmin: `0x${string}`;
110
+ data?: `0x${string}` | undefined;
111
+ };
112
+ };
113
+ out: {
114
+ json: {
115
+ implementation: `0x${string}`;
116
+ proxyAdmin: `0x${string}`;
117
+ data?: `0x${string}` | undefined;
118
+ };
119
+ };
120
+ }, Promise<Response & import("hono").TypedResponse<{
121
+ abi: any[];
122
+ args: any[];
123
+ bytecode: `0x${string}`;
124
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">>>, import("hono/types").H<import("hono/utils/types").IfAnyThenEmptyObject<E extends Env ? Env extends E ? {} : E : E> & {}, string, {
125
+ in: {
126
+ json: {
127
+ implementation: `0x${string}`;
128
+ proxyAdmin: `0x${string}`;
129
+ data?: `0x${string}` | undefined;
130
+ };
131
+ };
132
+ out: {
133
+ json: {
134
+ implementation: `0x${string}`;
135
+ proxyAdmin: `0x${string}`;
136
+ data?: `0x${string}` | undefined;
137
+ };
138
+ };
139
+ }, Promise<Response & import("hono").TypedResponse<{
140
+ abi: any[];
141
+ args: any[];
142
+ bytecode: `0x${string}`;
143
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">>>];
144
+ export declare function createProxyAdmin<E extends Env>(factory: Factory<E>): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<{
145
+ abi: any[];
146
+ bytecode: `0x${string}`;
147
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">>>, import("hono/types").H<import("hono/utils/types").IfAnyThenEmptyObject<E extends Env ? Env extends E ? {} : E : E> & {}, string, {}, Promise<Response & import("hono").TypedResponse<{
148
+ abi: any[];
149
+ bytecode: `0x${string}`;
150
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">>>];
88
151
  //# sourceMappingURL=deploy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/issuance/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA+BvC,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;qEAOlE;AAgCD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;EAOnC,CAAC;AAEH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAiBpE"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/issuance/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA+BvC,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;qEAOlE;AAiCD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;EAOnC,CAAC;AAEH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAiBpE;AAgCD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;EAIvC,CAAC;AAEH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAcxE;AA4BD,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;qEAOlE"}
@@ -1,6 +1,8 @@
1
1
  import { z } from "zod";
2
2
  import { describeRoute } from "hono-openapi";
3
3
  import { erc1967ProxyAbi, erc1967ProxyBytecode } from "@evergonlabs/tmi-evm-contracts/erc1967";
4
+ import { transparentUpgradeableProxyAbi, transparentUpgradeableProxyBytecode, } from "@evergonlabs/tmi-evm-contracts/transparentUpgradeableProxy";
5
+ import { proxyAdminAbi, proxyAdminBytecode } from "@evergonlabs/tmi-evm-contracts/proxyAdmin";
4
6
  import { resolver, validator } from "hono-openapi/zod";
5
7
  import { AddressSchema, HexStringSchema } from "../common/index.js";
6
8
  import { encodeFunctionData } from "viem";
@@ -54,6 +56,7 @@ const deployProxyRoute = describeRoute({
54
56
  summary: "Get ERC1967Proxy",
55
57
  description: "Returns transaction data for deploying a ERC1967Proxy",
56
58
  tags: ["Issuance"],
59
+ deprecated: true,
57
60
  responses: {
58
61
  200: {
59
62
  description: "Returns transaction data for deploying a ERC1967Proxy",
@@ -89,3 +92,78 @@ export function createErc1967Proxy(factory) {
89
92
  });
90
93
  });
91
94
  }
95
+ const IssuanceDeployTransparentProxySchema = z
96
+ .object({
97
+ bytecode: HexStringSchema.openapi({ description: "Bytecode of the smartcontract" }),
98
+ abi: z.array(z.any()).openapi({
99
+ description: "ABI of a contract.",
100
+ type: "array",
101
+ }),
102
+ args: z.array(z.any()).openapi({
103
+ description: "Arguments for the transparent proxy initialization",
104
+ type: "array",
105
+ }),
106
+ })
107
+ .openapi({ ref: "IssuanceDeployTransparentProxySchema" });
108
+ const deployTransparentProxyRoute = describeRoute({
109
+ summary: "Deploy TransparentUpgradeableProxy",
110
+ description: "Returns transaction data for deploying a TransparentUpgradeableProxy",
111
+ tags: ["Issuance"],
112
+ responses: {
113
+ 200: {
114
+ description: "Returns transaction data for deploying a TransparentUpgradeableProxy",
115
+ content: {
116
+ "application/json": {
117
+ schema: resolver(IssuanceDeployTransparentProxySchema),
118
+ },
119
+ },
120
+ },
121
+ },
122
+ });
123
+ export const DeployTransparentProxySchema = z.object({
124
+ implementation: AddressSchema.openapi("The address of the implementation contract"),
125
+ proxyAdmin: AddressSchema.openapi("The address of the proxy admin"),
126
+ data: HexStringSchema.openapi("The encoded initialization data for the implementation").optional(),
127
+ });
128
+ export function createTransparentProxy(factory) {
129
+ return factory.createHandlers(deployTransparentProxyRoute, validator("json", DeployTransparentProxySchema), async (c) => {
130
+ const { implementation, proxyAdmin: admin, data } = c.req.valid("json");
131
+ return c.json({
132
+ bytecode: transparentUpgradeableProxyBytecode,
133
+ abi: transparentUpgradeableProxyAbi,
134
+ args: [implementation, admin, data || "0x"],
135
+ });
136
+ });
137
+ }
138
+ const IssuanceDeployProxyAdminSchema = z
139
+ .object({
140
+ bytecode: HexStringSchema.openapi({ description: "Bytecode of the smartcontract" }),
141
+ abi: z.array(z.any()).openapi({
142
+ description: "ABI of a contract.",
143
+ type: "array",
144
+ }),
145
+ })
146
+ .openapi({ ref: "IssuanceDeployProxyAdminSchema" });
147
+ const deployProxyAdminRoute = describeRoute({
148
+ summary: "Deploy ProxyAdmin",
149
+ description: "Returns transaction data for deploying a ProxyAdmin contract",
150
+ tags: ["Issuance"],
151
+ responses: {
152
+ 200: {
153
+ description: "Returns transaction data for deploying a ProxyAdmin contract",
154
+ content: {
155
+ "application/json": {
156
+ schema: resolver(IssuanceDeployProxyAdminSchema),
157
+ },
158
+ },
159
+ },
160
+ },
161
+ });
162
+ export function createProxyAdmin(factory) {
163
+ return factory.createHandlers(deployProxyAdminRoute, async (c) => {
164
+ return c.json({
165
+ bytecode: proxyAdminBytecode,
166
+ abi: proxyAdminAbi,
167
+ });
168
+ });
169
+ }
@@ -180,6 +180,62 @@ export declare const issuanceApis: {
180
180
  status: import("hono/utils/http-status").ContentfulStatusCode;
181
181
  };
182
182
  };
183
+ } & {
184
+ "/proxy/deployTransparentProxy": {
185
+ $post: {
186
+ input: {
187
+ json: {
188
+ implementation: `0x${string}`;
189
+ proxyAdmin: `0x${string}`;
190
+ data?: `0x${string}` | undefined;
191
+ };
192
+ };
193
+ output: {
194
+ abi: any[];
195
+ args: any[];
196
+ bytecode: `0x${string}`;
197
+ };
198
+ outputFormat: "json";
199
+ status: import("hono/utils/http-status").ContentfulStatusCode;
200
+ };
201
+ };
202
+ } & {
203
+ "/proxy/deployProxyAdmin": {
204
+ $get: {
205
+ input: {};
206
+ output: {
207
+ abi: any[];
208
+ bytecode: `0x${string}`;
209
+ };
210
+ outputFormat: "json";
211
+ status: import("hono/utils/http-status").ContentfulStatusCode;
212
+ };
213
+ };
214
+ } & {
215
+ "/proxy/upgradeTransparentProxy": {
216
+ $post: {
217
+ input: {
218
+ json: {
219
+ newImplementation: `0x${string}`;
220
+ proxyAdminAddress: `0x${string}`;
221
+ proxyAddress: `0x${string}`;
222
+ data?: `0x${string}` | undefined;
223
+ };
224
+ };
225
+ output: {
226
+ data: `0x${string}`;
227
+ to: `0x${string}`;
228
+ details: {
229
+ functionName: string;
230
+ address: `0x${string}`;
231
+ abi: any[];
232
+ args: any[];
233
+ };
234
+ };
235
+ outputFormat: "json";
236
+ status: import("hono/utils/http-status").ContentfulStatusCode;
237
+ };
238
+ };
183
239
  }, "/issuance">, "/">;
184
240
  config: {
185
241
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/issuance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAUvC,eAAO,MAAM,YAAY;;gBAEX,CAAC,SAAS,GAAG,WAAW,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkB/C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/issuance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAWvC,eAAO,MAAM,YAAY;;gBAEX,CAAC,SAAS,GAAG,WAAW,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqB/C,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import { createApiConfig } from "../common/app.js";
2
2
  import { approveErc20Token } from "./approve.js";
3
3
  import { burnErc20Token } from "./burn.js";
4
- import { createErc1967Proxy, createErc20Token } from "./deploy.js";
4
+ import { createErc1967Proxy, createErc20Token, createTransparentProxy, createProxyAdmin } from "./deploy.js";
5
5
  import { mintErc20Token } from "./mint.js";
6
6
  import { transferErc20Token } from "./transfer.js";
7
7
  import { createGrantRole } from "./grantRole.js";
8
8
  import { createRenounceRole } from "./renounceRole.js";
9
+ import { upgradeTransparentProxy } from "./upgrade.js";
9
10
  export const issuanceApis = {
10
11
  name: "Issuance APIs",
11
12
  createApp: (factory) => factory.createApp().route("/issuance", factory
@@ -17,7 +18,10 @@ export const issuanceApis = {
17
18
  .post("/erc20/transfer", ...transferErc20Token(factory))
18
19
  .post("/erc20/proxy", ...createErc1967Proxy(factory))
19
20
  .post("/erc20/grantRole", ...createGrantRole(factory))
20
- .post("/erc20/renounceRole", ...createRenounceRole(factory))),
21
+ .post("/erc20/renounceRole", ...createRenounceRole(factory))
22
+ .post("/proxy/deployTransparentProxy", ...createTransparentProxy(factory))
23
+ .get("/proxy/deployProxyAdmin", ...createProxyAdmin(factory))
24
+ .post("/proxy/upgradeTransparentProxy", ...upgradeTransparentProxy(factory))),
21
25
  config: createApiConfig({
22
26
  title: "Issuance API",
23
27
  description: "APIs for issuing tokens",
@@ -0,0 +1,82 @@
1
+ import { z } from "zod";
2
+ import { Env } from "hono";
3
+ import { Factory } from "hono/factory";
4
+ export declare const UpgradeProxyRequestSchema: z.ZodObject<{
5
+ proxyAdminAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
6
+ proxyAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
7
+ newImplementation: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
8
+ data: z.ZodOptional<z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ newImplementation: `0x${string}`;
11
+ proxyAdminAddress: `0x${string}`;
12
+ proxyAddress: `0x${string}`;
13
+ data?: `0x${string}` | undefined;
14
+ }, {
15
+ newImplementation: `0x${string}`;
16
+ proxyAdminAddress: `0x${string}`;
17
+ proxyAddress: `0x${string}`;
18
+ data?: `0x${string}` | undefined;
19
+ }>;
20
+ export declare function upgradeTransparentProxy<E extends Env>(factory: Factory<E>): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<{
21
+ data: `0x${string}`;
22
+ to: `0x${string}`;
23
+ details: {
24
+ functionName: string;
25
+ address: `0x${string}`;
26
+ abi: any[];
27
+ args: any[];
28
+ };
29
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">>>, import("hono/types").H<Env, string, {
30
+ in: {
31
+ json: {
32
+ newImplementation: `0x${string}`;
33
+ proxyAdminAddress: `0x${string}`;
34
+ proxyAddress: `0x${string}`;
35
+ data?: `0x${string}` | undefined;
36
+ };
37
+ };
38
+ out: {
39
+ json: {
40
+ newImplementation: `0x${string}`;
41
+ proxyAdminAddress: `0x${string}`;
42
+ proxyAddress: `0x${string}`;
43
+ data?: `0x${string}` | undefined;
44
+ };
45
+ };
46
+ }, Promise<Response & import("hono").TypedResponse<{
47
+ data: `0x${string}`;
48
+ to: `0x${string}`;
49
+ details: {
50
+ functionName: string;
51
+ address: `0x${string}`;
52
+ abi: any[];
53
+ args: any[];
54
+ };
55
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">>>, import("hono/types").H<import("hono/utils/types").IfAnyThenEmptyObject<E extends Env ? Env extends E ? {} : E : E> & {}, string, {
56
+ in: {
57
+ json: {
58
+ newImplementation: `0x${string}`;
59
+ proxyAdminAddress: `0x${string}`;
60
+ proxyAddress: `0x${string}`;
61
+ data?: `0x${string}` | undefined;
62
+ };
63
+ };
64
+ out: {
65
+ json: {
66
+ newImplementation: `0x${string}`;
67
+ proxyAdminAddress: `0x${string}`;
68
+ proxyAddress: `0x${string}`;
69
+ data?: `0x${string}` | undefined;
70
+ };
71
+ };
72
+ }, Promise<Response & import("hono").TypedResponse<{
73
+ data: `0x${string}`;
74
+ to: `0x${string}`;
75
+ details: {
76
+ functionName: string;
77
+ address: `0x${string}`;
78
+ abi: any[];
79
+ args: any[];
80
+ };
81
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">>>];
82
+ //# sourceMappingURL=upgrade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/issuance/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAKvC,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;EAapC,CAAC;AAmBH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAazE"}
@@ -0,0 +1,45 @@
1
+ import { z } from "zod";
2
+ import { describeRoute } from "hono-openapi";
3
+ import { resolver, validator } from "hono-openapi/zod";
4
+ import { AddressSchema, HexStringSchema, toTransaction, TransactionSchema } from "../common/index.js";
5
+ import { proxyAdminAbi } from "@evergonlabs/tmi-evm-contracts/proxyAdmin";
6
+ export const UpgradeProxyRequestSchema = z.object({
7
+ proxyAdminAddress: AddressSchema.openapi({
8
+ description: "The address of the ProxyAdmin contract that manages the proxy",
9
+ }),
10
+ proxyAddress: AddressSchema.openapi({
11
+ description: "The address of the transparent proxy contract to upgrade",
12
+ }),
13
+ newImplementation: AddressSchema.openapi({
14
+ description: "The address of the new implementation contract",
15
+ }),
16
+ data: HexStringSchema.optional().openapi({
17
+ description: "Initialization data",
18
+ }),
19
+ });
20
+ const upgradeRoute = describeRoute({
21
+ summary: "Upgrade Transparent Proxy Implementation",
22
+ description: "Returns transaction data for upgrading the implementation of a transparent proxy contract using ProxyAdmin",
23
+ tags: ["Issuance"],
24
+ responses: {
25
+ 200: {
26
+ description: "Returns transaction data for upgrading transparent proxy implementation via ProxyAdmin",
27
+ content: {
28
+ "application/json": {
29
+ schema: resolver(TransactionSchema),
30
+ },
31
+ },
32
+ },
33
+ },
34
+ });
35
+ export function upgradeTransparentProxy(factory) {
36
+ return factory.createHandlers(upgradeRoute, validator("json", UpgradeProxyRequestSchema), async (c) => {
37
+ const { proxyAdminAddress, proxyAddress, newImplementation, data } = c.req.valid("json");
38
+ return c.json(toTransaction({
39
+ address: proxyAdminAddress,
40
+ abi: proxyAdminAbi,
41
+ functionName: "upgradeAndCall",
42
+ args: [proxyAddress, newImplementation, data || "0x"],
43
+ }));
44
+ });
45
+ }