Namespace: helpers
Enumerations
Variables
BUYER
• Const BUYER: "buyer"
Defined in
helpers/constants.ts:22
SELLER
• Const SELLER: "seller"
Defined in
helpers/constants.ts:23
WHO_BUYER
• Const WHO_BUYER: 1
Defined in
helpers/constants.ts:10
WHO_MARKETPLACE
• Const WHO_MARKETPLACE: 3
Defined in
helpers/constants.ts:12
WHO_PROTOCOL
• Const WHO_PROTOCOL: 0
Defined in
helpers/constants.ts:9
WHO_SELLER
• Const WHO_SELLER: 2
Defined in
helpers/constants.ts:11
ZERO_FEE_VALUE
• Const ZERO_FEE_VALUE: 0
Defined in
helpers/constants.ts:1
Functions
addressWithYou
▸ addressWithYou(address, walletAddress, nonEnsAddress?): string
Parameters
| Name | Type |
|---|---|
address | string |
walletAddress | string |
nonEnsAddress? | string |
Returns
string
Defined in
helpers/addressFormat.ts:24
bipsToPercentage
▸ bipsToPercentage(values): number[]
convert bips to percentage dividing (/) the value by 100
Parameters
| Name | Type |
|---|---|
values | number[] | bigint[] |
Returns
number[]
Defined in
helpers/bipsToPercentage.ts:5
calculateSplit
▸ calculateSplit(group, walletUserAddress): bigint
Parameters
| Name | Type |
|---|---|
group | IGetEscrowData[] |
walletUserAddress | string |
Returns
bigint
Defined in
helpers/calculateSplit.ts:55
countdownChallengePeriod
▸ countdownChallengePeriod(end): string
Parameters
| Name | Type |
|---|---|
end | Date |
Returns
string
Defined in
helpers/countdownChallengePeriod.ts:1
displayChallengePeriod
▸ displayChallengePeriod(challengePeriod, useLongFormat?): string
Parameters
| Name | Type |
|---|---|
challengePeriod | number |
useLongFormat? | boolean |
Returns
string
Defined in
helpers/displayChallengePeriod.ts:34
formatAmount
▸ formatAmount(amount, precision): string
Parameters
| Name | Type |
|---|---|
amount | bigint |
precision | number | bigint |
Returns
string
Defined in
helpers/formatAmount.ts:3
formatAmountToUSD
▸ formatAmountToUSD(amount, exchangeValue): string
Parameters
| Name | Type |
|---|---|
amount | string | number | bigint |
exchangeValue | number |
Returns
string
Defined in
helpers/formatAmountToUSD.ts:3
getExchangeRates
▸ getExchangeRates(chainId, tokensAddresses): Promise<IResult>
Parameters
| Name | Type |
|---|---|
chainId | bigint |
tokensAddresses | string[] |
Returns
Promise<IResult>
Defined in
helpers/getExchangeRates.ts:61
getSplitFromLoggedUser
▸ getSplitFromLoggedUser(«destructured», walletUserAddress): bigint
Parameters
| Name | Type |
|---|---|
«destructured» | IGetEscrowData |
walletUserAddress | string |
Returns
bigint
Defined in
helpers/calculateSplit.ts:6
groupBy
▸ groupBy<T, K>(array, getKey): Record<K, T[]>
Type parameters
| Name | Type |
|---|---|
T | T |
K | extends string | number | symbol |