@streamflow/stream 8.3.1 → 8.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.
- 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
|
@@ -207,6 +207,7 @@ type IAlignedStreamConfig = {
|
|
|
207
207
|
tickSize?: number;
|
|
208
208
|
expiryTime?: number;
|
|
209
209
|
expiryPercentage?: number | BN;
|
|
210
|
+
floorPrice?: number | BN;
|
|
210
211
|
};
|
|
211
212
|
type ICreateLinearStreamData = IBaseStreamConfig & IRecipient;
|
|
212
213
|
type ICreateAlignedStreamData = ICreateLinearStreamData & IAlignedStreamConfig;
|
|
@@ -382,6 +383,7 @@ type AlignedStreamData = {
|
|
|
382
383
|
initialNetAmount: BN;
|
|
383
384
|
expiryTime: number;
|
|
384
385
|
expiryPercentage: number;
|
|
386
|
+
floorPrice: number;
|
|
385
387
|
};
|
|
386
388
|
type AlignedStream = LinearStream & AlignedStreamData;
|
|
387
389
|
type Stream = LinearStream | AlignedStream;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AptosStreamClient, C as ConfigResource, b as Contract, F as FeeTableResource, I as ICreateStreamAptosExt, a as ITransactionAptosExt, S as StreamResource, c as constants, A as default, e as extractAptosErrorCode, n as normalizeAptosAddress } from '../index-
|
|
2
|
-
import '../BaseStreamClient-
|
|
1
|
+
export { A as AptosStreamClient, C as ConfigResource, b as Contract, F as FeeTableResource, I as ICreateStreamAptosExt, a as ITransactionAptosExt, S as StreamResource, c as constants, A as default, e as extractAptosErrorCode, n as normalizeAptosAddress } from '../index-DYIamO0j.cjs';
|
|
2
|
+
import '../BaseStreamClient-DOyJqO7R.cjs';
|
|
3
3
|
import '@coral-xyz/anchor';
|
|
4
4
|
import '@solana/web3.js';
|
|
5
5
|
import '@streamflow/common';
|
package/dist/cjs/evm/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { a as EvmContract, E as EvmStreamClient, F as FeesAbiResult, S as StreamAbiResult, c as constants, E as default, _ as ercAbi, e as extractEvmErrorCode } from '../index-
|
|
1
|
+
export { a as EvmContract, E as EvmStreamClient, F as FeesAbiResult, S as StreamAbiResult, c as constants, E as default, _ as ercAbi, e as extractEvmErrorCode } from '../index-BMZATAYa.cjs';
|
|
2
2
|
import 'ethers';
|
|
3
3
|
import 'bn.js';
|
|
4
|
-
import '../BaseStreamClient-
|
|
4
|
+
import '../BaseStreamClient-DOyJqO7R.cjs';
|
|
5
5
|
import '@coral-xyz/anchor';
|
|
6
6
|
import '@solana/web3.js';
|
|
7
7
|
import '@streamflow/common';
|
|
@@ -4,7 +4,7 @@ import { ITransactionSolanaExt, IProgramAccount, ConfirmationParams, ThrottlePar
|
|
|
4
4
|
import { IdlAccounts, IdlTypes, Program } from '@coral-xyz/anchor';
|
|
5
5
|
import { SignerWalletAdapter } from '@solana/wallet-adapter-base';
|
|
6
6
|
import BN from 'bn.js';
|
|
7
|
-
import { L as LinearStream, b as StreamType, A as AlignedStream, O as OracleTypeName, u as IRecipient, c as SolanaStreamClientOptions, B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, a as ICreateAlignedStreamData, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, S as Stream, q as IGetAllData, r as IUpdateData, s as IGetFeesData, t as IFees } from './BaseStreamClient-
|
|
7
|
+
import { L as LinearStream, b as StreamType, A as AlignedStream, O as OracleTypeName, u as IRecipient, c as SolanaStreamClientOptions, B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, a as ICreateAlignedStreamData, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, S as Stream, q as IGetAllData, r as IUpdateData, s as IGetFeesData, t as IFees } from './BaseStreamClient-DOyJqO7R.cjs';
|
|
8
8
|
import { StreamflowAlignedUnlocks } from './solana/descriptor/streamflow_aligned_unlocks.cjs';
|
|
9
9
|
import { ICluster, ContractError, IChain } from '@streamflow/common';
|
|
10
10
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
@@ -119,6 +119,7 @@ declare class AlignedContract extends Contract implements AlignedStream {
|
|
|
119
119
|
initialNetAmount: BN;
|
|
120
120
|
expiryTime: number;
|
|
121
121
|
expiryPercentage: number;
|
|
122
|
+
floorPrice: number;
|
|
122
123
|
constructor(stream: DecodedStream, alignedProxy: AlignedUnlocksContract);
|
|
123
124
|
}
|
|
124
125
|
interface DecodedStream {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ethers, BigNumber } from 'ethers';
|
|
2
2
|
import BN from 'bn.js';
|
|
3
|
-
import { B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, r as IUpdateData, p as IGetOneData, S as Stream, q as IGetAllData, s as IGetFeesData, t as IFees, L as LinearStream, b as StreamType, G as ContractErrorCode } from './BaseStreamClient-
|
|
3
|
+
import { B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, r as IUpdateData, p as IGetOneData, S as Stream, q as IGetAllData, s as IGetFeesData, t as IFees, L as LinearStream, b as StreamType, G as ContractErrorCode } from './BaseStreamClient-DOyJqO7R.cjs';
|
|
4
4
|
import { IChain, ICluster } from '@streamflow/common';
|
|
5
5
|
|
|
6
6
|
declare class EvmStreamClient extends BaseStreamClient {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as LinearStream, b as StreamType, B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, r as IUpdateData, s as IGetFeesData, t as IFees } from './BaseStreamClient-
|
|
1
|
+
import { L as LinearStream, b as StreamType, B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, r as IUpdateData, s as IGetFeesData, t as IFees } from './BaseStreamClient-DOyJqO7R.cjs';
|
|
2
2
|
import { WalletContextState } from '@manahippo/aptos-wallet-adapter';
|
|
3
3
|
import BN from 'bn.js';
|
|
4
4
|
import { AptosAccount } from 'aptos';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BaseStreamClient, N as ISuiIdParameters, I as ICreateStreamData, f as ICreateStreamSuiExt, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, k as ITransactionSuiExt, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, P as Contract, r as IUpdateData, s as IGetFeesData, t as IFees, Q as SuiErrorInfo, R as ClassResource, T as FeeTableResource, U as FeeValueResource, V as IContractCreated, W as IContractWithdrawn, X as StreamResource, Y as SuiParsedError, Z as SuiSignAndExecuteTransactionBlockInput } from './BaseStreamClient-
|
|
1
|
+
import { B as BaseStreamClient, N as ISuiIdParameters, I as ICreateStreamData, f as ICreateStreamSuiExt, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, k as ITransactionSuiExt, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, P as Contract, r as IUpdateData, s as IGetFeesData, t as IFees, Q as SuiErrorInfo, R as ClassResource, T as FeeTableResource, U as FeeValueResource, V as IContractCreated, W as IContractWithdrawn, X as StreamResource, Y as SuiParsedError, Z as SuiSignAndExecuteTransactionBlockInput } from './BaseStreamClient-DOyJqO7R.cjs';
|
|
2
2
|
import { ICluster } from '@streamflow/common';
|
|
3
3
|
import { SuiClient, GetTransactionBlockParams, SuiTransactionBlockResponse } from '@mysten/sui/client';
|
|
4
4
|
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -2916,6 +2916,7 @@ var AlignedContract = class extends Contract2 {
|
|
|
2916
2916
|
this.initialNetAmount = alignedProxy.initialNetAmount;
|
|
2917
2917
|
this.expiryTime = alignedProxy.expiryTime.toNumber();
|
|
2918
2918
|
this.expiryPercentage = getNumberFromBN(alignedProxy.expiryPercentage, ALIGNED_PRECISION_FACTOR_POW);
|
|
2919
|
+
this.floorPrice = getNumberFromBN(alignedProxy.floorPrice, ALIGNED_PRECISION_FACTOR_POW);
|
|
2919
2920
|
this.type = buildStreamType(this);
|
|
2920
2921
|
this.isAligned = true;
|
|
2921
2922
|
}
|
|
@@ -3493,7 +3494,7 @@ var streamflow_aligned_unlocks_default = {
|
|
|
3493
3494
|
address: "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH",
|
|
3494
3495
|
metadata: {
|
|
3495
3496
|
name: "streamflow_aligned_unlocks",
|
|
3496
|
-
version: "1.
|
|
3497
|
+
version: "1.3.0",
|
|
3497
3498
|
spec: "0.1.0",
|
|
3498
3499
|
description: "Proxy to update unlock amount within Streamflow vesting protocol according to Token performance and other metrics"
|
|
3499
3500
|
},
|
|
@@ -4505,6 +4506,16 @@ var streamflow_aligned_unlocks_default = {
|
|
|
4505
4506
|
code: 6014,
|
|
4506
4507
|
name: "DynamicScheduleExpired",
|
|
4507
4508
|
msg: "Dynamic schedule expired, updates are not allowed"
|
|
4509
|
+
},
|
|
4510
|
+
{
|
|
4511
|
+
code: 6015,
|
|
4512
|
+
name: "FloorPriceReached",
|
|
4513
|
+
msg: "Floor price has already been reached, updates are not allowed"
|
|
4514
|
+
},
|
|
4515
|
+
{
|
|
4516
|
+
code: 6016,
|
|
4517
|
+
name: "InvalidFloorPrice",
|
|
4518
|
+
msg: "Provided floor price is invalid, should be less than minimum price"
|
|
4508
4519
|
}
|
|
4509
4520
|
],
|
|
4510
4521
|
types: [
|
|
@@ -4694,6 +4705,13 @@ var streamflow_aligned_unlocks_default = {
|
|
|
4694
4705
|
],
|
|
4695
4706
|
type: "u64"
|
|
4696
4707
|
},
|
|
4708
|
+
{
|
|
4709
|
+
name: "floor_price",
|
|
4710
|
+
docs: [
|
|
4711
|
+
"Floor price boundary, if the price is below this boundary, the contract will be unlocked"
|
|
4712
|
+
],
|
|
4713
|
+
type: "u64"
|
|
4714
|
+
},
|
|
4697
4715
|
{
|
|
4698
4716
|
name: "buffer",
|
|
4699
4717
|
docs: [
|
|
@@ -4702,7 +4720,7 @@ var streamflow_aligned_unlocks_default = {
|
|
|
4702
4720
|
type: {
|
|
4703
4721
|
array: [
|
|
4704
4722
|
"u8",
|
|
4705
|
-
|
|
4723
|
+
8
|
|
4706
4724
|
]
|
|
4707
4725
|
}
|
|
4708
4726
|
}
|
|
@@ -4854,6 +4872,13 @@ var streamflow_aligned_unlocks_default = {
|
|
|
4854
4872
|
"Percentage to set when contract expires, won't be updated after it"
|
|
4855
4873
|
],
|
|
4856
4874
|
type: "u64"
|
|
4875
|
+
},
|
|
4876
|
+
{
|
|
4877
|
+
name: "floor_price",
|
|
4878
|
+
docs: [
|
|
4879
|
+
"Floor price boundary, if the price is below this boundary, the contract will be unlocked"
|
|
4880
|
+
],
|
|
4881
|
+
type: "u64"
|
|
4857
4882
|
}
|
|
4858
4883
|
]
|
|
4859
4884
|
}
|
|
@@ -5099,7 +5124,8 @@ var SolanaStreamClient = class extends BaseStreamClient {
|
|
|
5099
5124
|
oracleType,
|
|
5100
5125
|
tokenProgramId: streamTokenProgramId,
|
|
5101
5126
|
expiryTime,
|
|
5102
|
-
expiryPercentage
|
|
5127
|
+
expiryPercentage,
|
|
5128
|
+
floorPrice
|
|
5103
5129
|
} = streamParams;
|
|
5104
5130
|
const { isNative, sender, computeLimit, computePrice, metadataPubKeys } = extParams;
|
|
5105
5131
|
if (!sender.publicKey) {
|
|
@@ -5146,14 +5172,15 @@ var SolanaStreamClient = class extends BaseStreamClient {
|
|
|
5146
5172
|
canTopup,
|
|
5147
5173
|
oracleType: !!oracleType ? { [oracleType]: {} } : { none: {} },
|
|
5148
5174
|
streamName: streamNameArray,
|
|
5149
|
-
minPrice: minPrice
|
|
5150
|
-
maxPrice: maxPrice
|
|
5151
|
-
minPercentage: minPercentage
|
|
5152
|
-
maxPercentage: maxPercentage
|
|
5175
|
+
minPrice: typeof minPrice === "number" ? common.getBN(minPrice, ALIGNED_PRECISION_FACTOR_POW) : minPrice,
|
|
5176
|
+
maxPrice: typeof maxPrice === "number" ? common.getBN(maxPrice, ALIGNED_PRECISION_FACTOR_POW) : maxPrice,
|
|
5177
|
+
minPercentage: typeof minPercentage === "number" ? common.getBN(minPercentage, ALIGNED_PRECISION_FACTOR_POW) : minPercentage,
|
|
5178
|
+
maxPercentage: typeof maxPercentage === "number" ? common.getBN(maxPercentage, ALIGNED_PRECISION_FACTOR_POW) : maxPercentage,
|
|
5153
5179
|
tickSize: new BN7__default.default(tickSize || 1),
|
|
5154
5180
|
skipInitial: skipInitial ?? false,
|
|
5155
5181
|
expiryTime: new BN7__default.default(expiryTime ?? 0),
|
|
5156
|
-
expiryPercentage: expiryPercentage
|
|
5182
|
+
expiryPercentage: typeof expiryPercentage === "number" ? common.getBN(expiryPercentage, ALIGNED_PRECISION_FACTOR_POW) : expiryPercentage ?? new BN7__default.default(0),
|
|
5183
|
+
floorPrice: typeof floorPrice === "number" ? common.getBN(floorPrice, ALIGNED_PRECISION_FACTOR_POW) : floorPrice ?? new BN7__default.default(0)
|
|
5157
5184
|
}).accountsPartial({
|
|
5158
5185
|
payer: sender.publicKey,
|
|
5159
5186
|
sender: sender.publicKey,
|