@streamflow/stream 9.0.1 → 10.0.0-alpha.p311.10f340e
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/README.md +2 -2
- package/dist/cjs/{BaseStreamClient-DOyJqO7R.d.cts → BaseStreamClient-Dvs8yWEE.d.cts} +0 -1
- package/dist/cjs/aptos/index.cjs +1 -7
- package/dist/cjs/aptos/index.cjs.map +1 -1
- package/dist/cjs/aptos/index.d.cts +2 -2
- package/dist/cjs/evm/index.cjs +1 -7
- package/dist/cjs/evm/index.cjs.map +1 -1
- package/dist/cjs/evm/index.d.cts +2 -2
- package/dist/cjs/{index-oCYfzJrc.d.cts → index-BHKWsVnx.d.cts} +1 -1
- package/dist/cjs/{index-DYIamO0j.d.cts → index-CGNg22mO.d.cts} +1 -1
- package/dist/cjs/{index-BMZATAYa.d.cts → index-Dk1hKzM3.d.cts} +1 -1
- package/dist/cjs/{index-Y0HH2ugY.d.cts → index-dSxy_PVV.d.cts} +1 -1
- package/dist/cjs/index.cjs +3 -11
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +11 -15
- package/dist/cjs/solana/index.cjs +2 -8
- package/dist/cjs/solana/index.cjs.map +1 -1
- package/dist/cjs/solana/index.d.cts +2 -2
- package/dist/cjs/sui/index.cjs +1 -7
- package/dist/cjs/sui/index.cjs.map +1 -1
- package/dist/cjs/sui/index.d.cts +2 -2
- package/dist/esm/{BaseStreamClient-DOyJqO7R.d.ts → BaseStreamClient-Dvs8yWEE.d.ts} +0 -1
- package/dist/esm/aptos/index.d.ts +2 -2
- package/dist/esm/aptos/index.js +1 -7
- package/dist/esm/aptos/index.js.map +1 -1
- package/dist/esm/evm/index.d.ts +2 -2
- package/dist/esm/evm/index.js +1 -7
- package/dist/esm/evm/index.js.map +1 -1
- package/dist/esm/{index-D54wSYym.d.ts → index-CRXW7eZy.d.ts} +1 -1
- package/dist/esm/{index-BNQVJtIE.d.ts → index-CgDmuCzv.d.ts} +1 -1
- package/dist/esm/{index-DrzqsoIB.d.ts → index-DED7TgAo.d.ts} +1 -1
- package/dist/esm/{index-elpYUBph.d.ts → index-li6QZ_tF.d.ts} +1 -1
- package/dist/esm/index.d.ts +11 -15
- package/dist/esm/index.js +4 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/index.d.ts +2 -2
- package/dist/esm/solana/index.js +2 -8
- package/dist/esm/solana/index.js.map +1 -1
- package/dist/esm/sui/index.d.ts +2 -2
- package/dist/esm/sui/index.js +1 -7
- package/dist/esm/sui/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Z as Account, a5 as AlignedContract, M as AlignedUnlocksContract, a8 as BatchItem, aa as BatchItemError, ab as BatchItemResult, a9 as BatchItemSuccess, U as ChangeOracleParams, y as ClientCreationOptions, a4 as Contract, R as CreateParams, V as CreateTestOracleParams, a6 as DecodedStream, $ as ICreateSolanaExt, a3 as ICreateStreamInstructions, I as ICreateStreamSolanaExt, a as IInteractStreamSolanaExt, a1 as IPrepareCreateStreamSolanaExt, a2 as IPrepareStreamSolanaExt, Y as ISearchStreams, b as ITopUpStreamSolanaExt, a0 as ITransactionSolanaExtWithInstructions, ac as InstructionGenerator, a7 as MetadataRecipientHashMap, N as OracleType, S as SolanaStreamClient, Q as TestOracle, X as UpdateTestOracleParams, ah as cancelStreamInstruction, x as constants, ad as createStreamInstruction, ae 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, aj as topupStreamInstruction, ai as transferStreamInstruction, ag as updateStreamInstruction, af as withdrawStreamInstruction } from '../index-
|
|
1
|
+
export { Z as Account, a5 as AlignedContract, M as AlignedUnlocksContract, a8 as BatchItem, aa as BatchItemError, ab as BatchItemResult, a9 as BatchItemSuccess, U as ChangeOracleParams, y as ClientCreationOptions, a4 as Contract, R as CreateParams, V as CreateTestOracleParams, a6 as DecodedStream, $ as ICreateSolanaExt, a3 as ICreateStreamInstructions, I as ICreateStreamSolanaExt, a as IInteractStreamSolanaExt, a1 as IPrepareCreateStreamSolanaExt, a2 as IPrepareStreamSolanaExt, Y as ISearchStreams, b as ITopUpStreamSolanaExt, a0 as ITransactionSolanaExtWithInstructions, ac as InstructionGenerator, a7 as MetadataRecipientHashMap, N as OracleType, S as SolanaStreamClient, Q as TestOracle, X as UpdateTestOracleParams, ah as cancelStreamInstruction, x as constants, ad as createStreamInstruction, ae 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, aj as topupStreamInstruction, ai as transferStreamInstruction, ag as updateStreamInstruction, af as withdrawStreamInstruction } from '../index-CgDmuCzv.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-Dvs8yWEE.js';
|
|
10
10
|
import 'ethers';
|
|
11
11
|
import 'aptos';
|
|
12
12
|
import '@mysten/sui/cryptography';
|
package/dist/esm/solana/index.js
CHANGED
|
@@ -41,9 +41,6 @@ var calculateUnlockedAmount = ({
|
|
|
41
41
|
var isCliffCloseToDepositedAmount = (streamData) => {
|
|
42
42
|
return streamData.cliffAmount.gte(streamData.depositedAmount.sub(new BN4(1)));
|
|
43
43
|
};
|
|
44
|
-
var isVesting = (streamData) => {
|
|
45
|
-
return !streamData.canTopup && !isCliffCloseToDepositedAmount(streamData) && !isDynamicLock(streamData.minPrice, streamData.maxPrice, streamData.minPercentage, streamData.maxPercentage);
|
|
46
|
-
};
|
|
47
44
|
var isCreateAlignedStreamData = (obj) => {
|
|
48
45
|
return "minPrice" in obj && "maxPrice" in obj && "minPercentage" in obj && "maxPercentage" in obj;
|
|
49
46
|
};
|
|
@@ -54,13 +51,10 @@ var isTokenLock = (streamData) => {
|
|
|
54
51
|
return !streamData.canTopup && !streamData.automaticWithdrawal && !streamData.cancelableBySender && !streamData.cancelableByRecipient && !streamData.transferableBySender && (isCliffCloseToDepositedAmount(streamData) || isDynamicLock(streamData.minPrice, streamData.maxPrice, streamData.minPercentage, streamData.maxPercentage));
|
|
55
52
|
};
|
|
56
53
|
var buildStreamType = (streamData) => {
|
|
57
|
-
if (isVesting(streamData)) {
|
|
58
|
-
return "vesting" /* Vesting */;
|
|
59
|
-
}
|
|
60
54
|
if (isTokenLock(streamData)) {
|
|
61
55
|
return "lock" /* Lock */;
|
|
62
56
|
}
|
|
63
|
-
return "
|
|
57
|
+
return "vesting" /* Vesting */;
|
|
64
58
|
};
|
|
65
59
|
var decodeEndTime = (endTime) => {
|
|
66
60
|
if (endTime.gt(new BN4(MAX_SAFE_UNIX_TIME_VALUE))) {
|
|
@@ -2565,7 +2559,7 @@ var SolanaStreamClient = class extends BaseStreamClient {
|
|
|
2565
2559
|
floorPrice
|
|
2566
2560
|
} = streamParams;
|
|
2567
2561
|
const { isNative, sender, computeLimit, computePrice, metadataPubKeys } = extParams;
|
|
2568
|
-
invariant(
|
|
2562
|
+
invariant(priceOracle || !oracleType || oracleType === "none", "Price oracle is required for the specified oracle type");
|
|
2569
2563
|
assertHasPublicKey(sender, "Sender's PublicKey is not available, check passed wallet adapter!");
|
|
2570
2564
|
const recipientPublicKey = new PublicKey(recipient);
|
|
2571
2565
|
const mintPublicKey = isNative ? NATIVE_MINT : new PublicKey(mint);
|