@streamflow/stream 3.0.15 → 3.0.16
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/instructions.d.ts +1 -0
- package/dist/instructions.js +11 -1
- package/package.json +1 -1
package/dist/instructions.d.ts
CHANGED
package/dist/instructions.js
CHANGED
|
@@ -176,6 +176,13 @@ var createUncheckedStreamInstruction = function (data, programId, accounts) {
|
|
|
176
176
|
{ pubkey: accounts.tokenProgram, isSigner: false, isWritable: false },
|
|
177
177
|
{ pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
|
|
178
178
|
];
|
|
179
|
+
if (accounts.payer) {
|
|
180
|
+
keys.unshift({
|
|
181
|
+
pubkey: accounts.payer,
|
|
182
|
+
isSigner: true,
|
|
183
|
+
isWritable: true,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
179
186
|
var bufferData = buffer_1.Buffer.alloc(Layout.createUncheckedStreamLayout.span);
|
|
180
187
|
var encodedUIntArray = new TextEncoder().encode(data.name);
|
|
181
188
|
var streamNameBuffer = buffer_1.Buffer.alloc(64).fill(encodedUIntArray, 0, encodedUIntArray.byteLength);
|
|
@@ -201,8 +208,11 @@ var createUncheckedStreamInstruction = function (data, programId, accounts) {
|
|
|
201
208
|
};
|
|
202
209
|
var encodeLength = Layout.createUncheckedStreamLayout.encode(decodedData, bufferData);
|
|
203
210
|
bufferData = bufferData.slice(0, encodeLength);
|
|
211
|
+
var digest = accounts.payer
|
|
212
|
+
? js_sha256_1.sha256.digest("global:create_unchecked_with_payer")
|
|
213
|
+
: js_sha256_1.sha256.digest("global:create_unchecked");
|
|
204
214
|
bufferData = buffer_1.Buffer.concat([
|
|
205
|
-
buffer_1.Buffer.from(
|
|
215
|
+
buffer_1.Buffer.from(digest).slice(0, 8),
|
|
206
216
|
bufferData,
|
|
207
217
|
buffer_1.Buffer.alloc(10),
|
|
208
218
|
]);
|
package/package.json
CHANGED