@streamflow/stream 8.1.1 → 8.2.1
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/cjs/{BaseStreamClient-t7I4NOSm.d.cts → BaseStreamClient-uzoqllcf.d.cts} +4 -0
- package/dist/cjs/aptos/index.d.cts +2 -2
- package/dist/cjs/evm/index.d.cts +2 -2
- package/dist/cjs/{index-BRL3w_PW.d.cts → index-BEQUqMyR.d.cts} +3 -1
- package/dist/cjs/{index-kcFtmz7O.d.cts → index-BpvTuTHx.d.cts} +1 -1
- package/dist/cjs/{index-DU0JxxIj.d.cts → index-CA72ko5B.d.cts} +1 -1
- package/dist/cjs/{index-IHOpuPSg.d.cts → index-DM9lJY7y.d.cts} +1 -1
- package/dist/cjs/index.cjs +320 -65
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +10 -10
- package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.d.cts +766 -517
- package/dist/cjs/solana/index.cjs +320 -65
- package/dist/cjs/solana/index.cjs.map +1 -1
- package/dist/cjs/solana/index.d.cts +2 -2
- package/dist/cjs/sui/index.d.cts +2 -2
- package/dist/esm/{BaseStreamClient-t7I4NOSm.d.ts → BaseStreamClient-uzoqllcf.d.ts} +4 -0
- package/dist/esm/aptos/index.d.ts +2 -2
- package/dist/esm/evm/index.d.ts +2 -2
- package/dist/esm/{index-B2txI-oF.d.ts → index-0fL5gH5R.d.ts} +3 -1
- package/dist/esm/{index-BfQ0dUgG.d.ts → index-BLMg_CgS.d.ts} +1 -1
- package/dist/esm/{index-C81Z69-K.d.ts → index-DJNjOKR0.d.ts} +1 -1
- package/dist/esm/{index-BGOG6wUc.d.ts → index-DvlYnKNo.d.ts} +1 -1
- package/dist/esm/index.d.ts +10 -10
- package/dist/esm/index.js +320 -65
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/descriptor/idl/streamflow_aligned_unlocks.json +569 -80
- package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.d.ts +766 -517
- package/dist/esm/solana/index.d.ts +2 -2
- package/dist/esm/solana/index.js +320 -65
- package/dist/esm/solana/index.js.map +1 -1
- package/dist/esm/sui/index.d.ts +2 -2
- package/package.json +4 -4
|
@@ -298,6 +298,8 @@ var AlignedContract = class extends Contract {
|
|
|
298
298
|
this.lastPrice = getNumberFromBN(alignedProxy.lastPrice, ALIGNED_PRECISION_FACTOR_POW);
|
|
299
299
|
this.lastAmountUpdateTime = alignedProxy.lastAmountUpdateTime.toNumber();
|
|
300
300
|
this.initialNetAmount = alignedProxy.initialNetAmount;
|
|
301
|
+
this.expiryTime = alignedProxy.expiryTime.toNumber();
|
|
302
|
+
this.expiryPercentage = getNumberFromBN(alignedProxy.expiryPercentage, ALIGNED_PRECISION_FACTOR_POW);
|
|
301
303
|
this.type = buildStreamType(this);
|
|
302
304
|
this.isAligned = true;
|
|
303
305
|
}
|
|
@@ -897,14 +899,23 @@ var streamflow_aligned_unlocks_default = {
|
|
|
897
899
|
address: "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH",
|
|
898
900
|
metadata: {
|
|
899
901
|
name: "streamflow_aligned_unlocks",
|
|
900
|
-
version: "1.
|
|
902
|
+
version: "1.2.0",
|
|
901
903
|
spec: "0.1.0",
|
|
902
904
|
description: "Proxy to update unlock amount within Streamflow vesting protocol according to Token performance and other metrics"
|
|
903
905
|
},
|
|
904
906
|
instructions: [
|
|
905
907
|
{
|
|
906
908
|
name: "cancel",
|
|
907
|
-
discriminator: [
|
|
909
|
+
discriminator: [
|
|
910
|
+
232,
|
|
911
|
+
219,
|
|
912
|
+
223,
|
|
913
|
+
41,
|
|
914
|
+
219,
|
|
915
|
+
236,
|
|
916
|
+
220,
|
|
917
|
+
190
|
|
918
|
+
],
|
|
908
919
|
accounts: [
|
|
909
920
|
{
|
|
910
921
|
name: "sender",
|
|
@@ -913,7 +924,9 @@ var streamflow_aligned_unlocks_default = {
|
|
|
913
924
|
},
|
|
914
925
|
{
|
|
915
926
|
name: "sender_tokens",
|
|
916
|
-
docs: [
|
|
927
|
+
docs: [
|
|
928
|
+
"Associated token account address of `sender`."
|
|
929
|
+
],
|
|
917
930
|
writable: true,
|
|
918
931
|
pda: {
|
|
919
932
|
seeds: [
|
|
@@ -975,7 +988,9 @@ var streamflow_aligned_unlocks_default = {
|
|
|
975
988
|
},
|
|
976
989
|
{
|
|
977
990
|
name: "recipient_tokens",
|
|
978
|
-
docs: [
|
|
991
|
+
docs: [
|
|
992
|
+
"CHECK; Associated token account address of `recipient`."
|
|
993
|
+
],
|
|
979
994
|
writable: true,
|
|
980
995
|
pda: {
|
|
981
996
|
seeds: [
|
|
@@ -1033,13 +1048,24 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1033
1048
|
},
|
|
1034
1049
|
{
|
|
1035
1050
|
name: "proxy_metadata",
|
|
1036
|
-
docs: [
|
|
1051
|
+
docs: [
|
|
1052
|
+
"Proxy Contract"
|
|
1053
|
+
],
|
|
1037
1054
|
writable: true,
|
|
1038
1055
|
pda: {
|
|
1039
1056
|
seeds: [
|
|
1040
1057
|
{
|
|
1041
1058
|
kind: "const",
|
|
1042
|
-
value: [
|
|
1059
|
+
value: [
|
|
1060
|
+
99,
|
|
1061
|
+
111,
|
|
1062
|
+
110,
|
|
1063
|
+
116,
|
|
1064
|
+
114,
|
|
1065
|
+
97,
|
|
1066
|
+
99,
|
|
1067
|
+
116
|
|
1068
|
+
]
|
|
1043
1069
|
},
|
|
1044
1070
|
{
|
|
1045
1071
|
kind: "account",
|
|
@@ -1237,7 +1263,9 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1237
1263
|
},
|
|
1238
1264
|
{
|
|
1239
1265
|
name: "mint",
|
|
1240
|
-
docs: [
|
|
1266
|
+
docs: [
|
|
1267
|
+
"The SPL token mint account."
|
|
1268
|
+
],
|
|
1241
1269
|
writable: true
|
|
1242
1270
|
},
|
|
1243
1271
|
{
|
|
@@ -1246,14 +1274,26 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1246
1274
|
},
|
|
1247
1275
|
{
|
|
1248
1276
|
name: "token_program",
|
|
1249
|
-
docs: [
|
|
1277
|
+
docs: [
|
|
1278
|
+
"The SPL program needed in case an associated account",
|
|
1279
|
+
"for the new recipient is being created."
|
|
1280
|
+
]
|
|
1250
1281
|
}
|
|
1251
1282
|
],
|
|
1252
1283
|
args: []
|
|
1253
1284
|
},
|
|
1254
1285
|
{
|
|
1255
1286
|
name: "change_oracle",
|
|
1256
|
-
discriminator: [
|
|
1287
|
+
discriminator: [
|
|
1288
|
+
177,
|
|
1289
|
+
227,
|
|
1290
|
+
230,
|
|
1291
|
+
103,
|
|
1292
|
+
13,
|
|
1293
|
+
72,
|
|
1294
|
+
141,
|
|
1295
|
+
248
|
|
1296
|
+
],
|
|
1257
1297
|
accounts: [
|
|
1258
1298
|
{
|
|
1259
1299
|
name: "sender",
|
|
@@ -1262,7 +1302,9 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1262
1302
|
},
|
|
1263
1303
|
{
|
|
1264
1304
|
name: "proxy_metadata",
|
|
1265
|
-
docs: [
|
|
1305
|
+
docs: [
|
|
1306
|
+
"Proxy Contract"
|
|
1307
|
+
],
|
|
1266
1308
|
writable: true
|
|
1267
1309
|
},
|
|
1268
1310
|
{
|
|
@@ -1282,11 +1324,22 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1282
1324
|
},
|
|
1283
1325
|
{
|
|
1284
1326
|
name: "create",
|
|
1285
|
-
discriminator: [
|
|
1327
|
+
discriminator: [
|
|
1328
|
+
24,
|
|
1329
|
+
30,
|
|
1330
|
+
200,
|
|
1331
|
+
40,
|
|
1332
|
+
5,
|
|
1333
|
+
28,
|
|
1334
|
+
7,
|
|
1335
|
+
119
|
|
1336
|
+
],
|
|
1286
1337
|
accounts: [
|
|
1287
1338
|
{
|
|
1288
1339
|
name: "payer",
|
|
1289
|
-
docs: [
|
|
1340
|
+
docs: [
|
|
1341
|
+
"Rent payer"
|
|
1342
|
+
],
|
|
1290
1343
|
writable: true,
|
|
1291
1344
|
signer: true
|
|
1292
1345
|
},
|
|
@@ -1297,7 +1350,9 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1297
1350
|
},
|
|
1298
1351
|
{
|
|
1299
1352
|
name: "sender_tokens",
|
|
1300
|
-
docs: [
|
|
1353
|
+
docs: [
|
|
1354
|
+
"Associated token account address of `payer`."
|
|
1355
|
+
],
|
|
1301
1356
|
writable: true,
|
|
1302
1357
|
pda: {
|
|
1303
1358
|
seeds: [
|
|
@@ -1419,7 +1474,16 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1419
1474
|
seeds: [
|
|
1420
1475
|
{
|
|
1421
1476
|
kind: "const",
|
|
1422
|
-
value: [
|
|
1477
|
+
value: [
|
|
1478
|
+
99,
|
|
1479
|
+
111,
|
|
1480
|
+
110,
|
|
1481
|
+
116,
|
|
1482
|
+
114,
|
|
1483
|
+
97,
|
|
1484
|
+
99,
|
|
1485
|
+
116
|
|
1486
|
+
]
|
|
1423
1487
|
},
|
|
1424
1488
|
{
|
|
1425
1489
|
kind: "account",
|
|
@@ -1543,7 +1607,16 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1543
1607
|
},
|
|
1544
1608
|
{
|
|
1545
1609
|
name: "create_test_oracle",
|
|
1546
|
-
discriminator: [
|
|
1610
|
+
discriminator: [
|
|
1611
|
+
183,
|
|
1612
|
+
110,
|
|
1613
|
+
4,
|
|
1614
|
+
11,
|
|
1615
|
+
131,
|
|
1616
|
+
220,
|
|
1617
|
+
84,
|
|
1618
|
+
12
|
|
1619
|
+
],
|
|
1547
1620
|
accounts: [
|
|
1548
1621
|
{
|
|
1549
1622
|
name: "creator",
|
|
@@ -1560,7 +1633,19 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1560
1633
|
seeds: [
|
|
1561
1634
|
{
|
|
1562
1635
|
kind: "const",
|
|
1563
|
-
value: [
|
|
1636
|
+
value: [
|
|
1637
|
+
116,
|
|
1638
|
+
101,
|
|
1639
|
+
115,
|
|
1640
|
+
116,
|
|
1641
|
+
45,
|
|
1642
|
+
111,
|
|
1643
|
+
114,
|
|
1644
|
+
97,
|
|
1645
|
+
99,
|
|
1646
|
+
108,
|
|
1647
|
+
101
|
|
1648
|
+
]
|
|
1564
1649
|
},
|
|
1565
1650
|
{
|
|
1566
1651
|
kind: "account",
|
|
@@ -1591,7 +1676,16 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1591
1676
|
},
|
|
1592
1677
|
{
|
|
1593
1678
|
name: "set_test_oracle_authority",
|
|
1594
|
-
discriminator: [
|
|
1679
|
+
discriminator: [
|
|
1680
|
+
26,
|
|
1681
|
+
66,
|
|
1682
|
+
233,
|
|
1683
|
+
99,
|
|
1684
|
+
38,
|
|
1685
|
+
118,
|
|
1686
|
+
181,
|
|
1687
|
+
247
|
|
1688
|
+
],
|
|
1595
1689
|
accounts: [
|
|
1596
1690
|
{
|
|
1597
1691
|
name: "authority",
|
|
@@ -1610,11 +1704,22 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1610
1704
|
},
|
|
1611
1705
|
{
|
|
1612
1706
|
name: "update_amount",
|
|
1613
|
-
discriminator: [
|
|
1707
|
+
discriminator: [
|
|
1708
|
+
212,
|
|
1709
|
+
178,
|
|
1710
|
+
69,
|
|
1711
|
+
133,
|
|
1712
|
+
251,
|
|
1713
|
+
180,
|
|
1714
|
+
212,
|
|
1715
|
+
71
|
|
1716
|
+
],
|
|
1614
1717
|
accounts: [
|
|
1615
1718
|
{
|
|
1616
1719
|
name: "authority",
|
|
1617
|
-
docs: [
|
|
1720
|
+
docs: [
|
|
1721
|
+
"Wallet authorised to call this method"
|
|
1722
|
+
],
|
|
1618
1723
|
writable: true,
|
|
1619
1724
|
signer: true
|
|
1620
1725
|
},
|
|
@@ -1625,7 +1730,16 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1625
1730
|
seeds: [
|
|
1626
1731
|
{
|
|
1627
1732
|
kind: "const",
|
|
1628
|
-
value: [
|
|
1733
|
+
value: [
|
|
1734
|
+
99,
|
|
1735
|
+
111,
|
|
1736
|
+
110,
|
|
1737
|
+
116,
|
|
1738
|
+
114,
|
|
1739
|
+
97,
|
|
1740
|
+
99,
|
|
1741
|
+
116
|
|
1742
|
+
]
|
|
1629
1743
|
},
|
|
1630
1744
|
{
|
|
1631
1745
|
kind: "account",
|
|
@@ -1644,7 +1758,9 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1644
1758
|
},
|
|
1645
1759
|
{
|
|
1646
1760
|
name: "price_oracle",
|
|
1647
|
-
relations: [
|
|
1761
|
+
relations: [
|
|
1762
|
+
"proxy_metadata"
|
|
1763
|
+
]
|
|
1648
1764
|
},
|
|
1649
1765
|
{
|
|
1650
1766
|
name: "streamflow_program",
|
|
@@ -1659,7 +1775,16 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1659
1775
|
},
|
|
1660
1776
|
{
|
|
1661
1777
|
name: "update_test_oracle",
|
|
1662
|
-
discriminator: [
|
|
1778
|
+
discriminator: [
|
|
1779
|
+
158,
|
|
1780
|
+
147,
|
|
1781
|
+
215,
|
|
1782
|
+
74,
|
|
1783
|
+
34,
|
|
1784
|
+
123,
|
|
1785
|
+
80,
|
|
1786
|
+
76
|
|
1787
|
+
],
|
|
1663
1788
|
accounts: [
|
|
1664
1789
|
{
|
|
1665
1790
|
name: "authority",
|
|
@@ -1686,11 +1811,29 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1686
1811
|
accounts: [
|
|
1687
1812
|
{
|
|
1688
1813
|
name: "Contract",
|
|
1689
|
-
discriminator: [
|
|
1814
|
+
discriminator: [
|
|
1815
|
+
172,
|
|
1816
|
+
138,
|
|
1817
|
+
115,
|
|
1818
|
+
242,
|
|
1819
|
+
121,
|
|
1820
|
+
67,
|
|
1821
|
+
183,
|
|
1822
|
+
26
|
|
1823
|
+
]
|
|
1690
1824
|
},
|
|
1691
1825
|
{
|
|
1692
1826
|
name: "TestOracle",
|
|
1693
|
-
discriminator: [
|
|
1827
|
+
discriminator: [
|
|
1828
|
+
198,
|
|
1829
|
+
49,
|
|
1830
|
+
63,
|
|
1831
|
+
134,
|
|
1832
|
+
232,
|
|
1833
|
+
251,
|
|
1834
|
+
168,
|
|
1835
|
+
28
|
|
1836
|
+
]
|
|
1694
1837
|
}
|
|
1695
1838
|
],
|
|
1696
1839
|
errors: [
|
|
@@ -1731,33 +1874,43 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1731
1874
|
},
|
|
1732
1875
|
{
|
|
1733
1876
|
code: 6007,
|
|
1877
|
+
name: "InvalidExpiryDuration",
|
|
1878
|
+
msg: "Provided expiry time/percentage configuration is invalid"
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
code: 6008,
|
|
1734
1882
|
name: "UnsupportedOracle",
|
|
1735
1883
|
msg: "Unsupported price oracle"
|
|
1736
1884
|
},
|
|
1737
1885
|
{
|
|
1738
|
-
code:
|
|
1886
|
+
code: 6009,
|
|
1739
1887
|
name: "InvalidOracleAccount",
|
|
1740
1888
|
msg: "Invalid oracle account"
|
|
1741
1889
|
},
|
|
1742
1890
|
{
|
|
1743
|
-
code:
|
|
1891
|
+
code: 6010,
|
|
1744
1892
|
name: "InvalidOraclePrice",
|
|
1745
1893
|
msg: "Invalid oracle price"
|
|
1746
1894
|
},
|
|
1747
1895
|
{
|
|
1748
|
-
code:
|
|
1896
|
+
code: 6011,
|
|
1749
1897
|
name: "InvalidStreamMetadata",
|
|
1750
1898
|
msg: "Invalid Stream Metadata"
|
|
1751
1899
|
},
|
|
1752
1900
|
{
|
|
1753
|
-
code:
|
|
1901
|
+
code: 6012,
|
|
1754
1902
|
name: "AmountAlreadyUpdated",
|
|
1755
1903
|
msg: "Release amount has already been updated in this period"
|
|
1756
1904
|
},
|
|
1757
1905
|
{
|
|
1758
|
-
code:
|
|
1906
|
+
code: 6013,
|
|
1759
1907
|
name: "AllFundsUnlocked",
|
|
1760
1908
|
msg: "All funds are already unlocked"
|
|
1909
|
+
},
|
|
1910
|
+
{
|
|
1911
|
+
code: 6014,
|
|
1912
|
+
name: "DynamicScheduleExpired",
|
|
1913
|
+
msg: "Dynamic schedule expired, updates are not allowed"
|
|
1761
1914
|
}
|
|
1762
1915
|
],
|
|
1763
1916
|
types: [
|
|
@@ -1784,27 +1937,37 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1784
1937
|
fields: [
|
|
1785
1938
|
{
|
|
1786
1939
|
name: "bump",
|
|
1787
|
-
docs: [
|
|
1940
|
+
docs: [
|
|
1941
|
+
"Bump Seed used to sign transactions"
|
|
1942
|
+
],
|
|
1788
1943
|
type: "u8"
|
|
1789
1944
|
},
|
|
1790
1945
|
{
|
|
1791
1946
|
name: "sender",
|
|
1792
|
-
docs: [
|
|
1947
|
+
docs: [
|
|
1948
|
+
"Original Contract sender"
|
|
1949
|
+
],
|
|
1793
1950
|
type: "pubkey"
|
|
1794
1951
|
},
|
|
1795
1952
|
{
|
|
1796
1953
|
name: "sender_tokens",
|
|
1797
|
-
docs: [
|
|
1954
|
+
docs: [
|
|
1955
|
+
"Original Contract sender tokens address"
|
|
1956
|
+
],
|
|
1798
1957
|
type: "pubkey"
|
|
1799
1958
|
},
|
|
1800
1959
|
{
|
|
1801
1960
|
name: "stream",
|
|
1802
|
-
docs: [
|
|
1961
|
+
docs: [
|
|
1962
|
+
"Vesting Stream address"
|
|
1963
|
+
],
|
|
1803
1964
|
type: "pubkey"
|
|
1804
1965
|
},
|
|
1805
1966
|
{
|
|
1806
1967
|
name: "price_oracle_type",
|
|
1807
|
-
docs: [
|
|
1968
|
+
docs: [
|
|
1969
|
+
"Type of the Oracle used to derive Token Price"
|
|
1970
|
+
],
|
|
1808
1971
|
type: {
|
|
1809
1972
|
defined: {
|
|
1810
1973
|
name: "OracleType"
|
|
@@ -1813,32 +1976,44 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1813
1976
|
},
|
|
1814
1977
|
{
|
|
1815
1978
|
name: "price_oracle",
|
|
1816
|
-
docs: [
|
|
1979
|
+
docs: [
|
|
1980
|
+
"Address of the Price Oracle"
|
|
1981
|
+
],
|
|
1817
1982
|
type: "pubkey"
|
|
1818
1983
|
},
|
|
1819
1984
|
{
|
|
1820
1985
|
name: "min_price",
|
|
1821
|
-
docs: [
|
|
1986
|
+
docs: [
|
|
1987
|
+
"Min price boundary"
|
|
1988
|
+
],
|
|
1822
1989
|
type: "u64"
|
|
1823
1990
|
},
|
|
1824
1991
|
{
|
|
1825
1992
|
name: "max_price",
|
|
1826
|
-
docs: [
|
|
1993
|
+
docs: [
|
|
1994
|
+
"Max price boundary"
|
|
1995
|
+
],
|
|
1827
1996
|
type: "u64"
|
|
1828
1997
|
},
|
|
1829
1998
|
{
|
|
1830
1999
|
name: "min_percentage",
|
|
1831
|
-
docs: [
|
|
2000
|
+
docs: [
|
|
2001
|
+
"Min percentage boundary, can be 0 that equals 1 Raw Token"
|
|
2002
|
+
],
|
|
1832
2003
|
type: "u64"
|
|
1833
2004
|
},
|
|
1834
2005
|
{
|
|
1835
2006
|
name: "max_percentage",
|
|
1836
|
-
docs: [
|
|
2007
|
+
docs: [
|
|
2008
|
+
"Max percentage boundary"
|
|
2009
|
+
],
|
|
1837
2010
|
type: "u64"
|
|
1838
2011
|
},
|
|
1839
2012
|
{
|
|
1840
2013
|
name: "tick_size",
|
|
1841
|
-
docs: [
|
|
2014
|
+
docs: [
|
|
2015
|
+
"Ticket size for percentage boundaries"
|
|
2016
|
+
],
|
|
1842
2017
|
type: "u64"
|
|
1843
2018
|
},
|
|
1844
2019
|
{
|
|
@@ -1871,39 +2046,70 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1871
2046
|
},
|
|
1872
2047
|
{
|
|
1873
2048
|
name: "last_price",
|
|
1874
|
-
docs: [
|
|
2049
|
+
docs: [
|
|
2050
|
+
"Price used on last amount calculation"
|
|
2051
|
+
],
|
|
1875
2052
|
type: "u64"
|
|
1876
2053
|
},
|
|
1877
2054
|
{
|
|
1878
2055
|
name: "stream_canceled_time",
|
|
1879
|
-
docs: [
|
|
2056
|
+
docs: [
|
|
2057
|
+
"Timestamp when stream was cancelled"
|
|
2058
|
+
],
|
|
1880
2059
|
type: "u64"
|
|
1881
2060
|
},
|
|
1882
2061
|
{
|
|
1883
2062
|
name: "initial_amount_per_period",
|
|
1884
|
-
docs: [
|
|
2063
|
+
docs: [
|
|
2064
|
+
"Amount per period to use as base for calculations"
|
|
2065
|
+
],
|
|
1885
2066
|
type: "u64"
|
|
1886
2067
|
},
|
|
1887
2068
|
{
|
|
1888
2069
|
name: "initial_price",
|
|
1889
|
-
docs: [
|
|
2070
|
+
docs: [
|
|
2071
|
+
"Initial token price at the time of Contract creation"
|
|
2072
|
+
],
|
|
1890
2073
|
type: "u64"
|
|
1891
2074
|
},
|
|
1892
2075
|
{
|
|
1893
2076
|
name: "initial_net_amount",
|
|
1894
|
-
docs: [
|
|
2077
|
+
docs: [
|
|
2078
|
+
"Initial deposited amount"
|
|
2079
|
+
],
|
|
1895
2080
|
type: "u64"
|
|
1896
2081
|
},
|
|
1897
2082
|
{
|
|
1898
2083
|
name: "mint",
|
|
1899
|
-
docs: [
|
|
2084
|
+
docs: [
|
|
2085
|
+
"Mint for which the contract was created"
|
|
2086
|
+
],
|
|
1900
2087
|
type: "pubkey"
|
|
1901
2088
|
},
|
|
2089
|
+
{
|
|
2090
|
+
name: "expiry_time",
|
|
2091
|
+
docs: [
|
|
2092
|
+
"Time when contract expires, `expiry_percentage` will be set in this case"
|
|
2093
|
+
],
|
|
2094
|
+
type: "u64"
|
|
2095
|
+
},
|
|
2096
|
+
{
|
|
2097
|
+
name: "expiry_percentage",
|
|
2098
|
+
docs: [
|
|
2099
|
+
"Percentage to set when contract expires, won't be updated after it"
|
|
2100
|
+
],
|
|
2101
|
+
type: "u64"
|
|
2102
|
+
},
|
|
1902
2103
|
{
|
|
1903
2104
|
name: "buffer",
|
|
1904
|
-
docs: [
|
|
2105
|
+
docs: [
|
|
2106
|
+
"Buffer for additional fields"
|
|
2107
|
+
],
|
|
1905
2108
|
type: {
|
|
1906
|
-
array: [
|
|
2109
|
+
array: [
|
|
2110
|
+
"u8",
|
|
2111
|
+
16
|
|
2112
|
+
]
|
|
1907
2113
|
}
|
|
1908
2114
|
}
|
|
1909
2115
|
]
|
|
@@ -1916,64 +2122,91 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1916
2122
|
fields: [
|
|
1917
2123
|
{
|
|
1918
2124
|
name: "start_time",
|
|
1919
|
-
docs: [
|
|
2125
|
+
docs: [
|
|
2126
|
+
"Timestamp when the tokens start vesting"
|
|
2127
|
+
],
|
|
1920
2128
|
type: "u64"
|
|
1921
2129
|
},
|
|
1922
2130
|
{
|
|
1923
2131
|
name: "net_amount_deposited",
|
|
1924
|
-
docs: [
|
|
2132
|
+
docs: [
|
|
2133
|
+
"Deposited amount of tokens"
|
|
2134
|
+
],
|
|
1925
2135
|
type: "u64"
|
|
1926
2136
|
},
|
|
1927
2137
|
{
|
|
1928
2138
|
name: "period",
|
|
1929
|
-
docs: [
|
|
2139
|
+
docs: [
|
|
2140
|
+
"Time step (period) in seconds per which the vesting/release occurs"
|
|
2141
|
+
],
|
|
1930
2142
|
type: "u64"
|
|
1931
2143
|
},
|
|
1932
2144
|
{
|
|
1933
2145
|
name: "amount_per_period",
|
|
1934
|
-
docs: [
|
|
2146
|
+
docs: [
|
|
2147
|
+
"Base Amount released per period. Combined with `period`, we get a release rate."
|
|
2148
|
+
],
|
|
1935
2149
|
type: "u64"
|
|
1936
2150
|
},
|
|
1937
2151
|
{
|
|
1938
2152
|
name: "cliff",
|
|
1939
|
-
docs: [
|
|
2153
|
+
docs: [
|
|
2154
|
+
'Vesting contract "cliff" timestamp'
|
|
2155
|
+
],
|
|
1940
2156
|
type: "u64"
|
|
1941
2157
|
},
|
|
1942
2158
|
{
|
|
1943
2159
|
name: "cliff_amount",
|
|
1944
|
-
docs: [
|
|
2160
|
+
docs: [
|
|
2161
|
+
'Amount unlocked at the "cliff" timestamp'
|
|
2162
|
+
],
|
|
1945
2163
|
type: "u64"
|
|
1946
2164
|
},
|
|
1947
2165
|
{
|
|
1948
2166
|
name: "cancelable_by_sender",
|
|
1949
|
-
docs: [
|
|
2167
|
+
docs: [
|
|
2168
|
+
"Whether a stream can be canceled by a sender"
|
|
2169
|
+
],
|
|
1950
2170
|
type: "bool"
|
|
1951
2171
|
},
|
|
1952
2172
|
{
|
|
1953
2173
|
name: "cancelable_by_recipient",
|
|
1954
|
-
docs: [
|
|
2174
|
+
docs: [
|
|
2175
|
+
"Whether a stream can be canceled by a recipient"
|
|
2176
|
+
],
|
|
1955
2177
|
type: "bool"
|
|
1956
2178
|
},
|
|
1957
2179
|
{
|
|
1958
2180
|
name: "transferable_by_sender",
|
|
1959
|
-
docs: [
|
|
2181
|
+
docs: [
|
|
2182
|
+
"Whether the sender can transfer the stream"
|
|
2183
|
+
],
|
|
1960
2184
|
type: "bool"
|
|
1961
2185
|
},
|
|
1962
2186
|
{
|
|
1963
2187
|
name: "transferable_by_recipient",
|
|
1964
|
-
docs: [
|
|
2188
|
+
docs: [
|
|
2189
|
+
"Whether the recipient can transfer the stream"
|
|
2190
|
+
],
|
|
1965
2191
|
type: "bool"
|
|
1966
2192
|
},
|
|
1967
2193
|
{
|
|
1968
2194
|
name: "can_topup",
|
|
1969
|
-
docs: [
|
|
2195
|
+
docs: [
|
|
2196
|
+
"Whether topup is enabled"
|
|
2197
|
+
],
|
|
1970
2198
|
type: "bool"
|
|
1971
2199
|
},
|
|
1972
2200
|
{
|
|
1973
2201
|
name: "stream_name",
|
|
1974
|
-
docs: [
|
|
2202
|
+
docs: [
|
|
2203
|
+
"The name of this stream"
|
|
2204
|
+
],
|
|
1975
2205
|
type: {
|
|
1976
|
-
array: [
|
|
2206
|
+
array: [
|
|
2207
|
+
"u8",
|
|
2208
|
+
64
|
|
2209
|
+
]
|
|
1977
2210
|
}
|
|
1978
2211
|
},
|
|
1979
2212
|
{
|
|
@@ -1998,17 +2231,35 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1998
2231
|
},
|
|
1999
2232
|
{
|
|
2000
2233
|
name: "skip_initial",
|
|
2001
|
-
docs: [
|
|
2234
|
+
docs: [
|
|
2235
|
+
"Whether to skip initial calculation of amount per period"
|
|
2236
|
+
],
|
|
2002
2237
|
type: "bool"
|
|
2003
2238
|
},
|
|
2004
2239
|
{
|
|
2005
2240
|
name: "oracle_type",
|
|
2006
|
-
docs: [
|
|
2241
|
+
docs: [
|
|
2242
|
+
"Type of Oracle to use to derive Token Price"
|
|
2243
|
+
],
|
|
2007
2244
|
type: {
|
|
2008
2245
|
defined: {
|
|
2009
2246
|
name: "OracleType"
|
|
2010
2247
|
}
|
|
2011
2248
|
}
|
|
2249
|
+
},
|
|
2250
|
+
{
|
|
2251
|
+
name: "expiry_time",
|
|
2252
|
+
docs: [
|
|
2253
|
+
"Time when contract expires, `expiry_percentage` will be set in this case"
|
|
2254
|
+
],
|
|
2255
|
+
type: "u64"
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
name: "expiry_percentage",
|
|
2259
|
+
docs: [
|
|
2260
|
+
"Percentage to set when contract expires, won't be updated after it"
|
|
2261
|
+
],
|
|
2262
|
+
type: "u64"
|
|
2012
2263
|
}
|
|
2013
2264
|
]
|
|
2014
2265
|
}
|
|
@@ -2252,7 +2503,9 @@ var SolanaStreamClient = class extends BaseStreamClient {
|
|
|
2252
2503
|
tickSize,
|
|
2253
2504
|
priceOracle,
|
|
2254
2505
|
oracleType,
|
|
2255
|
-
tokenProgramId: streamTokenProgramId
|
|
2506
|
+
tokenProgramId: streamTokenProgramId,
|
|
2507
|
+
expiryTime,
|
|
2508
|
+
expiryPercentage
|
|
2256
2509
|
} = streamParams;
|
|
2257
2510
|
const { isNative, sender, computeLimit, computePrice, metadataPubKeys } = extParams;
|
|
2258
2511
|
if (!sender.publicKey) {
|
|
@@ -2304,7 +2557,9 @@ var SolanaStreamClient = class extends BaseStreamClient {
|
|
|
2304
2557
|
minPercentage: minPercentage instanceof BN4__default.default ? minPercentage : common.getBN(minPercentage, ALIGNED_PRECISION_FACTOR_POW),
|
|
2305
2558
|
maxPercentage: maxPercentage instanceof BN4__default.default ? maxPercentage : common.getBN(maxPercentage, ALIGNED_PRECISION_FACTOR_POW),
|
|
2306
2559
|
tickSize: new BN4__default.default(tickSize || 1),
|
|
2307
|
-
skipInitial: skipInitial ?? false
|
|
2560
|
+
skipInitial: skipInitial ?? false,
|
|
2561
|
+
expiryTime: new BN4__default.default(expiryTime ?? 0),
|
|
2562
|
+
expiryPercentage: expiryPercentage instanceof BN4__default.default ? expiryPercentage : common.getBN(expiryPercentage ?? 0, ALIGNED_PRECISION_FACTOR_POW)
|
|
2308
2563
|
}).accountsPartial({
|
|
2309
2564
|
payer: sender.publicKey,
|
|
2310
2565
|
sender: sender.publicKey,
|