@atxp/client 0.10.4 → 0.10.5

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 (320) hide show
  1. package/dist/_virtual/index17.js +2 -2
  2. package/dist/_virtual/index18.js +2 -2
  3. package/dist/_virtual/index19.js +2 -2
  4. package/dist/_virtual/index20.js +2 -2
  5. package/dist/_virtual/index8.js +2 -2
  6. package/dist/_virtual/index9.js +2 -2
  7. package/dist/atxpFetcher.d.ts.map +1 -1
  8. package/dist/atxpFetcher.js +16 -1
  9. package/dist/atxpFetcher.js.map +1 -1
  10. package/dist/index.cjs +23 -2
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.d.ts +3 -1
  13. package/dist/index.js +23 -2
  14. package/dist/index.js.map +1 -1
  15. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/index.js +1 -1
  16. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
  17. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -1
  18. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/index.js +1 -1
  19. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/index.js +1 -1
  20. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
  21. package/dist/oAuth.d.ts +3 -1
  22. package/dist/oAuth.d.ts.map +1 -1
  23. package/dist/oAuth.js +7 -1
  24. package/dist/oAuth.js.map +1 -1
  25. package/package.json +2 -2
  26. package/dist/_virtual/cache.js +0 -4
  27. package/dist/_virtual/cache.js.map +0 -1
  28. package/dist/_virtual/uri.all.js +0 -4
  29. package/dist/_virtual/uri.all.js.map +0 -1
  30. package/dist/atxpAccount.d.ts +0 -20
  31. package/dist/atxpAccount.d.ts.map +0 -1
  32. package/dist/atxpAccount.js +0 -161
  33. package/dist/atxpAccount.js.map +0 -1
  34. package/dist/atxpClient.d.ts +0 -12
  35. package/dist/atxpLocalAccount.d.ts +0 -50
  36. package/dist/base.cjs +0 -34
  37. package/dist/base.cjs.map +0 -1
  38. package/dist/base.d.ts +0 -4
  39. package/dist/base.d.ts.map +0 -1
  40. package/dist/base.js +0 -5
  41. package/dist/base.js.map +0 -1
  42. package/dist/baseAccount.d.ts +0 -20
  43. package/dist/baseAccount.d.ts.map +0 -1
  44. package/dist/baseAccount.js +0 -47
  45. package/dist/baseAccount.js.map +0 -1
  46. package/dist/baseConstants.d.ts +0 -10
  47. package/dist/baseConstants.d.ts.map +0 -1
  48. package/dist/baseConstants.js +0 -21
  49. package/dist/baseConstants.js.map +0 -1
  50. package/dist/basePaymentMaker.d.ts +0 -23
  51. package/dist/basePaymentMaker.d.ts.map +0 -1
  52. package/dist/basePaymentMaker.js +0 -169
  53. package/dist/basePaymentMaker.js.map +0 -1
  54. package/dist/clientTestHelpers.d.ts +0 -6
  55. package/dist/destinationMakers/atxpDestinationMaker.d.ts +0 -15
  56. package/dist/destinationMakers/index.d.ts +0 -9
  57. package/dist/destinationMakers/passthroughDestinationMaker.d.ts +0 -8
  58. package/dist/errors.d.ts +0 -117
  59. package/dist/node_modules/ajv/dist/ajv.js +0 -71
  60. package/dist/node_modules/ajv/dist/ajv.js.map +0 -1
  61. package/dist/node_modules/ajv/dist/compile/codegen/code.js +0 -169
  62. package/dist/node_modules/ajv/dist/compile/codegen/code.js.map +0 -1
  63. package/dist/node_modules/ajv/dist/compile/codegen/index.js +0 -712
  64. package/dist/node_modules/ajv/dist/compile/codegen/index.js.map +0 -1
  65. package/dist/node_modules/ajv/dist/compile/codegen/scope.js +0 -157
  66. package/dist/node_modules/ajv/dist/compile/codegen/scope.js.map +0 -1
  67. package/dist/node_modules/ajv/dist/compile/errors.js +0 -139
  68. package/dist/node_modules/ajv/dist/compile/errors.js.map +0 -1
  69. package/dist/node_modules/ajv/dist/compile/index.js +0 -259
  70. package/dist/node_modules/ajv/dist/compile/index.js.map +0 -1
  71. package/dist/node_modules/ajv/dist/compile/names.js +0 -40
  72. package/dist/node_modules/ajv/dist/compile/names.js.map +0 -1
  73. package/dist/node_modules/ajv/dist/compile/ref_error.js +0 -24
  74. package/dist/node_modules/ajv/dist/compile/ref_error.js.map +0 -1
  75. package/dist/node_modules/ajv/dist/compile/resolve.js +0 -169
  76. package/dist/node_modules/ajv/dist/compile/resolve.js.map +0 -1
  77. package/dist/node_modules/ajv/dist/compile/rules.js +0 -37
  78. package/dist/node_modules/ajv/dist/compile/rules.js.map +0 -1
  79. package/dist/node_modules/ajv/dist/compile/util.js +0 -191
  80. package/dist/node_modules/ajv/dist/compile/util.js.map +0 -1
  81. package/dist/node_modules/ajv/dist/compile/validate/applicability.js +0 -30
  82. package/dist/node_modules/ajv/dist/compile/validate/applicability.js.map +0 -1
  83. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -64
  84. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js.map +0 -1
  85. package/dist/node_modules/ajv/dist/compile/validate/dataType.js +0 -219
  86. package/dist/node_modules/ajv/dist/compile/validate/dataType.js.map +0 -1
  87. package/dist/node_modules/ajv/dist/compile/validate/defaults.js +0 -48
  88. package/dist/node_modules/ajv/dist/compile/validate/defaults.js.map +0 -1
  89. package/dist/node_modules/ajv/dist/compile/validate/index.js +0 -541
  90. package/dist/node_modules/ajv/dist/compile/validate/index.js.map +0 -1
  91. package/dist/node_modules/ajv/dist/compile/validate/keyword.js +0 -139
  92. package/dist/node_modules/ajv/dist/compile/validate/keyword.js.map +0 -1
  93. package/dist/node_modules/ajv/dist/compile/validate/subschema.js +0 -94
  94. package/dist/node_modules/ajv/dist/compile/validate/subschema.js.map +0 -1
  95. package/dist/node_modules/ajv/dist/core.js +0 -642
  96. package/dist/node_modules/ajv/dist/core.js.map +0 -1
  97. package/dist/node_modules/ajv/dist/refs/data.json.js +0 -31
  98. package/dist/node_modules/ajv/dist/refs/data.json.js.map +0 -1
  99. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +0 -254
  100. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +0 -1
  101. package/dist/node_modules/ajv/dist/runtime/equal.js +0 -19
  102. package/dist/node_modules/ajv/dist/runtime/equal.js.map +0 -1
  103. package/dist/node_modules/ajv/dist/runtime/ucs2length.js +0 -35
  104. package/dist/node_modules/ajv/dist/runtime/ucs2length.js.map +0 -1
  105. package/dist/node_modules/ajv/dist/runtime/uri.js +0 -18
  106. package/dist/node_modules/ajv/dist/runtime/uri.js.map +0 -1
  107. package/dist/node_modules/ajv/dist/runtime/validation_error.js +0 -22
  108. package/dist/node_modules/ajv/dist/runtime/validation_error.js.map +0 -1
  109. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -62
  110. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +0 -1
  111. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -121
  112. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +0 -1
  113. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -35
  114. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +0 -1
  115. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -24
  116. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +0 -1
  117. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -108
  118. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +0 -1
  119. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -101
  120. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +0 -1
  121. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -79
  122. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js.map +0 -1
  123. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -71
  124. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js.map +0 -1
  125. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -66
  126. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js.map +0 -1
  127. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -45
  128. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +0 -1
  129. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -38
  130. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js.map +0 -1
  131. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -73
  132. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +0 -1
  133. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -89
  134. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +0 -1
  135. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -24
  136. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +0 -1
  137. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -69
  138. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +0 -1
  139. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -51
  140. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +0 -1
  141. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -25
  142. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +0 -1
  143. package/dist/node_modules/ajv/dist/vocabularies/code.js +0 -145
  144. package/dist/node_modules/ajv/dist/vocabularies/code.js.map +0 -1
  145. package/dist/node_modules/ajv/dist/vocabularies/core/id.js +0 -21
  146. package/dist/node_modules/ajv/dist/vocabularies/core/id.js.map +0 -1
  147. package/dist/node_modules/ajv/dist/vocabularies/core/index.js +0 -29
  148. package/dist/node_modules/ajv/dist/vocabularies/core/index.js.map +0 -1
  149. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +0 -139
  150. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js.map +0 -1
  151. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -120
  152. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +0 -1
  153. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -20
  154. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +0 -1
  155. package/dist/node_modules/ajv/dist/vocabularies/draft7.js +0 -33
  156. package/dist/node_modules/ajv/dist/vocabularies/draft7.js.map +0 -1
  157. package/dist/node_modules/ajv/dist/vocabularies/format/format.js +0 -104
  158. package/dist/node_modules/ajv/dist/vocabularies/format/format.js.map +0 -1
  159. package/dist/node_modules/ajv/dist/vocabularies/format/index.js +0 -18
  160. package/dist/node_modules/ajv/dist/vocabularies/format/index.js.map +0 -1
  161. package/dist/node_modules/ajv/dist/vocabularies/metadata.js +0 -29
  162. package/dist/node_modules/ajv/dist/vocabularies/metadata.js.map +0 -1
  163. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +0 -39
  164. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js.map +0 -1
  165. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -62
  166. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js.map +0 -1
  167. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +0 -54
  168. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js.map +0 -1
  169. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -36
  170. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +0 -1
  171. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -41
  172. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +0 -1
  173. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -39
  174. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +0 -1
  175. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -36
  176. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +0 -1
  177. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -38
  178. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +0 -1
  179. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -37
  180. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +0 -1
  181. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +0 -93
  182. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js.map +0 -1
  183. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -79
  184. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +0 -1
  185. package/dist/node_modules/ajv/lib/ajv.js +0 -531
  186. package/dist/node_modules/ajv/lib/ajv.js.map +0 -1
  187. package/dist/node_modules/ajv/lib/cache.js +0 -37
  188. package/dist/node_modules/ajv/lib/cache.js.map +0 -1
  189. package/dist/node_modules/ajv/lib/compile/async.js +0 -102
  190. package/dist/node_modules/ajv/lib/compile/async.js.map +0 -1
  191. package/dist/node_modules/ajv/lib/compile/error_classes.js +0 -46
  192. package/dist/node_modules/ajv/lib/compile/error_classes.js.map +0 -1
  193. package/dist/node_modules/ajv/lib/compile/formats.js +0 -154
  194. package/dist/node_modules/ajv/lib/compile/formats.js.map +0 -1
  195. package/dist/node_modules/ajv/lib/compile/index.js +0 -404
  196. package/dist/node_modules/ajv/lib/compile/index.js.map +0 -1
  197. package/dist/node_modules/ajv/lib/compile/resolve.js +0 -286
  198. package/dist/node_modules/ajv/lib/compile/resolve.js.map +0 -1
  199. package/dist/node_modules/ajv/lib/compile/rules.js +0 -79
  200. package/dist/node_modules/ajv/lib/compile/rules.js.map +0 -1
  201. package/dist/node_modules/ajv/lib/compile/schema_obj.js +0 -21
  202. package/dist/node_modules/ajv/lib/compile/schema_obj.js.map +0 -1
  203. package/dist/node_modules/ajv/lib/compile/ucs2length.js +0 -30
  204. package/dist/node_modules/ajv/lib/compile/ucs2length.js.map +0 -1
  205. package/dist/node_modules/ajv/lib/compile/util.js +0 -252
  206. package/dist/node_modules/ajv/lib/compile/util.js.map +0 -1
  207. package/dist/node_modules/ajv/lib/data.js +0 -59
  208. package/dist/node_modules/ajv/lib/data.js.map +0 -1
  209. package/dist/node_modules/ajv/lib/definition_schema.js +0 -49
  210. package/dist/node_modules/ajv/lib/definition_schema.js.map +0 -1
  211. package/dist/node_modules/ajv/lib/dotjs/_limit.js +0 -173
  212. package/dist/node_modules/ajv/lib/dotjs/_limit.js.map +0 -1
  213. package/dist/node_modules/ajv/lib/dotjs/_limitItems.js +0 -90
  214. package/dist/node_modules/ajv/lib/dotjs/_limitItems.js.map +0 -1
  215. package/dist/node_modules/ajv/lib/dotjs/_limitLength.js +0 -95
  216. package/dist/node_modules/ajv/lib/dotjs/_limitLength.js.map +0 -1
  217. package/dist/node_modules/ajv/lib/dotjs/_limitProperties.js +0 -90
  218. package/dist/node_modules/ajv/lib/dotjs/_limitProperties.js.map +0 -1
  219. package/dist/node_modules/ajv/lib/dotjs/allOf.js +0 -52
  220. package/dist/node_modules/ajv/lib/dotjs/allOf.js.map +0 -1
  221. package/dist/node_modules/ajv/lib/dotjs/anyOf.js +0 -83
  222. package/dist/node_modules/ajv/lib/dotjs/anyOf.js.map +0 -1
  223. package/dist/node_modules/ajv/lib/dotjs/comment.js +0 -24
  224. package/dist/node_modules/ajv/lib/dotjs/comment.js.map +0 -1
  225. package/dist/node_modules/ajv/lib/dotjs/const.js +0 -62
  226. package/dist/node_modules/ajv/lib/dotjs/const.js.map +0 -1
  227. package/dist/node_modules/ajv/lib/dotjs/contains.js +0 -91
  228. package/dist/node_modules/ajv/lib/dotjs/contains.js.map +0 -1
  229. package/dist/node_modules/ajv/lib/dotjs/custom.js +0 -238
  230. package/dist/node_modules/ajv/lib/dotjs/custom.js.map +0 -1
  231. package/dist/node_modules/ajv/lib/dotjs/dependencies.js +0 -178
  232. package/dist/node_modules/ajv/lib/dotjs/dependencies.js.map +0 -1
  233. package/dist/node_modules/ajv/lib/dotjs/enum.js +0 -72
  234. package/dist/node_modules/ajv/lib/dotjs/enum.js.map +0 -1
  235. package/dist/node_modules/ajv/lib/dotjs/format.js +0 -160
  236. package/dist/node_modules/ajv/lib/dotjs/format.js.map +0 -1
  237. package/dist/node_modules/ajv/lib/dotjs/if.js +0 -113
  238. package/dist/node_modules/ajv/lib/dotjs/if.js.map +0 -1
  239. package/dist/node_modules/ajv/lib/dotjs/index.js +0 -68
  240. package/dist/node_modules/ajv/lib/dotjs/index.js.map +0 -1
  241. package/dist/node_modules/ajv/lib/dotjs/items.js +0 -150
  242. package/dist/node_modules/ajv/lib/dotjs/items.js.map +0 -1
  243. package/dist/node_modules/ajv/lib/dotjs/multipleOf.js +0 -90
  244. package/dist/node_modules/ajv/lib/dotjs/multipleOf.js.map +0 -1
  245. package/dist/node_modules/ajv/lib/dotjs/not.js +0 -94
  246. package/dist/node_modules/ajv/lib/dotjs/not.js.map +0 -1
  247. package/dist/node_modules/ajv/lib/dotjs/oneOf.js +0 -83
  248. package/dist/node_modules/ajv/lib/dotjs/oneOf.js.map +0 -1
  249. package/dist/node_modules/ajv/lib/dotjs/pattern.js +0 -85
  250. package/dist/node_modules/ajv/lib/dotjs/pattern.js.map +0 -1
  251. package/dist/node_modules/ajv/lib/dotjs/properties.js +0 -345
  252. package/dist/node_modules/ajv/lib/dotjs/properties.js.map +0 -1
  253. package/dist/node_modules/ajv/lib/dotjs/propertyNames.js +0 -91
  254. package/dist/node_modules/ajv/lib/dotjs/propertyNames.js.map +0 -1
  255. package/dist/node_modules/ajv/lib/dotjs/ref.js +0 -134
  256. package/dist/node_modules/ajv/lib/dotjs/ref.js.map +0 -1
  257. package/dist/node_modules/ajv/lib/dotjs/required.js +0 -276
  258. package/dist/node_modules/ajv/lib/dotjs/required.js.map +0 -1
  259. package/dist/node_modules/ajv/lib/dotjs/uniqueItems.js +0 -96
  260. package/dist/node_modules/ajv/lib/dotjs/uniqueItems.js.map +0 -1
  261. package/dist/node_modules/ajv/lib/dotjs/validate.js +0 -492
  262. package/dist/node_modules/ajv/lib/dotjs/validate.js.map +0 -1
  263. package/dist/node_modules/ajv/lib/keyword.js +0 -159
  264. package/dist/node_modules/ajv/lib/keyword.js.map +0 -1
  265. package/dist/node_modules/ajv/lib/refs/data.json.js +0 -33
  266. package/dist/node_modules/ajv/lib/refs/data.json.js.map +0 -1
  267. package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json.js +0 -254
  268. package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json.js.map +0 -1
  269. package/dist/node_modules/fast-json-stable-stringify/index.js +0 -69
  270. package/dist/node_modules/fast-json-stable-stringify/index.js.map +0 -1
  271. package/dist/node_modules/json-schema-traverse/index.js +0 -104
  272. package/dist/node_modules/json-schema-traverse/index.js.map +0 -1
  273. package/dist/node_modules/uri-js/dist/es5/uri.all.js +0 -1418
  274. package/dist/node_modules/uri-js/dist/es5/uri.all.js.map +0 -1
  275. package/dist/node_modules/zod/v3/ZodError.js +0 -133
  276. package/dist/node_modules/zod/v3/ZodError.js.map +0 -1
  277. package/dist/node_modules/zod/v3/errors.js +0 -9
  278. package/dist/node_modules/zod/v3/errors.js.map +0 -1
  279. package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -9
  280. package/dist/node_modules/zod/v3/helpers/errorUtil.js.map +0 -1
  281. package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -112
  282. package/dist/node_modules/zod/v3/helpers/parseUtil.js.map +0 -1
  283. package/dist/node_modules/zod/v3/helpers/util.js +0 -136
  284. package/dist/node_modules/zod/v3/helpers/util.js.map +0 -1
  285. package/dist/node_modules/zod/v3/locales/en.js +0 -112
  286. package/dist/node_modules/zod/v3/locales/en.js.map +0 -1
  287. package/dist/node_modules/zod/v3/types.js +0 -3491
  288. package/dist/node_modules/zod/v3/types.js.map +0 -1
  289. package/dist/polygon.cjs +0 -39
  290. package/dist/polygon.cjs.map +0 -1
  291. package/dist/polygon.d.ts +0 -1
  292. package/dist/polygon.d.ts.map +0 -1
  293. package/dist/polygon.js +0 -2
  294. package/dist/polygon.js.map +0 -1
  295. package/dist/polygonConstants.d.ts +0 -53
  296. package/dist/setup.expo.d.ts +0 -2
  297. package/dist/solana.cjs +0 -20
  298. package/dist/solana.cjs.map +0 -1
  299. package/dist/solana.d.ts +0 -2
  300. package/dist/solana.d.ts.map +0 -1
  301. package/dist/solana.js +0 -3
  302. package/dist/solana.js.map +0 -1
  303. package/dist/solanaAccount.d.ts +0 -13
  304. package/dist/solanaAccount.d.ts.map +0 -1
  305. package/dist/solanaAccount.js +0 -34
  306. package/dist/solanaAccount.js.map +0 -1
  307. package/dist/solanaPaymentMaker.d.ts +0 -25
  308. package/dist/solanaPaymentMaker.d.ts.map +0 -1
  309. package/dist/solanaPaymentMaker.js +0 -108
  310. package/dist/solanaPaymentMaker.js.map +0 -1
  311. package/dist/types.d.ts +0 -75
  312. package/dist/types.js +0 -152
  313. package/dist/types.js.map +0 -1
  314. package/dist/world.cjs +0 -39
  315. package/dist/world.cjs.map +0 -1
  316. package/dist/world.d.ts +0 -1
  317. package/dist/world.d.ts.map +0 -1
  318. package/dist/world.js +0 -2
  319. package/dist/world.js.map +0 -1
  320. package/dist/worldConstants.d.ts +0 -53
package/dist/polygon.cjs DELETED
@@ -1,39 +0,0 @@
1
- 'use strict';
2
-
3
- var polygonConstants_js = require('./polygonConstants.js');
4
-
5
-
6
-
7
- Object.defineProperty(exports, "POLYGON_AMOY", {
8
- enumerable: true,
9
- get: function () { return polygonConstants_js.POLYGON_AMOY; }
10
- });
11
- Object.defineProperty(exports, "POLYGON_MAINNET", {
12
- enumerable: true,
13
- get: function () { return polygonConstants_js.POLYGON_MAINNET; }
14
- });
15
- Object.defineProperty(exports, "USDC_CONTRACT_ADDRESS_POLYGON_AMOY", {
16
- enumerable: true,
17
- get: function () { return polygonConstants_js.USDC_CONTRACT_ADDRESS_POLYGON_AMOY; }
18
- });
19
- Object.defineProperty(exports, "USDC_CONTRACT_ADDRESS_POLYGON_MAINNET", {
20
- enumerable: true,
21
- get: function () { return polygonConstants_js.USDC_CONTRACT_ADDRESS_POLYGON_MAINNET; }
22
- });
23
- Object.defineProperty(exports, "getPolygonAmoyWithRPC", {
24
- enumerable: true,
25
- get: function () { return polygonConstants_js.getPolygonAmoyWithRPC; }
26
- });
27
- Object.defineProperty(exports, "getPolygonByChainId", {
28
- enumerable: true,
29
- get: function () { return polygonConstants_js.getPolygonByChainId; }
30
- });
31
- Object.defineProperty(exports, "getPolygonMainnetWithRPC", {
32
- enumerable: true,
33
- get: function () { return polygonConstants_js.getPolygonMainnetWithRPC; }
34
- });
35
- Object.defineProperty(exports, "getPolygonUSDCAddress", {
36
- enumerable: true,
37
- get: function () { return polygonConstants_js.getPolygonUSDCAddress; }
38
- });
39
- //# sourceMappingURL=polygon.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"polygon.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/polygon.d.ts DELETED
@@ -1 +0,0 @@
1
- export { POLYGON_AMOY, POLYGON_MAINNET, PolygonChain, USDC_CONTRACT_ADDRESS_POLYGON_AMOY, USDC_CONTRACT_ADDRESS_POLYGON_MAINNET, getPolygonAmoyWithRPC, getPolygonByChainId, getPolygonMainnetWithRPC, getPolygonUSDCAddress } from './polygonConstants.js';
@@ -1 +0,0 @@
1
- {"version":3,"file":"polygon.d.ts","sourceRoot":"","sources":["../src/polygon.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,qCAAqC,EACrC,kCAAkC,EAClC,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC"}
package/dist/polygon.js DELETED
@@ -1,2 +0,0 @@
1
- export { POLYGON_AMOY, POLYGON_MAINNET, USDC_CONTRACT_ADDRESS_POLYGON_AMOY, USDC_CONTRACT_ADDRESS_POLYGON_MAINNET, getPolygonAmoyWithRPC, getPolygonByChainId, getPolygonMainnetWithRPC, getPolygonUSDCAddress } from './polygonConstants.js';
2
- //# sourceMappingURL=polygon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"polygon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,53 +0,0 @@
1
- /**
2
- * Polygon Chain configuration type, compatible with viem's Chain interface
3
- */
4
- export type PolygonChain = {
5
- readonly id: number;
6
- readonly name: string;
7
- readonly nativeCurrency: {
8
- readonly name: string;
9
- readonly symbol: string;
10
- readonly decimals: number;
11
- };
12
- readonly rpcUrls: {
13
- readonly default: {
14
- readonly http: readonly string[];
15
- };
16
- };
17
- readonly blockExplorers: {
18
- readonly default: {
19
- readonly name: string;
20
- readonly url: string;
21
- };
22
- };
23
- readonly testnet?: boolean;
24
- };
25
- export declare const USDC_CONTRACT_ADDRESS_POLYGON_MAINNET = "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359";
26
- export declare const USDC_CONTRACT_ADDRESS_POLYGON_AMOY = "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582";
27
- export declare const POLYGON_MAINNET: PolygonChain;
28
- export declare const POLYGON_AMOY: PolygonChain;
29
- /**
30
- * Get Polygon Mainnet configuration with custom RPC URL (e.g., with API key)
31
- * @param rpcUrl - Custom RPC URL, e.g., 'https://polygon-mainnet.g.alchemy.com/v2/YOUR_API_KEY'
32
- */
33
- export declare const getPolygonMainnetWithRPC: (rpcUrl: string) => PolygonChain;
34
- /**
35
- * Get Polygon Amoy Testnet configuration with custom RPC URL (e.g., with API key)
36
- * @param rpcUrl - Custom RPC URL, e.g., 'https://polygon-amoy.g.alchemy.com/v2/YOUR_API_KEY'
37
- */
38
- export declare const getPolygonAmoyWithRPC: (rpcUrl: string) => PolygonChain;
39
- /**
40
- * Get Polygon Chain configuration by chain ID
41
- * @param chainId - Chain ID (137 for mainnet, 80002 for Amoy testnet)
42
- * @returns Polygon Chain configuration
43
- * @throws Error if chain ID is not supported
44
- */
45
- export declare const getPolygonByChainId: (chainId: number) => PolygonChain;
46
- /**
47
- * Get USDC contract address for Polygon by chain ID
48
- * @param chainId - Chain ID (137 for mainnet, 80002 for Amoy testnet)
49
- * @returns USDC contract address
50
- * @throws Error if chain ID is not supported
51
- */
52
- export declare const getPolygonUSDCAddress: (chainId: number) => string;
53
- //# sourceMappingURL=polygonConstants.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=setup.expo.d.ts.map
package/dist/solana.cjs DELETED
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- var solanaPaymentMaker_js = require('./solanaPaymentMaker.js');
4
- var solanaAccount_js = require('./solanaAccount.js');
5
-
6
-
7
-
8
- Object.defineProperty(exports, "SolanaPaymentMaker", {
9
- enumerable: true,
10
- get: function () { return solanaPaymentMaker_js.SolanaPaymentMaker; }
11
- });
12
- Object.defineProperty(exports, "ValidateTransferError", {
13
- enumerable: true,
14
- get: function () { return solanaPaymentMaker_js.ValidateTransferError; }
15
- });
16
- Object.defineProperty(exports, "SolanaAccount", {
17
- enumerable: true,
18
- get: function () { return solanaAccount_js.SolanaAccount; }
19
- });
20
- //# sourceMappingURL=solana.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"solana.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
package/dist/solana.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { SolanaPaymentMaker, ValidateTransferError } from './solanaPaymentMaker.js';
2
- export { SolanaAccount } from './solanaAccount.js';
@@ -1 +0,0 @@
1
- {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../src/solana.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,aAAa,EACd,MAAM,oBAAoB,CAAC"}
package/dist/solana.js DELETED
@@ -1,3 +0,0 @@
1
- export { SolanaPaymentMaker, ValidateTransferError } from './solanaPaymentMaker.js';
2
- export { SolanaAccount } from './solanaAccount.js';
3
- //# sourceMappingURL=solana.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"solana.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,13 +0,0 @@
1
- import type { Account, PaymentMaker } from './types.js';
2
- import type { AccountId, Source } from '@atxp/common';
3
- export declare class SolanaAccount implements Account {
4
- accountId: AccountId;
5
- paymentMakers: PaymentMaker[];
6
- private sourcePublicKey;
7
- constructor(solanaEndpoint: string, sourceSecretKey: string);
8
- /**
9
- * Get sources for this account
10
- */
11
- getSources(): Promise<Source[]>;
12
- }
13
- //# sourceMappingURL=solanaAccount.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"solanaAccount.d.ts","sourceRoot":"","sources":["../src/solanaAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAKtD,qBAAa,aAAc,YAAW,OAAO;IAC3C,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,OAAO,CAAC,eAAe,CAAS;gBAEpB,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM;IAiB3D;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAOtC"}
@@ -1,34 +0,0 @@
1
- import { SolanaPaymentMaker } from './solanaPaymentMaker.js';
2
- import { Keypair } from '@solana/web3.js';
3
- import bs58 from 'bs58';
4
-
5
- class SolanaAccount {
6
- constructor(solanaEndpoint, sourceSecretKey) {
7
- if (!solanaEndpoint) {
8
- throw new Error('Solana endpoint is required');
9
- }
10
- if (!sourceSecretKey) {
11
- throw new Error('Source secret key is required');
12
- }
13
- const source = Keypair.fromSecretKey(bs58.decode(sourceSecretKey));
14
- this.sourcePublicKey = source.publicKey.toBase58();
15
- // Format accountId as network:address
16
- this.accountId = `solana:${this.sourcePublicKey}`;
17
- this.paymentMakers = [
18
- new SolanaPaymentMaker(solanaEndpoint, sourceSecretKey)
19
- ];
20
- }
21
- /**
22
- * Get sources for this account
23
- */
24
- async getSources() {
25
- return [{
26
- address: this.sourcePublicKey,
27
- chain: 'solana',
28
- walletType: 'eoa'
29
- }];
30
- }
31
- }
32
-
33
- export { SolanaAccount };
34
- //# sourceMappingURL=solanaAccount.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"solanaAccount.js","sources":["../src/solanaAccount.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;MAMa,aAAa,CAAA;IAKxB,WAAA,CAAY,cAAsB,EAAE,eAAuB,EAAA;QACzD,IAAI,CAAC,cAAc,EAAE;AACnB,YAAA,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC;QAChD;QACA,IAAI,CAAC,eAAe,EAAE;AACpB,YAAA,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC;QAClD;AACA,QAAA,MAAM,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QAClE,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE;;QAGlD,IAAI,CAAC,SAAS,GAAG,CAAA,OAAA,EAAU,IAAI,CAAC,eAAe,EAAe;QAC9D,IAAI,CAAC,aAAa,GAAG;AACnB,YAAA,IAAI,kBAAkB,CAAC,cAAc,EAAE,eAAe;SACvD;IACH;AAEA;;AAEG;AACH,IAAA,MAAM,UAAU,GAAA;AACd,QAAA,OAAO,CAAC;gBACN,OAAO,EAAE,IAAI,CAAC,eAAe;AAC7B,gBAAA,KAAK,EAAE,QAAQ;AACf,gBAAA,UAAU,EAAE;AACb,aAAA,CAAC;IACJ;AACD;;;;"}
@@ -1,25 +0,0 @@
1
- import type { PaymentMaker } from './types.js';
2
- import { ValidateTransferError as _ValidateTransferError } from "@solana/pay";
3
- import BigNumber from "bignumber.js";
4
- import { Currency, AccountId, PaymentIdentifier, Destination } from '@atxp/common';
5
- import { Logger } from '@atxp/common';
6
- export declare const ValidateTransferError: typeof _ValidateTransferError;
7
- export declare class SolanaPaymentMaker implements PaymentMaker {
8
- private connection;
9
- private source;
10
- private logger;
11
- constructor(solanaEndpoint: string, sourceSecretKey: string, logger?: Logger);
12
- getSourceAddress(_params: {
13
- amount: BigNumber;
14
- currency: Currency;
15
- receiver: string;
16
- memo: string;
17
- }): string;
18
- generateJWT: ({ paymentRequestId, codeChallenge, accountId }: {
19
- paymentRequestId: string;
20
- codeChallenge: string;
21
- accountId?: AccountId | null;
22
- }) => Promise<string>;
23
- makePayment: (destinations: Destination[], memo: string, _paymentRequestId?: string) => Promise<PaymentIdentifier | null>;
24
- }
25
- //# sourceMappingURL=solanaPaymentMaker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"solanaPaymentMaker.d.ts","sourceRoot":"","sources":["../src/solanaPaymentMaker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAkB,qBAAqB,IAAI,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAG9F,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAe,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhG,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAMtC,eAAO,MAAM,qBAAqB,+BAAyB,CAAC;AAE5D,qBAAa,kBAAmB,YAAW,YAAY;IACrD,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,MAAM,CAAS;gBAEX,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IAY5E,gBAAgB,CAAC,OAAO,EAAE;QAAC,MAAM,EAAE,SAAS,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,MAAM;IAI1G,WAAW,GAAS,gDAA8C;QAAC,gBAAgB,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;KAAC,KAAG,OAAO,CAAC,MAAM,CAAC,CAelK;IAED,WAAW,GAAU,cAAc,WAAW,EAAE,EAAE,MAAM,MAAM,EAAE,oBAAoB,MAAM,KAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAyF7H;CACF"}
@@ -1,108 +0,0 @@
1
- import { PaymentNetworkError, InsufficientFundsError } from './types.js';
2
- import { PublicKey, ComputeBudgetProgram, sendAndConfirmTransaction, Connection, Keypair } from '@solana/web3.js';
3
- import { ValidateTransferError as ValidateTransferError$1, createTransfer } from '@solana/pay';
4
- import { getAssociatedTokenAddress, getAccount } from '@solana/spl-token';
5
- import bs58 from 'bs58';
6
- import BigNumber from 'bignumber.js';
7
- import { generateJWT, ConsoleLogger } from '@atxp/common';
8
- import { importJWK } from 'jose';
9
-
10
- // this is a global public key for USDC on the solana mainnet
11
- const USDC_MINT = new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v");
12
- const ValidateTransferError = ValidateTransferError$1;
13
- class SolanaPaymentMaker {
14
- constructor(solanaEndpoint, sourceSecretKey, logger) {
15
- this.generateJWT = async ({ paymentRequestId, codeChallenge, accountId }) => {
16
- // Solana/Web3.js secretKey is 64 bytes:
17
- // first 32 bytes are the private scalar, last 32 are the public key.
18
- // JWK expects only the 32-byte private scalar for 'd'
19
- const jwk = {
20
- kty: 'OKP',
21
- crv: 'Ed25519',
22
- d: Buffer.from(this.source.secretKey.slice(0, 32)).toString('base64url'),
23
- x: Buffer.from(this.source.publicKey.toBytes()).toString('base64url'),
24
- };
25
- const privateKey = await importJWK(jwk, 'EdDSA');
26
- if (!(privateKey instanceof CryptoKey)) {
27
- throw new Error('Expected CryptoKey from importJWK');
28
- }
29
- return generateJWT(this.source.publicKey.toBase58(), privateKey, paymentRequestId || '', codeChallenge || '', accountId);
30
- };
31
- this.makePayment = async (destinations, memo, _paymentRequestId) => {
32
- // Filter to solana chain destinations
33
- const solanaDestinations = destinations.filter(d => d.chain === 'solana');
34
- if (solanaDestinations.length === 0) {
35
- this.logger.debug('SolanaPaymentMaker: No solana destinations found, cannot handle payment');
36
- return null; // Cannot handle these destinations
37
- }
38
- // Pick first solana destination
39
- const dest = solanaDestinations[0];
40
- const amount = dest.amount;
41
- const currency = dest.currency;
42
- const receiver = dest.address;
43
- if (currency.toUpperCase() !== 'USDC') {
44
- throw new PaymentNetworkError('Only USDC currency is supported; received ' + currency);
45
- }
46
- const receiverKey = new PublicKey(receiver);
47
- this.logger.info(`Making payment of ${amount} ${currency} to ${receiver} on Solana from ${this.source.publicKey.toBase58()}`);
48
- try {
49
- // Check balance before attempting payment
50
- const tokenAccountAddress = await getAssociatedTokenAddress(USDC_MINT, this.source.publicKey);
51
- const tokenAccount = await getAccount(this.connection, tokenAccountAddress);
52
- const balance = new BigNumber(tokenAccount.amount.toString()).dividedBy(10 ** 6); // USDC has 6 decimals
53
- if (balance.lt(amount)) {
54
- this.logger.warn(`Insufficient ${currency} balance for payment. Required: ${amount}, Available: ${balance}`);
55
- throw new InsufficientFundsError(currency, amount, balance, 'solana');
56
- }
57
- // Get the destination token account address (this will be the transactionId)
58
- const destinationTokenAccount = await getAssociatedTokenAddress(USDC_MINT, receiverKey);
59
- // Increase compute units to handle both memo and token transfer
60
- // Memo uses ~6000 CUs, token transfer needs ~6500 CUs
61
- const modifyComputeUnits = ComputeBudgetProgram.setComputeUnitLimit({
62
- units: 50000,
63
- });
64
- const addPriorityFee = ComputeBudgetProgram.setComputeUnitPrice({
65
- microLamports: 20000,
66
- });
67
- const transaction = await createTransfer(this.connection, this.source.publicKey, {
68
- amount: amount,
69
- recipient: receiverKey,
70
- splToken: USDC_MINT,
71
- memo,
72
- });
73
- transaction.add(modifyComputeUnits);
74
- transaction.add(addPriorityFee);
75
- const transactionSignature = await sendAndConfirmTransaction(this.connection, transaction, [this.source]);
76
- // Return transaction signature as transactionId and token account address as transactionSubId
77
- return {
78
- transactionId: transactionSignature,
79
- transactionSubId: destinationTokenAccount.toBase58(),
80
- chain: 'solana',
81
- currency: 'USDC'
82
- };
83
- }
84
- catch (error) {
85
- if (error instanceof InsufficientFundsError || error instanceof PaymentNetworkError) {
86
- throw error;
87
- }
88
- // Wrap other errors in PaymentNetworkError
89
- throw new PaymentNetworkError(`Payment failed on Solana network: ${error.message}`, error);
90
- }
91
- };
92
- if (!solanaEndpoint) {
93
- throw new Error('Solana endpoint is required');
94
- }
95
- if (!sourceSecretKey) {
96
- throw new Error('Source secret key is required');
97
- }
98
- this.connection = new Connection(solanaEndpoint, { commitment: 'confirmed' });
99
- this.source = Keypair.fromSecretKey(bs58.decode(sourceSecretKey));
100
- this.logger = logger ?? new ConsoleLogger();
101
- }
102
- getSourceAddress(_params) {
103
- return this.source.publicKey.toBase58();
104
- }
105
- }
106
-
107
- export { SolanaPaymentMaker, ValidateTransferError };
108
- //# sourceMappingURL=solanaPaymentMaker.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"solanaPaymentMaker.js","sources":["../src/solanaPaymentMaker.ts"],"sourcesContent":[null],"names":["_ValidateTransferError"],"mappings":";;;;;;;;;AAYA;AACA,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,8CAA8C,CAAC;AAExE,MAAM,qBAAqB,GAAGA;MAExB,kBAAkB,CAAA;AAK7B,IAAA,WAAA,CAAY,cAAsB,EAAE,eAAuB,EAAE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eAAe,EAAE;AACpB,YAAA,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC;QAClD;AACA,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,cAAc,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;AAC7E,QAAA,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QACjE,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,IAAI,aAAa,EAAE;IAC7C;AAEA,IAAA,gBAAgB,CAAC,OAAgF,EAAA;QAC/F,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE;IACzC;AA6GD;;;;"}
package/dist/types.d.ts DELETED
@@ -1,75 +0,0 @@
1
- import { AuthorizationServerUrl, Currency, Logger, Network, OAuthDb, FetchLike, Account, PaymentMaker, AccountId, DestinationMaker } from "@atxp/common";
2
- import { ClientOptions } from "@modelcontextprotocol/sdk/client/index.js";
3
- import { Implementation } from "@modelcontextprotocol/sdk/types.js";
4
- export type Hex = `0x${string}`;
5
- type AccountPrefix = Network;
6
- export type AccountIdString = `${AccountPrefix}${string}`;
7
- export type ProspectivePayment = {
8
- accountId: AccountId;
9
- resourceUrl: string;
10
- resourceName: string;
11
- currency: Currency;
12
- amount: BigNumber;
13
- iss: string;
14
- };
15
- /**
16
- * Rich context provided when a payment fails
17
- */
18
- export interface PaymentFailureContext {
19
- /** The payment that failed */
20
- payment: ProspectivePayment;
21
- /** The error that caused the failure */
22
- error: Error;
23
- /** Networks that were attempted for payment */
24
- attemptedNetworks: string[];
25
- /** Map of network to error for each failed attempt */
26
- failureReasons: Map<string, Error>;
27
- /** Whether the payment can be retried */
28
- retryable: boolean;
29
- /** Timestamp when the failure occurred */
30
- timestamp: Date;
31
- }
32
- export type ClientConfig = {
33
- mcpServer: string;
34
- account: Account;
35
- atxpAccountsServer: string;
36
- destinationMakers: Map<Network, DestinationMaker>;
37
- allowedAuthorizationServers: AuthorizationServerUrl[];
38
- approvePayment: (payment: ProspectivePayment) => Promise<boolean>;
39
- oAuthDb: OAuthDb;
40
- fetchFn: FetchLike;
41
- oAuthChannelFetch: FetchLike;
42
- allowHttp: boolean;
43
- logger: Logger;
44
- clientInfo: Implementation;
45
- clientOptions: ClientOptions;
46
- onAuthorize: (args: {
47
- authorizationServer: AuthorizationServerUrl;
48
- userId: string;
49
- }) => Promise<void>;
50
- onAuthorizeFailure: (args: {
51
- authorizationServer: AuthorizationServerUrl;
52
- userId: string;
53
- error: Error;
54
- }) => Promise<void>;
55
- onPayment: (args: {
56
- payment: ProspectivePayment;
57
- transactionHash: string;
58
- network: string;
59
- }) => Promise<void>;
60
- onPaymentFailure: (context: PaymentFailureContext) => Promise<void>;
61
- /** Optional callback when a single payment attempt fails (before trying other networks) */
62
- onPaymentAttemptFailed?: (args: {
63
- network: string;
64
- error: Error;
65
- remainingNetworks: string[];
66
- }) => Promise<void>;
67
- };
68
- type RequiredClientConfigFields = 'mcpServer' | 'account';
69
- type RequiredClientConfig = Pick<ClientConfig, RequiredClientConfigFields>;
70
- type OptionalClientConfig = Omit<ClientConfig, RequiredClientConfigFields>;
71
- export type ClientArgs = RequiredClientConfig & Partial<OptionalClientConfig>;
72
- export type FetchWrapper = (config: ClientArgs) => FetchLike;
73
- export { ATXPPaymentError, InsufficientFundsError, TransactionRevertedError, UnsupportedCurrencyError, GasEstimationError, RpcError, UserRejectedError, PaymentServerError, PaymentExpiredError, PaymentNetworkError } from './errors.js';
74
- export type { Account, PaymentMaker };
75
- //# sourceMappingURL=types.d.ts.map
package/dist/types.js DELETED
@@ -1,152 +0,0 @@
1
- /**
2
- * Base class for all ATXP payment errors with structured error codes and actionable guidance
3
- */
4
- class ATXPPaymentError extends Error {
5
- constructor(message, context) {
6
- super(message);
7
- this.context = context;
8
- this.name = this.constructor.name;
9
- }
10
- }
11
- /**
12
- * Thrown when the user's wallet has insufficient funds for a payment
13
- */
14
- class InsufficientFundsError extends ATXPPaymentError {
15
- constructor(currency, required, available, network) {
16
- const shortfall = available ? required.minus(available).toString() : required.toString();
17
- const availableText = available ? `, Available: ${available}` : '';
18
- const networkText = network ? ` on ${network}` : '';
19
- super(`Payment failed due to insufficient ${currency} funds${networkText}. ` +
20
- `Required: ${required}${availableText}. ` +
21
- `Please ensure your account has adequate balance before retrying.`, { currency, required: required.toString(), available: available?.toString(), network, shortfall });
22
- this.currency = currency;
23
- this.required = required;
24
- this.available = available;
25
- this.network = network;
26
- this.code = 'INSUFFICIENT_FUNDS';
27
- this.retryable = true;
28
- this.actionableMessage = available
29
- ? `Add at least ${shortfall} ${currency} to your ${network} wallet and try again.`
30
- : `Ensure your ${network} wallet has at least ${required} ${currency} and try again.`;
31
- }
32
- }
33
- /**
34
- * Thrown when a blockchain transaction is reverted
35
- */
36
- class TransactionRevertedError extends ATXPPaymentError {
37
- constructor(transactionHash, network, revertReason) {
38
- super(`Transaction ${transactionHash} reverted on ${network}${revertReason ? `: ${revertReason}` : ''}`, { transactionHash, network, revertReason });
39
- this.transactionHash = transactionHash;
40
- this.network = network;
41
- this.revertReason = revertReason;
42
- this.code = 'TRANSACTION_REVERTED';
43
- this.retryable = false;
44
- // Provide specific guidance based on revert reason
45
- if (revertReason?.toLowerCase().includes('allowance')) {
46
- this.actionableMessage = 'Approve token spending before making the payment. You may need to increase the token allowance.';
47
- }
48
- else if (revertReason?.toLowerCase().includes('balance')) {
49
- this.actionableMessage = 'Ensure your wallet has sufficient token balance and native token for gas fees.';
50
- }
51
- else {
52
- this.actionableMessage = 'The transaction was rejected by the blockchain. Check the transaction details on a block explorer and verify your wallet settings.';
53
- }
54
- }
55
- }
56
- /**
57
- * Thrown when an unsupported currency is requested
58
- */
59
- class UnsupportedCurrencyError extends ATXPPaymentError {
60
- constructor(currency, network, supportedCurrencies) {
61
- super(`Currency ${currency} is not supported on ${network}`, { currency, network, supportedCurrencies });
62
- this.currency = currency;
63
- this.network = network;
64
- this.supportedCurrencies = supportedCurrencies;
65
- this.code = 'UNSUPPORTED_CURRENCY';
66
- this.retryable = false;
67
- this.actionableMessage = `Please use one of the supported currencies: ${supportedCurrencies.join(', ')}`;
68
- }
69
- }
70
- /**
71
- * Thrown when gas estimation fails for a transaction
72
- */
73
- class GasEstimationError extends ATXPPaymentError {
74
- constructor(network, reason) {
75
- super(`Failed to estimate gas on ${network}${reason ? `: ${reason}` : ''}`, { network, reason });
76
- this.network = network;
77
- this.reason = reason;
78
- this.code = 'GAS_ESTIMATION_FAILED';
79
- this.retryable = true;
80
- this.actionableMessage = 'Unable to estimate gas for this transaction. Ensure you have sufficient funds for both the payment amount and gas fees, then try again.';
81
- }
82
- }
83
- /**
84
- * Thrown when RPC/network connectivity fails
85
- */
86
- class RpcError extends ATXPPaymentError {
87
- constructor(network, rpcUrl, originalError) {
88
- super(`RPC call failed on ${network}${rpcUrl ? ` (${rpcUrl})` : ''}`, { network, rpcUrl, originalError: originalError?.message });
89
- this.network = network;
90
- this.rpcUrl = rpcUrl;
91
- this.originalError = originalError;
92
- this.code = 'RPC_ERROR';
93
- this.retryable = true;
94
- this.actionableMessage = 'Unable to connect to the blockchain network. Please check your internet connection and try again.';
95
- }
96
- }
97
- /**
98
- * Thrown when the user rejects a transaction in their wallet
99
- */
100
- class UserRejectedError extends ATXPPaymentError {
101
- constructor(network) {
102
- super(`User rejected transaction on ${network}`, { network });
103
- this.network = network;
104
- this.code = 'USER_REJECTED';
105
- this.retryable = true;
106
- this.actionableMessage = 'You cancelled the transaction. To complete the payment, please approve the transaction in your wallet.';
107
- }
108
- }
109
- /**
110
- * Thrown when the payment server returns an error
111
- */
112
- class PaymentServerError extends ATXPPaymentError {
113
- constructor(statusCode, endpoint, serverMessage, errorCode, details) {
114
- super(`Payment server returned ${statusCode} from ${endpoint}${serverMessage ? `: ${serverMessage}` : ''}`, { statusCode, endpoint, serverMessage, errorCode, details });
115
- this.statusCode = statusCode;
116
- this.endpoint = endpoint;
117
- this.serverMessage = serverMessage;
118
- this.details = details;
119
- this.retryable = true;
120
- this.actionableMessage = 'The payment server encountered an error. Please try again in a few moments.';
121
- this.code = errorCode || 'PAYMENT_SERVER_ERROR';
122
- }
123
- }
124
- /**
125
- * Thrown when a payment request has expired
126
- */
127
- class PaymentExpiredError extends ATXPPaymentError {
128
- constructor(paymentRequestId, expiresAt) {
129
- super(`Payment request ${paymentRequestId} has expired`, { paymentRequestId, expiresAt: expiresAt?.toISOString() });
130
- this.paymentRequestId = paymentRequestId;
131
- this.expiresAt = expiresAt;
132
- this.code = 'PAYMENT_EXPIRED';
133
- this.retryable = false;
134
- this.actionableMessage = 'This payment request has expired. Please make a new request to the service.';
135
- }
136
- }
137
- /**
138
- * Generic network error for backward compatibility and uncategorized errors
139
- */
140
- class PaymentNetworkError extends ATXPPaymentError {
141
- constructor(network, message, originalError) {
142
- super(`Payment failed on ${network} network: ${message}`, { network, originalError: originalError?.message });
143
- this.network = network;
144
- this.originalError = originalError;
145
- this.code = 'NETWORK_ERROR';
146
- this.retryable = true;
147
- this.actionableMessage = 'A network error occurred during payment processing. Please try again.';
148
- }
149
- }
150
-
151
- export { ATXPPaymentError, GasEstimationError, InsufficientFundsError, PaymentExpiredError, PaymentNetworkError, PaymentServerError, RpcError, TransactionRevertedError, UnsupportedCurrencyError, UserRejectedError };
152
- //# sourceMappingURL=types.js.map
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":[null],"names":[],"mappings":"AAqEA;;AAEG;AACG,MAAgB,gBAAiB,SAAQ,KAAK,CAAA;IAKlD,WAAA,CAAY,OAAe,EAAkB,OAA6B,EAAA;QACxE,KAAK,CAAC,OAAO,CAAC;QAD6B,IAAA,CAAA,OAAO,GAAP,OAAO;QAElD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI;IACnC;AACD;AAED;;AAEG;AACG,MAAO,sBAAuB,SAAQ,gBAAgB,CAAA;AAK1D,IA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,CAAA,SAAS,GAAG,KAAK;QACjB,IAAA,CAAA,iBAAiB,GAAG,6EAA6E;IAO1G;AACD;AAED;;AAEG;AACG,MAAO,mBAAoB,SAAQ,gBAAgB,CAAA;AAKvD,IAAA,WAAA,CACkB,OAAe,EAC/B,OAAe,EACC,aAAqB,EAAA;AAErC,QAAA,KAAK,CACH,CAAA,kBAAA,EAAqB,OAAO,CAAA,UAAA,EAAa,OAAO,EAAE,EAClD,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,CACnD;QAPe,IAAA,CAAA,OAAO,GAAP,OAAO;QAEP,IAAA,CAAA,aAAa,GAAb,aAAa;QAPtB,IAAA,CAAA,IAAI,GAAG,eAAe;QACtB,IAAA,CAAA,SAAS,GAAG,IAAI;QAChB,IAAA,CAAA,iBAAiB,GAAG,uEAAuE;IAWpG;AACD;;;;"}
package/dist/world.cjs DELETED
@@ -1,39 +0,0 @@
1
- 'use strict';
2
-
3
- var worldConstants_js = require('./worldConstants.js');
4
-
5
-
6
-
7
- Object.defineProperty(exports, "USDC_CONTRACT_ADDRESS_WORLD_MAINNET", {
8
- enumerable: true,
9
- get: function () { return worldConstants_js.USDC_CONTRACT_ADDRESS_WORLD_MAINNET; }
10
- });
11
- Object.defineProperty(exports, "USDC_CONTRACT_ADDRESS_WORLD_SEPOLIA", {
12
- enumerable: true,
13
- get: function () { return worldConstants_js.USDC_CONTRACT_ADDRESS_WORLD_SEPOLIA; }
14
- });
15
- Object.defineProperty(exports, "WORLD_CHAIN_MAINNET", {
16
- enumerable: true,
17
- get: function () { return worldConstants_js.WORLD_CHAIN_MAINNET; }
18
- });
19
- Object.defineProperty(exports, "WORLD_CHAIN_SEPOLIA", {
20
- enumerable: true,
21
- get: function () { return worldConstants_js.WORLD_CHAIN_SEPOLIA; }
22
- });
23
- Object.defineProperty(exports, "getWorldChainByChainId", {
24
- enumerable: true,
25
- get: function () { return worldConstants_js.getWorldChainByChainId; }
26
- });
27
- Object.defineProperty(exports, "getWorldChainMainnetWithRPC", {
28
- enumerable: true,
29
- get: function () { return worldConstants_js.getWorldChainMainnetWithRPC; }
30
- });
31
- Object.defineProperty(exports, "getWorldChainSepoliaWithRPC", {
32
- enumerable: true,
33
- get: function () { return worldConstants_js.getWorldChainSepoliaWithRPC; }
34
- });
35
- Object.defineProperty(exports, "getWorldChainUSDCAddress", {
36
- enumerable: true,
37
- get: function () { return worldConstants_js.getWorldChainUSDCAddress; }
38
- });
39
- //# sourceMappingURL=world.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"world.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/world.d.ts DELETED
@@ -1 +0,0 @@
1
- export { USDC_CONTRACT_ADDRESS_WORLD_MAINNET, USDC_CONTRACT_ADDRESS_WORLD_SEPOLIA, WORLD_CHAIN_MAINNET, WORLD_CHAIN_SEPOLIA, WorldChain, getWorldChainByChainId, getWorldChainMainnetWithRPC, getWorldChainSepoliaWithRPC, getWorldChainUSDCAddress } from './worldConstants.js';