@streamflow/stream 9.0.1 → 9.0.3
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-oCYfzJrc.d.cts → index-BgGtpOPg.d.cts} +5 -4
- package/dist/cjs/index.cjs +11 -8
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +2 -2
- package/dist/cjs/solana/index.cjs +11 -8
- package/dist/cjs/solana/index.cjs.map +1 -1
- package/dist/cjs/solana/index.d.cts +1 -1
- package/dist/esm/{index-BNQVJtIE.d.ts → index-Dp5DXxr-.d.ts} +5 -4
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +11 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/index.d.ts +1 -1
- package/dist/esm/solana/index.js +11 -8
- package/dist/esm/solana/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -219,6 +219,7 @@ declare class SolanaStreamClient extends BaseStreamClient {
|
|
|
219
219
|
getConnection(): Connection;
|
|
220
220
|
getCommitment(): Commitment | undefined;
|
|
221
221
|
getProgramId(): string;
|
|
222
|
+
getAlignedProxyProgramId(): string;
|
|
222
223
|
/**
|
|
223
224
|
* Builds transaction instructions for creating a new stream/vesting contract without creating a transaction.
|
|
224
225
|
* All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
|
|
@@ -493,14 +494,14 @@ declare class SolanaStreamClient extends BaseStreamClient {
|
|
|
493
494
|
* @returns Error code
|
|
494
495
|
*/
|
|
495
496
|
extractErrorCode(err: Error): string | null;
|
|
497
|
+
/**
|
|
498
|
+
* Utility function that checks whether the associated stream address is an aligned unlock contract, indicated by whether the sender/creator is a PDA
|
|
499
|
+
*/
|
|
500
|
+
isAlignedUnlock(streamPublicKey: PublicKey, senderPublicKey: PublicKey): boolean;
|
|
496
501
|
/**
|
|
497
502
|
* Utility function to generate metadata for a Contract or return existing Pubkey
|
|
498
503
|
*/
|
|
499
504
|
private getOrCreateStreamMetadata;
|
|
500
|
-
/**
|
|
501
|
-
* Utility function that checks whether the associated stream address is an aligned unlock contract, indicated by whether the sender/creator is a PDA
|
|
502
|
-
*/
|
|
503
|
-
private isAlignedUnlock;
|
|
504
505
|
/**
|
|
505
506
|
* Returns insrtuctions for creating associated token accounts for the provided owners
|
|
506
507
|
*/
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -5048,6 +5048,9 @@ var SolanaStreamClient = class extends BaseStreamClient {
|
|
|
5048
5048
|
getProgramId() {
|
|
5049
5049
|
return this.programId.toBase58();
|
|
5050
5050
|
}
|
|
5051
|
+
getAlignedProxyProgramId() {
|
|
5052
|
+
return this.alignedProxyProgram.programId.toBase58();
|
|
5053
|
+
}
|
|
5051
5054
|
/**
|
|
5052
5055
|
* Builds transaction instructions for creating a new stream/vesting contract without creating a transaction.
|
|
5053
5056
|
* All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
|
|
@@ -5185,7 +5188,7 @@ var SolanaStreamClient = class extends BaseStreamClient {
|
|
|
5185
5188
|
floorPrice
|
|
5186
5189
|
} = streamParams;
|
|
5187
5190
|
const { isNative, sender, computeLimit, computePrice, metadataPubKeys } = extParams;
|
|
5188
|
-
common.invariant(
|
|
5191
|
+
common.invariant(priceOracle || !oracleType || oracleType === "none", "Price oracle is required for the specified oracle type");
|
|
5189
5192
|
common.assertHasPublicKey(sender, "Sender's PublicKey is not available, check passed wallet adapter!");
|
|
5190
5193
|
const recipientPublicKey = new web3_js.PublicKey(recipient);
|
|
5191
5194
|
const mintPublicKey = isNative ? splToken.NATIVE_MINT : new web3_js.PublicKey(mint);
|
|
@@ -6276,6 +6279,13 @@ var SolanaStreamClient = class extends BaseStreamClient {
|
|
|
6276
6279
|
const logs = "logs" in err && Array.isArray(err.logs) ? err.logs : void 0;
|
|
6277
6280
|
return extractSolanaErrorCode(err.toString() ?? "Unknown error!", logs);
|
|
6278
6281
|
}
|
|
6282
|
+
/**
|
|
6283
|
+
* Utility function that checks whether the associated stream address is an aligned unlock contract, indicated by whether the sender/creator is a PDA
|
|
6284
|
+
*/
|
|
6285
|
+
isAlignedUnlock(streamPublicKey, senderPublicKey) {
|
|
6286
|
+
const pda = deriveContractPDA(this.alignedProxyProgram.programId, streamPublicKey);
|
|
6287
|
+
return senderPublicKey.equals(pda);
|
|
6288
|
+
}
|
|
6279
6289
|
/**
|
|
6280
6290
|
* Utility function to generate metadata for a Contract or return existing Pubkey
|
|
6281
6291
|
*/
|
|
@@ -6290,13 +6300,6 @@ var SolanaStreamClient = class extends BaseStreamClient {
|
|
|
6290
6300
|
}
|
|
6291
6301
|
return { metadata, metadataPubKey };
|
|
6292
6302
|
}
|
|
6293
|
-
/**
|
|
6294
|
-
* Utility function that checks whether the associated stream address is an aligned unlock contract, indicated by whether the sender/creator is a PDA
|
|
6295
|
-
*/
|
|
6296
|
-
isAlignedUnlock(streamPublicKey, senderPublicKey) {
|
|
6297
|
-
const pda = deriveContractPDA(this.alignedProxyProgram.programId, streamPublicKey);
|
|
6298
|
-
return senderPublicKey.equals(pda);
|
|
6299
|
-
}
|
|
6300
6303
|
/**
|
|
6301
6304
|
* Returns insrtuctions for creating associated token accounts for the provided owners
|
|
6302
6305
|
*/
|