@kassealhq/sdk 0.0.0-stage → 0.1.0

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 (449) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/LICENSE +21 -0
  3. package/README.md +193 -2
  4. package/SECURITY.md +60 -0
  5. package/STABILITY.md +44 -0
  6. package/THIRD_PARTY_NOTICES +55 -0
  7. package/dist/artifacts/codec/fixtures/argent-kcc20-reference-c8a0871.json +32 -0
  8. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k103.json +251 -0
  9. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k113.json +251 -0
  10. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k124.json +251 -0
  11. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k136.json +251 -0
  12. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k164.json +251 -0
  13. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k180.json +251 -0
  14. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k198.json +251 -0
  15. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k218.json +251 -0
  16. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k240.json +251 -0
  17. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k264.json +251 -0
  18. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k291.json +251 -0
  19. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k320.json +251 -0
  20. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k352.json +251 -0
  21. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k388.json +251 -0
  22. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k427.json +251 -0
  23. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k470.json +251 -0
  24. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k518.json +251 -0
  25. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k571.json +251 -0
  26. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k629.json +251 -0
  27. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1097.json +251 -0
  28. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1209.json +251 -0
  29. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k122.json +251 -0
  30. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1332.json +251 -0
  31. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k134.json +251 -0
  32. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1468.json +251 -0
  33. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k147.json +251 -0
  34. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k161.json +251 -0
  35. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1618.json +251 -0
  36. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k177.json +251 -0
  37. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1783.json +251 -0
  38. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k195.json +251 -0
  39. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1965.json +251 -0
  40. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k214.json +251 -0
  41. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k2166.json +251 -0
  42. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k235.json +251 -0
  43. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k2387.json +251 -0
  44. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k258.json +251 -0
  45. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k2631.json +251 -0
  46. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k284.json +251 -0
  47. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k2900.json +251 -0
  48. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k313.json +251 -0
  49. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k3197.json +251 -0
  50. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k344.json +251 -0
  51. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k3524.json +251 -0
  52. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k379.json +251 -0
  53. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k3885.json +251 -0
  54. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k417.json +251 -0
  55. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k4283.json +251 -0
  56. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k459.json +251 -0
  57. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k4722.json +251 -0
  58. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k506.json +251 -0
  59. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k5205.json +251 -0
  60. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k557.json +251 -0
  61. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k5738.json +251 -0
  62. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k613.json +251 -0
  63. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k6326.json +251 -0
  64. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k675.json +251 -0
  65. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k6974.json +251 -0
  66. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k744.json +251 -0
  67. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k7688.json +251 -0
  68. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k820.json +251 -0
  69. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k8475.json +251 -0
  70. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k904.json +251 -0
  71. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k9343.json +251 -0
  72. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k996.json +251 -0
  73. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard.json +251 -0
  74. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k103.artifact.json +350 -0
  75. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k113.artifact.json +350 -0
  76. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k124.artifact.json +350 -0
  77. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k136.artifact.json +351 -0
  78. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k164.artifact.json +351 -0
  79. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k180.artifact.json +351 -0
  80. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k198.artifact.json +351 -0
  81. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k218.artifact.json +351 -0
  82. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k240.artifact.json +351 -0
  83. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k264.artifact.json +351 -0
  84. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k291.artifact.json +351 -0
  85. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k320.artifact.json +351 -0
  86. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k352.artifact.json +351 -0
  87. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k388.artifact.json +351 -0
  88. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k427.artifact.json +351 -0
  89. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k470.artifact.json +351 -0
  90. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k518.artifact.json +351 -0
  91. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k571.artifact.json +351 -0
  92. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k629.artifact.json +351 -0
  93. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1097.artifact.json +351 -0
  94. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1209.artifact.json +351 -0
  95. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k122.artifact.json +350 -0
  96. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1332.artifact.json +351 -0
  97. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k134.artifact.json +350 -0
  98. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1468.artifact.json +351 -0
  99. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k147.artifact.json +350 -0
  100. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k161.artifact.json +350 -0
  101. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1618.artifact.json +351 -0
  102. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k177.artifact.json +350 -0
  103. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1783.artifact.json +351 -0
  104. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k195.artifact.json +350 -0
  105. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1965.artifact.json +351 -0
  106. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k214.artifact.json +350 -0
  107. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k2166.artifact.json +351 -0
  108. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k235.artifact.json +350 -0
  109. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k2387.artifact.json +351 -0
  110. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k258.artifact.json +350 -0
  111. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k2631.artifact.json +351 -0
  112. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k284.artifact.json +350 -0
  113. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k2900.artifact.json +351 -0
  114. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k313.artifact.json +350 -0
  115. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k3197.artifact.json +351 -0
  116. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k344.artifact.json +350 -0
  117. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k3524.artifact.json +351 -0
  118. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k379.artifact.json +350 -0
  119. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k3885.artifact.json +351 -0
  120. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k417.artifact.json +350 -0
  121. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k4283.artifact.json +351 -0
  122. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k459.artifact.json +350 -0
  123. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k4722.artifact.json +351 -0
  124. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k506.artifact.json +350 -0
  125. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k5205.artifact.json +351 -0
  126. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k557.artifact.json +350 -0
  127. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k5738.artifact.json +351 -0
  128. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k613.artifact.json +350 -0
  129. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k6326.artifact.json +351 -0
  130. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k675.artifact.json +350 -0
  131. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k6974.artifact.json +351 -0
  132. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k744.artifact.json +350 -0
  133. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k7688.artifact.json +351 -0
  134. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k820.artifact.json +350 -0
  135. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k8475.artifact.json +351 -0
  136. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k904.artifact.json +350 -0
  137. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k9343.artifact.json +351 -0
  138. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k996.artifact.json +350 -0
  139. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard.artifact.json +351 -0
  140. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k103.json +251 -0
  141. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k113.json +251 -0
  142. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k124.json +251 -0
  143. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k136.json +251 -0
  144. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k164.json +251 -0
  145. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k180.json +251 -0
  146. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k198.json +251 -0
  147. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k218.json +251 -0
  148. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k240.json +251 -0
  149. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k264.json +251 -0
  150. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k291.json +251 -0
  151. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k320.json +251 -0
  152. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k352.json +251 -0
  153. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k388.json +251 -0
  154. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k427.json +251 -0
  155. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k470.json +251 -0
  156. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k518.json +251 -0
  157. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k571.json +251 -0
  158. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k629.json +251 -0
  159. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1097.json +251 -0
  160. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1209.json +251 -0
  161. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k122.json +251 -0
  162. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1332.json +251 -0
  163. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k134.json +251 -0
  164. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1468.json +251 -0
  165. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k147.json +251 -0
  166. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k161.json +251 -0
  167. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1618.json +251 -0
  168. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k177.json +251 -0
  169. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1783.json +251 -0
  170. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k195.json +251 -0
  171. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1965.json +251 -0
  172. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k214.json +251 -0
  173. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k2166.json +251 -0
  174. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k235.json +251 -0
  175. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k2387.json +251 -0
  176. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k258.json +251 -0
  177. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k2631.json +251 -0
  178. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k284.json +251 -0
  179. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k2900.json +251 -0
  180. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k313.json +251 -0
  181. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k3197.json +251 -0
  182. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k344.json +251 -0
  183. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k3524.json +251 -0
  184. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k379.json +251 -0
  185. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k3885.json +251 -0
  186. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k417.json +251 -0
  187. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k4283.json +251 -0
  188. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k459.json +251 -0
  189. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k4722.json +251 -0
  190. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k506.json +251 -0
  191. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k5205.json +251 -0
  192. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k557.json +251 -0
  193. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k5738.json +251 -0
  194. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k613.json +251 -0
  195. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k6326.json +251 -0
  196. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k675.json +251 -0
  197. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k6974.json +251 -0
  198. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k744.json +251 -0
  199. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k7688.json +251 -0
  200. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k820.json +251 -0
  201. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k8475.json +251 -0
  202. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k904.json +251 -0
  203. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k9343.json +251 -0
  204. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k996.json +251 -0
  205. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard.json +251 -0
  206. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k103.artifact.json +350 -0
  207. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k113.artifact.json +350 -0
  208. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k124.artifact.json +350 -0
  209. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k136.artifact.json +351 -0
  210. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k164.artifact.json +351 -0
  211. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k180.artifact.json +351 -0
  212. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k198.artifact.json +351 -0
  213. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k218.artifact.json +351 -0
  214. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k240.artifact.json +351 -0
  215. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k264.artifact.json +351 -0
  216. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k291.artifact.json +351 -0
  217. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k320.artifact.json +351 -0
  218. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k352.artifact.json +351 -0
  219. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k388.artifact.json +351 -0
  220. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k427.artifact.json +351 -0
  221. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k470.artifact.json +351 -0
  222. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k518.artifact.json +351 -0
  223. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k571.artifact.json +351 -0
  224. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k629.artifact.json +351 -0
  225. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1097.artifact.json +351 -0
  226. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1209.artifact.json +351 -0
  227. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k122.artifact.json +350 -0
  228. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1332.artifact.json +351 -0
  229. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k134.artifact.json +350 -0
  230. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1468.artifact.json +351 -0
  231. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k147.artifact.json +350 -0
  232. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k161.artifact.json +350 -0
  233. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1618.artifact.json +351 -0
  234. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k177.artifact.json +350 -0
  235. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1783.artifact.json +351 -0
  236. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k195.artifact.json +350 -0
  237. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1965.artifact.json +351 -0
  238. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k214.artifact.json +350 -0
  239. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k2166.artifact.json +351 -0
  240. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k235.artifact.json +350 -0
  241. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k2387.artifact.json +351 -0
  242. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k258.artifact.json +350 -0
  243. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k2631.artifact.json +351 -0
  244. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k284.artifact.json +350 -0
  245. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k2900.artifact.json +351 -0
  246. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k313.artifact.json +350 -0
  247. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k3197.artifact.json +351 -0
  248. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k344.artifact.json +350 -0
  249. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k3524.artifact.json +351 -0
  250. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k379.artifact.json +350 -0
  251. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k3885.artifact.json +351 -0
  252. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k417.artifact.json +350 -0
  253. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k4283.artifact.json +351 -0
  254. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k459.artifact.json +350 -0
  255. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k4722.artifact.json +351 -0
  256. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k506.artifact.json +350 -0
  257. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k5205.artifact.json +351 -0
  258. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k557.artifact.json +350 -0
  259. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k5738.artifact.json +351 -0
  260. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k613.artifact.json +350 -0
  261. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k6326.artifact.json +351 -0
  262. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k675.artifact.json +350 -0
  263. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k6974.artifact.json +351 -0
  264. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k744.artifact.json +350 -0
  265. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k7688.artifact.json +351 -0
  266. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k820.artifact.json +350 -0
  267. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k8475.artifact.json +351 -0
  268. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k904.artifact.json +350 -0
  269. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k9343.artifact.json +351 -0
  270. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k996.artifact.json +350 -0
  271. package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard.artifact.json +351 -0
  272. package/dist/artifacts/contracts/pool/v1/artifacts/v1-kasseal-mainnet-2/pool.artifact.json +483 -0
  273. package/dist/artifacts/contracts/pool/v1/artifacts/v1-kasseal-mainnet-2/pool.ctor.json +211 -0
  274. package/dist/artifacts/contracts/pool/v1/artifacts/v1-kasseal-mainnet-2-tn10/pool.artifact.json +483 -0
  275. package/dist/artifacts/contracts/pool/v1/artifacts/v1-kasseal-mainnet-2-tn10/pool.ctor.json +211 -0
  276. package/dist/artifacts/manifest.json +429 -0
  277. package/dist/chunks/chunk-VITREHRZ.js +1 -0
  278. package/dist/chunks/chunk-XLPNXOE2.js +1 -0
  279. package/dist/chunks/v1-kasseal-mainnet-2--base-PG5VCON2.js +1 -0
  280. package/dist/chunks/v1-kasseal-mainnet-2--standard-G2JAHX7I.js +1 -0
  281. package/dist/chunks/v1-kasseal-mainnet-2--standard-k103-MDMVZ2QI.js +1 -0
  282. package/dist/chunks/v1-kasseal-mainnet-2--standard-k113-VHAWBWJY.js +1 -0
  283. package/dist/chunks/v1-kasseal-mainnet-2--standard-k124-CCMPZRIZ.js +1 -0
  284. package/dist/chunks/v1-kasseal-mainnet-2--standard-k136-GLMQJSJY.js +1 -0
  285. package/dist/chunks/v1-kasseal-mainnet-2--standard-k164-OKMJDO5B.js +1 -0
  286. package/dist/chunks/v1-kasseal-mainnet-2--standard-k180-55OCXLQP.js +1 -0
  287. package/dist/chunks/v1-kasseal-mainnet-2--standard-k198-JU7B5XWS.js +1 -0
  288. package/dist/chunks/v1-kasseal-mainnet-2--standard-k218-XLJ5JHYS.js +1 -0
  289. package/dist/chunks/v1-kasseal-mainnet-2--standard-k240-SGVHCZXX.js +1 -0
  290. package/dist/chunks/v1-kasseal-mainnet-2--standard-k264-2E3LY7SC.js +1 -0
  291. package/dist/chunks/v1-kasseal-mainnet-2--standard-k291-6PY3BHY4.js +1 -0
  292. package/dist/chunks/v1-kasseal-mainnet-2--standard-k320-ZCJD5TZI.js +1 -0
  293. package/dist/chunks/v1-kasseal-mainnet-2--standard-k352-NGLJXQYP.js +1 -0
  294. package/dist/chunks/v1-kasseal-mainnet-2--standard-k388-PNX2RAFC.js +1 -0
  295. package/dist/chunks/v1-kasseal-mainnet-2--standard-k427-EQF3M2V6.js +1 -0
  296. package/dist/chunks/v1-kasseal-mainnet-2--standard-k470-SXB2LGOZ.js +1 -0
  297. package/dist/chunks/v1-kasseal-mainnet-2--standard-k518-5TBKPRN5.js +1 -0
  298. package/dist/chunks/v1-kasseal-mainnet-2--standard-k571-FUFPSPYU.js +1 -0
  299. package/dist/chunks/v1-kasseal-mainnet-2--standard-k629-ZU2MY2M4.js +1 -0
  300. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1097-D6JDQO6O.js +1 -0
  301. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1209-OBAOMD6P.js +1 -0
  302. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k122-KQPN6NJK.js +1 -0
  303. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1332-RMFTEH6F.js +1 -0
  304. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k134-M275FLYC.js +1 -0
  305. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1468-NCJSKY2H.js +1 -0
  306. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k147-KR5AYKDB.js +1 -0
  307. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k161-G3TBLC2T.js +1 -0
  308. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1618-JDVUXEHK.js +1 -0
  309. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k177-G6PO2MOF.js +1 -0
  310. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1783-3M7EAYRN.js +1 -0
  311. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k195-RCMGQ3Y3.js +1 -0
  312. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1965-JAMKZTIK.js +1 -0
  313. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k214-XA3LUEX4.js +1 -0
  314. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k2166-JK4MHEJR.js +1 -0
  315. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k235-TBRH6PLK.js +1 -0
  316. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k2387-7DUU6POJ.js +1 -0
  317. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k258-SV47XXNN.js +1 -0
  318. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k2631-IAORSCGF.js +1 -0
  319. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k284-NBVHUKHH.js +1 -0
  320. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k2900-ICMYLNN5.js +1 -0
  321. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k313-BBYRXMF3.js +1 -0
  322. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k3197-JPUNDL5O.js +1 -0
  323. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k344-7J4J66JW.js +1 -0
  324. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k3524-A4I4COO7.js +1 -0
  325. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k379-3YR3VO6O.js +1 -0
  326. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k3885-4RPB6FON.js +1 -0
  327. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k417-VXFC3D4N.js +1 -0
  328. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k4283-IMD4DMWY.js +1 -0
  329. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k459-SQK576EC.js +1 -0
  330. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k4722-PWIMNCX2.js +1 -0
  331. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k506-GA55ODGE.js +1 -0
  332. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k5205-YEWHS4TN.js +1 -0
  333. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k557-ADEHVYB5.js +1 -0
  334. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k5738-Q4PT5ZXE.js +1 -0
  335. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k613-VLPN3VOO.js +1 -0
  336. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k6326-MWPIBW3V.js +1 -0
  337. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k675-O7ULXDIW.js +1 -0
  338. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k6974-EQYZ5MUX.js +1 -0
  339. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k744-PTUGUVVG.js +1 -0
  340. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k7688-M6YCDJ2C.js +1 -0
  341. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k820-72Z76LGP.js +1 -0
  342. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k8475-WXJQJY54.js +1 -0
  343. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k904-HRQDFBY2.js +1 -0
  344. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k9343-YM2TLR4Q.js +1 -0
  345. package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k996-AOXS4VIO.js +1 -0
  346. package/dist/chunks/v1-kasseal-mainnet-2-tn10--base-MVP32JP4.js +1 -0
  347. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-P7ALG4L7.js +1 -0
  348. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k103-PMFIFDC2.js +1 -0
  349. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k113-XTMJQOPT.js +1 -0
  350. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k124-LGCAC7UL.js +1 -0
  351. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k136-QYDYKMQO.js +1 -0
  352. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k164-L7UYHEI5.js +1 -0
  353. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k180-N7FK5TEK.js +1 -0
  354. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k198-5QBBZSVE.js +1 -0
  355. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k218-6H5GUBVP.js +1 -0
  356. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k240-ERN2IH63.js +1 -0
  357. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k264-EIVIVWEW.js +1 -0
  358. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k291-45QJXSZO.js +1 -0
  359. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k320-INQ4E2TN.js +1 -0
  360. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k352-M4Z433QA.js +1 -0
  361. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k388-KKTEOPOK.js +1 -0
  362. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k427-VBRUTBB3.js +1 -0
  363. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k470-XBN3YQAK.js +1 -0
  364. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k518-YQASY5LW.js +1 -0
  365. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k571-VJWS6O4L.js +1 -0
  366. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k629-WNQIIPGS.js +1 -0
  367. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1097-2SAVEBG4.js +1 -0
  368. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1209-S4KMZ2NT.js +1 -0
  369. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k122-C2KWY6TF.js +1 -0
  370. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1332-XJWJWOCK.js +1 -0
  371. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k134-TCPXVCUL.js +1 -0
  372. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1468-7XJ4CCRU.js +1 -0
  373. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k147-6N62HWU7.js +1 -0
  374. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k161-IMMPF3UE.js +1 -0
  375. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1618-YV5JPCEE.js +1 -0
  376. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k177-GYSPGGBF.js +1 -0
  377. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1783-4A6KU6PT.js +1 -0
  378. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k195-JURU2SWD.js +1 -0
  379. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1965-TO4XXF2I.js +1 -0
  380. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k214-NA2BXYQ4.js +1 -0
  381. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k2166-JSABPOAZ.js +1 -0
  382. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k235-467ZW5YL.js +1 -0
  383. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k2387-PIPX46IG.js +1 -0
  384. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k258-CGX3IAR3.js +1 -0
  385. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k2631-MPJN5VID.js +1 -0
  386. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k284-X2WS65VQ.js +1 -0
  387. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k2900-VD4BPEEL.js +1 -0
  388. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k313-T4OTQDBW.js +1 -0
  389. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k3197-WJCL3T5I.js +1 -0
  390. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k344-SFNQ3NNK.js +1 -0
  391. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k3524-WKI5E77C.js +1 -0
  392. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k379-2NOBMEA5.js +1 -0
  393. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k3885-LC6FHT5L.js +1 -0
  394. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k417-BYV6ERZR.js +1 -0
  395. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k4283-QBNHR6EQ.js +1 -0
  396. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k459-OBM2YAKZ.js +1 -0
  397. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k4722-5OJM5BZ7.js +1 -0
  398. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k506-2X3EXENX.js +1 -0
  399. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k5205-I5EAJYCQ.js +1 -0
  400. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k557-4R4FNC7X.js +1 -0
  401. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k5738-NS2DMP2O.js +1 -0
  402. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k613-QHO2XTG5.js +1 -0
  403. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k6326-T2JJQKXD.js +1 -0
  404. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k675-6T76I4I2.js +1 -0
  405. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k6974-PMDLIOCF.js +1 -0
  406. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k744-IPCUHXGU.js +1 -0
  407. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k7688-RP3BEVAI.js +1 -0
  408. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k820-BAB2GGE4.js +1 -0
  409. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k8475-VV4BF475.js +1 -0
  410. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k904-QM67HPNQ.js +1 -0
  411. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k9343-KCCISF2U.js +1 -0
  412. package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k996-AKQMLPZI.js +1 -0
  413. package/dist/index.d.ts +3874 -0
  414. package/dist/index.js +1 -0
  415. package/dist/kaspa/nodejs/LICENSE +15 -0
  416. package/dist/kaspa/nodejs/kaspa.d.ts +8264 -0
  417. package/dist/kaspa/nodejs/kaspa.js +16158 -0
  418. package/dist/kaspa/nodejs/kaspa_bg.wasm +0 -0
  419. package/dist/kaspa/nodejs/kaspa_bg.wasm.d.ts +951 -0
  420. package/dist/kaspa/nodejs/package.json +20 -0
  421. package/dist/kaspa/sdk-types.d.ts +1 -0
  422. package/dist/kaspa/web/LICENSE +15 -0
  423. package/dist/kaspa/web/kaspa.d.ts +9239 -0
  424. package/dist/kaspa/web/kaspa.js +15759 -0
  425. package/dist/kaspa/web/kaspa_bg.wasm +0 -0
  426. package/dist/kaspa/web/kaspa_bg.wasm.d.ts +951 -0
  427. package/dist/kaspa/web/package.json +24 -0
  428. package/dist/node.d.ts +14 -0
  429. package/dist/node.js +1 -0
  430. package/dist/web.d.ts +17 -0
  431. package/dist/web.js +1 -0
  432. package/docs/api.md +133 -0
  433. package/docs/concepts.md +152 -0
  434. package/docs/contract-artifacts.md +96 -0
  435. package/docs/dex-and-routers.md +230 -0
  436. package/docs/errors.md +164 -0
  437. package/docs/explorers.md +117 -0
  438. package/docs/launch-proof.md +111 -0
  439. package/docs/trading-bots.md +183 -0
  440. package/docs/wallets.md +144 -0
  441. package/examples/README.md +19 -0
  442. package/examples/lib/api.ts +116 -0
  443. package/examples/lib/proof.ts +45 -0
  444. package/examples/pool-buy.ts +86 -0
  445. package/examples/pool-sell-wallet.ts +72 -0
  446. package/examples/quote.ts +57 -0
  447. package/examples/swap-and-deposit.ts +63 -0
  448. package/examples/verify-launch-proof.ts +20 -0
  449. package/package.json +74 -4
@@ -0,0 +1,96 @@
1
+ # Contract artifacts
2
+
3
+ The SDK bundles the compiled Kasseal contracts for exactly two builds. It does not fetch programs from any server:
4
+ every program the SDK builds with or checks against is in the package, and every file is checked against its
5
+ SHA-256 when it loads.
6
+
7
+ ## The two builds
8
+
9
+ Both builds are frozen: their programs never change. A change would be a new build with a new name and new hashes,
10
+ shipped in a new SDK release.
11
+
12
+ | | Mainnet | Testnet-10 |
13
+ |---|---|---|
14
+ | Build | `v1-kasseal-mainnet-2` | `v1-kasseal-mainnet-2-tn10` |
15
+ | Network id | `mainnet` | `testnet-10` |
16
+ | Pool template hash | `92acd761504e4fa05acf70675ef1aea0c66efa2126ec5c726e4779b8aef054e0` | `28170395ca9350966c0d732ffce8b13c5a94201e74552b7add67143a35dea56a` |
17
+ | Pool program size | 15,197 bytes | 15,197 bytes |
18
+ | Standard curve template hash (placeholder creator) | `63f032f087bbc2b66e0f2561b1f40a6319c80f9792743c7e77e5761d41f51f5f` | `1154008bee8cb3998f2237f15f056191e98a70dfbca6692ac85c05363dafc3c3` |
19
+ | Token template hash (KCC-20 reference) | `9703112ee6e3555107cd168858992b77d3b74f655205b2b463b1f9ec2ec73cf7` | the same |
20
+ | Fee recipient (treasury) | `kaspa:qrt0p8sd5g8k383mzxgqtyl7ehkdez8ds8cpxqcuwjdaayke9rjhg9pqnr3zx` | `kaspatest:qp8pqkcf0w8l3mke93eu86ngyc808x54t574a8jha96nu63x8tfn2et7nk35w` |
21
+ | Treasury script (`params.treasurySpk`) | `000020d6f09e0da20f689e3b11900593fecdecdc88ed81f013031c749bde92d928e574ac` | `0000204e105b097b8ff8eed92c73c3ea68260ef39a955d3d5e9e57e9753e6a263ad335ac` |
22
+ | Compiler | silverc v1.0.0 (`3ed973335b59269293564805cc2c58a14595ec03`) | the same |
23
+
24
+ The testnet-10 build mirrors the mainnet build: the same contract sources and constructor values, except the
25
+ treasury. Every hash that depends on the treasury differs; nothing else does. Testnet-10 accepts only the testnet-10
26
+ build, and mainnet only the mainnet build.
27
+
28
+ The curve's `poolH` constant, which pins the pool program a curve graduates into, is the pool template hash of its
29
+ own build.
30
+
31
+ ### Curve programs
32
+
33
+ Each build carries **66 curve programs**: the Standard curve shape at each launch price band (lots of 1,000 tokens
34
+ in the lower bands, 10,000 in the higher ones). Mainnet launches use only these. The creator's payout key is a
35
+ constant of the curve program, so a launched token's curve has its own template hash. The SDK recognises a curve by
36
+ matching its program against these 66 with the creator key slots masked, and reads the constants from the program
37
+ itself.
38
+
39
+ The template hash of every curve program is listed in the build's manifest in the package.
40
+
41
+ ## Pool artifact files (SHA-256)
42
+
43
+ | File | Mainnet | Testnet-10 |
44
+ |---|---|---|
45
+ | `pool.artifact.json` | `7ae79b8a9a36e6b7469dc7fe1d8bd3cc227abe94632e3fe1e36cfcebcb1cccb2` | `11bf7c41d2fb90beb07d92a0d8ce7de32accf676e182fa6882b84c123f3aad3c` |
46
+ | `pool.bytecode.hex` | `e7b80312702242718e1500eea070336b55dcf7f77009660c5122a8a7387a84ff` | `b053a9261fa701865db472d42ad13685173cb9100e1adc7ebd07422dee93f9ec` |
47
+ | `pool.ctor.json` | `d2e5abb2350d1f5e7657aca91e5af4ab05b4e42004fe26a2acee956e359afbae` | `0e88b336995fcd2c4a84b882239c0a4071dd921e33bd59baf0b0d2a3bf1c3f0b` |
48
+ | `constants.json` | `62ab2297f5df695ab32938d53725939377b1cd8f070f0fbd63c12464ed5e9160` | `c5770e41c7cb1d90061e7525de27a0be0bb8c97b42c091b2a991b65117e0fc01` |
49
+
50
+ The KCC-20 reference token program ships as `argent-kcc20-reference-c8a0871.json`, SHA-256
51
+ `462a937240ff3dc6f297a06c2eeb48c5150e4a2a4995eedc71c724f3a34eedee`, compiled from `argent-lang/kcc20-reference` at
52
+ revision `c8a0871`.
53
+
54
+ ## How the SDK checks them
55
+
56
+ - **At load, fail closed.** The package carries a manifest per build with the SHA-256 of every artifact file and the
57
+ template hash of every program. The SDK hashes each file before using it and refuses to start on any difference.
58
+ - **Template hashes are recomputed.** When the SDK reads a program, it recomputes its template hash from the bytes and
59
+ compares it with the manifest. A cell the API serves is checked the same way: the SDK recomputes the template hash
60
+ from the cell's own redeem script and never trusts a hash from the wire.
61
+ - **The Kaspa WASM SDK** (rusty-kaspa v2.1.0) is checked the same way, against SHA-256 values pinned in the package.
62
+
63
+ ## Checking them yourself
64
+
65
+ You do not need the SDK to check the bundled files. After `npm install`:
66
+
67
+ ```sh
68
+ cd node_modules/@kassealhq/sdk
69
+ shasum -a 256 <path to>/pool.artifact.json # compare with the table above and with the manifest
70
+ ```
71
+
72
+ Compare each file's hash with the build's manifest and with the tables on this page. A difference means the package
73
+ is not the one Kasseal published: do not use it.
74
+
75
+ To check that a program is the one running on chain, recompute its template hash and compare it with a live cell:
76
+
77
+ ```ts
78
+ import { fromHex, templateHashOfProgram } from '@kassealhq/sdk';
79
+
80
+ // A pool cell's redeem script, from GET /pools/{P}/cell (`redeemScript`) or from the chain.
81
+ const program = fromHex(cell.redeemScript);
82
+ // The pool's state is 139 bytes at offset 1; the template hash covers the program without it.
83
+ const hash = templateHashOfProgram(program, 1, 139);
84
+ // testnet-10: must equal 28170395ca9350966c0d732ffce8b13c5a94201e74552b7add67143a35dea56a
85
+ ```
86
+
87
+ ## Contract sources
88
+
89
+ The contract sources are not published. The SDK ships compiled artifacts and their hashes only. Everything an
90
+ integrator needs to build, check and decode transactions is in the artifacts: the programs, their entry points and
91
+ dispatch tags, their constructor values and their state layouts. The behaviour the contracts enforce is documented in
92
+ [concepts.md](concepts.md) and [dex-and-routers.md](dex-and-routers.md).
93
+
94
+ A manifest may list a SHA-256 for a file the package does not include, such as a contract source. That entry is a
95
+ commitment: it lets anyone check a source published later against the build. It cannot be checked from the package
96
+ alone.
@@ -0,0 +1,230 @@
1
+ # DEXs, routers and other contracts
2
+
3
+ Kasseal pool swaps are **composable**: a swap may share its transaction, and its token's KCC-20 transfer, with other
4
+ covenants, such as another venue's pool, a router or an escrow. This page is for anyone who puts a Kasseal swap
5
+ inside a transaction they design. It applies to the pools of both current builds, `v1-kasseal-mainnet-2` and its
6
+ testnet-10 build (template hashes in [contract-artifacts.md](contract-artifacts.md)).
7
+
8
+ If you only trade through the SDK's own transaction shapes, read [trading-bots.md](trading-bots.md) instead. The
9
+ rules below still explain why the SDK does what it does.
10
+
11
+ ## 1. What a pool checks, and what it leaves to you
12
+
13
+ In any swap it accepts, a pool checks only its own footprint:
14
+
15
+ - **Its pool cell.** The input it spends and its one successor, whose KAS value and state follow the swap formula
16
+ exactly.
17
+ - **Its token reserve.** The token input at the position you name (`reserveK`) must be the pool-owned reserve
18
+ holding exactly the state's `tokenReserve`. Its successor, at the token output position you name (`restK` for a
19
+ buy, `mergedK` for a sell), must hold exactly the new reserve.
20
+ - **No other cell of its own moves.** Every other input of the pool's token is refused if the pool's inputs would
21
+ authorize it: a cell owned `0x04` by the pool's covenant id, or owned `0x03` by the P2SH of the pool cell's script
22
+ or of the reserve's script. LP-share cells may not take part in a swap at all.
23
+
24
+ The pool does **not** check where the tokens a buy releases go, where the KAS a sell releases goes, or which cells
25
+ supply a sell's tokens. KCC-20 conserves the tokens across the whole transfer. The signatures and covenant programs
26
+ behind the other inputs decide the destinations.
27
+
28
+ ## 2. Rules for routers and integrators
29
+
30
+ 1. **Protect your users with signatures, not with `minTokensOut` or `minOutScaled`.** The entry arguments sit in the
31
+ pool input's signature script, which no signature covers: whoever relays the transaction can rewrite them without
32
+ changing its id. A user's `SIGHASH_ALL` signature over the whole transaction (the spent pool outpoint and every
33
+ output) is what fixes the trade.
34
+ 2. **Guard your own covenant cells.** A token cell owned `0x04` by your covenant moves in any transaction in which
35
+ your covenant has an input, whatever entry it runs. Your program must validate every cell it owns that is
36
+ present, as the Kasseal pool does for its own.
37
+ 3. **Never create a token cell that nobody can safely spend.** Your builder must refuse each of these outputs; the
38
+ pool no longer refuses them for you:
39
+ - a cell owned `0x04` by the token's own covenant id: anyone can spend it;
40
+ - a cell owned `0x04` by the pool's covenant id (other than the reserve's successor): it is locked for good, since
41
+ the pool refuses it as an extra input;
42
+ - a cell owned `0x03` by the P2SH of a pool cell's script or of a reserve's script (in other words, sent to the
43
+ pool's contract address): the pool refuses it as an input, so the tokens are lost to the sender. A cell of
44
+ another token sent there can be taken by whoever submits the next transaction of that pool.
45
+ 4. **A sell whose tokens come from a covenant cell has no seller signature.** That covenant must bind where the
46
+ released KAS goes.
47
+ 5. **KCC-20 limits.** At most 3 inputs and 3 outputs of one token per transaction, counting the pool's reserve and its
48
+ successor.
49
+ 6. **Cells owned by the P2SH of another input's script move with that input** (KCC-20 presence authorization). The
50
+ pool refuses only those owned by its own scripts. A cell of another token owned `0x04` by the pool rides along with
51
+ any pool spend, and can in turn authorize a token cell owned by its script. Do not send tokens to covenant or
52
+ script owners you do not control.
53
+ 7. **Identify a Kasseal pool by its covenant id, never by its template or its address.** Anyone can create a pool
54
+ cell from the same program under another id: a counterfeit composes exactly like the real one. A pool cell's
55
+ address commits to the program and its current state, not to the id, so a counterfeit in the same state has the
56
+ same address, and the real pool's address changes with every trade. The real pool of a token is the one its
57
+ launch proof names (`graduation.P`, see [launch-proof.md](launch-proof.md)).
58
+ 8. **The pool's price is not an oracle.** The reserves move with every swap, and anyone can move them, then move them
59
+ back, within one transaction or a short chain of pending ones. Do not value collateral, trigger liquidations,
60
+ settle contracts or set a price anywhere else from a Kasseal pool's state.
61
+ 9. **Guard your own outputs against double satisfaction.** Your covenant must pin the outputs it pays by position or
62
+ by a commitment only it makes. A rule such as "output 0 pays the maker" can be met by an output another contract
63
+ also counts as its own, including the KAS a Kasseal sell releases.
64
+ 10. **A borrow-enabled cell (KCC-20 borrow path) can join any transfer as its leader without its owner's
65
+ signature.** Do not treat a cell's presence as its owner's consent.
66
+ 11. **Build on the latest pool state.** A swap spends the pool cell by outpoint. If another transaction spends it
67
+ first, yours is invalid and must be rebuilt on the new state (section 6).
68
+
69
+ ## 3. The two swap entries
70
+
71
+ | Entry | Arguments after the state | Kasseal's own shape |
72
+ |---|---|---|
73
+ | `swapKasForTokens` | `kasInScaled`, `minTokensOut`, `reserveK`, `restK` | The reserve is the only token input (`reserveK = 0`). Token outputs: the successor, then the buyer's cell (`restK = 0`) |
74
+ | `swapTokensForKas` | `tokensIn`, `minOutScaled`, `reserveK`, `mergedK` | Token inputs: the seller's cell, then the reserve (`reserveK = 1`). One token output, the merged reserve (`mergedK = 0`) |
75
+
76
+ `reserveK` counts positions among the transaction's inputs of that token, in input order. `restK` and `mergedK`
77
+ count among its outputs of that token.
78
+
79
+ **Encoding.** The pool input's signature script is `<args> OP_DATA_4 <dispatch tag> <redeem script>`, every integer a
80
+ minimal script-number push, in the order of the table.
81
+
82
+ | Entry | Dispatch tag | Signature |
83
+ |---|---|---|
84
+ | `swapKasForTokens` | `855ca714` | `(int, int, int, int)` |
85
+ | `swapTokensForKas` | `3698a282` | `(int, int, int, int)` |
86
+
87
+ The SDK encodes and decodes both (`POOL_BUY_COMPOSABLE_TAG`, `POOL_SELL_COMPOSABLE_TAG`).
88
+
89
+ **Units.** KAS legs are in units of 0.01 KAS (1 unit = 1,000,000 sompi). Token amounts are whole tokens.
90
+
91
+ **Formulas.** Fee 0.30 % of the KAS leg. 0.10 % of the leg accrues for Kasseal and the creator, rounded to the nearest
92
+ unit (half up); the rest of the fee stays in the reserve.
93
+
94
+ ```
95
+ buy: fee = ceil(kasIn × 30 / 10000) platform = floor((kasIn × 10 + 5000) / 10000)
96
+ tokensOut = floor(tokenReserve × (kasIn − fee) / (kasScaled + kasIn − fee))
97
+ kasScaled' = kasScaled + kasIn − platform
98
+ tokenReserve' = tokenReserve − tokensOut
99
+
100
+ sell: gross = floor(kasScaled × tokensIn / (tokenReserve + tokensIn))
101
+ fee = ceil(gross × 30 / 10000) platform = floor((gross × 10 + 5000) / 10000)
102
+ kasOut = gross − fee
103
+ kasScaled' = kasScaled − kasOut − platform
104
+ tokenReserve' = tokenReserve + tokensIn
105
+
106
+ both: feeAccrued' = feeAccrued + platform
107
+ pool cell value = (kasScaled' + feeAccrued') × 1,000,000 + dust
108
+ ```
109
+
110
+ `dust` is the part of the pool cell's value below one unit. A swap carries it unchanged. The SDK's
111
+ `swapKasForTokens(state, kasIn, 'uncapped', 'nearest')` and `swapTokensForKas(state, tokensIn, 'uncapped',
112
+ 'nearest')` compute exactly these numbers.
113
+
114
+ **Compute budgets.** A pool input needs a compute budget of 23 in a composed transaction (the worst case: a swap
115
+ reading two extra token inputs). Kasseal's own two shapes need 16 (buy) and 19 (sell).
116
+
117
+ ## 4. Swaps the pool refuses
118
+
119
+ A quote that models only the formulas above can produce trades the pool refuses. The pool refuses a swap in each of
120
+ these cases, from the pool program of both current builds.
121
+
122
+ **Both directions**
123
+
124
+ - The pool cell's state is not well formed (the pool never produces one).
125
+ - An LP-share cell of this pool is an input.
126
+ - The pool's successor is not exactly one output, or its value is not exactly
127
+ `(kasScaled' + feeAccrued') × 1,000,000 + dust`.
128
+ - `kasScaled' + feeAccrued'` exceeds 9,000,000,000,000 units.
129
+ - The token inputs: fewer than 1 or more than 3; `reserveK` is negative or not below their count; the input at
130
+ `reserveK` is not the pool-owned reserve (owner `0x04` the pool's id, borrowing disabled, no guard) holding exactly
131
+ `tokenReserve`; or any other token input is owned `0x04` by the pool's id or `0x03` by the P2SH of the pool cell's
132
+ or the reserve's script.
133
+ - The token outputs: more than 3; `restK` or `mergedK` is negative or not below their count; the output there is not
134
+ the reserve's exact successor (owner the pool, holding exactly `tokenReserve'`, same template and extension); or
135
+ its KAS value is below the reserve input's.
136
+
137
+ **Buy (`swapKasForTokens`)**
138
+
139
+ - `kasInScaled` is 0 or less, or above 7,000,000,000 units (70,000,000 KAS).
140
+ - `kasIn − fee` is 0 or less.
141
+ - `tokensOut` is less than 1.
142
+ - `tokensOut` is less than `minTokensOut`. A negative `minTokensOut` is accepted and has no effect.
143
+ - `tokensOut` is not below `tokenReserve`: a buy can never empty the reserve.
144
+
145
+ **Sell (`swapTokensForKas`)**
146
+
147
+ - Fewer than 2 token inputs (the tokens sold must come from somewhere other than the reserve).
148
+ - `tokensIn` is 0 or less, or above 1,200,000,000; or `tokenReserve + tokensIn` is above 1,200,000,000.
149
+ - `gross` is 0 or less, or not below `kasScaled`.
150
+ - `kasOut` is below 10 units (0.1 KAS).
151
+ - `minOutScaled` is negative.
152
+ - `kasOut` is below `minOutScaled`.
153
+ - `kasScaled'` is 0 or less.
154
+
155
+ The SDK's quote functions throw on every case they can see from the state alone (`PoolError`,
156
+ `PoolPayoutTooSmallError`, `ArgumentError`), so a quote the SDK returns is one the pool accepts on that state.
157
+
158
+ ## 5. What is composable and what is not
159
+
160
+ "Composable" is about one token's lineages: the token T and the LP shares L of the pool.
161
+
162
+ - **Swaps** may share a transaction, and T's transfer, with any other covenant, within the rules above.
163
+ - **Add liquidity, remove liquidity and fee payouts (sweeps)** keep exact transaction shapes for their own pool's
164
+ lineages: they cannot share T's or L's transfer with another covenant. They **can** share a transaction with a
165
+ pool of **another** token (a swap there, for example) or with another token's curve. Each entry pins its own
166
+ lineages exactly.
167
+ - **Pool setup (`bindLp`)** cannot share a transaction with anything: it allows at most 3 outputs, which leaves no
168
+ room.
169
+ - **The bonding curve** keeps exact shapes for its own token, and can share a transaction with another token's
170
+ pool. A token's curve and its pool are never live at the same time.
171
+
172
+ ## 6. Reading the pool's state, pending trades included
173
+
174
+ Kasseal's app chains swaps on transactions still in the mempool, so the cell to build on is often not yet accepted.
175
+ The API serves both the accepted head and the pending tip. It is public and read-only.
176
+
177
+ | Read | What it gives |
178
+ |---|---|
179
+ | `GET /tokens/{T}/launch-proof` | The proof; `graduation.P` is the token's real pool |
180
+ | `GET /pools/{P}/cell` | The live pool cell (`outpoint`, `amount`, `redeemScript`, decoded `state`) and, while trades are pending, `tip`: the cells at the end of the chain of pending swaps |
181
+ | `GET /tokens/{T}/covenant-cells` | The pool's reserve cell (`reserve`), picked by its state rather than by position, and any `strays` sent to the pool |
182
+ | Stream `{op:'sub', ch:'token', id:T}` | `pool.state` on every accepted swap, and live-only `pool.tip` frames when the server sends them |
183
+
184
+ **Which cells to spend.**
185
+
186
+ - **With a `tip`:** the pool cell from `tip.pool`, the reserve from `tip.reserve`. `tip.via` lists the pending
187
+ transactions the tip follows, oldest first, at most 8. Your transaction depends on them.
188
+ - **With no `tip`:** the pool cell from the response, the reserve from `covenant-cells.reserve`, read right after. If
189
+ the reserve does not hold the state's `tokenReserve`, read both again.
190
+ - **`headSpent: true`**, or **503 `head-moving`:** the head is changing hands. Wait (`retryAfterMs`) and read again.
191
+
192
+ **Your own pending transactions.** The tip follows only transactions the API can prove, which are Kasseal's own
193
+ shapes. A composed transaction that spends another covenant is not followed, and app swaps wait until it is
194
+ accepted. A router building on its own pending transaction should chain on that transaction's outputs, which it
195
+ knows, and should expect app swaps to queue behind it.
196
+
197
+ **Losing a race.** Two transactions that spend the same pool outpoint conflict, and the network accepts one. If yours
198
+ loses, it costs nothing; rebuild on the new state. `GET /tx/{txid}` and the stream's `tx` channel report `submitted`,
199
+ `accepted`, `confirmed` (at least 10 blue score deep, and only while the node is synced) or `dropped`.
200
+
201
+ **Indexing.** Kasseal's indexer records every transaction the chain accepts, wherever it was submitted. A routed trade
202
+ is attributed by net token flow: a buy to the party that gains the most tokens, a sell to the party that gives the
203
+ most.
204
+
205
+ ## 7. The SDK's composable helpers and their safe defaults
206
+
207
+ **Swap and deposit.** `buildSwap({ side: 'kas->tok', deliverToScript: { redeem, scriptFunding, allowAnyScript? } })`
208
+ delivers the bought tokens to a cell owned by a script (`0x03`, owner = P2SH(redeem)) instead of the buyer's key, and
209
+ pays `scriptFunding` sompi to that script's address as a plain output: the input that will authorize the cell later.
210
+
211
+ - **By default only a key-locked script is accepted:** `<32-byte x-only key> OP_CHECKSIG`, built by
212
+ `keyLockedRedeem(key)`. Tokens delivered there can always be moved by that key.
213
+ - **`allowAnyScript: true`** accepts another script. Even then the SDK refuses an empty script (anyone could satisfy
214
+ it) and a script that is a pool or token program (tokens delivered there would be locked for good).
215
+ - `scriptFunding` must be at least 2,010,000 sompi (0.0201 KAS), the minimum the SDK pays to any plain output.
216
+ - Refused with `UnsafeScript`.
217
+
218
+ **Script sell.** `buildScriptSell({ poolId, redeem, signerXOnly, scriptAddress, payout, allowAnyScript? })` sells a
219
+ script-owned cell, authorized by spending a UTXO at the script's address.
220
+
221
+ - `scriptAddress` must be exactly P2SH(`redeem`).
222
+ - By default `redeem` must be the key-locked form, locked to `signerXOnly`.
223
+ - `allowAnyScript` lifts the key-locked requirement only; pool and token programs stay refused.
224
+
225
+ **Multi-cell sell.** `buildSwap({ side: 'tok->kas', extraCell })` sells two of your own cells in one swap without
226
+ merging them first. KCC-20 allows at most three token inputs: your two cells and the reserve.
227
+
228
+ **Your own shapes.** For anything else, the SDK gives you the pieces: the signature-script encoders
229
+ (`poolSwapKasForTokensSigScript`, `poolSwapTokensForKasSigScript`), the pool state codec, the quote functions and the
230
+ mass model. You are then responsible for every rule in section 2.
package/docs/errors.md ADDED
@@ -0,0 +1,164 @@
1
+ # Errors
2
+
3
+ Every failure the SDK raises on purpose is an instance of a named error class with a stable code string. Read it
4
+ with `errorCode(e)` (or test it with `isKassealError(e, 'CODE')`); match on the code or on `instanceof`, never on the
5
+ message: messages are for people and may change in any release. The code is also the error's `code` property,
6
+ except on the three wallet errors, whose `code` is the wallet's own numeric code. A code never changes meaning within
7
+ a major version (see [STABILITY.md](../STABILITY.md)). `ERROR_CODES` lists every code; the package's release checks
8
+ assert that this page and that list name exactly the same classes and codes.
9
+
10
+ ```ts
11
+ try {
12
+ built = await builder.buildSwap(params);
13
+ } catch (e) {
14
+ switch (errorCode(e)) {
15
+ case 'PROOF_NOT_BOUND': /* verify the launch proof first */ break;
16
+ case 'NEEDS_SPLIT': /* carve an exact cell: e.cell, e.carve */ break;
17
+ case 'NET_BOUND_EXCEEDED': /* the fee or deposit moved: show the new total */ break;
18
+ default: throw e;
19
+ }
20
+ }
21
+ ```
22
+
23
+ The rule behind most of them: **the SDK refuses rather than guesses.** No error below means funds moved; each one is
24
+ raised before anything is signed or submitted.
25
+
26
+ ## Launch proof and identity
27
+
28
+ | Class | `code` | Raised when |
29
+ |---|---|---|
30
+ | `ProofNotBound` | `PROOF_NOT_BOUND` | A buy, pool buy or deposit without `proofVerdict: 'bound'` |
31
+ | `CurveNotOfProof` | `CURVE_NOT_OF_PROOF` | The curve asked for is not the one the verified proof names (`expectedCurveId`) |
32
+ | `PoolNotOfProof` | `POOL_NOT_OF_PROOF` | The pool asked for is not the one the verified proof names (`expectedPoolId`) |
33
+ | `LineageMismatch` | `LINEAGE_MISMATCH` | The served curve or pool trades another token than `tokenId` |
34
+ | `UnknownCurveTemplate` | `UNKNOWN_CURVE_TEMPLATE` | The served curve program is not one of the bundled builds |
35
+ | `TreasuryNotAllowedOnNetwork` | `TREASURY_NOT_ALLOWED_ON_NETWORK` | A program's fee recipient is not one this network allows |
36
+ | `ForeignCovenantInput` | `FOREIGN_COVENANT_INPUT` | A transaction would spend a covenant cell of another lineage, or a P2SH output as plain funding |
37
+ | `CovenantCellValue` | `COVENANT_CELL_VALUE` | A curve-owned cell is served with less KAS than the contract allows: the served data cannot be real |
38
+ | `CovenantCellNotFound` | `COVENANT_CELL_NOT_FOUND` | No served cell has the exact state the covenant pins (for example the pool's reserve) |
39
+ | `TokenAmountMismatch` | `TOKEN_AMOUNT_MISMATCH` | A curve sell would take another number of tokens than the caller approved (`expectedTokens`) |
40
+
41
+ ## Amounts, bounds and shapes
42
+
43
+ | Class | `code` | Raised when |
44
+ |---|---|---|
45
+ | `NetBoundExceeded` | `NET_BOUND_EXCEEDED` | The all-in cost exceeds `maxAllIn`, or the net payout is below `minNetOut` |
46
+ | `SlippageOutOfRange` | `SLIPPAGE_OUT_OF_RANGE` | A slippage tolerance is negative, above 10 %, finer than 0.01 %, or not a number |
47
+ | `NeedsSplit` | `NEEDS_SPLIT` | A sell or deposit needs one cell of an exact amount; `cell` is to be split, carving `carve` |
48
+ | `NeedsConsolidation` | `NEEDS_CONSOLIDATION` | The amount is spread over several cells; `cells` are to be merged (at most 3 per transaction) |
49
+ | `InsufficientTokensError` | `INSUFFICIENT_TOKENS` | The owner's cells hold fewer tokens than asked |
50
+ | `InsufficientFundsError` | `INSUFFICIENT_FUNDS` | The wallet's KAS does not cover the trade, the deposit and the fee |
51
+ | `PinnedFundingGone` | `PINNED_FUNDING_GONE` | A coin pinned for a retry (`fundingOptions.required`) is gone: the first attempt may have landed. Ask before building again |
52
+ | `ResidualBelowMinimum` | `RESIDUAL_BELOW_MINIMUM` | The inputs cannot cover the outputs and the fee while leaving the payout or change its minimum |
53
+ | `FloorViolation` | `FLOOR_VIOLATION` | An output would carry less KAS than the minimum for its kind, or a token output would be owned by its own token (anyone could spend it) |
54
+ | `TokenRecipientRefused` | `TOKEN_RECIPIENT_REFUSED` | A built transaction would send tokens somewhere the caller did not name |
55
+ | `UnsafeScript` | `UNSAFE_SCRIPT` | A swap-and-deposit or script sell names a script that is not key-locked (without `allowAnyScript`), is empty, or is a pool or token program; or a script sell's address or key does not match |
56
+ | `ShapeNotSupported` | `SHAPE_NOT_SUPPORTED` | The contracts cannot accept the requested transaction shape |
57
+ | `LpUnsafe` | `LP_UNSAFE` | A deposit on a pool whose liquidity invariants the indexer does not confirm (`lpSafe` false). Withdrawals are never refused for this |
58
+ | `RatioDriftError` | `RATIO_DRIFT` | The pool's KAS-to-token ratio moved 1 % or more since the liquidity quote: quote again and ask the user |
59
+ | `ClaimMismatch` | `CLAIM_MISMATCH` | A built fee payout pays something other than the plan |
60
+
61
+ ## Fees and mass
62
+
63
+ | Class | `code` | Raised when |
64
+ |---|---|---|
65
+ | `FeerateOutOfRange` | `FEERATE_OUT_OF_RANGE` | The fee rate from the API is below the network minimum or above 20 times it: it is not used |
66
+ | `FeeAboveCeiling` | `FEE_ABOVE_CEILING` | The computed fee would exceed the SDK's ceiling for the transaction: nothing is built |
67
+
68
+ ## Signing, submission and retries
69
+
70
+ | Class | `code` | Raised when |
71
+ |---|---|---|
72
+ | `FinalizeError` | `FINALIZE` | A signed transaction differs from the built one: another id, a changed input, a missing or invalid signature, a sighash other than `SIGHASH_ALL`, other masses |
73
+ | `SighashError` | `SIGHASH` | A sighash cannot be computed for the given transaction and input |
74
+ | `SignRequestError` | `SIGN_REQUEST` | A signature slot in a signing request is not where it should be, or is not empty |
75
+ | `RejectedError` | `REJECTED` | A node refused the transaction; carries the classified reason |
76
+ | `ReplacementRefused` | `REPLACEMENT_REFUSED` | A fee-bump replacement is not allowed: the transaction is not one of yours, not in a replaceable state (a lost race is never replaced: rebuild instead), or the replacement does not spend the same inputs or pay enough more |
77
+ | `RetryPolicyError` | `RETRY_POLICY` | The retry policy is misconfigured or used out of order |
78
+ | `InvalidTransition` | `INVALID_TRANSITION` | A submission state changed in a way the state machine does not allow |
79
+ | `OptimisticConflict` | `OPTIMISTIC_CONFLICT` | The pending-trade tracker was given a transaction twice, or one whose recorded effects do not match what it spends |
80
+
81
+ ## Runtime and artifacts
82
+
83
+ | Class | `code` | Raised when |
84
+ |---|---|---|
85
+ | `UnsupportedNetwork` | `UNSUPPORTED_NETWORK` | A network id other than `mainnet` or `testnet-10`, or none where one is required |
86
+ | `UnsupportedBuild` | `UNSUPPORTED_BUILD` | A contract build that is not the network's bundled build |
87
+ | `SdkIntegrityError` | `SDK_INTEGRITY` | A bundled Kaspa WASM SDK file (Node entry), or the WASM bytes given to or fetched by `initWeb` (web entry), does not match its pinned SHA-256 |
88
+ | `ArtifactIntegrityError` | `ARTIFACT_INTEGRITY` | A bundled contract artifact or the artifact manifest is missing, altered or not listed |
89
+ | `SdkNotInstalled` | `SDK_NOT_INSTALLED` | A build or signing call before the WASM is loaded: import the Node entry, or await `initWeb` |
90
+ | `ArtifactMissing` | `ARTIFACT_MISSING` | A contract artifact the call needs is not in the bundle |
91
+ | `ArtifactNotLoaded` | `ARTIFACT_NOT_LOADED` | A curve preset's artifacts are not loaded yet in the browser: await `ensurePresetArtifacts` |
92
+ | `ArtifactSourceNotInstalled` | `ARTIFACT_SOURCE_NOT_INSTALLED` | The contract artifacts are not loaded yet |
93
+ | `ContractSetNotSupported` | `CONTRACT_SET_NOT_SUPPORTED` | A contract set this SDK does not build for |
94
+
95
+ ## Wallets and addresses
96
+
97
+ | Class | `code` | Raised when |
98
+ |---|---|---|
99
+ | `WalletUnavailable` | `WALLET_UNAVAILABLE` | The wallet extension is not installed in this browser |
100
+ | `WalletNotConnected` | `WALLET_NOT_CONNECTED` | Call `connect()` first |
101
+ | `WalletNetworkMismatch` | `WALLET_NETWORK_MISMATCH` | The wallet is on another network than the adapter's `network` |
102
+ | `WalletAccountMismatch` | `WALLET_ACCOUNT_MISMATCH` | The account's address is not of the network, or its reported key does not match its address |
103
+ | `KasWareError` | `KASWARE` | KasWare answered with an error. `rejectedByUser` is true when the user declined (code 4001); `code` is the wallet's numeric code |
104
+ | `KastleError` | `KASTLE` | Kastle answered with an error; as above |
105
+ | `KaspireError` | `KASPIRE` | Kaspire answered with an error; as above |
106
+ | `MessageSigningUnsupported` | `MESSAGE_SIGNING_UNSUPPORTED` | The wallet cannot sign messages |
107
+ | `MessageSignatureError` | `MESSAGE_SIGNATURE` | A message signature is malformed |
108
+ | `AddressError` | `ADDRESS` | An address does not decode, or is not the expected kind |
109
+
110
+ ## Decoding
111
+
112
+ | Class | `code` | Raised when |
113
+ |---|---|---|
114
+ | `UnknownTemplateError` | `UNKNOWN_TEMPLATE` | A program's template hash is not on the verified list: never decoded by guesswork |
115
+ | `TemplateMismatchError` | `TEMPLATE_MISMATCH` | The program hashes to another template than the one asserted |
116
+ | `TemplateNotDecodableError` | `TEMPLATE_NOT_DECODABLE` | The template is known but its state cannot be decoded |
117
+ | `LayoutError` | `LAYOUT` | The base class of the template, decoding, validation, supply, ownership and transfer errors |
118
+ | `DecodeError` | `DECODE` | Bytes are not a canonical encoding |
119
+ | `SigScriptError` | `SIGSCRIPT` | A signature script is not one of the contracts' entry encodings |
120
+ | `StateCodecError` | `STATE_CODEC` | A cell state does not encode or decode canonically |
121
+ | `DeclarationError` | `DECLARATION` | A KCC-23 declaration payload is malformed |
122
+ | `ValidationError` | `VALIDATION` | A decoded or constructed state breaks a layout rule |
123
+ | `SupplyError` | `SUPPLY` | A transfer would break supply conservation |
124
+ | `OwnershipError` | `OWNERSHIP` | A transfer would break an ownership rule |
125
+ | `TransferError` | `TRANSFER` | A KCC-20 transfer breaks a structural rule (counts, witness, extension) |
126
+ | `StateJsonError` | `STATE_JSON` | A state served as JSON is malformed |
127
+
128
+ ## Quote math
129
+
130
+ All extend `CurveMathError`. The quote functions are total: invalid input raises one of these, never `NaN` or a
131
+ silently clamped value.
132
+
133
+ | Class | `code` | Raised when |
134
+ |---|---|---|
135
+ | `CurveMathError` | `CURVE_MATH` | The base class of the errors below |
136
+ | `ArgumentError` | `ARGUMENT` | An argument is not a bigint or outside its domain |
137
+ | `SellPayoutTooSmallError` | `SELL_PAYOUT_TOO_SMALL` | A curve sell would pay less than 0.1 KAS net: the curve refuses it |
138
+ | `ParameterError` | `PARAMETER` | Curve constants break a cap |
139
+ | `OverflowError` | `OVERFLOW` | A value would leave the contracts' 64-bit integer range |
140
+ | `PoolError` | `POOL` | A pool swap the pool would refuse: zero output, a leg above its cap, a reserve emptied |
141
+ | `PoolPayoutTooSmallError` | `POOL_PAYOUT_TOO_SMALL` | A pool sell would pay less than 0.1 KAS |
142
+ | `LpError` | `LP` | The base class of the liquidity errors below |
143
+ | `LpStateError` | `LP_STATE` | The pool state is malformed for liquidity |
144
+ | `LpShareCountError` | `LP_SHARE_COUNT` | Fewer than 1 share |
145
+ | `LpSharesCapError` | `LP_SHARES_CAP` | A deposit would exceed the pool's share cap |
146
+ | `LpReserveCapError` | `LP_RESERVE_CAP` | A deposit would push a reserve above its cap |
147
+ | `LpFloorError` | `LP_FLOOR` | A withdrawal would reach into the locked graduation shares |
148
+ | `LpPayoutTooSmallError` | `LP_PAYOUT_TOO_SMALL` | A withdrawal's KAS leg is below 0.1 KAS |
149
+ | `LpTokenLegTooSmallError` | `LP_TOKEN_LEG_TOO_SMALL` | A withdrawal's token leg is zero |
150
+ | `LpInvariantError` | `LP_INVARIANT` | A defensive check failed; report it as a bug |
151
+ | `LpInventoryError` | `LP_INVENTORY` | The pool's share inventory does not hold what the state requires |
152
+ | `StandardBandOutOfRange` | `STANDARD_BAND_OUT_OF_RANGE` | A KAS price outside the range the Standard curve bands cover |
153
+
154
+ ## API data sources
155
+
156
+ | Class | `code` | Raised when |
157
+ |---|---|---|
158
+ | `NotSupported` | `NOT_SUPPORTED` | A `DataProvider` does not implement the requested call |
159
+ | `ApiError` | `API_ERROR` | `createApiSources`: the API answered with an error (after the waits for 429 and 503 ran out); `status` and `problem` carry the answer |
160
+ | `HeadMoving` | `HEAD_MOVING` | `createApiSources`: the curve or pool head is changing hands; read again in about a second. Nothing was built |
161
+
162
+ ## API errors
163
+
164
+ Errors from the Kasseal API are HTTP problem details, not SDK classes: see [api.md](api.md#problem-codes-you-will-meet).
@@ -0,0 +1,117 @@
1
+ # Explorers and indexers
2
+
3
+ What an explorer needs to label Kasseal covenants and transactions, show token names and logos, and decode curve and
4
+ pool state. Everything here holds on testnet-10 today. Mainnet uses the mainnet build, whose hashes are in
5
+ [contract-artifacts.md](contract-artifacts.md).
6
+
7
+ ## 1. What to label
8
+
9
+ A Kasseal token is a family of covenant lineages, all on the KCC-20 reference token program for T and L:
10
+
11
+ | Lineage | What it is | Where its id comes from |
12
+ |---|---|---|
13
+ | **T**, token | The KCC-20 token (fixed supply, 0 decimals) | `GET /tokens` (`meta.covenantId`) |
14
+ | **C**, bonding curve | The curve that sells the token | Launch proof, `C` |
15
+ | **P**, pool | The constant-product pool the token graduates into | Launch proof, `graduation.P` (once graduated) |
16
+ | **L**, LP share | The pool's liquidity-share token | Pool state `lpCovId` (`GET /pools/{P}/cell`), once the pool is set up |
17
+
18
+ Suggested labels: `Kasseal · <TICKER> token`, `Kasseal · <TICKER> bonding curve`, `Kasseal · <TICKER> pool`,
19
+ `Kasseal · <TICKER> LP share`.
20
+
21
+ Kasseal's fee recipient (the treasury) on testnet-10:
22
+ `kaspatest:qp8pqkcf0w8l3mke93eu86ngyc808x54t574a8jha96nu63x8tfn2et7nk35w`. On mainnet:
23
+ `kaspa:qrt0p8sd5g8k383mzxgqtyl7ehkdez8ds8cpxqcuwjdaayke9rjhg9pqnr3zx`.
24
+
25
+ ## 2. Enumerating every Kasseal covenant
26
+
27
+ From the public API (testnet-10: `https://app.kasseal.com/v1`; no key needed):
28
+
29
+ 1. `GET /tokens?limit=50`, following `nextCursor`: every token id T, with `phase` (`bonding`, `graduated`, `listed`)
30
+ and its metadata.
31
+ 2. For each T: `GET /tokens/{T}/launch-proof`: C, `params`, `graduation.P` once graduated, the KCC-23 `declaration`,
32
+ and the API's own check in `verifier.result`. **Only label tokens whose proof is `bound`.** Better: verify it
33
+ yourself with the SDK ([launch-proof.md](launch-proof.md)).
34
+ 3. For each P: `GET /pools/{P}/cell`: `state.lpCovId` is L (all zeros until the pool is set up).
35
+
36
+ New launches arrive live on the stream (`wss://app.kasseal.com/v1/stream`, `{"op":"sub","ch":"tape"}`), or re-poll
37
+ `GET /tokens?sort=new` every minute.
38
+
39
+ ## 3. Recognising Kasseal programs from chain data alone
40
+
41
+ | Program | Template hash |
42
+ |---|---|
43
+ | Token (T and L): KCC-20 reference | `9703112ee6e3555107cd168858992b77d3b74f655205b2b463b1f9ec2ec73cf7` |
44
+ | Pool, testnet-10 (`v1-kasseal-mainnet-2-tn10`) | `28170395ca9350966c0d732ffce8b13c5a94201e74552b7add67143a35dea56a` |
45
+ | Pool, mainnet (`v1-kasseal-mainnet-2`) | `92acd761504e4fa05acf70675ef1aea0c66efa2126ec5c726e4779b8aef054e0` |
46
+
47
+ **Curves have no single hash.** The creator's payout key is a constant of the curve program, so every creator's curve
48
+ has its own template hash. Identify a curve by its token's launch proof. Alternatively, match the curve program with
49
+ the creator key masked, using the bundled curve artifacts.
50
+
51
+ **A matching template is not proof.** Anyone can create a cell from the same pool program under another covenant id.
52
+ Label a pool as Kasseal's only when a token's launch proof names its id.
53
+
54
+ ## 4. Decoding state
55
+
56
+ The state sits at offset 1 of each covenant's script, KCC-1 encoded. The SDK decodes both
57
+ (`decodeCurveState`, `decodePoolState`), and the API serves them decoded (`GET /tokens/{T}/curve-head`,
58
+ `GET /pools/{P}/cell`).
59
+
60
+ **Curve state (53 bytes):** `tokenCovId` (32 bytes, = T), `lotsSold` (lots of `params.lot` tokens), `feeAccrued`
61
+ (sompi of fees waiting for a sweep), `phase` (1 = active). The curve sells 800,000,000 tokens; 400,000,000 are held
62
+ back for the pool; the supply is 1,200,000,000.
63
+
64
+ **Pool state (139 bytes):** `tokenCovId` (T), `kasScaled` (the KAS reserve, in 0.01 KAS units), `tokenReserve`
65
+ (tokens), `lpShares` (shares outstanding, including the 1,000,000 locked at graduation), `lpCovId` (L, or zeros until
66
+ set up), `feeAccruedScaled` (0.01 KAS units), `creatorSpk` (the creator's payout script).
67
+
68
+ Price per token in sompi: `kasScaled × 1,000,000 / tokenReserve`. This is a display figure, not an oracle (see
69
+ [dex-and-routers.md](dex-and-routers.md)).
70
+
71
+ ## 5. Transaction types
72
+
73
+ The entry point is the 4-byte dispatch tag near the end of the covenant input's signature script, before the redeem
74
+ script.
75
+
76
+ | Transaction | Tag | Label |
77
+ |---|---|---|
78
+ | Preparation: creates the curve's first cell and carries the KCC-23 declaration in its payload | (no covenant input) | Launch (1/2) |
79
+ | Curve `init`: creates the full supply in two curve-owned cells | `a651f278` | Launch (2/2) |
80
+ | Curve `buy(n, user)` | `904b34e8` | Buy on curve |
81
+ | Curve `sell(n)` | `a42ba2dd` | Sell on curve |
82
+ | Curve or pool `sweep()` | `b1f6f40b` | Fee payout (creator and Kasseal) |
83
+ | Curve `graduate(poolPrefix, poolSuffix)` | `8cbe9536` | Graduation (curve to pool) |
84
+ | Pool `bindLp(tokenPrefix, tokenSuffix)` | `e411082d` | Pool liquidity setup |
85
+ | Pool `swapKasForTokens(kasInScaled, minTokensOut, reserveK, restK)` | `855ca714` | Buy on pool |
86
+ | Pool `swapTokensForKas(tokensIn, minOutScaled, reserveK, mergedK)` | `3698a282` | Sell on pool |
87
+ | Pool `addLiquidity(shares, lpUser)` | `ec0aa00c` | Add liquidity |
88
+ | Pool `removeLiquidity(shares, tokUser)` | `85e9489a` | Remove liquidity |
89
+
90
+ **Pool swaps are composable.** Other token inputs and outputs in the same transaction belong to the user, a router or
91
+ another venue. `reserveK` is the position of the pool's reserve among the transaction's token inputs, and `restK` /
92
+ `mergedK` the position of its successor among the token outputs. Kasseal's own app uses buy `0, 0` and sell `1, 0`.
93
+ The pool's part of any swap is its own cell, its reserve and that successor. One transaction can also swap on two
94
+ pools. Kasseal's indexer attributes a routed trade by net token flow: a buy to the party that gains the most tokens,
95
+ a sell to the party that gives the most.
96
+
97
+ **Fees.** Curve trades: 1 % of the KAS leg, rounded up. Pool swaps: 0.30 %. Of the fees paid out, half goes to the
98
+ creator and half to Kasseal's treasury. The two payout outputs of a sweep or graduation carry no covenant binding.
99
+
100
+ ## 6. Token names, tickers and logos
101
+
102
+ - On chain, each token's metadata is a KCC-23 declaration in the preparation transaction (`name`, `symbol`,
103
+ `decimals`, `description`, `image`). The launch proof returns it as `declaration`.
104
+ - `GET /tokens/{T}` returns it ready to display in `meta`: `name`, `ticker`, `decimals` (always 0), `description`,
105
+ `imageUrl`, `imageSource`.
106
+ - **Logos.** `image` is `sha256:<hex>`; the file is `/v1/images/<hex>` on the API host (PNG, JPEG or WebP, up to 1 MiB
107
+ and 2048 px). The file name is the SHA-256 of the bytes, so you can verify it. `imageSource: "external"` is a URL
108
+ the creator declared that Kasseal never fetches or checks.
109
+ - **Hidden tokens.** `meta.hidden: true` means Kasseal hid a token's metadata after a takedown request (empty name and
110
+ ticker, no image). Please honour it.
111
+ - Tickers are not unique. Key by covenant id.
112
+
113
+ ## 7. Limits
114
+
115
+ Reads are free and unauthenticated: 60 requests per second per IP, 200 for the live state routes. Send no `Origin`
116
+ header from a server. If you index from fixed server IPs and need more, contact Kasseal. The full API description is
117
+ `GET /v1/openapi.yaml`; see also [api.md](api.md).