@dorafactory/maci-sdk 0.0.12 → 0.0.13

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.
Files changed (60) hide show
  1. package/dist/browser.d.mts +2007 -0
  2. package/dist/browser.d.ts +2007 -0
  3. package/dist/browser.js +30833 -0
  4. package/dist/browser.js.map +1 -0
  5. package/dist/browser.mjs +30844 -0
  6. package/dist/browser.mjs.map +1 -0
  7. package/dist/index.d.mts +2008 -0
  8. package/dist/index.d.ts +2006 -14
  9. package/dist/index.js +4 -4
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +1 -1
  12. package/dist/index.mjs.map +1 -1
  13. package/package.json +31 -12
  14. package/src/browser.ts +17 -0
  15. package/src/libs/maci/maci.ts +1 -1
  16. package/src/polyfills/browser-polyfills.ts +9 -0
  17. package/dist/libs/circom/circomlib.d.ts +0 -39
  18. package/dist/libs/circom/index.d.ts +0 -10
  19. package/dist/libs/circom/tree.d.ts +0 -23
  20. package/dist/libs/circom/types.d.ts +0 -7
  21. package/dist/libs/const.d.ts +0 -117
  22. package/dist/libs/contract/config.d.ts +0 -29
  23. package/dist/libs/contract/contract.d.ts +0 -43
  24. package/dist/libs/contract/index.d.ts +0 -1
  25. package/dist/libs/contract/ts/AMaci.client.d.ts +0 -216
  26. package/dist/libs/contract/ts/AMaci.types.d.ts +0 -203
  27. package/dist/libs/contract/ts/Maci.client.d.ts +0 -180
  28. package/dist/libs/contract/ts/Maci.types.d.ts +0 -226
  29. package/dist/libs/contract/ts/OracleMaci.client.d.ts +0 -206
  30. package/dist/libs/contract/ts/OracleMaci.types.d.ts +0 -263
  31. package/dist/libs/contract/ts/Registry.client.d.ts +0 -128
  32. package/dist/libs/contract/ts/Registry.types.d.ts +0 -110
  33. package/dist/libs/contract/types.d.ts +0 -39
  34. package/dist/libs/contract/utils.d.ts +0 -59
  35. package/dist/libs/contract/vars.d.ts +0 -63
  36. package/dist/libs/errors/index.d.ts +0 -28
  37. package/dist/libs/errors/types.d.ts +0 -15
  38. package/dist/libs/http/http.d.ts +0 -16
  39. package/dist/libs/http/index.d.ts +0 -1
  40. package/dist/libs/index.d.ts +0 -7
  41. package/dist/libs/indexer/index.d.ts +0 -1
  42. package/dist/libs/indexer/indexer.d.ts +0 -142
  43. package/dist/libs/indexer/types.d.ts +0 -7
  44. package/dist/libs/maci/index.d.ts +0 -1
  45. package/dist/libs/maci/maci.d.ts +0 -121
  46. package/dist/libs/maci/types.d.ts +0 -6
  47. package/dist/libs/oracle-certificate/index.d.ts +0 -1
  48. package/dist/libs/oracle-certificate/oracle-certificate.d.ts +0 -7
  49. package/dist/libs/oracle-certificate/types.d.ts +0 -17
  50. package/dist/libs/query/account.d.ts +0 -7
  51. package/dist/libs/query/circuit.d.ts +0 -8
  52. package/dist/libs/query/event.d.ts +0 -7
  53. package/dist/libs/query/index.d.ts +0 -7
  54. package/dist/libs/query/operator.d.ts +0 -9
  55. package/dist/libs/query/proof.d.ts +0 -7
  56. package/dist/libs/query/round.d.ts +0 -11
  57. package/dist/libs/query/transaction.d.ts +0 -9
  58. package/dist/maci.d.ts +0 -157
  59. package/dist/types/index.d.ts +0 -294
  60. package/dist/utils/index.d.ts +0 -17
@@ -1,39 +0,0 @@
1
- import { Whitelist as RegistryWhitelist } from './ts/Registry.types';
2
- import { Whitelist as MaciWhitelist } from './ts/Maci.types';
3
- import { OfflineSigner } from '@cosmjs/proto-signing';
4
- import { MaciCircuitType, MaciCertSystemType, CertificateEcosystem } from '../../types';
5
- export type CreateRoundParams = {
6
- signer: OfflineSigner;
7
- title: string;
8
- description?: string;
9
- link?: string;
10
- startVoting: Date;
11
- endVoting: Date;
12
- circuitType: MaciCircuitType;
13
- };
14
- export type CreateAMaciRoundParams = {
15
- maxVoter: string;
16
- maxOption: string;
17
- operator: string;
18
- whitelist: RegistryWhitelist;
19
- voiceCreditAmount: string;
20
- preDeactivateRoot?: string;
21
- } & CreateRoundParams;
22
- export type CreateMaciRoundParams = {
23
- maxVoter: string;
24
- maxOption: string;
25
- operatorPubkey: string;
26
- whitelist: MaciWhitelist;
27
- certSystemType: MaciCertSystemType;
28
- } & CreateRoundParams;
29
- export type CreateOracleMaciRoundParams = {
30
- voteOptionMap: string[];
31
- operatorPubkey: string;
32
- whitelistEcosystem: CertificateEcosystem;
33
- whitelistSnapshotHeight: string;
34
- whitelistVotingPowerArgs: {
35
- mode: 'slope' | 'threshold';
36
- slope: string;
37
- threshold: string;
38
- };
39
- } & CreateRoundParams;
@@ -1,59 +0,0 @@
1
- import { MaciCertSystemType, MaciCircuitType, MaciRoundType } from '../../types';
2
- type MixedData<T> = T | Array<MixedData<T>> | {
3
- [key: string]: MixedData<T>;
4
- };
5
- export declare const stringizing: (o: MixedData<bigint>, path?: MixedData<bigint>[]) => MixedData<string>;
6
- export declare function getCircuitType(circuitType: MaciCircuitType): string;
7
- export declare function getContractParams(type: MaciRoundType, circuitType: MaciCircuitType, proofSystem: MaciCertSystemType, maxVoter: string, maxOption: string): {
8
- parameters: {
9
- state_tree_depth: string;
10
- int_state_tree_depth: string;
11
- vote_option_tree_depth: string;
12
- message_batch_size: string;
13
- };
14
- groth16ProcessVkey: {
15
- vk_alpha1: string;
16
- vk_beta_2: string;
17
- vk_gamma_2: string;
18
- vk_delta_2: string;
19
- vk_ic0: string;
20
- vk_ic1: string;
21
- } | null | undefined;
22
- groth16TallyVkey: {
23
- vk_alpha1: string;
24
- vk_beta_2: string;
25
- vk_gamma_2: string;
26
- vk_delta_2: string;
27
- vk_ic0: string;
28
- vk_ic1: string;
29
- } | null | undefined;
30
- plonkProcessVkey: {
31
- n: number;
32
- num_inputs: number;
33
- selector_commitments: string[];
34
- next_step_selector_commitments: string[];
35
- permutation_commitments: string[];
36
- non_residues: string[];
37
- g2_elements: string[];
38
- } | null | undefined;
39
- plonkTallyVkey: {
40
- n: number;
41
- num_inputs: number;
42
- selector_commitments: string[];
43
- next_step_selector_commitments: string[];
44
- permutation_commitments: string[];
45
- non_residues: string[];
46
- g2_elements: string[];
47
- } | null | undefined;
48
- maciVoteType: string;
49
- maciCertSystem: string;
50
- } | {
51
- parameters?: undefined;
52
- groth16ProcessVkey?: undefined;
53
- groth16TallyVkey?: undefined;
54
- plonkProcessVkey?: undefined;
55
- plonkTallyVkey?: undefined;
56
- maciVoteType?: undefined;
57
- maciCertSystem?: undefined;
58
- };
59
- export {};
@@ -1,63 +0,0 @@
1
- type Groth16VkeyType = {
2
- vk_alpha1: string;
3
- vk_beta_2: string;
4
- vk_gamma_2: string;
5
- vk_delta_2: string;
6
- vk_ic0: string;
7
- vk_ic1: string;
8
- };
9
- type CircuitInfoType = {
10
- [key: string]: {
11
- parameter: {
12
- state_tree_depth: string;
13
- int_state_tree_depth: string;
14
- vote_option_tree_depth: string;
15
- message_batch_size: string;
16
- };
17
- groth16: {
18
- process_vkey?: Groth16VkeyType;
19
- tally_vkey?: Groth16VkeyType;
20
- process_1p1v_vkey?: Groth16VkeyType;
21
- tally_1p1v_vkey?: Groth16VkeyType;
22
- process_qv_vkey?: Groth16VkeyType;
23
- tally_qv_vkey?: Groth16VkeyType;
24
- };
25
- plonk?: {
26
- process_vkey: {
27
- n: number;
28
- num_inputs: number;
29
- selector_commitments: string[];
30
- next_step_selector_commitments: string[];
31
- permutation_commitments: string[];
32
- non_residues: string[];
33
- g2_elements: string[];
34
- };
35
- tally_vkey: {
36
- n: number;
37
- num_inputs: number;
38
- selector_commitments: string[];
39
- next_step_selector_commitments: string[];
40
- permutation_commitments: string[];
41
- non_residues: string[];
42
- g2_elements: string[];
43
- };
44
- };
45
- };
46
- };
47
- export declare const CIRCUIT_INFO: CircuitInfoType;
48
- export declare const MACI_TYPE: {
49
- 'maci-1p1v': string;
50
- 'maci-qv': string;
51
- };
52
- export declare const AMACI_TYPE: {
53
- 'amaci-1p1v': string;
54
- 'amaci-qv': string;
55
- };
56
- export declare const PROOF_SYSTEM: {
57
- groth16: string;
58
- plonk: string;
59
- };
60
- export declare const QTR_LIB: {
61
- zeros: string[];
62
- };
63
- export {};
@@ -1,28 +0,0 @@
1
- export declare class BaseError extends Error {
2
- code: number;
3
- type: string;
4
- constructor(message: string, code: number, type: string);
5
- }
6
- export declare class HttpError extends BaseError {
7
- constructor(message: string, code: number);
8
- }
9
- export declare class GraphQLError extends BaseError {
10
- constructor(message: string);
11
- }
12
- export declare class ValidationError extends BaseError {
13
- constructor(message: string);
14
- }
15
- export declare class NotFoundError extends BaseError {
16
- constructor(message: string);
17
- }
18
- export declare class ParseError extends BaseError {
19
- constructor(message: string);
20
- }
21
- export type ErrorType = BaseError | Error | HttpError | NotFoundError | ValidationError | ParseError | GraphQLError;
22
- export declare function handleError(error: ErrorType): {
23
- code: number;
24
- error: {
25
- message: string;
26
- type: string;
27
- };
28
- };
@@ -1,15 +0,0 @@
1
- export declare const ERROR: {
2
- ERROR_ADDRESS_NOT_FOUND: string;
3
- ERROR_CIRCUIT_NOT_FOUND: string;
4
- ERROR_OPERATOR_INVALID_ADDRESS: string;
5
- ERROR_OPERATOR_NOT_FOUND: string;
6
- ERROR_OPERATORS_NOT_FOUND: string;
7
- ERROR_PROOF_NOT_FOUND: string;
8
- ERROR_ROUND_INVALID_ADDRESS: string;
9
- ERROR_ROUND_INVALID_STATUS: string;
10
- ERROR_ROUND_NOT_FOUND: string;
11
- ERROR_ROUNDS_NOT_FOUND: string;
12
- ERROR_TRANSACTION_NOT_FOUND: string;
13
- ERROR_TRANSACTIONS_NOT_FOUND: string;
14
- ERROR_SIGN_UP_EVENTS_NOT_FOUND: string;
15
- };
@@ -1,16 +0,0 @@
1
- export type FetchOptions = RequestInit & {
2
- next?: {
3
- revalidate?: boolean | number;
4
- };
5
- };
6
- export declare class Http {
7
- private customFetch?;
8
- private apiEndpoint;
9
- private restEndpoint;
10
- private defaultOptions?;
11
- constructor(apiEndpoint: string, restEndpoint: string, customFetch?: typeof fetch | undefined, defaultOptions?: FetchOptions);
12
- private getFetch;
13
- fetch(url: string, options?: any): Promise<Response>;
14
- fetchGraphql<T>(query: string, after: string, limit?: number | null): Promise<T>;
15
- fetchRest(path: string): Promise<any>;
16
- }
@@ -1 +0,0 @@
1
- export { Http } from './http';
@@ -1,7 +0,0 @@
1
- export { Http } from './http';
2
- export * from './query';
3
- export * from './indexer';
4
- export * from './contract';
5
- export * from './oracle-certificate';
6
- export * from './circom';
7
- export * from './maci';
@@ -1 +0,0 @@
1
- export { Indexer } from './indexer';
@@ -1,142 +0,0 @@
1
- import { BalanceResponse, RoundResponse, RoundsResponse, OperatorResponse, OperatorsResponse, CircuitResponse, TransactionResponse, TransactionsResponse, CircuitsResponse, ProofResponse, SignUpEventsResponse } from '../../types';
2
- import { IndexerParams } from './types';
3
- import { Http } from '../http';
4
- import { Round, UserAccount, Circuit, Operator, Proof, Transaction, Event } from '../query';
5
- /**
6
- * @class Indexer
7
- * @description This class is used to interact with Maci Indexer.
8
- */
9
- export declare class Indexer {
10
- restEndpoint: string;
11
- apiEndpoint: string;
12
- registryAddress: string;
13
- http: Http;
14
- round: Round;
15
- account: UserAccount;
16
- circuit: Circuit;
17
- operator: Operator;
18
- proof: Proof;
19
- transaction: Transaction;
20
- event: Event;
21
- /**
22
- * @constructor
23
- * @param {IndexerParams} params - The parameters for the Maci Indexer instance.
24
- */
25
- constructor({ restEndpoint, apiEndpoint, registryAddress, http, }: IndexerParams);
26
- /**
27
- * @method balanceOf
28
- * @description Get the balance of a specific address.
29
- * @param {string} address - The address to check the balance for.
30
- * @returns {Promise<BalanceResponse>} The balance response.
31
- */
32
- balanceOf(address: string): Promise<BalanceResponse>;
33
- /**
34
- * @method getRoundById
35
- * @description Get a round by its ID.
36
- * @param {string} id - The ID of the round.
37
- * @returns {Promise<RoundResponse>} The round response.
38
- */
39
- getRoundById(id: string): Promise<RoundResponse>;
40
- /**
41
- * @method getRounds
42
- * @description Get multiple rounds.
43
- * @param {string} after - The cursor to start after.
44
- * @param {number} [limit] - The number of rounds to retrieve.
45
- * @returns {Promise<RoundsResponse>} The rounds response.
46
- */
47
- getRounds(after: string, limit?: number): Promise<RoundsResponse>;
48
- /**
49
- * @method getRoundsByStatus
50
- * @description Get rounds by their status.
51
- * @param {string} status - The status of the rounds to retrieve.
52
- * @param {string} after - The cursor to start after.
53
- * @param {number} [limit] - The number of rounds to retrieve.
54
- * @returns {Promise<RoundsResponse>} The rounds response.
55
- */
56
- getRoundsByStatus(status: string, after: string, limit?: number): Promise<RoundsResponse>;
57
- /**
58
- * @method getRoundsByCircuitName
59
- * @description Get rounds by their circuit name.
60
- * @param {string} name - The name of the circuit.
61
- * @param {string} after - The cursor to start after.
62
- * @param {number} [limit] - The number of rounds to retrieve.
63
- * @returns {Promise<RoundsResponse>} The rounds response.
64
- */
65
- getRoundsByCircuitName(name: string, after: string, limit?: number): Promise<RoundsResponse>;
66
- /**
67
- * @method getRoundsByOperator
68
- * @description Get rounds by their operator address.
69
- * @param {string} address - The address of the operator.
70
- * @param {string} after - The cursor to start after.
71
- * @param {number} [limit] - The number of rounds to retrieve.
72
- * @returns {Promise<RoundsResponse>} The rounds response.
73
- */
74
- getRoundsByOperator(address: string, after: string, limit?: number): Promise<RoundsResponse>;
75
- /**
76
- * @method getOperatorByAddress
77
- * @description Get an operator by their address.
78
- * @param {string} address - The address of the operator.
79
- * @returns {Promise<OperatorResponse>} The operator response.
80
- */
81
- getOperatorByAddress(address: string): Promise<OperatorResponse>;
82
- /**
83
- * @method getOperators
84
- * @description Get multiple operators.
85
- * @param {string} after - The cursor to start after.
86
- * @param {number} [limit] - The number of operators to retrieve.
87
- * @returns {Promise<OperatorsResponse>} The operators response.
88
- */
89
- getOperators(after: string, limit?: number): Promise<OperatorsResponse>;
90
- /**
91
- * @method getCircuitByName
92
- * @description Get a circuit by its name.
93
- * @param {string} name - The name of the circuit.
94
- * @returns {Promise<CircuitResponse>} The circuit response.
95
- */
96
- getCircuitByName(name: string): Promise<CircuitResponse>;
97
- /**
98
- * @method getCircuits
99
- * @description Get all available circuits.
100
- * @returns {Promise<CircuitsResponse>} The circuits response.
101
- */
102
- getCircuits(): Promise<CircuitsResponse>;
103
- /**
104
- * @method getTransactionByHash
105
- * @description Get a transaction by its hash.
106
- * @param {string} hash - The hash of the transaction.
107
- * @returns {Promise<TransactionResponse>} The transaction response.
108
- */
109
- getTransactionByHash(hash: string): Promise<TransactionResponse>;
110
- /**
111
- * @method getTransactions
112
- * @description Get multiple transactions.
113
- * @param {string} after - The cursor to start after.
114
- * @param {number} [limit] - The number of transactions to retrieve.
115
- * @returns {Promise<TransactionsResponse>} The transactions response.
116
- */
117
- getTransactions(after: string, limit?: number): Promise<TransactionsResponse>;
118
- /**
119
- * @method getTransactionsByContractAddress
120
- * @description Get transactions by contract address.
121
- * @param {string} address - The contract address.
122
- * @param {string} after - The cursor to start after.
123
- * @param {number} [limit] - The number of transactions to retrieve.
124
- * @returns {Promise<TransactionsResponse>} The transactions response.
125
- */
126
- getTransactionsByContractAddress(address: string, after: string, limit?: number): Promise<TransactionsResponse>;
127
- /**
128
- * @method getProofByContractAddress
129
- * @description Get proof data by contract address.
130
- * @param {string} address - The contract address.
131
- * @returns {Promise<ProofResponse>} The proof response.
132
- */
133
- getProofByContractAddress(address: string): Promise<ProofResponse>;
134
- /**
135
- * @method getStateIdxByPubKey
136
- * @description Get the state index of a specific public key.
137
- * @param {string} contractAddress - The contract address.
138
- * @param {bigint[]} pubKey - The public key.
139
- * @returns {Promise<SignUpEventsResponse>} The sign up events response.
140
- */
141
- getSignUpEventByPubKey(contractAddress: string, pubKey: bigint[]): Promise<SignUpEventsResponse>;
142
- }
@@ -1,7 +0,0 @@
1
- import { Http } from '../http/http';
2
- export type IndexerParams = {
3
- restEndpoint: string;
4
- apiEndpoint: string;
5
- registryAddress: string;
6
- http: Http;
7
- };
@@ -1 +0,0 @@
1
- export { MACI } from './maci';
@@ -1,121 +0,0 @@
1
- import { OfflineSigner } from '@cosmjs/proto-signing';
2
- import { Circom, PublicKey } from '../circom';
3
- import { Contract } from '../contract';
4
- import { Indexer } from '../indexer';
5
- import { OracleCertificate } from '../oracle-certificate';
6
- import { SigningCosmWasmClient } from '@cosmjs/cosmwasm-stargate';
7
- import { CertificateEcosystem, ErrorResponse } from '../../types';
8
- import { SignatureResponse } from '../oracle-certificate/types';
9
- import { OracleWhitelistConfig } from '../contract/ts/OracleMaci.types';
10
- export declare function isErrorResponse(response: unknown): response is ErrorResponse;
11
- export declare class MACI {
12
- circom: Circom;
13
- contract: Contract;
14
- indexer: Indexer;
15
- oracleCertificate: OracleCertificate;
16
- constructor({ circom, contract, indexer, oracleCertificate, }: {
17
- circom: Circom;
18
- contract: Contract;
19
- indexer: Indexer;
20
- oracleCertificate: OracleCertificate;
21
- });
22
- getStateIdxInc({ signer, address, contractAddress, }: {
23
- signer: OfflineSigner;
24
- address: string;
25
- contractAddress: string;
26
- }): Promise<string>;
27
- getVoiceCreditBalance({ signer, stateIdx, contractAddress, }: {
28
- signer: OfflineSigner;
29
- stateIdx: number;
30
- contractAddress: string;
31
- }): Promise<string>;
32
- getStateIdxByPubKey({ contractAddress, pubKey, }: {
33
- contractAddress: string;
34
- pubKey: bigint[];
35
- }): Promise<number>;
36
- queryWhitelistBalanceOf({ signer, address, contractAddress, certificate, mode, }: {
37
- signer: OfflineSigner;
38
- address: string;
39
- contractAddress: string;
40
- certificate?: string;
41
- mode?: 'maci' | 'amaci';
42
- }): Promise<string>;
43
- isWhitelisted({ signer, address, contractAddress, }: {
44
- signer: OfflineSigner;
45
- address: string;
46
- contractAddress: string;
47
- }): Promise<boolean>;
48
- getOracleWhitelistConfig({ signer, contractAddress, }: {
49
- signer: OfflineSigner;
50
- contractAddress: string;
51
- }): Promise<OracleWhitelistConfig>;
52
- getRoundInfo({ contractAddress }: {
53
- contractAddress: string;
54
- }): Promise<import("../../types").RoundType>;
55
- getRoundCircuitType({ contractAddress }: {
56
- contractAddress: string;
57
- }): Promise<string>;
58
- queryRoundIsQv({ contractAddress }: {
59
- contractAddress: string;
60
- }): Promise<boolean>;
61
- queryRoundGasStation({ contractAddress }: {
62
- contractAddress: string;
63
- }): Promise<boolean>;
64
- requestOracleCertificate({ signer, ecosystem, address, contractAddress, }: {
65
- signer: OfflineSigner;
66
- ecosystem: CertificateEcosystem;
67
- address: string;
68
- contractAddress: string;
69
- }): Promise<SignatureResponse>;
70
- signup({ signer, address, contractAddress, oracleCertificate, gasStation, }: {
71
- signer: OfflineSigner;
72
- address: string;
73
- contractAddress: string;
74
- oracleCertificate?: {
75
- amount: string;
76
- signature: string;
77
- };
78
- gasStation?: boolean;
79
- }): Promise<import("@cosmjs/cosmwasm-stargate").ExecuteResult>;
80
- private processVoteOptions;
81
- vote({ signer, address, stateIdx, contractAddress, selectedOptions, operatorCoordPubKey, gasStation, }: {
82
- signer: OfflineSigner;
83
- address: string;
84
- stateIdx: number;
85
- contractAddress: string;
86
- selectedOptions: {
87
- idx: number;
88
- vc: number;
89
- }[];
90
- operatorCoordPubKey: PublicKey;
91
- gasStation?: boolean;
92
- }): Promise<import("@cosmjs/cosmwasm-stargate").DeliverTxResponse>;
93
- publishMessage({ client, address, payload, contractAddress, gasStation, }: {
94
- client: SigningCosmWasmClient;
95
- address: string;
96
- payload: {
97
- msg: bigint[];
98
- encPubkeys: PublicKey;
99
- }[];
100
- contractAddress: string;
101
- gasStation: boolean;
102
- }): Promise<import("@cosmjs/cosmwasm-stargate").DeliverTxResponse>;
103
- signupSimple({ client, address, pubKey, contractAddress, gasStation, }: {
104
- client: SigningCosmWasmClient;
105
- address: string;
106
- pubKey: PublicKey;
107
- contractAddress: string;
108
- gasStation?: boolean;
109
- }): Promise<import("@cosmjs/cosmwasm-stargate").ExecuteResult>;
110
- signupOracle({ client, address, pubKey, contractAddress, oracleCertificate, gasStation, }: {
111
- client: SigningCosmWasmClient;
112
- address: string;
113
- pubKey: PublicKey;
114
- contractAddress: string;
115
- oracleCertificate: {
116
- amount: string;
117
- signature: string;
118
- };
119
- gasStation?: boolean;
120
- }): Promise<import("@cosmjs/cosmwasm-stargate").ExecuteResult>;
121
- }
@@ -1,6 +0,0 @@
1
- export type IAccountStatus = {
2
- stateIdx: number;
3
- vcbTotal: number;
4
- whitelistCommitment: number;
5
- feegrantStatus?: string;
6
- };
@@ -1 +0,0 @@
1
- export { OracleCertificate } from './oracle-certificate';
@@ -1,7 +0,0 @@
1
- import { OracleCertificateParams, SignatureRequest, SignatureResponse } from './types';
2
- export declare class OracleCertificate {
3
- private certificateApiEndpoint;
4
- private http;
5
- constructor({ certificateApiEndpoint, http }: OracleCertificateParams);
6
- sign(data: SignatureRequest): Promise<SignatureResponse>;
7
- }
@@ -1,17 +0,0 @@
1
- import { CertificateEcosystem } from '../../types';
2
- import { Http } from '../http/http';
3
- export type OracleCertificateParams = {
4
- certificateApiEndpoint: string;
5
- http: Http;
6
- };
7
- export type SignatureRequest = {
8
- ecosystem: CertificateEcosystem;
9
- address: string;
10
- height: string;
11
- contractAddress: string;
12
- };
13
- export type SignatureResponse = {
14
- signature: string;
15
- amount: string;
16
- snapshotHeight: string;
17
- };
@@ -1,7 +0,0 @@
1
- import { Http } from '../http';
2
- import { BalanceResponse } from '../../types';
3
- export declare class UserAccount {
4
- http: Http;
5
- constructor(http: Http);
6
- balanceOf(address: string): Promise<BalanceResponse>;
7
- }
@@ -1,8 +0,0 @@
1
- import { Http } from '../../libs';
2
- import { CircuitResponse, CircuitsResponse } from '../../types';
3
- export declare class Circuit {
4
- http: Http;
5
- constructor(http: Http);
6
- getCircuitByName(name: string): Promise<CircuitResponse>;
7
- getCircuits(): Promise<CircuitsResponse>;
8
- }
@@ -1,7 +0,0 @@
1
- import { Http } from '../../libs';
2
- import { SignUpEventsResponse } from '../../types';
3
- export declare class Event {
4
- http: Http;
5
- constructor(http: Http);
6
- getSignUpEventByPubKey(contractAddress: string, pubKey: bigint[]): Promise<SignUpEventsResponse>;
7
- }
@@ -1,7 +0,0 @@
1
- export { UserAccount } from './account';
2
- export { Circuit } from './circuit';
3
- export { Operator } from './operator';
4
- export { Round } from './round';
5
- export { Transaction } from './transaction';
6
- export { Proof } from './proof';
7
- export { Event } from './event';
@@ -1,9 +0,0 @@
1
- import { Http } from '../../libs';
2
- import { OperatorResponse, OperatorsResponse } from '../../types';
3
- export declare class Operator {
4
- http: Http;
5
- amaciRegistryContract: string;
6
- constructor(http: Http, amaciRegistryContract: string);
7
- getOperatorByAddress(address: string): Promise<OperatorResponse>;
8
- getOperators(after: string, limit?: number): Promise<OperatorsResponse>;
9
- }
@@ -1,7 +0,0 @@
1
- import { Http } from '../../libs';
2
- import { ProofResponse } from '../../types';
3
- export declare class Proof {
4
- http: Http;
5
- constructor(http: Http);
6
- getProofByContractAddress(address: string): Promise<ProofResponse>;
7
- }
@@ -1,11 +0,0 @@
1
- import { RoundsResponse, RoundResponse } from '../../types';
2
- import { Http } from '../../libs';
3
- export declare class Round {
4
- http: Http;
5
- constructor(http: Http);
6
- getRoundById(address: string): Promise<RoundResponse>;
7
- getRounds(after: string, limit?: number): Promise<RoundsResponse>;
8
- getRoundsByCircuitName(circuitName: string, after: string, limit?: number): Promise<RoundsResponse>;
9
- getRoundsByStatus(status: string, after: string, limit?: number): Promise<RoundsResponse>;
10
- getRoundsByOperator(operator: string, after: string, limit?: number): Promise<RoundsResponse>;
11
- }
@@ -1,9 +0,0 @@
1
- import { TransactionsResponse, TransactionResponse } from '../../types';
2
- import { Http } from '../../libs';
3
- export declare class Transaction {
4
- http: Http;
5
- constructor(http: Http);
6
- getTransactionByHash(txHash: string): Promise<TransactionResponse>;
7
- getTransactions(after: string, limit?: number): Promise<TransactionsResponse>;
8
- getTransactionsByContractAddress(address: string, after: string, limit?: number): Promise<TransactionsResponse>;
9
- }