@aurigami/sdk 1.6.0 → 1.6.2

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/SDK.d.ts CHANGED
@@ -28,6 +28,15 @@ export declare class SdkRead extends BlockchainEntityRead {
28
28
  action: types.MarketAction;
29
29
  tokenAmount?: TokenAmount;
30
30
  }): types.HypotheticalStats;
31
+ /**
32
+ * Get ply circulating supply.
33
+ * It is calculated by the total supply, minus:
34
+ * - Ply in team multisig contract
35
+ * - Ply in comptroller contract
36
+ * - Ply in fairlaunch contract
37
+ * - Ply in vesting contract
38
+ */
39
+ getPlyCirculatingSupply(): Promise<TokenAmount>;
31
40
  }
32
41
  export declare class SdkReadWrite extends SdkRead {
33
42
  /**
@@ -0,0 +1,18 @@
1
+ import { Multicall2 } from '@aurigami/contracts/typechain';
2
+ import { Contract } from 'ethers';
3
+ import { BlockchainEntityRead } from '../entities';
4
+ import { NetworkConnection } from '../types';
5
+ import { Result } from 'ethers/lib/utils';
6
+ export declare class MulticallRead extends BlockchainEntityRead {
7
+ protected _multicall: Multicall2;
8
+ constructor(networkConnection: NetworkConnection);
9
+ /**
10
+ * Run multiple calls via multicall contract
11
+ */
12
+ aggregate(calls: {
13
+ contract: Contract;
14
+ method: string;
15
+ args: any[];
16
+ returnTypes: string[];
17
+ }[]): Promise<Result[]>;
18
+ }
@@ -29,6 +29,14 @@ export declare class PapermillRead extends BlockchainEntityRead {
29
29
  * @param targetUnlockPortion unlockPortion target
30
30
  */
31
31
  getTimestampToUnlock(userAddress: Address, targetUnlockPortion: number): Promise<number>;
32
+ /**
33
+ * Get the start timestamp of next week of the papermill contract.
34
+ *
35
+ * This is a sync function!
36
+ *
37
+ * @returns the timestamp in seconds
38
+ */
39
+ getNextWeekTimestamp(): number;
32
40
  getUnlockPortionAt(userAddress: Address, timestamp: number): Promise<number>;
33
41
  }
34
42
  export declare class PapermillReadWrite extends PapermillRead {
@@ -0,0 +1,44 @@
1
+ import { ReferralDirectory } from '@aurigami/contracts/typechain';
2
+ import { TransactionResponse } from '@ethersproject/abstract-provider';
3
+ import { BlockchainEntity, BlockchainEntityRead } from '../entities';
4
+ import { Address, NetworkConnection } from '../types';
5
+ export declare class ReferralRead extends BlockchainEntityRead {
6
+ protected _referral: ReferralDirectory;
7
+ constructor(networkConnection: NetworkConnection);
8
+ /**
9
+ * Generate a 10-character referral code
10
+ * containing alphanumeric characters.
11
+ */
12
+ protected generateReferralCode(): string;
13
+ /**
14
+ * Get the referral code for a given address, returns empty string if not found.
15
+ *
16
+ * Called to check if a user has a referral code.
17
+ */
18
+ getUserReferralCode(userAddr: Address): Promise<string>;
19
+ /**
20
+ * Get referral code that a user was referred by, returns empty string if not found.
21
+ */
22
+ getReferralCodeUsed(userAddr: Address): Promise<string>;
23
+ /**
24
+ * Get owner of a referral code, returns zero address if not found.
25
+ */
26
+ getReferralCodeOwner(code: string): Promise<Address>;
27
+ }
28
+ export declare class ReferralReadWrite extends ReferralRead {
29
+ /**
30
+ * Generate a referral code for a given address.
31
+ *
32
+ * Called when an user want to creates his own referral code
33
+ */
34
+ registerNewReferralCode(): Promise<TransactionResponse>;
35
+ /**
36
+ * Called when an user confirms he is referred by a specified code
37
+ */
38
+ useReferralCode(code: string): Promise<TransactionResponse>;
39
+ }
40
+ export declare class Referral extends BlockchainEntity {
41
+ constructor();
42
+ read(networkConnection: NetworkConnection): ReferralRead;
43
+ readWrite(networkConnection: NetworkConnection): ReferralReadWrite;
44
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './airdrop-lottery';
2
2
  export * from './MoneyMarket';
3
3
  export * from './Papermill';
4
+ export * from './Referral';
4
5
  export * from './Staking';