@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.
Files changed (32) hide show
  1. package/dist/cjs/{BaseStreamClient-t7I4NOSm.d.cts → BaseStreamClient-uzoqllcf.d.cts} +4 -0
  2. package/dist/cjs/aptos/index.d.cts +2 -2
  3. package/dist/cjs/evm/index.d.cts +2 -2
  4. package/dist/cjs/{index-BRL3w_PW.d.cts → index-BEQUqMyR.d.cts} +3 -1
  5. package/dist/cjs/{index-kcFtmz7O.d.cts → index-BpvTuTHx.d.cts} +1 -1
  6. package/dist/cjs/{index-DU0JxxIj.d.cts → index-CA72ko5B.d.cts} +1 -1
  7. package/dist/cjs/{index-IHOpuPSg.d.cts → index-DM9lJY7y.d.cts} +1 -1
  8. package/dist/cjs/index.cjs +320 -65
  9. package/dist/cjs/index.cjs.map +1 -1
  10. package/dist/cjs/index.d.cts +10 -10
  11. package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.d.cts +766 -517
  12. package/dist/cjs/solana/index.cjs +320 -65
  13. package/dist/cjs/solana/index.cjs.map +1 -1
  14. package/dist/cjs/solana/index.d.cts +2 -2
  15. package/dist/cjs/sui/index.d.cts +2 -2
  16. package/dist/esm/{BaseStreamClient-t7I4NOSm.d.ts → BaseStreamClient-uzoqllcf.d.ts} +4 -0
  17. package/dist/esm/aptos/index.d.ts +2 -2
  18. package/dist/esm/evm/index.d.ts +2 -2
  19. package/dist/esm/{index-B2txI-oF.d.ts → index-0fL5gH5R.d.ts} +3 -1
  20. package/dist/esm/{index-BfQ0dUgG.d.ts → index-BLMg_CgS.d.ts} +1 -1
  21. package/dist/esm/{index-C81Z69-K.d.ts → index-DJNjOKR0.d.ts} +1 -1
  22. package/dist/esm/{index-BGOG6wUc.d.ts → index-DvlYnKNo.d.ts} +1 -1
  23. package/dist/esm/index.d.ts +10 -10
  24. package/dist/esm/index.js +320 -65
  25. package/dist/esm/index.js.map +1 -1
  26. package/dist/esm/solana/descriptor/idl/streamflow_aligned_unlocks.json +569 -80
  27. package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.d.ts +766 -517
  28. package/dist/esm/solana/index.d.ts +2 -2
  29. package/dist/esm/solana/index.js +320 -65
  30. package/dist/esm/solana/index.js.map +1 -1
  31. package/dist/esm/sui/index.d.ts +2 -2
  32. package/package.json +4 -4
@@ -272,6 +272,8 @@ var AlignedContract = class extends Contract {
272
272
  this.lastPrice = getNumberFromBN(alignedProxy.lastPrice, ALIGNED_PRECISION_FACTOR_POW);
273
273
  this.lastAmountUpdateTime = alignedProxy.lastAmountUpdateTime.toNumber();
274
274
  this.initialNetAmount = alignedProxy.initialNetAmount;
275
+ this.expiryTime = alignedProxy.expiryTime.toNumber();
276
+ this.expiryPercentage = getNumberFromBN(alignedProxy.expiryPercentage, ALIGNED_PRECISION_FACTOR_POW);
275
277
  this.type = buildStreamType(this);
276
278
  this.isAligned = true;
277
279
  }
@@ -871,14 +873,23 @@ var streamflow_aligned_unlocks_default = {
871
873
  address: "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH",
872
874
  metadata: {
873
875
  name: "streamflow_aligned_unlocks",
874
- version: "1.1.1",
876
+ version: "1.2.0",
875
877
  spec: "0.1.0",
876
878
  description: "Proxy to update unlock amount within Streamflow vesting protocol according to Token performance and other metrics"
877
879
  },
878
880
  instructions: [
879
881
  {
880
882
  name: "cancel",
881
- discriminator: [232, 219, 223, 41, 219, 236, 220, 190],
883
+ discriminator: [
884
+ 232,
885
+ 219,
886
+ 223,
887
+ 41,
888
+ 219,
889
+ 236,
890
+ 220,
891
+ 190
892
+ ],
882
893
  accounts: [
883
894
  {
884
895
  name: "sender",
@@ -887,7 +898,9 @@ var streamflow_aligned_unlocks_default = {
887
898
  },
888
899
  {
889
900
  name: "sender_tokens",
890
- docs: ["Associated token account address of `sender`."],
901
+ docs: [
902
+ "Associated token account address of `sender`."
903
+ ],
891
904
  writable: true,
892
905
  pda: {
893
906
  seeds: [
@@ -949,7 +962,9 @@ var streamflow_aligned_unlocks_default = {
949
962
  },
950
963
  {
951
964
  name: "recipient_tokens",
952
- docs: ["CHECK; Associated token account address of `recipient`."],
965
+ docs: [
966
+ "CHECK; Associated token account address of `recipient`."
967
+ ],
953
968
  writable: true,
954
969
  pda: {
955
970
  seeds: [
@@ -1007,13 +1022,24 @@ var streamflow_aligned_unlocks_default = {
1007
1022
  },
1008
1023
  {
1009
1024
  name: "proxy_metadata",
1010
- docs: ["Proxy Contract"],
1025
+ docs: [
1026
+ "Proxy Contract"
1027
+ ],
1011
1028
  writable: true,
1012
1029
  pda: {
1013
1030
  seeds: [
1014
1031
  {
1015
1032
  kind: "const",
1016
- value: [99, 111, 110, 116, 114, 97, 99, 116]
1033
+ value: [
1034
+ 99,
1035
+ 111,
1036
+ 110,
1037
+ 116,
1038
+ 114,
1039
+ 97,
1040
+ 99,
1041
+ 116
1042
+ ]
1017
1043
  },
1018
1044
  {
1019
1045
  kind: "account",
@@ -1211,7 +1237,9 @@ var streamflow_aligned_unlocks_default = {
1211
1237
  },
1212
1238
  {
1213
1239
  name: "mint",
1214
- docs: ["The SPL token mint account."],
1240
+ docs: [
1241
+ "The SPL token mint account."
1242
+ ],
1215
1243
  writable: true
1216
1244
  },
1217
1245
  {
@@ -1220,14 +1248,26 @@ var streamflow_aligned_unlocks_default = {
1220
1248
  },
1221
1249
  {
1222
1250
  name: "token_program",
1223
- docs: ["The SPL program needed in case an associated account", "for the new recipient is being created."]
1251
+ docs: [
1252
+ "The SPL program needed in case an associated account",
1253
+ "for the new recipient is being created."
1254
+ ]
1224
1255
  }
1225
1256
  ],
1226
1257
  args: []
1227
1258
  },
1228
1259
  {
1229
1260
  name: "change_oracle",
1230
- discriminator: [177, 227, 230, 103, 13, 72, 141, 248],
1261
+ discriminator: [
1262
+ 177,
1263
+ 227,
1264
+ 230,
1265
+ 103,
1266
+ 13,
1267
+ 72,
1268
+ 141,
1269
+ 248
1270
+ ],
1231
1271
  accounts: [
1232
1272
  {
1233
1273
  name: "sender",
@@ -1236,7 +1276,9 @@ var streamflow_aligned_unlocks_default = {
1236
1276
  },
1237
1277
  {
1238
1278
  name: "proxy_metadata",
1239
- docs: ["Proxy Contract"],
1279
+ docs: [
1280
+ "Proxy Contract"
1281
+ ],
1240
1282
  writable: true
1241
1283
  },
1242
1284
  {
@@ -1256,11 +1298,22 @@ var streamflow_aligned_unlocks_default = {
1256
1298
  },
1257
1299
  {
1258
1300
  name: "create",
1259
- discriminator: [24, 30, 200, 40, 5, 28, 7, 119],
1301
+ discriminator: [
1302
+ 24,
1303
+ 30,
1304
+ 200,
1305
+ 40,
1306
+ 5,
1307
+ 28,
1308
+ 7,
1309
+ 119
1310
+ ],
1260
1311
  accounts: [
1261
1312
  {
1262
1313
  name: "payer",
1263
- docs: ["Rent payer"],
1314
+ docs: [
1315
+ "Rent payer"
1316
+ ],
1264
1317
  writable: true,
1265
1318
  signer: true
1266
1319
  },
@@ -1271,7 +1324,9 @@ var streamflow_aligned_unlocks_default = {
1271
1324
  },
1272
1325
  {
1273
1326
  name: "sender_tokens",
1274
- docs: ["Associated token account address of `payer`."],
1327
+ docs: [
1328
+ "Associated token account address of `payer`."
1329
+ ],
1275
1330
  writable: true,
1276
1331
  pda: {
1277
1332
  seeds: [
@@ -1393,7 +1448,16 @@ var streamflow_aligned_unlocks_default = {
1393
1448
  seeds: [
1394
1449
  {
1395
1450
  kind: "const",
1396
- value: [99, 111, 110, 116, 114, 97, 99, 116]
1451
+ value: [
1452
+ 99,
1453
+ 111,
1454
+ 110,
1455
+ 116,
1456
+ 114,
1457
+ 97,
1458
+ 99,
1459
+ 116
1460
+ ]
1397
1461
  },
1398
1462
  {
1399
1463
  kind: "account",
@@ -1517,7 +1581,16 @@ var streamflow_aligned_unlocks_default = {
1517
1581
  },
1518
1582
  {
1519
1583
  name: "create_test_oracle",
1520
- discriminator: [183, 110, 4, 11, 131, 220, 84, 12],
1584
+ discriminator: [
1585
+ 183,
1586
+ 110,
1587
+ 4,
1588
+ 11,
1589
+ 131,
1590
+ 220,
1591
+ 84,
1592
+ 12
1593
+ ],
1521
1594
  accounts: [
1522
1595
  {
1523
1596
  name: "creator",
@@ -1534,7 +1607,19 @@ var streamflow_aligned_unlocks_default = {
1534
1607
  seeds: [
1535
1608
  {
1536
1609
  kind: "const",
1537
- value: [116, 101, 115, 116, 45, 111, 114, 97, 99, 108, 101]
1610
+ value: [
1611
+ 116,
1612
+ 101,
1613
+ 115,
1614
+ 116,
1615
+ 45,
1616
+ 111,
1617
+ 114,
1618
+ 97,
1619
+ 99,
1620
+ 108,
1621
+ 101
1622
+ ]
1538
1623
  },
1539
1624
  {
1540
1625
  kind: "account",
@@ -1565,7 +1650,16 @@ var streamflow_aligned_unlocks_default = {
1565
1650
  },
1566
1651
  {
1567
1652
  name: "set_test_oracle_authority",
1568
- discriminator: [26, 66, 233, 99, 38, 118, 181, 247],
1653
+ discriminator: [
1654
+ 26,
1655
+ 66,
1656
+ 233,
1657
+ 99,
1658
+ 38,
1659
+ 118,
1660
+ 181,
1661
+ 247
1662
+ ],
1569
1663
  accounts: [
1570
1664
  {
1571
1665
  name: "authority",
@@ -1584,11 +1678,22 @@ var streamflow_aligned_unlocks_default = {
1584
1678
  },
1585
1679
  {
1586
1680
  name: "update_amount",
1587
- discriminator: [212, 178, 69, 133, 251, 180, 212, 71],
1681
+ discriminator: [
1682
+ 212,
1683
+ 178,
1684
+ 69,
1685
+ 133,
1686
+ 251,
1687
+ 180,
1688
+ 212,
1689
+ 71
1690
+ ],
1588
1691
  accounts: [
1589
1692
  {
1590
1693
  name: "authority",
1591
- docs: ["Wallet authorised to call this method"],
1694
+ docs: [
1695
+ "Wallet authorised to call this method"
1696
+ ],
1592
1697
  writable: true,
1593
1698
  signer: true
1594
1699
  },
@@ -1599,7 +1704,16 @@ var streamflow_aligned_unlocks_default = {
1599
1704
  seeds: [
1600
1705
  {
1601
1706
  kind: "const",
1602
- value: [99, 111, 110, 116, 114, 97, 99, 116]
1707
+ value: [
1708
+ 99,
1709
+ 111,
1710
+ 110,
1711
+ 116,
1712
+ 114,
1713
+ 97,
1714
+ 99,
1715
+ 116
1716
+ ]
1603
1717
  },
1604
1718
  {
1605
1719
  kind: "account",
@@ -1618,7 +1732,9 @@ var streamflow_aligned_unlocks_default = {
1618
1732
  },
1619
1733
  {
1620
1734
  name: "price_oracle",
1621
- relations: ["proxy_metadata"]
1735
+ relations: [
1736
+ "proxy_metadata"
1737
+ ]
1622
1738
  },
1623
1739
  {
1624
1740
  name: "streamflow_program",
@@ -1633,7 +1749,16 @@ var streamflow_aligned_unlocks_default = {
1633
1749
  },
1634
1750
  {
1635
1751
  name: "update_test_oracle",
1636
- discriminator: [158, 147, 215, 74, 34, 123, 80, 76],
1752
+ discriminator: [
1753
+ 158,
1754
+ 147,
1755
+ 215,
1756
+ 74,
1757
+ 34,
1758
+ 123,
1759
+ 80,
1760
+ 76
1761
+ ],
1637
1762
  accounts: [
1638
1763
  {
1639
1764
  name: "authority",
@@ -1660,11 +1785,29 @@ var streamflow_aligned_unlocks_default = {
1660
1785
  accounts: [
1661
1786
  {
1662
1787
  name: "Contract",
1663
- discriminator: [172, 138, 115, 242, 121, 67, 183, 26]
1788
+ discriminator: [
1789
+ 172,
1790
+ 138,
1791
+ 115,
1792
+ 242,
1793
+ 121,
1794
+ 67,
1795
+ 183,
1796
+ 26
1797
+ ]
1664
1798
  },
1665
1799
  {
1666
1800
  name: "TestOracle",
1667
- discriminator: [198, 49, 63, 134, 232, 251, 168, 28]
1801
+ discriminator: [
1802
+ 198,
1803
+ 49,
1804
+ 63,
1805
+ 134,
1806
+ 232,
1807
+ 251,
1808
+ 168,
1809
+ 28
1810
+ ]
1668
1811
  }
1669
1812
  ],
1670
1813
  errors: [
@@ -1705,33 +1848,43 @@ var streamflow_aligned_unlocks_default = {
1705
1848
  },
1706
1849
  {
1707
1850
  code: 6007,
1851
+ name: "InvalidExpiryDuration",
1852
+ msg: "Provided expiry time/percentage configuration is invalid"
1853
+ },
1854
+ {
1855
+ code: 6008,
1708
1856
  name: "UnsupportedOracle",
1709
1857
  msg: "Unsupported price oracle"
1710
1858
  },
1711
1859
  {
1712
- code: 6008,
1860
+ code: 6009,
1713
1861
  name: "InvalidOracleAccount",
1714
1862
  msg: "Invalid oracle account"
1715
1863
  },
1716
1864
  {
1717
- code: 6009,
1865
+ code: 6010,
1718
1866
  name: "InvalidOraclePrice",
1719
1867
  msg: "Invalid oracle price"
1720
1868
  },
1721
1869
  {
1722
- code: 6010,
1870
+ code: 6011,
1723
1871
  name: "InvalidStreamMetadata",
1724
1872
  msg: "Invalid Stream Metadata"
1725
1873
  },
1726
1874
  {
1727
- code: 6011,
1875
+ code: 6012,
1728
1876
  name: "AmountAlreadyUpdated",
1729
1877
  msg: "Release amount has already been updated in this period"
1730
1878
  },
1731
1879
  {
1732
- code: 6012,
1880
+ code: 6013,
1733
1881
  name: "AllFundsUnlocked",
1734
1882
  msg: "All funds are already unlocked"
1883
+ },
1884
+ {
1885
+ code: 6014,
1886
+ name: "DynamicScheduleExpired",
1887
+ msg: "Dynamic schedule expired, updates are not allowed"
1735
1888
  }
1736
1889
  ],
1737
1890
  types: [
@@ -1758,27 +1911,37 @@ var streamflow_aligned_unlocks_default = {
1758
1911
  fields: [
1759
1912
  {
1760
1913
  name: "bump",
1761
- docs: ["Bump Seed used to sign transactions"],
1914
+ docs: [
1915
+ "Bump Seed used to sign transactions"
1916
+ ],
1762
1917
  type: "u8"
1763
1918
  },
1764
1919
  {
1765
1920
  name: "sender",
1766
- docs: ["Original Contract sender"],
1921
+ docs: [
1922
+ "Original Contract sender"
1923
+ ],
1767
1924
  type: "pubkey"
1768
1925
  },
1769
1926
  {
1770
1927
  name: "sender_tokens",
1771
- docs: ["Original Contract sender tokens address"],
1928
+ docs: [
1929
+ "Original Contract sender tokens address"
1930
+ ],
1772
1931
  type: "pubkey"
1773
1932
  },
1774
1933
  {
1775
1934
  name: "stream",
1776
- docs: ["Vesting Stream address"],
1935
+ docs: [
1936
+ "Vesting Stream address"
1937
+ ],
1777
1938
  type: "pubkey"
1778
1939
  },
1779
1940
  {
1780
1941
  name: "price_oracle_type",
1781
- docs: ["Type of the Oracle used to derive Token Price"],
1942
+ docs: [
1943
+ "Type of the Oracle used to derive Token Price"
1944
+ ],
1782
1945
  type: {
1783
1946
  defined: {
1784
1947
  name: "OracleType"
@@ -1787,32 +1950,44 @@ var streamflow_aligned_unlocks_default = {
1787
1950
  },
1788
1951
  {
1789
1952
  name: "price_oracle",
1790
- docs: ["Address of the Price Oracle"],
1953
+ docs: [
1954
+ "Address of the Price Oracle"
1955
+ ],
1791
1956
  type: "pubkey"
1792
1957
  },
1793
1958
  {
1794
1959
  name: "min_price",
1795
- docs: ["Min price boundary"],
1960
+ docs: [
1961
+ "Min price boundary"
1962
+ ],
1796
1963
  type: "u64"
1797
1964
  },
1798
1965
  {
1799
1966
  name: "max_price",
1800
- docs: ["Max price boundary"],
1967
+ docs: [
1968
+ "Max price boundary"
1969
+ ],
1801
1970
  type: "u64"
1802
1971
  },
1803
1972
  {
1804
1973
  name: "min_percentage",
1805
- docs: ["Min percentage boundary, can be 0 that equals 1 Raw Token"],
1974
+ docs: [
1975
+ "Min percentage boundary, can be 0 that equals 1 Raw Token"
1976
+ ],
1806
1977
  type: "u64"
1807
1978
  },
1808
1979
  {
1809
1980
  name: "max_percentage",
1810
- docs: ["Max percentage boundary"],
1981
+ docs: [
1982
+ "Max percentage boundary"
1983
+ ],
1811
1984
  type: "u64"
1812
1985
  },
1813
1986
  {
1814
1987
  name: "tick_size",
1815
- docs: ["Ticket size for percentage boundaries"],
1988
+ docs: [
1989
+ "Ticket size for percentage boundaries"
1990
+ ],
1816
1991
  type: "u64"
1817
1992
  },
1818
1993
  {
@@ -1845,39 +2020,70 @@ var streamflow_aligned_unlocks_default = {
1845
2020
  },
1846
2021
  {
1847
2022
  name: "last_price",
1848
- docs: ["Price used on last amount calculation"],
2023
+ docs: [
2024
+ "Price used on last amount calculation"
2025
+ ],
1849
2026
  type: "u64"
1850
2027
  },
1851
2028
  {
1852
2029
  name: "stream_canceled_time",
1853
- docs: ["Timestamp when stream was cancelled"],
2030
+ docs: [
2031
+ "Timestamp when stream was cancelled"
2032
+ ],
1854
2033
  type: "u64"
1855
2034
  },
1856
2035
  {
1857
2036
  name: "initial_amount_per_period",
1858
- docs: ["Amount per period to use as base for calculations"],
2037
+ docs: [
2038
+ "Amount per period to use as base for calculations"
2039
+ ],
1859
2040
  type: "u64"
1860
2041
  },
1861
2042
  {
1862
2043
  name: "initial_price",
1863
- docs: ["Initial token price at the time of Contract creation"],
2044
+ docs: [
2045
+ "Initial token price at the time of Contract creation"
2046
+ ],
1864
2047
  type: "u64"
1865
2048
  },
1866
2049
  {
1867
2050
  name: "initial_net_amount",
1868
- docs: ["Initial deposited amount"],
2051
+ docs: [
2052
+ "Initial deposited amount"
2053
+ ],
1869
2054
  type: "u64"
1870
2055
  },
1871
2056
  {
1872
2057
  name: "mint",
1873
- docs: ["Mint for which the contract was created"],
2058
+ docs: [
2059
+ "Mint for which the contract was created"
2060
+ ],
1874
2061
  type: "pubkey"
1875
2062
  },
2063
+ {
2064
+ name: "expiry_time",
2065
+ docs: [
2066
+ "Time when contract expires, `expiry_percentage` will be set in this case"
2067
+ ],
2068
+ type: "u64"
2069
+ },
2070
+ {
2071
+ name: "expiry_percentage",
2072
+ docs: [
2073
+ "Percentage to set when contract expires, won't be updated after it"
2074
+ ],
2075
+ type: "u64"
2076
+ },
1876
2077
  {
1877
2078
  name: "buffer",
1878
- docs: ["Buffer for additional fields"],
2079
+ docs: [
2080
+ "Buffer for additional fields"
2081
+ ],
1879
2082
  type: {
1880
- array: ["u8", 32]
2083
+ array: [
2084
+ "u8",
2085
+ 16
2086
+ ]
1881
2087
  }
1882
2088
  }
1883
2089
  ]
@@ -1890,64 +2096,91 @@ var streamflow_aligned_unlocks_default = {
1890
2096
  fields: [
1891
2097
  {
1892
2098
  name: "start_time",
1893
- docs: ["Timestamp when the tokens start vesting"],
2099
+ docs: [
2100
+ "Timestamp when the tokens start vesting"
2101
+ ],
1894
2102
  type: "u64"
1895
2103
  },
1896
2104
  {
1897
2105
  name: "net_amount_deposited",
1898
- docs: ["Deposited amount of tokens"],
2106
+ docs: [
2107
+ "Deposited amount of tokens"
2108
+ ],
1899
2109
  type: "u64"
1900
2110
  },
1901
2111
  {
1902
2112
  name: "period",
1903
- docs: ["Time step (period) in seconds per which the vesting/release occurs"],
2113
+ docs: [
2114
+ "Time step (period) in seconds per which the vesting/release occurs"
2115
+ ],
1904
2116
  type: "u64"
1905
2117
  },
1906
2118
  {
1907
2119
  name: "amount_per_period",
1908
- docs: ["Base Amount released per period. Combined with `period`, we get a release rate."],
2120
+ docs: [
2121
+ "Base Amount released per period. Combined with `period`, we get a release rate."
2122
+ ],
1909
2123
  type: "u64"
1910
2124
  },
1911
2125
  {
1912
2126
  name: "cliff",
1913
- docs: ['Vesting contract "cliff" timestamp'],
2127
+ docs: [
2128
+ 'Vesting contract "cliff" timestamp'
2129
+ ],
1914
2130
  type: "u64"
1915
2131
  },
1916
2132
  {
1917
2133
  name: "cliff_amount",
1918
- docs: ['Amount unlocked at the "cliff" timestamp'],
2134
+ docs: [
2135
+ 'Amount unlocked at the "cliff" timestamp'
2136
+ ],
1919
2137
  type: "u64"
1920
2138
  },
1921
2139
  {
1922
2140
  name: "cancelable_by_sender",
1923
- docs: ["Whether a stream can be canceled by a sender"],
2141
+ docs: [
2142
+ "Whether a stream can be canceled by a sender"
2143
+ ],
1924
2144
  type: "bool"
1925
2145
  },
1926
2146
  {
1927
2147
  name: "cancelable_by_recipient",
1928
- docs: ["Whether a stream can be canceled by a recipient"],
2148
+ docs: [
2149
+ "Whether a stream can be canceled by a recipient"
2150
+ ],
1929
2151
  type: "bool"
1930
2152
  },
1931
2153
  {
1932
2154
  name: "transferable_by_sender",
1933
- docs: ["Whether the sender can transfer the stream"],
2155
+ docs: [
2156
+ "Whether the sender can transfer the stream"
2157
+ ],
1934
2158
  type: "bool"
1935
2159
  },
1936
2160
  {
1937
2161
  name: "transferable_by_recipient",
1938
- docs: ["Whether the recipient can transfer the stream"],
2162
+ docs: [
2163
+ "Whether the recipient can transfer the stream"
2164
+ ],
1939
2165
  type: "bool"
1940
2166
  },
1941
2167
  {
1942
2168
  name: "can_topup",
1943
- docs: ["Whether topup is enabled"],
2169
+ docs: [
2170
+ "Whether topup is enabled"
2171
+ ],
1944
2172
  type: "bool"
1945
2173
  },
1946
2174
  {
1947
2175
  name: "stream_name",
1948
- docs: ["The name of this stream"],
2176
+ docs: [
2177
+ "The name of this stream"
2178
+ ],
1949
2179
  type: {
1950
- array: ["u8", 64]
2180
+ array: [
2181
+ "u8",
2182
+ 64
2183
+ ]
1951
2184
  }
1952
2185
  },
1953
2186
  {
@@ -1972,17 +2205,35 @@ var streamflow_aligned_unlocks_default = {
1972
2205
  },
1973
2206
  {
1974
2207
  name: "skip_initial",
1975
- docs: ["Whether to skip initial calculation of amount per period"],
2208
+ docs: [
2209
+ "Whether to skip initial calculation of amount per period"
2210
+ ],
1976
2211
  type: "bool"
1977
2212
  },
1978
2213
  {
1979
2214
  name: "oracle_type",
1980
- docs: ["Type of Oracle to use to derive Token Price"],
2215
+ docs: [
2216
+ "Type of Oracle to use to derive Token Price"
2217
+ ],
1981
2218
  type: {
1982
2219
  defined: {
1983
2220
  name: "OracleType"
1984
2221
  }
1985
2222
  }
2223
+ },
2224
+ {
2225
+ name: "expiry_time",
2226
+ docs: [
2227
+ "Time when contract expires, `expiry_percentage` will be set in this case"
2228
+ ],
2229
+ type: "u64"
2230
+ },
2231
+ {
2232
+ name: "expiry_percentage",
2233
+ docs: [
2234
+ "Percentage to set when contract expires, won't be updated after it"
2235
+ ],
2236
+ type: "u64"
1986
2237
  }
1987
2238
  ]
1988
2239
  }
@@ -2226,7 +2477,9 @@ var SolanaStreamClient = class extends BaseStreamClient {
2226
2477
  tickSize,
2227
2478
  priceOracle,
2228
2479
  oracleType,
2229
- tokenProgramId: streamTokenProgramId
2480
+ tokenProgramId: streamTokenProgramId,
2481
+ expiryTime,
2482
+ expiryPercentage
2230
2483
  } = streamParams;
2231
2484
  const { isNative, sender, computeLimit, computePrice, metadataPubKeys } = extParams;
2232
2485
  if (!sender.publicKey) {
@@ -2278,7 +2531,9 @@ var SolanaStreamClient = class extends BaseStreamClient {
2278
2531
  minPercentage: minPercentage instanceof BN4 ? minPercentage : getBN(minPercentage, ALIGNED_PRECISION_FACTOR_POW),
2279
2532
  maxPercentage: maxPercentage instanceof BN4 ? maxPercentage : getBN(maxPercentage, ALIGNED_PRECISION_FACTOR_POW),
2280
2533
  tickSize: new BN4(tickSize || 1),
2281
- skipInitial: skipInitial ?? false
2534
+ skipInitial: skipInitial ?? false,
2535
+ expiryTime: new BN4(expiryTime ?? 0),
2536
+ expiryPercentage: expiryPercentage instanceof BN4 ? expiryPercentage : getBN(expiryPercentage ?? 0, ALIGNED_PRECISION_FACTOR_POW)
2282
2537
  }).accountsPartial({
2283
2538
  payer: sender.publicKey,
2284
2539
  sender: sender.publicKey,