@streamflow/stream 8.3.1 → 8.6.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.
- package/dist/cjs/{BaseStreamClient-uzoqllcf.d.cts → BaseStreamClient-DOyJqO7R.d.cts} +2 -0
- package/dist/cjs/aptos/index.d.cts +2 -2
- package/dist/cjs/evm/index.d.cts +2 -2
- package/dist/cjs/{index-ehppV5TW.d.cts → index-BAZFUaQL.d.cts} +2 -1
- package/dist/cjs/{index-DM9lJY7y.d.cts → index-BMZATAYa.d.cts} +1 -1
- package/dist/cjs/{index-BpvTuTHx.d.cts → index-DYIamO0j.d.cts} +1 -1
- package/dist/cjs/{index-CA72ko5B.d.cts → index-Y0HH2ugY.d.cts} +1 -1
- package/dist/cjs/index.cjs +35 -8
- 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 +26 -2
- package/dist/cjs/solana/index.cjs +35 -8
- 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-uzoqllcf.d.ts → BaseStreamClient-DOyJqO7R.d.ts} +2 -0
- package/dist/esm/aptos/index.d.ts +2 -2
- package/dist/esm/evm/index.d.ts +2 -2
- package/dist/esm/{index-DvlYnKNo.d.ts → index-D54wSYym.d.ts} +1 -1
- package/dist/esm/{index-C_tXt0ti.d.ts → index-DKkJbavt.d.ts} +2 -1
- package/dist/esm/{index-BLMg_CgS.d.ts → index-DrzqsoIB.d.ts} +1 -1
- package/dist/esm/{index-DJNjOKR0.d.ts → index-elpYUBph.d.ts} +1 -1
- package/dist/esm/index.d.ts +10 -10
- package/dist/esm/index.js +35 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/descriptor/idl/streamflow_aligned_unlocks.json +26 -2
- package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.d.ts +26 -2
- package/dist/esm/solana/index.d.ts +2 -2
- package/dist/esm/solana/index.js +35 -8
- package/dist/esm/solana/index.js.map +1 -1
- package/dist/esm/sui/index.d.ts +2 -2
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"address": "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH",
|
|
3
3
|
"metadata": {
|
|
4
4
|
"name": "streamflow_aligned_unlocks",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.3.0",
|
|
6
6
|
"spec": "0.1.0",
|
|
7
7
|
"description": "Proxy to update unlock amount within Streamflow vesting protocol according to Token performance and other metrics"
|
|
8
8
|
},
|
|
@@ -1014,6 +1014,16 @@
|
|
|
1014
1014
|
"code": 6014,
|
|
1015
1015
|
"name": "DynamicScheduleExpired",
|
|
1016
1016
|
"msg": "Dynamic schedule expired, updates are not allowed"
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
"code": 6015,
|
|
1020
|
+
"name": "FloorPriceReached",
|
|
1021
|
+
"msg": "Floor price has already been reached, updates are not allowed"
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
"code": 6016,
|
|
1025
|
+
"name": "InvalidFloorPrice",
|
|
1026
|
+
"msg": "Provided floor price is invalid, should be less than minimum price"
|
|
1017
1027
|
}
|
|
1018
1028
|
],
|
|
1019
1029
|
"types": [
|
|
@@ -1203,6 +1213,13 @@
|
|
|
1203
1213
|
],
|
|
1204
1214
|
"type": "u64"
|
|
1205
1215
|
},
|
|
1216
|
+
{
|
|
1217
|
+
"name": "floor_price",
|
|
1218
|
+
"docs": [
|
|
1219
|
+
"Floor price boundary, if the price is below this boundary, the contract will be unlocked"
|
|
1220
|
+
],
|
|
1221
|
+
"type": "u64"
|
|
1222
|
+
},
|
|
1206
1223
|
{
|
|
1207
1224
|
"name": "buffer",
|
|
1208
1225
|
"docs": [
|
|
@@ -1211,7 +1228,7 @@
|
|
|
1211
1228
|
"type": {
|
|
1212
1229
|
"array": [
|
|
1213
1230
|
"u8",
|
|
1214
|
-
|
|
1231
|
+
8
|
|
1215
1232
|
]
|
|
1216
1233
|
}
|
|
1217
1234
|
}
|
|
@@ -1363,6 +1380,13 @@
|
|
|
1363
1380
|
"Percentage to set when contract expires, won't be updated after it"
|
|
1364
1381
|
],
|
|
1365
1382
|
"type": "u64"
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
"name": "floor_price",
|
|
1386
|
+
"docs": [
|
|
1387
|
+
"Floor price boundary, if the price is below this boundary, the contract will be unlocked"
|
|
1388
|
+
],
|
|
1389
|
+
"type": "u64"
|
|
1366
1390
|
}
|
|
1367
1391
|
]
|
|
1368
1392
|
}
|
|
@@ -8,7 +8,7 @@ type StreamflowAlignedUnlocks = {
|
|
|
8
8
|
"address": "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH";
|
|
9
9
|
"metadata": {
|
|
10
10
|
"name": "streamflowAlignedUnlocks";
|
|
11
|
-
"version": "1.
|
|
11
|
+
"version": "1.3.0";
|
|
12
12
|
"spec": "0.1.0";
|
|
13
13
|
"description": "Proxy to update unlock amount within Streamflow vesting protocol according to Token performance and other metrics";
|
|
14
14
|
};
|
|
@@ -1020,6 +1020,16 @@ type StreamflowAlignedUnlocks = {
|
|
|
1020
1020
|
"code": 6014;
|
|
1021
1021
|
"name": "dynamicScheduleExpired";
|
|
1022
1022
|
"msg": "Dynamic schedule expired, updates are not allowed";
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"code": 6015;
|
|
1026
|
+
"name": "floorPriceReached";
|
|
1027
|
+
"msg": "Floor price has already been reached, updates are not allowed";
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"code": 6016;
|
|
1031
|
+
"name": "invalidFloorPrice";
|
|
1032
|
+
"msg": "Provided floor price is invalid, should be less than minimum price";
|
|
1023
1033
|
}
|
|
1024
1034
|
];
|
|
1025
1035
|
"types": [
|
|
@@ -1209,6 +1219,13 @@ type StreamflowAlignedUnlocks = {
|
|
|
1209
1219
|
];
|
|
1210
1220
|
"type": "u64";
|
|
1211
1221
|
},
|
|
1222
|
+
{
|
|
1223
|
+
"name": "floorPrice";
|
|
1224
|
+
"docs": [
|
|
1225
|
+
"Floor price boundary, if the price is below this boundary, the contract will be unlocked"
|
|
1226
|
+
];
|
|
1227
|
+
"type": "u64";
|
|
1228
|
+
},
|
|
1212
1229
|
{
|
|
1213
1230
|
"name": "buffer";
|
|
1214
1231
|
"docs": [
|
|
@@ -1217,7 +1234,7 @@ type StreamflowAlignedUnlocks = {
|
|
|
1217
1234
|
"type": {
|
|
1218
1235
|
"array": [
|
|
1219
1236
|
"u8",
|
|
1220
|
-
|
|
1237
|
+
8
|
|
1221
1238
|
];
|
|
1222
1239
|
};
|
|
1223
1240
|
}
|
|
@@ -1369,6 +1386,13 @@ type StreamflowAlignedUnlocks = {
|
|
|
1369
1386
|
"Percentage to set when contract expires, won't be updated after it"
|
|
1370
1387
|
];
|
|
1371
1388
|
"type": "u64";
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
"name": "floorPrice";
|
|
1392
|
+
"docs": [
|
|
1393
|
+
"Floor price boundary, if the price is below this boundary, the contract will be unlocked"
|
|
1394
|
+
];
|
|
1395
|
+
"type": "u64";
|
|
1372
1396
|
}
|
|
1373
1397
|
];
|
|
1374
1398
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Z as Account, a3 as AlignedContract, M as AlignedUnlocksContract, a6 as BatchItem, a8 as BatchItemError, a9 as BatchItemResult, a7 as BatchItemSuccess, U as ChangeOracleParams, y as ClientCreationOptions, a2 as Contract, R as CreateParams, V as CreateTestOracleParams, a4 as DecodedStream, $ as ICreateSolanaExt, a1 as ICreateStreamInstructions, I as ICreateStreamSolanaExt, a as IInteractStreamSolanaExt, Y as ISearchStreams, b as ITopUpStreamSolanaExt, a0 as ITransactionSolanaExtWithInstructions, aa as InstructionGenerator, a5 as MetadataRecipientHashMap, N as OracleType, S as SolanaStreamClient, Q as TestOracle, X as UpdateTestOracleParams, af as cancelStreamInstruction, x as constants, ab as createStreamInstruction, ac as createUncheckedStreamInstruction, z as decodeStream, J as deriveContractPDA, K as deriveEscrowPDA, L as deriveTestOraclePDA, H as extractSolanaErrorCode, G as sendAndConfirmStreamRawTransaction, B as signAllTransactionWithRecipients, _ as timelockIDL, ah as topupStreamInstruction, ag as transferStreamInstruction, ae as updateStreamInstruction, ad as withdrawStreamInstruction } from '../index-
|
|
1
|
+
export { Z as Account, a3 as AlignedContract, M as AlignedUnlocksContract, a6 as BatchItem, a8 as BatchItemError, a9 as BatchItemResult, a7 as BatchItemSuccess, U as ChangeOracleParams, y as ClientCreationOptions, a2 as Contract, R as CreateParams, V as CreateTestOracleParams, a4 as DecodedStream, $ as ICreateSolanaExt, a1 as ICreateStreamInstructions, I as ICreateStreamSolanaExt, a as IInteractStreamSolanaExt, Y as ISearchStreams, b as ITopUpStreamSolanaExt, a0 as ITransactionSolanaExtWithInstructions, aa as InstructionGenerator, a5 as MetadataRecipientHashMap, N as OracleType, S as SolanaStreamClient, Q as TestOracle, X as UpdateTestOracleParams, af as cancelStreamInstruction, x as constants, ab as createStreamInstruction, ac as createUncheckedStreamInstruction, z as decodeStream, J as deriveContractPDA, K as deriveEscrowPDA, L as deriveTestOraclePDA, H as extractSolanaErrorCode, G as sendAndConfirmStreamRawTransaction, B as signAllTransactionWithRecipients, _ as timelockIDL, ah as topupStreamInstruction, ag as transferStreamInstruction, ae as updateStreamInstruction, ad as withdrawStreamInstruction } from '../index-DKkJbavt.js';
|
|
2
2
|
export { ContractError, IChain, ICluster } from '@streamflow/common';
|
|
3
3
|
import 'p-queue';
|
|
4
4
|
import '@solana/web3.js';
|
|
@@ -6,7 +6,7 @@ import '@streamflow/common/solana';
|
|
|
6
6
|
import '@coral-xyz/anchor';
|
|
7
7
|
import '@solana/wallet-adapter-base';
|
|
8
8
|
import 'bn.js';
|
|
9
|
-
import '../BaseStreamClient-
|
|
9
|
+
import '../BaseStreamClient-DOyJqO7R.js';
|
|
10
10
|
import 'ethers';
|
|
11
11
|
import 'aptos';
|
|
12
12
|
import '@mysten/sui/cryptography';
|
package/dist/esm/solana/index.js
CHANGED
|
@@ -274,6 +274,7 @@ var AlignedContract = class extends Contract {
|
|
|
274
274
|
this.initialNetAmount = alignedProxy.initialNetAmount;
|
|
275
275
|
this.expiryTime = alignedProxy.expiryTime.toNumber();
|
|
276
276
|
this.expiryPercentage = getNumberFromBN(alignedProxy.expiryPercentage, ALIGNED_PRECISION_FACTOR_POW);
|
|
277
|
+
this.floorPrice = getNumberFromBN(alignedProxy.floorPrice, ALIGNED_PRECISION_FACTOR_POW);
|
|
277
278
|
this.type = buildStreamType(this);
|
|
278
279
|
this.isAligned = true;
|
|
279
280
|
}
|
|
@@ -873,7 +874,7 @@ var streamflow_aligned_unlocks_default = {
|
|
|
873
874
|
address: "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH",
|
|
874
875
|
metadata: {
|
|
875
876
|
name: "streamflow_aligned_unlocks",
|
|
876
|
-
version: "1.
|
|
877
|
+
version: "1.3.0",
|
|
877
878
|
spec: "0.1.0",
|
|
878
879
|
description: "Proxy to update unlock amount within Streamflow vesting protocol according to Token performance and other metrics"
|
|
879
880
|
},
|
|
@@ -1885,6 +1886,16 @@ var streamflow_aligned_unlocks_default = {
|
|
|
1885
1886
|
code: 6014,
|
|
1886
1887
|
name: "DynamicScheduleExpired",
|
|
1887
1888
|
msg: "Dynamic schedule expired, updates are not allowed"
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
code: 6015,
|
|
1892
|
+
name: "FloorPriceReached",
|
|
1893
|
+
msg: "Floor price has already been reached, updates are not allowed"
|
|
1894
|
+
},
|
|
1895
|
+
{
|
|
1896
|
+
code: 6016,
|
|
1897
|
+
name: "InvalidFloorPrice",
|
|
1898
|
+
msg: "Provided floor price is invalid, should be less than minimum price"
|
|
1888
1899
|
}
|
|
1889
1900
|
],
|
|
1890
1901
|
types: [
|
|
@@ -2074,6 +2085,13 @@ var streamflow_aligned_unlocks_default = {
|
|
|
2074
2085
|
],
|
|
2075
2086
|
type: "u64"
|
|
2076
2087
|
},
|
|
2088
|
+
{
|
|
2089
|
+
name: "floor_price",
|
|
2090
|
+
docs: [
|
|
2091
|
+
"Floor price boundary, if the price is below this boundary, the contract will be unlocked"
|
|
2092
|
+
],
|
|
2093
|
+
type: "u64"
|
|
2094
|
+
},
|
|
2077
2095
|
{
|
|
2078
2096
|
name: "buffer",
|
|
2079
2097
|
docs: [
|
|
@@ -2082,7 +2100,7 @@ var streamflow_aligned_unlocks_default = {
|
|
|
2082
2100
|
type: {
|
|
2083
2101
|
array: [
|
|
2084
2102
|
"u8",
|
|
2085
|
-
|
|
2103
|
+
8
|
|
2086
2104
|
]
|
|
2087
2105
|
}
|
|
2088
2106
|
}
|
|
@@ -2234,6 +2252,13 @@ var streamflow_aligned_unlocks_default = {
|
|
|
2234
2252
|
"Percentage to set when contract expires, won't be updated after it"
|
|
2235
2253
|
],
|
|
2236
2254
|
type: "u64"
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
name: "floor_price",
|
|
2258
|
+
docs: [
|
|
2259
|
+
"Floor price boundary, if the price is below this boundary, the contract will be unlocked"
|
|
2260
|
+
],
|
|
2261
|
+
type: "u64"
|
|
2237
2262
|
}
|
|
2238
2263
|
]
|
|
2239
2264
|
}
|
|
@@ -2479,7 +2504,8 @@ var SolanaStreamClient = class extends BaseStreamClient {
|
|
|
2479
2504
|
oracleType,
|
|
2480
2505
|
tokenProgramId: streamTokenProgramId,
|
|
2481
2506
|
expiryTime,
|
|
2482
|
-
expiryPercentage
|
|
2507
|
+
expiryPercentage,
|
|
2508
|
+
floorPrice
|
|
2483
2509
|
} = streamParams;
|
|
2484
2510
|
const { isNative, sender, computeLimit, computePrice, metadataPubKeys } = extParams;
|
|
2485
2511
|
if (!sender.publicKey) {
|
|
@@ -2526,14 +2552,15 @@ var SolanaStreamClient = class extends BaseStreamClient {
|
|
|
2526
2552
|
canTopup,
|
|
2527
2553
|
oracleType: !!oracleType ? { [oracleType]: {} } : { none: {} },
|
|
2528
2554
|
streamName: streamNameArray,
|
|
2529
|
-
minPrice: minPrice
|
|
2530
|
-
maxPrice: maxPrice
|
|
2531
|
-
minPercentage: minPercentage
|
|
2532
|
-
maxPercentage: maxPercentage
|
|
2555
|
+
minPrice: typeof minPrice === "number" ? getBN(minPrice, ALIGNED_PRECISION_FACTOR_POW) : minPrice,
|
|
2556
|
+
maxPrice: typeof maxPrice === "number" ? getBN(maxPrice, ALIGNED_PRECISION_FACTOR_POW) : maxPrice,
|
|
2557
|
+
minPercentage: typeof minPercentage === "number" ? getBN(minPercentage, ALIGNED_PRECISION_FACTOR_POW) : minPercentage,
|
|
2558
|
+
maxPercentage: typeof maxPercentage === "number" ? getBN(maxPercentage, ALIGNED_PRECISION_FACTOR_POW) : maxPercentage,
|
|
2533
2559
|
tickSize: new BN4(tickSize || 1),
|
|
2534
2560
|
skipInitial: skipInitial ?? false,
|
|
2535
2561
|
expiryTime: new BN4(expiryTime ?? 0),
|
|
2536
|
-
expiryPercentage: expiryPercentage
|
|
2562
|
+
expiryPercentage: typeof expiryPercentage === "number" ? getBN(expiryPercentage, ALIGNED_PRECISION_FACTOR_POW) : expiryPercentage ?? new BN4(0),
|
|
2563
|
+
floorPrice: typeof floorPrice === "number" ? getBN(floorPrice, ALIGNED_PRECISION_FACTOR_POW) : floorPrice ?? new BN4(0)
|
|
2537
2564
|
}).accountsPartial({
|
|
2538
2565
|
payer: sender.publicKey,
|
|
2539
2566
|
sender: sender.publicKey,
|