@bench.games/opportunity-markets 0.2.2 → 0.2.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/browser/index.js +28 -24
- package/dist/index.cjs +12 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -9
- package/dist/index.d.ts +15 -9
- package/dist/index.js +28 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -255,6 +255,7 @@ type MarketCreatedEvent = {
|
|
|
255
255
|
rewardAmount: bigint;
|
|
256
256
|
timeToStake: bigint;
|
|
257
257
|
timeToReveal: bigint;
|
|
258
|
+
earlinessCutoffSeconds: bigint;
|
|
258
259
|
marketAuthority: Option<Address>;
|
|
259
260
|
authorizedReaderPubkey: Array<number>;
|
|
260
261
|
unstakeDelaySeconds: bigint;
|
|
@@ -269,6 +270,7 @@ type MarketCreatedEventArgs = {
|
|
|
269
270
|
rewardAmount: number | bigint;
|
|
270
271
|
timeToStake: number | bigint;
|
|
271
272
|
timeToReveal: number | bigint;
|
|
273
|
+
earlinessCutoffSeconds: number | bigint;
|
|
272
274
|
marketAuthority: OptionOrNullable<Address>;
|
|
273
275
|
authorizedReaderPubkey: Array<number>;
|
|
274
276
|
unstakeDelaySeconds: number | bigint;
|
|
@@ -860,8 +862,10 @@ type TallyIncrementedEvent = {
|
|
|
860
862
|
market: Address;
|
|
861
863
|
stakeAccount: Address;
|
|
862
864
|
optionId: bigint;
|
|
863
|
-
|
|
865
|
+
userStake: bigint;
|
|
864
866
|
userScore: bigint;
|
|
867
|
+
totalScore: bigint;
|
|
868
|
+
totalStake: bigint;
|
|
865
869
|
timestamp: bigint;
|
|
866
870
|
};
|
|
867
871
|
type TallyIncrementedEventArgs = {
|
|
@@ -869,8 +873,10 @@ type TallyIncrementedEventArgs = {
|
|
|
869
873
|
market: Address;
|
|
870
874
|
stakeAccount: Address;
|
|
871
875
|
optionId: number | bigint;
|
|
872
|
-
|
|
876
|
+
userStake: number | bigint;
|
|
873
877
|
userScore: number | bigint;
|
|
878
|
+
totalScore: number | bigint;
|
|
879
|
+
totalStake: number | bigint;
|
|
874
880
|
timestamp: number | bigint;
|
|
875
881
|
};
|
|
876
882
|
declare function getTallyIncrementedEventEncoder(): FixedSizeEncoder<TallyIncrementedEventArgs>;
|
|
@@ -1293,19 +1299,19 @@ type OpportunityMarketOption = {
|
|
|
1293
1299
|
bump: number;
|
|
1294
1300
|
id: bigint;
|
|
1295
1301
|
/** Total staked for this option (tally) */
|
|
1296
|
-
totalStaked:
|
|
1297
|
-
totalScore:
|
|
1302
|
+
totalStaked: bigint;
|
|
1303
|
+
totalScore: bigint;
|
|
1298
1304
|
};
|
|
1299
1305
|
type OpportunityMarketOptionArgs = {
|
|
1300
1306
|
bump: number;
|
|
1301
1307
|
id: number | bigint;
|
|
1302
1308
|
/** Total staked for this option (tally) */
|
|
1303
|
-
totalStaked:
|
|
1304
|
-
totalScore:
|
|
1309
|
+
totalStaked: number | bigint;
|
|
1310
|
+
totalScore: number | bigint;
|
|
1305
1311
|
};
|
|
1306
|
-
declare function getOpportunityMarketOptionEncoder():
|
|
1307
|
-
declare function getOpportunityMarketOptionDecoder():
|
|
1308
|
-
declare function getOpportunityMarketOptionCodec():
|
|
1312
|
+
declare function getOpportunityMarketOptionEncoder(): FixedSizeEncoder<OpportunityMarketOptionArgs>;
|
|
1313
|
+
declare function getOpportunityMarketOptionDecoder(): FixedSizeDecoder<OpportunityMarketOption>;
|
|
1314
|
+
declare function getOpportunityMarketOptionCodec(): FixedSizeCodec<OpportunityMarketOptionArgs, OpportunityMarketOption>;
|
|
1309
1315
|
declare function decodeOpportunityMarketOption<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<OpportunityMarketOption, TAddress>;
|
|
1310
1316
|
declare function decodeOpportunityMarketOption<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<OpportunityMarketOption, TAddress>;
|
|
1311
1317
|
declare function fetchOpportunityMarketOption<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<OpportunityMarketOption, TAddress>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -255,6 +255,7 @@ type MarketCreatedEvent = {
|
|
|
255
255
|
rewardAmount: bigint;
|
|
256
256
|
timeToStake: bigint;
|
|
257
257
|
timeToReveal: bigint;
|
|
258
|
+
earlinessCutoffSeconds: bigint;
|
|
258
259
|
marketAuthority: Option<Address>;
|
|
259
260
|
authorizedReaderPubkey: Array<number>;
|
|
260
261
|
unstakeDelaySeconds: bigint;
|
|
@@ -269,6 +270,7 @@ type MarketCreatedEventArgs = {
|
|
|
269
270
|
rewardAmount: number | bigint;
|
|
270
271
|
timeToStake: number | bigint;
|
|
271
272
|
timeToReveal: number | bigint;
|
|
273
|
+
earlinessCutoffSeconds: number | bigint;
|
|
272
274
|
marketAuthority: OptionOrNullable<Address>;
|
|
273
275
|
authorizedReaderPubkey: Array<number>;
|
|
274
276
|
unstakeDelaySeconds: number | bigint;
|
|
@@ -860,8 +862,10 @@ type TallyIncrementedEvent = {
|
|
|
860
862
|
market: Address;
|
|
861
863
|
stakeAccount: Address;
|
|
862
864
|
optionId: bigint;
|
|
863
|
-
|
|
865
|
+
userStake: bigint;
|
|
864
866
|
userScore: bigint;
|
|
867
|
+
totalScore: bigint;
|
|
868
|
+
totalStake: bigint;
|
|
865
869
|
timestamp: bigint;
|
|
866
870
|
};
|
|
867
871
|
type TallyIncrementedEventArgs = {
|
|
@@ -869,8 +873,10 @@ type TallyIncrementedEventArgs = {
|
|
|
869
873
|
market: Address;
|
|
870
874
|
stakeAccount: Address;
|
|
871
875
|
optionId: number | bigint;
|
|
872
|
-
|
|
876
|
+
userStake: number | bigint;
|
|
873
877
|
userScore: number | bigint;
|
|
878
|
+
totalScore: number | bigint;
|
|
879
|
+
totalStake: number | bigint;
|
|
874
880
|
timestamp: number | bigint;
|
|
875
881
|
};
|
|
876
882
|
declare function getTallyIncrementedEventEncoder(): FixedSizeEncoder<TallyIncrementedEventArgs>;
|
|
@@ -1293,19 +1299,19 @@ type OpportunityMarketOption = {
|
|
|
1293
1299
|
bump: number;
|
|
1294
1300
|
id: bigint;
|
|
1295
1301
|
/** Total staked for this option (tally) */
|
|
1296
|
-
totalStaked:
|
|
1297
|
-
totalScore:
|
|
1302
|
+
totalStaked: bigint;
|
|
1303
|
+
totalScore: bigint;
|
|
1298
1304
|
};
|
|
1299
1305
|
type OpportunityMarketOptionArgs = {
|
|
1300
1306
|
bump: number;
|
|
1301
1307
|
id: number | bigint;
|
|
1302
1308
|
/** Total staked for this option (tally) */
|
|
1303
|
-
totalStaked:
|
|
1304
|
-
totalScore:
|
|
1309
|
+
totalStaked: number | bigint;
|
|
1310
|
+
totalScore: number | bigint;
|
|
1305
1311
|
};
|
|
1306
|
-
declare function getOpportunityMarketOptionEncoder():
|
|
1307
|
-
declare function getOpportunityMarketOptionDecoder():
|
|
1308
|
-
declare function getOpportunityMarketOptionCodec():
|
|
1312
|
+
declare function getOpportunityMarketOptionEncoder(): FixedSizeEncoder<OpportunityMarketOptionArgs>;
|
|
1313
|
+
declare function getOpportunityMarketOptionDecoder(): FixedSizeDecoder<OpportunityMarketOption>;
|
|
1314
|
+
declare function getOpportunityMarketOptionCodec(): FixedSizeCodec<OpportunityMarketOptionArgs, OpportunityMarketOption>;
|
|
1309
1315
|
declare function decodeOpportunityMarketOption<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<OpportunityMarketOption, TAddress>;
|
|
1310
1316
|
declare function decodeOpportunityMarketOption<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<OpportunityMarketOption, TAddress>;
|
|
1311
1317
|
declare function fetchOpportunityMarketOption<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<OpportunityMarketOption, TAddress>>;
|
package/dist/index.js
CHANGED
|
@@ -473,6 +473,7 @@ function getMarketCreatedEventEncoder() {
|
|
|
473
473
|
["rewardAmount", getU64Encoder4()],
|
|
474
474
|
["timeToStake", getU64Encoder4()],
|
|
475
475
|
["timeToReveal", getU64Encoder4()],
|
|
476
|
+
["earlinessCutoffSeconds", getU64Encoder4()],
|
|
476
477
|
["marketAuthority", getOptionEncoder(getAddressEncoder3())],
|
|
477
478
|
["authorizedReaderPubkey", getArrayEncoder3(getU8Encoder4(), { size: 32 })],
|
|
478
479
|
["unstakeDelaySeconds", getU64Encoder4()],
|
|
@@ -489,6 +490,7 @@ function getMarketCreatedEventDecoder() {
|
|
|
489
490
|
["rewardAmount", getU64Decoder4()],
|
|
490
491
|
["timeToStake", getU64Decoder4()],
|
|
491
492
|
["timeToReveal", getU64Decoder4()],
|
|
493
|
+
["earlinessCutoffSeconds", getU64Decoder4()],
|
|
492
494
|
["marketAuthority", getOptionDecoder(getAddressDecoder3())],
|
|
493
495
|
["authorizedReaderPubkey", getArrayDecoder3(getU8Decoder4(), { size: 32 })],
|
|
494
496
|
["unstakeDelaySeconds", getU64Decoder4()],
|
|
@@ -1299,8 +1301,10 @@ function getTallyIncrementedEventEncoder() {
|
|
|
1299
1301
|
["market", getAddressEncoder17()],
|
|
1300
1302
|
["stakeAccount", getAddressEncoder17()],
|
|
1301
1303
|
["optionId", getU64Encoder16()],
|
|
1302
|
-
["
|
|
1304
|
+
["userStake", getU64Encoder16()],
|
|
1303
1305
|
["userScore", getU64Encoder16()],
|
|
1306
|
+
["totalScore", getU64Encoder16()],
|
|
1307
|
+
["totalStake", getU64Encoder16()],
|
|
1304
1308
|
["timestamp", getI64Encoder15()]
|
|
1305
1309
|
]);
|
|
1306
1310
|
}
|
|
@@ -1310,8 +1314,10 @@ function getTallyIncrementedEventDecoder() {
|
|
|
1310
1314
|
["market", getAddressDecoder17()],
|
|
1311
1315
|
["stakeAccount", getAddressDecoder17()],
|
|
1312
1316
|
["optionId", getU64Decoder16()],
|
|
1313
|
-
["
|
|
1317
|
+
["userStake", getU64Decoder16()],
|
|
1314
1318
|
["userScore", getU64Decoder16()],
|
|
1319
|
+
["totalScore", getU64Decoder16()],
|
|
1320
|
+
["totalStake", getU64Decoder16()],
|
|
1315
1321
|
["timestamp", getI64Decoder15()]
|
|
1316
1322
|
]);
|
|
1317
1323
|
}
|
|
@@ -2198,8 +2204,6 @@ import {
|
|
|
2198
2204
|
fixEncoderSize as fixEncoderSize9,
|
|
2199
2205
|
getBytesDecoder as getBytesDecoder9,
|
|
2200
2206
|
getBytesEncoder as getBytesEncoder9,
|
|
2201
|
-
getOptionDecoder as getOptionDecoder6,
|
|
2202
|
-
getOptionEncoder as getOptionEncoder6,
|
|
2203
2207
|
getStructDecoder as getStructDecoder41,
|
|
2204
2208
|
getStructEncoder as getStructEncoder41,
|
|
2205
2209
|
getU64Decoder as getU64Decoder24,
|
|
@@ -2229,8 +2233,8 @@ function getOpportunityMarketOptionEncoder() {
|
|
|
2229
2233
|
["discriminator", fixEncoderSize9(getBytesEncoder9(), 8)],
|
|
2230
2234
|
["bump", getU8Encoder18()],
|
|
2231
2235
|
["id", getU64Encoder24()],
|
|
2232
|
-
["totalStaked",
|
|
2233
|
-
["totalScore",
|
|
2236
|
+
["totalStaked", getU64Encoder24()],
|
|
2237
|
+
["totalScore", getU64Encoder24()]
|
|
2234
2238
|
]),
|
|
2235
2239
|
(value) => ({
|
|
2236
2240
|
...value,
|
|
@@ -2243,8 +2247,8 @@ function getOpportunityMarketOptionDecoder() {
|
|
|
2243
2247
|
["discriminator", fixDecoderSize9(getBytesDecoder9(), 8)],
|
|
2244
2248
|
["bump", getU8Decoder18()],
|
|
2245
2249
|
["id", getU64Decoder24()],
|
|
2246
|
-
["totalStaked",
|
|
2247
|
-
["totalScore",
|
|
2250
|
+
["totalStaked", getU64Decoder24()],
|
|
2251
|
+
["totalScore", getU64Decoder24()]
|
|
2248
2252
|
]);
|
|
2249
2253
|
}
|
|
2250
2254
|
function getOpportunityMarketOptionCodec() {
|
|
@@ -2306,8 +2310,8 @@ import {
|
|
|
2306
2310
|
getBooleanEncoder as getBooleanEncoder6,
|
|
2307
2311
|
getBytesDecoder as getBytesDecoder10,
|
|
2308
2312
|
getBytesEncoder as getBytesEncoder10,
|
|
2309
|
-
getOptionDecoder as
|
|
2310
|
-
getOptionEncoder as
|
|
2313
|
+
getOptionDecoder as getOptionDecoder6,
|
|
2314
|
+
getOptionEncoder as getOptionEncoder6,
|
|
2311
2315
|
getStructDecoder as getStructDecoder42,
|
|
2312
2316
|
getStructEncoder as getStructEncoder42,
|
|
2313
2317
|
getU128Decoder as getU128Decoder3,
|
|
@@ -2348,13 +2352,13 @@ function getStakeAccountEncoder() {
|
|
|
2348
2352
|
getArrayEncoder13(getU8Encoder19(), { size: 32 })
|
|
2349
2353
|
],
|
|
2350
2354
|
["stateNonceDisclosure", getU128Encoder3()],
|
|
2351
|
-
["stakedAtTimestamp",
|
|
2352
|
-
["unstakedAtTimestamp",
|
|
2355
|
+
["stakedAtTimestamp", getOptionEncoder6(getU64Encoder25())],
|
|
2356
|
+
["unstakedAtTimestamp", getOptionEncoder6(getU64Encoder25())],
|
|
2353
2357
|
["amount", getU64Encoder25()],
|
|
2354
|
-
["revealedOption",
|
|
2355
|
-
["score",
|
|
2358
|
+
["revealedOption", getOptionEncoder6(getU64Encoder25())],
|
|
2359
|
+
["score", getOptionEncoder6(getU64Encoder25())],
|
|
2356
2360
|
["totalIncremented", getBooleanEncoder6()],
|
|
2357
|
-
["unstakeableAtTimestamp",
|
|
2361
|
+
["unstakeableAtTimestamp", getOptionEncoder6(getU64Encoder25())],
|
|
2358
2362
|
["locked", getBooleanEncoder6()],
|
|
2359
2363
|
["stakeReclaimed", getBooleanEncoder6()]
|
|
2360
2364
|
]),
|
|
@@ -2375,13 +2379,13 @@ function getStakeAccountDecoder() {
|
|
|
2375
2379
|
getArrayDecoder13(getU8Decoder19(), { size: 32 })
|
|
2376
2380
|
],
|
|
2377
2381
|
["stateNonceDisclosure", getU128Decoder3()],
|
|
2378
|
-
["stakedAtTimestamp",
|
|
2379
|
-
["unstakedAtTimestamp",
|
|
2382
|
+
["stakedAtTimestamp", getOptionDecoder6(getU64Decoder25())],
|
|
2383
|
+
["unstakedAtTimestamp", getOptionDecoder6(getU64Decoder25())],
|
|
2380
2384
|
["amount", getU64Decoder25()],
|
|
2381
|
-
["revealedOption",
|
|
2382
|
-
["score",
|
|
2385
|
+
["revealedOption", getOptionDecoder6(getU64Decoder25())],
|
|
2386
|
+
["score", getOptionDecoder6(getU64Decoder25())],
|
|
2383
2387
|
["totalIncremented", getBooleanDecoder6()],
|
|
2384
|
-
["unstakeableAtTimestamp",
|
|
2388
|
+
["unstakeableAtTimestamp", getOptionDecoder6(getU64Decoder25())],
|
|
2385
2389
|
["locked", getBooleanDecoder6()],
|
|
2386
2390
|
["stakeReclaimed", getBooleanDecoder6()]
|
|
2387
2391
|
]);
|
|
@@ -3550,8 +3554,8 @@ import {
|
|
|
3550
3554
|
getBooleanEncoder as getBooleanEncoder7,
|
|
3551
3555
|
getBytesDecoder as getBytesDecoder15,
|
|
3552
3556
|
getBytesEncoder as getBytesEncoder16,
|
|
3553
|
-
getOptionDecoder as
|
|
3554
|
-
getOptionEncoder as
|
|
3557
|
+
getOptionDecoder as getOptionDecoder7,
|
|
3558
|
+
getOptionEncoder as getOptionEncoder7,
|
|
3555
3559
|
getProgramDerivedAddress as getProgramDerivedAddress4,
|
|
3556
3560
|
getStructDecoder as getStructDecoder47,
|
|
3557
3561
|
getStructEncoder as getStructEncoder47,
|
|
@@ -3584,7 +3588,7 @@ function getCreateMarketInstructionDataEncoder() {
|
|
|
3584
3588
|
["rewardAmount", getU64Encoder29()],
|
|
3585
3589
|
["timeToStake", getU64Encoder29()],
|
|
3586
3590
|
["timeToReveal", getU64Encoder29()],
|
|
3587
|
-
["marketAuthority",
|
|
3591
|
+
["marketAuthority", getOptionEncoder7(getAddressEncoder30())],
|
|
3588
3592
|
["unstakeDelaySeconds", getU64Encoder29()],
|
|
3589
3593
|
["authorizedReaderPubkey", getArrayEncoder14(getU8Encoder21(), { size: 32 })],
|
|
3590
3594
|
["allowClosingEarly", getBooleanEncoder7()]
|
|
@@ -3599,7 +3603,7 @@ function getCreateMarketInstructionDataDecoder() {
|
|
|
3599
3603
|
["rewardAmount", getU64Decoder29()],
|
|
3600
3604
|
["timeToStake", getU64Decoder29()],
|
|
3601
3605
|
["timeToReveal", getU64Decoder29()],
|
|
3602
|
-
["marketAuthority",
|
|
3606
|
+
["marketAuthority", getOptionDecoder7(getAddressDecoder27())],
|
|
3603
3607
|
["unstakeDelaySeconds", getU64Decoder29()],
|
|
3604
3608
|
["authorizedReaderPubkey", getArrayDecoder14(getU8Decoder21(), { size: 32 })],
|
|
3605
3609
|
["allowClosingEarly", getBooleanDecoder7()]
|