player-map 1.0.7 → 1.0.9
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/README.md +74 -2
- package/dist/index.es.js +29642 -30864
- package/dist/index.umd.js +557 -562
- package/dist/types/PlayerMapGraph.d.ts +4 -1
- package/dist/types/components/modals/ConnectWalletModal.d.ts +8 -0
- package/dist/types/components/modals/CreatePlayerModal.d.ts +9 -0
- package/dist/types/components/modals/index.d.ts +2 -0
- package/dist/types/components/vote/ClaimItem.d.ts +13 -0
- package/dist/types/components/vote/ClaimList.d.ts +14 -0
- package/dist/types/components/vote/ClaimVoting.d.ts +16 -0
- package/dist/types/components/vote/SubmitButton.d.ts +11 -0
- package/dist/types/components/vote/TransactionInfo.d.ts +9 -0
- package/dist/types/components/vote/TransactionStatus.d.ts +11 -0
- package/dist/types/components/vote/VotingHeader.d.ts +7 -0
- package/dist/types/hooks/useCheckSpecificTriplePosition.d.ts +14 -0
- package/dist/types/hooks/useDepositTriple.d.ts +14 -0
- package/dist/types/hooks/useDisplayTriplesWithPosition.d.ts +5 -0
- package/dist/types/hooks/useFetchTripleDetails.d.ts +27 -0
- package/dist/types/hooks/useSubmitVotes.d.ts +22 -0
- package/dist/types/hooks/useVoteItemsManagement.d.ts +21 -0
- package/dist/types/hooks.old.local/useAccountAtom.d.ts +19 -0
- package/dist/types/hooks.old.local/useAtomCreation.d.ts +23 -0
- package/dist/types/hooks.old.local/useAtomData.d.ts +61 -0
- package/dist/types/hooks.old.local/useAtomTriples.d.ts +22 -0
- package/dist/types/hooks.old.local/useAtomsByCreator.d.ts +14 -0
- package/dist/types/hooks.old.local/useBatchCreateTriple.d.ts +16 -0
- package/dist/types/hooks.old.local/useCreateSingleTriple.d.ts +10 -0
- package/dist/types/hooks.old.local/useDepositTriple.d.ts +14 -0
- package/dist/types/hooks.old.local/useDisplayTriplesWithPosition.d.ts +5 -0
- package/dist/types/hooks.old.local/useFetchTripleDetails.d.ts +27 -0
- package/dist/types/hooks.old.local/useMainnetAtomData.d.ts +20 -0
- package/dist/types/hooks.old.local/useSubmitVotes.d.ts +22 -0
- package/dist/types/hooks.old.local/useTestnetAtomData.d.ts +20 -0
- package/dist/types/hooks.old.local/useTripleByCreator.d.ts +39 -0
- package/dist/types/hooks.old.local/useVoteItemsManagement.d.ts +18 -0
- package/dist/types/pages/DirectPositionCheck.d.ts +4 -0
- package/dist/types/types/vote.d.ts +26 -0
- package/dist/types/utils/debugPosition.d.ts +11 -0
- package/dist/types/utils/voteConstants.d.ts +2 -0
- package/dist/types/utils/voteUtils.d.ts +32 -0
- package/package.json +2 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { VoteItem } from '../types/vote';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Calculates the total number of transactions needed for the current vote selection
|
|
5
|
+
* @param voteItems Array of vote items
|
|
6
|
+
* @returns Number of transactions
|
|
7
|
+
*/
|
|
8
|
+
export declare const calculateNumberOfTransactions: (voteItems: VoteItem[]) => number;
|
|
9
|
+
/**
|
|
10
|
+
* Calculates the total units selected across all vote items
|
|
11
|
+
* @param voteItems Array of vote items
|
|
12
|
+
* @returns Total units
|
|
13
|
+
*/
|
|
14
|
+
export declare const calculateTotalUnits: (voteItems: VoteItem[]) => number;
|
|
15
|
+
/**
|
|
16
|
+
* Calculates the total ETH cost based on number of units
|
|
17
|
+
* @param units Number of units
|
|
18
|
+
* @returns Total ETH cost as a string with 3 decimal places
|
|
19
|
+
*/
|
|
20
|
+
export declare const calculateEthCost: (units: number) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Calculates the estimated gas cost for a set of transactions
|
|
23
|
+
* @param transactionCount Number of transactions
|
|
24
|
+
* @returns Estimated gas cost as a string with 4 decimal places
|
|
25
|
+
*/
|
|
26
|
+
export declare const calculateGasCost: (transactionCount: number) => string;
|
|
27
|
+
/**
|
|
28
|
+
* Reset all vote items to zero units and no direction
|
|
29
|
+
* @param voteItems Array of vote items
|
|
30
|
+
* @returns New array with reset vote items
|
|
31
|
+
*/
|
|
32
|
+
export declare const resetVoteItems: (voteItems: VoteItem[]) => VoteItem[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "player-map",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@0xintuition/graphql": "^0.8.0",
|
|
24
24
|
"axios": "^1.9.0",
|
|
25
|
-
"playermap_graph": "^0.1.
|
|
25
|
+
"playermap_graph": "^0.1.4"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/react": "^18.2.0",
|