@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.
- package/CHANGELOG.md +37 -0
- package/LICENSE +21 -0
- package/README.md +193 -2
- package/SECURITY.md +60 -0
- package/STABILITY.md +44 -0
- package/THIRD_PARTY_NOTICES +55 -0
- package/dist/artifacts/codec/fixtures/argent-kcc20-reference-c8a0871.json +32 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k103.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k113.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k124.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k136.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k164.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k180.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k198.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k218.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k240.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k264.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k291.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k320.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k352.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k388.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k427.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k470.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k518.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k571.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-k629.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1097.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1209.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k122.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1332.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k134.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1468.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k147.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k161.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1618.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k177.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1783.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k195.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k1965.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k214.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k2166.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k235.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k2387.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k258.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k2631.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k284.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k2900.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k313.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k3197.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k344.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k3524.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k379.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k3885.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k417.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k4283.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k459.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k4722.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k506.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k5205.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k557.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k5738.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k613.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k6326.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k675.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k6974.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k744.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k7688.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k820.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k8475.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k904.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k9343.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard-lot10k-k996.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.ctor.standard.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k103.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k113.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k124.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k136.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k164.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k180.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k198.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k218.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k240.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k264.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k291.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k320.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k352.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k388.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k427.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k470.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k518.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k571.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-k629.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1097.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1209.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k122.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1332.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k134.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1468.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k147.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k161.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1618.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k177.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1783.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k195.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k1965.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k214.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k2166.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k235.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k2387.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k258.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k2631.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k284.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k2900.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k313.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k3197.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k344.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k3524.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k379.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k3885.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k417.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k4283.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k459.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k4722.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k506.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k5205.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k557.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k5738.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k613.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k6326.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k675.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k6974.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k744.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k7688.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k820.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k8475.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k904.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k9343.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard-lot10k-k996.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2/curve.standard.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k103.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k113.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k124.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k136.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k164.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k180.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k198.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k218.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k240.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k264.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k291.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k320.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k352.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k388.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k427.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k470.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k518.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k571.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-k629.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1097.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1209.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k122.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1332.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k134.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1468.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k147.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k161.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1618.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k177.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1783.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k195.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k1965.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k214.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k2166.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k235.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k2387.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k258.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k2631.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k284.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k2900.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k313.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k3197.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k344.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k3524.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k379.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k3885.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k417.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k4283.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k459.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k4722.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k506.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k5205.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k557.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k5738.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k613.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k6326.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k675.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k6974.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k744.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k7688.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k820.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k8475.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k904.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k9343.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard-lot10k-k996.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.ctor.standard.json +251 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k103.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k113.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k124.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k136.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k164.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k180.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k198.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k218.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k240.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k264.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k291.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k320.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k352.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k388.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k427.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k470.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k518.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k571.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-k629.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1097.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1209.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k122.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1332.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k134.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1468.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k147.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k161.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1618.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k177.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1783.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k195.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k1965.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k214.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k2166.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k235.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k2387.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k258.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k2631.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k284.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k2900.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k313.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k3197.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k344.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k3524.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k379.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k3885.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k417.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k4283.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k459.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k4722.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k506.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k5205.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k557.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k5738.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k613.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k6326.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k675.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k6974.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k744.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k7688.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k820.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k8475.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k904.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k9343.artifact.json +351 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard-lot10k-k996.artifact.json +350 -0
- package/dist/artifacts/contracts/curve/v1/artifacts/v1-kasseal-mainnet-2-tn10/curve.standard.artifact.json +351 -0
- package/dist/artifacts/contracts/pool/v1/artifacts/v1-kasseal-mainnet-2/pool.artifact.json +483 -0
- package/dist/artifacts/contracts/pool/v1/artifacts/v1-kasseal-mainnet-2/pool.ctor.json +211 -0
- package/dist/artifacts/contracts/pool/v1/artifacts/v1-kasseal-mainnet-2-tn10/pool.artifact.json +483 -0
- package/dist/artifacts/contracts/pool/v1/artifacts/v1-kasseal-mainnet-2-tn10/pool.ctor.json +211 -0
- package/dist/artifacts/manifest.json +429 -0
- package/dist/chunks/chunk-VITREHRZ.js +1 -0
- package/dist/chunks/chunk-XLPNXOE2.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--base-PG5VCON2.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-G2JAHX7I.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k103-MDMVZ2QI.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k113-VHAWBWJY.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k124-CCMPZRIZ.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k136-GLMQJSJY.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k164-OKMJDO5B.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k180-55OCXLQP.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k198-JU7B5XWS.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k218-XLJ5JHYS.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k240-SGVHCZXX.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k264-2E3LY7SC.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k291-6PY3BHY4.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k320-ZCJD5TZI.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k352-NGLJXQYP.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k388-PNX2RAFC.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k427-EQF3M2V6.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k470-SXB2LGOZ.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k518-5TBKPRN5.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k571-FUFPSPYU.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-k629-ZU2MY2M4.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1097-D6JDQO6O.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1209-OBAOMD6P.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k122-KQPN6NJK.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1332-RMFTEH6F.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k134-M275FLYC.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1468-NCJSKY2H.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k147-KR5AYKDB.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k161-G3TBLC2T.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1618-JDVUXEHK.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k177-G6PO2MOF.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1783-3M7EAYRN.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k195-RCMGQ3Y3.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k1965-JAMKZTIK.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k214-XA3LUEX4.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k2166-JK4MHEJR.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k235-TBRH6PLK.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k2387-7DUU6POJ.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k258-SV47XXNN.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k2631-IAORSCGF.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k284-NBVHUKHH.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k2900-ICMYLNN5.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k313-BBYRXMF3.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k3197-JPUNDL5O.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k344-7J4J66JW.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k3524-A4I4COO7.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k379-3YR3VO6O.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k3885-4RPB6FON.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k417-VXFC3D4N.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k4283-IMD4DMWY.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k459-SQK576EC.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k4722-PWIMNCX2.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k506-GA55ODGE.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k5205-YEWHS4TN.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k557-ADEHVYB5.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k5738-Q4PT5ZXE.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k613-VLPN3VOO.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k6326-MWPIBW3V.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k675-O7ULXDIW.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k6974-EQYZ5MUX.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k744-PTUGUVVG.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k7688-M6YCDJ2C.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k820-72Z76LGP.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k8475-WXJQJY54.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k904-HRQDFBY2.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k9343-YM2TLR4Q.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2--standard-lot10k-k996-AOXS4VIO.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--base-MVP32JP4.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-P7ALG4L7.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k103-PMFIFDC2.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k113-XTMJQOPT.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k124-LGCAC7UL.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k136-QYDYKMQO.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k164-L7UYHEI5.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k180-N7FK5TEK.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k198-5QBBZSVE.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k218-6H5GUBVP.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k240-ERN2IH63.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k264-EIVIVWEW.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k291-45QJXSZO.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k320-INQ4E2TN.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k352-M4Z433QA.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k388-KKTEOPOK.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k427-VBRUTBB3.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k470-XBN3YQAK.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k518-YQASY5LW.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k571-VJWS6O4L.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-k629-WNQIIPGS.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1097-2SAVEBG4.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1209-S4KMZ2NT.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k122-C2KWY6TF.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1332-XJWJWOCK.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k134-TCPXVCUL.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1468-7XJ4CCRU.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k147-6N62HWU7.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k161-IMMPF3UE.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1618-YV5JPCEE.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k177-GYSPGGBF.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1783-4A6KU6PT.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k195-JURU2SWD.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k1965-TO4XXF2I.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k214-NA2BXYQ4.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k2166-JSABPOAZ.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k235-467ZW5YL.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k2387-PIPX46IG.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k258-CGX3IAR3.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k2631-MPJN5VID.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k284-X2WS65VQ.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k2900-VD4BPEEL.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k313-T4OTQDBW.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k3197-WJCL3T5I.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k344-SFNQ3NNK.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k3524-WKI5E77C.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k379-2NOBMEA5.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k3885-LC6FHT5L.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k417-BYV6ERZR.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k4283-QBNHR6EQ.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k459-OBM2YAKZ.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k4722-5OJM5BZ7.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k506-2X3EXENX.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k5205-I5EAJYCQ.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k557-4R4FNC7X.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k5738-NS2DMP2O.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k613-QHO2XTG5.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k6326-T2JJQKXD.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k675-6T76I4I2.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k6974-PMDLIOCF.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k744-IPCUHXGU.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k7688-RP3BEVAI.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k820-BAB2GGE4.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k8475-VV4BF475.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k904-QM67HPNQ.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k9343-KCCISF2U.js +1 -0
- package/dist/chunks/v1-kasseal-mainnet-2-tn10--standard-lot10k-k996-AKQMLPZI.js +1 -0
- package/dist/index.d.ts +3874 -0
- package/dist/index.js +1 -0
- package/dist/kaspa/nodejs/LICENSE +15 -0
- package/dist/kaspa/nodejs/kaspa.d.ts +8264 -0
- package/dist/kaspa/nodejs/kaspa.js +16158 -0
- package/dist/kaspa/nodejs/kaspa_bg.wasm +0 -0
- package/dist/kaspa/nodejs/kaspa_bg.wasm.d.ts +951 -0
- package/dist/kaspa/nodejs/package.json +20 -0
- package/dist/kaspa/sdk-types.d.ts +1 -0
- package/dist/kaspa/web/LICENSE +15 -0
- package/dist/kaspa/web/kaspa.d.ts +9239 -0
- package/dist/kaspa/web/kaspa.js +15759 -0
- package/dist/kaspa/web/kaspa_bg.wasm +0 -0
- package/dist/kaspa/web/kaspa_bg.wasm.d.ts +951 -0
- package/dist/kaspa/web/package.json +24 -0
- package/dist/node.d.ts +14 -0
- package/dist/node.js +1 -0
- package/dist/web.d.ts +17 -0
- package/dist/web.js +1 -0
- package/docs/api.md +133 -0
- package/docs/concepts.md +152 -0
- package/docs/contract-artifacts.md +96 -0
- package/docs/dex-and-routers.md +230 -0
- package/docs/errors.md +164 -0
- package/docs/explorers.md +117 -0
- package/docs/launch-proof.md +111 -0
- package/docs/trading-bots.md +183 -0
- package/docs/wallets.md +144 -0
- package/examples/README.md +19 -0
- package/examples/lib/api.ts +116 -0
- package/examples/lib/proof.ts +45 -0
- package/examples/pool-buy.ts +86 -0
- package/examples/pool-sell-wallet.ts +72 -0
- package/examples/quote.ts +57 -0
- package/examples/swap-and-deposit.ts +63 -0
- package/examples/verify-launch-proof.ts +20 -0
- package/package.json +74 -4
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# The launch proof
|
|
2
|
+
|
|
3
|
+
Every Kasseal token has a **launch proof**: the two launch transactions and, once the token has graduated, the
|
|
4
|
+
graduation transaction. Verifying it shows, from the transactions alone, that the token, its curve and its pool are
|
|
5
|
+
genuine Kasseal programs, linked to each other, with a sealed supply. Verify it before you trade a token, label it,
|
|
6
|
+
or show it as verified.
|
|
7
|
+
|
|
8
|
+
The API serves the bundle at `GET /tokens/{T}/launch-proof`. The SDK verifies it in your own process. Nothing in the
|
|
9
|
+
bundle is trusted: every id and hash is recomputed. The verifier trusts only two things the SDK carries itself:
|
|
10
|
+
|
|
11
|
+
- the KCC-20 reference token program, whose template hash is checked when it loads
|
|
12
|
+
(`9703112ee6e3555107cd168858992b77d3b74f655205b2b463b1f9ec2ec73cf7`);
|
|
13
|
+
- the curve programs of the bundled contract builds, to check the curve's constants.
|
|
14
|
+
|
|
15
|
+
## Verdicts
|
|
16
|
+
|
|
17
|
+
| Verdict | Meaning | What to do |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| `bound` | Every step passed | Trade, using only the curve id and pool id the proof names |
|
|
20
|
+
| `unverified` | Something could not be proven: the preparation transaction is missing, the curve is not one of the bundled builds, or the graduation is not found on chain yet | Do not buy or deposit. Ask again later. A holder may still sell or withdraw |
|
|
21
|
+
| `invalid` | A recomputation disagreed with the bundle | Do not trade. Do not show the token as verified |
|
|
22
|
+
| `malformed` | The bundle does not parse | As `invalid` |
|
|
23
|
+
|
|
24
|
+
The builders enforce this: a curve buy, a pool buy and a deposit are refused unless you pass `proofVerdict: 'bound'`
|
|
25
|
+
(`ProofNotBound`). Sells and withdrawals are never gated, so a holder can always leave.
|
|
26
|
+
|
|
27
|
+
## What it verifies
|
|
28
|
+
|
|
29
|
+
| Step | Name | What is checked |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| 1 | Lineage T | The launch transaction's two outputs bound to the token id share one authorizing input, and the token id recomputes from that input's outpoint |
|
|
32
|
+
| 2 | Program | Each token cell's address commits to the unmodified KCC-20 reference program with the stated state, byte for byte |
|
|
33
|
+
| 3 | State | Both token cells are owned by the curve C under the covenant-id scheme, with borrowing and extension fields zero, and their amounts sum to the supply the curve's constants give |
|
|
34
|
+
| 4 | Sealing | The reference program only conserves supply, and consensus makes any other cell with the token's id impossible to create (a stated argument, not a computation) |
|
|
35
|
+
| 5 | Lineage C | The curve id recomputes from the preparation transaction; exactly one output carries it; the curve's program hashes to the stated template; its constants are read from the program itself and must equal the bundle's `params` |
|
|
36
|
+
| 6 | Custody | Curve-owned token cells move only through the curve's own entries, at the coded price (a stated argument) |
|
|
37
|
+
| 7 | Metadata | The token's KCC-23 declaration is the payload of the preparation transaction, and that transaction's id recomputes |
|
|
38
|
+
| 8 | Program recovery | The curve program revealed when the curve started is the one the preparation transaction committed to, and it was given the reference token program |
|
|
39
|
+
| 9 | Graduation | Once graduated: exactly one output carries the pool id P (the pool's first cell), and exactly one output carries the token: the 400,000,000-token reserve, now owned by P. The graduation was the curve's own `graduate` entry at its last lot, and the reserve it spent was the curve's own |
|
|
40
|
+
|
|
41
|
+
Before graduation, step 9 passes as not applicable.
|
|
42
|
+
|
|
43
|
+
The SDK reads signature scripts the way consensus does. A consensus-valid but non-minimal encoding is reported as a
|
|
44
|
+
note (`notes`), never as a failure.
|
|
45
|
+
|
|
46
|
+
## The graduation check against the public Kaspa API
|
|
47
|
+
|
|
48
|
+
Steps 1 to 9 run on the transactions the Kasseal API serves. A compromised or intercepted API could serve a doctored
|
|
49
|
+
graduation that names a counterfeit pool. So, once a token has graduated, confirm the graduation against a source
|
|
50
|
+
Kasseal does not operate:
|
|
51
|
+
|
|
52
|
+
1. Recompute the graduation transaction's id from the served transaction (`txidV1`). The id commits to every spent
|
|
53
|
+
outpoint and every output, covenant bindings included.
|
|
54
|
+
2. Ask the public Kaspa REST API for that id (`https://api.kaspa.org` on mainnet, `https://api-tn10.kaspa.org` on
|
|
55
|
+
testnet-10): `GET /transactions/{txid}?inputs=true&outputs=false&resolve_previous_outpoints=no`.
|
|
56
|
+
3. Compare: the transaction must be accepted (`is_accepted: true`), and every input's previous outpoint and
|
|
57
|
+
signature script must equal the served ones. Signature scripts are not part of the id, and step 9 reads the
|
|
58
|
+
reserve's program from them.
|
|
59
|
+
|
|
60
|
+
| Answer | Meaning | Verdict |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| Accepted, same inputs and signature scripts | Confirmed | Stays `bound` |
|
|
63
|
+
| Different transaction or signature scripts | The served graduation is not the real one | `invalid` |
|
|
64
|
+
| Not found, or not accepted | Not indexed yet (seconds after a graduation), or never mined | `unverified` until found; ask again |
|
|
65
|
+
| The public API cannot be read | Unknown | Stays as checked from the served data |
|
|
66
|
+
|
|
67
|
+
`graduationOnChain(json, network)` runs this step (it never throws; `confirmed`, `mismatch`, `not-found`,
|
|
68
|
+
`unavailable`, or `none` before graduation). [examples/lib/proof.ts](../examples/lib/proof.ts) puts the whole check together.
|
|
69
|
+
|
|
70
|
+
## Running it
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
import { graduationOnChain, launchProofFromJson, verifyLaunchProofJson } from '@kassealhq/sdk/node';
|
|
74
|
+
|
|
75
|
+
const network = 'testnet-10';
|
|
76
|
+
const json = await (await fetch(`https://app.kasseal.com/v1/tokens/${tokenId}/launch-proof`)).json();
|
|
77
|
+
|
|
78
|
+
// Steps 1 to 9, against the SDK's own reference token program and the curve programs of the network's bundled build.
|
|
79
|
+
// Never throws on bundle content: a bundle that does not parse is 'malformed'.
|
|
80
|
+
const result = verifyLaunchProofJson(json, network);
|
|
81
|
+
let verdict = result.status;
|
|
82
|
+
|
|
83
|
+
if (verdict === 'bound') {
|
|
84
|
+
const bundle = launchProofFromJson(json);
|
|
85
|
+
const curveId = bundle.C; // pass as expectedCurveId
|
|
86
|
+
if (bundle.graduation) {
|
|
87
|
+
// The graduation check against the public Kaspa REST API (above).
|
|
88
|
+
const onChain = await graduationOnChain(json, network);
|
|
89
|
+
if (onChain === 'mismatch') verdict = 'invalid';
|
|
90
|
+
if (onChain === 'not-found') verdict = 'unverified';
|
|
91
|
+
const poolId = bundle.graduation.P; // pass as expectedPoolId, only while the verdict is 'bound'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`verifyLaunchProofJson` reports a curve program that is not one of the bundled builds as `unverified`: its constants
|
|
97
|
+
cannot be checked. The lower-level `verifyLaunchProof(bundle, trust)` takes the parsed bundle and trust anchors you supply
|
|
98
|
+
(`referenceTokenSuffix()`, and `curveTemplateTrust(curveBasesOf(network), onUnmatched)` for the curve check). If you
|
|
99
|
+
use it, treat a `bound` result as `unverified` whenever `onUnmatched` was called, as `verifyLaunchProofJson` does.
|
|
100
|
+
|
|
101
|
+
Unless the bundle is `malformed`, `result.steps` lists every step with its outcome and details; `result.reason` names
|
|
102
|
+
the first failure.
|
|
103
|
+
|
|
104
|
+
The response also carries `verifier.result`, the Kasseal indexer's own verdict. It is useful for display, but your
|
|
105
|
+
own check is the one to trade on.
|
|
106
|
+
|
|
107
|
+
## Use the ids the proof names
|
|
108
|
+
|
|
109
|
+
Once the proof is `bound`, take the curve id `C` and the pool id `graduation.P` from it, and from nowhere else. Pass
|
|
110
|
+
them to the builders as `expectedCurveId` and `expectedPoolId`, and pass `tokenId: T`. The builder then refuses a
|
|
111
|
+
curve or pool the API serves that is not the proven one, before it reads or builds anything.
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Trading bots
|
|
2
|
+
|
|
3
|
+
For bots and other programs that trade Kasseal tokens on the curve or the pool. Read [concepts.md](concepts.md) first
|
|
4
|
+
for the vocabulary, and the rules in the [README](../README.md#rules-every-integrator-must-follow).
|
|
5
|
+
|
|
6
|
+
## 1. Before you trade a token
|
|
7
|
+
|
|
8
|
+
1. Fetch `GET /tokens/{T}/launch-proof` and verify it yourself (`verifyLaunchProofJson`, see
|
|
9
|
+
[launch-proof.md](launch-proof.md)). **Refuse the token unless the verdict is `bound`.** `unverified` means a
|
|
10
|
+
transaction was missing and nothing is proven; `invalid` means a step failed.
|
|
11
|
+
2. Take the curve id `C`, the constants `params` and, once graduated, the pool id `graduation.P` from the verified
|
|
12
|
+
proof. Pass them to the builder as `expectedCurveId` / `expectedPoolId`, with `tokenId: T`. The builder then
|
|
13
|
+
refuses any curve or pool the API serves that is not the proven one (`CurveNotOfProof`, `PoolNotOfProof`,
|
|
14
|
+
`LineageMismatch`).
|
|
15
|
+
3. Recognise the build. Check `params.poolH` and `params.treasurySpk` against
|
|
16
|
+
[contract-artifacts.md](contract-artifacts.md); refuse a `poolH` you do not know. Do not match the curve's template
|
|
17
|
+
hash: the creator's key is a constant of the curve program, so every creator's curve has its own hash. The SDK
|
|
18
|
+
does this match for you when it verifies the proof.
|
|
19
|
+
4. Pass the verdict to the builder (`proofVerdict: 'bound'`). Buys, pool buys and deposits are refused without it
|
|
20
|
+
(`ProofNotBound`). Sells and withdrawals are never gated: a holder can always leave.
|
|
21
|
+
|
|
22
|
+
## 2. Units
|
|
23
|
+
|
|
24
|
+
- **Decimals are 0.** Token amounts are whole tokens, on chain and in the API.
|
|
25
|
+
- On every cell the API serves, the top-level `amount` is the UTXO's **KAS value in sompi**. `state.amount` is the
|
|
26
|
+
token count.
|
|
27
|
+
- **Curve trades are in lots.** `params.lot` is 1,000 tokens on most tokens (10,000 on tokens launched at high KAS
|
|
28
|
+
prices). `buy(n)` and `sell(n)` count lots.
|
|
29
|
+
- **Pool KAS amounts are in units of 0.01 KAS** (`kasScaled`, `feeAccruedScaled`; 1 unit = 1,000,000 sompi). A pool
|
|
30
|
+
KAS leg is a whole number of units: `poolLegForKas(sompi)` rounds down.
|
|
31
|
+
|
|
32
|
+
## 3. Quoting
|
|
33
|
+
|
|
34
|
+
All quote functions are pure, in the package root, and compute exactly what the contracts compute.
|
|
35
|
+
|
|
36
|
+
| Need | Function |
|
|
37
|
+
|---|---|
|
|
38
|
+
| Curve buy or sell of `n` lots at `lotsSold` | `buyQuote(params, lotsSold, n)`, `sellQuote(params, lotsSold, n)` |
|
|
39
|
+
| Most lots a KAS budget buys | `lotsForKas(curve, lotsSold, budget)`, `buyForKas(...)` |
|
|
40
|
+
| Smallest sell the curve accepts | `minSellLots(curve, lotsSold)` |
|
|
41
|
+
| Pool buy or sell | `swapKasForTokens(state, kasInScaled, 'uncapped', 'nearest')`, `swapTokensForKas(state, tokensIn, 'uncapped', 'nearest')` |
|
|
42
|
+
| Liquidity | `lpDeposit(shares, state, 'uncapped')`, `lpWithdraw(shares, state, 'uncapped')`, `sharesForKas`, `minDepositShares`, `maxDepositShares` (pass `'uncapped'`: every current pool uses it) |
|
|
43
|
+
| Slippage bounds | `maxWithSlippage(total, bps)`, `minWithSlippage(total, bps)` (at most 10 %) |
|
|
44
|
+
|
|
45
|
+
A quote throws where the contract would refuse (for example `SellPayoutTooSmallError` and `PoolPayoutTooSmallError`
|
|
46
|
+
below the 0.1 KAS payout minimum). The full list of pool refusals is in
|
|
47
|
+
[dex-and-routers.md](dex-and-routers.md#4-swaps-the-pool-refuses).
|
|
48
|
+
|
|
49
|
+
Size a trade from the curve program, not from the API's `params`: `builder.curveParams({ covenantId: C })` reads the
|
|
50
|
+
constants out of the served program itself.
|
|
51
|
+
|
|
52
|
+
## 4. Reading state
|
|
53
|
+
|
|
54
|
+
| Need | Route | Notes |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| Curve head and its supply and reserve cells | `GET /tokens/{T}/curve-head?cells=1` | One consistent read. `cells` is absent when the two did not agree within a few re-reads: read again. `410 curve-closed` once graduated |
|
|
57
|
+
| Curve-owned or pool-owned token cells | `GET /tokens/{T}/covenant-cells` | Bonding: `supply` and `reserve` (owned by C). Graduated: `reserve` (owned by P). `strays`: other cells sent to the covenant |
|
|
58
|
+
| Pool cell | `GET /pools/{P}/cell` | The 139-byte pool state, decoded |
|
|
59
|
+
| Pool summary | `GET /pools/{P}`, `GET /pools?token={T}` | |
|
|
60
|
+
| Liquidity quote | `GET /pools/{P}/lp-quote?side=add\|remove&shares=N` | `409 lp-not-open` while the pool is not set up, or deposits are paused |
|
|
61
|
+
| Your token cells | `GET /tokens/{T}/cells?owner=pk:<x-only key hex>` | |
|
|
62
|
+
| Your KAS | `GET /address/{address}/utxos` | |
|
|
63
|
+
| Fee rate | `GET /fees` | The rate only; the SDK computes the mass |
|
|
64
|
+
| Transaction status | `GET /tx/{txid}` | Section 7 |
|
|
65
|
+
|
|
66
|
+
The builder reads through a `UtxoSources` object you supply. `createApiSources({ baseUrl, network, tokenId, ownKey })`
|
|
67
|
+
is a complete one over the REST API (it waits out `429` and `503 head-moving`, builds on the pending tip by default,
|
|
68
|
+
and never offers coinbase outputs as funding); you can also write your own, for example over your own Kaspa node.
|
|
69
|
+
Every cell a source returns is checked again by the builder: program, state, lineage and amounts. A source can make a
|
|
70
|
+
build fail, but it cannot make the builder sign for a different trade.
|
|
71
|
+
|
|
72
|
+
## 5. Pending trades (chained trades)
|
|
73
|
+
|
|
74
|
+
Every trade spends the one live curve or pool cell, so trades race. While trades are pending in the mempool,
|
|
75
|
+
`curve-head` and `pools/{P}/cell` add `tip`: the cells at the end of the chain of pending trades the API can prove.
|
|
76
|
+
`via` lists those transactions, oldest first, at most 8.
|
|
77
|
+
|
|
78
|
+
- **Build on `tip`** to trade at once. If a link in `via` is dropped, your transaction is refused with it and nothing
|
|
79
|
+
is charged.
|
|
80
|
+
- **`headSpent: true`** (or `503 head-moving` on the pool cell): the head is changing hands and no bridge applies.
|
|
81
|
+
Wait `retryAfterMs` and read again.
|
|
82
|
+
- On the stream, a `token` subscription can receive live-only `curve.tip` / `pool.tip` frames. They are never
|
|
83
|
+
replayed: after a reconnect, read `curve-head` or `pools/{P}/cell` once.
|
|
84
|
+
|
|
85
|
+
**Slippage on a tip.** A curve buy names exact lots, so a changed state means a refused transaction, never a worse
|
|
86
|
+
fill. A pool swap carries an on-chain minimum (`minTokensOut` or `minOutScaled`). Without `minOut`, the SDK writes the
|
|
87
|
+
exact quote there. Pass your own minimum only if you accept less.
|
|
88
|
+
|
|
89
|
+
## 6. Building: rules that refuse a transaction
|
|
90
|
+
|
|
91
|
+
- **Pool swaps name positions.** `reserveK` is the position of the pool's reserve among the transaction's token
|
|
92
|
+
inputs; `restK` / `mergedK` that of its successor among the token outputs. The SDK's shapes use buy `0, 0` and
|
|
93
|
+
sell `1, 0`. Compute budget: 16 for a buy and 19 for a sell in these shapes; 23 in a composed transaction.
|
|
94
|
+
- **The pool does not check your token output.** It pins only its reserve and its successor. Your signature over the
|
|
95
|
+
whole transaction is what fixes where your tokens and KAS go. Never deliver tokens to a cell owned `0x04` by the
|
|
96
|
+
token's own id (anyone can spend it) or by the pool's id (locked for good). The SDK's builders never create either.
|
|
97
|
+
- **Sell only cells your key owns.** A curve sell, a pool sell, and adding or removing liquidity refuse a seller's
|
|
98
|
+
cell owned `0x03` by the script of the curve or pool cell the transaction spends, or of the reserve, supply or
|
|
99
|
+
inventory cell it consumes. Cells sent to a contract address show up as `strays`; they are not yours to sell.
|
|
100
|
+
- **A curve sell takes one exact cell.** `sell(n)` needs one cell holding exactly `n` lots. The builder throws
|
|
101
|
+
`NeedsSplit` or `NeedsConsolidation` and says what to do; `buildSplit` and `buildConsolidate` build those steps,
|
|
102
|
+
and `buildExactCell` plans the whole chain. A sell must pay at least 0.1 KAS net.
|
|
103
|
+
- **A pool sell** takes one exact cell too, or two of your cells with `extraCell`.
|
|
104
|
+
- **LP shares are tied to their pool.** Every LP-share cell carries its pool id as its KCC-20 extension commitment.
|
|
105
|
+
Keep it when you transfer shares, or they become worthless at the pool.
|
|
106
|
+
- **Signature scripts are not canonical.** No signature covers the signature script of a curve or pool input, and
|
|
107
|
+
the transaction id does not include signature scripts. Anyone relaying your transaction can re-encode those pushes
|
|
108
|
+
without changing its id. Key your records on the txid and outpoints, never on signature-script bytes, on a hash of
|
|
109
|
+
the whole serialized transaction, or on its relayed size or mass.
|
|
110
|
+
|
|
111
|
+
## 7. Signing, submitting and following a transaction
|
|
112
|
+
|
|
113
|
+
**Signing.** `built.inputsToSign` lists the only inputs you sign, all `SIGHASH_ALL`.
|
|
114
|
+
|
|
115
|
+
- `signBuiltWithKey(built, key)` signs with a local key. In 0.1.0 it signs plain KAS inputs only (`kind: 'p2pk'`),
|
|
116
|
+
which covers curve buys, pool buys and fee payouts. It refuses any other slot.
|
|
117
|
+
- A sell spends your token cell, a P2SH input (`kind: 'p2sh-leader'` or `'p2sh-delegator'`). Sign it through a wallet
|
|
118
|
+
adapter (`signBuilt(wallet, built)`, see [wallets.md](wallets.md)), or with your own signer behind the same
|
|
119
|
+
interface: for each slot, a 64-byte BIP-340 Schnorr signature over `sighashOfTxJson(built.txJson, index)` followed
|
|
120
|
+
by the sighash byte `0x01`, written at the slot's `signatureOffset` in that input's signature script. Then pass the
|
|
121
|
+
signed SafeJSON to `builder.finalize(built, signedJson)`.
|
|
122
|
+
- `finalize` (and `signBuilt`) accept the result only if the transaction id is unchanged, every input you were not
|
|
123
|
+
asked to sign is byte for byte the same, every signature is `SIGHASH_ALL` and verifies, and the masses match the
|
|
124
|
+
built ones (`FinalizeError` otherwise).
|
|
125
|
+
|
|
126
|
+
**Submitting.** `POST /tx` with `{ "txJson": "<signed SafeJSON>" }`.
|
|
127
|
+
|
|
128
|
+
- It relays a transaction that touches a lineage the indexer tracks (a Kasseal curve, pool or token, or an output of
|
|
129
|
+
a transaction relayed in the last 15 minutes); anything else is `403`.
|
|
130
|
+
- `200`: in the mempool. `409`: the node refused it; the body classifies why.
|
|
131
|
+
- You may submit to your own Kaspa node instead. Kasseal's indexer records every accepted transaction, wherever it
|
|
132
|
+
was sent.
|
|
133
|
+
|
|
134
|
+
**Following.** `GET /tx/{txid}`, or the stream's `tx` channel (`{op:'sub', ch:'tx', txid}`):
|
|
135
|
+
|
|
136
|
+
| `kind` | Meaning |
|
|
137
|
+
|---|---|
|
|
138
|
+
| `submitted` | In the mempool, or seen in a block and not yet accepted |
|
|
139
|
+
| `accepted` | Accepted by the network (`acceptingBlueScore`) |
|
|
140
|
+
| `confirmed` | Accepted, at least 10 blue score deep (`depth`) |
|
|
141
|
+
| `dropped` | Seen, not accepted, and gone from the mempool for two minutes: it did not go through (a conflicting spend won). Not final: a reorganisation could still accept it |
|
|
142
|
+
| `lost-race` | Another transaction spent the same cell first. Nothing was charged |
|
|
143
|
+
| `fee-too-low`, `budget-too-low`, `already-in-mempool`, `script-failed` | Node refusals, classified |
|
|
144
|
+
|
|
145
|
+
While the node is unhealthy (not synced, unreachable, or its sink stalled for 10 s), nothing reads `confirmed`. The
|
|
146
|
+
stream's `sink` frame, about once a second, carries the node's blue score so you can count depth without polling.
|
|
147
|
+
|
|
148
|
+
**Retrying without trading twice.**
|
|
149
|
+
|
|
150
|
+
1. If a submission answer is lost, do not build a new trade. Ask `GET /tx/{txid}` first.
|
|
151
|
+
2. If the transaction is `submitted`, `accepted` or `confirmed`, it is in flight: wait.
|
|
152
|
+
3. If you rebuild, rebuild on **the same wallet coins**: create the builder with
|
|
153
|
+
`fundingOptions: { required: new Set(['<txid>:<index>', ...]) }`, listing the plain KAS inputs of the first
|
|
154
|
+
attempt (`walletInputsOf` in the examples). For a sell, sell the same token cell. The two attempts then conflict,
|
|
155
|
+
so at most one goes through. `PinnedFundingGone` means a pinned coin is gone: the first attempt may have landed.
|
|
156
|
+
Stop and ask again.
|
|
157
|
+
4. `lost-race` and `dropped` cost nothing. Read the new state, quote again, and rebuild.
|
|
158
|
+
|
|
159
|
+
The SDK's `RetryPolicy` and `runSubmission` implement this loop with a time budget, back-off and a re-quote check
|
|
160
|
+
(`withinSlippage`).
|
|
161
|
+
|
|
162
|
+
## 8. Limits and access
|
|
163
|
+
|
|
164
|
+
**Rate limits**, per client IP (an IPv6 /64 counts as one), as token buckets with three seconds of burst:
|
|
165
|
+
|
|
166
|
+
| Requests | Limit |
|
|
167
|
+
|---|---|
|
|
168
|
+
| The trade loop: `curve-head`, `covenant-cells`, `cells`, `quote`, `pools/{P}`, `pools/{P}/cell`, `lp-quote`, `fees`, `tx/{txid}` | 200 per second |
|
|
169
|
+
| Other reads | 60 per second |
|
|
170
|
+
| `address/{a}/utxos` | 20 per second |
|
|
171
|
+
| `search`, `address/{a}/kns` | 10 per second |
|
|
172
|
+
| `POST /tx` | 20 per second, 4 in flight, plus 16 more in flight for transactions that spend a curve or pool head |
|
|
173
|
+
| Stream | 16 sockets per client, 32 subscriptions per socket, 10 client messages per second |
|
|
174
|
+
|
|
175
|
+
A refusal is `429` with `Retry-After` (seconds) and `retryAfterMs` in the body. Back off for at least that long, with
|
|
176
|
+
jitter. If you need more from fixed server IPs, contact Kasseal.
|
|
177
|
+
|
|
178
|
+
**Origin.** Send no `Origin` header from a server: every read, `POST /tx` and the stream work without one. A request
|
|
179
|
+
that carries an `Origin` is held to the browser rules (CORS for Kasseal's own origins only).
|
|
180
|
+
|
|
181
|
+
**Errors.** RFC 9457 problem details: `{ "type": "urn:kasseal:problem:<code>", "title", "status", "detail" }`, plus
|
|
182
|
+
`retryAfterMs` on 429 and 503. Codes a bot meets: `bad-request` (400), `not-found` (404), `curve-closed` (410),
|
|
183
|
+
`lp-not-open` and `pool-group-integrity` (409), `too-many-requests` (429), `head-moving` (503). See [api.md](api.md).
|
package/docs/wallets.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Wallets
|
|
2
|
+
|
|
3
|
+
Two parts: showing Kasseal tokens in a wallet (no SDK needed), and signing Kasseal trades from a web page through a
|
|
4
|
+
browser wallet with the SDK's adapters.
|
|
5
|
+
|
|
6
|
+
## Part 1: showing Kasseal tokens
|
|
7
|
+
|
|
8
|
+
### Token identity
|
|
9
|
+
|
|
10
|
+
- A Kasseal token **is its KCC-20 covenant id**: 64 hex characters, `meta.covenantId` in the API.
|
|
11
|
+
- Names and tickers are chosen by the creator and are **not unique**: two tokens can both be called "KAS". Always key
|
|
12
|
+
tokens by covenant id. When two tokens share a ticker, show the id (for example its first and last 8 characters)
|
|
13
|
+
or a warning.
|
|
14
|
+
- `meta.ticker` can be an empty string: the declaration named no symbol, or Kasseal hid the token's metadata. Show the
|
|
15
|
+
name, or the shortened id, instead.
|
|
16
|
+
|
|
17
|
+
### Units
|
|
18
|
+
|
|
19
|
+
- **Decimals are 0.** Every amount is a count of whole tokens, in the API (`balance`, `supply.*`) and on chain.
|
|
20
|
+
- `meta.decimals` is always `0`. If a token's declaration says something else, the API reports it as
|
|
21
|
+
`meta.declaredDecimals` and never applies it. Do not scale by it.
|
|
22
|
+
- On a cell, the top-level `amount` is the UTXO's KAS value in sompi; the token count is `state.amount`.
|
|
23
|
+
- Every token has a fixed supply of 1,200,000,000 (`supply.total`, `supplyFixed: true`).
|
|
24
|
+
- Each token cell also carries KAS, 5 KAS by default, as a refundable deposit. `holdings[].deposits` sums it.
|
|
25
|
+
|
|
26
|
+
### Routes
|
|
27
|
+
|
|
28
|
+
All under the API base URL (testnet-10: `https://app.kasseal.com/v1`). Public, read-only, no key.
|
|
29
|
+
|
|
30
|
+
| Route | Returns |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `GET /tokens/{id}` | One token: `meta`, `supply`, `phase`, `verification` |
|
|
33
|
+
| `GET /tokens/lookup?ids={id1},{id2},…` | Up to 50 tokens at once |
|
|
34
|
+
| `GET /tokens?sort=new&limit=100[&cursor=…]` | Newest tokens; follow `nextCursor`. Other sorts: `active`, `progress`, `holders`, `mcap` |
|
|
35
|
+
| `GET /address/{address}/tokens` | A wallet's balances: `holdings[]` (`tokenId`, `balance`, `cells`, `deposits`), the tokens' metadata in `tokens[]`, LP positions in `lpPositions` |
|
|
36
|
+
| `GET /images/{sha256}` | A token logo |
|
|
37
|
+
| `GET /tokens/{id}/launch-proof` | The launch proof, with the on-chain declaration |
|
|
38
|
+
|
|
39
|
+
**LP shares** are KCC-20 cells too, of the pool's LP-share lineage, with no metadata of their own. They are listed
|
|
40
|
+
under `lpPositions`, never under `holdings`. Show them as "LP share of <token>", or not at all.
|
|
41
|
+
|
|
42
|
+
### What to show
|
|
43
|
+
|
|
44
|
+
| Field | Use |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `verification` | Show only `"verified"` tokens. It means the launch proof is bound and the supply sealed. It does not mean the project is official or endorsed. `invalid` comes with `verificationReason` |
|
|
47
|
+
| `meta.ticker`, `meta.name` | Creator-chosen, not unique |
|
|
48
|
+
| `meta.description` | Creator-provided text. Do not present it as verified |
|
|
49
|
+
| `meta.hidden` | `true`: Kasseal hid the token's metadata after a takedown request (empty name and ticker, no image). The token still trades and verifies. Show a neutral label such as "Hidden" |
|
|
50
|
+
| `phase` | `bonding` (on its curve), `graduated` (sold out, pool not open yet), `listed` (on its pool) or `unknown`. For information only |
|
|
51
|
+
|
|
52
|
+
### Logos
|
|
53
|
+
|
|
54
|
+
- `meta.imageSource: "verified"`: `meta.imageUrl` is a path on the API; prefix it with the API's host. The file name
|
|
55
|
+
is the SHA-256 of the bytes, and the token's declaration names the same hash, so you can re-hash after download
|
|
56
|
+
and cache it for good. Images are PNG, JPEG or WebP only (never SVG), at most 1 MiB and 2048 × 2048 px.
|
|
57
|
+
- `meta.imageSource: "external"`: `imageUrl` is an https URL the creator declared. Kasseal never fetches or checks it.
|
|
58
|
+
Treat it as untrusted and do not load it without the user's consent.
|
|
59
|
+
- No `imageUrl`: no logo. Show a placeholder.
|
|
60
|
+
|
|
61
|
+
### Verifying without trusting Kasseal
|
|
62
|
+
|
|
63
|
+
The metadata is on chain: a token's name, ticker, decimals and logo hash are a KCC-23 declaration in the payload of
|
|
64
|
+
its preparation transaction, bound to the covenant id. `GET /tokens/{id}/launch-proof` returns both launch
|
|
65
|
+
transactions; the SDK's `verifyLaunchProofJson` checks the binding and the sealed supply in your own process (see
|
|
66
|
+
[launch-proof.md](launch-proof.md)). Check balances against your own Kaspa node if you can. We recommend both for
|
|
67
|
+
anything you display as verified.
|
|
68
|
+
|
|
69
|
+
### Sending tokens
|
|
70
|
+
|
|
71
|
+
- Kasseal tokens use the standard KCC-20 reference program (template hash
|
|
72
|
+
`9703112ee6e3555107cd168858992b77d3b74f655205b2b463b1f9ec2ec73cf7`). Standard KCC-20 transfer support works as is.
|
|
73
|
+
- **Do not let users send tokens to a Kasseal contract address** (the P2SH address of a curve or pool cell). The
|
|
74
|
+
sender loses them either way: cells of the same token sent there are locked for good, and cells of another token
|
|
75
|
+
can be taken by whoever submits the next transaction of that curve or pool. The same holds for a cell owned by a
|
|
76
|
+
curve's or pool's covenant id, or by the token's own id (anyone can spend the latter).
|
|
77
|
+
`GET /tokens/{id}/covenant-cells` lists such cells as `strays`.
|
|
78
|
+
- Pool swaps are composable: one transaction may carry a Kasseal swap together with other contracts' cells.
|
|
79
|
+
Balances are read from the cells as always; nothing changes for a wallet.
|
|
80
|
+
|
|
81
|
+
### Limits, CORS and live updates
|
|
82
|
+
|
|
83
|
+
- **Rate limits**, per client IP: 60 reads per second with three seconds of burst. Calls from users' own devices are
|
|
84
|
+
well within this. A refusal is `429` with `Retry-After`. If you proxy through your own servers and need more,
|
|
85
|
+
contact Kasseal.
|
|
86
|
+
- **CORS.** Only Kasseal's own web origins get CORS headers. Requests without an `Origin` header (servers) and
|
|
87
|
+
extension background requests with host permissions are not affected. Ask Kasseal to allow your web origin if you
|
|
88
|
+
call the API from a web page.
|
|
89
|
+
- **Live updates.** Polling `GET /tokens?sort=new` every 30 to 60 seconds is enough for a wallet. The stream
|
|
90
|
+
(`wss://app.kasseal.com/v1/stream` on testnet-10) pushes trades and launches; a page that sends an `Origin` header
|
|
91
|
+
is refused unless that origin is allowed.
|
|
92
|
+
- **Signed messages.** The only API writes a wallet is ever asked to sign for are Kasseal's own app actions
|
|
93
|
+
(sign-in, terms, comments, follows). Their messages name the site, so a signature made for another site does not
|
|
94
|
+
verify. No read and no transaction relay needs one.
|
|
95
|
+
|
|
96
|
+
## Part 2: signing Kasseal trades with a browser wallet
|
|
97
|
+
|
|
98
|
+
The SDK's web entry includes adapters for three wallets. Each one connects, reports the account, signs a built
|
|
99
|
+
transaction's own inputs and signs messages. None of them submits anything.
|
|
100
|
+
|
|
101
|
+
| Wallet | Factory | Provider it uses by default |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| KasWare | `createKasWareAdapter({ network })` | `window.kasware` |
|
|
104
|
+
| Kastle | `createKastleAdapter({ network })` | `window.kastle` |
|
|
105
|
+
| Kaspire | `createKaspireAdapter({ network })` | `window.kaspire` |
|
|
106
|
+
|
|
107
|
+
Always pass `network` (`'testnet-10'` or `'mainnet'`). An adapter refuses a wallet that is on another network
|
|
108
|
+
(`WalletNetworkMismatch`), and an account whose address is not of that network or whose reported key does not match its address (`WalletAccountMismatch`).
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
import { createKasWareAdapter, createTxBuilder, signBuilt, xOnlyKeyOfAddress } from '@kassealhq/sdk/web';
|
|
112
|
+
|
|
113
|
+
const wallet = createKasWareAdapter({ network: 'testnet-10' });
|
|
114
|
+
if (!wallet.isAvailable()) throw new Error('KasWare is not installed');
|
|
115
|
+
const account = await wallet.connect(); // { address, publicKey (x-only hex), network }
|
|
116
|
+
|
|
117
|
+
const built = await builder.buildSwap({ /* ... see examples/pool-sell-wallet.ts */ });
|
|
118
|
+
const signed = await signBuilt(wallet, built); // one wallet popup
|
|
119
|
+
// signed.txJson is ready for POST /tx; signed.txid equals built.txid.
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Loading the web entry.** Call `initWeb` once before you build. It instantiates the bundled Kaspa WASM SDK
|
|
123
|
+
(rusty-kaspa v2.1.0) and installs the contract artifacts. If you serve the WASM file yourself (`wasm` option: bytes,
|
|
124
|
+
a URL or a `Response`), the SDK hashes the bytes against the pinned SHA-256 before instantiating them and throws
|
|
125
|
+
`SdkWasmMismatch` on any difference.
|
|
126
|
+
|
|
127
|
+
**What the wallet signs.** `signBuilt` passes the wallet exactly `built.inputsToSign`: the user's own KAS inputs and,
|
|
128
|
+
for a sell, the user's own token cell. Every signature is `SIGHASH_ALL`. The wallet never signs a curve or pool input.
|
|
129
|
+
After the wallet answers, `signBuilt`:
|
|
130
|
+
|
|
131
|
+
- checks the signed transaction has the same id as the built one (no outpoint, output, binding or payload changed);
|
|
132
|
+
- checks every input the wallet was not asked to sign is byte for byte the same;
|
|
133
|
+
- verifies every signature against the connected account's key;
|
|
134
|
+
- places the signatures in the prebuilt signature scripts and checks the final masses.
|
|
135
|
+
|
|
136
|
+
Anything else is refused with `FinalizeError` and nothing is submitted.
|
|
137
|
+
|
|
138
|
+
**Before you show a signing prompt**, show the user what the SDK computed: the tokens or KAS they receive, the
|
|
139
|
+
all-in cost (`maxAllIn`) or the net amount (`minNetOut`), the cell deposit and the network fee. The builder refuses
|
|
140
|
+
to build when those bounds are not met (`NetBoundExceeded`).
|
|
141
|
+
|
|
142
|
+
**Errors.** A user rejection is a `KasWareError`, `KastleError` or `KaspireError` whose `rejectedByUser` is true (code
|
|
143
|
+
4001). `WalletUnavailable`: no provider. `WalletNotConnected`: call `connect()` first. `MessageSigningUnsupported`: the
|
|
144
|
+
wallet cannot sign messages. See [errors.md](errors.md).
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
Small TypeScript programs against **testnet-10** and the public API at `https://app.kasseal.com/v1`. They are not
|
|
4
|
+
run in CI. Use a testnet-10 wallet with test KAS only; never a mainnet key.
|
|
5
|
+
|
|
6
|
+
Run them with Node 22.6 or later (`node --experimental-strip-types examples/<file>.ts`) or any TypeScript runner.
|
|
7
|
+
|
|
8
|
+
| File | What it does | Needs a key |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
| [`quote.ts`](quote.ts) | Quotes a pool buy, a pool sell, or a curve buy, with a slippage bound | No |
|
|
11
|
+
| [`verify-launch-proof.ts`](verify-launch-proof.ts) | Verifies a token's launch proof, including the graduation check | No |
|
|
12
|
+
| [`pool-buy.ts`](pool-buy.ts) | The full flow: proof, build on the latest state, sign, submit, safe retry | Yes (`KEY`) |
|
|
13
|
+
| [`swap-and-deposit.ts`](swap-and-deposit.ts) | A pool buy delivered to a key-locked script | Yes (`KEY`) |
|
|
14
|
+
| [`pool-sell-wallet.ts`](pool-sell-wallet.ts) | A pool sell signed by a browser wallet (module for a web page) | Wallet |
|
|
15
|
+
| [`lib/api.ts`](lib/api.ts) | A minimal REST client: reads, submission and status (the builder's sources are the SDK's `createApiSources`) | |
|
|
16
|
+
| [`lib/proof.ts`](lib/proof.ts) | Launch-proof check with the public Kaspa API graduation check | |
|
|
17
|
+
|
|
18
|
+
Pass the key in the environment (`KEY=...`), never on the command line of a shared machine and never in a file you
|
|
19
|
+
commit.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A small client for the public Kasseal REST API: reads, submission and status. The builder's `UtxoSources` comes from
|
|
3
|
+
* the SDK (`createApiSources`).
|
|
4
|
+
*
|
|
5
|
+
* Pure: no WASM is needed, so it works with the Node and the web entry. Testnet-10 only. The API sends every large
|
|
6
|
+
* integer as a decimal string. Nothing here signs or holds keys.
|
|
7
|
+
*/
|
|
8
|
+
import { ApiError, outpointKey, type BuiltTx, type FundingUtxo, type KassealNetwork } from '@kassealhq/sdk';
|
|
9
|
+
|
|
10
|
+
export const NETWORK: KassealNetwork = 'testnet-10';
|
|
11
|
+
export const API_BASE = 'https://app.kasseal.com/v1';
|
|
12
|
+
|
|
13
|
+
/* -------------------------------------------------------------------------- */
|
|
14
|
+
/* HTTP */
|
|
15
|
+
/* -------------------------------------------------------------------------- */
|
|
16
|
+
|
|
17
|
+
const sleep = (ms: number): Promise<void> => new Promise((r) => setTimeout(r, ms));
|
|
18
|
+
|
|
19
|
+
/** GET with the two waits the API asks for: 429 (rate limit) and 503 `head-moving`. Both carry `retryAfterMs`. */
|
|
20
|
+
export async function get<T>(path: string, attempts = 5): Promise<T> {
|
|
21
|
+
for (let i = 0; ; i++) {
|
|
22
|
+
const res = await fetch(`${API_BASE}${path}`, { headers: { accept: 'application/json' } });
|
|
23
|
+
if (res.ok) return (await res.json()) as T;
|
|
24
|
+
const problem = (await res.json().catch(() => null)) as { retryAfterMs?: number } | null;
|
|
25
|
+
if ((res.status === 429 || res.status === 503) && i + 1 < attempts) {
|
|
26
|
+
await sleep((problem?.retryAfterMs ?? 1_000) + Math.floor(Math.random() * 250));
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
throw new ApiError(path, res.status, problem);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* -------------------------------------------------------------------------- */
|
|
34
|
+
/* Wire shapes (see GET /v1/openapi.yaml) */
|
|
35
|
+
/* -------------------------------------------------------------------------- */
|
|
36
|
+
|
|
37
|
+
/** A covenant cell as the API serves it. */
|
|
38
|
+
export interface CellWire {
|
|
39
|
+
outpoint: { txid: string; index: number };
|
|
40
|
+
/** The UTXO's KAS value, sompi. */
|
|
41
|
+
amount: string;
|
|
42
|
+
covenantId: string;
|
|
43
|
+
redeemScript: string;
|
|
44
|
+
templateHash: string;
|
|
45
|
+
state: unknown;
|
|
46
|
+
confirmed: boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** `GET /pools/{P}/cell`. */
|
|
50
|
+
export interface PoolCellWire extends CellWire {
|
|
51
|
+
headSpent?: true;
|
|
52
|
+
tip?: { pool: CellWire; reserve: CellWire; inventory?: CellWire; via: string[] };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** `GET /tx/{txid}` and the `state` of `POST /tx`. */
|
|
56
|
+
export type SubmitStateWire =
|
|
57
|
+
| { kind: 'submitted'; txid: string; at: number }
|
|
58
|
+
| { kind: 'accepted'; txid: string; acceptingBlueScore: number }
|
|
59
|
+
| { kind: 'confirmed'; txid: string; depth: number }
|
|
60
|
+
| { kind: 'dropped'; txid: string }
|
|
61
|
+
| { kind: 'fee-too-low' | 'budget-too-low' | 'lost-race' | 'already-in-mempool' | 'script-failed'; txid: string }
|
|
62
|
+
| { kind: 'failed'; reason: string };
|
|
63
|
+
|
|
64
|
+
/* -------------------------------------------------------------------------- */
|
|
65
|
+
/* Retries */
|
|
66
|
+
/* -------------------------------------------------------------------------- */
|
|
67
|
+
|
|
68
|
+
/** The wallet (plain KAS) outpoints a built transaction spends: the pin for a safe retry. */
|
|
69
|
+
export function walletInputsOf(built: Pick<BuiltTx, 'consumes'>, funding: readonly FundingUtxo[]): Set<string> {
|
|
70
|
+
const own = new Set(funding.map((u) => outpointKey(u.outpoint)));
|
|
71
|
+
return new Set(built.consumes.map(outpointKey).filter((k) => own.has(k)));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* -------------------------------------------------------------------------- */
|
|
75
|
+
/* Submission and status */
|
|
76
|
+
/* -------------------------------------------------------------------------- */
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* `POST /tx`. 200: in the mempool. 409: the node refused it, classified (`lost-race`, `fee-too-low`...). Any other
|
|
80
|
+
* answer, or no answer, means you do not know: ask `GET /tx/{txid}` before you build anything new.
|
|
81
|
+
*/
|
|
82
|
+
export async function submit(txJson: string): Promise<{ txid: string; state: SubmitStateWire } | { unknown: true; error: unknown }> {
|
|
83
|
+
try {
|
|
84
|
+
const res = await fetch(`${API_BASE}/tx`, {
|
|
85
|
+
method: 'POST',
|
|
86
|
+
headers: { accept: 'application/json', 'content-type': 'application/json' },
|
|
87
|
+
body: JSON.stringify({ txJson }),
|
|
88
|
+
});
|
|
89
|
+
if (res.status === 200 || res.status === 409) return (await res.json()) as { txid: string; state: SubmitStateWire };
|
|
90
|
+
return { unknown: true, error: new ApiError('/tx', res.status, await res.json().catch(() => null)) };
|
|
91
|
+
} catch (error) {
|
|
92
|
+
return { unknown: true, error };
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** `GET /tx/{txid}`; null when the API never saw the transaction. */
|
|
97
|
+
export async function txStatus(txid: string): Promise<SubmitStateWire | null> {
|
|
98
|
+
try {
|
|
99
|
+
return await get<SubmitStateWire>(`/tx/${txid}`);
|
|
100
|
+
} catch (e) {
|
|
101
|
+
if (e instanceof ApiError && e.status === 404) return null;
|
|
102
|
+
throw e;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Poll until the transaction is accepted, confirmed or definitely not going through. */
|
|
107
|
+
export async function waitForOutcome(txid: string, timeoutMs = 60_000): Promise<SubmitStateWire | null> {
|
|
108
|
+
const end = Date.now() + timeoutMs;
|
|
109
|
+
let last: SubmitStateWire | null = null;
|
|
110
|
+
while (Date.now() < end) {
|
|
111
|
+
last = await txStatus(txid);
|
|
112
|
+
if (last !== null && (last.kind === 'accepted' || last.kind === 'confirmed' || last.kind === 'dropped' || last.kind === 'lost-race' || last.kind === 'script-failed')) return last;
|
|
113
|
+
await sleep(500);
|
|
114
|
+
}
|
|
115
|
+
return last;
|
|
116
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check a token's launch proof yourself before you trade it, including the graduation check against the public
|
|
3
|
+
* Kaspa REST API. The Kasseal API serves the bundle; nothing in it is trusted: every hash is recomputed here
|
|
4
|
+
* against the reference token program and the curve programs bundled in the SDK.
|
|
5
|
+
*/
|
|
6
|
+
import { graduationOnChain, launchProofFromJson, verifyLaunchProofJson, type GraduationOnChain, type KassealNetwork, type LaunchProofStatus } from '@kassealhq/sdk/node';
|
|
7
|
+
import { get } from './api.ts';
|
|
8
|
+
|
|
9
|
+
export interface CheckedProof {
|
|
10
|
+
/** Trade only on `bound`. */
|
|
11
|
+
readonly status: LaunchProofStatus | 'malformed';
|
|
12
|
+
readonly reason?: string;
|
|
13
|
+
readonly tokenId?: string;
|
|
14
|
+
/** The curve C the proof names. Pass it as `expectedCurveId`. */
|
|
15
|
+
readonly curveId?: string;
|
|
16
|
+
/** The pool P the graduation created, once graduated. Pass it as `expectedPoolId`. */
|
|
17
|
+
readonly poolId?: string;
|
|
18
|
+
readonly graduation: GraduationOnChain;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Fetch, verify and (once graduated) confirm the graduation. Never throws on bundle content. */
|
|
22
|
+
export async function checkLaunchProof(tokenId: string, network: KassealNetwork): Promise<CheckedProof> {
|
|
23
|
+
const json = await get<unknown>(`/tokens/${tokenId}/launch-proof`);
|
|
24
|
+
// The nine steps, against the reference token program and the curve programs of the network's bundled build.
|
|
25
|
+
const result = verifyLaunchProofJson(json, network);
|
|
26
|
+
if (result.status === 'malformed') return { status: 'malformed', reason: result.reason, graduation: 'none' };
|
|
27
|
+
const bundle = launchProofFromJson(json);
|
|
28
|
+
if (bundle.T.toLowerCase() !== tokenId.toLowerCase()) return { status: 'invalid', reason: 'the bundle is for another token', graduation: 'none' };
|
|
29
|
+
const ids = { tokenId: bundle.T, curveId: bundle.C };
|
|
30
|
+
|
|
31
|
+
if (result.status !== 'bound' || bundle.graduation === null || bundle.graduation === undefined) {
|
|
32
|
+
return { status: result.status, ...(result.reason === undefined ? {} : { reason: result.reason }), ...ids, graduation: 'none' };
|
|
33
|
+
}
|
|
34
|
+
// Graduated: confirm the served graduation against the public Kaspa REST API, which Kasseal does not operate.
|
|
35
|
+
const onChain = await graduationOnChain(json, network);
|
|
36
|
+
if (onChain === 'mismatch') {
|
|
37
|
+
return { status: 'invalid', reason: 'the served graduation differs from the one accepted on chain', ...ids, graduation: onChain };
|
|
38
|
+
}
|
|
39
|
+
if (onChain === 'not-found') {
|
|
40
|
+
// Seconds after a graduation the public API may not have it yet. The pool is not proven until it does.
|
|
41
|
+
return { status: 'unverified', reason: 'the graduation is not found on chain yet; ask again', ...ids, graduation: onChain };
|
|
42
|
+
}
|
|
43
|
+
// 'confirmed', or 'unavailable' (the public API could not be read): the proof stands as checked from the served data.
|
|
44
|
+
return { status: 'bound', ...ids, poolId: bundle.graduation.P, graduation: onChain };
|
|
45
|
+
}
|