@dorafactory/maci-sdk 0.0.22 → 0.0.24
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/browser.d.mts +45 -23
- package/dist/browser.d.ts +45 -23
- package/dist/browser.js +35 -50
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +35 -50
- package/dist/browser.mjs.map +1 -1
- package/dist/index.d.mts +45 -23
- package/dist/index.d.ts +45 -23
- package/dist/index.js +35 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -50
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/libs/contract/ts/AMaci.client.ts +40 -100
- package/src/libs/contract/ts/AMaci.types.ts +39 -21
- package/src/libs/maci/maci.ts +15 -0
package/dist/browser.d.mts
CHANGED
|
@@ -1199,13 +1199,12 @@ interface VotingTime {
|
|
|
1199
1199
|
end_time: Timestamp;
|
|
1200
1200
|
start_time: Timestamp;
|
|
1201
1201
|
}
|
|
1202
|
-
interface
|
|
1203
|
-
users:
|
|
1202
|
+
interface WhitelistBase {
|
|
1203
|
+
users: WhitelistBaseConfig[];
|
|
1204
1204
|
}
|
|
1205
|
-
interface
|
|
1205
|
+
interface WhitelistBaseConfig {
|
|
1206
1206
|
addr: Addr;
|
|
1207
1207
|
}
|
|
1208
|
-
type Uint128 = string;
|
|
1209
1208
|
interface MessageData {
|
|
1210
1209
|
data: [Uint256, Uint256, Uint256, Uint256, Uint256, Uint256, Uint256];
|
|
1211
1210
|
}
|
|
@@ -1214,12 +1213,31 @@ interface Groth16ProofType {
|
|
|
1214
1213
|
b: string;
|
|
1215
1214
|
c: string;
|
|
1216
1215
|
}
|
|
1216
|
+
type Boolean = boolean;
|
|
1217
|
+
type DelayType = 'deactivate_delay' | 'tally_delay';
|
|
1218
|
+
interface DelayRecords {
|
|
1219
|
+
records: DelayRecord[];
|
|
1220
|
+
}
|
|
1221
|
+
interface DelayRecord {
|
|
1222
|
+
delay_duration: number;
|
|
1223
|
+
delay_process_dmsg_count: Uint256;
|
|
1224
|
+
delay_reason: string;
|
|
1225
|
+
delay_timestamp: Timestamp;
|
|
1226
|
+
delay_type: DelayType;
|
|
1227
|
+
}
|
|
1217
1228
|
type PeriodStatus = 'pending' | 'voting' | 'processing' | 'tallying' | 'ended';
|
|
1218
1229
|
interface Period {
|
|
1219
1230
|
status: PeriodStatus;
|
|
1220
1231
|
}
|
|
1221
|
-
type
|
|
1232
|
+
type Uint128 = string;
|
|
1222
1233
|
type ArrayOfString = string[];
|
|
1234
|
+
interface Whitelist {
|
|
1235
|
+
users: WhitelistConfig[];
|
|
1236
|
+
}
|
|
1237
|
+
interface WhitelistConfig {
|
|
1238
|
+
addr: Addr;
|
|
1239
|
+
is_register: boolean;
|
|
1240
|
+
}
|
|
1223
1241
|
|
|
1224
1242
|
/**
|
|
1225
1243
|
* This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
|
|
@@ -1252,9 +1270,15 @@ interface AMaciReadOnlyInterface {
|
|
|
1252
1270
|
}) => Promise<Uint256>;
|
|
1253
1271
|
getVoiceCreditAmount: () => Promise<Uint256>;
|
|
1254
1272
|
whiteList: () => Promise<Whitelist>;
|
|
1273
|
+
canSignUp: ({ sender }: {
|
|
1274
|
+
sender: Addr;
|
|
1275
|
+
}) => Promise<Boolean>;
|
|
1255
1276
|
isWhiteList: ({ sender }: {
|
|
1256
1277
|
sender: Addr;
|
|
1257
1278
|
}) => Promise<Boolean>;
|
|
1279
|
+
isRegister: ({ sender }: {
|
|
1280
|
+
sender: Addr;
|
|
1281
|
+
}) => Promise<Boolean>;
|
|
1258
1282
|
signuped: ({ pubkeyX }: {
|
|
1259
1283
|
pubkeyX: Uint256;
|
|
1260
1284
|
}) => Promise<Uint256>;
|
|
@@ -1264,6 +1288,7 @@ interface AMaciReadOnlyInterface {
|
|
|
1264
1288
|
queryCircuitType: () => Promise<Uint256>;
|
|
1265
1289
|
queryCertSystem: () => Promise<Uint256>;
|
|
1266
1290
|
queryPreDeactivateRoot: () => Promise<Uint256>;
|
|
1291
|
+
getDelayRecords: () => Promise<DelayRecords>;
|
|
1267
1292
|
}
|
|
1268
1293
|
declare class AMaciQueryClient implements AMaciReadOnlyInterface {
|
|
1269
1294
|
client: CosmWasmClient;
|
|
@@ -1292,9 +1317,15 @@ declare class AMaciQueryClient implements AMaciReadOnlyInterface {
|
|
|
1292
1317
|
}) => Promise<Uint256>;
|
|
1293
1318
|
getVoiceCreditAmount: () => Promise<Uint256>;
|
|
1294
1319
|
whiteList: () => Promise<Whitelist>;
|
|
1320
|
+
canSignUp: ({ sender }: {
|
|
1321
|
+
sender: Addr;
|
|
1322
|
+
}) => Promise<Boolean>;
|
|
1295
1323
|
isWhiteList: ({ sender }: {
|
|
1296
1324
|
sender: Addr;
|
|
1297
1325
|
}) => Promise<Boolean>;
|
|
1326
|
+
isRegister: ({ sender }: {
|
|
1327
|
+
sender: Addr;
|
|
1328
|
+
}) => Promise<Boolean>;
|
|
1298
1329
|
signuped: ({ pubkeyX }: {
|
|
1299
1330
|
pubkeyX: Uint256;
|
|
1300
1331
|
}) => Promise<Uint256>;
|
|
@@ -1304,6 +1335,7 @@ declare class AMaciQueryClient implements AMaciReadOnlyInterface {
|
|
|
1304
1335
|
queryCircuitType: () => Promise<Uint256>;
|
|
1305
1336
|
queryCertSystem: () => Promise<Uint256>;
|
|
1306
1337
|
queryPreDeactivateRoot: () => Promise<Uint256>;
|
|
1338
|
+
getDelayRecords: () => Promise<DelayRecords>;
|
|
1307
1339
|
}
|
|
1308
1340
|
interface AMaciInterface extends AMaciReadOnlyInterface {
|
|
1309
1341
|
contractAddress: string;
|
|
@@ -1312,7 +1344,7 @@ interface AMaciInterface extends AMaciReadOnlyInterface {
|
|
|
1312
1344
|
roundInfo: RoundInfo;
|
|
1313
1345
|
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1314
1346
|
setWhitelists: ({ whitelists, }: {
|
|
1315
|
-
whitelists:
|
|
1347
|
+
whitelists: WhitelistBase;
|
|
1316
1348
|
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1317
1349
|
setVoteOptionsMap: ({ voteOptionMap, }: {
|
|
1318
1350
|
voteOptionMap: string[];
|
|
@@ -1360,14 +1392,7 @@ interface AMaciInterface extends AMaciReadOnlyInterface {
|
|
|
1360
1392
|
results: Uint256[];
|
|
1361
1393
|
salt: Uint256;
|
|
1362
1394
|
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1363
|
-
|
|
1364
|
-
maxAmount: Uint128;
|
|
1365
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1366
|
-
revoke: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1367
|
-
bond: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1368
|
-
withdraw: ({ amount, }: {
|
|
1369
|
-
amount?: Uint128;
|
|
1370
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1395
|
+
claim: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1371
1396
|
}
|
|
1372
1397
|
declare class AMaciClient extends AMaciQueryClient implements AMaciInterface {
|
|
1373
1398
|
client: SigningCosmWasmClient;
|
|
@@ -1378,7 +1403,7 @@ declare class AMaciClient extends AMaciQueryClient implements AMaciInterface {
|
|
|
1378
1403
|
roundInfo: RoundInfo;
|
|
1379
1404
|
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1380
1405
|
setWhitelists: ({ whitelists, }: {
|
|
1381
|
-
whitelists:
|
|
1406
|
+
whitelists: WhitelistBase;
|
|
1382
1407
|
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1383
1408
|
setVoteOptionsMap: ({ voteOptionMap, }: {
|
|
1384
1409
|
voteOptionMap: string[];
|
|
@@ -1426,14 +1451,7 @@ declare class AMaciClient extends AMaciQueryClient implements AMaciInterface {
|
|
|
1426
1451
|
results: Uint256[];
|
|
1427
1452
|
salt: Uint256;
|
|
1428
1453
|
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1429
|
-
|
|
1430
|
-
maxAmount: Uint128;
|
|
1431
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1432
|
-
revoke: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1433
|
-
bond: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1434
|
-
withdraw: ({ amount, }: {
|
|
1435
|
-
amount?: Uint128;
|
|
1436
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1454
|
+
claim: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1437
1455
|
}
|
|
1438
1456
|
|
|
1439
1457
|
/**
|
|
@@ -1819,6 +1837,10 @@ declare class MACI {
|
|
|
1819
1837
|
};
|
|
1820
1838
|
gasStation?: boolean;
|
|
1821
1839
|
}): Promise<_cosmjs_cosmwasm_stargate.ExecuteResult>;
|
|
1840
|
+
claimAMaciRound({ signer, contractAddress, }: {
|
|
1841
|
+
signer: OfflineSigner;
|
|
1842
|
+
contractAddress: string;
|
|
1843
|
+
}): Promise<_cosmjs_cosmwasm_stargate.ExecuteResult>;
|
|
1822
1844
|
}
|
|
1823
1845
|
|
|
1824
1846
|
declare const circuits: Record<string, CircuitType>;
|
package/dist/browser.d.ts
CHANGED
|
@@ -1199,13 +1199,12 @@ interface VotingTime {
|
|
|
1199
1199
|
end_time: Timestamp;
|
|
1200
1200
|
start_time: Timestamp;
|
|
1201
1201
|
}
|
|
1202
|
-
interface
|
|
1203
|
-
users:
|
|
1202
|
+
interface WhitelistBase {
|
|
1203
|
+
users: WhitelistBaseConfig[];
|
|
1204
1204
|
}
|
|
1205
|
-
interface
|
|
1205
|
+
interface WhitelistBaseConfig {
|
|
1206
1206
|
addr: Addr;
|
|
1207
1207
|
}
|
|
1208
|
-
type Uint128 = string;
|
|
1209
1208
|
interface MessageData {
|
|
1210
1209
|
data: [Uint256, Uint256, Uint256, Uint256, Uint256, Uint256, Uint256];
|
|
1211
1210
|
}
|
|
@@ -1214,12 +1213,31 @@ interface Groth16ProofType {
|
|
|
1214
1213
|
b: string;
|
|
1215
1214
|
c: string;
|
|
1216
1215
|
}
|
|
1216
|
+
type Boolean = boolean;
|
|
1217
|
+
type DelayType = 'deactivate_delay' | 'tally_delay';
|
|
1218
|
+
interface DelayRecords {
|
|
1219
|
+
records: DelayRecord[];
|
|
1220
|
+
}
|
|
1221
|
+
interface DelayRecord {
|
|
1222
|
+
delay_duration: number;
|
|
1223
|
+
delay_process_dmsg_count: Uint256;
|
|
1224
|
+
delay_reason: string;
|
|
1225
|
+
delay_timestamp: Timestamp;
|
|
1226
|
+
delay_type: DelayType;
|
|
1227
|
+
}
|
|
1217
1228
|
type PeriodStatus = 'pending' | 'voting' | 'processing' | 'tallying' | 'ended';
|
|
1218
1229
|
interface Period {
|
|
1219
1230
|
status: PeriodStatus;
|
|
1220
1231
|
}
|
|
1221
|
-
type
|
|
1232
|
+
type Uint128 = string;
|
|
1222
1233
|
type ArrayOfString = string[];
|
|
1234
|
+
interface Whitelist {
|
|
1235
|
+
users: WhitelistConfig[];
|
|
1236
|
+
}
|
|
1237
|
+
interface WhitelistConfig {
|
|
1238
|
+
addr: Addr;
|
|
1239
|
+
is_register: boolean;
|
|
1240
|
+
}
|
|
1223
1241
|
|
|
1224
1242
|
/**
|
|
1225
1243
|
* This file was automatically generated by @cosmwasm/ts-codegen@1.11.1.
|
|
@@ -1252,9 +1270,15 @@ interface AMaciReadOnlyInterface {
|
|
|
1252
1270
|
}) => Promise<Uint256>;
|
|
1253
1271
|
getVoiceCreditAmount: () => Promise<Uint256>;
|
|
1254
1272
|
whiteList: () => Promise<Whitelist>;
|
|
1273
|
+
canSignUp: ({ sender }: {
|
|
1274
|
+
sender: Addr;
|
|
1275
|
+
}) => Promise<Boolean>;
|
|
1255
1276
|
isWhiteList: ({ sender }: {
|
|
1256
1277
|
sender: Addr;
|
|
1257
1278
|
}) => Promise<Boolean>;
|
|
1279
|
+
isRegister: ({ sender }: {
|
|
1280
|
+
sender: Addr;
|
|
1281
|
+
}) => Promise<Boolean>;
|
|
1258
1282
|
signuped: ({ pubkeyX }: {
|
|
1259
1283
|
pubkeyX: Uint256;
|
|
1260
1284
|
}) => Promise<Uint256>;
|
|
@@ -1264,6 +1288,7 @@ interface AMaciReadOnlyInterface {
|
|
|
1264
1288
|
queryCircuitType: () => Promise<Uint256>;
|
|
1265
1289
|
queryCertSystem: () => Promise<Uint256>;
|
|
1266
1290
|
queryPreDeactivateRoot: () => Promise<Uint256>;
|
|
1291
|
+
getDelayRecords: () => Promise<DelayRecords>;
|
|
1267
1292
|
}
|
|
1268
1293
|
declare class AMaciQueryClient implements AMaciReadOnlyInterface {
|
|
1269
1294
|
client: CosmWasmClient;
|
|
@@ -1292,9 +1317,15 @@ declare class AMaciQueryClient implements AMaciReadOnlyInterface {
|
|
|
1292
1317
|
}) => Promise<Uint256>;
|
|
1293
1318
|
getVoiceCreditAmount: () => Promise<Uint256>;
|
|
1294
1319
|
whiteList: () => Promise<Whitelist>;
|
|
1320
|
+
canSignUp: ({ sender }: {
|
|
1321
|
+
sender: Addr;
|
|
1322
|
+
}) => Promise<Boolean>;
|
|
1295
1323
|
isWhiteList: ({ sender }: {
|
|
1296
1324
|
sender: Addr;
|
|
1297
1325
|
}) => Promise<Boolean>;
|
|
1326
|
+
isRegister: ({ sender }: {
|
|
1327
|
+
sender: Addr;
|
|
1328
|
+
}) => Promise<Boolean>;
|
|
1298
1329
|
signuped: ({ pubkeyX }: {
|
|
1299
1330
|
pubkeyX: Uint256;
|
|
1300
1331
|
}) => Promise<Uint256>;
|
|
@@ -1304,6 +1335,7 @@ declare class AMaciQueryClient implements AMaciReadOnlyInterface {
|
|
|
1304
1335
|
queryCircuitType: () => Promise<Uint256>;
|
|
1305
1336
|
queryCertSystem: () => Promise<Uint256>;
|
|
1306
1337
|
queryPreDeactivateRoot: () => Promise<Uint256>;
|
|
1338
|
+
getDelayRecords: () => Promise<DelayRecords>;
|
|
1307
1339
|
}
|
|
1308
1340
|
interface AMaciInterface extends AMaciReadOnlyInterface {
|
|
1309
1341
|
contractAddress: string;
|
|
@@ -1312,7 +1344,7 @@ interface AMaciInterface extends AMaciReadOnlyInterface {
|
|
|
1312
1344
|
roundInfo: RoundInfo;
|
|
1313
1345
|
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1314
1346
|
setWhitelists: ({ whitelists, }: {
|
|
1315
|
-
whitelists:
|
|
1347
|
+
whitelists: WhitelistBase;
|
|
1316
1348
|
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1317
1349
|
setVoteOptionsMap: ({ voteOptionMap, }: {
|
|
1318
1350
|
voteOptionMap: string[];
|
|
@@ -1360,14 +1392,7 @@ interface AMaciInterface extends AMaciReadOnlyInterface {
|
|
|
1360
1392
|
results: Uint256[];
|
|
1361
1393
|
salt: Uint256;
|
|
1362
1394
|
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1363
|
-
|
|
1364
|
-
maxAmount: Uint128;
|
|
1365
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1366
|
-
revoke: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1367
|
-
bond: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1368
|
-
withdraw: ({ amount, }: {
|
|
1369
|
-
amount?: Uint128;
|
|
1370
|
-
}, fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1395
|
+
claim: (fee?: number | StdFee | 'auto', memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1371
1396
|
}
|
|
1372
1397
|
declare class AMaciClient extends AMaciQueryClient implements AMaciInterface {
|
|
1373
1398
|
client: SigningCosmWasmClient;
|
|
@@ -1378,7 +1403,7 @@ declare class AMaciClient extends AMaciQueryClient implements AMaciInterface {
|
|
|
1378
1403
|
roundInfo: RoundInfo;
|
|
1379
1404
|
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1380
1405
|
setWhitelists: ({ whitelists, }: {
|
|
1381
|
-
whitelists:
|
|
1406
|
+
whitelists: WhitelistBase;
|
|
1382
1407
|
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1383
1408
|
setVoteOptionsMap: ({ voteOptionMap, }: {
|
|
1384
1409
|
voteOptionMap: string[];
|
|
@@ -1426,14 +1451,7 @@ declare class AMaciClient extends AMaciQueryClient implements AMaciInterface {
|
|
|
1426
1451
|
results: Uint256[];
|
|
1427
1452
|
salt: Uint256;
|
|
1428
1453
|
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1429
|
-
|
|
1430
|
-
maxAmount: Uint128;
|
|
1431
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1432
|
-
revoke: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1433
|
-
bond: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1434
|
-
withdraw: ({ amount, }: {
|
|
1435
|
-
amount?: Uint128;
|
|
1436
|
-
}, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1454
|
+
claim: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
|
1437
1455
|
}
|
|
1438
1456
|
|
|
1439
1457
|
/**
|
|
@@ -1819,6 +1837,10 @@ declare class MACI {
|
|
|
1819
1837
|
};
|
|
1820
1838
|
gasStation?: boolean;
|
|
1821
1839
|
}): Promise<_cosmjs_cosmwasm_stargate.ExecuteResult>;
|
|
1840
|
+
claimAMaciRound({ signer, contractAddress, }: {
|
|
1841
|
+
signer: OfflineSigner;
|
|
1842
|
+
contractAddress: string;
|
|
1843
|
+
}): Promise<_cosmjs_cosmwasm_stargate.ExecuteResult>;
|
|
1822
1844
|
}
|
|
1823
1845
|
|
|
1824
1846
|
declare const circuits: Record<string, CircuitType>;
|
package/dist/browser.js
CHANGED
|
@@ -28306,6 +28306,13 @@ var AMaciQueryClient = class {
|
|
|
28306
28306
|
white_list: {}
|
|
28307
28307
|
});
|
|
28308
28308
|
};
|
|
28309
|
+
this.canSignUp = async ({ sender }) => {
|
|
28310
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
|
28311
|
+
can_sign_up: {
|
|
28312
|
+
sender
|
|
28313
|
+
}
|
|
28314
|
+
});
|
|
28315
|
+
};
|
|
28309
28316
|
this.isWhiteList = async ({ sender }) => {
|
|
28310
28317
|
return this.client.queryContractSmart(this.contractAddress, {
|
|
28311
28318
|
is_white_list: {
|
|
@@ -28313,6 +28320,13 @@ var AMaciQueryClient = class {
|
|
|
28313
28320
|
}
|
|
28314
28321
|
});
|
|
28315
28322
|
};
|
|
28323
|
+
this.isRegister = async ({ sender }) => {
|
|
28324
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
|
28325
|
+
is_register: {
|
|
28326
|
+
sender
|
|
28327
|
+
}
|
|
28328
|
+
});
|
|
28329
|
+
};
|
|
28316
28330
|
this.signuped = async ({ pubkeyX }) => {
|
|
28317
28331
|
return this.client.queryContractSmart(this.contractAddress, {
|
|
28318
28332
|
signuped: {
|
|
@@ -28350,6 +28364,11 @@ var AMaciQueryClient = class {
|
|
|
28350
28364
|
query_pre_deactivate_root: {}
|
|
28351
28365
|
});
|
|
28352
28366
|
};
|
|
28367
|
+
this.getDelayRecords = async () => {
|
|
28368
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
|
28369
|
+
get_delay_records: {}
|
|
28370
|
+
});
|
|
28371
|
+
};
|
|
28353
28372
|
this.client = client;
|
|
28354
28373
|
this.contractAddress = contractAddress;
|
|
28355
28374
|
this.admin = this.admin.bind(this);
|
|
@@ -28369,7 +28388,9 @@ var AMaciQueryClient = class {
|
|
|
28369
28388
|
this.getVoiceCreditBalance = this.getVoiceCreditBalance.bind(this);
|
|
28370
28389
|
this.getVoiceCreditAmount = this.getVoiceCreditAmount.bind(this);
|
|
28371
28390
|
this.whiteList = this.whiteList.bind(this);
|
|
28391
|
+
this.canSignUp = this.canSignUp.bind(this);
|
|
28372
28392
|
this.isWhiteList = this.isWhiteList.bind(this);
|
|
28393
|
+
this.isRegister = this.isRegister.bind(this);
|
|
28373
28394
|
this.signuped = this.signuped.bind(this);
|
|
28374
28395
|
this.voteOptionMap = this.voteOptionMap.bind(this);
|
|
28375
28396
|
this.maxVoteOptions = this.maxVoteOptions.bind(this);
|
|
@@ -28377,6 +28398,7 @@ var AMaciQueryClient = class {
|
|
|
28377
28398
|
this.queryCircuitType = this.queryCircuitType.bind(this);
|
|
28378
28399
|
this.queryCertSystem = this.queryCertSystem.bind(this);
|
|
28379
28400
|
this.queryPreDeactivateRoot = this.queryPreDeactivateRoot.bind(this);
|
|
28401
|
+
this.getDelayRecords = this.getDelayRecords.bind(this);
|
|
28380
28402
|
}
|
|
28381
28403
|
};
|
|
28382
28404
|
var AMaciClient = class extends AMaciQueryClient {
|
|
@@ -28626,56 +28648,12 @@ var AMaciClient = class extends AMaciQueryClient {
|
|
|
28626
28648
|
_funds
|
|
28627
28649
|
);
|
|
28628
28650
|
};
|
|
28629
|
-
this.
|
|
28630
|
-
maxAmount
|
|
28631
|
-
}, fee = "auto", memo, _funds) => {
|
|
28632
|
-
return await this.client.execute(
|
|
28633
|
-
this.sender,
|
|
28634
|
-
this.contractAddress,
|
|
28635
|
-
{
|
|
28636
|
-
grant: {
|
|
28637
|
-
max_amount: maxAmount
|
|
28638
|
-
}
|
|
28639
|
-
},
|
|
28640
|
-
fee,
|
|
28641
|
-
memo,
|
|
28642
|
-
_funds
|
|
28643
|
-
);
|
|
28644
|
-
};
|
|
28645
|
-
this.revoke = async (fee = "auto", memo, _funds) => {
|
|
28651
|
+
this.claim = async (fee = "auto", memo, _funds) => {
|
|
28646
28652
|
return await this.client.execute(
|
|
28647
28653
|
this.sender,
|
|
28648
28654
|
this.contractAddress,
|
|
28649
28655
|
{
|
|
28650
|
-
|
|
28651
|
-
},
|
|
28652
|
-
fee,
|
|
28653
|
-
memo,
|
|
28654
|
-
_funds
|
|
28655
|
-
);
|
|
28656
|
-
};
|
|
28657
|
-
this.bond = async (fee = "auto", memo, _funds) => {
|
|
28658
|
-
return await this.client.execute(
|
|
28659
|
-
this.sender,
|
|
28660
|
-
this.contractAddress,
|
|
28661
|
-
{
|
|
28662
|
-
bond: {}
|
|
28663
|
-
},
|
|
28664
|
-
fee,
|
|
28665
|
-
memo,
|
|
28666
|
-
_funds
|
|
28667
|
-
);
|
|
28668
|
-
};
|
|
28669
|
-
this.withdraw = async ({
|
|
28670
|
-
amount
|
|
28671
|
-
}, fee = "auto", memo, _funds) => {
|
|
28672
|
-
return await this.client.execute(
|
|
28673
|
-
this.sender,
|
|
28674
|
-
this.contractAddress,
|
|
28675
|
-
{
|
|
28676
|
-
withdraw: {
|
|
28677
|
-
amount
|
|
28678
|
-
}
|
|
28656
|
+
claim: {}
|
|
28679
28657
|
},
|
|
28680
28658
|
fee,
|
|
28681
28659
|
memo,
|
|
@@ -28699,10 +28677,7 @@ var AMaciClient = class extends AMaciQueryClient {
|
|
|
28699
28677
|
this.stopProcessingPeriod = this.stopProcessingPeriod.bind(this);
|
|
28700
28678
|
this.processTally = this.processTally.bind(this);
|
|
28701
28679
|
this.stopTallyingPeriod = this.stopTallyingPeriod.bind(this);
|
|
28702
|
-
this.
|
|
28703
|
-
this.revoke = this.revoke.bind(this);
|
|
28704
|
-
this.bond = this.bond.bind(this);
|
|
28705
|
-
this.withdraw = this.withdraw.bind(this);
|
|
28680
|
+
this.claim = this.claim.bind(this);
|
|
28706
28681
|
}
|
|
28707
28682
|
};
|
|
28708
28683
|
|
|
@@ -31015,6 +30990,16 @@ var MACI = class {
|
|
|
31015
30990
|
fee
|
|
31016
30991
|
);
|
|
31017
30992
|
}
|
|
30993
|
+
async claimAMaciRound({
|
|
30994
|
+
signer,
|
|
30995
|
+
contractAddress
|
|
30996
|
+
}) {
|
|
30997
|
+
const client = await this.contract.amaciClient({
|
|
30998
|
+
signer,
|
|
30999
|
+
contractAddress
|
|
31000
|
+
});
|
|
31001
|
+
return client.claim();
|
|
31002
|
+
}
|
|
31018
31003
|
};
|
|
31019
31004
|
|
|
31020
31005
|
// src/maci.ts
|