@aurigami/sdk 1.12.0-beta1 → 1.12.0-beta2

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.
@@ -1,11 +1,14 @@
1
+ import { TypedEvent } from '@aurigami/contracts/typechain/common';
1
2
  import { Provider } from '@ethersproject/abstract-provider';
2
3
  import BigNumber from 'bignumber.js';
4
+ import { Result } from 'ethers/lib/utils';
3
5
  import { Address } from '../types';
4
6
  export declare function assert(condition: boolean, message?: string): void;
5
7
  export declare function formatObject(object: Object): string;
6
8
  export declare function decimalFactor(decimal: number): string;
7
9
  export declare const isSameAddress: (address1: Address, address2: Address) => boolean;
8
10
  export declare const getCurrentTimestamp: () => number;
11
+ export declare function sleep(duration: number): Promise<void>;
9
12
  export declare function validateAndParseAddress(address: Address): Address;
10
13
  export declare function getDecimal(address: Address): number;
11
14
  export declare function getSymbol(address: Address): string;
@@ -29,3 +32,8 @@ export declare function getBlocksTimestamp(provider: Provider, blockNumbers: num
29
32
  */
30
33
  export declare function getBlockBeforeTimestamp(provider: Provider, timestamp: number): Promise<number>;
31
34
  export declare function devLog(message?: any, ...optionalParams: any[]): void;
35
+ /**
36
+ * Sorts (in place) an array of Events by blocknumber.
37
+ * This method mutates the array and returns a reference to the same array.
38
+ **/
39
+ export declare function sortEvents<T extends Result>(events: TypedEvent<T>[]): TypedEvent<T>[];
@@ -16,7 +16,6 @@ export declare class PlyGameRead extends BlockchainEntityRead {
16
16
  * Get current jackpot amount
17
17
  */
18
18
  currentJackpotAmount(): Promise<TokenAmount>;
19
- nextJackpotRevealTime(): Promise<number>;
20
19
  earlyUnlockedPulpAmount(user: Address): Promise<TokenAmount>;
21
20
  getPlyGameResultsInTransaction(txHash: Address): Promise<PlyGameBetResult[]>;
22
21
  /**
@@ -25,10 +24,6 @@ export declare class PlyGameRead extends BlockchainEntityRead {
25
24
  leaderboard(): Promise<PlyGameLeaderboardItem[]>;
26
25
  }
27
26
  export declare class PlyGameReadWrite extends PlyGameRead {
28
- /**
29
- * makes "times" independent bets, but consecutively, of the same amount
30
- */
31
- makeBetMultiple(amount: TokenAmount, times: number): Promise<TransactionResponse>;
32
27
  /**
33
28
  * Make a single bet
34
29
  */
@@ -38,6 +38,17 @@ export declare class ReferralRead extends BlockchainEntityRead {
38
38
  * Top 50 reward earners from the last round, sorted by token amount
39
39
  */
40
40
  leaderboard(campaign: string): Promise<ReferralReward[]>;
41
+ /**
42
+ * current number of slots under a referral code being used that exceed minimum deposit amount
43
+ */
44
+ slotsInUse(referralCode: string): Promise<number>;
45
+ totalReferralSlots(): number;
46
+ /**
47
+ * a way to determine qualification status of a user. null if not referred yet,
48
+ * qualified if referred + min deposit, notQualified if referred + min deposit
49
+ * not reached or withdrew too early
50
+ */
51
+ userReferralStatus(userAddr: Address): Promise<string>;
41
52
  isWhitelistedAddress(address: Address): Promise<boolean>;
42
53
  isOnAuroraPlus(address: Address): Promise<boolean>;
43
54
  }