@bench.games/opportunity-markets 0.1.18 → 0.1.20
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 +6 -1
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -3389,7 +3389,7 @@ import {
|
|
|
3389
3389
|
fixEncoderSize as fixEncoderSize13,
|
|
3390
3390
|
getBytesEncoder as getBytesEncoder13
|
|
3391
3391
|
} from "@solana/kit";
|
|
3392
|
-
var OPPORTUNITY_MARKET_PROGRAM_ADDRESS = "
|
|
3392
|
+
var OPPORTUNITY_MARKET_PROGRAM_ADDRESS = "bncZ1gDqgqhSWFzcxjeMoCtqN7odS8wYn1nS5tXZ9jA";
|
|
3393
3393
|
var OpportunityMarketAccount = /* @__PURE__ */ ((OpportunityMarketAccount2) => {
|
|
3394
3394
|
OpportunityMarketAccount2[OpportunityMarketAccount2["ArciumSignerAccount"] = 0] = "ArciumSignerAccount";
|
|
3395
3395
|
OpportunityMarketAccount2[OpportunityMarketAccount2["CentralState"] = 1] = "CentralState";
|
|
@@ -11564,6 +11564,7 @@ var awaitComputationFinalization = async (rpc, computationOffset, options) => {
|
|
|
11564
11564
|
|
|
11565
11565
|
// src/x25519/keypair.ts
|
|
11566
11566
|
import { RescueCipher, x25519 } from "@arcium-hq/client";
|
|
11567
|
+
import { BN as BN3 } from "bn.js";
|
|
11567
11568
|
import { createHash } from "crypto";
|
|
11568
11569
|
function generateX25519Keypair() {
|
|
11569
11570
|
const secretKey = x25519.utils.randomSecretKey();
|
|
@@ -11582,6 +11583,9 @@ function createCipher(userSecretKey, mxePublicKey) {
|
|
|
11582
11583
|
const sharedSecret = deriveSharedSecret(userSecretKey, mxePublicKey);
|
|
11583
11584
|
return new RescueCipher(sharedSecret);
|
|
11584
11585
|
}
|
|
11586
|
+
function nonceToBytes(nonce) {
|
|
11587
|
+
return Uint8Array.from(new BN3(nonce.toString()).toArray("le", 16));
|
|
11588
|
+
}
|
|
11585
11589
|
export {
|
|
11586
11590
|
ADD_MARKET_OPTION_AS_CREATOR_DISCRIMINATOR,
|
|
11587
11591
|
ADD_MARKET_OPTION_DISCRIMINATOR,
|
|
@@ -12187,6 +12191,7 @@ export {
|
|
|
12187
12191
|
initTokenVault,
|
|
12188
12192
|
isCircuitSource,
|
|
12189
12193
|
isOpportunityMarketError,
|
|
12194
|
+
nonceToBytes,
|
|
12190
12195
|
openMarket,
|
|
12191
12196
|
parseAddMarketOptionAsCreatorInstruction,
|
|
12192
12197
|
parseAddMarketOptionInstruction,
|
package/dist/index.cjs
CHANGED
|
@@ -634,6 +634,7 @@ __export(index_exports, {
|
|
|
634
634
|
initTokenVault: () => initTokenVault,
|
|
635
635
|
isCircuitSource: () => isCircuitSource,
|
|
636
636
|
isOpportunityMarketError: () => isOpportunityMarketError,
|
|
637
|
+
nonceToBytes: () => nonceToBytes,
|
|
637
638
|
openMarket: () => openMarket,
|
|
638
639
|
parseAddMarketOptionAsCreatorInstruction: () => parseAddMarketOptionAsCreatorInstruction,
|
|
639
640
|
parseAddMarketOptionInstruction: () => parseAddMarketOptionInstruction,
|
|
@@ -3292,7 +3293,7 @@ var import_kit66 = require("@solana/kit");
|
|
|
3292
3293
|
|
|
3293
3294
|
// src/generated/programs/opportunityMarket.ts
|
|
3294
3295
|
var import_kit65 = require("@solana/kit");
|
|
3295
|
-
var OPPORTUNITY_MARKET_PROGRAM_ADDRESS = "
|
|
3296
|
+
var OPPORTUNITY_MARKET_PROGRAM_ADDRESS = "bncZ1gDqgqhSWFzcxjeMoCtqN7odS8wYn1nS5tXZ9jA";
|
|
3296
3297
|
var OpportunityMarketAccount = /* @__PURE__ */ ((OpportunityMarketAccount2) => {
|
|
3297
3298
|
OpportunityMarketAccount2[OpportunityMarketAccount2["ArciumSignerAccount"] = 0] = "ArciumSignerAccount";
|
|
3298
3299
|
OpportunityMarketAccount2[OpportunityMarketAccount2["CentralState"] = 1] = "CentralState";
|
|
@@ -10873,6 +10874,7 @@ var awaitComputationFinalization = async (rpc, computationOffset, options) => {
|
|
|
10873
10874
|
|
|
10874
10875
|
// src/x25519/keypair.ts
|
|
10875
10876
|
var import_client3 = require("@arcium-hq/client");
|
|
10877
|
+
var import_bn3 = require("bn.js");
|
|
10876
10878
|
var import_crypto2 = require("crypto");
|
|
10877
10879
|
function generateX25519Keypair() {
|
|
10878
10880
|
const secretKey = import_client3.x25519.utils.randomSecretKey();
|
|
@@ -10891,6 +10893,9 @@ function createCipher(userSecretKey, mxePublicKey) {
|
|
|
10891
10893
|
const sharedSecret = deriveSharedSecret(userSecretKey, mxePublicKey);
|
|
10892
10894
|
return new import_client3.RescueCipher(sharedSecret);
|
|
10893
10895
|
}
|
|
10896
|
+
function nonceToBytes(nonce) {
|
|
10897
|
+
return Uint8Array.from(new import_bn3.BN(nonce.toString()).toArray("le", 16));
|
|
10898
|
+
}
|
|
10894
10899
|
// Annotate the CommonJS export names for ESM import in node:
|
|
10895
10900
|
0 && (module.exports = {
|
|
10896
10901
|
ADD_MARKET_OPTION_AS_CREATOR_DISCRIMINATOR,
|
|
@@ -11497,6 +11502,7 @@ function createCipher(userSecretKey, mxePublicKey) {
|
|
|
11497
11502
|
initTokenVault,
|
|
11498
11503
|
isCircuitSource,
|
|
11499
11504
|
isOpportunityMarketError,
|
|
11505
|
+
nonceToBytes,
|
|
11500
11506
|
openMarket,
|
|
11501
11507
|
parseAddMarketOptionAsCreatorInstruction,
|
|
11502
11508
|
parseAddMarketOptionInstruction,
|