@aurigami/sdk 1.9.7 → 1.11.0-beta
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/abis/index.d.ts +2 -1
- package/dist/entities/auriEnv.d.ts +13 -1
- package/dist/interactors/Papermill.d.ts +1 -1
- package/dist/interactors/PlyGame.d.ts +37 -0
- package/dist/interactors/index.d.ts +1 -0
- package/dist/sdk.cjs.development.js +565 -177
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +564 -179
- package/dist/sdk.esm.js.map +1 -1
- package/dist/types/index.d.ts +25 -0
- package/package.json +69 -69
- package/src/a.ts.log +29 -0
- package/src/abis/index.ts +2 -0
- package/src/consts/constants.ts +1 -0
- package/src/consts/symbols.ts +4 -2
- package/src/entities/auriEnv.ts +40 -1
- package/src/interactors/Papermill.ts +1 -1
- package/src/interactors/PlyGame.ts +121 -0
- package/src/interactors/index.ts +1 -0
- package/src/types/index.ts +26 -0
package/dist/abis/index.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ import IUniswapV2PairABI from '@aurigami/contracts/artifacts/contracts/mock/IUni
|
|
|
13
13
|
import Multicall2ABI from '@aurigami/contracts/artifacts/contracts/mock/Multicall2.sol/Multicall2.json';
|
|
14
14
|
import PulpABI from '@aurigami/contracts/artifacts/contracts/PULP.sol/PULP.json';
|
|
15
15
|
import ReferralDirectoryABI from '@aurigami/contracts/artifacts/contracts/ReferralDirectory.sol/ReferralDirectory.json';
|
|
16
|
-
|
|
16
|
+
import PlyGameABI from '@aurigami/contracts/artifacts/contracts/plygame/PlyGame.sol/PlyGame.json';
|
|
17
|
+
export { AuriOracleABI, AuTokenABI, IUniswapV2PairABI, AuriAirdropABI, AuriFairLaunchABI, AuriLensABI, ComptrollerABI, EIP20InterfaceABI, ReferralDirectoryABI, AuErc20ABI, AuETHABI, EthRepayHelperABI, Multicall2ABI, PulpABI, AuriInternalLensABI, PlyGameABI, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuriAirdrop, AuriFairLaunch, AuriInternalLens, AuriLens, Comptroller, IERC20,
|
|
1
|
+
import { AuErc20, AuriAirdrop, AuriFairLaunch, AuriInternalLens, AuriLens, AuriOracle, Comptroller, IERC20, PlyGame, PULP, ReferralDirectory } from '@aurigami/contracts/typechain';
|
|
2
2
|
import { Contract } from 'ethers';
|
|
3
3
|
import { AuTokenWithUnderlying } from '../types';
|
|
4
4
|
import { BlockchainEntityRead } from './BlockchainEntity';
|
|
@@ -12,8 +12,19 @@ export declare class AuriEnv extends BlockchainEntityRead {
|
|
|
12
12
|
private _auriAirdrop;
|
|
13
13
|
private _referralDirectory;
|
|
14
14
|
private _oracle;
|
|
15
|
+
private _plygame;
|
|
15
16
|
getContract<CType extends Contract>(address: string, abi: any): CType;
|
|
16
17
|
getAuTokenContracts(): AuTokenWithUnderlying[];
|
|
18
|
+
/**
|
|
19
|
+
* Get AuErc20 contract by its address or underlying name.
|
|
20
|
+
*
|
|
21
|
+
* Either address or underlyingName must be provided
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
getAuErc20Contract({ address, underlyingName, }: {
|
|
25
|
+
address?: string;
|
|
26
|
+
underlyingName?: string;
|
|
27
|
+
}): AuErc20;
|
|
17
28
|
get comptroller(): Comptroller;
|
|
18
29
|
get auriFairLaunch(): AuriFairLaunch;
|
|
19
30
|
get auriLens(): AuriLens;
|
|
@@ -23,4 +34,5 @@ export declare class AuriEnv extends BlockchainEntityRead {
|
|
|
23
34
|
get auriAirdrop(): AuriAirdrop;
|
|
24
35
|
get referralDirectory(): ReferralDirectory;
|
|
25
36
|
get oracle(): AuriOracle;
|
|
37
|
+
get plygame(): PlyGame;
|
|
26
38
|
}
|
|
@@ -12,7 +12,7 @@ export declare class PapermillRead extends BlockchainEntityRead {
|
|
|
12
12
|
* Get all unclaimed PLY reward of the user in all markets + all staking pools
|
|
13
13
|
*/
|
|
14
14
|
getUnclaimedPlyReward(userAddress: Address): Promise<TokenAmount>;
|
|
15
|
-
|
|
15
|
+
getWeek(timestamp: number): number;
|
|
16
16
|
/**
|
|
17
17
|
* Get all locking details of the user in all markets + all staking pools
|
|
18
18
|
*/
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { TransactionResponse } from '@ethersproject/abstract-provider';
|
|
2
|
+
import { AuriEnv, BlockchainEntity, BlockchainEntityRead, Token, TokenAmount } from '../entities';
|
|
3
|
+
import { Address, NetworkConnection, PlyGameBetResult } from '../types';
|
|
4
|
+
export declare class PlyGameRead extends BlockchainEntityRead {
|
|
5
|
+
readonly plyToken: Token;
|
|
6
|
+
readonly pulpToken: Token;
|
|
7
|
+
readonly env: AuriEnv;
|
|
8
|
+
constructor(networkConnection: NetworkConnection);
|
|
9
|
+
private parseBetMakeEvent;
|
|
10
|
+
private attachTimestamp;
|
|
11
|
+
/**
|
|
12
|
+
* Get 100 most recent bets of the market users
|
|
13
|
+
*/
|
|
14
|
+
getUserPlyGameHistory(user: Address): Promise<PlyGameBetResult[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Get current jackpot amount
|
|
17
|
+
*/
|
|
18
|
+
currentJackpotAmount(): Promise<TokenAmount>;
|
|
19
|
+
nextJackpotRevealTime(): Promise<number>;
|
|
20
|
+
earlyUnlockedPulpAmount(user: Address): Promise<TokenAmount>;
|
|
21
|
+
getPlyGameResultsInTransaction(txHash: Address): Promise<PlyGameBetResult[]>;
|
|
22
|
+
}
|
|
23
|
+
export declare class PlyGameReadWrite extends PlyGameRead {
|
|
24
|
+
/**
|
|
25
|
+
* makes "times" independent bets, but consecutively, of the same amount
|
|
26
|
+
*/
|
|
27
|
+
makeBetMultiple(amount: TokenAmount, times: number): Promise<TransactionResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* Make a single bet
|
|
30
|
+
*/
|
|
31
|
+
makeBetOnce(amount: TokenAmount): Promise<TransactionResponse>;
|
|
32
|
+
}
|
|
33
|
+
export declare class PlyGame extends BlockchainEntity {
|
|
34
|
+
constructor();
|
|
35
|
+
read(networkConnection: NetworkConnection): PlyGameRead;
|
|
36
|
+
readWrite(networkConnection: NetworkConnection): PlyGameReadWrite;
|
|
37
|
+
}
|