@bench.games/opportunity-markets 0.2.6 → 0.2.8
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/browser/index.js +128 -134
- package/dist/index.cjs +14 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -12
- package/dist/index.d.ts +9 -12
- package/dist/index.js +128 -134
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -648,7 +648,8 @@ function getCentralStateEncoder() {
|
|
|
648
648
|
["minOptionDeposit", (0, import_kit2.getU64Encoder)()],
|
|
649
649
|
["protocolFeeBp", (0, import_kit2.getU16Encoder)()],
|
|
650
650
|
["feeRecipient", (0, import_kit2.getAddressEncoder)()],
|
|
651
|
-
["minimumInitialRevealPeriod", (0, import_kit2.getU64Encoder)()]
|
|
651
|
+
["minimumInitialRevealPeriod", (0, import_kit2.getU64Encoder)()],
|
|
652
|
+
["reserved", (0, import_kit2.getArrayEncoder)((0, import_kit2.getU8Encoder)(), { size: 128 })]
|
|
652
653
|
]),
|
|
653
654
|
(value) => ({ ...value, discriminator: CENTRAL_STATE_DISCRIMINATOR })
|
|
654
655
|
);
|
|
@@ -662,7 +663,8 @@ function getCentralStateDecoder() {
|
|
|
662
663
|
["minOptionDeposit", (0, import_kit2.getU64Decoder)()],
|
|
663
664
|
["protocolFeeBp", (0, import_kit2.getU16Decoder)()],
|
|
664
665
|
["feeRecipient", (0, import_kit2.getAddressDecoder)()],
|
|
665
|
-
["minimumInitialRevealPeriod", (0, import_kit2.getU64Decoder)()]
|
|
666
|
+
["minimumInitialRevealPeriod", (0, import_kit2.getU64Decoder)()],
|
|
667
|
+
["reserved", (0, import_kit2.getArrayDecoder)((0, import_kit2.getU8Decoder)(), { size: 128 })]
|
|
666
668
|
]);
|
|
667
669
|
}
|
|
668
670
|
function getCentralStateCodec() {
|
|
@@ -2513,10 +2515,10 @@ function getTokenVaultEncoder() {
|
|
|
2513
2515
|
(0, import_kit49.getStructEncoder)([
|
|
2514
2516
|
["discriminator", (0, import_kit49.fixEncoderSize)((0, import_kit49.getBytesEncoder)(), 8)],
|
|
2515
2517
|
["bump", (0, import_kit49.getU8Encoder)()],
|
|
2516
|
-
["fundManager", (0, import_kit49.getAddressEncoder)()],
|
|
2517
2518
|
["mint", (0, import_kit49.getAddressEncoder)()],
|
|
2518
2519
|
["collectedFees", (0, import_kit49.getU64Encoder)()],
|
|
2519
|
-
["protocolFeeBp", (0, import_kit49.getU16Encoder)()]
|
|
2520
|
+
["protocolFeeBp", (0, import_kit49.getU16Encoder)()],
|
|
2521
|
+
["reserved", (0, import_kit49.getArrayEncoder)((0, import_kit49.getU8Encoder)(), { size: 128 })]
|
|
2520
2522
|
]),
|
|
2521
2523
|
(value) => ({ ...value, discriminator: TOKEN_VAULT_DISCRIMINATOR })
|
|
2522
2524
|
);
|
|
@@ -2525,10 +2527,10 @@ function getTokenVaultDecoder() {
|
|
|
2525
2527
|
return (0, import_kit49.getStructDecoder)([
|
|
2526
2528
|
["discriminator", (0, import_kit49.fixDecoderSize)((0, import_kit49.getBytesDecoder)(), 8)],
|
|
2527
2529
|
["bump", (0, import_kit49.getU8Decoder)()],
|
|
2528
|
-
["fundManager", (0, import_kit49.getAddressDecoder)()],
|
|
2529
2530
|
["mint", (0, import_kit49.getAddressDecoder)()],
|
|
2530
2531
|
["collectedFees", (0, import_kit49.getU64Decoder)()],
|
|
2531
|
-
["protocolFeeBp", (0, import_kit49.getU16Decoder)()]
|
|
2532
|
+
["protocolFeeBp", (0, import_kit49.getU16Decoder)()],
|
|
2533
|
+
["reserved", (0, import_kit49.getArrayDecoder)((0, import_kit49.getU8Decoder)(), { size: 128 })]
|
|
2532
2534
|
]);
|
|
2533
2535
|
}
|
|
2534
2536
|
function getTokenVaultCodec() {
|
|
@@ -4882,17 +4884,13 @@ function getInitTokenVaultDiscriminatorBytes() {
|
|
|
4882
4884
|
}
|
|
4883
4885
|
function getInitTokenVaultInstructionDataEncoder() {
|
|
4884
4886
|
return (0, import_kit64.transformEncoder)(
|
|
4885
|
-
(0, import_kit64.getStructEncoder)([
|
|
4886
|
-
["discriminator", (0, import_kit64.fixEncoderSize)((0, import_kit64.getBytesEncoder)(), 8)],
|
|
4887
|
-
["fundManager", (0, import_kit64.getAddressEncoder)()]
|
|
4888
|
-
]),
|
|
4887
|
+
(0, import_kit64.getStructEncoder)([["discriminator", (0, import_kit64.fixEncoderSize)((0, import_kit64.getBytesEncoder)(), 8)]]),
|
|
4889
4888
|
(value) => ({ ...value, discriminator: INIT_TOKEN_VAULT_DISCRIMINATOR })
|
|
4890
4889
|
);
|
|
4891
4890
|
}
|
|
4892
4891
|
function getInitTokenVaultInstructionDataDecoder() {
|
|
4893
4892
|
return (0, import_kit64.getStructDecoder)([
|
|
4894
|
-
["discriminator", (0, import_kit64.fixDecoderSize)((0, import_kit64.getBytesDecoder)(), 8)]
|
|
4895
|
-
["fundManager", (0, import_kit64.getAddressDecoder)()]
|
|
4893
|
+
["discriminator", (0, import_kit64.fixDecoderSize)((0, import_kit64.getBytesDecoder)(), 8)]
|
|
4896
4894
|
]);
|
|
4897
4895
|
}
|
|
4898
4896
|
function getInitTokenVaultInstructionDataCodec() {
|
|
@@ -4911,7 +4909,6 @@ async function getInitTokenVaultInstructionAsync(input, config) {
|
|
|
4911
4909
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
4912
4910
|
};
|
|
4913
4911
|
const accounts = originalAccounts;
|
|
4914
|
-
const args = { ...input };
|
|
4915
4912
|
if (!accounts.tokenVault.value) {
|
|
4916
4913
|
accounts.tokenVault.value = await (0, import_kit64.getProgramDerivedAddress)({
|
|
4917
4914
|
programAddress,
|
|
@@ -4959,9 +4956,7 @@ async function getInitTokenVaultInstructionAsync(input, config) {
|
|
|
4959
4956
|
getAccountMeta(accounts.centralState),
|
|
4960
4957
|
getAccountMeta(accounts.systemProgram)
|
|
4961
4958
|
],
|
|
4962
|
-
data: getInitTokenVaultInstructionDataEncoder().encode(
|
|
4963
|
-
args
|
|
4964
|
-
),
|
|
4959
|
+
data: getInitTokenVaultInstructionDataEncoder().encode({}),
|
|
4965
4960
|
programAddress
|
|
4966
4961
|
});
|
|
4967
4962
|
}
|
|
@@ -4975,7 +4970,6 @@ function getInitTokenVaultInstruction(input, config) {
|
|
|
4975
4970
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
4976
4971
|
};
|
|
4977
4972
|
const accounts = originalAccounts;
|
|
4978
|
-
const args = { ...input };
|
|
4979
4973
|
if (!accounts.systemProgram.value) {
|
|
4980
4974
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
4981
4975
|
}
|
|
@@ -4988,9 +4982,7 @@ function getInitTokenVaultInstruction(input, config) {
|
|
|
4988
4982
|
getAccountMeta(accounts.centralState),
|
|
4989
4983
|
getAccountMeta(accounts.systemProgram)
|
|
4990
4984
|
],
|
|
4991
|
-
data: getInitTokenVaultInstructionDataEncoder().encode(
|
|
4992
|
-
args
|
|
4993
|
-
),
|
|
4985
|
+
data: getInitTokenVaultInstructionDataEncoder().encode({}),
|
|
4994
4986
|
programAddress
|
|
4995
4987
|
});
|
|
4996
4988
|
}
|
|
@@ -6974,12 +6966,11 @@ function parseWithdrawRewardInstruction(instruction) {
|
|
|
6974
6966
|
|
|
6975
6967
|
// src/instructions/initTokenVault.ts
|
|
6976
6968
|
async function initTokenVault(input) {
|
|
6977
|
-
const { programAddress, payer, tokenMint
|
|
6969
|
+
const { programAddress, payer, tokenMint } = input;
|
|
6978
6970
|
return getInitTokenVaultInstructionAsync(
|
|
6979
6971
|
{
|
|
6980
6972
|
payer,
|
|
6981
|
-
tokenMint
|
|
6982
|
-
fundManager
|
|
6973
|
+
tokenMint
|
|
6983
6974
|
},
|
|
6984
6975
|
programAddress ? { programAddress } : void 0
|
|
6985
6976
|
);
|