@streamflow/stream 3.0.0-test.2 → 3.0.0-test.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/instructions.js +9 -9
- package/package.json +1 -1
package/dist/instructions.js
CHANGED
|
@@ -61,12 +61,12 @@ var createStreamInstruction = function (data, programId, accounts) {
|
|
|
61
61
|
var encodedUIntArray = new TextEncoder().encode(data.name);
|
|
62
62
|
var streamNameBuffer = buffer_1.Buffer.alloc(64).fill(encodedUIntArray, 0, encodedUIntArray.byteLength);
|
|
63
63
|
var decodedData = {
|
|
64
|
-
start_time: data.start.
|
|
65
|
-
net_amount_deposited: data.depositedAmount.
|
|
66
|
-
period: data.period.
|
|
67
|
-
amount_per_period: data.amountPerPeriod.
|
|
68
|
-
cliff: data.cliff.
|
|
69
|
-
cliff_amount: data.cliffAmount.
|
|
64
|
+
start_time: data.start.toArrayLike(buffer_1.Buffer, "le"),
|
|
65
|
+
net_amount_deposited: data.depositedAmount.toArrayLike(buffer_1.Buffer, "le"),
|
|
66
|
+
period: data.period.toArrayLike(buffer_1.Buffer, "le"),
|
|
67
|
+
amount_per_period: data.amountPerPeriod.toArrayLike(buffer_1.Buffer, "le"),
|
|
68
|
+
cliff: data.cliff.toArrayLike(buffer_1.Buffer, "le"),
|
|
69
|
+
cliff_amount: data.cliffAmount.toArrayLike(buffer_1.Buffer, "le"),
|
|
70
70
|
cancelable_by_sender: data.cancelableBySender,
|
|
71
71
|
cancelable_by_recipient: data.cancelableByRecipient,
|
|
72
72
|
automatic_withdrawal: data.automaticWithdrawal,
|
|
@@ -74,7 +74,7 @@ var createStreamInstruction = function (data, programId, accounts) {
|
|
|
74
74
|
transferable_by_recipient: data.transferableByRecipient,
|
|
75
75
|
can_topup: data.canTopup,
|
|
76
76
|
stream_name: streamNameBuffer,
|
|
77
|
-
withdraw_frequency: data.withdrawFrequency.
|
|
77
|
+
withdraw_frequency: data.withdrawFrequency.toArrayLike(buffer_1.Buffer, "le"),
|
|
78
78
|
};
|
|
79
79
|
var encodeLength = Layout.createStreamLayout.encode(decodedData, bufferData);
|
|
80
80
|
bufferData = bufferData.slice(0, encodeLength);
|
|
@@ -109,7 +109,7 @@ var withdrawStreamInstruction = function (amount, programId, _a) {
|
|
|
109
109
|
{ pubkey: tokenProgram, isSigner: false, isWritable: false },
|
|
110
110
|
];
|
|
111
111
|
var data = buffer_1.Buffer.alloc(Layout.withdrawStreamLayout.span);
|
|
112
|
-
var decodedData = { amount: amount.
|
|
112
|
+
var decodedData = { amount: amount.toArrayLike(buffer_1.Buffer, "le") };
|
|
113
113
|
var encodeLength = Layout.withdrawStreamLayout.encode(decodedData, data);
|
|
114
114
|
data = data.slice(0, encodeLength);
|
|
115
115
|
data = buffer_1.Buffer.concat([
|
|
@@ -194,7 +194,7 @@ var topupStreamInstruction = function (amount, programId, _a) {
|
|
|
194
194
|
{ pubkey: systemProgram, isSigner: false, isWritable: false },
|
|
195
195
|
];
|
|
196
196
|
var data = buffer_1.Buffer.alloc(Layout.topupStreamLayout.span);
|
|
197
|
-
var decodedData = { amount: amount.
|
|
197
|
+
var decodedData = { amount: amount.toArrayLike(buffer_1.Buffer, "le") };
|
|
198
198
|
var encodeLength = Layout.topupStreamLayout.encode(decodedData, data);
|
|
199
199
|
data = data.slice(0, encodeLength);
|
|
200
200
|
data = buffer_1.Buffer.concat([
|
package/package.json
CHANGED