@peeramid-labs/sdk 3.15.0 → 3.16.0
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 +34 -0
- package/cli/abis/ArguableVotingTournament.js +10 -0
- package/cli/abis/ArguableVotingTournament.js.map +1 -1
- package/cli/abis/MAODistribution.js +16 -0
- package/cli/abis/MAODistribution.js.map +1 -1
- package/cli/abis/MockShortStrings.js +37 -0
- package/cli/abis/MockShortStrings.js.map +1 -0
- package/cli/abis/Multipass.js +7 -1
- package/cli/abis/Multipass.js.map +1 -1
- package/cli/abis/PausableUpgradeable.js +79 -0
- package/cli/abis/PausableUpgradeable.js.map +1 -0
- package/cli/abis/RankToken.js +38 -0
- package/cli/abis/RankToken.js.map +1 -1
- package/cli/abis/RankifyDiamondInstance.js +1987 -756
- package/cli/abis/RankifyDiamondInstance.js.map +1 -1
- package/cli/abis/RankifyInstanceInit.js +190 -0
- package/cli/abis/RankifyInstanceInit.js.map +1 -1
- package/cli/abis/RankifyInstanceMainFacet.js +38 -0
- package/cli/abis/RankifyInstanceMainFacet.js.map +1 -1
- package/cli/abis/RankifyOwnersFacet.js +78 -0
- package/cli/abis/RankifyOwnersFacet.js.map +1 -0
- package/cli/abis/UBI.js +775 -0
- package/cli/abis/UBI.js.map +1 -0
- package/cli/abis/index.js +19 -1
- package/cli/abis/index.js.map +1 -1
- package/cli/abis/superinterface.js +3049 -0
- package/cli/abis/superinterface.js.map +1 -0
- package/cli/cli/commands/blockchain/mine.js +0 -2
- package/cli/cli/commands/blockchain/mine.js.map +1 -1
- package/cli/cli/commands/fellowship/game/create.js +45 -1
- package/cli/cli/commands/fellowship/game/create.js.map +1 -1
- package/cli/cli/commands/fellowship/game/end-proposing.js +2 -2
- package/cli/cli/commands/fellowship/game/end-proposing.js.map +1 -1
- package/cli/cli/commands/fellowship/game/end-voting.js +2 -2
- package/cli/cli/commands/fellowship/game/end-voting.js.map +1 -1
- package/cli/cli/commands/fellowship/game/join.js +2 -1
- package/cli/cli/commands/fellowship/game/join.js.map +1 -1
- package/cli/cli/commands/fellowship/game/start.js +0 -17
- package/cli/cli/commands/fellowship/game/start.js.map +1 -1
- package/cli/cli/commands/fellowship/game/vote.js +2 -1
- package/cli/cli/commands/fellowship/game/vote.js.map +1 -1
- package/cli/cli/commands/fellowship/gameMaster/add.js +52 -0
- package/cli/cli/commands/fellowship/gameMaster/add.js.map +1 -0
- package/cli/cli/commands/fellowship/gameMaster/index.js +7 -0
- package/cli/cli/commands/fellowship/gameMaster/index.js.map +1 -0
- package/cli/cli/commands/fellowship/index.js +3 -1
- package/cli/cli/commands/fellowship/index.js.map +1 -1
- package/cli/cli/commands/instances/list.js +6 -0
- package/cli/cli/commands/instances/list.js.map +1 -1
- package/cli/cli/commands/multipass/contract.js +26 -0
- package/cli/cli/commands/multipass/contract.js.map +1 -1
- package/cli/cli/commands/multipass/domain.js +44 -1
- package/cli/cli/commands/multipass/domain.js.map +1 -1
- package/cli/cli/commands/multipass/domains.js +16 -2
- package/cli/cli/commands/multipass/domains.js.map +1 -1
- package/cli/cli/playbooks/demo-script.js +192 -0
- package/cli/cli/playbooks/demo-script.js.map +1 -0
- package/cli/cli/playbooks/demoScript.js +190 -0
- package/cli/cli/playbooks/demoScript.js.map +1 -0
- package/cli/cli/playbooks/initGameMaster.js +50 -0
- package/cli/cli/playbooks/initGameMaster.js.map +1 -0
- package/cli/cli/playbooks/playbookRunner.js +80 -0
- package/cli/cli/playbooks/playbookRunner.js.map +1 -0
- package/cli/cli/playbooks/push-game-to-next-phase.js +162 -0
- package/cli/cli/playbooks/push-game-to-next-phase.js.map +1 -0
- package/cli/cli/playbooks/utils.js +210 -0
- package/cli/cli/playbooks/utils.js.map +1 -0
- package/cli/multipass/MultipassBase.js +38 -70
- package/cli/multipass/MultipassBase.js.map +1 -1
- package/cli/multipass/Owner.js +34 -16
- package/cli/multipass/Owner.js.map +1 -1
- package/cli/rankify/GameMaster.js.map +1 -1
- package/cli/rankify/InstanceAdmininstrative.js +70 -0
- package/cli/rankify/InstanceAdmininstrative.js.map +1 -0
- package/cli/rankify/InstanceBase.js +14 -0
- package/cli/rankify/InstanceBase.js.map +1 -1
- package/cli/rankify/Player.js +24 -1
- package/cli/rankify/Player.js.map +1 -1
- package/cli/types.js +7 -1
- package/cli/types.js.map +1 -1
- package/cli/utils/EnvioGraphQLClient.js +468 -0
- package/cli/utils/EnvioGraphQLClient.js.map +1 -1
- package/cli/utils/artifacts.js +15 -3
- package/cli/utils/artifacts.js.map +1 -1
- package/cli/utils/chainMapping.js +0 -1
- package/cli/utils/chainMapping.js.map +1 -1
- package/docs/classes/EnvioGraphQLClient.md +368 -0
- package/docs/classes/GameMaster.md +19 -0
- package/docs/classes/InstanceBase.md +19 -0
- package/docs/classes/InstancePlayer.md +22 -8
- package/docs/classes/InstanceUBI.md +1591 -0
- package/docs/classes/Multipass.md +31 -4
- package/docs/classes/MultipassBase.md +26 -3
- package/docs/docs/classes/EnvioGraphQLClient.md +368 -0
- package/docs/docs/classes/GameMaster.md +19 -0
- package/docs/docs/classes/InstanceBase.md +19 -0
- package/docs/docs/classes/InstancePlayer.md +22 -8
- package/docs/docs/classes/InstanceUBI.md +1591 -0
- package/docs/docs/classes/Multipass.md +31 -4
- package/docs/docs/classes/MultipassBase.md +26 -3
- package/docs/docs/enums/ContractTypes.md +27 -0
- package/docs/docs/index.md +24 -8
- package/docs/docs/interfaces/ContractCondition.md +41 -0
- package/docs/docs/interfaces/DailyProposal.md +36 -0
- package/docs/docs/interfaces/JoinRequirementsInput.md +20 -0
- package/docs/docs/interfaces/ProposalGlobalStats.md +29 -0
- package/docs/docs/interfaces/TransactionProperties.md +20 -0
- package/docs/docs/interfaces/UBIParams.md +29 -0
- package/docs/docs/interfaces/UserState.md +22 -0
- package/docs/docs/interfaces/VoteElement.md +22 -0
- package/docs/docs/interfaces/configSmartRequirement.md +34 -0
- package/docs/docs/interfaces/numericConditon.md +41 -0
- package/docs/enums/ContractTypes.md +27 -0
- package/docs/index.md +24 -8
- package/docs/interfaces/ContractCondition.md +41 -0
- package/docs/interfaces/DailyProposal.md +36 -0
- package/docs/interfaces/JoinRequirementsInput.md +20 -0
- package/docs/interfaces/ProposalGlobalStats.md +29 -0
- package/docs/interfaces/TransactionProperties.md +20 -0
- package/docs/interfaces/UBIParams.md +29 -0
- package/docs/interfaces/UserState.md +22 -0
- package/docs/interfaces/VoteElement.md +22 -0
- package/docs/interfaces/configSmartRequirement.md +34 -0
- package/docs/interfaces/numericConditon.md +41 -0
- package/lib.commonjs/abis/ArguableVotingTournament.d.ts +8 -0
- package/lib.commonjs/abis/ArguableVotingTournament.d.ts.map +1 -1
- package/lib.commonjs/abis/ArguableVotingTournament.js +10 -0
- package/lib.commonjs/abis/ArguableVotingTournament.js.map +1 -1
- package/lib.commonjs/abis/MAODistribution.d.ts +12 -0
- package/lib.commonjs/abis/MAODistribution.d.ts.map +1 -1
- package/lib.commonjs/abis/MAODistribution.js +16 -0
- package/lib.commonjs/abis/MAODistribution.js.map +1 -1
- package/lib.commonjs/abis/MockShortStrings.d.ts +25 -0
- package/lib.commonjs/abis/MockShortStrings.d.ts.map +1 -0
- package/lib.commonjs/abis/MockShortStrings.js +37 -0
- package/lib.commonjs/abis/MockShortStrings.js.map +1 -0
- package/lib.commonjs/abis/Multipass.d.ts +5 -1
- package/lib.commonjs/abis/Multipass.d.ts.map +1 -1
- package/lib.commonjs/abis/Multipass.js +7 -1
- package/lib.commonjs/abis/Multipass.js.map +1 -1
- package/lib.commonjs/abis/PausableUpgradeable.d.ts +59 -0
- package/lib.commonjs/abis/PausableUpgradeable.d.ts.map +1 -0
- package/lib.commonjs/abis/PausableUpgradeable.js +79 -0
- package/lib.commonjs/abis/PausableUpgradeable.js.map +1 -0
- package/lib.commonjs/abis/RankToken.d.ts +30 -0
- package/lib.commonjs/abis/RankToken.d.ts.map +1 -1
- package/lib.commonjs/abis/RankToken.js +38 -0
- package/lib.commonjs/abis/RankToken.js.map +1 -1
- package/lib.commonjs/abis/RankifyDiamondInstance.d.ts +970 -9
- package/lib.commonjs/abis/RankifyDiamondInstance.d.ts.map +1 -1
- package/lib.commonjs/abis/RankifyDiamondInstance.js +1987 -756
- package/lib.commonjs/abis/RankifyDiamondInstance.js.map +1 -1
- package/lib.commonjs/abis/RankifyInstanceInit.d.ts +150 -0
- package/lib.commonjs/abis/RankifyInstanceInit.d.ts.map +1 -1
- package/lib.commonjs/abis/RankifyInstanceInit.js +190 -0
- package/lib.commonjs/abis/RankifyInstanceInit.js.map +1 -1
- package/lib.commonjs/abis/RankifyInstanceMainFacet.d.ts +30 -0
- package/lib.commonjs/abis/RankifyInstanceMainFacet.d.ts.map +1 -1
- package/lib.commonjs/abis/RankifyInstanceMainFacet.js +38 -0
- package/lib.commonjs/abis/RankifyInstanceMainFacet.js.map +1 -1
- package/lib.commonjs/abis/RankifyOwnersFacet.d.ts +57 -0
- package/lib.commonjs/abis/RankifyOwnersFacet.d.ts.map +1 -0
- package/lib.commonjs/abis/RankifyOwnersFacet.js +78 -0
- package/lib.commonjs/abis/RankifyOwnersFacet.js.map +1 -0
- package/lib.commonjs/abis/UBI.d.ts +601 -0
- package/lib.commonjs/abis/UBI.d.ts.map +1 -0
- package/lib.commonjs/abis/UBI.js +775 -0
- package/lib.commonjs/abis/UBI.js.map +1 -0
- package/lib.commonjs/abis/index.d.ts +1935 -1
- package/lib.commonjs/abis/index.d.ts.map +1 -1
- package/lib.commonjs/abis/index.js +19 -1
- package/lib.commonjs/abis/index.js.map +1 -1
- package/lib.commonjs/abis/superinterface.d.ts +3 -0
- package/lib.commonjs/abis/superinterface.d.ts.map +1 -0
- package/lib.commonjs/abis/superinterface.js +3049 -0
- package/lib.commonjs/abis/superinterface.js.map +1 -0
- package/lib.commonjs/index.d.ts +2 -0
- package/lib.commonjs/index.d.ts.map +1 -1
- package/lib.commonjs/index.js +3 -1
- package/lib.commonjs/index.js.map +1 -1
- package/lib.commonjs/multipass/MultipassBase.d.ts +18 -4
- package/lib.commonjs/multipass/MultipassBase.d.ts.map +1 -1
- package/lib.commonjs/multipass/MultipassBase.js +39 -71
- package/lib.commonjs/multipass/MultipassBase.js.map +1 -1
- package/lib.commonjs/multipass/Owner.d.ts +22 -8
- package/lib.commonjs/multipass/Owner.d.ts.map +1 -1
- package/lib.commonjs/multipass/Owner.js +34 -16
- package/lib.commonjs/multipass/Owner.js.map +1 -1
- package/lib.commonjs/multipass/Registrar.d.ts +3 -1
- package/lib.commonjs/multipass/Registrar.d.ts.map +1 -1
- package/lib.commonjs/multipass/Registrar.js +2 -2
- package/lib.commonjs/multipass/Registrar.js.map +1 -1
- package/lib.commonjs/rankify/GameMaster.d.ts +5 -1
- package/lib.commonjs/rankify/GameMaster.d.ts.map +1 -1
- package/lib.commonjs/rankify/GameMaster.js.map +1 -1
- package/lib.commonjs/rankify/InstanceAdmininstrative.d.ts +34 -0
- package/lib.commonjs/rankify/InstanceAdmininstrative.d.ts.map +1 -0
- package/lib.commonjs/rankify/InstanceAdmininstrative.js +74 -0
- package/lib.commonjs/rankify/InstanceAdmininstrative.js.map +1 -0
- package/lib.commonjs/rankify/InstanceBase.d.ts +1 -0
- package/lib.commonjs/rankify/InstanceBase.d.ts.map +1 -1
- package/lib.commonjs/rankify/InstanceBase.js +14 -0
- package/lib.commonjs/rankify/InstanceBase.js.map +1 -1
- package/lib.commonjs/rankify/Player.d.ts +2 -36
- package/lib.commonjs/rankify/Player.d.ts.map +1 -1
- package/lib.commonjs/rankify/Player.js +24 -1
- package/lib.commonjs/rankify/Player.js.map +1 -1
- package/lib.commonjs/types.d.ts +33 -0
- package/lib.commonjs/types.d.ts.map +1 -1
- package/lib.commonjs/types.js +7 -1
- package/lib.commonjs/types.js.map +1 -1
- package/lib.commonjs/ubi/InstanceUBI.d.ts +548 -0
- package/lib.commonjs/ubi/InstanceUBI.d.ts.map +1 -0
- package/lib.commonjs/ubi/InstanceUBI.js +728 -0
- package/lib.commonjs/ubi/InstanceUBI.js.map +1 -0
- package/lib.commonjs/utils/EnvioGraphQLClient.d.ts +279 -0
- package/lib.commonjs/utils/EnvioGraphQLClient.d.ts.map +1 -1
- package/lib.commonjs/utils/EnvioGraphQLClient.js +468 -0
- package/lib.commonjs/utils/EnvioGraphQLClient.js.map +1 -1
- package/lib.commonjs/utils/artifacts.d.ts.map +1 -1
- package/lib.commonjs/utils/artifacts.js +15 -3
- package/lib.commonjs/utils/artifacts.js.map +1 -1
- package/lib.commonjs/utils/chainMapping.d.ts.map +1 -1
- package/lib.commonjs/utils/chainMapping.js +0 -1
- package/lib.commonjs/utils/chainMapping.js.map +1 -1
- package/lib.commonjs/utils/mockUtils.d.ts +3 -0
- package/lib.commonjs/utils/mockUtils.d.ts.map +1 -1
- package/lib.commonjs/utils/mockUtils.js +3 -0
- package/lib.commonjs/utils/mockUtils.js.map +1 -1
- package/lib.esm/abis/ArguableVotingTournament.d.ts +8 -0
- package/lib.esm/abis/ArguableVotingTournament.d.ts.map +1 -1
- package/lib.esm/abis/ArguableVotingTournament.js +10 -0
- package/lib.esm/abis/ArguableVotingTournament.js.map +1 -1
- package/lib.esm/abis/MAODistribution.d.ts +12 -0
- package/lib.esm/abis/MAODistribution.d.ts.map +1 -1
- package/lib.esm/abis/MAODistribution.js +16 -0
- package/lib.esm/abis/MAODistribution.js.map +1 -1
- package/lib.esm/abis/MockShortStrings.d.ts +25 -0
- package/lib.esm/abis/MockShortStrings.d.ts.map +1 -0
- package/lib.esm/abis/MockShortStrings.js +34 -0
- package/lib.esm/abis/MockShortStrings.js.map +1 -0
- package/lib.esm/abis/Multipass.d.ts +5 -1
- package/lib.esm/abis/Multipass.d.ts.map +1 -1
- package/lib.esm/abis/Multipass.js +7 -1
- package/lib.esm/abis/Multipass.js.map +1 -1
- package/lib.esm/abis/PausableUpgradeable.d.ts +59 -0
- package/lib.esm/abis/PausableUpgradeable.d.ts.map +1 -0
- package/lib.esm/abis/PausableUpgradeable.js +76 -0
- package/lib.esm/abis/PausableUpgradeable.js.map +1 -0
- package/lib.esm/abis/RankToken.d.ts +30 -0
- package/lib.esm/abis/RankToken.d.ts.map +1 -1
- package/lib.esm/abis/RankToken.js +38 -0
- package/lib.esm/abis/RankToken.js.map +1 -1
- package/lib.esm/abis/RankifyDiamondInstance.d.ts +970 -9
- package/lib.esm/abis/RankifyDiamondInstance.d.ts.map +1 -1
- package/lib.esm/abis/RankifyDiamondInstance.js +1987 -756
- package/lib.esm/abis/RankifyDiamondInstance.js.map +1 -1
- package/lib.esm/abis/RankifyInstanceInit.d.ts +150 -0
- package/lib.esm/abis/RankifyInstanceInit.d.ts.map +1 -1
- package/lib.esm/abis/RankifyInstanceInit.js +190 -0
- package/lib.esm/abis/RankifyInstanceInit.js.map +1 -1
- package/lib.esm/abis/RankifyInstanceMainFacet.d.ts +30 -0
- package/lib.esm/abis/RankifyInstanceMainFacet.d.ts.map +1 -1
- package/lib.esm/abis/RankifyInstanceMainFacet.js +38 -0
- package/lib.esm/abis/RankifyInstanceMainFacet.js.map +1 -1
- package/lib.esm/abis/RankifyOwnersFacet.d.ts +57 -0
- package/lib.esm/abis/RankifyOwnersFacet.d.ts.map +1 -0
- package/lib.esm/abis/RankifyOwnersFacet.js +75 -0
- package/lib.esm/abis/RankifyOwnersFacet.js.map +1 -0
- package/lib.esm/abis/UBI.d.ts +601 -0
- package/lib.esm/abis/UBI.d.ts.map +1 -0
- package/lib.esm/abis/UBI.js +772 -0
- package/lib.esm/abis/UBI.js.map +1 -0
- package/lib.esm/abis/index.d.ts +1935 -1
- package/lib.esm/abis/index.d.ts.map +1 -1
- package/lib.esm/abis/index.js +13 -0
- package/lib.esm/abis/index.js.map +1 -1
- package/lib.esm/abis/superinterface.d.ts +3 -0
- package/lib.esm/abis/superinterface.d.ts.map +1 -0
- package/lib.esm/abis/superinterface.js +3046 -0
- package/lib.esm/abis/superinterface.js.map +1 -0
- package/lib.esm/index.d.ts +2 -0
- package/lib.esm/index.d.ts.map +1 -1
- package/lib.esm/index.js +1 -0
- package/lib.esm/index.js.map +1 -1
- package/lib.esm/multipass/MultipassBase.d.ts +18 -4
- package/lib.esm/multipass/MultipassBase.d.ts.map +1 -1
- package/lib.esm/multipass/MultipassBase.js +40 -72
- package/lib.esm/multipass/MultipassBase.js.map +1 -1
- package/lib.esm/multipass/Owner.d.ts +22 -8
- package/lib.esm/multipass/Owner.d.ts.map +1 -1
- package/lib.esm/multipass/Owner.js +34 -16
- package/lib.esm/multipass/Owner.js.map +1 -1
- package/lib.esm/multipass/Registrar.d.ts +3 -1
- package/lib.esm/multipass/Registrar.d.ts.map +1 -1
- package/lib.esm/multipass/Registrar.js +2 -2
- package/lib.esm/multipass/Registrar.js.map +1 -1
- package/lib.esm/rankify/GameMaster.d.ts +5 -1
- package/lib.esm/rankify/GameMaster.d.ts.map +1 -1
- package/lib.esm/rankify/GameMaster.js.map +1 -1
- package/lib.esm/rankify/InstanceAdmininstrative.d.ts +34 -0
- package/lib.esm/rankify/InstanceAdmininstrative.d.ts.map +1 -0
- package/lib.esm/rankify/InstanceAdmininstrative.js +70 -0
- package/lib.esm/rankify/InstanceAdmininstrative.js.map +1 -0
- package/lib.esm/rankify/InstanceBase.d.ts +1 -0
- package/lib.esm/rankify/InstanceBase.d.ts.map +1 -1
- package/lib.esm/rankify/InstanceBase.js +14 -0
- package/lib.esm/rankify/InstanceBase.js.map +1 -1
- package/lib.esm/rankify/Player.d.ts +2 -36
- package/lib.esm/rankify/Player.d.ts.map +1 -1
- package/lib.esm/rankify/Player.js +24 -1
- package/lib.esm/rankify/Player.js.map +1 -1
- package/lib.esm/types.d.ts +33 -0
- package/lib.esm/types.d.ts.map +1 -1
- package/lib.esm/types.js +6 -0
- package/lib.esm/types.js.map +1 -1
- package/lib.esm/ubi/InstanceUBI.d.ts +548 -0
- package/lib.esm/ubi/InstanceUBI.d.ts.map +1 -0
- package/lib.esm/ubi/InstanceUBI.js +722 -0
- package/lib.esm/ubi/InstanceUBI.js.map +1 -0
- package/lib.esm/utils/EnvioGraphQLClient.d.ts +279 -0
- package/lib.esm/utils/EnvioGraphQLClient.d.ts.map +1 -1
- package/lib.esm/utils/EnvioGraphQLClient.js +468 -0
- package/lib.esm/utils/EnvioGraphQLClient.js.map +1 -1
- package/lib.esm/utils/artifacts.d.ts.map +1 -1
- package/lib.esm/utils/artifacts.js +15 -3
- package/lib.esm/utils/artifacts.js.map +1 -1
- package/lib.esm/utils/chainMapping.d.ts.map +1 -1
- package/lib.esm/utils/chainMapping.js +0 -1
- package/lib.esm/utils/chainMapping.js.map +1 -1
- package/lib.esm/utils/mockUtils.d.ts +3 -0
- package/lib.esm/utils/mockUtils.d.ts.map +1 -1
- package/lib.esm/utils/mockUtils.js +3 -0
- package/lib.esm/utils/mockUtils.js.map +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,1591 @@
|
|
|
1
|
+
# Class: InstanceUBI
|
|
2
|
+
|
|
3
|
+
Class for interacting with UBI facet of a Rankify instance
|
|
4
|
+
Extends InstanceBase and provides UBI-specific functionality
|
|
5
|
+
|
|
6
|
+
## Hierarchy
|
|
7
|
+
|
|
8
|
+
- [`InstanceBase`](InstanceBase.md)
|
|
9
|
+
|
|
10
|
+
↳ **`InstanceUBI`**
|
|
11
|
+
|
|
12
|
+
## Table of contents
|
|
13
|
+
|
|
14
|
+
### Constructors
|
|
15
|
+
|
|
16
|
+
- [constructor](InstanceUBI.md#constructor)
|
|
17
|
+
|
|
18
|
+
### Properties
|
|
19
|
+
|
|
20
|
+
- [publicClient](InstanceUBI.md#publicclient)
|
|
21
|
+
- [chainId](InstanceUBI.md#chainid)
|
|
22
|
+
- [instanceAddress](InstanceUBI.md#instanceaddress)
|
|
23
|
+
- [creationBlock](InstanceUBI.md#creationblock)
|
|
24
|
+
- [instanceContracts](InstanceUBI.md#instancecontracts)
|
|
25
|
+
- [envioClient](InstanceUBI.md#envioclient)
|
|
26
|
+
- [walletClient](InstanceUBI.md#walletclient)
|
|
27
|
+
- [account](InstanceUBI.md#account)
|
|
28
|
+
|
|
29
|
+
### Methods
|
|
30
|
+
|
|
31
|
+
- [getHistoricTurn](InstanceUBI.md#gethistoricturn)
|
|
32
|
+
- [reorganizeVotes](InstanceUBI.md#reorganizevotes)
|
|
33
|
+
- [getCreationBlock](InstanceUBI.md#getcreationblock)
|
|
34
|
+
- [getPreviousTurnStats](InstanceUBI.md#getpreviousturnstats)
|
|
35
|
+
- [getVoting](InstanceUBI.md#getvoting)
|
|
36
|
+
- [getOngoingVoting](InstanceUBI.md#getongoingvoting)
|
|
37
|
+
- [getOngoingProposals](InstanceUBI.md#getongoingproposals)
|
|
38
|
+
- [getRegistrationDeadline](InstanceUBI.md#getregistrationdeadline)
|
|
39
|
+
- [resolveTurnDeadline](InstanceUBI.md#resolveturndeadline)
|
|
40
|
+
- [getTurnDeadline](InstanceUBI.md#getturndeadline)
|
|
41
|
+
- [getContractState](InstanceUBI.md#getcontractstate)
|
|
42
|
+
- [getPlayersGames](InstanceUBI.md#getplayersgames)
|
|
43
|
+
- [getProposalScoresList](InstanceUBI.md#getproposalscoreslist)
|
|
44
|
+
- [getCurrentTurn](InstanceUBI.md#getcurrentturn)
|
|
45
|
+
- [getPlayers](InstanceUBI.md#getplayers)
|
|
46
|
+
- [getGameState](InstanceUBI.md#getgamestate)
|
|
47
|
+
- [isWhitelistedGM](InstanceUBI.md#iswhitelistedgm)
|
|
48
|
+
- [getGameStateDetails](InstanceUBI.md#getgamestatedetails)
|
|
49
|
+
- [getGameStates](InstanceUBI.md#getgamestates)
|
|
50
|
+
- [getEIP712Domain](InstanceUBI.md#geteip712domain)
|
|
51
|
+
- [pkdf](InstanceUBI.md#pkdf)
|
|
52
|
+
- [sharedSigner](InstanceUBI.md#sharedsigner)
|
|
53
|
+
- [getPlayerPubKey](InstanceUBI.md#getplayerpubkey)
|
|
54
|
+
- [isGameMetadata](InstanceUBI.md#isgamemetadata)
|
|
55
|
+
- [isPlayerInGame](InstanceUBI.md#isplayeringame)
|
|
56
|
+
- [getGameMetadata](InstanceUBI.md#getgamemetadata)
|
|
57
|
+
- [getProposalGameScore](InstanceUBI.md#getproposalgamescore)
|
|
58
|
+
- [getProposalTurnScore](InstanceUBI.md#getproposalturnscore)
|
|
59
|
+
- [getProposalsTurnScores](InstanceUBI.md#getproposalsturnscores)
|
|
60
|
+
- [proposalExistsInTurn](InstanceUBI.md#proposalexistsinturn)
|
|
61
|
+
- [proposalExistsInGame](InstanceUBI.md#proposalexistsingame)
|
|
62
|
+
- [proposalExists](InstanceUBI.md#proposalexists)
|
|
63
|
+
- [getProposalTotalScore](InstanceUBI.md#getproposaltotalscore)
|
|
64
|
+
- [getCurrentDay](InstanceUBI.md#getcurrentday)
|
|
65
|
+
- [currentDay](InstanceUBI.md#currentday)
|
|
66
|
+
- [getUBIParams](InstanceUBI.md#getubiparams)
|
|
67
|
+
- [getProposalLifetimeStats](InstanceUBI.md#getproposallifetimestats)
|
|
68
|
+
- [getProposalDailyScore](InstanceUBI.md#getproposaldailyscore)
|
|
69
|
+
- [getProposalsCnt](InstanceUBI.md#getproposalscnt)
|
|
70
|
+
- [getLastClaimedAt](InstanceUBI.md#getlastclaimedat)
|
|
71
|
+
- [getUserState](InstanceUBI.md#getuserstate)
|
|
72
|
+
- [getPauser](InstanceUBI.md#getpauser)
|
|
73
|
+
- [getMultipass](InstanceUBI.md#getmultipass)
|
|
74
|
+
- [getToken](InstanceUBI.md#gettoken)
|
|
75
|
+
- [isPaused](InstanceUBI.md#ispaused)
|
|
76
|
+
- [getUserInfo](InstanceUBI.md#getuserinfo)
|
|
77
|
+
- [getProposalInfo](InstanceUBI.md#getproposalinfo)
|
|
78
|
+
- [getDayProposals](InstanceUBI.md#getdayproposals)
|
|
79
|
+
- [claim](InstanceUBI.md#claim)
|
|
80
|
+
- [support](InstanceUBI.md#support)
|
|
81
|
+
- [pause](InstanceUBI.md#pause)
|
|
82
|
+
- [unpause](InstanceUBI.md#unpause)
|
|
83
|
+
- [getProposalsByAddress](InstanceUBI.md#getproposalsbyaddress)
|
|
84
|
+
- [getDailyProposals](InstanceUBI.md#getdailyproposals)
|
|
85
|
+
- [getProposalScoreHistory](InstanceUBI.md#getproposalscorehistory)
|
|
86
|
+
- [getVotesByAddress](InstanceUBI.md#getvotesbyaddress)
|
|
87
|
+
- [getDailyVotes](InstanceUBI.md#getdailyvotes)
|
|
88
|
+
- [getClaimHistory](InstanceUBI.md#getclaimhistory)
|
|
89
|
+
- [getRepostsByAddress](InstanceUBI.md#getrepostsbyaddress)
|
|
90
|
+
- [getProposalLifetimeScores](InstanceUBI.md#getproposallifetimescores)
|
|
91
|
+
- [getDayActivity](InstanceUBI.md#getdayactivity)
|
|
92
|
+
- [getUserActivity](InstanceUBI.md#getuseractivity)
|
|
93
|
+
- [getProposalScores](InstanceUBI.md#getproposalscores)
|
|
94
|
+
- [getProposalScore](InstanceUBI.md#getproposalscore)
|
|
95
|
+
|
|
96
|
+
## Constructors
|
|
97
|
+
|
|
98
|
+
### constructor
|
|
99
|
+
|
|
100
|
+
• **new InstanceUBI**(`params`): [`InstanceUBI`](InstanceUBI.md)
|
|
101
|
+
|
|
102
|
+
Creates a new InstanceUBI
|
|
103
|
+
|
|
104
|
+
#### Parameters
|
|
105
|
+
|
|
106
|
+
| Name | Type | Description |
|
|
107
|
+
| :------ | :------ | :------ |
|
|
108
|
+
| `params` | `Object` | Constructor parameters |
|
|
109
|
+
| `params.publicClient` | `Object` | Public client for blockchain interactions |
|
|
110
|
+
| `params.walletClient?` | `Object` | Optional wallet client for write operations |
|
|
111
|
+
| `params.chainId` | `number` | Chain ID of the network |
|
|
112
|
+
| `params.instanceAddress` | \`0x$\{string}\` | Address of the Rankify instance with UBI facet |
|
|
113
|
+
| `params.account?` | \`0x$\{string}\` | Optional account address for write operations |
|
|
114
|
+
| `params.envioClient` | [`EnvioGraphQLClient`](EnvioGraphQLClient.md) | Envio GraphQL client for event queries |
|
|
115
|
+
|
|
116
|
+
#### Returns
|
|
117
|
+
|
|
118
|
+
[`InstanceUBI`](InstanceUBI.md)
|
|
119
|
+
|
|
120
|
+
#### Overrides
|
|
121
|
+
|
|
122
|
+
[InstanceBase](InstanceBase.md).[constructor](InstanceBase.md#constructor)
|
|
123
|
+
|
|
124
|
+
## Properties
|
|
125
|
+
|
|
126
|
+
### publicClient
|
|
127
|
+
|
|
128
|
+
• **publicClient**: `Object`
|
|
129
|
+
|
|
130
|
+
Public client for blockchain interactions
|
|
131
|
+
|
|
132
|
+
#### Inherited from
|
|
133
|
+
|
|
134
|
+
[InstanceBase](InstanceBase.md).[publicClient](InstanceBase.md#publicclient)
|
|
135
|
+
|
|
136
|
+
___
|
|
137
|
+
|
|
138
|
+
### chainId
|
|
139
|
+
|
|
140
|
+
• **chainId**: `number`
|
|
141
|
+
|
|
142
|
+
Chain ID of the network
|
|
143
|
+
|
|
144
|
+
#### Inherited from
|
|
145
|
+
|
|
146
|
+
[InstanceBase](InstanceBase.md).[chainId](InstanceBase.md#chainid)
|
|
147
|
+
|
|
148
|
+
___
|
|
149
|
+
|
|
150
|
+
### instanceAddress
|
|
151
|
+
|
|
152
|
+
• **instanceAddress**: \`0x$\{string}\`
|
|
153
|
+
|
|
154
|
+
Address of the Rankify instance contract
|
|
155
|
+
|
|
156
|
+
#### Inherited from
|
|
157
|
+
|
|
158
|
+
[InstanceBase](InstanceBase.md).[instanceAddress](InstanceBase.md#instanceaddress)
|
|
159
|
+
|
|
160
|
+
___
|
|
161
|
+
|
|
162
|
+
### creationBlock
|
|
163
|
+
|
|
164
|
+
• **creationBlock**: `bigint`
|
|
165
|
+
|
|
166
|
+
#### Inherited from
|
|
167
|
+
|
|
168
|
+
[InstanceBase](InstanceBase.md).[creationBlock](InstanceBase.md#creationblock)
|
|
169
|
+
|
|
170
|
+
___
|
|
171
|
+
|
|
172
|
+
### instanceContracts
|
|
173
|
+
|
|
174
|
+
• `Optional` **instanceContracts**: [`MAOInstanceContracts`](../interfaces/MAOInstanceContracts.md)
|
|
175
|
+
|
|
176
|
+
#### Inherited from
|
|
177
|
+
|
|
178
|
+
[InstanceBase](InstanceBase.md).[instanceContracts](InstanceBase.md#instancecontracts)
|
|
179
|
+
|
|
180
|
+
___
|
|
181
|
+
|
|
182
|
+
### envioClient
|
|
183
|
+
|
|
184
|
+
• **envioClient**: [`EnvioGraphQLClient`](EnvioGraphQLClient.md)
|
|
185
|
+
|
|
186
|
+
#### Inherited from
|
|
187
|
+
|
|
188
|
+
[InstanceBase](InstanceBase.md).[envioClient](InstanceBase.md#envioclient)
|
|
189
|
+
|
|
190
|
+
___
|
|
191
|
+
|
|
192
|
+
### walletClient
|
|
193
|
+
|
|
194
|
+
• `Optional` **walletClient**: `Object`
|
|
195
|
+
|
|
196
|
+
Wallet client for write operations (optional)
|
|
197
|
+
|
|
198
|
+
___
|
|
199
|
+
|
|
200
|
+
### account
|
|
201
|
+
|
|
202
|
+
• `Optional` **account**: \`0x$\{string}\`
|
|
203
|
+
|
|
204
|
+
Account address for write operations
|
|
205
|
+
|
|
206
|
+
## Methods
|
|
207
|
+
|
|
208
|
+
### getHistoricTurn
|
|
209
|
+
|
|
210
|
+
▸ **getHistoricTurn**(`gameId`, `turnId`): `Promise`\<\{ `player`: `string` ; `proposal`: `string` ; `votes`: `number` ; `score`: `number` ; `scoreList`: \{ `player`: \`0x$\{string}\` = p; `score`: `number` }[] ; `blockTimestamp`: `bigint` }[]\>
|
|
211
|
+
|
|
212
|
+
Retrieves the historic turn information for a specific game and turn ID.
|
|
213
|
+
|
|
214
|
+
#### Parameters
|
|
215
|
+
|
|
216
|
+
| Name | Type |
|
|
217
|
+
| :------ | :------ |
|
|
218
|
+
| `gameId` | `bigint` |
|
|
219
|
+
| `turnId` | `bigint` |
|
|
220
|
+
|
|
221
|
+
#### Returns
|
|
222
|
+
|
|
223
|
+
`Promise`\<\{ `player`: `string` ; `proposal`: `string` ; `votes`: `number` ; `score`: `number` ; `scoreList`: \{ `player`: \`0x$\{string}\` = p; `score`: `number` }[] ; `blockTimestamp`: `bigint` }[]\>
|
|
224
|
+
|
|
225
|
+
The historic turn event object.
|
|
226
|
+
|
|
227
|
+
**`Throws`**
|
|
228
|
+
|
|
229
|
+
If the game or turn is not found.
|
|
230
|
+
|
|
231
|
+
#### Inherited from
|
|
232
|
+
|
|
233
|
+
[InstanceBase](InstanceBase.md).[getHistoricTurn](InstanceBase.md#gethistoricturn)
|
|
234
|
+
|
|
235
|
+
___
|
|
236
|
+
|
|
237
|
+
### reorganizeVotes
|
|
238
|
+
|
|
239
|
+
▸ **reorganizeVotes**(`votes`, `proposerIndices`): `bigint`[][]
|
|
240
|
+
|
|
241
|
+
Reorganizes votes array based on proposerIndices mapping
|
|
242
|
+
|
|
243
|
+
#### Parameters
|
|
244
|
+
|
|
245
|
+
| Name | Type | Description |
|
|
246
|
+
| :------ | :------ | :------ |
|
|
247
|
+
| `votes` | readonly readonly `bigint`[][] | Array of votes for each player |
|
|
248
|
+
| `proposerIndices` | readonly `bigint`[] | Array of indices mapping shuffled order to original order |
|
|
249
|
+
|
|
250
|
+
#### Returns
|
|
251
|
+
|
|
252
|
+
`bigint`[][]
|
|
253
|
+
|
|
254
|
+
Reorganized votes array
|
|
255
|
+
|
|
256
|
+
#### Inherited from
|
|
257
|
+
|
|
258
|
+
[InstanceBase](InstanceBase.md).[reorganizeVotes](InstanceBase.md#reorganizevotes)
|
|
259
|
+
|
|
260
|
+
___
|
|
261
|
+
|
|
262
|
+
### getCreationBlock
|
|
263
|
+
|
|
264
|
+
▸ **getCreationBlock**(): `Promise`\<`bigint`\>
|
|
265
|
+
|
|
266
|
+
#### Returns
|
|
267
|
+
|
|
268
|
+
`Promise`\<`bigint`\>
|
|
269
|
+
|
|
270
|
+
#### Inherited from
|
|
271
|
+
|
|
272
|
+
[InstanceBase](InstanceBase.md).[getCreationBlock](InstanceBase.md#getcreationblock)
|
|
273
|
+
|
|
274
|
+
___
|
|
275
|
+
|
|
276
|
+
### getPreviousTurnStats
|
|
277
|
+
|
|
278
|
+
▸ **getPreviousTurnStats**(`gameId`): `Promise`\<\{ `player`: `string` ; `proposal`: `string` ; `votes`: `number` ; `score`: `number` ; `scoreList`: \{ `player`: \`0x$\{string}\` = p; `score`: `number` }[] ; `blockTimestamp`: `bigint` }[] \| \{ `players`: `string` = "N/A"; `scores`: `string` = "N/A"; `turnSalt`: `string` = "N/A"; `voters`: `string`[] ; `votesRevealed`: `string`[] }\>
|
|
279
|
+
|
|
280
|
+
Retrieves the previous turn information for a specific game.
|
|
281
|
+
|
|
282
|
+
#### Parameters
|
|
283
|
+
|
|
284
|
+
| Name | Type | Description |
|
|
285
|
+
| :------ | :------ | :------ |
|
|
286
|
+
| `gameId` | `bigint` | The ID of the game. |
|
|
287
|
+
|
|
288
|
+
#### Returns
|
|
289
|
+
|
|
290
|
+
`Promise`\<\{ `player`: `string` ; `proposal`: `string` ; `votes`: `number` ; `score`: `number` ; `scoreList`: \{ `player`: \`0x$\{string}\` = p; `score`: `number` }[] ; `blockTimestamp`: `bigint` }[] \| \{ `players`: `string` = "N/A"; `scores`: `string` = "N/A"; `turnSalt`: `string` = "N/A"; `voters`: `string`[] ; `votesRevealed`: `string`[] }\>
|
|
291
|
+
|
|
292
|
+
The previous turn information for the specified game.
|
|
293
|
+
|
|
294
|
+
#### Inherited from
|
|
295
|
+
|
|
296
|
+
[InstanceBase](InstanceBase.md).[getPreviousTurnStats](InstanceBase.md#getpreviousturnstats)
|
|
297
|
+
|
|
298
|
+
___
|
|
299
|
+
|
|
300
|
+
### getVoting
|
|
301
|
+
|
|
302
|
+
▸ **getVoting**(`gameId`, `turnId`): `Promise`\<\{ `voteEvents`: \{ `player`: \`0x$\{string}\` ; `sealedBallotId`: `string` = event.sealedBallotId; `gmSignature`: `string` = event.gmSignature; `voterSignature`: `string` = event.voterSignature; `ballotHash`: `string` = event.ballotHash }[] ; `proposalEvents`: \{ `proposer`: \`0x$\{string}\` = event.proposer; `encryptedProposal`: `string` = event.encryptedProposal; `commitment`: `bigint` = event.commitment; `gmSignature`: `string` = event.gmSignature; `proposerSignature`: `string` = event.proposerSignature }[] }\>
|
|
303
|
+
|
|
304
|
+
Retrieves the voting information for a specific game and turn.
|
|
305
|
+
|
|
306
|
+
#### Parameters
|
|
307
|
+
|
|
308
|
+
| Name | Type | Description |
|
|
309
|
+
| :------ | :------ | :------ |
|
|
310
|
+
| `gameId` | `bigint` | The ID of the game. |
|
|
311
|
+
| `turnId` | `bigint` | The ID of the turn. |
|
|
312
|
+
|
|
313
|
+
#### Returns
|
|
314
|
+
|
|
315
|
+
`Promise`\<\{ `voteEvents`: \{ `player`: \`0x$\{string}\` ; `sealedBallotId`: `string` = event.sealedBallotId; `gmSignature`: `string` = event.gmSignature; `voterSignature`: `string` = event.voterSignature; `ballotHash`: `string` = event.ballotHash }[] ; `proposalEvents`: \{ `proposer`: \`0x$\{string}\` = event.proposer; `encryptedProposal`: `string` = event.encryptedProposal; `commitment`: `bigint` = event.commitment; `gmSignature`: `string` = event.gmSignature; `proposerSignature`: `string` = event.proposerSignature }[] }\>
|
|
316
|
+
|
|
317
|
+
The voting information for the specified game and turn.
|
|
318
|
+
|
|
319
|
+
#### Inherited from
|
|
320
|
+
|
|
321
|
+
[InstanceBase](InstanceBase.md).[getVoting](InstanceBase.md#getvoting)
|
|
322
|
+
|
|
323
|
+
___
|
|
324
|
+
|
|
325
|
+
### getOngoingVoting
|
|
326
|
+
|
|
327
|
+
▸ **getOngoingVoting**(`gameId`): `Promise`\<\{ `voteEvents`: \{ `player`: \`0x$\{string}\` ; `sealedBallotId`: `string` = event.sealedBallotId; `gmSignature`: `string` = event.gmSignature; `voterSignature`: `string` = event.voterSignature; `ballotHash`: `string` = event.ballotHash }[] ; `proposalEvents`: \{ `proposer`: \`0x$\{string}\` = event.proposer; `encryptedProposal`: `string` = event.encryptedProposal; `commitment`: `bigint` = event.commitment; `gmSignature`: `string` = event.gmSignature; `proposerSignature`: `string` = event.proposerSignature }[] }\>
|
|
328
|
+
|
|
329
|
+
Retrieves the ongoing voting for a specific game.
|
|
330
|
+
|
|
331
|
+
#### Parameters
|
|
332
|
+
|
|
333
|
+
| Name | Type | Description |
|
|
334
|
+
| :------ | :------ | :------ |
|
|
335
|
+
| `gameId` | `bigint` | The ID of the game. |
|
|
336
|
+
|
|
337
|
+
#### Returns
|
|
338
|
+
|
|
339
|
+
`Promise`\<\{ `voteEvents`: \{ `player`: \`0x$\{string}\` ; `sealedBallotId`: `string` = event.sealedBallotId; `gmSignature`: `string` = event.gmSignature; `voterSignature`: `string` = event.voterSignature; `ballotHash`: `string` = event.ballotHash }[] ; `proposalEvents`: \{ `proposer`: \`0x$\{string}\` = event.proposer; `encryptedProposal`: `string` = event.encryptedProposal; `commitment`: `bigint` = event.commitment; `gmSignature`: `string` = event.gmSignature; `proposerSignature`: `string` = event.proposerSignature }[] }\>
|
|
340
|
+
|
|
341
|
+
#### Inherited from
|
|
342
|
+
|
|
343
|
+
[InstanceBase](InstanceBase.md).[getOngoingVoting](InstanceBase.md#getongoingvoting)
|
|
344
|
+
|
|
345
|
+
___
|
|
346
|
+
|
|
347
|
+
### getOngoingProposals
|
|
348
|
+
|
|
349
|
+
▸ **getOngoingProposals**(`gameId`): `Promise`\<\{ `currentTurn`: `bigint` ; `proposals`: `unknown`[] }\>
|
|
350
|
+
|
|
351
|
+
Retrieves the ongoing proposals for a specific game.
|
|
352
|
+
|
|
353
|
+
#### Parameters
|
|
354
|
+
|
|
355
|
+
| Name | Type | Description |
|
|
356
|
+
| :------ | :------ | :------ |
|
|
357
|
+
| `gameId` | `bigint` | The ID of the game. |
|
|
358
|
+
|
|
359
|
+
#### Returns
|
|
360
|
+
|
|
361
|
+
`Promise`\<\{ `currentTurn`: `bigint` ; `proposals`: `unknown`[] }\>
|
|
362
|
+
|
|
363
|
+
The ongoing proposals for the specified game.
|
|
364
|
+
|
|
365
|
+
#### Inherited from
|
|
366
|
+
|
|
367
|
+
[InstanceBase](InstanceBase.md).[getOngoingProposals](InstanceBase.md#getongoingproposals)
|
|
368
|
+
|
|
369
|
+
___
|
|
370
|
+
|
|
371
|
+
### getRegistrationDeadline
|
|
372
|
+
|
|
373
|
+
▸ **getRegistrationDeadline**(`gameId`, `timeToJoin?`): `Promise`\<`undefined` \| `number`\>
|
|
374
|
+
|
|
375
|
+
Retrieves the registration deadline for a specific game.
|
|
376
|
+
|
|
377
|
+
#### Parameters
|
|
378
|
+
|
|
379
|
+
| Name | Type | Description |
|
|
380
|
+
| :------ | :------ | :------ |
|
|
381
|
+
| `gameId` | `bigint` | The ID of the game. |
|
|
382
|
+
| `timeToJoin?` | `number` | Optional. The additional time (in seconds) to join the game. |
|
|
383
|
+
|
|
384
|
+
#### Returns
|
|
385
|
+
|
|
386
|
+
`Promise`\<`undefined` \| `number`\>
|
|
387
|
+
|
|
388
|
+
A Promise that resolves to the registration deadline timestamp.
|
|
389
|
+
|
|
390
|
+
#### Inherited from
|
|
391
|
+
|
|
392
|
+
[InstanceBase](InstanceBase.md).[getRegistrationDeadline](InstanceBase.md#getregistrationdeadline)
|
|
393
|
+
|
|
394
|
+
___
|
|
395
|
+
|
|
396
|
+
### resolveTurnDeadline
|
|
397
|
+
|
|
398
|
+
▸ **resolveTurnDeadline**(`block`, `gameId`, `timePerTurn?`): `Promise`\<`number`\>
|
|
399
|
+
|
|
400
|
+
Resolves the deadline for the current turn.
|
|
401
|
+
|
|
402
|
+
#### Parameters
|
|
403
|
+
|
|
404
|
+
| Name | Type | Description |
|
|
405
|
+
| :------ | :------ | :------ |
|
|
406
|
+
| `block` | `Block` | The current block. |
|
|
407
|
+
| `gameId` | `bigint` | The ID of the game. |
|
|
408
|
+
| `timePerTurn?` | `number` | The time duration per turn (optional). |
|
|
409
|
+
|
|
410
|
+
#### Returns
|
|
411
|
+
|
|
412
|
+
`Promise`\<`number`\>
|
|
413
|
+
|
|
414
|
+
The deadline for the current turn.
|
|
415
|
+
|
|
416
|
+
#### Inherited from
|
|
417
|
+
|
|
418
|
+
[InstanceBase](InstanceBase.md).[resolveTurnDeadline](InstanceBase.md#resolveturndeadline)
|
|
419
|
+
|
|
420
|
+
___
|
|
421
|
+
|
|
422
|
+
### getTurnDeadline
|
|
423
|
+
|
|
424
|
+
▸ **getTurnDeadline**(`gameId`, `timePerTurn?`): `Promise`\<`number`\>
|
|
425
|
+
|
|
426
|
+
Retrieves the deadline for the current turn in a game.
|
|
427
|
+
|
|
428
|
+
#### Parameters
|
|
429
|
+
|
|
430
|
+
| Name | Type | Description |
|
|
431
|
+
| :------ | :------ | :------ |
|
|
432
|
+
| `gameId` | `bigint` | The ID of the game. |
|
|
433
|
+
| `timePerTurn?` | `number` | Optional. The duration of each turn in seconds. |
|
|
434
|
+
|
|
435
|
+
#### Returns
|
|
436
|
+
|
|
437
|
+
`Promise`\<`number`\>
|
|
438
|
+
|
|
439
|
+
A Promise that resolves to the deadline for the current turn, or 0 if the turn has not started.
|
|
440
|
+
|
|
441
|
+
#### Inherited from
|
|
442
|
+
|
|
443
|
+
[InstanceBase](InstanceBase.md).[getTurnDeadline](InstanceBase.md#getturndeadline)
|
|
444
|
+
|
|
445
|
+
___
|
|
446
|
+
|
|
447
|
+
### getContractState
|
|
448
|
+
|
|
449
|
+
▸ **getContractState**(): `Promise`\<\{ `numGames`: `bigint` ; `contractInitialized`: `boolean` ; `commonParams`: \{ `principalCost`: `bigint` ; `principalTimeConstant`: `bigint` ; `gamePaymentToken`: \`0x$\{string}\` ; `rankTokenAddress`: \`0x$\{string}\` ; `beneficiary`: \`0x$\{string}\` ; `derivedToken`: \`0x$\{string}\` ; `minimumParticipantsInCircle`: `bigint` ; `proposalIntegrityVerifier`: \`0x$\{string}\` ; `poseidon5`: \`0x$\{string}\` ; `poseidon2`: \`0x$\{string}\` } }\>
|
|
450
|
+
|
|
451
|
+
Retrieves the contract state.
|
|
452
|
+
|
|
453
|
+
#### Returns
|
|
454
|
+
|
|
455
|
+
`Promise`\<\{ `numGames`: `bigint` ; `contractInitialized`: `boolean` ; `commonParams`: \{ `principalCost`: `bigint` ; `principalTimeConstant`: `bigint` ; `gamePaymentToken`: \`0x$\{string}\` ; `rankTokenAddress`: \`0x$\{string}\` ; `beneficiary`: \`0x$\{string}\` ; `derivedToken`: \`0x$\{string}\` ; `minimumParticipantsInCircle`: `bigint` ; `proposalIntegrityVerifier`: \`0x$\{string}\` ; `poseidon5`: \`0x$\{string}\` ; `poseidon2`: \`0x$\{string}\` } }\>
|
|
456
|
+
|
|
457
|
+
InstanceState object (maintains backward compatibility)
|
|
458
|
+
|
|
459
|
+
#### Inherited from
|
|
460
|
+
|
|
461
|
+
[InstanceBase](InstanceBase.md).[getContractState](InstanceBase.md#getcontractstate)
|
|
462
|
+
|
|
463
|
+
___
|
|
464
|
+
|
|
465
|
+
### getPlayersGames
|
|
466
|
+
|
|
467
|
+
▸ **getPlayersGames**(`account`): `Promise`\<readonly `bigint`[]\>
|
|
468
|
+
|
|
469
|
+
Retrieves a player's game.
|
|
470
|
+
|
|
471
|
+
#### Parameters
|
|
472
|
+
|
|
473
|
+
| Name | Type | Description |
|
|
474
|
+
| :------ | :------ | :------ |
|
|
475
|
+
| `account` | \`0x$\{string}\` | The player's account address. |
|
|
476
|
+
|
|
477
|
+
#### Returns
|
|
478
|
+
|
|
479
|
+
`Promise`\<readonly `bigint`[]\>
|
|
480
|
+
|
|
481
|
+
#### Inherited from
|
|
482
|
+
|
|
483
|
+
[InstanceBase](InstanceBase.md).[getPlayersGames](InstanceBase.md#getplayersgames)
|
|
484
|
+
|
|
485
|
+
___
|
|
486
|
+
|
|
487
|
+
### getProposalScoresList
|
|
488
|
+
|
|
489
|
+
▸ **getProposalScoresList**(`gameId`): `Promise`\<\{ `id`: `string` ; `proposalHash`: `string` ; `proposal`: `string` ; `blockTimestamp`: `string` ; `srcAddress`: `string` ; `gameId`: `bigint` ; `turn`: `bigint` ; `roundNumber`: `bigint` ; `score`: `bigint` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId; `contractAddress`: \`0x$\{string}\` }[]\>
|
|
490
|
+
|
|
491
|
+
Retrieves the list of proposal scores for a specific game.
|
|
492
|
+
|
|
493
|
+
#### Parameters
|
|
494
|
+
|
|
495
|
+
| Name | Type | Description |
|
|
496
|
+
| :------ | :------ | :------ |
|
|
497
|
+
| `gameId` | `bigint` | The ID of the game. |
|
|
498
|
+
|
|
499
|
+
#### Returns
|
|
500
|
+
|
|
501
|
+
`Promise`\<\{ `id`: `string` ; `proposalHash`: `string` ; `proposal`: `string` ; `blockTimestamp`: `string` ; `srcAddress`: `string` ; `gameId`: `bigint` ; `turn`: `bigint` ; `roundNumber`: `bigint` ; `score`: `bigint` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId; `contractAddress`: \`0x$\{string}\` }[]\>
|
|
502
|
+
|
|
503
|
+
A Promise that resolves to the list of proposal scores.
|
|
504
|
+
|
|
505
|
+
#### Inherited from
|
|
506
|
+
|
|
507
|
+
[InstanceBase](InstanceBase.md).[getProposalScoresList](InstanceBase.md#getproposalscoreslist)
|
|
508
|
+
|
|
509
|
+
___
|
|
510
|
+
|
|
511
|
+
### getCurrentTurn
|
|
512
|
+
|
|
513
|
+
▸ **getCurrentTurn**(`gameId`): `Promise`\<`bigint`\>
|
|
514
|
+
|
|
515
|
+
Retrieve s the current turn of a game.
|
|
516
|
+
|
|
517
|
+
#### Parameters
|
|
518
|
+
|
|
519
|
+
| Name | Type | Description |
|
|
520
|
+
| :------ | :------ | :------ |
|
|
521
|
+
| `gameId` | `bigint` | The ID of the game. |
|
|
522
|
+
|
|
523
|
+
#### Returns
|
|
524
|
+
|
|
525
|
+
`Promise`\<`bigint`\>
|
|
526
|
+
|
|
527
|
+
A Promise that resolves to the current turn of the game.
|
|
528
|
+
|
|
529
|
+
#### Inherited from
|
|
530
|
+
|
|
531
|
+
[InstanceBase](InstanceBase.md).[getCurrentTurn](InstanceBase.md#getcurrentturn)
|
|
532
|
+
|
|
533
|
+
___
|
|
534
|
+
|
|
535
|
+
### getPlayers
|
|
536
|
+
|
|
537
|
+
▸ **getPlayers**(`gameId`): `Promise`\<readonly \`0x$\{string}\`[]\>
|
|
538
|
+
|
|
539
|
+
Retrieve s the palyers of a game.
|
|
540
|
+
|
|
541
|
+
#### Parameters
|
|
542
|
+
|
|
543
|
+
| Name | Type | Description |
|
|
544
|
+
| :------ | :------ | :------ |
|
|
545
|
+
| `gameId` | `bigint` | The ID of the game. |
|
|
546
|
+
|
|
547
|
+
#### Returns
|
|
548
|
+
|
|
549
|
+
`Promise`\<readonly \`0x$\{string}\`[]\>
|
|
550
|
+
|
|
551
|
+
A Promise that resolves to the player addresses of the game.
|
|
552
|
+
|
|
553
|
+
#### Inherited from
|
|
554
|
+
|
|
555
|
+
[InstanceBase](InstanceBase.md).[getPlayers](InstanceBase.md#getplayers)
|
|
556
|
+
|
|
557
|
+
___
|
|
558
|
+
|
|
559
|
+
### getGameState
|
|
560
|
+
|
|
561
|
+
▸ **getGameState**(`gameId`): `Promise`\<\{ `rank`: `bigint` ; `minGameTime`: `bigint` ; `createdBy`: \`0x$\{string}\` ; `numCommitments`: `bigint` ; `numVotes`: `bigint` ; `voting`: \{ `voteCredits`: `bigint` ; `maxQuadraticPoints`: `bigint` ; `minQuadraticPositions`: `bigint` } ; `currentTurn`: `bigint` ; `turnStartedAt`: `bigint` ; `registrationOpenAt`: `bigint` ; `hasStarted`: `boolean` ; `hasEnded`: `boolean` ; `numPlayersMadeMove`: `bigint` ; `numActivePlayers`: `bigint` ; `isOvertime`: `boolean` ; `timePerTurn`: `bigint` ; `maxPlayerCnt`: `bigint` ; `minPlayerCnt`: `bigint` ; `timeToJoin`: `bigint` ; `maxTurns`: `bigint` ; `voteCredits`: `bigint` ; `gameMaster`: \`0x$\{string}\` ; `metadata`: `string` ; `phase`: `bigint` ; `votePhaseDuration`: `bigint` ; `proposingPhaseDuration`: `bigint` ; `phaseStartedAt`: `bigint` ; `startedAt`: `bigint` }\>
|
|
562
|
+
|
|
563
|
+
#### Parameters
|
|
564
|
+
|
|
565
|
+
| Name | Type |
|
|
566
|
+
| :------ | :------ |
|
|
567
|
+
| `gameId` | `bigint` |
|
|
568
|
+
|
|
569
|
+
#### Returns
|
|
570
|
+
|
|
571
|
+
`Promise`\<\{ `rank`: `bigint` ; `minGameTime`: `bigint` ; `createdBy`: \`0x$\{string}\` ; `numCommitments`: `bigint` ; `numVotes`: `bigint` ; `voting`: \{ `voteCredits`: `bigint` ; `maxQuadraticPoints`: `bigint` ; `minQuadraticPositions`: `bigint` } ; `currentTurn`: `bigint` ; `turnStartedAt`: `bigint` ; `registrationOpenAt`: `bigint` ; `hasStarted`: `boolean` ; `hasEnded`: `boolean` ; `numPlayersMadeMove`: `bigint` ; `numActivePlayers`: `bigint` ; `isOvertime`: `boolean` ; `timePerTurn`: `bigint` ; `maxPlayerCnt`: `bigint` ; `minPlayerCnt`: `bigint` ; `timeToJoin`: `bigint` ; `maxTurns`: `bigint` ; `voteCredits`: `bigint` ; `gameMaster`: \`0x$\{string}\` ; `metadata`: `string` ; `phase`: `bigint` ; `votePhaseDuration`: `bigint` ; `proposingPhaseDuration`: `bigint` ; `phaseStartedAt`: `bigint` ; `startedAt`: `bigint` }\>
|
|
572
|
+
|
|
573
|
+
#### Inherited from
|
|
574
|
+
|
|
575
|
+
[InstanceBase](InstanceBase.md).[getGameState](InstanceBase.md#getgamestate)
|
|
576
|
+
|
|
577
|
+
___
|
|
578
|
+
|
|
579
|
+
### isWhitelistedGM
|
|
580
|
+
|
|
581
|
+
▸ **isWhitelistedGM**(`address`): `Promise`\<`boolean`\>
|
|
582
|
+
|
|
583
|
+
#### Parameters
|
|
584
|
+
|
|
585
|
+
| Name | Type |
|
|
586
|
+
| :------ | :------ |
|
|
587
|
+
| `address` | \`0x$\{string}\` |
|
|
588
|
+
|
|
589
|
+
#### Returns
|
|
590
|
+
|
|
591
|
+
`Promise`\<`boolean`\>
|
|
592
|
+
|
|
593
|
+
#### Inherited from
|
|
594
|
+
|
|
595
|
+
[InstanceBase](InstanceBase.md).[isWhitelistedGM](InstanceBase.md#iswhitelistedgm)
|
|
596
|
+
|
|
597
|
+
___
|
|
598
|
+
|
|
599
|
+
### getGameStateDetails
|
|
600
|
+
|
|
601
|
+
▸ **getGameStateDetails**(`gameId`): `Promise`\<`GameState`\>
|
|
602
|
+
|
|
603
|
+
Retrieves the game state for a specific game.
|
|
604
|
+
|
|
605
|
+
#### Parameters
|
|
606
|
+
|
|
607
|
+
| Name | Type | Description |
|
|
608
|
+
| :------ | :------ | :------ |
|
|
609
|
+
| `gameId` | `bigint` | The ID of the game. |
|
|
610
|
+
|
|
611
|
+
#### Returns
|
|
612
|
+
|
|
613
|
+
`Promise`\<`GameState`\>
|
|
614
|
+
|
|
615
|
+
A promise that resolves to an object containing the game state.
|
|
616
|
+
|
|
617
|
+
#### Inherited from
|
|
618
|
+
|
|
619
|
+
[InstanceBase](InstanceBase.md).[getGameStateDetails](InstanceBase.md#getgamestatedetails)
|
|
620
|
+
|
|
621
|
+
___
|
|
622
|
+
|
|
623
|
+
### getGameStates
|
|
624
|
+
|
|
625
|
+
▸ **getGameStates**(`«destructured»`): `Promise`\<\{ `items`: \{ `rank`: `bigint` ; `minGameTime`: `bigint` ; `createdBy`: \`0x$\{string}\` ; `numCommitments`: `bigint` ; `numVotes`: `bigint` ; `voting`: \{ `voteCredits`: `bigint` ; `maxQuadraticPoints`: `bigint` ; `minQuadraticPositions`: `bigint` } ; `currentTurn`: `bigint` ; `turnStartedAt`: `bigint` ; `registrationOpenAt`: `bigint` ; `hasStarted`: `boolean` ; `hasEnded`: `boolean` ; `numPlayersMadeMove`: `bigint` ; `numActivePlayers`: `bigint` ; `isOvertime`: `boolean` ; `timePerTurn`: `bigint` ; `maxPlayerCnt`: `bigint` ; `minPlayerCnt`: `bigint` ; `timeToJoin`: `bigint` ; `maxTurns`: `bigint` ; `voteCredits`: `bigint` ; `gameMaster`: \`0x$\{string}\` ; `metadata`: `string` ; `phase`: `bigint` ; `votePhaseDuration`: `bigint` ; `proposingPhaseDuration`: `bigint` ; `phaseStartedAt`: `bigint` ; `startedAt`: `bigint` } & \{ `gamePhase`: [`gameStatusEnum`](../enums/gameStatusEnum.md) }[] ; `nextPage`: `undefined` \| `number` ; `hasMore`: `boolean` }\>
|
|
626
|
+
|
|
627
|
+
#### Parameters
|
|
628
|
+
|
|
629
|
+
| Name | Type | Default value |
|
|
630
|
+
| :------ | :------ | :------ |
|
|
631
|
+
| `«destructured»` | `Object` | `undefined` |
|
|
632
|
+
| › `pageParam?` | `number` | `0` |
|
|
633
|
+
| › `pageSize?` | `number` | `10` |
|
|
634
|
+
|
|
635
|
+
#### Returns
|
|
636
|
+
|
|
637
|
+
`Promise`\<\{ `items`: \{ `rank`: `bigint` ; `minGameTime`: `bigint` ; `createdBy`: \`0x$\{string}\` ; `numCommitments`: `bigint` ; `numVotes`: `bigint` ; `voting`: \{ `voteCredits`: `bigint` ; `maxQuadraticPoints`: `bigint` ; `minQuadraticPositions`: `bigint` } ; `currentTurn`: `bigint` ; `turnStartedAt`: `bigint` ; `registrationOpenAt`: `bigint` ; `hasStarted`: `boolean` ; `hasEnded`: `boolean` ; `numPlayersMadeMove`: `bigint` ; `numActivePlayers`: `bigint` ; `isOvertime`: `boolean` ; `timePerTurn`: `bigint` ; `maxPlayerCnt`: `bigint` ; `minPlayerCnt`: `bigint` ; `timeToJoin`: `bigint` ; `maxTurns`: `bigint` ; `voteCredits`: `bigint` ; `gameMaster`: \`0x$\{string}\` ; `metadata`: `string` ; `phase`: `bigint` ; `votePhaseDuration`: `bigint` ; `proposingPhaseDuration`: `bigint` ; `phaseStartedAt`: `bigint` ; `startedAt`: `bigint` } & \{ `gamePhase`: [`gameStatusEnum`](../enums/gameStatusEnum.md) }[] ; `nextPage`: `undefined` \| `number` ; `hasMore`: `boolean` }\>
|
|
638
|
+
|
|
639
|
+
#### Inherited from
|
|
640
|
+
|
|
641
|
+
[InstanceBase](InstanceBase.md).[getGameStates](InstanceBase.md#getgamestates)
|
|
642
|
+
|
|
643
|
+
___
|
|
644
|
+
|
|
645
|
+
### getEIP712Domain
|
|
646
|
+
|
|
647
|
+
▸ **getEIP712Domain**(): `Promise`\<\{ `domainSeparator`: \`0x$\{string}\` ; `chainId`: `bigint` ; `verifierContract`: \`0x$\{string}\` ; `hashedName`: \`0x$\{string}\` ; `hashedVersion`: \`0x$\{string}\` ; `typeHash`: \`0x$\{string}\` ; `name`: `string` ; `version`: `string` }\>
|
|
648
|
+
|
|
649
|
+
#### Returns
|
|
650
|
+
|
|
651
|
+
`Promise`\<\{ `domainSeparator`: \`0x$\{string}\` ; `chainId`: `bigint` ; `verifierContract`: \`0x$\{string}\` ; `hashedName`: \`0x$\{string}\` ; `hashedVersion`: \`0x$\{string}\` ; `typeHash`: \`0x$\{string}\` ; `name`: `string` ; `version`: `string` }\>
|
|
652
|
+
|
|
653
|
+
#### Inherited from
|
|
654
|
+
|
|
655
|
+
[InstanceBase](InstanceBase.md).[getEIP712Domain](InstanceBase.md#geteip712domain)
|
|
656
|
+
|
|
657
|
+
___
|
|
658
|
+
|
|
659
|
+
### pkdf
|
|
660
|
+
|
|
661
|
+
▸ **pkdf**(`«destructured»`): \`0x$\{string}\`
|
|
662
|
+
|
|
663
|
+
#### Parameters
|
|
664
|
+
|
|
665
|
+
| Name | Type | Default value |
|
|
666
|
+
| :------ | :------ | :------ |
|
|
667
|
+
| `«destructured»` | `Object` | `undefined` |
|
|
668
|
+
| › `chainId` | `number` | `undefined` |
|
|
669
|
+
| › `privateKey` | \`0x$\{string}\` | `undefined` |
|
|
670
|
+
| › `gameId` | `bigint` | `undefined` |
|
|
671
|
+
| › `turn` | `bigint` | `undefined` |
|
|
672
|
+
| › `contractAddress` | \`0x$\{string}\` | `undefined` |
|
|
673
|
+
| › `scope?` | ``"default"`` \| ``"turnSalt"`` | `"default"` |
|
|
674
|
+
|
|
675
|
+
#### Returns
|
|
676
|
+
|
|
677
|
+
\`0x$\{string}\`
|
|
678
|
+
|
|
679
|
+
#### Inherited from
|
|
680
|
+
|
|
681
|
+
[InstanceBase](InstanceBase.md).[pkdf](InstanceBase.md#pkdf)
|
|
682
|
+
|
|
683
|
+
___
|
|
684
|
+
|
|
685
|
+
### sharedSigner
|
|
686
|
+
|
|
687
|
+
▸ **sharedSigner**(`«destructured»`): \`0x$\{string}\`
|
|
688
|
+
|
|
689
|
+
#### Parameters
|
|
690
|
+
|
|
691
|
+
| Name | Type |
|
|
692
|
+
| :------ | :------ |
|
|
693
|
+
| `«destructured»` | `Object` |
|
|
694
|
+
| › `publicKey` | \`0x$\{string}\` |
|
|
695
|
+
| › `privateKey` | \`0x$\{string}\` |
|
|
696
|
+
| › `gameId` | `bigint` |
|
|
697
|
+
| › `turn` | `bigint` |
|
|
698
|
+
| › `contractAddress` | \`0x$\{string}\` |
|
|
699
|
+
| › `chainId` | `number` |
|
|
700
|
+
|
|
701
|
+
#### Returns
|
|
702
|
+
|
|
703
|
+
\`0x$\{string}\`
|
|
704
|
+
|
|
705
|
+
#### Inherited from
|
|
706
|
+
|
|
707
|
+
[InstanceBase](InstanceBase.md).[sharedSigner](InstanceBase.md#sharedsigner)
|
|
708
|
+
|
|
709
|
+
___
|
|
710
|
+
|
|
711
|
+
### getPlayerPubKey
|
|
712
|
+
|
|
713
|
+
▸ **getPlayerPubKey**(`«destructured»`): `Promise`\<\`0x$\{string}\`\>
|
|
714
|
+
|
|
715
|
+
#### Parameters
|
|
716
|
+
|
|
717
|
+
| Name | Type |
|
|
718
|
+
| :------ | :------ |
|
|
719
|
+
| `«destructured»` | `Object` |
|
|
720
|
+
| › `instanceAddress` | \`0x$\{string}\` |
|
|
721
|
+
| › `gameId` | `bigint` |
|
|
722
|
+
| › `player` | \`0x$\{string}\` |
|
|
723
|
+
|
|
724
|
+
#### Returns
|
|
725
|
+
|
|
726
|
+
`Promise`\<\`0x$\{string}\`\>
|
|
727
|
+
|
|
728
|
+
#### Inherited from
|
|
729
|
+
|
|
730
|
+
[InstanceBase](InstanceBase.md).[getPlayerPubKey](InstanceBase.md#getplayerpubkey)
|
|
731
|
+
|
|
732
|
+
___
|
|
733
|
+
|
|
734
|
+
### isGameMetadata
|
|
735
|
+
|
|
736
|
+
▸ **isGameMetadata**(`data`, `fellowshipMetadata`): data is GameMetadata\<FellowshipMetadata\>
|
|
737
|
+
|
|
738
|
+
#### Parameters
|
|
739
|
+
|
|
740
|
+
| Name | Type |
|
|
741
|
+
| :------ | :------ |
|
|
742
|
+
| `data` | `unknown` |
|
|
743
|
+
| `fellowshipMetadata` | [`FellowshipMetadata`](../index.md#fellowshipmetadata) |
|
|
744
|
+
|
|
745
|
+
#### Returns
|
|
746
|
+
|
|
747
|
+
data is GameMetadata\<FellowshipMetadata\>
|
|
748
|
+
|
|
749
|
+
#### Inherited from
|
|
750
|
+
|
|
751
|
+
[InstanceBase](InstanceBase.md).[isGameMetadata](InstanceBase.md#isgamemetadata)
|
|
752
|
+
|
|
753
|
+
___
|
|
754
|
+
|
|
755
|
+
### isPlayerInGame
|
|
756
|
+
|
|
757
|
+
▸ **isPlayerInGame**(`gameId`, `player`): `Promise`\<`boolean`\>
|
|
758
|
+
|
|
759
|
+
Check if a player is in a specific game
|
|
760
|
+
|
|
761
|
+
#### Parameters
|
|
762
|
+
|
|
763
|
+
| Name | Type | Description |
|
|
764
|
+
| :------ | :------ | :------ |
|
|
765
|
+
| `gameId` | `bigint` | The ID of the game to check |
|
|
766
|
+
| `player` | \`0x$\{string}\` | The address of the player |
|
|
767
|
+
|
|
768
|
+
#### Returns
|
|
769
|
+
|
|
770
|
+
`Promise`\<`boolean`\>
|
|
771
|
+
|
|
772
|
+
Whether the player is in the game
|
|
773
|
+
|
|
774
|
+
#### Inherited from
|
|
775
|
+
|
|
776
|
+
[InstanceBase](InstanceBase.md).[isPlayerInGame](InstanceBase.md#isplayeringame)
|
|
777
|
+
|
|
778
|
+
___
|
|
779
|
+
|
|
780
|
+
### getGameMetadata
|
|
781
|
+
|
|
782
|
+
▸ **getGameMetadata**(`ipfsGateway`, `gameId`): `Promise`\<[`GameMetadata`](../interfaces/GameMetadata.md)\<[`FellowshipMetadata`](../index.md#fellowshipmetadata)\>\>
|
|
783
|
+
|
|
784
|
+
#### Parameters
|
|
785
|
+
|
|
786
|
+
| Name | Type |
|
|
787
|
+
| :------ | :------ |
|
|
788
|
+
| `ipfsGateway` | `string` |
|
|
789
|
+
| `gameId` | `bigint` |
|
|
790
|
+
|
|
791
|
+
#### Returns
|
|
792
|
+
|
|
793
|
+
`Promise`\<[`GameMetadata`](../interfaces/GameMetadata.md)\<[`FellowshipMetadata`](../index.md#fellowshipmetadata)\>\>
|
|
794
|
+
|
|
795
|
+
#### Inherited from
|
|
796
|
+
|
|
797
|
+
[InstanceBase](InstanceBase.md).[getGameMetadata](InstanceBase.md#getgamemetadata)
|
|
798
|
+
|
|
799
|
+
___
|
|
800
|
+
|
|
801
|
+
### getProposalGameScore
|
|
802
|
+
|
|
803
|
+
▸ **getProposalGameScore**(`gameId`, `proposalHash`): `Promise`\<`bigint`\>
|
|
804
|
+
|
|
805
|
+
Get the score of a proposal in a specific game
|
|
806
|
+
|
|
807
|
+
#### Parameters
|
|
808
|
+
|
|
809
|
+
| Name | Type | Description |
|
|
810
|
+
| :------ | :------ | :------ |
|
|
811
|
+
| `gameId` | `bigint` | The ID of the game |
|
|
812
|
+
| `proposalHash` | \`0x$\{string}\` | The hash of the proposal |
|
|
813
|
+
|
|
814
|
+
#### Returns
|
|
815
|
+
|
|
816
|
+
`Promise`\<`bigint`\>
|
|
817
|
+
|
|
818
|
+
The score of the proposal
|
|
819
|
+
|
|
820
|
+
#### Inherited from
|
|
821
|
+
|
|
822
|
+
[InstanceBase](InstanceBase.md).[getProposalGameScore](InstanceBase.md#getproposalgamescore)
|
|
823
|
+
|
|
824
|
+
___
|
|
825
|
+
|
|
826
|
+
### getProposalTurnScore
|
|
827
|
+
|
|
828
|
+
▸ **getProposalTurnScore**(`gameId`, `turn`, `proposalHash`): `Promise`\<\{ `score`: `bigint` ; `proposedBy`: readonly \`0x$\{string}\`[] }\>
|
|
829
|
+
|
|
830
|
+
Get the score of a proposal in a specific turn
|
|
831
|
+
|
|
832
|
+
#### Parameters
|
|
833
|
+
|
|
834
|
+
| Name | Type | Description |
|
|
835
|
+
| :------ | :------ | :------ |
|
|
836
|
+
| `gameId` | `bigint` | The ID of the game |
|
|
837
|
+
| `turn` | `bigint` | The turn number |
|
|
838
|
+
| `proposalHash` | \`0x$\{string}\` | The hash of the proposal |
|
|
839
|
+
|
|
840
|
+
#### Returns
|
|
841
|
+
|
|
842
|
+
`Promise`\<\{ `score`: `bigint` ; `proposedBy`: readonly \`0x$\{string}\`[] }\>
|
|
843
|
+
|
|
844
|
+
Object with score and proposedBy array
|
|
845
|
+
|
|
846
|
+
#### Inherited from
|
|
847
|
+
|
|
848
|
+
[InstanceBase](InstanceBase.md).[getProposalTurnScore](InstanceBase.md#getproposalturnscore)
|
|
849
|
+
|
|
850
|
+
___
|
|
851
|
+
|
|
852
|
+
### getProposalsTurnScores
|
|
853
|
+
|
|
854
|
+
▸ **getProposalsTurnScores**(`gameId`, `turn`): `Promise`\<\{ `proposalHashes`: readonly \`0x$\{string}\`[] ; `scores`: readonly `bigint`[] ; `proposedBy`: readonly readonly \`0x$\{string}\`[][] }\>
|
|
855
|
+
|
|
856
|
+
Get the scores of all proposals in a specific turn
|
|
857
|
+
|
|
858
|
+
#### Parameters
|
|
859
|
+
|
|
860
|
+
| Name | Type | Description |
|
|
861
|
+
| :------ | :------ | :------ |
|
|
862
|
+
| `gameId` | `bigint` | The ID of the game |
|
|
863
|
+
| `turn` | `bigint` | The turn number |
|
|
864
|
+
|
|
865
|
+
#### Returns
|
|
866
|
+
|
|
867
|
+
`Promise`\<\{ `proposalHashes`: readonly \`0x$\{string}\`[] ; `scores`: readonly `bigint`[] ; `proposedBy`: readonly readonly \`0x$\{string}\`[][] }\>
|
|
868
|
+
|
|
869
|
+
Object with proposalHashes, scores, and proposedBy arrays
|
|
870
|
+
|
|
871
|
+
#### Inherited from
|
|
872
|
+
|
|
873
|
+
[InstanceBase](InstanceBase.md).[getProposalsTurnScores](InstanceBase.md#getproposalsturnscores)
|
|
874
|
+
|
|
875
|
+
___
|
|
876
|
+
|
|
877
|
+
### proposalExistsInTurn
|
|
878
|
+
|
|
879
|
+
▸ **proposalExistsInTurn**(`gameId`, `turn`, `proposalHash`): `Promise`\<\{ `exists`: `boolean` ; `proposedBy`: readonly \`0x$\{string}\`[] }\>
|
|
880
|
+
|
|
881
|
+
Check if a proposal exists in a specific turn
|
|
882
|
+
|
|
883
|
+
#### Parameters
|
|
884
|
+
|
|
885
|
+
| Name | Type | Description |
|
|
886
|
+
| :------ | :------ | :------ |
|
|
887
|
+
| `gameId` | `bigint` | The ID of the game |
|
|
888
|
+
| `turn` | `bigint` | The turn number |
|
|
889
|
+
| `proposalHash` | \`0x$\{string}\` | The hash of the proposal |
|
|
890
|
+
|
|
891
|
+
#### Returns
|
|
892
|
+
|
|
893
|
+
`Promise`\<\{ `exists`: `boolean` ; `proposedBy`: readonly \`0x$\{string}\`[] }\>
|
|
894
|
+
|
|
895
|
+
Object with exists boolean and proposedBy array
|
|
896
|
+
|
|
897
|
+
#### Inherited from
|
|
898
|
+
|
|
899
|
+
[InstanceBase](InstanceBase.md).[proposalExistsInTurn](InstanceBase.md#proposalexistsinturn)
|
|
900
|
+
|
|
901
|
+
___
|
|
902
|
+
|
|
903
|
+
### proposalExistsInGame
|
|
904
|
+
|
|
905
|
+
▸ **proposalExistsInGame**(`gameId`, `proposalHash`): `Promise`\<`boolean`\>
|
|
906
|
+
|
|
907
|
+
Check if a proposal exists in a specific game
|
|
908
|
+
|
|
909
|
+
#### Parameters
|
|
910
|
+
|
|
911
|
+
| Name | Type | Description |
|
|
912
|
+
| :------ | :------ | :------ |
|
|
913
|
+
| `gameId` | `bigint` | The ID of the game |
|
|
914
|
+
| `proposalHash` | \`0x$\{string}\` | The hash of the proposal |
|
|
915
|
+
|
|
916
|
+
#### Returns
|
|
917
|
+
|
|
918
|
+
`Promise`\<`boolean`\>
|
|
919
|
+
|
|
920
|
+
Boolean indicating if the proposal exists
|
|
921
|
+
|
|
922
|
+
#### Inherited from
|
|
923
|
+
|
|
924
|
+
[InstanceBase](InstanceBase.md).[proposalExistsInGame](InstanceBase.md#proposalexistsingame)
|
|
925
|
+
|
|
926
|
+
___
|
|
927
|
+
|
|
928
|
+
### proposalExists
|
|
929
|
+
|
|
930
|
+
▸ **proposalExists**(`proposalHash`): `Promise`\<`boolean`\>
|
|
931
|
+
|
|
932
|
+
Check if a proposal exists in the instance
|
|
933
|
+
|
|
934
|
+
#### Parameters
|
|
935
|
+
|
|
936
|
+
| Name | Type | Description |
|
|
937
|
+
| :------ | :------ | :------ |
|
|
938
|
+
| `proposalHash` | \`0x$\{string}\` | The hash of the proposal |
|
|
939
|
+
|
|
940
|
+
#### Returns
|
|
941
|
+
|
|
942
|
+
`Promise`\<`boolean`\>
|
|
943
|
+
|
|
944
|
+
Boolean indicating if the proposal exists
|
|
945
|
+
|
|
946
|
+
#### Inherited from
|
|
947
|
+
|
|
948
|
+
[InstanceBase](InstanceBase.md).[proposalExists](InstanceBase.md#proposalexists)
|
|
949
|
+
|
|
950
|
+
___
|
|
951
|
+
|
|
952
|
+
### getProposalTotalScore
|
|
953
|
+
|
|
954
|
+
▸ **getProposalTotalScore**(`proposalHash`): `Promise`\<`bigint`\>
|
|
955
|
+
|
|
956
|
+
Get the total aggregated score of a proposal across all games
|
|
957
|
+
|
|
958
|
+
#### Parameters
|
|
959
|
+
|
|
960
|
+
| Name | Type | Description |
|
|
961
|
+
| :------ | :------ | :------ |
|
|
962
|
+
| `proposalHash` | \`0x$\{string}\` | The hash of the proposal |
|
|
963
|
+
|
|
964
|
+
#### Returns
|
|
965
|
+
|
|
966
|
+
`Promise`\<`bigint`\>
|
|
967
|
+
|
|
968
|
+
The total score of the proposal
|
|
969
|
+
|
|
970
|
+
#### Inherited from
|
|
971
|
+
|
|
972
|
+
[InstanceBase](InstanceBase.md).[getProposalTotalScore](InstanceBase.md#getproposaltotalscore)
|
|
973
|
+
|
|
974
|
+
___
|
|
975
|
+
|
|
976
|
+
### getCurrentDay
|
|
977
|
+
|
|
978
|
+
▸ **getCurrentDay**(): `Promise`\<`bigint`\>
|
|
979
|
+
|
|
980
|
+
Gets the current day number based on block timestamp
|
|
981
|
+
|
|
982
|
+
#### Returns
|
|
983
|
+
|
|
984
|
+
`Promise`\<`bigint`\>
|
|
985
|
+
|
|
986
|
+
The current day number (block.timestamp / 1 days)
|
|
987
|
+
|
|
988
|
+
___
|
|
989
|
+
|
|
990
|
+
### currentDay
|
|
991
|
+
|
|
992
|
+
▸ **currentDay**(): `Promise`\<`bigint`\>
|
|
993
|
+
|
|
994
|
+
Gets the current day number (alias for getCurrentDay)
|
|
995
|
+
|
|
996
|
+
#### Returns
|
|
997
|
+
|
|
998
|
+
`Promise`\<`bigint`\>
|
|
999
|
+
|
|
1000
|
+
The current day number
|
|
1001
|
+
|
|
1002
|
+
___
|
|
1003
|
+
|
|
1004
|
+
### getUBIParams
|
|
1005
|
+
|
|
1006
|
+
▸ **getUBIParams**(): `Promise`\<[`UBIParams`](../interfaces/UBIParams.md)\>
|
|
1007
|
+
|
|
1008
|
+
Gets the UBI system parameters
|
|
1009
|
+
|
|
1010
|
+
#### Returns
|
|
1011
|
+
|
|
1012
|
+
`Promise`\<[`UBIParams`](../interfaces/UBIParams.md)\>
|
|
1013
|
+
|
|
1014
|
+
Object containing dailyClaimAmount, dailySupportAmount, and domainName
|
|
1015
|
+
|
|
1016
|
+
___
|
|
1017
|
+
|
|
1018
|
+
### getProposalLifetimeStats
|
|
1019
|
+
|
|
1020
|
+
▸ **getProposalLifetimeStats**(`proposalHash`): `Promise`\<[`ProposalGlobalStats`](../interfaces/ProposalGlobalStats.md)\>
|
|
1021
|
+
|
|
1022
|
+
Gets the lifetime statistics for a proposal
|
|
1023
|
+
|
|
1024
|
+
#### Parameters
|
|
1025
|
+
|
|
1026
|
+
| Name | Type | Description |
|
|
1027
|
+
| :------ | :------ | :------ |
|
|
1028
|
+
| `proposalHash` | \`0x$\{string}\` | The hash of the proposal |
|
|
1029
|
+
|
|
1030
|
+
#### Returns
|
|
1031
|
+
|
|
1032
|
+
`Promise`\<[`ProposalGlobalStats`](../interfaces/ProposalGlobalStats.md)\>
|
|
1033
|
+
|
|
1034
|
+
Object containing aggregateScore, proposedTimes, and repostedTimes
|
|
1035
|
+
|
|
1036
|
+
___
|
|
1037
|
+
|
|
1038
|
+
### getProposalDailyScore
|
|
1039
|
+
|
|
1040
|
+
▸ **getProposalDailyScore**(`proposalHash`, `day`): `Promise`\<[`DailyProposal`](../interfaces/DailyProposal.md)\>
|
|
1041
|
+
|
|
1042
|
+
Gets the daily score for a proposal on a specific day
|
|
1043
|
+
|
|
1044
|
+
#### Parameters
|
|
1045
|
+
|
|
1046
|
+
| Name | Type | Description |
|
|
1047
|
+
| :------ | :------ | :------ |
|
|
1048
|
+
| `proposalHash` | \`0x$\{string}\` | The hash of the proposal |
|
|
1049
|
+
| `day` | `bigint` | The day number to query |
|
|
1050
|
+
|
|
1051
|
+
#### Returns
|
|
1052
|
+
|
|
1053
|
+
`Promise`\<[`DailyProposal`](../interfaces/DailyProposal.md)\>
|
|
1054
|
+
|
|
1055
|
+
DailyProposal object with proposal details for that day
|
|
1056
|
+
|
|
1057
|
+
___
|
|
1058
|
+
|
|
1059
|
+
### getProposalsCnt
|
|
1060
|
+
|
|
1061
|
+
▸ **getProposalsCnt**(`day`): `Promise`\<`bigint`\>
|
|
1062
|
+
|
|
1063
|
+
Gets the total number of proposals for a specific day
|
|
1064
|
+
|
|
1065
|
+
#### Parameters
|
|
1066
|
+
|
|
1067
|
+
| Name | Type | Description |
|
|
1068
|
+
| :------ | :------ | :------ |
|
|
1069
|
+
| `day` | `bigint` | The day number to query |
|
|
1070
|
+
|
|
1071
|
+
#### Returns
|
|
1072
|
+
|
|
1073
|
+
`Promise`\<`bigint`\>
|
|
1074
|
+
|
|
1075
|
+
The count of proposals for that day
|
|
1076
|
+
|
|
1077
|
+
___
|
|
1078
|
+
|
|
1079
|
+
### getLastClaimedAt
|
|
1080
|
+
|
|
1081
|
+
▸ **getLastClaimedAt**(`user`): `Promise`\<`bigint`\>
|
|
1082
|
+
|
|
1083
|
+
Gets the day a user last claimed their tokens
|
|
1084
|
+
|
|
1085
|
+
#### Parameters
|
|
1086
|
+
|
|
1087
|
+
| Name | Type | Description |
|
|
1088
|
+
| :------ | :------ | :------ |
|
|
1089
|
+
| `user` | \`0x$\{string}\` | The address of the user |
|
|
1090
|
+
|
|
1091
|
+
#### Returns
|
|
1092
|
+
|
|
1093
|
+
`Promise`\<`bigint`\>
|
|
1094
|
+
|
|
1095
|
+
The day number of the last claim (0 if never claimed)
|
|
1096
|
+
|
|
1097
|
+
___
|
|
1098
|
+
|
|
1099
|
+
### getUserState
|
|
1100
|
+
|
|
1101
|
+
▸ **getUserState**(`user`): `Promise`\<[`UserState`](../interfaces/UserState.md)\>
|
|
1102
|
+
|
|
1103
|
+
Gets the current state for a user
|
|
1104
|
+
|
|
1105
|
+
#### Parameters
|
|
1106
|
+
|
|
1107
|
+
| Name | Type | Description |
|
|
1108
|
+
| :------ | :------ | :------ |
|
|
1109
|
+
| `user` | \`0x$\{string}\` | The address of the user |
|
|
1110
|
+
|
|
1111
|
+
#### Returns
|
|
1112
|
+
|
|
1113
|
+
`Promise`\<[`UserState`](../interfaces/UserState.md)\>
|
|
1114
|
+
|
|
1115
|
+
Object containing claimedToday and supportSpent
|
|
1116
|
+
|
|
1117
|
+
___
|
|
1118
|
+
|
|
1119
|
+
### getPauser
|
|
1120
|
+
|
|
1121
|
+
▸ **getPauser**(): `Promise`\<\`0x$\{string}\`\>
|
|
1122
|
+
|
|
1123
|
+
Gets the address of the pauser
|
|
1124
|
+
|
|
1125
|
+
#### Returns
|
|
1126
|
+
|
|
1127
|
+
`Promise`\<\`0x$\{string}\`\>
|
|
1128
|
+
|
|
1129
|
+
The address with pausing/unpausing permissions
|
|
1130
|
+
|
|
1131
|
+
___
|
|
1132
|
+
|
|
1133
|
+
### getMultipass
|
|
1134
|
+
|
|
1135
|
+
▸ **getMultipass**(): `Promise`\<\`0x$\{string}\`\>
|
|
1136
|
+
|
|
1137
|
+
Gets the Multipass contract address
|
|
1138
|
+
|
|
1139
|
+
#### Returns
|
|
1140
|
+
|
|
1141
|
+
`Promise`\<\`0x$\{string}\`\>
|
|
1142
|
+
|
|
1143
|
+
The address of the Multipass contract
|
|
1144
|
+
|
|
1145
|
+
___
|
|
1146
|
+
|
|
1147
|
+
### getToken
|
|
1148
|
+
|
|
1149
|
+
▸ **getToken**(): `Promise`\<\`0x$\{string}\`\>
|
|
1150
|
+
|
|
1151
|
+
Gets the governance token contract address
|
|
1152
|
+
|
|
1153
|
+
#### Returns
|
|
1154
|
+
|
|
1155
|
+
`Promise`\<\`0x$\{string}\`\>
|
|
1156
|
+
|
|
1157
|
+
The address of the DistributableGovernanceERC20 token
|
|
1158
|
+
|
|
1159
|
+
___
|
|
1160
|
+
|
|
1161
|
+
### isPaused
|
|
1162
|
+
|
|
1163
|
+
▸ **isPaused**(): `Promise`\<`boolean`\>
|
|
1164
|
+
|
|
1165
|
+
Checks if the contract is currently paused
|
|
1166
|
+
|
|
1167
|
+
#### Returns
|
|
1168
|
+
|
|
1169
|
+
`Promise`\<`boolean`\>
|
|
1170
|
+
|
|
1171
|
+
True if paused, false otherwise
|
|
1172
|
+
|
|
1173
|
+
___
|
|
1174
|
+
|
|
1175
|
+
### getUserInfo
|
|
1176
|
+
|
|
1177
|
+
▸ **getUserInfo**(`user`): `Promise`\<\{ `userState`: [`UserState`](../interfaces/UserState.md) ; `lastClaimedAt`: `bigint` ; `currentDay`: `bigint` ; `canClaim`: `boolean` }\>
|
|
1178
|
+
|
|
1179
|
+
Gets comprehensive information about a user's current status
|
|
1180
|
+
|
|
1181
|
+
#### Parameters
|
|
1182
|
+
|
|
1183
|
+
| Name | Type | Description |
|
|
1184
|
+
| :------ | :------ | :------ |
|
|
1185
|
+
| `user` | \`0x$\{string}\` | The address of the user |
|
|
1186
|
+
|
|
1187
|
+
#### Returns
|
|
1188
|
+
|
|
1189
|
+
`Promise`\<\{ `userState`: [`UserState`](../interfaces/UserState.md) ; `lastClaimedAt`: `bigint` ; `currentDay`: `bigint` ; `canClaim`: `boolean` }\>
|
|
1190
|
+
|
|
1191
|
+
Object containing user state, last claimed day, and current day
|
|
1192
|
+
|
|
1193
|
+
___
|
|
1194
|
+
|
|
1195
|
+
### getProposalInfo
|
|
1196
|
+
|
|
1197
|
+
▸ **getProposalInfo**(`proposalHash`, `day?`): `Promise`\<\{ `lifetimeStats`: [`ProposalGlobalStats`](../interfaces/ProposalGlobalStats.md) ; `dailyScore`: [`DailyProposal`](../interfaces/DailyProposal.md) ; `day`: `bigint` }\>
|
|
1198
|
+
|
|
1199
|
+
Gets comprehensive information about a proposal
|
|
1200
|
+
|
|
1201
|
+
#### Parameters
|
|
1202
|
+
|
|
1203
|
+
| Name | Type | Description |
|
|
1204
|
+
| :------ | :------ | :------ |
|
|
1205
|
+
| `proposalHash` | \`0x$\{string}\` | The hash of the proposal |
|
|
1206
|
+
| `day?` | `bigint` | Optional day to get daily score (defaults to current day - 1) |
|
|
1207
|
+
|
|
1208
|
+
#### Returns
|
|
1209
|
+
|
|
1210
|
+
`Promise`\<\{ `lifetimeStats`: [`ProposalGlobalStats`](../interfaces/ProposalGlobalStats.md) ; `dailyScore`: [`DailyProposal`](../interfaces/DailyProposal.md) ; `day`: `bigint` }\>
|
|
1211
|
+
|
|
1212
|
+
Object containing lifetime stats and daily score
|
|
1213
|
+
|
|
1214
|
+
___
|
|
1215
|
+
|
|
1216
|
+
### getDayProposals
|
|
1217
|
+
|
|
1218
|
+
▸ **getDayProposals**(`day`): `Promise`\<\{ `count`: `bigint` ; `day`: `bigint` }\>
|
|
1219
|
+
|
|
1220
|
+
Gets all proposals for a specific day (requires querying events or off-chain indexer)
|
|
1221
|
+
This is a helper method that would typically use an indexer/subgraph
|
|
1222
|
+
|
|
1223
|
+
#### Parameters
|
|
1224
|
+
|
|
1225
|
+
| Name | Type | Description |
|
|
1226
|
+
| :------ | :------ | :------ |
|
|
1227
|
+
| `day` | `bigint` | The day to query |
|
|
1228
|
+
|
|
1229
|
+
#### Returns
|
|
1230
|
+
|
|
1231
|
+
`Promise`\<\{ `count`: `bigint` ; `day`: `bigint` }\>
|
|
1232
|
+
|
|
1233
|
+
The count of proposals for that day
|
|
1234
|
+
|
|
1235
|
+
___
|
|
1236
|
+
|
|
1237
|
+
### claim
|
|
1238
|
+
|
|
1239
|
+
▸ **claim**(`proposalText?`): `Promise`\<\`0x$\{string}\`\>
|
|
1240
|
+
|
|
1241
|
+
Claims daily UBI tokens and optionally submits a proposal
|
|
1242
|
+
|
|
1243
|
+
#### Parameters
|
|
1244
|
+
|
|
1245
|
+
| Name | Type | Default value | Description |
|
|
1246
|
+
| :------ | :------ | :------ | :------ |
|
|
1247
|
+
| `proposalText` | `string` | `""` | The proposal text (empty string for no proposal) |
|
|
1248
|
+
|
|
1249
|
+
#### Returns
|
|
1250
|
+
|
|
1251
|
+
`Promise`\<\`0x$\{string}\`\>
|
|
1252
|
+
|
|
1253
|
+
Transaction hash
|
|
1254
|
+
|
|
1255
|
+
**`Throws`**
|
|
1256
|
+
|
|
1257
|
+
Error if wallet client is not configured
|
|
1258
|
+
|
|
1259
|
+
___
|
|
1260
|
+
|
|
1261
|
+
### support
|
|
1262
|
+
|
|
1263
|
+
▸ **support**(`votes`): `Promise`\<\`0x$\{string}\`\>
|
|
1264
|
+
|
|
1265
|
+
Supports one or more proposals from the previous day using quadratic voting
|
|
1266
|
+
|
|
1267
|
+
#### Parameters
|
|
1268
|
+
|
|
1269
|
+
| Name | Type | Description |
|
|
1270
|
+
| :------ | :------ | :------ |
|
|
1271
|
+
| `votes` | [`VoteElement`](../interfaces/VoteElement.md)[] | Array of vote elements (proposal hash and amount) |
|
|
1272
|
+
|
|
1273
|
+
#### Returns
|
|
1274
|
+
|
|
1275
|
+
`Promise`\<\`0x$\{string}\`\>
|
|
1276
|
+
|
|
1277
|
+
Transaction hash
|
|
1278
|
+
|
|
1279
|
+
**`Throws`**
|
|
1280
|
+
|
|
1281
|
+
Error if wallet client is not configured
|
|
1282
|
+
|
|
1283
|
+
___
|
|
1284
|
+
|
|
1285
|
+
### pause
|
|
1286
|
+
|
|
1287
|
+
▸ **pause**(): `Promise`\<\`0x$\{string}\`\>
|
|
1288
|
+
|
|
1289
|
+
Pauses the UBI contract (only callable by pauser)
|
|
1290
|
+
|
|
1291
|
+
#### Returns
|
|
1292
|
+
|
|
1293
|
+
`Promise`\<\`0x$\{string}\`\>
|
|
1294
|
+
|
|
1295
|
+
Transaction hash
|
|
1296
|
+
|
|
1297
|
+
**`Throws`**
|
|
1298
|
+
|
|
1299
|
+
Error if wallet client is not configured or caller is not pauser
|
|
1300
|
+
|
|
1301
|
+
___
|
|
1302
|
+
|
|
1303
|
+
### unpause
|
|
1304
|
+
|
|
1305
|
+
▸ **unpause**(): `Promise`\<\`0x$\{string}\`\>
|
|
1306
|
+
|
|
1307
|
+
Unpauses the UBI contract (only callable by pauser)
|
|
1308
|
+
|
|
1309
|
+
#### Returns
|
|
1310
|
+
|
|
1311
|
+
`Promise`\<\`0x$\{string}\`\>
|
|
1312
|
+
|
|
1313
|
+
Transaction hash
|
|
1314
|
+
|
|
1315
|
+
**`Throws`**
|
|
1316
|
+
|
|
1317
|
+
Error if wallet client is not configured or caller is not pauser
|
|
1318
|
+
|
|
1319
|
+
___
|
|
1320
|
+
|
|
1321
|
+
### getProposalsByAddress
|
|
1322
|
+
|
|
1323
|
+
▸ **getProposalsByAddress**(`«destructured»?`): `Promise`\<\{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `day`: `bigint` ; `scoreWhenProposed`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1324
|
+
|
|
1325
|
+
Gets proposals submitted by a specific address
|
|
1326
|
+
|
|
1327
|
+
#### Parameters
|
|
1328
|
+
|
|
1329
|
+
| Name | Type | Default value |
|
|
1330
|
+
| :------ | :------ | :------ |
|
|
1331
|
+
| `«destructured»` | `Object` | `{}` |
|
|
1332
|
+
| › `proposer?` | \`0x$\{string}\` | `undefined` |
|
|
1333
|
+
| › `day?` | `bigint` | `undefined` |
|
|
1334
|
+
| › `limit?` | `number` | `100` |
|
|
1335
|
+
| › `offset?` | `number` | `0` |
|
|
1336
|
+
|
|
1337
|
+
#### Returns
|
|
1338
|
+
|
|
1339
|
+
`Promise`\<\{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `day`: `bigint` ; `scoreWhenProposed`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1340
|
+
|
|
1341
|
+
Array of proposal events
|
|
1342
|
+
|
|
1343
|
+
___
|
|
1344
|
+
|
|
1345
|
+
### getDailyProposals
|
|
1346
|
+
|
|
1347
|
+
▸ **getDailyProposals**(`«destructured»?`): `Promise`\<\{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `day`: `bigint` ; `scoreWhenProposed`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1348
|
+
|
|
1349
|
+
Gets all proposals for a specific day
|
|
1350
|
+
|
|
1351
|
+
#### Parameters
|
|
1352
|
+
|
|
1353
|
+
| Name | Type | Default value |
|
|
1354
|
+
| :------ | :------ | :------ |
|
|
1355
|
+
| `«destructured»` | `Object` | `{}` |
|
|
1356
|
+
| › `day?` | `bigint` | `undefined` |
|
|
1357
|
+
| › `limit?` | `number` | `100` |
|
|
1358
|
+
| › `offset?` | `number` | `0` |
|
|
1359
|
+
|
|
1360
|
+
#### Returns
|
|
1361
|
+
|
|
1362
|
+
`Promise`\<\{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `day`: `bigint` ; `scoreWhenProposed`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1363
|
+
|
|
1364
|
+
Array of proposal events for the day
|
|
1365
|
+
|
|
1366
|
+
___
|
|
1367
|
+
|
|
1368
|
+
### getProposalScoreHistory
|
|
1369
|
+
|
|
1370
|
+
▸ **getProposalScoreHistory**(`«destructured»?`): `Promise`\<\{ `id`: `string` ; `proposal`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `dailyScore`: `bigint` ; `day`: `bigint` ; `proposer`: \`0x$\{string}\` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1371
|
+
|
|
1372
|
+
Gets proposal score updates for a specific proposal
|
|
1373
|
+
|
|
1374
|
+
#### Parameters
|
|
1375
|
+
|
|
1376
|
+
| Name | Type | Default value |
|
|
1377
|
+
| :------ | :------ | :------ |
|
|
1378
|
+
| `«destructured»` | `Object` | `{}` |
|
|
1379
|
+
| › `proposal?` | `string` | `undefined` |
|
|
1380
|
+
| › `day?` | `bigint` | `undefined` |
|
|
1381
|
+
| › `limit?` | `number` | `100` |
|
|
1382
|
+
| › `offset?` | `number` | `0` |
|
|
1383
|
+
|
|
1384
|
+
#### Returns
|
|
1385
|
+
|
|
1386
|
+
`Promise`\<\{ `id`: `string` ; `proposal`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `dailyScore`: `bigint` ; `day`: `bigint` ; `proposer`: \`0x$\{string}\` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1387
|
+
|
|
1388
|
+
Array of proposal score update events
|
|
1389
|
+
|
|
1390
|
+
___
|
|
1391
|
+
|
|
1392
|
+
### getVotesByAddress
|
|
1393
|
+
|
|
1394
|
+
▸ **getVotesByAddress**(`«destructured»?`): `Promise`\<\{ `id`: `string` ; `proposal`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `participant`: \`0x$\{string}\` ; `day`: `bigint` ; `amount`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1395
|
+
|
|
1396
|
+
Gets voting events for a specific participant
|
|
1397
|
+
|
|
1398
|
+
#### Parameters
|
|
1399
|
+
|
|
1400
|
+
| Name | Type | Default value |
|
|
1401
|
+
| :------ | :------ | :------ |
|
|
1402
|
+
| `«destructured»` | `Object` | `{}` |
|
|
1403
|
+
| › `participant?` | \`0x$\{string}\` | `undefined` |
|
|
1404
|
+
| › `day?` | `bigint` | `undefined` |
|
|
1405
|
+
| › `limit?` | `number` | `100` |
|
|
1406
|
+
| › `offset?` | `number` | `0` |
|
|
1407
|
+
|
|
1408
|
+
#### Returns
|
|
1409
|
+
|
|
1410
|
+
`Promise`\<\{ `id`: `string` ; `proposal`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `participant`: \`0x$\{string}\` ; `day`: `bigint` ; `amount`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1411
|
+
|
|
1412
|
+
Array of voting events
|
|
1413
|
+
|
|
1414
|
+
___
|
|
1415
|
+
|
|
1416
|
+
### getDailyVotes
|
|
1417
|
+
|
|
1418
|
+
▸ **getDailyVotes**(`«destructured»?`): `Promise`\<\{ `id`: `string` ; `proposal`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `participant`: \`0x$\{string}\` ; `day`: `bigint` ; `amount`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1419
|
+
|
|
1420
|
+
Gets all votes for a specific day
|
|
1421
|
+
|
|
1422
|
+
#### Parameters
|
|
1423
|
+
|
|
1424
|
+
| Name | Type | Default value |
|
|
1425
|
+
| :------ | :------ | :------ |
|
|
1426
|
+
| `«destructured»` | `Object` | `{}` |
|
|
1427
|
+
| › `day?` | `bigint` | `undefined` |
|
|
1428
|
+
| › `limit?` | `number` | `100` |
|
|
1429
|
+
| › `offset?` | `number` | `0` |
|
|
1430
|
+
|
|
1431
|
+
#### Returns
|
|
1432
|
+
|
|
1433
|
+
`Promise`\<\{ `id`: `string` ; `proposal`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `participant`: \`0x$\{string}\` ; `day`: `bigint` ; `amount`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1434
|
+
|
|
1435
|
+
Array of voting events for the day
|
|
1436
|
+
|
|
1437
|
+
___
|
|
1438
|
+
|
|
1439
|
+
### getClaimHistory
|
|
1440
|
+
|
|
1441
|
+
▸ **getClaimHistory**(`«destructured»?`): `Promise`\<\{ `id`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `user`: \`0x$\{string}\` ; `amount`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1442
|
+
|
|
1443
|
+
Gets claim history
|
|
1444
|
+
|
|
1445
|
+
#### Parameters
|
|
1446
|
+
|
|
1447
|
+
| Name | Type | Default value |
|
|
1448
|
+
| :------ | :------ | :------ |
|
|
1449
|
+
| `«destructured»` | `Object` | `{}` |
|
|
1450
|
+
| › `user?` | \`0x$\{string}\` | `undefined` |
|
|
1451
|
+
| › `limit?` | `number` | `100` |
|
|
1452
|
+
| › `offset?` | `number` | `0` |
|
|
1453
|
+
|
|
1454
|
+
#### Returns
|
|
1455
|
+
|
|
1456
|
+
`Promise`\<\{ `id`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `user`: \`0x$\{string}\` ; `amount`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1457
|
+
|
|
1458
|
+
Array of claim events
|
|
1459
|
+
|
|
1460
|
+
___
|
|
1461
|
+
|
|
1462
|
+
### getRepostsByAddress
|
|
1463
|
+
|
|
1464
|
+
▸ **getRepostsByAddress**(`«destructured»?`): `Promise`\<\{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `reposter`: \`0x$\{string}\` ; `day`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1465
|
+
|
|
1466
|
+
Gets repost events by reposter
|
|
1467
|
+
|
|
1468
|
+
#### Parameters
|
|
1469
|
+
|
|
1470
|
+
| Name | Type | Default value |
|
|
1471
|
+
| :------ | :------ | :------ |
|
|
1472
|
+
| `«destructured»` | `Object` | `{}` |
|
|
1473
|
+
| › `reposter?` | \`0x$\{string}\` | `undefined` |
|
|
1474
|
+
| › `day?` | `bigint` | `undefined` |
|
|
1475
|
+
| › `limit?` | `number` | `100` |
|
|
1476
|
+
| › `offset?` | `number` | `0` |
|
|
1477
|
+
|
|
1478
|
+
#### Returns
|
|
1479
|
+
|
|
1480
|
+
`Promise`\<\{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `reposter`: \`0x$\{string}\` ; `day`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1481
|
+
|
|
1482
|
+
Array of repost events
|
|
1483
|
+
|
|
1484
|
+
___
|
|
1485
|
+
|
|
1486
|
+
### getProposalLifetimeScores
|
|
1487
|
+
|
|
1488
|
+
▸ **getProposalLifetimeScores**(`«destructured»?`): `Promise`\<\{ `id`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `lifeTimeScore`: `bigint` ; `proposedTimes`: `bigint` ; `repostedTimes`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1489
|
+
|
|
1490
|
+
Gets lifetime scores for all proposals
|
|
1491
|
+
|
|
1492
|
+
#### Parameters
|
|
1493
|
+
|
|
1494
|
+
| Name | Type | Default value |
|
|
1495
|
+
| :------ | :------ | :------ |
|
|
1496
|
+
| `«destructured»` | `Object` | `{}` |
|
|
1497
|
+
| › `limit?` | `number` | `100` |
|
|
1498
|
+
| › `offset?` | `number` | `0` |
|
|
1499
|
+
|
|
1500
|
+
#### Returns
|
|
1501
|
+
|
|
1502
|
+
`Promise`\<\{ `id`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `lifeTimeScore`: `bigint` ; `proposedTimes`: `bigint` ; `repostedTimes`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[]\>
|
|
1503
|
+
|
|
1504
|
+
Array of proposal lifetime score events
|
|
1505
|
+
|
|
1506
|
+
___
|
|
1507
|
+
|
|
1508
|
+
### getDayActivity
|
|
1509
|
+
|
|
1510
|
+
▸ **getDayActivity**(`«destructured»?`): `Promise`\<\{ `day`: `bigint` = queryDay; `proposals`: \{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `day`: `bigint` ; `scoreWhenProposed`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `votes`: \{ `id`: `string` ; `proposal`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `participant`: \`0x$\{string}\` ; `day`: `bigint` ; `amount`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `reposts`: \{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `reposter`: \`0x$\{string}\` ; `day`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `proposalCount`: `number` = proposals.length; `voteCount`: `number` = votes.length; `repostCount`: `number` = reposts.length }\>
|
|
1511
|
+
|
|
1512
|
+
Gets comprehensive proposal data including proposals, scores, and votes for a specific day
|
|
1513
|
+
|
|
1514
|
+
#### Parameters
|
|
1515
|
+
|
|
1516
|
+
| Name | Type | Default value |
|
|
1517
|
+
| :------ | :------ | :------ |
|
|
1518
|
+
| `«destructured»` | `Object` | `{}` |
|
|
1519
|
+
| › `day?` | `bigint` | `undefined` |
|
|
1520
|
+
| › `limit?` | `number` | `100` |
|
|
1521
|
+
|
|
1522
|
+
#### Returns
|
|
1523
|
+
|
|
1524
|
+
`Promise`\<\{ `day`: `bigint` = queryDay; `proposals`: \{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `day`: `bigint` ; `scoreWhenProposed`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `votes`: \{ `id`: `string` ; `proposal`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `participant`: \`0x$\{string}\` ; `day`: `bigint` ; `amount`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `reposts`: \{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `reposter`: \`0x$\{string}\` ; `day`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `proposalCount`: `number` = proposals.length; `voteCount`: `number` = votes.length; `repostCount`: `number` = reposts.length }\>
|
|
1525
|
+
|
|
1526
|
+
Object containing proposals, scores, and votes for the day
|
|
1527
|
+
|
|
1528
|
+
___
|
|
1529
|
+
|
|
1530
|
+
### getUserActivity
|
|
1531
|
+
|
|
1532
|
+
▸ **getUserActivity**(`«destructured»`): `Promise`\<\{ `user`: \`0x$\{string}\` ; `userInfo`: \{ `userState`: [`UserState`](../interfaces/UserState.md) ; `lastClaimedAt`: `bigint` ; `currentDay`: `bigint` ; `canClaim`: `boolean` } ; `proposals`: \{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `day`: `bigint` ; `scoreWhenProposed`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `votes`: \{ `id`: `string` ; `proposal`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `participant`: \`0x$\{string}\` ; `day`: `bigint` ; `amount`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `reposts`: \{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `reposter`: \`0x$\{string}\` ; `day`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `claims`: \{ `id`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `user`: \`0x$\{string}\` ; `amount`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `proposalCount`: `number` = proposals.length; `voteCount`: `number` = votes.length; `repostCount`: `number` = reposts.length; `claimCount`: `number` = claims.length }\>
|
|
1533
|
+
|
|
1534
|
+
Gets comprehensive user activity data
|
|
1535
|
+
|
|
1536
|
+
#### Parameters
|
|
1537
|
+
|
|
1538
|
+
| Name | Type | Default value |
|
|
1539
|
+
| :------ | :------ | :------ |
|
|
1540
|
+
| `«destructured»` | `Object` | `undefined` |
|
|
1541
|
+
| › `user` | \`0x$\{string}\` | `undefined` |
|
|
1542
|
+
| › `limit?` | `number` | `100` |
|
|
1543
|
+
|
|
1544
|
+
#### Returns
|
|
1545
|
+
|
|
1546
|
+
`Promise`\<\{ `user`: \`0x$\{string}\` ; `userInfo`: \{ `userState`: [`UserState`](../interfaces/UserState.md) ; `lastClaimedAt`: `bigint` ; `currentDay`: `bigint` ; `canClaim`: `boolean` } ; `proposals`: \{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `day`: `bigint` ; `scoreWhenProposed`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `votes`: \{ `id`: `string` ; `proposal`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `participant`: \`0x$\{string}\` ; `day`: `bigint` ; `amount`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `reposts`: \{ `id`: `string` ; `proposal`: `string` ; `proposalText`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `proposer`: \`0x$\{string}\` ; `reposter`: \`0x$\{string}\` ; `day`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `claims`: \{ `id`: `string` ; `blockTimestamp`: `string` ; `hash`: `string` ; `user`: \`0x$\{string}\` ; `amount`: `bigint` ; `instanceAddress`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `chainId`: `number` = event.chainId }[] ; `proposalCount`: `number` = proposals.length; `voteCount`: `number` = votes.length; `repostCount`: `number` = reposts.length; `claimCount`: `number` = claims.length }\>
|
|
1547
|
+
|
|
1548
|
+
Object containing user's proposals, votes, reposts, and claims
|
|
1549
|
+
|
|
1550
|
+
___
|
|
1551
|
+
|
|
1552
|
+
### getProposalScores
|
|
1553
|
+
|
|
1554
|
+
▸ **getProposalScores**(`«destructured»?`): `Promise`\<\{ `proposal`: `string` ; `score`: `bigint` ; `stars`: `number` }[]\>
|
|
1555
|
+
|
|
1556
|
+
Gets aggregated proposal scores from voting events
|
|
1557
|
+
|
|
1558
|
+
#### Parameters
|
|
1559
|
+
|
|
1560
|
+
| Name | Type | Default value |
|
|
1561
|
+
| :------ | :------ | :------ |
|
|
1562
|
+
| `«destructured»` | `Object` | `{}` |
|
|
1563
|
+
| › `day?` | `bigint` | `undefined` |
|
|
1564
|
+
| › `limit?` | `number` | `1000` |
|
|
1565
|
+
|
|
1566
|
+
#### Returns
|
|
1567
|
+
|
|
1568
|
+
`Promise`\<\{ `proposal`: `string` ; `score`: `bigint` ; `stars`: `number` }[]\>
|
|
1569
|
+
|
|
1570
|
+
Map of proposal hashes to their total support scores
|
|
1571
|
+
|
|
1572
|
+
___
|
|
1573
|
+
|
|
1574
|
+
### getProposalScore
|
|
1575
|
+
|
|
1576
|
+
▸ **getProposalScore**(`proposalHash`, `day?`): `Promise`\<\{ `proposal`: \`0x$\{string}\` ; `score`: `bigint` ; `stars`: `number` }\>
|
|
1577
|
+
|
|
1578
|
+
Gets the score for a specific proposal
|
|
1579
|
+
|
|
1580
|
+
#### Parameters
|
|
1581
|
+
|
|
1582
|
+
| Name | Type | Description |
|
|
1583
|
+
| :------ | :------ | :------ |
|
|
1584
|
+
| `proposalHash` | \`0x$\{string}\` | The hash of the proposal |
|
|
1585
|
+
| `day?` | `bigint` | Optional day to filter votes |
|
|
1586
|
+
|
|
1587
|
+
#### Returns
|
|
1588
|
+
|
|
1589
|
+
`Promise`\<\{ `proposal`: \`0x$\{string}\` ; `score`: `bigint` ; `stars`: `number` }\>
|
|
1590
|
+
|
|
1591
|
+
Total support score for the proposal
|