@explorins/pers-sdk 1.1.2 → 1.1.3

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 (291) hide show
  1. package/dist/analytics/api/analytics-api.d.ts +17 -0
  2. package/dist/analytics/api/analytics-api.d.ts.map +1 -0
  3. package/{src/analytics/index.ts → dist/analytics/index.d.ts} +28 -52
  4. package/dist/analytics/index.d.ts.map +1 -0
  5. package/dist/analytics/models/index.d.ts +61 -0
  6. package/dist/analytics/models/index.d.ts.map +1 -0
  7. package/dist/analytics/services/analytics-service.d.ts +19 -0
  8. package/dist/analytics/services/analytics-service.d.ts.map +1 -0
  9. package/dist/analytics.cjs +76 -0
  10. package/dist/analytics.cjs.map +1 -0
  11. package/dist/analytics.d.ts +28 -0
  12. package/dist/analytics.js +72 -0
  13. package/dist/analytics.js.map +1 -0
  14. package/dist/auth-admin/api/auth-admin-api.d.ts +27 -0
  15. package/dist/auth-admin/api/auth-admin-api.d.ts.map +1 -0
  16. package/dist/auth-admin/index.d.ts +26 -0
  17. package/dist/auth-admin/index.d.ts.map +1 -0
  18. package/dist/auth-admin/services/auth-admin-service.d.ts +23 -0
  19. package/dist/auth-admin/services/auth-admin-service.d.ts.map +1 -0
  20. package/dist/auth-admin.cjs +96 -0
  21. package/dist/auth-admin.cjs.map +1 -0
  22. package/dist/auth-admin.d.ts +26 -0
  23. package/dist/auth-admin.js +92 -0
  24. package/dist/auth-admin.js.map +1 -0
  25. package/dist/business/api/business-api.d.ts +133 -0
  26. package/dist/business/api/business-api.d.ts.map +1 -0
  27. package/dist/business/index.d.ts +34 -0
  28. package/dist/business/index.d.ts.map +1 -0
  29. package/dist/business/models/index.d.ts +8 -0
  30. package/dist/business/models/index.d.ts.map +1 -0
  31. package/dist/business/services/business-service.d.ts +51 -0
  32. package/dist/business/services/business-service.d.ts.map +1 -0
  33. package/dist/business.cjs +303 -0
  34. package/dist/business.cjs.map +1 -0
  35. package/dist/business.d.ts +34 -0
  36. package/dist/business.js +299 -0
  37. package/dist/business.js.map +1 -0
  38. package/dist/campaign/api/campaign-api.d.ts +213 -0
  39. package/dist/campaign/api/campaign-api.d.ts.map +1 -0
  40. package/dist/campaign/index.d.ts +44 -0
  41. package/dist/campaign/index.d.ts.map +1 -0
  42. package/dist/campaign/services/campaign-service.d.ts +88 -0
  43. package/dist/campaign/services/campaign-service.d.ts.map +1 -0
  44. package/dist/campaign.cjs +506 -0
  45. package/dist/campaign.cjs.map +1 -0
  46. package/dist/campaign.d.ts +44 -0
  47. package/dist/campaign.js +502 -0
  48. package/dist/campaign.js.map +1 -0
  49. package/dist/core/abstractions/http-client.d.ts +22 -0
  50. package/dist/core/abstractions/http-client.d.ts.map +1 -0
  51. package/dist/core/auth/auth-provider.interface.d.ts +12 -0
  52. package/dist/core/auth/auth-provider.interface.d.ts.map +1 -0
  53. package/dist/core/auth/create-auth-provider.d.ts +27 -0
  54. package/dist/core/auth/create-auth-provider.d.ts.map +1 -0
  55. package/dist/core/auth/simple-auth-config.interface.d.ts +15 -0
  56. package/dist/core/auth/simple-auth-config.interface.d.ts.map +1 -0
  57. package/dist/core/index.d.ts +13 -0
  58. package/dist/core/index.d.ts.map +1 -0
  59. package/dist/core/pers-api-client.d.ts +54 -0
  60. package/dist/core/pers-api-client.d.ts.map +1 -0
  61. package/dist/core/pers-config.d.ts +38 -0
  62. package/dist/core/pers-config.d.ts.map +1 -0
  63. package/dist/core/utils/jwt.function.d.ts +2 -0
  64. package/dist/core/utils/jwt.function.d.ts.map +1 -0
  65. package/dist/core.cjs +506 -0
  66. package/dist/core.cjs.map +1 -0
  67. package/dist/core.d.ts +13 -0
  68. package/dist/core.js +497 -0
  69. package/dist/core.js.map +1 -0
  70. package/dist/donation/api/donation-api.d.ts +18 -0
  71. package/dist/donation/api/donation-api.d.ts.map +1 -0
  72. package/dist/donation/index.d.ts +25 -0
  73. package/dist/donation/index.d.ts.map +1 -0
  74. package/{src/donation/models/index.ts → dist/donation/models/index.d.ts} +8 -11
  75. package/dist/donation/models/index.d.ts.map +1 -0
  76. package/dist/donation/services/donation-service.d.ts +19 -0
  77. package/dist/donation/services/donation-service.d.ts.map +1 -0
  78. package/dist/donation.cjs +78 -0
  79. package/dist/donation.cjs.map +1 -0
  80. package/dist/donation.d.ts +25 -0
  81. package/dist/donation.js +74 -0
  82. package/dist/donation.js.map +1 -0
  83. package/dist/index.cjs +4217 -0
  84. package/dist/index.cjs.map +1 -0
  85. package/dist/index.d.ts +21 -0
  86. package/dist/index.d.ts.map +1 -0
  87. package/dist/index.js +4164 -0
  88. package/dist/index.js.map +1 -0
  89. package/dist/package.json +148 -0
  90. package/dist/payment/api/payment-api.d.ts +105 -0
  91. package/dist/payment/api/payment-api.d.ts.map +1 -0
  92. package/dist/payment/index.d.ts +36 -0
  93. package/dist/payment/index.d.ts.map +1 -0
  94. package/dist/payment/models/index.d.ts +12 -0
  95. package/dist/payment/models/index.d.ts.map +1 -0
  96. package/dist/payment/services/payment-service.d.ts +40 -0
  97. package/dist/payment/services/payment-service.d.ts.map +1 -0
  98. package/dist/payment.cjs +258 -0
  99. package/dist/payment.cjs.map +1 -0
  100. package/dist/payment.d.ts +36 -0
  101. package/dist/payment.js +254 -0
  102. package/dist/payment.js.map +1 -0
  103. package/dist/pers-sdk.d.ts +29 -0
  104. package/dist/pers-sdk.d.ts.map +1 -0
  105. package/dist/redemption/api/redemption-api.d.ts +147 -0
  106. package/dist/redemption/api/redemption-api.d.ts.map +1 -0
  107. package/dist/redemption/index.d.ts +35 -0
  108. package/dist/redemption/index.d.ts.map +1 -0
  109. package/dist/redemption/models/index.d.ts +8 -0
  110. package/dist/redemption/models/index.d.ts.map +1 -0
  111. package/dist/redemption/services/redemption-service.d.ts +56 -0
  112. package/dist/redemption/services/redemption-service.d.ts.map +1 -0
  113. package/dist/redemption.cjs +333 -0
  114. package/dist/redemption.cjs.map +1 -0
  115. package/dist/redemption.d.ts +35 -0
  116. package/dist/redemption.js +329 -0
  117. package/dist/redemption.js.map +1 -0
  118. package/dist/shared/interfaces/pers-shared-lib.interfaces.d.ts +18 -0
  119. package/dist/shared/interfaces/pers-shared-lib.interfaces.d.ts.map +1 -0
  120. package/dist/tenant/api/tenant-api.d.ts +56 -0
  121. package/dist/tenant/api/tenant-api.d.ts.map +1 -0
  122. package/dist/tenant/index.d.ts +34 -0
  123. package/dist/tenant/index.d.ts.map +1 -0
  124. package/dist/tenant/models/index.d.ts +11 -0
  125. package/dist/tenant/models/index.d.ts.map +1 -0
  126. package/dist/tenant/services/tenant-service.d.ts +46 -0
  127. package/dist/tenant/services/tenant-service.d.ts.map +1 -0
  128. package/dist/tenant.cjs +177 -0
  129. package/dist/tenant.cjs.map +1 -0
  130. package/dist/tenant.d.ts +34 -0
  131. package/dist/tenant.js +173 -0
  132. package/dist/tenant.js.map +1 -0
  133. package/dist/token/api/token-api.d.ts +64 -0
  134. package/dist/token/api/token-api.d.ts.map +1 -0
  135. package/dist/token/base/base-token-service.d.ts +87 -0
  136. package/dist/token/base/base-token-service.d.ts.map +1 -0
  137. package/dist/token/index.d.ts +13 -0
  138. package/dist/token/index.d.ts.map +1 -0
  139. package/dist/token/models/index.d.ts +18 -0
  140. package/dist/token/models/index.d.ts.map +1 -0
  141. package/dist/token/services/token-service.d.ts +68 -0
  142. package/dist/token/services/token-service.d.ts.map +1 -0
  143. package/dist/token/token-sdk.d.ts +140 -0
  144. package/dist/token/token-sdk.d.ts.map +1 -0
  145. package/dist/token.cjs +537 -0
  146. package/dist/token.cjs.map +1 -0
  147. package/dist/token.d.ts +13 -0
  148. package/dist/token.js +532 -0
  149. package/dist/token.js.map +1 -0
  150. package/dist/transaction/api/transaction-api.d.ts +133 -0
  151. package/dist/transaction/api/transaction-api.d.ts.map +1 -0
  152. package/dist/transaction/index.d.ts +38 -0
  153. package/dist/transaction/index.d.ts.map +1 -0
  154. package/dist/transaction/models/index.d.ts +42 -0
  155. package/dist/transaction/models/index.d.ts.map +1 -0
  156. package/dist/transaction/services/transaction-service.d.ts +56 -0
  157. package/dist/transaction/services/transaction-service.d.ts.map +1 -0
  158. package/dist/transaction.cjs +394 -0
  159. package/dist/transaction.cjs.map +1 -0
  160. package/dist/transaction.d.ts +38 -0
  161. package/dist/transaction.js +390 -0
  162. package/dist/transaction.js.map +1 -0
  163. package/dist/user/api/user-api.d.ts +56 -0
  164. package/dist/user/api/user-api.d.ts.map +1 -0
  165. package/dist/user/index.d.ts +36 -0
  166. package/dist/user/index.d.ts.map +1 -0
  167. package/{src/user/models/index.ts → dist/user/models/index.d.ts} +12 -10
  168. package/dist/user/models/index.d.ts.map +1 -0
  169. package/dist/user/services/user-service.d.ts +46 -0
  170. package/dist/user/services/user-service.d.ts.map +1 -0
  171. package/dist/user-status/api/user-status-api.d.ts +37 -0
  172. package/dist/user-status/api/user-status-api.d.ts.map +1 -0
  173. package/dist/user-status/index.d.ts +28 -0
  174. package/dist/user-status/index.d.ts.map +1 -0
  175. package/{src/user-status/models/index.ts → dist/user-status/models/index.d.ts} +8 -11
  176. package/dist/user-status/models/index.d.ts.map +1 -0
  177. package/dist/user-status/services/user-status-service.d.ts +26 -0
  178. package/dist/user-status/services/user-status-service.d.ts.map +1 -0
  179. package/dist/user-status.cjs +147 -0
  180. package/dist/user-status.cjs.map +1 -0
  181. package/dist/user-status.d.ts +28 -0
  182. package/dist/user-status.js +143 -0
  183. package/dist/user-status.js.map +1 -0
  184. package/dist/user.cjs +188 -0
  185. package/dist/user.cjs.map +1 -0
  186. package/dist/user.d.ts +36 -0
  187. package/dist/user.js +184 -0
  188. package/dist/user.js.map +1 -0
  189. package/dist/web3/api/web3-api.d.ts +27 -0
  190. package/dist/web3/api/web3-api.d.ts.map +1 -0
  191. package/dist/web3/index.d.ts +16 -0
  192. package/dist/web3/index.d.ts.map +1 -0
  193. package/dist/web3/models/index.d.ts +92 -0
  194. package/dist/web3/models/index.d.ts.map +1 -0
  195. package/dist/web3/services/web3-service.d.ts +21 -0
  196. package/dist/web3/services/web3-service.d.ts.map +1 -0
  197. package/dist/web3-chain/api/web3-chain-api.d.ts +19 -0
  198. package/dist/web3-chain/api/web3-chain-api.d.ts.map +1 -0
  199. package/dist/web3-chain/index.d.ts +17 -0
  200. package/dist/web3-chain/index.d.ts.map +1 -0
  201. package/{src/web3-chain/models/index.ts → dist/web3-chain/models/index.d.ts} +38 -45
  202. package/dist/web3-chain/models/index.d.ts.map +1 -0
  203. package/dist/web3-chain/services/getWeb3FCD.service.d.ts +8 -0
  204. package/dist/web3-chain/services/getWeb3FCD.service.d.ts.map +1 -0
  205. package/dist/web3-chain/services/provider.service.d.ts +15 -0
  206. package/dist/web3-chain/services/provider.service.d.ts.map +1 -0
  207. package/dist/web3-chain/services/public-http-provider.service.d.ts +8 -0
  208. package/dist/web3-chain/services/public-http-provider.service.d.ts.map +1 -0
  209. package/dist/web3-chain/services/web3-chain-service.d.ts +17 -0
  210. package/dist/web3-chain/services/web3-chain-service.d.ts.map +1 -0
  211. package/dist/web3-chain.cjs +316 -0
  212. package/dist/web3-chain.cjs.map +1 -0
  213. package/dist/web3-chain.d.ts +17 -0
  214. package/dist/web3-chain.js +310 -0
  215. package/dist/web3-chain.js.map +1 -0
  216. package/dist/web3.cjs +516 -0
  217. package/dist/web3.cjs.map +1 -0
  218. package/dist/web3.d.ts +16 -0
  219. package/dist/web3.js +513 -0
  220. package/dist/web3.js.map +1 -0
  221. package/package.json +70 -67
  222. package/config/domains.js +0 -22
  223. package/explorins-pers-sdk-1.0.0-alpha.1.tgz +0 -0
  224. package/rollup.config.js +0 -74
  225. package/scripts/copy-declarations.js +0 -147
  226. package/src/analytics/api/analytics-api.ts +0 -24
  227. package/src/analytics/models/index.ts +0 -74
  228. package/src/analytics/services/analytics-service.ts +0 -28
  229. package/src/auth-admin/api/auth-admin-api.ts +0 -42
  230. package/src/auth-admin/index.ts +0 -47
  231. package/src/auth-admin/services/auth-admin-service.ts +0 -36
  232. package/src/business/api/business-api.ts +0 -234
  233. package/src/business/index.ts +0 -53
  234. package/src/business/models/index.ts +0 -13
  235. package/src/business/services/business-service.ts +0 -88
  236. package/src/campaign/api/campaign-api.ts +0 -376
  237. package/src/campaign/index.ts +0 -67
  238. package/src/campaign/services/campaign-service.ts +0 -164
  239. package/src/core/abstractions/http-client.ts +0 -24
  240. package/src/core/auth/auth-provider.interface.ts +0 -16
  241. package/src/core/auth/create-auth-provider.ts +0 -136
  242. package/src/core/auth/simple-auth-config.interface.ts +0 -15
  243. package/src/core/index.ts +0 -33
  244. package/src/core/pers-api-client.ts +0 -343
  245. package/src/core/pers-config.ts +0 -65
  246. package/src/core/utils/jwt.function.ts +0 -24
  247. package/src/donation/api/donation-api.ts +0 -24
  248. package/src/donation/index.ts +0 -47
  249. package/src/donation/services/donation-service.ts +0 -25
  250. package/src/index.ts +0 -55
  251. package/src/payment/api/payment-api.ts +0 -185
  252. package/src/payment/index.ts +0 -64
  253. package/src/payment/models/index.ts +0 -29
  254. package/src/payment/services/payment-service.ts +0 -70
  255. package/src/pers-sdk.ts +0 -45
  256. package/src/redemption/api/redemption-api.ts +0 -241
  257. package/src/redemption/index.ts +0 -60
  258. package/src/redemption/models/index.ts +0 -17
  259. package/src/redemption/services/redemption-service.ts +0 -103
  260. package/src/shared/interfaces/pers-shared-lib.interfaces.ts +0 -99
  261. package/src/tenant/api/tenant-api.ts +0 -92
  262. package/src/tenant/index.ts +0 -61
  263. package/src/tenant/models/index.ts +0 -20
  264. package/src/tenant/services/tenant-service.ts +0 -78
  265. package/src/token/api/token-api.ts +0 -129
  266. package/src/token/base/base-token-service.ts +0 -167
  267. package/src/token/index.ts +0 -38
  268. package/src/token/models/index.ts +0 -30
  269. package/src/token/services/token-service.ts +0 -125
  270. package/src/token/token-sdk.ts +0 -231
  271. package/src/transaction/api/transaction-api.ts +0 -296
  272. package/src/transaction/index.ts +0 -65
  273. package/src/transaction/models/index.ts +0 -60
  274. package/src/transaction/services/transaction-service.ts +0 -104
  275. package/src/user/api/user-api.ts +0 -98
  276. package/src/user/index.ts +0 -62
  277. package/src/user/services/user-service.ts +0 -75
  278. package/src/user-status/api/user-status-api.ts +0 -78
  279. package/src/user-status/index.ts +0 -55
  280. package/src/user-status/services/user-status-service.ts +0 -51
  281. package/src/web3/api/web3-api.ts +0 -68
  282. package/src/web3/index.ts +0 -38
  283. package/src/web3/models/index.ts +0 -150
  284. package/src/web3/services/web3-service.ts +0 -338
  285. package/src/web3-chain/api/web3-chain-api.ts +0 -42
  286. package/src/web3-chain/index.ts +0 -27
  287. package/src/web3-chain/services/getWeb3FCD.service.ts +0 -47
  288. package/src/web3-chain/services/provider.service.ts +0 -123
  289. package/src/web3-chain/services/public-http-provider.service.ts +0 -26
  290. package/src/web3-chain/services/web3-chain-service.ts +0 -131
  291. package/tsconfig.json +0 -28
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-service.d.ts","sourceRoot":"","sources":["../../../src/token/services/token-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAElF;;;;;;GAMG;AACH,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,QAAQ;IAMtC;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAI5C;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAIpD;;OAEG;IACG,0BAA0B,IAAI,OAAO,CAAC,QAAQ,CAAC;IAIrD;;OAEG;IACG,qBAAqB,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAIlD;;OAEG;IACG,qBAAqB,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAIlD;;;OAGG;IACG,yBAAyB,CAAC,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC;IAQ3G;;OAEG;IACG,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI1F;;OAEG;IACG,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI3D;;OAEG;IACG,WAAW,CAAC,SAAS,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAItE;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIvF;;OAEG;IACG,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAItG;;OAEG;IACG,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAI9E;;OAEG;IACG,eAAe,CAAC,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;CAQtE"}
@@ -0,0 +1,140 @@
1
+ import { TokenApi } from './api/token-api';
2
+ import { TokenService } from './services/token-service';
3
+ import { PersApiClient } from '../core/pers-api-client';
4
+ import { TokenDTO, TokenStorageData, TokenCreateRequestDTO, TokenUpdateRequestDTO, TokenMetadataDTO } from './models';
5
+ import { TokenTypeDTO } from '../shared/interfaces/pers-shared-lib.interfaces';
6
+ /**
7
+ * Token SDK - Class-based Promise SDK for Token Operations
8
+ *
9
+ * Modern, performant SDK with direct method access and excellent TypeScript support.
10
+ * Optimized for bundle size, performance, and developer experience.
11
+ *
12
+ * Usage:
13
+ * const tokenSDK = new TokenSDK(apiClient);
14
+ * const tokens = await tokenSDK.getTokens();
15
+ * const creditToken = await tokenSDK.getActiveCreditToken();
16
+ */
17
+ export declare class TokenSDK {
18
+ private readonly tokenApi;
19
+ private readonly tokenService;
20
+ constructor(apiClient: PersApiClient);
21
+ /**
22
+ * Get all tokens
23
+ * @returns Promise with all available tokens
24
+ */
25
+ getTokens(): Promise<TokenDTO[]>;
26
+ /**
27
+ * Get all token types
28
+ * @returns Promise with all available token types
29
+ */
30
+ getTokenTypes(): Promise<TokenTypeDTO[]>;
31
+ /**
32
+ * Get the active credit token
33
+ * @returns Promise with the current active credit token
34
+ */
35
+ getActiveCreditToken(): Promise<TokenDTO>;
36
+ /**
37
+ * Get all reward tokens
38
+ * @returns Promise with all reward tokens
39
+ */
40
+ getRewardTokens(): Promise<TokenDTO[]>;
41
+ /**
42
+ * Get all status tokens
43
+ * @returns Promise with all status tokens
44
+ */
45
+ getStatusTokens(): Promise<TokenDTO[]>;
46
+ /**
47
+ * Get token by contract address
48
+ * @param contractAddress - The contract address to search for
49
+ * @param contractTokenId - Optional contract token ID
50
+ * @returns Promise with the matching token
51
+ */
52
+ getTokenByContract(contractAddress: string, contractTokenId?: string | null): Promise<TokenDTO>;
53
+ /**
54
+ * Create token metadata
55
+ * @param tokenId - The token ID
56
+ * @param tokenData - The token storage data
57
+ * @returns Promise with the updated token
58
+ */
59
+ createTokenMetadata(tokenId: string, tokenData: TokenStorageData): Promise<TokenDTO>;
60
+ /**
61
+ * Toggle token active status
62
+ * @param tokenId - The token ID to toggle
63
+ * @returns Promise with the updated token
64
+ */
65
+ toggleTokenActive(tokenId: string): Promise<TokenDTO>;
66
+ /**
67
+ * Create a new token
68
+ * @param tokenData - The token creation data
69
+ * @returns Promise with the created token
70
+ */
71
+ createToken(tokenData: TokenCreateRequestDTO): Promise<TokenDTO>;
72
+ /**
73
+ * Update an existing token
74
+ * @param tokenId - The token ID to update
75
+ * @param tokenData - The token update data
76
+ * @returns Promise with the updated token
77
+ */
78
+ updateToken(tokenId: string, tokenData: TokenUpdateRequestDTO): Promise<TokenDTO>;
79
+ /**
80
+ * Set mainnet contract address for a token
81
+ * @param tokenId - The token ID
82
+ * @param contractAddress - The contract address
83
+ * @param chainId - The blockchain chain ID
84
+ * @returns Promise with the updated token
85
+ */
86
+ setMainnetContract(tokenId: string, contractAddress: string, chainId: number): Promise<TokenDTO>;
87
+ /**
88
+ * Toggle token metadata status
89
+ * @param metadataId - The metadata ID to toggle
90
+ * @returns Promise with the updated metadata
91
+ */
92
+ toggleTokenMetadataStatus(metadataId: string): Promise<TokenMetadataDTO>;
93
+ /**
94
+ * Create a new token type
95
+ * @param tokenType - The token type data
96
+ * @returns Promise with the created token type
97
+ */
98
+ createTokenType(tokenType: TokenTypeDTO): Promise<TokenTypeDTO>;
99
+ /**
100
+ * Get direct access to the token service for advanced operations
101
+ * @returns The underlying TokenService instance
102
+ */
103
+ getTokenService(): TokenService;
104
+ /**
105
+ * Get direct access to the token API for low-level operations
106
+ * @returns The underlying TokenApi instance
107
+ */
108
+ getTokenApi(): TokenApi;
109
+ /**
110
+ * @deprecated Use getTokens() instead
111
+ * Framework compatibility method
112
+ */
113
+ getRemoteTokens(): Promise<TokenDTO[]>;
114
+ /**
115
+ * @deprecated Use getTokenTypes() instead
116
+ * Framework compatibility method
117
+ */
118
+ getRemoteTokenTypes(): Promise<TokenTypeDTO[]>;
119
+ /**
120
+ * @deprecated Use getActiveCreditToken() instead
121
+ * Framework compatibility method
122
+ */
123
+ getRemoteActiveCreditToken(): Promise<TokenDTO>;
124
+ /**
125
+ * @deprecated Use getRewardTokens() instead
126
+ * Framework compatibility method
127
+ */
128
+ getRemoteRewardTokens(): Promise<TokenDTO[]>;
129
+ /**
130
+ * @deprecated Use getStatusTokens() instead
131
+ * Framework compatibility method
132
+ */
133
+ getRemoteStatusTokens(): Promise<TokenDTO[]>;
134
+ /**
135
+ * @deprecated Use getTokenByContract() instead
136
+ * Framework compatibility method
137
+ */
138
+ getTokenByContractAddress(contractAddress: string, contractTokenId: string | null): Promise<TokenDTO>;
139
+ }
140
+ //# sourceMappingURL=token-sdk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-sdk.d.ts","sourceRoot":"","sources":["../../src/token/token-sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAW;IACpC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;gBAEhC,SAAS,EAAE,aAAa;IAUpC;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAItC;;;OAGG;IACG,aAAa,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAI9C;;;OAGG;IACG,oBAAoB,IAAI,OAAO,CAAC,QAAQ,CAAC;IAI/C;;;OAGG;IACG,eAAe,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAI5C;;;OAGG;IACG,eAAe,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAI5C;;;;;OAKG;IACG,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,eAAe,GAAE,MAAM,GAAG,IAAW,GAAG,OAAO,CAAC,QAAQ,CAAC;IAQ3G;;;;;OAKG;IACG,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI1F;;;;OAIG;IACG,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI3D;;;;OAIG;IACG,WAAW,CAAC,SAAS,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAItE;;;;;OAKG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIvF;;;;;;OAMG;IACG,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAItG;;;;OAIG;IACG,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAI9E;;;;OAIG;IACG,eAAe,CAAC,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAQrE;;;OAGG;IACH,eAAe,IAAI,YAAY;IAI/B;;;OAGG;IACH,WAAW,IAAI,QAAQ;IASvB;;;OAGG;IACG,eAAe,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAI5C;;;OAGG;IACG,mBAAmB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAIpD;;;OAGG;IACG,0BAA0B,IAAI,OAAO,CAAC,QAAQ,CAAC;IAIrD;;;OAGG;IACG,qBAAqB,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAIlD;;;OAGG;IACG,qBAAqB,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAIlD;;;OAGG;IACG,yBAAyB,CAAC,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC;CAG5G"}
package/dist/token.cjs ADDED
@@ -0,0 +1,537 @@
1
+ 'use strict';
2
+
3
+ class TokenApi {
4
+ constructor(apiClient) {
5
+ this.apiClient = apiClient;
6
+ this.basePath = '/tokens';
7
+ }
8
+ // ==========================================
9
+ // PUBLIC OPERATIONS
10
+ // ==========================================
11
+ /**
12
+ * PUBLIC: Get all remote tokens
13
+ * ENHANCED: Added admin filtering capability
14
+ */
15
+ async getRemoteTokens(includeInactive = false) {
16
+ const url = includeInactive ? `${this.basePath}?active=false` : `${this.basePath}`;
17
+ return this.apiClient.get(url);
18
+ }
19
+ /**
20
+ * PUBLIC: Get all remote token types
21
+ */
22
+ async getRemoteTokenTypes() {
23
+ return this.apiClient.get(`${this.basePath}/types`);
24
+ }
25
+ /**
26
+ * PUBLIC: Get active point token (was credit token)
27
+ */
28
+ async getRemoteActiveCreditToken() {
29
+ return this.apiClient.get(`${this.basePath}/points`);
30
+ }
31
+ /**
32
+ * PUBLIC: Get reward tokens
33
+ * ENHANCED: Added admin filtering capability
34
+ */
35
+ async getRemoteRewardTokens(includeInactive = false) {
36
+ const url = includeInactive ? `${this.basePath}/rewards?active=false` : `${this.basePath}/rewards`;
37
+ return this.apiClient.get(url);
38
+ }
39
+ /**
40
+ * PUBLIC: Get stamp tokens (was status tokens)
41
+ * ENHANCED: Added admin filtering capability
42
+ */
43
+ async getRemoteStatusTokens(includeInactive = false) {
44
+ const url = includeInactive ? `${this.basePath}/stamps?active=false` : `${this.basePath}/stamps`;
45
+ return this.apiClient.get(url);
46
+ }
47
+ /**
48
+ * PUBLIC: Get token by contract address
49
+ */
50
+ async getTokenByContractAddress(contractAddress, contractTokenId) {
51
+ let url = `${this.basePath}/address/${contractAddress}`;
52
+ if (contractTokenId) {
53
+ url += `?contractTokenId=${contractTokenId}`;
54
+ }
55
+ return this.apiClient.get(url);
56
+ }
57
+ // ==========================================
58
+ // ADMIN OPERATIONS
59
+ // ==========================================
60
+ /**
61
+ * ADMIN: Create new token
62
+ */
63
+ async createToken(tokenData) {
64
+ return this.apiClient.post(`${this.basePath}`, tokenData);
65
+ }
66
+ /**
67
+ * ADMIN: Update token
68
+ */
69
+ async updateToken(tokenId, tokenData) {
70
+ return this.apiClient.put(`${this.basePath}/${tokenId}`, tokenData);
71
+ }
72
+ /**
73
+ * ADMIN: Toggle token active status
74
+ * FIXED: Now calls correct endpoint
75
+ */
76
+ async toggleTokenActive(tokenId) {
77
+ return this.apiClient.put(`${this.basePath}/${tokenId}/status`, {});
78
+ }
79
+ /**
80
+ * ADMIN: Set mainnet contract address
81
+ */
82
+ async setMainnetContract(tokenId, contractAddress, chainId) {
83
+ return this.apiClient.put(`${this.basePath}/${tokenId}/mainnet`, {
84
+ contractAddress,
85
+ chainId
86
+ });
87
+ }
88
+ /**
89
+ * ADMIN: Create token metadata
90
+ */
91
+ async createTokenMetadata(tokenId, tokenData) {
92
+ return this.apiClient.post(`${this.basePath}/${tokenId}/metadata`, tokenData);
93
+ }
94
+ /**
95
+ * ADMIN: Toggle token metadata status (separate from token status)
96
+ */
97
+ async toggleTokenMetadataStatus(metadataId) {
98
+ return this.apiClient.put(`${this.basePath}/metadata/${metadataId}/status`, {});
99
+ }
100
+ /**
101
+ * ADMIN: Create token type
102
+ */
103
+ async createTokenType(tokenType) {
104
+ return this.apiClient.post(`${this.basePath}/types`, tokenType);
105
+ }
106
+ }
107
+
108
+ /**
109
+ * Platform-Agnostic Token Service
110
+ *
111
+ * Contains token business logic and operations that work across platforms.
112
+ * No framework dependencies - pure TypeScript business logic.
113
+ * Matches framework TokenApiService capabilities exactly.
114
+ */
115
+ class TokenService {
116
+ constructor(tokenApi) {
117
+ this.tokenApi = tokenApi;
118
+ }
119
+ // ==========================================
120
+ // PUBLIC OPERATIONS
121
+ // ==========================================
122
+ /**
123
+ * PUBLIC: Get all remote tokens
124
+ */
125
+ async getRemoteTokens() {
126
+ return this.tokenApi.getRemoteTokens();
127
+ }
128
+ /**
129
+ * PUBLIC: Get all remote token types
130
+ */
131
+ async getRemoteTokenTypes() {
132
+ return this.tokenApi.getRemoteTokenTypes();
133
+ }
134
+ /**
135
+ * PUBLIC: Get active credit token
136
+ */
137
+ async getRemoteActiveCreditToken() {
138
+ return this.tokenApi.getRemoteActiveCreditToken();
139
+ }
140
+ /**
141
+ * PUBLIC: Get reward tokens
142
+ */
143
+ async getRemoteRewardTokens() {
144
+ return this.tokenApi.getRemoteRewardTokens();
145
+ }
146
+ /**
147
+ * PUBLIC: Get status tokens
148
+ */
149
+ async getRemoteStatusTokens() {
150
+ return this.tokenApi.getRemoteStatusTokens();
151
+ }
152
+ /**
153
+ * PUBLIC: Get token by contract address
154
+ * ✅ FIXED: Matches framework parameter types exactly
155
+ */
156
+ async getTokenByContractAddress(contractAddress, contractTokenId) {
157
+ return this.tokenApi.getTokenByContractAddress(contractAddress, contractTokenId);
158
+ }
159
+ // ==========================================
160
+ // ADMIN OPERATIONS
161
+ // ==========================================
162
+ /**
163
+ * ADMIN: Create token metadata
164
+ */
165
+ async createTokenMetadata(tokenId, tokenData) {
166
+ return this.tokenApi.createTokenMetadata(tokenId, tokenData);
167
+ }
168
+ /**
169
+ * ADMIN: Toggle token active status
170
+ */
171
+ async toggleTokenActive(tokenId) {
172
+ return this.tokenApi.toggleTokenActive(tokenId);
173
+ }
174
+ /**
175
+ * ADMIN: Create new token
176
+ */
177
+ async createToken(tokenData) {
178
+ return this.tokenApi.createToken(tokenData);
179
+ }
180
+ /**
181
+ * ADMIN: Update token
182
+ */
183
+ async updateToken(tokenId, tokenData) {
184
+ return this.tokenApi.updateToken(tokenId, tokenData);
185
+ }
186
+ /**
187
+ * ADMIN: Set mainnet contract address
188
+ */
189
+ async setMainnetContract(tokenId, contractAddress, chainId) {
190
+ return this.tokenApi.setMainnetContract(tokenId, contractAddress, chainId);
191
+ }
192
+ /**
193
+ * ADMIN: Toggle token metadata status
194
+ */
195
+ async toggleTokenMetadataStatus(metadataId) {
196
+ return this.tokenApi.toggleTokenMetadataStatus(metadataId);
197
+ }
198
+ /**
199
+ * ADMIN: Create token type
200
+ */
201
+ async createTokenType(tokenType) {
202
+ return this.tokenApi.createTokenType(tokenType);
203
+ }
204
+ }
205
+
206
+ /**
207
+ * Token SDK - Class-based Promise SDK for Token Operations
208
+ *
209
+ * Modern, performant SDK with direct method access and excellent TypeScript support.
210
+ * Optimized for bundle size, performance, and developer experience.
211
+ *
212
+ * Usage:
213
+ * const tokenSDK = new TokenSDK(apiClient);
214
+ * const tokens = await tokenSDK.getTokens();
215
+ * const creditToken = await tokenSDK.getActiveCreditToken();
216
+ */
217
+ class TokenSDK {
218
+ constructor(apiClient) {
219
+ this.tokenApi = new TokenApi(apiClient);
220
+ this.tokenService = new TokenService(this.tokenApi);
221
+ }
222
+ // ==========================================
223
+ // CONVENIENCE METHODS - Direct Promise API
224
+ // ==========================================
225
+ // Simplified method names for better developer experience
226
+ /**
227
+ * Get all tokens
228
+ * @returns Promise with all available tokens
229
+ */
230
+ async getTokens() {
231
+ return this.tokenService.getRemoteTokens();
232
+ }
233
+ /**
234
+ * Get all token types
235
+ * @returns Promise with all available token types
236
+ */
237
+ async getTokenTypes() {
238
+ return this.tokenService.getRemoteTokenTypes();
239
+ }
240
+ /**
241
+ * Get the active credit token
242
+ * @returns Promise with the current active credit token
243
+ */
244
+ async getActiveCreditToken() {
245
+ return this.tokenService.getRemoteActiveCreditToken();
246
+ }
247
+ /**
248
+ * Get all reward tokens
249
+ * @returns Promise with all reward tokens
250
+ */
251
+ async getRewardTokens() {
252
+ return this.tokenService.getRemoteRewardTokens();
253
+ }
254
+ /**
255
+ * Get all status tokens
256
+ * @returns Promise with all status tokens
257
+ */
258
+ async getStatusTokens() {
259
+ return this.tokenService.getRemoteStatusTokens();
260
+ }
261
+ /**
262
+ * Get token by contract address
263
+ * @param contractAddress - The contract address to search for
264
+ * @param contractTokenId - Optional contract token ID
265
+ * @returns Promise with the matching token
266
+ */
267
+ async getTokenByContract(contractAddress, contractTokenId = null) {
268
+ return this.tokenService.getTokenByContractAddress(contractAddress, contractTokenId);
269
+ }
270
+ // ==========================================
271
+ // ADMIN METHODS - Token Management
272
+ // ==========================================
273
+ /**
274
+ * Create token metadata
275
+ * @param tokenId - The token ID
276
+ * @param tokenData - The token storage data
277
+ * @returns Promise with the updated token
278
+ */
279
+ async createTokenMetadata(tokenId, tokenData) {
280
+ return this.tokenService.createTokenMetadata(tokenId, tokenData);
281
+ }
282
+ /**
283
+ * Toggle token active status
284
+ * @param tokenId - The token ID to toggle
285
+ * @returns Promise with the updated token
286
+ */
287
+ async toggleTokenActive(tokenId) {
288
+ return this.tokenService.toggleTokenActive(tokenId);
289
+ }
290
+ /**
291
+ * Create a new token
292
+ * @param tokenData - The token creation data
293
+ * @returns Promise with the created token
294
+ */
295
+ async createToken(tokenData) {
296
+ return this.tokenService.createToken(tokenData);
297
+ }
298
+ /**
299
+ * Update an existing token
300
+ * @param tokenId - The token ID to update
301
+ * @param tokenData - The token update data
302
+ * @returns Promise with the updated token
303
+ */
304
+ async updateToken(tokenId, tokenData) {
305
+ return this.tokenService.updateToken(tokenId, tokenData);
306
+ }
307
+ /**
308
+ * Set mainnet contract address for a token
309
+ * @param tokenId - The token ID
310
+ * @param contractAddress - The contract address
311
+ * @param chainId - The blockchain chain ID
312
+ * @returns Promise with the updated token
313
+ */
314
+ async setMainnetContract(tokenId, contractAddress, chainId) {
315
+ return this.tokenService.setMainnetContract(tokenId, contractAddress, chainId);
316
+ }
317
+ /**
318
+ * Toggle token metadata status
319
+ * @param metadataId - The metadata ID to toggle
320
+ * @returns Promise with the updated metadata
321
+ */
322
+ async toggleTokenMetadataStatus(metadataId) {
323
+ return this.tokenService.toggleTokenMetadataStatus(metadataId);
324
+ }
325
+ /**
326
+ * Create a new token type
327
+ * @param tokenType - The token type data
328
+ * @returns Promise with the created token type
329
+ */
330
+ async createTokenType(tokenType) {
331
+ return this.tokenService.createTokenType(tokenType);
332
+ }
333
+ // ==========================================
334
+ // ADVANCED ACCESS - For Complex Operations
335
+ // ==========================================
336
+ /**
337
+ * Get direct access to the token service for advanced operations
338
+ * @returns The underlying TokenService instance
339
+ */
340
+ getTokenService() {
341
+ return this.tokenService;
342
+ }
343
+ /**
344
+ * Get direct access to the token API for low-level operations
345
+ * @returns The underlying TokenApi instance
346
+ */
347
+ getTokenApi() {
348
+ return this.tokenApi;
349
+ }
350
+ // ==========================================
351
+ // FRAMEWORK COMPATIBILITY METHODS
352
+ // ==========================================
353
+ // These maintain compatibility with existing framework method names
354
+ /**
355
+ * @deprecated Use getTokens() instead
356
+ * Framework compatibility method
357
+ */
358
+ async getRemoteTokens() {
359
+ return this.getTokens();
360
+ }
361
+ /**
362
+ * @deprecated Use getTokenTypes() instead
363
+ * Framework compatibility method
364
+ */
365
+ async getRemoteTokenTypes() {
366
+ return this.getTokenTypes();
367
+ }
368
+ /**
369
+ * @deprecated Use getActiveCreditToken() instead
370
+ * Framework compatibility method
371
+ */
372
+ async getRemoteActiveCreditToken() {
373
+ return this.getActiveCreditToken();
374
+ }
375
+ /**
376
+ * @deprecated Use getRewardTokens() instead
377
+ * Framework compatibility method
378
+ */
379
+ async getRemoteRewardTokens() {
380
+ return this.getRewardTokens();
381
+ }
382
+ /**
383
+ * @deprecated Use getStatusTokens() instead
384
+ * Framework compatibility method
385
+ */
386
+ async getRemoteStatusTokens() {
387
+ return this.getStatusTokens();
388
+ }
389
+ /**
390
+ * @deprecated Use getTokenByContract() instead
391
+ * Framework compatibility method
392
+ */
393
+ async getTokenByContractAddress(contractAddress, contractTokenId) {
394
+ return this.getTokenByContract(contractAddress, contractTokenId);
395
+ }
396
+ }
397
+
398
+ /**
399
+ * Abstract Base Token Service - Explicit Initialization Pattern
400
+ *
401
+ * Platform-agnostic token operations with Promise-based API.
402
+ * Framework services extend this and control initialization lifecycle.
403
+ *
404
+ * Benefits:
405
+ * - Explicit initialization control
406
+ * - Better error boundaries
407
+ * - Clear lifecycle management
408
+ * - Testable initialization state
409
+ * - Zero framework dependencies
410
+ */
411
+ class BaseTokenService {
412
+ constructor() {
413
+ this._isInitialized = false;
414
+ }
415
+ // ==========================================
416
+ // INITIALIZATION LIFECYCLE
417
+ // ==========================================
418
+ /**
419
+ * LIFECYCLE: Initialize token service with API client
420
+ * Must be called before using any token operations
421
+ */
422
+ initializeTokenService(apiClient) {
423
+ if (!apiClient) {
424
+ throw new Error('Cannot initialize TokenService: apiClient is null or undefined');
425
+ }
426
+ if (!this._isInitialized) {
427
+ this._tokenApi = new TokenApi(apiClient);
428
+ this._tokenBusinessService = new TokenService(this._tokenApi);
429
+ this._isInitialized = true;
430
+ }
431
+ }
432
+ /**
433
+ * LIFECYCLE: Check if token service is initialized
434
+ */
435
+ get isTokenServiceInitialized() {
436
+ return this._isInitialized;
437
+ }
438
+ /**
439
+ * INTERNAL: Get token business service (throws if not initialized)
440
+ */
441
+ get tokenBusinessService() {
442
+ if (!this._tokenBusinessService) {
443
+ throw new Error('TokenService not initialized. Call initializeTokenService(apiClient) first.');
444
+ }
445
+ return this._tokenBusinessService;
446
+ }
447
+ // ==========================================
448
+ // PUBLIC OPERATIONS
449
+ // ==========================================
450
+ /**
451
+ * PUBLIC: Get all remote tokens
452
+ */
453
+ getRemoteTokens() {
454
+ return this.tokenBusinessService.getRemoteTokens();
455
+ }
456
+ /**
457
+ * PUBLIC: Get all remote token types
458
+ */
459
+ getRemoteTokenTypes() {
460
+ return this.tokenBusinessService.getRemoteTokenTypes();
461
+ }
462
+ /**
463
+ * PUBLIC: Get active credit token
464
+ */
465
+ getRemoteActiveCreditToken() {
466
+ return this.tokenBusinessService.getRemoteActiveCreditToken();
467
+ }
468
+ /**
469
+ * PUBLIC: Get reward tokens
470
+ */
471
+ getRemoteRewardTokens() {
472
+ return this.tokenBusinessService.getRemoteRewardTokens();
473
+ }
474
+ /**
475
+ * PUBLIC: Get status tokens
476
+ */
477
+ getRemoteStatusTokens() {
478
+ return this.tokenBusinessService.getRemoteStatusTokens();
479
+ }
480
+ /**
481
+ * PUBLIC: Get token by contract address
482
+ */
483
+ getTokenByContractAddress(contractAddress, contractTokenId) {
484
+ return this.tokenBusinessService.getTokenByContractAddress(contractAddress, contractTokenId);
485
+ }
486
+ // ==========================================
487
+ // ADMIN OPERATIONS
488
+ // ==========================================
489
+ /**
490
+ * ADMIN: Create token metadata
491
+ */
492
+ createTokenMetadata(tokenId, tokenData) {
493
+ return this.tokenBusinessService.createTokenMetadata(tokenId, tokenData);
494
+ }
495
+ /**
496
+ * ADMIN: Toggle token active status
497
+ */
498
+ toggleTokenActive(tokenId) {
499
+ return this.tokenBusinessService.toggleTokenActive(tokenId);
500
+ }
501
+ /**
502
+ * ADMIN: Create new token
503
+ */
504
+ createToken(tokenData) {
505
+ return this.tokenBusinessService.createToken(tokenData);
506
+ }
507
+ /**
508
+ * ADMIN: Update token
509
+ */
510
+ updateToken(tokenId, tokenData) {
511
+ return this.tokenBusinessService.updateToken(tokenId, tokenData);
512
+ }
513
+ /**
514
+ * ADMIN: Set mainnet contract address
515
+ */
516
+ setMainnetContract(tokenId, contractAddress, chainId) {
517
+ return this.tokenBusinessService.setMainnetContract(tokenId, contractAddress, chainId);
518
+ }
519
+ /**
520
+ * ADMIN: Toggle token metadata status
521
+ */
522
+ toggleTokenMetadataStatus(metadataId) {
523
+ return this.tokenBusinessService.toggleTokenMetadataStatus(metadataId);
524
+ }
525
+ /**
526
+ * ADMIN: Create token type
527
+ */
528
+ createTokenType(tokenType) {
529
+ return this.tokenBusinessService.createTokenType(tokenType);
530
+ }
531
+ }
532
+
533
+ exports.BaseTokenService = BaseTokenService;
534
+ exports.TokenApi = TokenApi;
535
+ exports.TokenSDK = TokenSDK;
536
+ exports.TokenService = TokenService;
537
+ //# sourceMappingURL=token.cjs.map