@spicenet-io/spiceflow-core 0.3.11 → 0.3.13
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/dist/abis/index.d.ts +1 -0
- package/dist/abis/index.d.ts.map +1 -1
- package/dist/abis/spicenetEscrow.d.ts +771 -0
- package/dist/abis/spicenetEscrow.d.ts.map +1 -0
- package/dist/abis/spicenetWalletManager.d.ts +1 -566
- package/dist/abis/spicenetWalletManager.d.ts.map +1 -1
- package/dist/chains/index.d.ts +1 -0
- package/dist/chains/index.d.ts.map +1 -1
- package/dist/chains/list.d.ts.map +1 -1
- package/dist/chains/types.d.ts +1 -0
- package/dist/chains/types.d.ts.map +1 -1
- package/dist/index.cjs +341 -63
- package/dist/index.js +338 -62
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -673,6 +673,7 @@ var CHAINS = {
|
|
|
673
673
|
network: "mainnet",
|
|
674
674
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
675
675
|
delegateContract: "0x5884Bff4876C979271E65D2feA8D0CF3bF6E6CcC",
|
|
676
|
+
escrowContract: "0xd3F8f177BB3d7dfD883d7c232f3093EdD61C3De9",
|
|
676
677
|
blockExplorer: "https://basescan.org",
|
|
677
678
|
rpcUrl: "https://mainnet.base.org",
|
|
678
679
|
logo: logo_base,
|
|
@@ -685,6 +686,7 @@ var CHAINS = {
|
|
|
685
686
|
network: "mainnet",
|
|
686
687
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
687
688
|
delegateContract: "0x262E1A689555dA5209113A056d0d164EF8355395",
|
|
689
|
+
escrowContract: "0x47d6DB10d99b1E0A074B1467407C7A53B68e1147",
|
|
688
690
|
blockExplorer: "https://arbiscan.io",
|
|
689
691
|
rpcUrl: "https://arb1.arbitrum.io/rpc",
|
|
690
692
|
logo: logo_arb,
|
|
@@ -697,6 +699,7 @@ var CHAINS = {
|
|
|
697
699
|
network: "mainnet",
|
|
698
700
|
nativeCurrency: { name: "Citrea Bitcoin", symbol: "cBTC", decimals: 18 },
|
|
699
701
|
delegateContract: "0x5884Bff4876C979271E65D2feA8D0CF3bF6E6CcC",
|
|
702
|
+
escrowContract: "0x3677113f10d82acFEeDd22dF5c7cFD58736111ee",
|
|
700
703
|
blockExplorer: "https://explorer.mainnet.citrea.xyz",
|
|
701
704
|
rpcUrl: "https://rpc.mainnet.citrea.xyz",
|
|
702
705
|
logo: logo_citrea,
|
|
@@ -744,6 +747,7 @@ var CHAINS = {
|
|
|
744
747
|
network: "testnet",
|
|
745
748
|
nativeCurrency: { name: "cBTC", symbol: "cBTC", decimals: 18 },
|
|
746
749
|
delegateContract: "0x347056dd1CB95ae850192e3fC6FA995537A3A091",
|
|
750
|
+
escrowContract: "0xDf5616Fe65f103972c25EF596C6386904E5CbC8f",
|
|
747
751
|
blockExplorer: "https://explorer.testnet.citrea.xyz",
|
|
748
752
|
rpcUrl: "https://rpc.testnet.citrea.xyz",
|
|
749
753
|
logo: logo_citrea,
|
|
@@ -876,6 +880,9 @@ function getAllChainsByNetwork(network) {
|
|
|
876
880
|
function getDelegateContract(chainId) {
|
|
877
881
|
return CHAINS[chainId]?.delegateContract;
|
|
878
882
|
}
|
|
883
|
+
function getEscrowContract(chainId) {
|
|
884
|
+
return CHAINS[chainId]?.escrowContract;
|
|
885
|
+
}
|
|
879
886
|
function toViemChain(meta) {
|
|
880
887
|
if (meta.chainType === "starknet") return void 0;
|
|
881
888
|
return defineChain({
|
|
@@ -919,7 +926,13 @@ var STARKNET_MAINNET_CHAIN_ID = 23448594291968336;
|
|
|
919
926
|
// src/utils.ts
|
|
920
927
|
var NATIVE_TOKEN_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
921
928
|
var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
922
|
-
|
|
929
|
+
function getEscrowContractAddress(chainId) {
|
|
930
|
+
const escrow = getEscrowContract(chainId);
|
|
931
|
+
if (!escrow) {
|
|
932
|
+
throw new Error(`Escrow contract not configured for chain ${chainId}`);
|
|
933
|
+
}
|
|
934
|
+
return escrow;
|
|
935
|
+
}
|
|
923
936
|
function isNativeToken(address) {
|
|
924
937
|
const lower = address.toLowerCase();
|
|
925
938
|
return lower === "0x0" || lower === "0x0000000000000000000000000000000000000000" || lower === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
@@ -1481,13 +1494,17 @@ var spicenetAbi = [
|
|
|
1481
1494
|
}
|
|
1482
1495
|
];
|
|
1483
1496
|
|
|
1484
|
-
// src/abis/
|
|
1485
|
-
var
|
|
1497
|
+
// src/abis/spicenetEscrow.ts
|
|
1498
|
+
var spicenetEscrowAbi = [
|
|
1486
1499
|
{
|
|
1487
1500
|
type: "constructor",
|
|
1488
1501
|
inputs: [],
|
|
1489
1502
|
stateMutability: "nonpayable"
|
|
1490
1503
|
},
|
|
1504
|
+
{
|
|
1505
|
+
type: "receive",
|
|
1506
|
+
stateMutability: "payable"
|
|
1507
|
+
},
|
|
1491
1508
|
{
|
|
1492
1509
|
type: "function",
|
|
1493
1510
|
name: "DEFAULT_ADMIN_ROLE",
|
|
@@ -1501,6 +1518,45 @@ var spicenetWalletManagerAbi = [
|
|
|
1501
1518
|
],
|
|
1502
1519
|
stateMutability: "view"
|
|
1503
1520
|
},
|
|
1521
|
+
{
|
|
1522
|
+
type: "function",
|
|
1523
|
+
name: "PAUSER_ROLE",
|
|
1524
|
+
inputs: [],
|
|
1525
|
+
outputs: [
|
|
1526
|
+
{
|
|
1527
|
+
name: "",
|
|
1528
|
+
type: "bytes32",
|
|
1529
|
+
internalType: "bytes32"
|
|
1530
|
+
}
|
|
1531
|
+
],
|
|
1532
|
+
stateMutability: "view"
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
type: "function",
|
|
1536
|
+
name: "RELAYER_ROLE",
|
|
1537
|
+
inputs: [],
|
|
1538
|
+
outputs: [
|
|
1539
|
+
{
|
|
1540
|
+
name: "",
|
|
1541
|
+
type: "bytes32",
|
|
1542
|
+
internalType: "bytes32"
|
|
1543
|
+
}
|
|
1544
|
+
],
|
|
1545
|
+
stateMutability: "view"
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
type: "function",
|
|
1549
|
+
name: "UNPAUSER_ROLE",
|
|
1550
|
+
inputs: [],
|
|
1551
|
+
outputs: [
|
|
1552
|
+
{
|
|
1553
|
+
name: "",
|
|
1554
|
+
type: "bytes32",
|
|
1555
|
+
internalType: "bytes32"
|
|
1556
|
+
}
|
|
1557
|
+
],
|
|
1558
|
+
stateMutability: "view"
|
|
1559
|
+
},
|
|
1504
1560
|
{
|
|
1505
1561
|
type: "function",
|
|
1506
1562
|
name: "UPGRADER_ROLE",
|
|
@@ -1527,6 +1583,143 @@ var spicenetWalletManagerAbi = [
|
|
|
1527
1583
|
],
|
|
1528
1584
|
stateMutability: "view"
|
|
1529
1585
|
},
|
|
1586
|
+
{
|
|
1587
|
+
type: "function",
|
|
1588
|
+
name: "adminProcessWithdrawalRequestEvents",
|
|
1589
|
+
inputs: [
|
|
1590
|
+
{
|
|
1591
|
+
name: "requests",
|
|
1592
|
+
type: "tuple[]",
|
|
1593
|
+
internalType: "struct ISpicenetEscrow.WithdrawalRequest[]",
|
|
1594
|
+
components: [
|
|
1595
|
+
{
|
|
1596
|
+
name: "idempotenceKey",
|
|
1597
|
+
type: "bytes32",
|
|
1598
|
+
internalType: "bytes32"
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
name: "forUser",
|
|
1602
|
+
type: "string",
|
|
1603
|
+
internalType: "string"
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
name: "nbf",
|
|
1607
|
+
type: "uint256",
|
|
1608
|
+
internalType: "uint256"
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
name: "exp",
|
|
1612
|
+
type: "uint256",
|
|
1613
|
+
internalType: "uint256"
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
name: "metadata",
|
|
1617
|
+
type: "string",
|
|
1618
|
+
internalType: "string"
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
name: "transfers",
|
|
1622
|
+
type: "tuple[]",
|
|
1623
|
+
internalType: "struct ISpicenetEscrow.TokenTransfer[]",
|
|
1624
|
+
components: [
|
|
1625
|
+
{
|
|
1626
|
+
name: "token",
|
|
1627
|
+
type: "address",
|
|
1628
|
+
internalType: "address"
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
name: "to",
|
|
1632
|
+
type: "address",
|
|
1633
|
+
internalType: "address"
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
name: "amount",
|
|
1637
|
+
type: "uint256",
|
|
1638
|
+
internalType: "uint256"
|
|
1639
|
+
}
|
|
1640
|
+
]
|
|
1641
|
+
}
|
|
1642
|
+
]
|
|
1643
|
+
}
|
|
1644
|
+
],
|
|
1645
|
+
outputs: [],
|
|
1646
|
+
stateMutability: "nonpayable"
|
|
1647
|
+
},
|
|
1648
|
+
{
|
|
1649
|
+
type: "function",
|
|
1650
|
+
name: "adminSetWithdrawalInfos",
|
|
1651
|
+
inputs: [
|
|
1652
|
+
{
|
|
1653
|
+
name: "idempotenceKeys",
|
|
1654
|
+
type: "bytes32[]",
|
|
1655
|
+
internalType: "bytes32[]"
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
name: "withdrawalInfos",
|
|
1659
|
+
type: "tuple[]",
|
|
1660
|
+
internalType: "struct ISpicenetEscrow.WithdrawalInfo[]",
|
|
1661
|
+
components: [
|
|
1662
|
+
{
|
|
1663
|
+
name: "forUser",
|
|
1664
|
+
type: "string",
|
|
1665
|
+
internalType: "string"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
name: "blockNumber",
|
|
1669
|
+
type: "uint256",
|
|
1670
|
+
internalType: "uint256"
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
name: "nbf",
|
|
1674
|
+
type: "uint256",
|
|
1675
|
+
internalType: "uint256"
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
name: "exp",
|
|
1679
|
+
type: "uint256",
|
|
1680
|
+
internalType: "uint256"
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
name: "metadata",
|
|
1684
|
+
type: "string",
|
|
1685
|
+
internalType: "string"
|
|
1686
|
+
}
|
|
1687
|
+
]
|
|
1688
|
+
}
|
|
1689
|
+
],
|
|
1690
|
+
outputs: [],
|
|
1691
|
+
stateMutability: "nonpayable"
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
type: "function",
|
|
1695
|
+
name: "adminWithdraw",
|
|
1696
|
+
inputs: [
|
|
1697
|
+
{
|
|
1698
|
+
name: "transfers",
|
|
1699
|
+
type: "tuple[]",
|
|
1700
|
+
internalType: "struct ISpicenetEscrow.TokenTransfer[]",
|
|
1701
|
+
components: [
|
|
1702
|
+
{
|
|
1703
|
+
name: "token",
|
|
1704
|
+
type: "address",
|
|
1705
|
+
internalType: "address"
|
|
1706
|
+
},
|
|
1707
|
+
{
|
|
1708
|
+
name: "to",
|
|
1709
|
+
type: "address",
|
|
1710
|
+
internalType: "address"
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
name: "amount",
|
|
1714
|
+
type: "uint256",
|
|
1715
|
+
internalType: "uint256"
|
|
1716
|
+
}
|
|
1717
|
+
]
|
|
1718
|
+
}
|
|
1719
|
+
],
|
|
1720
|
+
outputs: [],
|
|
1721
|
+
stateMutability: "nonpayable"
|
|
1722
|
+
},
|
|
1530
1723
|
{
|
|
1531
1724
|
type: "function",
|
|
1532
1725
|
name: "getRoleAdmin",
|
|
@@ -1622,12 +1815,12 @@ var spicenetWalletManagerAbi = [
|
|
|
1622
1815
|
{
|
|
1623
1816
|
name: "",
|
|
1624
1817
|
type: "tuple",
|
|
1625
|
-
internalType: "struct
|
|
1818
|
+
internalType: "struct ISpicenetEscrow.WithdrawalInfo",
|
|
1626
1819
|
components: [
|
|
1627
1820
|
{
|
|
1628
|
-
name: "
|
|
1629
|
-
type: "
|
|
1630
|
-
internalType: "
|
|
1821
|
+
name: "forUser",
|
|
1822
|
+
type: "string",
|
|
1823
|
+
internalType: "string"
|
|
1631
1824
|
},
|
|
1632
1825
|
{
|
|
1633
1826
|
name: "blockNumber",
|
|
@@ -1709,6 +1902,26 @@ var spicenetWalletManagerAbi = [
|
|
|
1709
1902
|
outputs: [],
|
|
1710
1903
|
stateMutability: "nonpayable"
|
|
1711
1904
|
},
|
|
1905
|
+
{
|
|
1906
|
+
type: "function",
|
|
1907
|
+
name: "pause",
|
|
1908
|
+
inputs: [],
|
|
1909
|
+
outputs: [],
|
|
1910
|
+
stateMutability: "nonpayable"
|
|
1911
|
+
},
|
|
1912
|
+
{
|
|
1913
|
+
type: "function",
|
|
1914
|
+
name: "paused",
|
|
1915
|
+
inputs: [],
|
|
1916
|
+
outputs: [
|
|
1917
|
+
{
|
|
1918
|
+
name: "",
|
|
1919
|
+
type: "bool",
|
|
1920
|
+
internalType: "bool"
|
|
1921
|
+
}
|
|
1922
|
+
],
|
|
1923
|
+
stateMutability: "view"
|
|
1924
|
+
},
|
|
1712
1925
|
{
|
|
1713
1926
|
type: "function",
|
|
1714
1927
|
name: "processWithdrawal",
|
|
@@ -1716,13 +1929,18 @@ var spicenetWalletManagerAbi = [
|
|
|
1716
1929
|
{
|
|
1717
1930
|
name: "request",
|
|
1718
1931
|
type: "tuple",
|
|
1719
|
-
internalType: "struct
|
|
1932
|
+
internalType: "struct ISpicenetEscrow.WithdrawalRequest",
|
|
1720
1933
|
components: [
|
|
1721
1934
|
{
|
|
1722
1935
|
name: "idempotenceKey",
|
|
1723
1936
|
type: "bytes32",
|
|
1724
1937
|
internalType: "bytes32"
|
|
1725
1938
|
},
|
|
1939
|
+
{
|
|
1940
|
+
name: "forUser",
|
|
1941
|
+
type: "string",
|
|
1942
|
+
internalType: "string"
|
|
1943
|
+
},
|
|
1726
1944
|
{
|
|
1727
1945
|
name: "nbf",
|
|
1728
1946
|
type: "uint256",
|
|
@@ -1741,7 +1959,7 @@ var spicenetWalletManagerAbi = [
|
|
|
1741
1959
|
{
|
|
1742
1960
|
name: "transfers",
|
|
1743
1961
|
type: "tuple[]",
|
|
1744
|
-
internalType: "struct
|
|
1962
|
+
internalType: "struct ISpicenetEscrow.TokenTransfer[]",
|
|
1745
1963
|
components: [
|
|
1746
1964
|
{
|
|
1747
1965
|
name: "token",
|
|
@@ -1815,51 +2033,6 @@ var spicenetWalletManagerAbi = [
|
|
|
1815
2033
|
outputs: [],
|
|
1816
2034
|
stateMutability: "nonpayable"
|
|
1817
2035
|
},
|
|
1818
|
-
{
|
|
1819
|
-
type: "function",
|
|
1820
|
-
name: "setWithdrawalInfo",
|
|
1821
|
-
inputs: [
|
|
1822
|
-
{
|
|
1823
|
-
name: "idempotenceKey",
|
|
1824
|
-
type: "bytes32",
|
|
1825
|
-
internalType: "bytes32"
|
|
1826
|
-
},
|
|
1827
|
-
{
|
|
1828
|
-
name: "withdrawalInfo",
|
|
1829
|
-
type: "tuple",
|
|
1830
|
-
internalType: "struct SpicenetWithdrawalManagerV1.WithdrawalInfo",
|
|
1831
|
-
components: [
|
|
1832
|
-
{
|
|
1833
|
-
name: "processed",
|
|
1834
|
-
type: "bool",
|
|
1835
|
-
internalType: "bool"
|
|
1836
|
-
},
|
|
1837
|
-
{
|
|
1838
|
-
name: "blockNumber",
|
|
1839
|
-
type: "uint256",
|
|
1840
|
-
internalType: "uint256"
|
|
1841
|
-
},
|
|
1842
|
-
{
|
|
1843
|
-
name: "nbf",
|
|
1844
|
-
type: "uint256",
|
|
1845
|
-
internalType: "uint256"
|
|
1846
|
-
},
|
|
1847
|
-
{
|
|
1848
|
-
name: "exp",
|
|
1849
|
-
type: "uint256",
|
|
1850
|
-
internalType: "uint256"
|
|
1851
|
-
},
|
|
1852
|
-
{
|
|
1853
|
-
name: "metadata",
|
|
1854
|
-
type: "string",
|
|
1855
|
-
internalType: "string"
|
|
1856
|
-
}
|
|
1857
|
-
]
|
|
1858
|
-
}
|
|
1859
|
-
],
|
|
1860
|
-
outputs: [],
|
|
1861
|
-
stateMutability: "nonpayable"
|
|
1862
|
-
},
|
|
1863
2036
|
{
|
|
1864
2037
|
type: "function",
|
|
1865
2038
|
name: "supportsInterface",
|
|
@@ -1879,6 +2052,13 @@ var spicenetWalletManagerAbi = [
|
|
|
1879
2052
|
],
|
|
1880
2053
|
stateMutability: "view"
|
|
1881
2054
|
},
|
|
2055
|
+
{
|
|
2056
|
+
type: "function",
|
|
2057
|
+
name: "unpause",
|
|
2058
|
+
inputs: [],
|
|
2059
|
+
outputs: [],
|
|
2060
|
+
stateMutability: "nonpayable"
|
|
2061
|
+
},
|
|
1882
2062
|
{
|
|
1883
2063
|
type: "function",
|
|
1884
2064
|
name: "upgradeToAndCall",
|
|
@@ -1910,6 +2090,44 @@ var spicenetWalletManagerAbi = [
|
|
|
1910
2090
|
],
|
|
1911
2091
|
anonymous: false
|
|
1912
2092
|
},
|
|
2093
|
+
{
|
|
2094
|
+
type: "event",
|
|
2095
|
+
name: "NativeTransfer",
|
|
2096
|
+
inputs: [
|
|
2097
|
+
{
|
|
2098
|
+
name: "from",
|
|
2099
|
+
type: "address",
|
|
2100
|
+
indexed: true,
|
|
2101
|
+
internalType: "address"
|
|
2102
|
+
},
|
|
2103
|
+
{
|
|
2104
|
+
name: "to",
|
|
2105
|
+
type: "address",
|
|
2106
|
+
indexed: true,
|
|
2107
|
+
internalType: "address"
|
|
2108
|
+
},
|
|
2109
|
+
{
|
|
2110
|
+
name: "value",
|
|
2111
|
+
type: "uint256",
|
|
2112
|
+
indexed: false,
|
|
2113
|
+
internalType: "uint256"
|
|
2114
|
+
}
|
|
2115
|
+
],
|
|
2116
|
+
anonymous: false
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
type: "event",
|
|
2120
|
+
name: "Paused",
|
|
2121
|
+
inputs: [
|
|
2122
|
+
{
|
|
2123
|
+
name: "account",
|
|
2124
|
+
type: "address",
|
|
2125
|
+
indexed: false,
|
|
2126
|
+
internalType: "address"
|
|
2127
|
+
}
|
|
2128
|
+
],
|
|
2129
|
+
anonymous: false
|
|
2130
|
+
},
|
|
1913
2131
|
{
|
|
1914
2132
|
type: "event",
|
|
1915
2133
|
name: "RoleAdminChanged",
|
|
@@ -1985,6 +2203,19 @@ var spicenetWalletManagerAbi = [
|
|
|
1985
2203
|
],
|
|
1986
2204
|
anonymous: false
|
|
1987
2205
|
},
|
|
2206
|
+
{
|
|
2207
|
+
type: "event",
|
|
2208
|
+
name: "Unpaused",
|
|
2209
|
+
inputs: [
|
|
2210
|
+
{
|
|
2211
|
+
name: "account",
|
|
2212
|
+
type: "address",
|
|
2213
|
+
indexed: false,
|
|
2214
|
+
internalType: "address"
|
|
2215
|
+
}
|
|
2216
|
+
],
|
|
2217
|
+
anonymous: false
|
|
2218
|
+
},
|
|
1988
2219
|
{
|
|
1989
2220
|
type: "event",
|
|
1990
2221
|
name: "Upgraded",
|
|
@@ -2002,17 +2233,34 @@ var spicenetWalletManagerAbi = [
|
|
|
2002
2233
|
type: "event",
|
|
2003
2234
|
name: "WithdrawalProcessed",
|
|
2004
2235
|
inputs: [
|
|
2236
|
+
{
|
|
2237
|
+
name: "idempotenceKey",
|
|
2238
|
+
type: "bytes32",
|
|
2239
|
+
indexed: true,
|
|
2240
|
+
internalType: "bytes32"
|
|
2241
|
+
},
|
|
2242
|
+
{
|
|
2243
|
+
name: "forUser",
|
|
2244
|
+
type: "string",
|
|
2245
|
+
indexed: true,
|
|
2246
|
+
internalType: "string"
|
|
2247
|
+
},
|
|
2005
2248
|
{
|
|
2006
2249
|
name: "request",
|
|
2007
2250
|
type: "tuple",
|
|
2008
2251
|
indexed: false,
|
|
2009
|
-
internalType: "struct
|
|
2252
|
+
internalType: "struct ISpicenetEscrow.WithdrawalRequest",
|
|
2010
2253
|
components: [
|
|
2011
2254
|
{
|
|
2012
2255
|
name: "idempotenceKey",
|
|
2013
2256
|
type: "bytes32",
|
|
2014
2257
|
internalType: "bytes32"
|
|
2015
2258
|
},
|
|
2259
|
+
{
|
|
2260
|
+
name: "forUser",
|
|
2261
|
+
type: "string",
|
|
2262
|
+
internalType: "string"
|
|
2263
|
+
},
|
|
2016
2264
|
{
|
|
2017
2265
|
name: "nbf",
|
|
2018
2266
|
type: "uint256",
|
|
@@ -2031,7 +2279,7 @@ var spicenetWalletManagerAbi = [
|
|
|
2031
2279
|
{
|
|
2032
2280
|
name: "transfers",
|
|
2033
2281
|
type: "tuple[]",
|
|
2034
|
-
internalType: "struct
|
|
2282
|
+
internalType: "struct ISpicenetEscrow.TokenTransfer[]",
|
|
2035
2283
|
components: [
|
|
2036
2284
|
{
|
|
2037
2285
|
name: "token",
|
|
@@ -2103,11 +2351,37 @@ var spicenetWalletManagerAbi = [
|
|
|
2103
2351
|
name: "ERC1967NonPayable",
|
|
2104
2352
|
inputs: []
|
|
2105
2353
|
},
|
|
2354
|
+
{
|
|
2355
|
+
type: "error",
|
|
2356
|
+
name: "EnforcedPause",
|
|
2357
|
+
inputs: []
|
|
2358
|
+
},
|
|
2359
|
+
{
|
|
2360
|
+
type: "error",
|
|
2361
|
+
name: "ExpectedPause",
|
|
2362
|
+
inputs: []
|
|
2363
|
+
},
|
|
2106
2364
|
{
|
|
2107
2365
|
type: "error",
|
|
2108
2366
|
name: "FailedCall",
|
|
2109
2367
|
inputs: []
|
|
2110
2368
|
},
|
|
2369
|
+
{
|
|
2370
|
+
type: "error",
|
|
2371
|
+
name: "InsufficientBalance",
|
|
2372
|
+
inputs: [
|
|
2373
|
+
{
|
|
2374
|
+
name: "balance",
|
|
2375
|
+
type: "uint256",
|
|
2376
|
+
internalType: "uint256"
|
|
2377
|
+
},
|
|
2378
|
+
{
|
|
2379
|
+
name: "needed",
|
|
2380
|
+
type: "uint256",
|
|
2381
|
+
internalType: "uint256"
|
|
2382
|
+
}
|
|
2383
|
+
]
|
|
2384
|
+
},
|
|
2111
2385
|
{
|
|
2112
2386
|
type: "error",
|
|
2113
2387
|
name: "InvalidInitialization",
|
|
@@ -2157,12 +2431,12 @@ var spicenetWalletManagerAbi = [
|
|
|
2157
2431
|
{
|
|
2158
2432
|
name: "withdrawalInfo",
|
|
2159
2433
|
type: "tuple",
|
|
2160
|
-
internalType: "struct
|
|
2434
|
+
internalType: "struct ISpicenetEscrow.WithdrawalInfo",
|
|
2161
2435
|
components: [
|
|
2162
2436
|
{
|
|
2163
|
-
name: "
|
|
2164
|
-
type: "
|
|
2165
|
-
internalType: "
|
|
2437
|
+
name: "forUser",
|
|
2438
|
+
type: "string",
|
|
2439
|
+
internalType: "string"
|
|
2166
2440
|
},
|
|
2167
2441
|
{
|
|
2168
2442
|
name: "blockNumber",
|
|
@@ -2274,7 +2548,6 @@ export {
|
|
|
2274
2548
|
ChainBatchHashAbi,
|
|
2275
2549
|
DELEGATE_ABI,
|
|
2276
2550
|
ERC20_ABI,
|
|
2277
|
-
ESCROW_ADDRESS,
|
|
2278
2551
|
HttpError,
|
|
2279
2552
|
IntentHashAbi,
|
|
2280
2553
|
NATIVE_TOKEN_ADDRESS,
|
|
@@ -2300,6 +2573,8 @@ export {
|
|
|
2300
2573
|
getDeployment,
|
|
2301
2574
|
getEquivalenceGroup,
|
|
2302
2575
|
getEquivalentAddresses,
|
|
2576
|
+
getEscrowContract,
|
|
2577
|
+
getEscrowContractAddress,
|
|
2303
2578
|
getIntentHash,
|
|
2304
2579
|
getIntentStepStatus,
|
|
2305
2580
|
getMainnetChains,
|
|
@@ -2322,7 +2597,8 @@ export {
|
|
|
2322
2597
|
requireViemChain,
|
|
2323
2598
|
resolveTokenRef,
|
|
2324
2599
|
spicenetAbi,
|
|
2325
|
-
|
|
2600
|
+
spicenetEscrowAbi,
|
|
2601
|
+
spicenetEscrowAbi as spicenetWalletManagerAbi,
|
|
2326
2602
|
submitTransaction,
|
|
2327
2603
|
truncateAddress,
|
|
2328
2604
|
uniV3QuoterV2Abi,
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
2
|
export declare const NATIVE_TOKEN_ADDRESS: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
3
3
|
export declare const ZERO_ADDRESS: "0x0000000000000000000000000000000000000000";
|
|
4
|
-
export declare
|
|
4
|
+
export declare function getEscrowContractAddress(chainId: number): Address;
|
|
5
5
|
export declare function isNativeToken(address: string): boolean;
|
|
6
6
|
export declare function normalizeNativeTokenAddress(address: string): Address;
|
|
7
7
|
export declare function convertAmountBetweenDecimals(amount: bigint, fromDecimals: number, toDecimals: number): bigint;
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,eAAO,MAAM,oBAAoB,EAAG,4CAAqD,CAAC;AAC1F,eAAO,MAAM,YAAY,EAAG,4CAAqD,CAAC;AAElF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAMjE;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAOtD;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAKpE;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACjB,MAAM,CAMR;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,aAAa,GAAE,MAAU,GACxB,MAAM,CASR;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,UAAU,GAAE,MAAU,EACtB,QAAQ,GAAE,MAAU,GACnB,MAAM,CAGR;AAED,wBAAsB,SAAS,CAAC,CAAC,EAC/B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,UAAU,GAAE,MAAU,EACtB,OAAO,GAAE,MAAY,GACpB,OAAO,CAAC,CAAC,CAAC,CAaZ"}
|