@secondlayer/stacks 2.2.1 → 2.3.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.
@@ -1576,6 +1576,251 @@ class ContractResponseError extends Error {
1576
1576
  this.errorValue = errorValue;
1577
1577
  }
1578
1578
  }
1579
+ // src/clarity/abi/standards.ts
1580
+ var SIP010_ABI = {
1581
+ functions: [
1582
+ {
1583
+ name: "transfer",
1584
+ access: "public",
1585
+ args: [
1586
+ { name: "amount", type: "uint128" },
1587
+ { name: "sender", type: "principal" },
1588
+ { name: "recipient", type: "principal" },
1589
+ { name: "memo", type: { optional: { buff: { length: 34 } } } }
1590
+ ],
1591
+ outputs: { response: { ok: "bool", error: "uint128" } }
1592
+ },
1593
+ {
1594
+ name: "get-balance",
1595
+ access: "read-only",
1596
+ args: [{ name: "account", type: "principal" }],
1597
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1598
+ },
1599
+ {
1600
+ name: "get-total-supply",
1601
+ access: "read-only",
1602
+ args: [],
1603
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1604
+ },
1605
+ {
1606
+ name: "get-name",
1607
+ access: "read-only",
1608
+ args: [],
1609
+ outputs: {
1610
+ response: {
1611
+ ok: { "string-ascii": { length: 32 } },
1612
+ error: "uint128"
1613
+ }
1614
+ }
1615
+ },
1616
+ {
1617
+ name: "get-symbol",
1618
+ access: "read-only",
1619
+ args: [],
1620
+ outputs: {
1621
+ response: {
1622
+ ok: { "string-ascii": { length: 10 } },
1623
+ error: "uint128"
1624
+ }
1625
+ }
1626
+ },
1627
+ {
1628
+ name: "get-decimals",
1629
+ access: "read-only",
1630
+ args: [],
1631
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1632
+ },
1633
+ {
1634
+ name: "get-token-uri",
1635
+ access: "read-only",
1636
+ args: [],
1637
+ outputs: {
1638
+ response: {
1639
+ ok: { optional: { "string-utf8": { length: 256 } } },
1640
+ error: "uint128"
1641
+ }
1642
+ }
1643
+ }
1644
+ ],
1645
+ fungible_tokens: [{ name: "token" }]
1646
+ };
1647
+ var SIP009_ABI = {
1648
+ functions: [
1649
+ {
1650
+ name: "transfer",
1651
+ access: "public",
1652
+ args: [
1653
+ { name: "id", type: "uint128" },
1654
+ { name: "sender", type: "principal" },
1655
+ { name: "recipient", type: "principal" }
1656
+ ],
1657
+ outputs: { response: { ok: "bool", error: "uint128" } }
1658
+ },
1659
+ {
1660
+ name: "get-owner",
1661
+ access: "read-only",
1662
+ args: [{ name: "id", type: "uint128" }],
1663
+ outputs: {
1664
+ response: { ok: { optional: "principal" }, error: "uint128" }
1665
+ }
1666
+ },
1667
+ {
1668
+ name: "get-last-token-id",
1669
+ access: "read-only",
1670
+ args: [],
1671
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1672
+ },
1673
+ {
1674
+ name: "get-token-uri",
1675
+ access: "read-only",
1676
+ args: [{ name: "id", type: "uint128" }],
1677
+ outputs: {
1678
+ response: {
1679
+ ok: { optional: { "string-utf8": { length: 256 } } },
1680
+ error: "uint128"
1681
+ }
1682
+ }
1683
+ }
1684
+ ],
1685
+ non_fungible_tokens: [{ name: "nft", type: "uint128" }]
1686
+ };
1687
+ var SIP013_ABI = {
1688
+ functions: [
1689
+ {
1690
+ name: "transfer",
1691
+ access: "public",
1692
+ args: [
1693
+ { name: "token-id", type: "uint128" },
1694
+ { name: "amount", type: "uint128" },
1695
+ { name: "sender", type: "principal" },
1696
+ { name: "recipient", type: "principal" }
1697
+ ],
1698
+ outputs: { response: { ok: "bool", error: "uint128" } }
1699
+ },
1700
+ {
1701
+ name: "transfer-memo",
1702
+ access: "public",
1703
+ args: [
1704
+ { name: "token-id", type: "uint128" },
1705
+ { name: "amount", type: "uint128" },
1706
+ { name: "sender", type: "principal" },
1707
+ { name: "recipient", type: "principal" },
1708
+ { name: "memo", type: { buff: { length: 34 } } }
1709
+ ],
1710
+ outputs: { response: { ok: "bool", error: "uint128" } }
1711
+ },
1712
+ {
1713
+ name: "transfer-many",
1714
+ access: "public",
1715
+ args: [
1716
+ {
1717
+ name: "transfers",
1718
+ type: {
1719
+ list: {
1720
+ type: {
1721
+ tuple: [
1722
+ { name: "token-id", type: "uint128" },
1723
+ { name: "amount", type: "uint128" },
1724
+ { name: "sender", type: "principal" },
1725
+ { name: "recipient", type: "principal" }
1726
+ ]
1727
+ },
1728
+ length: 200
1729
+ }
1730
+ }
1731
+ }
1732
+ ],
1733
+ outputs: { response: { ok: "bool", error: "uint128" } }
1734
+ },
1735
+ {
1736
+ name: "transfer-many-memo",
1737
+ access: "public",
1738
+ args: [
1739
+ {
1740
+ name: "transfers",
1741
+ type: {
1742
+ list: {
1743
+ type: {
1744
+ tuple: [
1745
+ { name: "token-id", type: "uint128" },
1746
+ { name: "amount", type: "uint128" },
1747
+ { name: "sender", type: "principal" },
1748
+ { name: "recipient", type: "principal" },
1749
+ { name: "memo", type: { buff: { length: 34 } } }
1750
+ ]
1751
+ },
1752
+ length: 200
1753
+ }
1754
+ }
1755
+ }
1756
+ ],
1757
+ outputs: { response: { ok: "bool", error: "uint128" } }
1758
+ },
1759
+ {
1760
+ name: "get-balance",
1761
+ access: "read-only",
1762
+ args: [
1763
+ { name: "token-id", type: "uint128" },
1764
+ { name: "account", type: "principal" }
1765
+ ],
1766
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1767
+ },
1768
+ {
1769
+ name: "get-overall-balance",
1770
+ access: "read-only",
1771
+ args: [{ name: "account", type: "principal" }],
1772
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1773
+ },
1774
+ {
1775
+ name: "get-total-supply",
1776
+ access: "read-only",
1777
+ args: [{ name: "token-id", type: "uint128" }],
1778
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1779
+ },
1780
+ {
1781
+ name: "get-overall-supply",
1782
+ access: "read-only",
1783
+ args: [],
1784
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1785
+ },
1786
+ {
1787
+ name: "get-decimals",
1788
+ access: "read-only",
1789
+ args: [{ name: "token-id", type: "uint128" }],
1790
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1791
+ },
1792
+ {
1793
+ name: "get-token-uri",
1794
+ access: "read-only",
1795
+ args: [{ name: "token-id", type: "uint128" }],
1796
+ outputs: {
1797
+ response: {
1798
+ ok: { optional: { "string-utf8": { length: 256 } } },
1799
+ error: "uint128"
1800
+ }
1801
+ }
1802
+ }
1803
+ ],
1804
+ fungible_tokens: [],
1805
+ non_fungible_tokens: []
1806
+ };
1807
+ // src/clarity/abi/classify.ts
1808
+ var STANDARDS = [
1809
+ { id: "sip-010", abi: SIP010_ABI, optional: new Set(["get-token-uri"]) },
1810
+ { id: "sip-009", abi: SIP009_ABI, optional: new Set(["get-token-uri"]) },
1811
+ {
1812
+ id: "sip-013",
1813
+ abi: SIP013_ABI,
1814
+ optional: new Set([
1815
+ "transfer-memo",
1816
+ "transfer-many",
1817
+ "transfer-many-memo",
1818
+ "get-token-uri",
1819
+ "get-overall-balance",
1820
+ "get-overall-supply"
1821
+ ])
1822
+ }
1823
+ ];
1579
1824
  // src/bns/abi.ts
1580
1825
  var BNS_ABI = {
1581
1826
  functions: [
@@ -2465,5 +2710,5 @@ var getNftHoldings = import_ai.tool({
2465
2710
  execute: ({ principal, limit }) => nftHoldings(getDefaultPublicClient(), principal, limit)
2466
2711
  });
2467
2712
 
2468
- //# debugId=5BBF31DE9C4100A864756E2164756E21
2713
+ //# debugId=5AC57AAE2BA0ACC664756E2164756E21
2469
2714
  //# sourceMappingURL=index.cjs.map