@streamflow/stream 13.3.1 → 13.5.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/{index-B2NHAfM3.d.cts → index-BLL6w66C.d.cts} +11 -1
- package/dist/cjs/index.cjs +125 -35
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +2 -2
- package/dist/cjs/solana/api/index.cjs +122 -35
- package/dist/cjs/solana/api/index.cjs.map +1 -1
- package/dist/cjs/solana/api/index.d.cts +1 -1
- package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.d.cts +11 -0
- package/dist/cjs/solana/index.cjs +125 -35
- package/dist/cjs/solana/index.cjs.map +1 -1
- package/dist/cjs/solana/index.d.cts +22 -3
- package/dist/esm/{index-aMPWxsk6.d.ts → index-FDwxtRYV.d.ts} +11 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +197 -110
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/api/index.d.ts +1 -1
- package/dist/esm/solana/api/index.js +196 -109
- package/dist/esm/solana/api/index.js.map +1 -1
- package/dist/esm/solana/descriptor/idl/streamflow_aligned_unlocks.json +12 -1
- package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.d.ts +11 -0
- package/dist/esm/solana/index.d.ts +22 -3
- package/dist/esm/solana/index.js +197 -110
- package/dist/esm/solana/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1965,6 +1965,17 @@
|
|
|
1965
1965
|
"type": {
|
|
1966
1966
|
"option": "bool"
|
|
1967
1967
|
}
|
|
1968
|
+
},
|
|
1969
|
+
{
|
|
1970
|
+
"name": "stream_name",
|
|
1971
|
+
"type": {
|
|
1972
|
+
"option": {
|
|
1973
|
+
"array": [
|
|
1974
|
+
"u8",
|
|
1975
|
+
64
|
|
1976
|
+
]
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1968
1979
|
}
|
|
1969
1980
|
]
|
|
1970
1981
|
}
|
|
@@ -1994,4 +2005,4 @@
|
|
|
1994
2005
|
}
|
|
1995
2006
|
}
|
|
1996
2007
|
]
|
|
1997
|
-
}
|
|
2008
|
+
}
|
|
@@ -1971,6 +1971,17 @@ type StreamflowAlignedUnlocks = {
|
|
|
1971
1971
|
"type": {
|
|
1972
1972
|
"option": "bool";
|
|
1973
1973
|
};
|
|
1974
|
+
},
|
|
1975
|
+
{
|
|
1976
|
+
"name": "streamName";
|
|
1977
|
+
"type": {
|
|
1978
|
+
"option": {
|
|
1979
|
+
"array": [
|
|
1980
|
+
"u8",
|
|
1981
|
+
64
|
|
1982
|
+
];
|
|
1983
|
+
};
|
|
1984
|
+
};
|
|
1974
1985
|
}
|
|
1975
1986
|
];
|
|
1976
1987
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DecodedStream, B as BatchItem, a as BatchItemResult, R as RoutedFeeDestination, I as IUpdateData, S as StreamType, b as Stream, A as AlignedStream, c as ICreateStreamData, d as ICreateAlignedStreamData, e as ISearchStreams } from '../index-
|
|
2
|
-
export {
|
|
1
|
+
import { D as DecodedStream, B as BatchItem, a as BatchItemResult, R as RoutedFeeDestination, I as IUpdateData, S as StreamType, b as Stream, A as AlignedStream, c as ICreateStreamData, d as ICreateAlignedStreamData, e as ICreateLinearStreamData, f as ISearchStreams } from '../index-FDwxtRYV.js';
|
|
2
|
+
export { g as Account, h as AlignedContract, i as AlignedProxyErrorCode, j as AlignedStreamData, k as AlignedUnlocksContract, l as BatchCreationItem, m as BatchExecuteResult, n as BatchInstructionResult, o as BatchItemError, p as BatchItemSuccess, q as BuildTransactionFn, r as BuildTransactionOptions, s as BuiltTransaction, C as CancelFn, t as ChangeOracleParams, u as ClientCreationOptions, v as Contract, w as ContractErrorCode, x as CreateBatchFn, y as CreateFn, z as CreateInstructionResult, E as CreateParams, F as CreateTestOracleParams, G as Env, H as ExecuteBatchFn, J as ExecuteBatchSequentialFn, K as ExecuteFn, L as ExecutionEnv, M as IAlignedStreamConfig, N as IBaseStreamConfig, O as ICancelData, P as IClaimRoutedFeeData, Q as ICreateExt, T as ICreateLockBatchParams, U as ICreateLockParams, V as ICreateMultiError, W as ICreateMultipleAlignedStreamData, X as ICreateMultipleLinearStreamData, Y as ICreateMultipleStreamData, Z as ICreateResult, _ as ICreateStreamExt, $ as ICreateStreamInstructions, a0 as ICreateVestingBatchParams, a1 as ICreateVestingParams, a2 as IFees, a3 as IGetAllData, a4 as IGetFeesData, a5 as IGetOneData, a6 as IInteractData, a7 as IInteractStreamExt, a8 as ILockBatchRecipient, a9 as IMultiTransactionResult, aa as IPrepareCreateStreamExt, ab as IPrepareStreamExt, ac as IPrepareTopUpstreamExt, ad as IRecipient, ae as ITopUpData, af as ITopUpStreamExt, ag as ITransactionExtWithInstructions, ah as ITransactionResult, ai as ITransferData, aj as IVestingBatchRecipient, ak as IWithdrawData, al as InstructionGenerator, am as InstructionResult, an as Invoker, ao as LinearStream, ap as MetadataRecipientHashMap, aq as NativeOptions, ar as OracleType, as as OracleTypeName, at as SignFn, au as SolanaStreamClient, av as StreamClientOptions, aw as StreamClientOptionsWithConnection, ax as StreamDirection, ay as TestOracle, az as TopupFn, aA as TransactionSchedulingOptions, aB as TransferFn, aC as UpdateFn, aD as UpdateTestOracleParams, aE as WithdrawFn, aF as buildLockBatchParams, aG as buildLockParams, aH as buildTransaction, aI as buildVestingBatchParams, aJ as buildVestingParams, aK as cancel, aL as computeAmountPerPeriod, aM as create, aN as createBatch, aO as createClientFromEnv, aP as createLock, aQ as createLockBatch, aR as createVesting, aS as createVestingBatch, aT as execute, aU as executeBatch, aV as executeBatchSequential, aW as resolveConnection, aX as resolveDuration, aY as sign, aZ as topup, a_ as transfer, a$ as update, b0 as withdraw } from '../index-FDwxtRYV.js';
|
|
3
3
|
import { ConfirmationParams, ThrottleParams } from '@streamflow/common';
|
|
4
4
|
export { ContractError, ICluster, getBN, getNumberFromBN } from '@streamflow/common';
|
|
5
5
|
import { SignerWalletAdapter } from '@solana/wallet-adapter-base';
|
|
@@ -26,6 +26,18 @@ declare const getMetadataKey: (streamPubkey: PublicKey, oldMetadata: PublicKey)
|
|
|
26
26
|
* @returns total tokens amount that Contract will retrieve from the Sender
|
|
27
27
|
*/
|
|
28
28
|
declare const calculateTotalAmountToDeposit: (depositedAmount: BN, totalFee: number) => BN;
|
|
29
|
+
/**
|
|
30
|
+
* Encode a contract name into the fixed 64 byte buffer the protocol stores it in.
|
|
31
|
+
* @param name contract name, up to 64 bytes once utf-8 encoded
|
|
32
|
+
* @returns right padded 64 byte buffer
|
|
33
|
+
*/
|
|
34
|
+
declare const encodeStreamName: (name: string) => Buffer;
|
|
35
|
+
/**
|
|
36
|
+
* Encode a contract name into an Array - used to pass as anchor param
|
|
37
|
+
* @param name contract name, up to 64 bytes once utf-8 encoded
|
|
38
|
+
* @returns array of numbers
|
|
39
|
+
*/
|
|
40
|
+
declare const encodeStreamNameAsArray: (name: string) => Array<number>;
|
|
29
41
|
declare const decodeStream: (buf: Buffer) => DecodedStream;
|
|
30
42
|
/**
|
|
31
43
|
* Sign passed BatchItems with wallet request or KeyPair
|
|
@@ -301,6 +313,13 @@ declare const isTokenLock: (streamData: {
|
|
|
301
313
|
minPercentage?: number;
|
|
302
314
|
maxPercentage?: number;
|
|
303
315
|
}) => boolean;
|
|
316
|
+
/**
|
|
317
|
+
* Whether the program charges a linear create the token-lock fee instead of the stream fee.
|
|
318
|
+
* Keep in sync with the program's `is_strict_token_lock`, which runs on the create's own params
|
|
319
|
+
* (a `start` of 0 sets both `start` and `cliff` to the current time); `isTokenLock` classifies a
|
|
320
|
+
* decoded stream instead.
|
|
321
|
+
*/
|
|
322
|
+
declare const isStrictTokenLockCreate: (data: Pick<ICreateLinearStreamData, "canTopup" | "automaticWithdrawal" | "cancelableBySender" | "cancelableByRecipient" | "transferableBySender" | "amount" | "cliffAmount" | "amountPerPeriod" | "cliff" | "start" | "period">, now?: number) => boolean;
|
|
304
323
|
declare const buildStreamType: (streamData: {
|
|
305
324
|
canTopup: boolean;
|
|
306
325
|
automaticWithdrawal: boolean;
|
|
@@ -614,4 +633,4 @@ declare const createClient: (options?: ApiClientOptions) => ApiClient;
|
|
|
614
633
|
|
|
615
634
|
declare const transformContract: (schema: ContractSchema) => Promise<Stream>;
|
|
616
635
|
|
|
617
|
-
export { AIRDROP_AMOUNT, AIRDROP_TEST_TOKEN, ALIGNED_COMPUTE_LIMIT, ALIGNED_PRECISION_FACTOR_POW, ALIGNED_UNLOCKS_PROGRAM_ID, AlignedStream, type ApiClient, type ApiClientOptions, BatchItem, BatchItemResult, CONTRACT_DISCRIMINATOR, CONTRACT_SEED, CREATE_PARAMS_PADDING, type Chain, type ContractSchema, type ContractType, DEFAULT_AUTO_CLAIM_FEE_SOL, DEFAULT_CREATION_FEE_SOL, DEFAULT_STREAMFLOW_FEE, DecodedStream, type DynamicContractSchema, ESCROW_SEED, FEES_METADATA_SEED, FEE_ORACLE_PUBLIC_KEY, type GetContractsOptions, ICreateAlignedStreamData, ICreateStreamData, ISearchStreams, IUpdateData, MAX_SAFE_UNIX_TIME_VALUE, METADATA_SEED, ORIGINAL_CONTRACT_SENDER_OFFSET, PARTNERS_SCHEMA, PARTNER_ORACLE_PROGRAM_ID, PARTNER_SCHEMA, PROGRAM_ID, type PriceOracleType, REPOPULATED_METADATA_SEED, RoutedFeeDestination, SOLANA_ERROR_MAP, SOLANA_ERROR_MATCH_REGEX, STREAMFLOW_TREASURY_PUBLIC_KEY, STREAM_STRUCT_OFFSETS, STREAM_STRUCT_OFFSET_CLOSED, STREAM_STRUCT_OFFSET_MINT, STREAM_STRUCT_OFFSET_OLD_METADATA_KEY, STREAM_STRUCT_OFFSET_RECIPIENT, STREAM_STRUCT_OFFSET_SENDER, Stream, StreamType, TEST_ORACLE_DISCRIMINATOR, TEST_ORACLE_SEED, TX_FINALITY_CONFIRMED, type TabulariumContract, WITHDRAWOR, WITHDRAWOR_PUBLIC_KEY, WITHDRAW_AVAILABLE_AMOUNT, buildStreamType, calculateTotalAmountToDeposit, calculateUnlockedAmount, cancelStreamInstruction, claimRoutedFeeStreamInstruction, createClient, createStreamInstruction, createStreamV2Instruction, createUncheckedStreamInstruction, createUncheckedStreamV2Instruction, decodeEndTime, decodeStream, deriveContractPDA, deriveEscrowPDA, deriveRepopulatedMetadataPDA, deriveStreamMetadataPDA, deriveTestOraclePDA, extractSolanaErrorCode, getMetadataKey, handleContractError, isAligned, isCliffCloseToDepositedAmount, isCreateAlignedStreamData, isDynamicLock, isTokenLock, isVesting, sendAndConfirmStreamRawTransaction, signAllTransactionWithRecipients, _default as timelockIDL, topupStreamInstruction, transferStreamInstruction, transformContract, updateStreamInstruction, withdrawStreamInstruction };
|
|
636
|
+
export { AIRDROP_AMOUNT, AIRDROP_TEST_TOKEN, ALIGNED_COMPUTE_LIMIT, ALIGNED_PRECISION_FACTOR_POW, ALIGNED_UNLOCKS_PROGRAM_ID, AlignedStream, type ApiClient, type ApiClientOptions, BatchItem, BatchItemResult, CONTRACT_DISCRIMINATOR, CONTRACT_SEED, CREATE_PARAMS_PADDING, type Chain, type ContractSchema, type ContractType, DEFAULT_AUTO_CLAIM_FEE_SOL, DEFAULT_CREATION_FEE_SOL, DEFAULT_STREAMFLOW_FEE, DecodedStream, type DynamicContractSchema, ESCROW_SEED, FEES_METADATA_SEED, FEE_ORACLE_PUBLIC_KEY, type GetContractsOptions, ICreateAlignedStreamData, ICreateLinearStreamData, ICreateStreamData, ISearchStreams, IUpdateData, MAX_SAFE_UNIX_TIME_VALUE, METADATA_SEED, ORIGINAL_CONTRACT_SENDER_OFFSET, PARTNERS_SCHEMA, PARTNER_ORACLE_PROGRAM_ID, PARTNER_SCHEMA, PROGRAM_ID, type PriceOracleType, REPOPULATED_METADATA_SEED, RoutedFeeDestination, SOLANA_ERROR_MAP, SOLANA_ERROR_MATCH_REGEX, STREAMFLOW_TREASURY_PUBLIC_KEY, STREAM_STRUCT_OFFSETS, STREAM_STRUCT_OFFSET_CLOSED, STREAM_STRUCT_OFFSET_MINT, STREAM_STRUCT_OFFSET_OLD_METADATA_KEY, STREAM_STRUCT_OFFSET_RECIPIENT, STREAM_STRUCT_OFFSET_SENDER, Stream, StreamType, TEST_ORACLE_DISCRIMINATOR, TEST_ORACLE_SEED, TX_FINALITY_CONFIRMED, type TabulariumContract, WITHDRAWOR, WITHDRAWOR_PUBLIC_KEY, WITHDRAW_AVAILABLE_AMOUNT, buildStreamType, calculateTotalAmountToDeposit, calculateUnlockedAmount, cancelStreamInstruction, claimRoutedFeeStreamInstruction, createClient, createStreamInstruction, createStreamV2Instruction, createUncheckedStreamInstruction, createUncheckedStreamV2Instruction, decodeEndTime, decodeStream, deriveContractPDA, deriveEscrowPDA, deriveRepopulatedMetadataPDA, deriveStreamMetadataPDA, deriveTestOraclePDA, encodeStreamName, encodeStreamNameAsArray, extractSolanaErrorCode, getMetadataKey, handleContractError, isAligned, isCliffCloseToDepositedAmount, isCreateAlignedStreamData, isDynamicLock, isStrictTokenLockCreate, isTokenLock, isVesting, sendAndConfirmStreamRawTransaction, signAllTransactionWithRecipients, _default as timelockIDL, topupStreamInstruction, transferStreamInstruction, transformContract, updateStreamInstruction, withdrawStreamInstruction };
|