@reyaxyz/community-sdk 0.4.0 → 0.6.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/dist/client/index.js +10 -13
- package/dist/client/index.js.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/modules/twitter/services/get-auth-url/index.js +1 -1
- package/dist/modules/twitter/services/get-auth-url/index.js.map +1 -1
- package/dist/modules/vote/index.js +33 -10
- package/dist/modules/vote/index.js.map +1 -1
- package/dist/modules/vote/services/executeTransaction.js +99 -0
- package/dist/modules/vote/services/executeTransaction.js.map +1 -0
- package/dist/modules/vote/services/get-vote-details/index.js.map +1 -1
- package/dist/modules/vote/services/get-vote-status/index.js.map +1 -1
- package/dist/modules/vote/services/index.js +0 -3
- package/dist/modules/vote/services/index.js.map +1 -1
- package/dist/modules/vote/services/vote/encode.js +14 -0
- package/dist/modules/vote/services/vote/encode.js.map +1 -0
- package/dist/modules/vote/services/vote/index.js +22 -21
- package/dist/modules/vote/services/vote/index.js.map +1 -1
- package/dist/modules/vote/types.js.map +1 -0
- package/dist/types/client/index.d.ts +2 -5
- package/dist/types/client/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/twitter/services/get-auth-url/index.d.ts.map +1 -1
- package/dist/types/modules/vote/index.d.ts +6 -8
- package/dist/types/modules/vote/index.d.ts.map +1 -1
- package/dist/types/modules/vote/services/executeTransaction.d.ts +13 -0
- package/dist/types/modules/vote/services/executeTransaction.d.ts.map +1 -0
- package/dist/types/modules/vote/services/get-vote-details/index.d.ts +1 -1
- package/dist/types/modules/vote/services/get-vote-details/index.d.ts.map +1 -1
- package/dist/types/modules/vote/services/get-vote-status/index.d.ts +1 -1
- package/dist/types/modules/vote/services/get-vote-status/index.d.ts.map +1 -1
- package/dist/types/modules/vote/services/index.d.ts +0 -3
- package/dist/types/modules/vote/services/index.d.ts.map +1 -1
- package/dist/types/modules/vote/services/vote/encode.d.ts +3 -0
- package/dist/types/modules/vote/services/vote/encode.d.ts.map +1 -0
- package/dist/types/modules/vote/services/vote/index.d.ts +2 -2
- package/dist/types/modules/vote/services/vote/index.d.ts.map +1 -1
- package/dist/types/modules/vote/types.d.ts +20 -0
- package/dist/types/modules/vote/types.d.ts.map +1 -0
- package/dist/types/utils/action.d.ts +11 -0
- package/dist/types/utils/action.d.ts.map +1 -0
- package/dist/types/utils/contractAddresses.d.ts +7 -0
- package/dist/types/utils/contractAddresses.d.ts.map +1 -0
- package/dist/{modules/vote/services/get-vote-status/types.js → utils/action.js} +1 -1
- package/dist/utils/action.js.map +1 -0
- package/dist/utils/contractAddresses.js +39 -0
- package/dist/utils/contractAddresses.js.map +1 -0
- package/package.json +4 -3
- package/src/client/index.ts +11 -21
- package/src/index.ts +0 -4
- package/src/modules/twitter/services/get-auth-url/index.ts +3 -1
- package/src/modules/vote/index.ts +13 -19
- package/src/modules/vote/services/executeTransaction.ts +58 -0
- package/src/modules/vote/services/get-vote-details/index.ts +2 -2
- package/src/modules/vote/services/get-vote-status/index.ts +2 -2
- package/src/modules/vote/services/index.ts +0 -3
- package/src/modules/vote/services/vote/encode.ts +12 -0
- package/src/modules/vote/services/vote/index.ts +21 -17
- package/src/modules/vote/types.ts +23 -0
- package/src/utils/action.ts +10 -0
- package/src/utils/contractAddresses.ts +43 -0
- package/dist/client/constants.js +0 -24
- package/dist/client/constants.js.map +0 -1
- package/dist/modules/vote/services/get-vote-details/types.js.map +0 -1
- package/dist/modules/vote/services/get-vote-status/types.js.map +0 -1
- package/dist/modules/vote/services/vote/types.js +0 -3
- package/dist/modules/vote/services/vote/types.js.map +0 -1
- package/dist/types/client/constants.d.ts +0 -12
- package/dist/types/client/constants.d.ts.map +0 -1
- package/dist/types/modules/vote/services/get-vote-details/types.d.ts +0 -6
- package/dist/types/modules/vote/services/get-vote-details/types.d.ts.map +0 -1
- package/dist/types/modules/vote/services/get-vote-status/types.d.ts +0 -7
- package/dist/types/modules/vote/services/get-vote-status/types.d.ts.map +0 -1
- package/dist/types/modules/vote/services/vote/types.d.ts +0 -11
- package/dist/types/modules/vote/services/vote/types.d.ts.map +0 -1
- package/dist/types/types.d.ts +0 -13
- package/dist/types/types.d.ts.map +0 -1
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
- package/src/client/constants.ts +0 -34
- package/src/modules/vote/services/get-vote-details/types.ts +0 -6
- package/src/modules/vote/services/get-vote-status/types.ts +0 -7
- package/src/modules/vote/services/vote/types.ts +0 -11
- package/src/types.ts +0 -13
- /package/dist/modules/vote/{services/get-vote-details/types.js → types.js} +0 -0
package/src/client/constants.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ReyaChainId } from '@reyaxyz/common';
|
|
2
|
-
|
|
3
|
-
export type ServiceEnvironment = 'production' | 'test';
|
|
4
|
-
|
|
5
|
-
export type ServiceConfig = {
|
|
6
|
-
chainId: ReyaChainId;
|
|
7
|
-
twitter: {
|
|
8
|
-
clientId: string;
|
|
9
|
-
redirectURI: string;
|
|
10
|
-
};
|
|
11
|
-
environment: ServiceEnvironment;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const SERVICE_CONFIG: Record<ServiceEnvironment, ServiceConfig> = {
|
|
15
|
-
production: {
|
|
16
|
-
environment: 'production',
|
|
17
|
-
chainId: ReyaChainId.reyaNetwork,
|
|
18
|
-
// todo: change to production creds when new app is created
|
|
19
|
-
twitter: {
|
|
20
|
-
clientId: 'LTBKa25VWkpjaEtSMzRGVEZaYmU6MTpjaQ',
|
|
21
|
-
redirectURI:
|
|
22
|
-
'https://m8mjgmqmte.eu-central-1.awsapprunner.com/api/twitter/share',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
test: {
|
|
26
|
-
environment: 'test',
|
|
27
|
-
chainId: ReyaChainId.reyaCronos,
|
|
28
|
-
twitter: {
|
|
29
|
-
clientId: 'LTBKa25VWkpjaEtSMzRGVEZaYmU6MTpjaQ',
|
|
30
|
-
redirectURI:
|
|
31
|
-
'https://m8mjgmqmte.eu-central-1.awsapprunner.com/api/twitter/share',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { VoteDetailsEntity } from '../../../../types';
|
|
2
|
-
import { JsonRpcSigner, Signer } from 'ethers';
|
|
3
|
-
|
|
4
|
-
export type VoteParams = {
|
|
5
|
-
id: VoteDetailsEntity['id'];
|
|
6
|
-
voted: 'yes' | 'no';
|
|
7
|
-
signer: Signer | JsonRpcSigner;
|
|
8
|
-
};
|
|
9
|
-
export type VoteResult = {
|
|
10
|
-
transactionHash: string;
|
|
11
|
-
};
|
package/src/types.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type VoteDetailsEntity = {
|
|
2
|
-
id: number;
|
|
3
|
-
startDate: number; // timestamp in UTC milliseconds
|
|
4
|
-
endDate: number; // timestamp in UTC milliseconds
|
|
5
|
-
percentageToPass: number; // Example: 4%
|
|
6
|
-
yesCount: number;
|
|
7
|
-
noCount: number;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type VoteStatusEntity = {
|
|
11
|
-
votingPower: number;
|
|
12
|
-
hasVoted: boolean;
|
|
13
|
-
};
|
|
File without changes
|