@streamflow/stream 7.5.1 → 7.5.3-alpha.43a9937.20250509142428
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-CQOC8m8V.d.cts +542 -0
- package/dist/cjs/aptos/index.cjs +459 -0
- package/dist/cjs/aptos/index.cjs.map +1 -0
- package/dist/cjs/aptos/index.d.cts +14 -0
- package/dist/cjs/evm/index.cjs +1915 -0
- package/dist/cjs/evm/index.cjs.map +1 -0
- package/dist/cjs/evm/index.d.cts +13 -0
- package/dist/cjs/index-CYu6i--S.d.cts +136 -0
- package/dist/cjs/index-DUVcpIhD.d.cts +203 -0
- package/dist/cjs/index-b7Qo5mCj.d.cts +664 -0
- package/dist/cjs/index-fNLnPKzv.d.cts +213 -0
- package/dist/cjs/index.cjs +7205 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/cjs/index.d.cts +192 -0
- package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.cjs +4 -0
- package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.cjs.map +1 -0
- package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.d.cts +1234 -0
- package/dist/cjs/solana/index.cjs +3762 -0
- package/dist/cjs/solana/index.cjs.map +1 -0
- package/dist/cjs/solana/index.d.cts +17 -0
- package/dist/cjs/sui/index.cjs +1021 -0
- package/dist/cjs/sui/index.cjs.map +1 -0
- package/dist/cjs/sui/index.d.cts +13 -0
- package/dist/esm/BaseStreamClient-CQOC8m8V.d.ts +542 -0
- package/dist/esm/aptos/index.d.ts +14 -4
- package/dist/esm/aptos/index.js +446 -4
- package/dist/esm/aptos/index.js.map +1 -0
- package/dist/esm/evm/index.d.ts +13 -5
- package/dist/esm/evm/index.js +1902 -5
- package/dist/esm/evm/index.js.map +1 -0
- package/dist/esm/index-BEo0O2IG.d.ts +664 -0
- package/dist/esm/index-CWmb3-x9.d.ts +136 -0
- package/dist/esm/index-Cgv37xlG.d.ts +213 -0
- package/dist/esm/index-D6QYg8hn.d.ts +203 -0
- package/dist/esm/index.d.ts +192 -10
- package/dist/esm/index.js +7112 -10
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/solana/descriptor/idl/streamflow_aligned_unlocks.json +917 -1368
- package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.d.ts +3 -1
- package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.js +3 -1
- package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.js.map +1 -0
- package/dist/esm/solana/index.d.ts +17 -7
- package/dist/esm/solana/index.js +3706 -7
- package/dist/esm/solana/index.js.map +1 -0
- package/dist/esm/sui/index.d.ts +13 -4
- package/dist/esm/sui/index.js +1011 -4
- package/dist/esm/sui/index.js.map +1 -0
- package/package.json +57 -27
- package/dist/cjs/__tests__/aptos/streamClient.spec.js +0 -111
- package/dist/cjs/__tests__/common/GenericStreamClient.spec.js +0 -45
- package/dist/cjs/aptos/StreamClient.js +0 -226
- package/dist/cjs/aptos/constants.js +0 -27
- package/dist/cjs/aptos/index.js +0 -38
- package/dist/cjs/aptos/types.js +0 -69
- package/dist/cjs/aptos/utils.js +0 -34
- package/dist/cjs/aptos/wallet.js +0 -34
- package/dist/cjs/common/BaseStreamClient.js +0 -23
- package/dist/cjs/common/GenericStreamClient.js +0 -102
- package/dist/cjs/common/constants.js +0 -10
- package/dist/cjs/common/contractUtils.js +0 -77
- package/dist/cjs/common/types.js +0 -141
- package/dist/cjs/common/utils.js +0 -69
- package/dist/cjs/evm/StreamClient.js +0 -238
- package/dist/cjs/evm/abi.js +0 -1257
- package/dist/cjs/evm/constants.js +0 -38
- package/dist/cjs/evm/ercAbi.js +0 -224
- package/dist/cjs/evm/index.js +0 -40
- package/dist/cjs/evm/types.js +0 -66
- package/dist/cjs/evm/utils.js +0 -11
- package/dist/cjs/index.js +0 -43
- package/dist/cjs/solana/StreamClient.js +0 -1042
- package/dist/cjs/solana/constants.js +0 -95
- package/dist/cjs/solana/descriptor/idl/streamflow_aligned_unlocks.json +0 -1437
- package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.js +0 -2
- package/dist/cjs/solana/index.js +0 -40
- package/dist/cjs/solana/instructionTypes.js +0 -2
- package/dist/cjs/solana/instructions.js +0 -298
- package/dist/cjs/solana/layout.js +0 -182
- package/dist/cjs/solana/lib/derive-accounts.js +0 -17
- package/dist/cjs/solana/lib/utils.js +0 -127
- package/dist/cjs/solana/timelockIDL.js +0 -422
- package/dist/cjs/solana/types.js +0 -93
- package/dist/cjs/sui/StreamClient.js +0 -416
- package/dist/cjs/sui/constants.js +0 -42
- package/dist/cjs/sui/index.js +0 -37
- package/dist/cjs/sui/types.js +0 -68
- package/dist/cjs/sui/utils.js +0 -46
- package/dist/cjs/sui/wallet.js +0 -40
- package/dist/esm/__tests__/aptos/streamClient.spec.d.ts +0 -1
- package/dist/esm/__tests__/aptos/streamClient.spec.js +0 -106
- package/dist/esm/__tests__/common/GenericStreamClient.spec.d.ts +0 -1
- package/dist/esm/__tests__/common/GenericStreamClient.spec.js +0 -40
- package/dist/esm/aptos/StreamClient.d.ts +0 -53
- package/dist/esm/aptos/StreamClient.js +0 -226
- package/dist/esm/aptos/constants.d.ts +0 -8
- package/dist/esm/aptos/constants.js +0 -24
- package/dist/esm/aptos/types.d.ts +0 -109
- package/dist/esm/aptos/types.js +0 -105
- package/dist/esm/aptos/utils.d.ts +0 -7
- package/dist/esm/aptos/utils.js +0 -30
- package/dist/esm/aptos/wallet.d.ts +0 -9
- package/dist/esm/aptos/wallet.js +0 -33
- package/dist/esm/common/BaseStreamClient.d.ts +0 -22
- package/dist/esm/common/BaseStreamClient.js +0 -19
- package/dist/esm/common/GenericStreamClient.d.ts +0 -72
- package/dist/esm/common/GenericStreamClient.js +0 -101
- package/dist/esm/common/constants.d.ts +0 -4
- package/dist/esm/common/constants.js +0 -4
- package/dist/esm/common/contractUtils.d.ts +0 -63
- package/dist/esm/common/contractUtils.js +0 -61
- package/dist/esm/common/types.d.ts +0 -353
- package/dist/esm/common/types.js +0 -135
- package/dist/esm/common/utils.d.ts +0 -32
- package/dist/esm/common/utils.js +0 -59
- package/dist/esm/evm/StreamClient.d.ts +0 -32
- package/dist/esm/evm/StreamClient.js +0 -237
- package/dist/esm/evm/abi.d.ts +0 -111
- package/dist/esm/evm/abi.js +0 -1255
- package/dist/esm/evm/constants.d.ts +0 -20
- package/dist/esm/evm/constants.js +0 -35
- package/dist/esm/evm/ercAbi.d.ts +0 -39
- package/dist/esm/evm/ercAbi.js +0 -222
- package/dist/esm/evm/types.d.ts +0 -98
- package/dist/esm/evm/types.js +0 -102
- package/dist/esm/evm/utils.d.ts +0 -1
- package/dist/esm/evm/utils.js +0 -8
- package/dist/esm/solana/StreamClient.d.ts +0 -150
- package/dist/esm/solana/StreamClient.js +0 -1017
- package/dist/esm/solana/constants.d.ts +0 -70
- package/dist/esm/solana/constants.js +0 -92
- package/dist/esm/solana/instructionTypes.d.ts +0 -101
- package/dist/esm/solana/instructionTypes.js +0 -1
- package/dist/esm/solana/instructions.d.ts +0 -142
- package/dist/esm/solana/instructions.js +0 -265
- package/dist/esm/solana/layout.d.ts +0 -27
- package/dist/esm/solana/layout.js +0 -155
- package/dist/esm/solana/lib/derive-accounts.d.ts +0 -4
- package/dist/esm/solana/lib/derive-accounts.js +0 -11
- package/dist/esm/solana/lib/utils.d.ts +0 -22
- package/dist/esm/solana/lib/utils.js +0 -117
- package/dist/esm/solana/timelockIDL.d.ts +0 -22
- package/dist/esm/solana/timelockIDL.js +0 -420
- package/dist/esm/solana/types.d.ts +0 -180
- package/dist/esm/solana/types.js +0 -142
- package/dist/esm/sui/StreamClient.d.ts +0 -82
- package/dist/esm/sui/StreamClient.js +0 -417
- package/dist/esm/sui/constants.d.ts +0 -10
- package/dist/esm/sui/constants.js +0 -39
- package/dist/esm/sui/types.d.ts +0 -167
- package/dist/esm/sui/types.js +0 -104
- package/dist/esm/sui/utils.d.ts +0 -11
- package/dist/esm/sui/utils.js +0 -39
- package/dist/esm/sui/wallet.d.ts +0 -17
- package/dist/esm/sui/wallet.js +0 -38
|
@@ -0,0 +1,664 @@
|
|
|
1
|
+
import PQueue from 'p-queue';
|
|
2
|
+
import { Keypair, TransactionInstruction, PublicKey, VersionedTransaction, AccountInfo, Commitment, ConnectionConfig, Connection } from '@solana/web3.js';
|
|
3
|
+
import { ITransactionSolanaExt, IProgramAccount, ConfirmationParams, ThrottleParams } from '@streamflow/common/solana';
|
|
4
|
+
import { IdlAccounts, IdlTypes, Program } from '@coral-xyz/anchor';
|
|
5
|
+
import { SignerWalletAdapter } from '@solana/wallet-adapter-base';
|
|
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-CQOC8m8V.cjs';
|
|
8
|
+
import { StreamflowAlignedUnlocks } from './solana/descriptor/streamflow_aligned_unlocks.cjs';
|
|
9
|
+
import { ICluster, ContractError, IChain } from '@streamflow/common';
|
|
10
|
+
import { Buffer as Buffer$1 } from 'buffer';
|
|
11
|
+
|
|
12
|
+
type AlignedUnlocksTypes = IdlTypes<StreamflowAlignedUnlocks>;
|
|
13
|
+
type AlignedUnlocksAccounts = IdlAccounts<StreamflowAlignedUnlocks>;
|
|
14
|
+
type AlignedUnlocksContract = AlignedUnlocksAccounts["contract"];
|
|
15
|
+
type OracleType = IdlTypes<StreamflowAlignedUnlocks>["oracleType"];
|
|
16
|
+
type TestOracle = AlignedUnlocksAccounts["testOracle"];
|
|
17
|
+
type CreateParams = AlignedUnlocksTypes["createParams"];
|
|
18
|
+
type ChangeOracleParams = AlignedUnlocksTypes["changeOracleParams"];
|
|
19
|
+
type CreateTestOracleParams = AlignedUnlocksTypes["createTestOracleParams"];
|
|
20
|
+
type UpdateTestOracleParams = AlignedUnlocksTypes["updateTestOracleParams"];
|
|
21
|
+
interface ISearchStreams {
|
|
22
|
+
mint?: string;
|
|
23
|
+
sender?: string;
|
|
24
|
+
recipient?: string;
|
|
25
|
+
closed?: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface Account {
|
|
28
|
+
pubkey: PublicKey;
|
|
29
|
+
account: AccountInfo<Buffer>;
|
|
30
|
+
}
|
|
31
|
+
interface ICreateSolanaExt {
|
|
32
|
+
sender: SignerWalletAdapter | Keypair;
|
|
33
|
+
isNative?: boolean;
|
|
34
|
+
}
|
|
35
|
+
interface ITransactionSolanaExtWithInstructions extends ITransactionSolanaExt {
|
|
36
|
+
customInstructions?: {
|
|
37
|
+
after?: InstructionGenerator;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface ICreateStreamSolanaExt extends ICreateSolanaExt, ITransactionSolanaExtWithInstructions {
|
|
41
|
+
metadataPubKeys?: PublicKey[];
|
|
42
|
+
partner?: string | null;
|
|
43
|
+
}
|
|
44
|
+
interface IInteractStreamSolanaExt extends ITransactionSolanaExtWithInstructions {
|
|
45
|
+
invoker: SignerWalletAdapter | Keypair;
|
|
46
|
+
checkTokenAccounts?: boolean;
|
|
47
|
+
}
|
|
48
|
+
interface ITopUpStreamSolanaExt extends ITransactionSolanaExt {
|
|
49
|
+
invoker: SignerWalletAdapter | Keypair;
|
|
50
|
+
isNative?: boolean;
|
|
51
|
+
}
|
|
52
|
+
interface ICreateStreamInstructions {
|
|
53
|
+
ixs: TransactionInstruction[];
|
|
54
|
+
metadata: Keypair | undefined;
|
|
55
|
+
metadataPubKey: PublicKey;
|
|
56
|
+
}
|
|
57
|
+
declare class Contract implements LinearStream {
|
|
58
|
+
magic: number;
|
|
59
|
+
version: number;
|
|
60
|
+
createdAt: number;
|
|
61
|
+
withdrawnAmount: BN;
|
|
62
|
+
canceledAt: number;
|
|
63
|
+
end: number;
|
|
64
|
+
lastWithdrawnAt: number;
|
|
65
|
+
sender: string;
|
|
66
|
+
senderTokens: string;
|
|
67
|
+
recipient: string;
|
|
68
|
+
recipientTokens: string;
|
|
69
|
+
mint: string;
|
|
70
|
+
escrowTokens: string;
|
|
71
|
+
streamflowTreasury: string;
|
|
72
|
+
streamflowTreasuryTokens: string;
|
|
73
|
+
streamflowFeeTotal: BN;
|
|
74
|
+
streamflowFeeWithdrawn: BN;
|
|
75
|
+
streamflowFeePercent: number;
|
|
76
|
+
partnerFeeTotal: BN;
|
|
77
|
+
partnerFeeWithdrawn: BN;
|
|
78
|
+
partnerFeePercent: number;
|
|
79
|
+
partner: string;
|
|
80
|
+
partnerTokens: string;
|
|
81
|
+
start: number;
|
|
82
|
+
depositedAmount: BN;
|
|
83
|
+
period: number;
|
|
84
|
+
amountPerPeriod: BN;
|
|
85
|
+
cliff: number;
|
|
86
|
+
cliffAmount: BN;
|
|
87
|
+
cancelableBySender: boolean;
|
|
88
|
+
cancelableByRecipient: boolean;
|
|
89
|
+
automaticWithdrawal: boolean;
|
|
90
|
+
transferableBySender: boolean;
|
|
91
|
+
transferableByRecipient: boolean;
|
|
92
|
+
canTopup: boolean;
|
|
93
|
+
name: string;
|
|
94
|
+
withdrawalFrequency: number;
|
|
95
|
+
closed: boolean;
|
|
96
|
+
currentPauseStart: number;
|
|
97
|
+
pauseCumulative: BN;
|
|
98
|
+
lastRateChangeTime: number;
|
|
99
|
+
fundsUnlockedAtLastRateChange: BN;
|
|
100
|
+
type: StreamType;
|
|
101
|
+
isAligned?: boolean;
|
|
102
|
+
constructor(stream: DecodedStream);
|
|
103
|
+
unlocked(currentTimestamp: number): BN;
|
|
104
|
+
remaining(decimals: number): number;
|
|
105
|
+
}
|
|
106
|
+
declare class AlignedContract extends Contract implements AlignedStream {
|
|
107
|
+
minPrice: number;
|
|
108
|
+
maxPrice: number;
|
|
109
|
+
minPercentage: number;
|
|
110
|
+
maxPercentage: number;
|
|
111
|
+
tickSize: number;
|
|
112
|
+
proxyAddress: string;
|
|
113
|
+
priceOracle: string | undefined;
|
|
114
|
+
oracleType: OracleTypeName;
|
|
115
|
+
initialAmountPerPeriod: BN;
|
|
116
|
+
initialPrice: number;
|
|
117
|
+
lastPrice: number;
|
|
118
|
+
lastAmountUpdateTime: number;
|
|
119
|
+
initialNetAmount: BN;
|
|
120
|
+
constructor(stream: DecodedStream, alignedProxy: AlignedUnlocksContract);
|
|
121
|
+
}
|
|
122
|
+
interface DecodedStream {
|
|
123
|
+
magic: BN;
|
|
124
|
+
version: BN;
|
|
125
|
+
createdAt: BN;
|
|
126
|
+
withdrawnAmount: BN;
|
|
127
|
+
canceledAt: BN;
|
|
128
|
+
end: BN;
|
|
129
|
+
lastWithdrawnAt: BN;
|
|
130
|
+
sender: PublicKey;
|
|
131
|
+
senderTokens: PublicKey;
|
|
132
|
+
recipient: PublicKey;
|
|
133
|
+
recipientTokens: PublicKey;
|
|
134
|
+
mint: PublicKey;
|
|
135
|
+
escrowTokens: PublicKey;
|
|
136
|
+
streamflowTreasury: PublicKey;
|
|
137
|
+
streamflowTreasuryTokens: PublicKey;
|
|
138
|
+
streamflowFeeTotal: BN;
|
|
139
|
+
streamflowFeeWithdrawn: BN;
|
|
140
|
+
streamflowFeePercent: BN;
|
|
141
|
+
partnerFeeTotal: BN;
|
|
142
|
+
partnerFeeWithdrawn: BN;
|
|
143
|
+
partnerFeePercent: BN;
|
|
144
|
+
partner: PublicKey;
|
|
145
|
+
partnerTokens: PublicKey;
|
|
146
|
+
start: BN;
|
|
147
|
+
depositedAmount: BN;
|
|
148
|
+
period: BN;
|
|
149
|
+
amountPerPeriod: BN;
|
|
150
|
+
cliff: BN;
|
|
151
|
+
cliffAmount: BN;
|
|
152
|
+
cancelableBySender: boolean;
|
|
153
|
+
cancelableByRecipient: boolean;
|
|
154
|
+
automaticWithdrawal: boolean;
|
|
155
|
+
transferableBySender: boolean;
|
|
156
|
+
transferableByRecipient: boolean;
|
|
157
|
+
canTopup: boolean;
|
|
158
|
+
name: string;
|
|
159
|
+
withdrawFrequency: BN;
|
|
160
|
+
closed: boolean;
|
|
161
|
+
currentPauseStart: BN;
|
|
162
|
+
pauseCumulative: BN;
|
|
163
|
+
lastRateChangeTime: BN;
|
|
164
|
+
fundsUnlockedAtLastRateChange: BN;
|
|
165
|
+
}
|
|
166
|
+
interface MetadataRecipientHashMap {
|
|
167
|
+
[metadataPubKey: string]: IRecipient;
|
|
168
|
+
}
|
|
169
|
+
interface BatchItem {
|
|
170
|
+
recipient: string;
|
|
171
|
+
tx: VersionedTransaction;
|
|
172
|
+
}
|
|
173
|
+
interface BatchItemSuccess extends BatchItem {
|
|
174
|
+
signature: string;
|
|
175
|
+
}
|
|
176
|
+
interface BatchItemError extends BatchItem {
|
|
177
|
+
error: string;
|
|
178
|
+
}
|
|
179
|
+
type BatchItemResult = BatchItemSuccess | BatchItemError;
|
|
180
|
+
type InstructionGenerator = TransactionInstruction[] | ((params: {
|
|
181
|
+
instructions: TransactionInstruction[];
|
|
182
|
+
metadata?: PublicKey;
|
|
183
|
+
}) => TransactionInstruction[] | Promise<TransactionInstruction[]>);
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Solana Client creation options
|
|
187
|
+
* @property cluster {@link ICluster} cluster type
|
|
188
|
+
* @property clusterUrl cluster url
|
|
189
|
+
* @interface ClientCreationOptions
|
|
190
|
+
*/
|
|
191
|
+
type ClientCreationOptions = Omit<SolanaStreamClientOptions, "chain" | "sendRate" | "sendThrottler">;
|
|
192
|
+
declare class SolanaStreamClient extends BaseStreamClient {
|
|
193
|
+
private readonly connection;
|
|
194
|
+
private readonly programId;
|
|
195
|
+
private readonly commitment;
|
|
196
|
+
readonly alignedProxyProgram: Program<StreamflowAlignedUnlocks>;
|
|
197
|
+
private readonly schedulingParams;
|
|
198
|
+
/**
|
|
199
|
+
* Create Stream instance with flat arguments
|
|
200
|
+
*/
|
|
201
|
+
constructor(clusterUrl: string, cluster?: ICluster, commitment?: Commitment | ConnectionConfig, programId?: string, sendRate?: number, sendThrottler?: PQueue);
|
|
202
|
+
/**
|
|
203
|
+
* Create Stream instance with options
|
|
204
|
+
*/
|
|
205
|
+
constructor(options: ClientCreationOptions);
|
|
206
|
+
getConnection(): Connection;
|
|
207
|
+
getCommitment(): Commitment | undefined;
|
|
208
|
+
getProgramId(): string;
|
|
209
|
+
/**
|
|
210
|
+
* Creates a new stream/vesting contract.
|
|
211
|
+
* All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
|
|
212
|
+
*/
|
|
213
|
+
create(data: ICreateStreamData, extParams: ICreateStreamSolanaExt): Promise<ICreateResult>;
|
|
214
|
+
prepareCreateInstructions(streamParams: ICreateStreamData, extParams: ICreateStreamSolanaExt): Promise<ICreateStreamInstructions>;
|
|
215
|
+
prepareCreateAlignedUnlockInstructions(streamParams: ICreateAlignedStreamData, extParams: ICreateStreamSolanaExt): Promise<ICreateStreamInstructions>;
|
|
216
|
+
/**
|
|
217
|
+
* Creates a new stream/vesting contract.
|
|
218
|
+
* All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
|
|
219
|
+
*/
|
|
220
|
+
prepareCreateStreamInstructions({ recipient, tokenId: mint, start, amount: depositedAmount, period, cliff, cliffAmount, amountPerPeriod, name, canPause, canUpdateRate, canTopup, cancelableBySender, cancelableByRecipient, transferableBySender, transferableByRecipient, automaticWithdrawal, withdrawalFrequency, partner, tokenProgramId: streamTokenProgramId, }: ICreateStreamData, { sender, metadataPubKeys, isNative, computePrice, computeLimit }: ICreateStreamSolanaExt): Promise<ICreateStreamInstructions>;
|
|
221
|
+
/**
|
|
222
|
+
* Creates a new stream/vesting contract using unchecked instruction.
|
|
223
|
+
*
|
|
224
|
+
* Unchecked instruction differs from the regular in:
|
|
225
|
+
* - does not check for initialized associated token account (wallets with no control over their ATA should not be used
|
|
226
|
+
* as sender/recipient/partner or there are risks of funds being locked in the contract)
|
|
227
|
+
* - initialized contract PDA off chain
|
|
228
|
+
*
|
|
229
|
+
* If you are not sure if you should use create or create_unchecked, go for create to be safer.
|
|
230
|
+
*/
|
|
231
|
+
createUnchecked(data: ICreateStreamData, extParams: ICreateStreamSolanaExt): Promise<ICreateResult>;
|
|
232
|
+
/**
|
|
233
|
+
* Create Transaction instructions for `createUnchecked`
|
|
234
|
+
*/
|
|
235
|
+
prepareCreateUncheckedInstructions({ recipient, tokenId: mint, start, amount: depositedAmount, period, cliff, cliffAmount, amountPerPeriod, name, canTopup, canUpdateRate, canPause, cancelableBySender, cancelableByRecipient, transferableBySender, transferableByRecipient, automaticWithdrawal, withdrawalFrequency, partner, }: ICreateStreamData, { sender, metadataPubKeys, isNative, computePrice, computeLimit }: ICreateStreamSolanaExt): Promise<{
|
|
236
|
+
ixs: TransactionInstruction[];
|
|
237
|
+
metadata: Keypair | undefined;
|
|
238
|
+
metadataPubKey: PublicKey;
|
|
239
|
+
}>;
|
|
240
|
+
/**
|
|
241
|
+
* Creates multiple stream/vesting contracts.
|
|
242
|
+
* All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
|
|
243
|
+
*/
|
|
244
|
+
createMultiple(data: ICreateMultipleStreamData, extParams: ICreateStreamSolanaExt): Promise<IMultiTransactionResult>;
|
|
245
|
+
/**
|
|
246
|
+
* Creates multiple stream/vesting contracts, and send all transactions sequentially.
|
|
247
|
+
* All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
|
|
248
|
+
* In most cases, createMultiple should be used instead.
|
|
249
|
+
*/
|
|
250
|
+
createMultipleSequential(data: ICreateMultipleStreamData, extParams: ICreateStreamSolanaExt): Promise<IMultiTransactionResult>;
|
|
251
|
+
/**
|
|
252
|
+
* Attempts withdrawing from the specified stream.
|
|
253
|
+
*/
|
|
254
|
+
withdraw({ id, amount }: IWithdrawData, extParams: IInteractStreamSolanaExt): Promise<ITransactionResult>;
|
|
255
|
+
/**
|
|
256
|
+
* Creates Transaction Instructions for withdrawal
|
|
257
|
+
*/
|
|
258
|
+
prepareWithdrawInstructions({ id, amount }: IWithdrawData, { invoker, checkTokenAccounts, computePrice, computeLimit }: IInteractStreamSolanaExt): Promise<TransactionInstruction[]>;
|
|
259
|
+
/**
|
|
260
|
+
* Attempts canceling the specified stream.
|
|
261
|
+
*/
|
|
262
|
+
cancel(cancelData: ICancelData, extParams: IInteractStreamSolanaExt): Promise<ITransactionResult>;
|
|
263
|
+
prepareCancelInstructions(cancelData: ICancelData, extParams: IInteractStreamSolanaExt): Promise<TransactionInstruction[]>;
|
|
264
|
+
prepareCancelAlignedUnlockInstructions({ id }: ICancelData, { invoker, checkTokenAccounts, computePrice, computeLimit }: IInteractStreamSolanaExt): Promise<TransactionInstruction[]>;
|
|
265
|
+
/**
|
|
266
|
+
* Creates Transaction Instructions for cancel
|
|
267
|
+
*/
|
|
268
|
+
prepareCancelStreamInstructions({ id }: ICancelData, { invoker, checkTokenAccounts, computePrice, computeLimit }: IInteractStreamSolanaExt): Promise<TransactionInstruction[]>;
|
|
269
|
+
/**
|
|
270
|
+
* Attempts changing the stream/vesting contract's recipient (effectively transferring the stream/vesting contract).
|
|
271
|
+
* Potential associated token account rent fee (to make it rent-exempt) is paid by the transaction initiator.
|
|
272
|
+
*/
|
|
273
|
+
transfer({ id, newRecipient }: ITransferData, extParams: IInteractStreamSolanaExt): Promise<ITransactionResult>;
|
|
274
|
+
/**
|
|
275
|
+
* Attempts changing the stream/vesting contract's recipient (effectively transferring the stream/vesting contract).
|
|
276
|
+
* Potential associated token account rent fee (to make it rent-exempt) is paid by the transaction initiator.
|
|
277
|
+
*/
|
|
278
|
+
prepareTransferInstructions({ id, newRecipient }: ITransferData, { invoker, computePrice, computeLimit }: IInteractStreamSolanaExt): Promise<TransactionInstruction[]>;
|
|
279
|
+
/**
|
|
280
|
+
* Tops up stream account with specified amount.
|
|
281
|
+
*/
|
|
282
|
+
topup({ id, amount }: ITopUpData, extParams: ITopUpStreamSolanaExt): Promise<ITransactionResult>;
|
|
283
|
+
/**
|
|
284
|
+
* Create Transaction instructions for topup
|
|
285
|
+
*/
|
|
286
|
+
prepareTopupInstructions({ id, amount }: ITopUpData, { invoker, isNative, computePrice, computeLimit }: ITopUpStreamSolanaExt): Promise<TransactionInstruction[]>;
|
|
287
|
+
/**
|
|
288
|
+
* Fetch stream data by its id (address).
|
|
289
|
+
*/
|
|
290
|
+
getOne({ id }: IGetOneData): Promise<Stream>;
|
|
291
|
+
/**
|
|
292
|
+
* Fetch all aligned outgoing streams/contracts by the provided public key.
|
|
293
|
+
*/
|
|
294
|
+
private getOutgoingAlignedStreams;
|
|
295
|
+
private getIncomingAlignedStreams;
|
|
296
|
+
/**
|
|
297
|
+
* Fetch streams/contracts by providing direction.
|
|
298
|
+
* Streams are sorted by start time in ascending order.
|
|
299
|
+
*/
|
|
300
|
+
get({ address, type, direction, }: IGetAllData): Promise<[string, Stream][]>;
|
|
301
|
+
searchStreams(data: ISearchStreams): Promise<IProgramAccount<Stream>[]>;
|
|
302
|
+
/**
|
|
303
|
+
* Attempts updating the stream auto withdrawal params and amount per period
|
|
304
|
+
*/
|
|
305
|
+
update(data: IUpdateData, extParams: IInteractStreamSolanaExt): Promise<ITransactionResult>;
|
|
306
|
+
/**
|
|
307
|
+
* Create Transaction instructions for update
|
|
308
|
+
*/
|
|
309
|
+
prepareUpdateInstructions(data: IUpdateData, { invoker, computePrice, computeLimit }: IInteractStreamSolanaExt): Promise<TransactionInstruction[]>;
|
|
310
|
+
getFees({ address }: IGetFeesData): Promise<IFees | null>;
|
|
311
|
+
getDefaultStreamflowFee(): Promise<number>;
|
|
312
|
+
extractErrorCode(err: Error): string | null;
|
|
313
|
+
/**
|
|
314
|
+
* Utility function to generate metadata for a Contract or return existing Pubkey
|
|
315
|
+
*/
|
|
316
|
+
private getOrCreateStreamMetadata;
|
|
317
|
+
/**
|
|
318
|
+
* Utility function that checks whether the associated stream address is an aligned unlock contract, indicated by whether the sender/creator is a PDA
|
|
319
|
+
*/
|
|
320
|
+
private isAlignedUnlock;
|
|
321
|
+
/**
|
|
322
|
+
* Returns insrtuctions for creating associated token accounts for the provided owners
|
|
323
|
+
*/
|
|
324
|
+
private getCreateATAInstructions;
|
|
325
|
+
private applyCustomAfterInstructions;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
declare const decodeStream: (buf: Buffer) => DecodedStream;
|
|
329
|
+
/**
|
|
330
|
+
* Sign passed BatchItems with wallet request or KeyPair
|
|
331
|
+
* @param {Keypair | SignerWalletAdapter} sender - Wallet or Keypair of sendin account
|
|
332
|
+
* @param {BatchItem[]} items - Multiple recipient contracts split into separate items
|
|
333
|
+
* @return {BatchItem[]} - Returns items with signatures.
|
|
334
|
+
*/
|
|
335
|
+
declare function signAllTransactionWithRecipients(sender: Keypair | SignerWalletAdapter, items: BatchItem[]): Promise<BatchItem[]>;
|
|
336
|
+
/**
|
|
337
|
+
* Sign passed BatchItems with wallet request or KeyPair
|
|
338
|
+
* @param {Connection} connection - Solana web3 connection object.
|
|
339
|
+
* @param {BatchItem} batchItem - Signed transaction ready to be send.
|
|
340
|
+
* @param confirmationParams - Confirmation Params that will be used for execution
|
|
341
|
+
* @param throttleParams - rate or throttler instance to throttle TX sending - to not spam the blockchain too much
|
|
342
|
+
* @return {Promise<BatchItemResult>} - Returns settled transaction item
|
|
343
|
+
*/
|
|
344
|
+
declare function sendAndConfirmStreamRawTransaction(connection: Connection, batchItem: BatchItem, confirmationParams: ConfirmationParams, throttleParams: ThrottleParams): Promise<BatchItemResult>;
|
|
345
|
+
declare function extractSolanaErrorCode(errorText: string, logs?: string[]): string | null;
|
|
346
|
+
|
|
347
|
+
declare const deriveContractPDA: (programId: PublicKey, streamMetadata: PublicKey) => PublicKey;
|
|
348
|
+
declare const deriveEscrowPDA: (programId: PublicKey, streamMetadata: PublicKey) => PublicKey;
|
|
349
|
+
declare const deriveTestOraclePDA: (programId: PublicKey, mint: PublicKey, creator: PublicKey) => PublicKey;
|
|
350
|
+
|
|
351
|
+
interface CreateStreamData {
|
|
352
|
+
start: BN;
|
|
353
|
+
depositedAmount: BN;
|
|
354
|
+
period: BN;
|
|
355
|
+
amountPerPeriod: BN;
|
|
356
|
+
cliff: BN;
|
|
357
|
+
cliffAmount: BN;
|
|
358
|
+
cancelableBySender: boolean;
|
|
359
|
+
cancelableByRecipient: boolean;
|
|
360
|
+
automaticWithdrawal: boolean;
|
|
361
|
+
transferableBySender: boolean;
|
|
362
|
+
transferableByRecipient: boolean;
|
|
363
|
+
canTopup: boolean;
|
|
364
|
+
canUpdateRate: boolean;
|
|
365
|
+
canPause: boolean;
|
|
366
|
+
name: string;
|
|
367
|
+
withdrawFrequency: BN;
|
|
368
|
+
}
|
|
369
|
+
interface CreateStreamAccounts {
|
|
370
|
+
sender: PublicKey;
|
|
371
|
+
senderTokens: PublicKey;
|
|
372
|
+
recipient: PublicKey;
|
|
373
|
+
recipientTokens: PublicKey;
|
|
374
|
+
metadata: PublicKey;
|
|
375
|
+
escrowTokens: PublicKey;
|
|
376
|
+
streamflowTreasury: PublicKey;
|
|
377
|
+
streamflowTreasuryTokens: PublicKey;
|
|
378
|
+
partner: PublicKey;
|
|
379
|
+
partnerTokens: PublicKey;
|
|
380
|
+
mint: PublicKey;
|
|
381
|
+
feeOracle: PublicKey;
|
|
382
|
+
rent: PublicKey;
|
|
383
|
+
timelockProgram: PublicKey;
|
|
384
|
+
tokenProgram: PublicKey;
|
|
385
|
+
associatedTokenProgram: PublicKey;
|
|
386
|
+
withdrawor: PublicKey;
|
|
387
|
+
systemProgram: PublicKey;
|
|
388
|
+
}
|
|
389
|
+
declare const createStreamInstruction: (data: CreateStreamData, programId: PublicKey, accounts: CreateStreamAccounts) => Promise<TransactionInstruction>;
|
|
390
|
+
interface CreateUncheckedStreamData {
|
|
391
|
+
start: BN;
|
|
392
|
+
depositedAmount: BN;
|
|
393
|
+
period: BN;
|
|
394
|
+
amountPerPeriod: BN;
|
|
395
|
+
cliff: BN;
|
|
396
|
+
cliffAmount: BN;
|
|
397
|
+
cancelableBySender: boolean;
|
|
398
|
+
cancelableByRecipient: boolean;
|
|
399
|
+
automaticWithdrawal: boolean;
|
|
400
|
+
transferableBySender: boolean;
|
|
401
|
+
transferableByRecipient: boolean;
|
|
402
|
+
canTopup: boolean;
|
|
403
|
+
canUpdateRate: boolean;
|
|
404
|
+
canPause: boolean;
|
|
405
|
+
name: string;
|
|
406
|
+
withdrawFrequency: BN;
|
|
407
|
+
recipient: PublicKey;
|
|
408
|
+
partner: PublicKey;
|
|
409
|
+
}
|
|
410
|
+
interface CreateUncheckedStreamAccounts {
|
|
411
|
+
payer?: PublicKey;
|
|
412
|
+
sender: PublicKey;
|
|
413
|
+
senderTokens: PublicKey;
|
|
414
|
+
metadata: PublicKey;
|
|
415
|
+
escrowTokens: PublicKey;
|
|
416
|
+
mint: PublicKey;
|
|
417
|
+
feeOracle: PublicKey;
|
|
418
|
+
rent: PublicKey;
|
|
419
|
+
timelockProgram: PublicKey;
|
|
420
|
+
tokenProgram: PublicKey;
|
|
421
|
+
withdrawor: PublicKey;
|
|
422
|
+
systemProgram: PublicKey;
|
|
423
|
+
}
|
|
424
|
+
declare const createUncheckedStreamInstruction: (data: CreateUncheckedStreamData, programId: PublicKey, accounts: CreateUncheckedStreamAccounts) => Promise<TransactionInstruction>;
|
|
425
|
+
interface WithdrawAccounts {
|
|
426
|
+
authority: PublicKey;
|
|
427
|
+
recipient: PublicKey;
|
|
428
|
+
recipientTokens: PublicKey;
|
|
429
|
+
metadata: PublicKey;
|
|
430
|
+
escrowTokens: PublicKey;
|
|
431
|
+
streamflowTreasury: PublicKey;
|
|
432
|
+
streamflowTreasuryTokens: PublicKey;
|
|
433
|
+
partner: PublicKey;
|
|
434
|
+
partnerTokens: PublicKey;
|
|
435
|
+
mint: PublicKey;
|
|
436
|
+
tokenProgram: PublicKey;
|
|
437
|
+
}
|
|
438
|
+
declare const withdrawStreamInstruction: (amount: BN, programId: PublicKey, { authority, recipient, recipientTokens, metadata, escrowTokens, streamflowTreasury, streamflowTreasuryTokens, partner, partnerTokens, mint, tokenProgram, }: WithdrawAccounts) => Promise<TransactionInstruction>;
|
|
439
|
+
interface UpdateAccounts {
|
|
440
|
+
authority: PublicKey;
|
|
441
|
+
metadata: PublicKey;
|
|
442
|
+
withdrawor: PublicKey;
|
|
443
|
+
systemProgram: PublicKey;
|
|
444
|
+
}
|
|
445
|
+
declare const updateStreamInstruction: (params: IUpdateData, programId: PublicKey, { authority, metadata, withdrawor, systemProgram }: UpdateAccounts) => Promise<TransactionInstruction>;
|
|
446
|
+
interface CancelAccounts {
|
|
447
|
+
authority: PublicKey;
|
|
448
|
+
sender: PublicKey;
|
|
449
|
+
senderTokens: PublicKey;
|
|
450
|
+
recipient: PublicKey;
|
|
451
|
+
recipientTokens: PublicKey;
|
|
452
|
+
metadata: PublicKey;
|
|
453
|
+
escrowTokens: PublicKey;
|
|
454
|
+
streamflowTreasury: PublicKey;
|
|
455
|
+
streamflowTreasuryTokens: PublicKey;
|
|
456
|
+
partner: PublicKey;
|
|
457
|
+
partnerTokens: PublicKey;
|
|
458
|
+
mint: PublicKey;
|
|
459
|
+
tokenProgram: PublicKey;
|
|
460
|
+
}
|
|
461
|
+
declare const cancelStreamInstruction: (programId: PublicKey, { authority, sender, senderTokens, recipient, recipientTokens, metadata, escrowTokens, streamflowTreasury, streamflowTreasuryTokens, partner, partnerTokens, mint, tokenProgram, }: CancelAccounts) => Promise<TransactionInstruction>;
|
|
462
|
+
interface TransferAccounts {
|
|
463
|
+
authority: PublicKey;
|
|
464
|
+
newRecipient: PublicKey;
|
|
465
|
+
newRecipientTokens: PublicKey;
|
|
466
|
+
metadata: PublicKey;
|
|
467
|
+
mint: PublicKey;
|
|
468
|
+
rent: PublicKey;
|
|
469
|
+
tokenProgram: PublicKey;
|
|
470
|
+
associatedTokenProgram: PublicKey;
|
|
471
|
+
systemProgram: PublicKey;
|
|
472
|
+
}
|
|
473
|
+
declare const transferStreamInstruction: (programId: PublicKey, { authority, newRecipient, newRecipientTokens, metadata, mint, rent, tokenProgram, associatedTokenProgram, systemProgram, }: TransferAccounts) => Promise<TransactionInstruction>;
|
|
474
|
+
interface TopupAccounts {
|
|
475
|
+
sender: PublicKey;
|
|
476
|
+
senderTokens: PublicKey;
|
|
477
|
+
metadata: PublicKey;
|
|
478
|
+
escrowTokens: PublicKey;
|
|
479
|
+
streamflowTreasury: PublicKey;
|
|
480
|
+
streamflowTreasuryTokens: PublicKey;
|
|
481
|
+
partner: PublicKey;
|
|
482
|
+
partnerTokens: PublicKey;
|
|
483
|
+
mint: PublicKey;
|
|
484
|
+
tokenProgram: PublicKey;
|
|
485
|
+
withdrawor: PublicKey;
|
|
486
|
+
systemProgram: PublicKey;
|
|
487
|
+
}
|
|
488
|
+
declare const topupStreamInstruction: (amount: BN, programId: PublicKey, { sender, senderTokens, metadata, escrowTokens, streamflowTreasury, streamflowTreasuryTokens, partner, partnerTokens, mint, tokenProgram, withdrawor, systemProgram, }: TopupAccounts) => Promise<TransactionInstruction>;
|
|
489
|
+
|
|
490
|
+
declare const TX_FINALITY_CONFIRMED = "confirmed";
|
|
491
|
+
declare const ORIGINAL_CONTRACT_SENDER_OFFSET = 9;
|
|
492
|
+
declare const STREAM_STRUCT_OFFSET_SENDER = 49;
|
|
493
|
+
declare const STREAM_STRUCT_OFFSET_RECIPIENT = 113;
|
|
494
|
+
declare const STREAM_STRUCT_OFFSET_MINT = 177;
|
|
495
|
+
declare const STREAM_STRUCT_OFFSET_CLOSED = 671;
|
|
496
|
+
declare const ALIGNED_PRECISION_FACTOR_POW = 9;
|
|
497
|
+
declare const STREAM_STRUCT_OFFSETS: Record<keyof ISearchStreams, number>;
|
|
498
|
+
declare const CREATE_PARAMS_PADDING = 126;
|
|
499
|
+
declare const PROGRAM_ID: {
|
|
500
|
+
devnet: string;
|
|
501
|
+
mainnet: string;
|
|
502
|
+
testnet: string;
|
|
503
|
+
local: string;
|
|
504
|
+
};
|
|
505
|
+
declare const ALIGNED_UNLOCKS_PROGRAM_ID: {
|
|
506
|
+
devnet: string;
|
|
507
|
+
mainnet: string;
|
|
508
|
+
testnet: string;
|
|
509
|
+
local: string;
|
|
510
|
+
};
|
|
511
|
+
declare const ALIGNED_COMPUTE_LIMIT = 300000;
|
|
512
|
+
declare const CONTRACT_DISCRIMINATOR: number[];
|
|
513
|
+
declare const TEST_ORACLE_DISCRIMINATOR: number[];
|
|
514
|
+
declare const CONTRACT_SEED: Buffer$1;
|
|
515
|
+
declare const ESCROW_SEED: Buffer$1;
|
|
516
|
+
declare const TEST_ORACLE_SEED: Buffer$1;
|
|
517
|
+
declare const PARTNER_ORACLE_PROGRAM_ID = "pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa";
|
|
518
|
+
declare const STREAMFLOW_TREASURY_PUBLIC_KEY: PublicKey;
|
|
519
|
+
declare const WITHDRAWOR_PUBLIC_KEY: PublicKey;
|
|
520
|
+
declare const FEE_ORACLE_PUBLIC_KEY: PublicKey;
|
|
521
|
+
declare const AIRDROP_TEST_TOKEN = "Gssm3vfi8s65R31SBdmQRq6cKeYojGgup7whkw4VCiQj";
|
|
522
|
+
declare const FEES_METADATA_SEED: Buffer$1;
|
|
523
|
+
declare const DEFAULT_STREAMFLOW_FEE = 0.99;
|
|
524
|
+
declare const AIRDROP_AMOUNT = 1;
|
|
525
|
+
declare const PARTNER_SCHEMA: {
|
|
526
|
+
struct: {
|
|
527
|
+
pubkey: {
|
|
528
|
+
array: {
|
|
529
|
+
type: string;
|
|
530
|
+
len: number;
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
partner_fee: string;
|
|
534
|
+
strm_fee: string;
|
|
535
|
+
};
|
|
536
|
+
};
|
|
537
|
+
declare const PARTNERS_SCHEMA: {
|
|
538
|
+
array: {
|
|
539
|
+
type: {
|
|
540
|
+
struct: {
|
|
541
|
+
pubkey: {
|
|
542
|
+
array: {
|
|
543
|
+
type: string;
|
|
544
|
+
len: number;
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
partner_fee: string;
|
|
548
|
+
strm_fee: string;
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
};
|
|
552
|
+
};
|
|
553
|
+
declare const SOLANA_ERROR_MATCH_REGEX: RegExp;
|
|
554
|
+
declare const SOLANA_ERROR_MAP: {
|
|
555
|
+
[key: number]: string;
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
declare const constants_AIRDROP_AMOUNT: typeof AIRDROP_AMOUNT;
|
|
559
|
+
declare const constants_AIRDROP_TEST_TOKEN: typeof AIRDROP_TEST_TOKEN;
|
|
560
|
+
declare const constants_ALIGNED_COMPUTE_LIMIT: typeof ALIGNED_COMPUTE_LIMIT;
|
|
561
|
+
declare const constants_ALIGNED_PRECISION_FACTOR_POW: typeof ALIGNED_PRECISION_FACTOR_POW;
|
|
562
|
+
declare const constants_ALIGNED_UNLOCKS_PROGRAM_ID: typeof ALIGNED_UNLOCKS_PROGRAM_ID;
|
|
563
|
+
declare const constants_CONTRACT_DISCRIMINATOR: typeof CONTRACT_DISCRIMINATOR;
|
|
564
|
+
declare const constants_CONTRACT_SEED: typeof CONTRACT_SEED;
|
|
565
|
+
declare const constants_CREATE_PARAMS_PADDING: typeof CREATE_PARAMS_PADDING;
|
|
566
|
+
declare const constants_DEFAULT_STREAMFLOW_FEE: typeof DEFAULT_STREAMFLOW_FEE;
|
|
567
|
+
declare const constants_ESCROW_SEED: typeof ESCROW_SEED;
|
|
568
|
+
declare const constants_FEES_METADATA_SEED: typeof FEES_METADATA_SEED;
|
|
569
|
+
declare const constants_FEE_ORACLE_PUBLIC_KEY: typeof FEE_ORACLE_PUBLIC_KEY;
|
|
570
|
+
declare const constants_ORIGINAL_CONTRACT_SENDER_OFFSET: typeof ORIGINAL_CONTRACT_SENDER_OFFSET;
|
|
571
|
+
declare const constants_PARTNERS_SCHEMA: typeof PARTNERS_SCHEMA;
|
|
572
|
+
declare const constants_PARTNER_ORACLE_PROGRAM_ID: typeof PARTNER_ORACLE_PROGRAM_ID;
|
|
573
|
+
declare const constants_PARTNER_SCHEMA: typeof PARTNER_SCHEMA;
|
|
574
|
+
declare const constants_PROGRAM_ID: typeof PROGRAM_ID;
|
|
575
|
+
declare const constants_SOLANA_ERROR_MAP: typeof SOLANA_ERROR_MAP;
|
|
576
|
+
declare const constants_SOLANA_ERROR_MATCH_REGEX: typeof SOLANA_ERROR_MATCH_REGEX;
|
|
577
|
+
declare const constants_STREAMFLOW_TREASURY_PUBLIC_KEY: typeof STREAMFLOW_TREASURY_PUBLIC_KEY;
|
|
578
|
+
declare const constants_STREAM_STRUCT_OFFSETS: typeof STREAM_STRUCT_OFFSETS;
|
|
579
|
+
declare const constants_STREAM_STRUCT_OFFSET_CLOSED: typeof STREAM_STRUCT_OFFSET_CLOSED;
|
|
580
|
+
declare const constants_STREAM_STRUCT_OFFSET_MINT: typeof STREAM_STRUCT_OFFSET_MINT;
|
|
581
|
+
declare const constants_STREAM_STRUCT_OFFSET_RECIPIENT: typeof STREAM_STRUCT_OFFSET_RECIPIENT;
|
|
582
|
+
declare const constants_STREAM_STRUCT_OFFSET_SENDER: typeof STREAM_STRUCT_OFFSET_SENDER;
|
|
583
|
+
declare const constants_TEST_ORACLE_DISCRIMINATOR: typeof TEST_ORACLE_DISCRIMINATOR;
|
|
584
|
+
declare const constants_TEST_ORACLE_SEED: typeof TEST_ORACLE_SEED;
|
|
585
|
+
declare const constants_TX_FINALITY_CONFIRMED: typeof TX_FINALITY_CONFIRMED;
|
|
586
|
+
declare const constants_WITHDRAWOR_PUBLIC_KEY: typeof WITHDRAWOR_PUBLIC_KEY;
|
|
587
|
+
declare namespace constants {
|
|
588
|
+
export { constants_AIRDROP_AMOUNT as AIRDROP_AMOUNT, constants_AIRDROP_TEST_TOKEN as AIRDROP_TEST_TOKEN, constants_ALIGNED_COMPUTE_LIMIT as ALIGNED_COMPUTE_LIMIT, constants_ALIGNED_PRECISION_FACTOR_POW as ALIGNED_PRECISION_FACTOR_POW, constants_ALIGNED_UNLOCKS_PROGRAM_ID as ALIGNED_UNLOCKS_PROGRAM_ID, constants_CONTRACT_DISCRIMINATOR as CONTRACT_DISCRIMINATOR, constants_CONTRACT_SEED as CONTRACT_SEED, constants_CREATE_PARAMS_PADDING as CREATE_PARAMS_PADDING, constants_DEFAULT_STREAMFLOW_FEE as DEFAULT_STREAMFLOW_FEE, constants_ESCROW_SEED as ESCROW_SEED, constants_FEES_METADATA_SEED as FEES_METADATA_SEED, constants_FEE_ORACLE_PUBLIC_KEY as FEE_ORACLE_PUBLIC_KEY, constants_ORIGINAL_CONTRACT_SENDER_OFFSET as ORIGINAL_CONTRACT_SENDER_OFFSET, constants_PARTNERS_SCHEMA as PARTNERS_SCHEMA, constants_PARTNER_ORACLE_PROGRAM_ID as PARTNER_ORACLE_PROGRAM_ID, constants_PARTNER_SCHEMA as PARTNER_SCHEMA, constants_PROGRAM_ID as PROGRAM_ID, constants_SOLANA_ERROR_MAP as SOLANA_ERROR_MAP, constants_SOLANA_ERROR_MATCH_REGEX as SOLANA_ERROR_MATCH_REGEX, constants_STREAMFLOW_TREASURY_PUBLIC_KEY as STREAMFLOW_TREASURY_PUBLIC_KEY, constants_STREAM_STRUCT_OFFSETS as STREAM_STRUCT_OFFSETS, constants_STREAM_STRUCT_OFFSET_CLOSED as STREAM_STRUCT_OFFSET_CLOSED, constants_STREAM_STRUCT_OFFSET_MINT as STREAM_STRUCT_OFFSET_MINT, constants_STREAM_STRUCT_OFFSET_RECIPIENT as STREAM_STRUCT_OFFSET_RECIPIENT, constants_STREAM_STRUCT_OFFSET_SENDER as STREAM_STRUCT_OFFSET_SENDER, constants_TEST_ORACLE_DISCRIMINATOR as TEST_ORACLE_DISCRIMINATOR, constants_TEST_ORACLE_SEED as TEST_ORACLE_SEED, constants_TX_FINALITY_CONFIRMED as TX_FINALITY_CONFIRMED, constants_WITHDRAWOR_PUBLIC_KEY as WITHDRAWOR_PUBLIC_KEY };
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
declare const _default: {
|
|
592
|
+
version: string;
|
|
593
|
+
name: string;
|
|
594
|
+
instructions: {
|
|
595
|
+
name: string;
|
|
596
|
+
accounts: {
|
|
597
|
+
name: string;
|
|
598
|
+
isMut: boolean;
|
|
599
|
+
isSigner: boolean;
|
|
600
|
+
}[];
|
|
601
|
+
args: ({
|
|
602
|
+
name: string;
|
|
603
|
+
type: string;
|
|
604
|
+
} | {
|
|
605
|
+
name: string;
|
|
606
|
+
type: {
|
|
607
|
+
array: (string | number)[];
|
|
608
|
+
};
|
|
609
|
+
})[];
|
|
610
|
+
}[];
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
type index_Account = Account;
|
|
614
|
+
type index_AlignedContract = AlignedContract;
|
|
615
|
+
declare const index_AlignedContract: typeof AlignedContract;
|
|
616
|
+
type index_AlignedUnlocksContract = AlignedUnlocksContract;
|
|
617
|
+
type index_BatchItem = BatchItem;
|
|
618
|
+
type index_BatchItemError = BatchItemError;
|
|
619
|
+
type index_BatchItemResult = BatchItemResult;
|
|
620
|
+
type index_BatchItemSuccess = BatchItemSuccess;
|
|
621
|
+
type index_ChangeOracleParams = ChangeOracleParams;
|
|
622
|
+
type index_ClientCreationOptions = ClientCreationOptions;
|
|
623
|
+
type index_Contract = Contract;
|
|
624
|
+
declare const index_Contract: typeof Contract;
|
|
625
|
+
declare const index_ContractError: typeof ContractError;
|
|
626
|
+
type index_CreateParams = CreateParams;
|
|
627
|
+
type index_CreateTestOracleParams = CreateTestOracleParams;
|
|
628
|
+
type index_DecodedStream = DecodedStream;
|
|
629
|
+
declare const index_IChain: typeof IChain;
|
|
630
|
+
declare const index_ICluster: typeof ICluster;
|
|
631
|
+
type index_ICreateSolanaExt = ICreateSolanaExt;
|
|
632
|
+
type index_ICreateStreamInstructions = ICreateStreamInstructions;
|
|
633
|
+
type index_ICreateStreamSolanaExt = ICreateStreamSolanaExt;
|
|
634
|
+
type index_IInteractStreamSolanaExt = IInteractStreamSolanaExt;
|
|
635
|
+
type index_ISearchStreams = ISearchStreams;
|
|
636
|
+
type index_ITopUpStreamSolanaExt = ITopUpStreamSolanaExt;
|
|
637
|
+
type index_ITransactionSolanaExtWithInstructions = ITransactionSolanaExtWithInstructions;
|
|
638
|
+
type index_InstructionGenerator = InstructionGenerator;
|
|
639
|
+
type index_MetadataRecipientHashMap = MetadataRecipientHashMap;
|
|
640
|
+
type index_OracleType = OracleType;
|
|
641
|
+
type index_SolanaStreamClient = SolanaStreamClient;
|
|
642
|
+
declare const index_SolanaStreamClient: typeof SolanaStreamClient;
|
|
643
|
+
type index_TestOracle = TestOracle;
|
|
644
|
+
type index_UpdateTestOracleParams = UpdateTestOracleParams;
|
|
645
|
+
declare const index_cancelStreamInstruction: typeof cancelStreamInstruction;
|
|
646
|
+
declare const index_constants: typeof constants;
|
|
647
|
+
declare const index_createStreamInstruction: typeof createStreamInstruction;
|
|
648
|
+
declare const index_createUncheckedStreamInstruction: typeof createUncheckedStreamInstruction;
|
|
649
|
+
declare const index_decodeStream: typeof decodeStream;
|
|
650
|
+
declare const index_deriveContractPDA: typeof deriveContractPDA;
|
|
651
|
+
declare const index_deriveEscrowPDA: typeof deriveEscrowPDA;
|
|
652
|
+
declare const index_deriveTestOraclePDA: typeof deriveTestOraclePDA;
|
|
653
|
+
declare const index_extractSolanaErrorCode: typeof extractSolanaErrorCode;
|
|
654
|
+
declare const index_sendAndConfirmStreamRawTransaction: typeof sendAndConfirmStreamRawTransaction;
|
|
655
|
+
declare const index_signAllTransactionWithRecipients: typeof signAllTransactionWithRecipients;
|
|
656
|
+
declare const index_topupStreamInstruction: typeof topupStreamInstruction;
|
|
657
|
+
declare const index_transferStreamInstruction: typeof transferStreamInstruction;
|
|
658
|
+
declare const index_updateStreamInstruction: typeof updateStreamInstruction;
|
|
659
|
+
declare const index_withdrawStreamInstruction: typeof withdrawStreamInstruction;
|
|
660
|
+
declare namespace index {
|
|
661
|
+
export { type index_Account as Account, index_AlignedContract as AlignedContract, type index_AlignedUnlocksContract as AlignedUnlocksContract, type index_BatchItem as BatchItem, type index_BatchItemError as BatchItemError, type index_BatchItemResult as BatchItemResult, type index_BatchItemSuccess as BatchItemSuccess, type index_ChangeOracleParams as ChangeOracleParams, type index_ClientCreationOptions as ClientCreationOptions, index_Contract as Contract, index_ContractError as ContractError, type index_CreateParams as CreateParams, type index_CreateTestOracleParams as CreateTestOracleParams, type index_DecodedStream as DecodedStream, index_IChain as IChain, index_ICluster as ICluster, type index_ICreateSolanaExt as ICreateSolanaExt, type index_ICreateStreamInstructions as ICreateStreamInstructions, type index_ICreateStreamSolanaExt as ICreateStreamSolanaExt, type index_IInteractStreamSolanaExt as IInteractStreamSolanaExt, type index_ISearchStreams as ISearchStreams, type index_ITopUpStreamSolanaExt as ITopUpStreamSolanaExt, type index_ITransactionSolanaExtWithInstructions as ITransactionSolanaExtWithInstructions, type index_InstructionGenerator as InstructionGenerator, type index_MetadataRecipientHashMap as MetadataRecipientHashMap, type index_OracleType as OracleType, index_SolanaStreamClient as SolanaStreamClient, type index_TestOracle as TestOracle, type index_UpdateTestOracleParams as UpdateTestOracleParams, index_cancelStreamInstruction as cancelStreamInstruction, index_constants as constants, index_createStreamInstruction as createStreamInstruction, index_createUncheckedStreamInstruction as createUncheckedStreamInstruction, index_decodeStream as decodeStream, index_deriveContractPDA as deriveContractPDA, index_deriveEscrowPDA as deriveEscrowPDA, index_deriveTestOraclePDA as deriveTestOraclePDA, index_extractSolanaErrorCode as extractSolanaErrorCode, index_sendAndConfirmStreamRawTransaction as sendAndConfirmStreamRawTransaction, index_signAllTransactionWithRecipients as signAllTransactionWithRecipients, _default as timelockIDL, index_topupStreamInstruction as topupStreamInstruction, index_transferStreamInstruction as transferStreamInstruction, index_updateStreamInstruction as updateStreamInstruction, index_withdrawStreamInstruction as withdrawStreamInstruction };
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
export { type ICreateSolanaExt as $, ALIGNED_PRECISION_FACTOR_POW as A, signAllTransactionWithRecipients as B, CREATE_PARAMS_PADDING as C, DEFAULT_STREAMFLOW_FEE as D, ESCROW_SEED as E, FEE_ORACLE_PUBLIC_KEY as F, sendAndConfirmStreamRawTransaction as G, extractSolanaErrorCode as H, type ICreateStreamSolanaExt as I, deriveContractPDA as J, deriveEscrowPDA as K, deriveTestOraclePDA as L, type AlignedUnlocksContract as M, type OracleType as N, ORIGINAL_CONTRACT_SENDER_OFFSET as O, PROGRAM_ID as P, type TestOracle as Q, type CreateParams as R, SolanaStreamClient as S, TX_FINALITY_CONFIRMED as T, type ChangeOracleParams as U, type CreateTestOracleParams as V, WITHDRAWOR_PUBLIC_KEY as W, type UpdateTestOracleParams as X, type ISearchStreams as Y, type Account as Z, _default as _, type IInteractStreamSolanaExt as a, type ITransactionSolanaExtWithInstructions as a0, type ICreateStreamInstructions as a1, Contract as a2, AlignedContract as a3, type DecodedStream as a4, type MetadataRecipientHashMap as a5, type BatchItem as a6, type BatchItemSuccess as a7, type BatchItemError as a8, type BatchItemResult as a9, type InstructionGenerator as aa, createStreamInstruction as ab, createUncheckedStreamInstruction as ac, withdrawStreamInstruction as ad, updateStreamInstruction as ae, cancelStreamInstruction as af, transferStreamInstruction as ag, topupStreamInstruction as ah, type ITopUpStreamSolanaExt as b, STREAM_STRUCT_OFFSET_SENDER as c, STREAM_STRUCT_OFFSET_RECIPIENT as d, STREAM_STRUCT_OFFSET_MINT as e, STREAM_STRUCT_OFFSET_CLOSED as f, STREAM_STRUCT_OFFSETS as g, ALIGNED_UNLOCKS_PROGRAM_ID as h, index as i, ALIGNED_COMPUTE_LIMIT as j, CONTRACT_DISCRIMINATOR as k, TEST_ORACLE_DISCRIMINATOR as l, CONTRACT_SEED as m, TEST_ORACLE_SEED as n, PARTNER_ORACLE_PROGRAM_ID as o, STREAMFLOW_TREASURY_PUBLIC_KEY as p, AIRDROP_TEST_TOKEN as q, FEES_METADATA_SEED as r, AIRDROP_AMOUNT as s, PARTNER_SCHEMA as t, PARTNERS_SCHEMA as u, SOLANA_ERROR_MATCH_REGEX as v, SOLANA_ERROR_MAP as w, constants as x, type ClientCreationOptions as y, decodeStream as z };
|