@secondlayer/stacks 2.2.1 → 2.4.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.
@@ -1526,6 +1526,251 @@ class ContractResponseError extends Error {
1526
1526
  this.errorValue = errorValue;
1527
1527
  }
1528
1528
  }
1529
+ // src/clarity/abi/standards.ts
1530
+ var SIP010_ABI = {
1531
+ functions: [
1532
+ {
1533
+ name: "transfer",
1534
+ access: "public",
1535
+ args: [
1536
+ { name: "amount", type: "uint128" },
1537
+ { name: "sender", type: "principal" },
1538
+ { name: "recipient", type: "principal" },
1539
+ { name: "memo", type: { optional: { buff: { length: 34 } } } }
1540
+ ],
1541
+ outputs: { response: { ok: "bool", error: "uint128" } }
1542
+ },
1543
+ {
1544
+ name: "get-balance",
1545
+ access: "read-only",
1546
+ args: [{ name: "account", type: "principal" }],
1547
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1548
+ },
1549
+ {
1550
+ name: "get-total-supply",
1551
+ access: "read-only",
1552
+ args: [],
1553
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1554
+ },
1555
+ {
1556
+ name: "get-name",
1557
+ access: "read-only",
1558
+ args: [],
1559
+ outputs: {
1560
+ response: {
1561
+ ok: { "string-ascii": { length: 32 } },
1562
+ error: "uint128"
1563
+ }
1564
+ }
1565
+ },
1566
+ {
1567
+ name: "get-symbol",
1568
+ access: "read-only",
1569
+ args: [],
1570
+ outputs: {
1571
+ response: {
1572
+ ok: { "string-ascii": { length: 10 } },
1573
+ error: "uint128"
1574
+ }
1575
+ }
1576
+ },
1577
+ {
1578
+ name: "get-decimals",
1579
+ access: "read-only",
1580
+ args: [],
1581
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1582
+ },
1583
+ {
1584
+ name: "get-token-uri",
1585
+ access: "read-only",
1586
+ args: [],
1587
+ outputs: {
1588
+ response: {
1589
+ ok: { optional: { "string-utf8": { length: 256 } } },
1590
+ error: "uint128"
1591
+ }
1592
+ }
1593
+ }
1594
+ ],
1595
+ fungible_tokens: [{ name: "token" }]
1596
+ };
1597
+ var SIP009_ABI = {
1598
+ functions: [
1599
+ {
1600
+ name: "transfer",
1601
+ access: "public",
1602
+ args: [
1603
+ { name: "id", type: "uint128" },
1604
+ { name: "sender", type: "principal" },
1605
+ { name: "recipient", type: "principal" }
1606
+ ],
1607
+ outputs: { response: { ok: "bool", error: "uint128" } }
1608
+ },
1609
+ {
1610
+ name: "get-owner",
1611
+ access: "read-only",
1612
+ args: [{ name: "id", type: "uint128" }],
1613
+ outputs: {
1614
+ response: { ok: { optional: "principal" }, error: "uint128" }
1615
+ }
1616
+ },
1617
+ {
1618
+ name: "get-last-token-id",
1619
+ access: "read-only",
1620
+ args: [],
1621
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1622
+ },
1623
+ {
1624
+ name: "get-token-uri",
1625
+ access: "read-only",
1626
+ args: [{ name: "id", type: "uint128" }],
1627
+ outputs: {
1628
+ response: {
1629
+ ok: { optional: { "string-utf8": { length: 256 } } },
1630
+ error: "uint128"
1631
+ }
1632
+ }
1633
+ }
1634
+ ],
1635
+ non_fungible_tokens: [{ name: "nft", type: "uint128" }]
1636
+ };
1637
+ var SIP013_ABI = {
1638
+ functions: [
1639
+ {
1640
+ name: "transfer",
1641
+ access: "public",
1642
+ args: [
1643
+ { name: "token-id", type: "uint128" },
1644
+ { name: "amount", type: "uint128" },
1645
+ { name: "sender", type: "principal" },
1646
+ { name: "recipient", type: "principal" }
1647
+ ],
1648
+ outputs: { response: { ok: "bool", error: "uint128" } }
1649
+ },
1650
+ {
1651
+ name: "transfer-memo",
1652
+ access: "public",
1653
+ args: [
1654
+ { name: "token-id", type: "uint128" },
1655
+ { name: "amount", type: "uint128" },
1656
+ { name: "sender", type: "principal" },
1657
+ { name: "recipient", type: "principal" },
1658
+ { name: "memo", type: { buff: { length: 34 } } }
1659
+ ],
1660
+ outputs: { response: { ok: "bool", error: "uint128" } }
1661
+ },
1662
+ {
1663
+ name: "transfer-many",
1664
+ access: "public",
1665
+ args: [
1666
+ {
1667
+ name: "transfers",
1668
+ type: {
1669
+ list: {
1670
+ type: {
1671
+ tuple: [
1672
+ { name: "token-id", type: "uint128" },
1673
+ { name: "amount", type: "uint128" },
1674
+ { name: "sender", type: "principal" },
1675
+ { name: "recipient", type: "principal" }
1676
+ ]
1677
+ },
1678
+ length: 200
1679
+ }
1680
+ }
1681
+ }
1682
+ ],
1683
+ outputs: { response: { ok: "bool", error: "uint128" } }
1684
+ },
1685
+ {
1686
+ name: "transfer-many-memo",
1687
+ access: "public",
1688
+ args: [
1689
+ {
1690
+ name: "transfers",
1691
+ type: {
1692
+ list: {
1693
+ type: {
1694
+ tuple: [
1695
+ { name: "token-id", type: "uint128" },
1696
+ { name: "amount", type: "uint128" },
1697
+ { name: "sender", type: "principal" },
1698
+ { name: "recipient", type: "principal" },
1699
+ { name: "memo", type: { buff: { length: 34 } } }
1700
+ ]
1701
+ },
1702
+ length: 200
1703
+ }
1704
+ }
1705
+ }
1706
+ ],
1707
+ outputs: { response: { ok: "bool", error: "uint128" } }
1708
+ },
1709
+ {
1710
+ name: "get-balance",
1711
+ access: "read-only",
1712
+ args: [
1713
+ { name: "token-id", type: "uint128" },
1714
+ { name: "account", type: "principal" }
1715
+ ],
1716
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1717
+ },
1718
+ {
1719
+ name: "get-overall-balance",
1720
+ access: "read-only",
1721
+ args: [{ name: "account", type: "principal" }],
1722
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1723
+ },
1724
+ {
1725
+ name: "get-total-supply",
1726
+ access: "read-only",
1727
+ args: [{ name: "token-id", type: "uint128" }],
1728
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1729
+ },
1730
+ {
1731
+ name: "get-overall-supply",
1732
+ access: "read-only",
1733
+ args: [],
1734
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1735
+ },
1736
+ {
1737
+ name: "get-decimals",
1738
+ access: "read-only",
1739
+ args: [{ name: "token-id", type: "uint128" }],
1740
+ outputs: { response: { ok: "uint128", error: "uint128" } }
1741
+ },
1742
+ {
1743
+ name: "get-token-uri",
1744
+ access: "read-only",
1745
+ args: [{ name: "token-id", type: "uint128" }],
1746
+ outputs: {
1747
+ response: {
1748
+ ok: { optional: { "string-utf8": { length: 256 } } },
1749
+ error: "uint128"
1750
+ }
1751
+ }
1752
+ }
1753
+ ],
1754
+ fungible_tokens: [],
1755
+ non_fungible_tokens: []
1756
+ };
1757
+ // src/clarity/abi/classify.ts
1758
+ var STANDARDS = [
1759
+ { id: "sip-010", abi: SIP010_ABI, optional: new Set(["get-token-uri"]) },
1760
+ { id: "sip-009", abi: SIP009_ABI, optional: new Set(["get-token-uri"]) },
1761
+ {
1762
+ id: "sip-013",
1763
+ abi: SIP013_ABI,
1764
+ optional: new Set([
1765
+ "transfer-memo",
1766
+ "transfer-many",
1767
+ "transfer-many-memo",
1768
+ "get-token-uri",
1769
+ "get-overall-balance",
1770
+ "get-overall-supply"
1771
+ ])
1772
+ }
1773
+ ];
1529
1774
  // src/bns/abi.ts
1530
1775
  var BNS_ABI = {
1531
1776
  functions: [
@@ -2430,5 +2675,5 @@ export {
2430
2675
  bnsResolve
2431
2676
  };
2432
2677
 
2433
- //# debugId=D11981BB65E0A0F464756E2164756E21
2678
+ //# debugId=0629109BE553EC9064756E2164756E21
2434
2679
  //# sourceMappingURL=index.js.map