@dorafactory/maci-sdk 0.0.25 → 0.0.26

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.
@@ -1650,6 +1650,21 @@ type FeegrantAllowanceResponse = {
1650
1650
  amount: string;
1651
1651
  }[];
1652
1652
  };
1653
+ interface SnapshotHeightInfo {
1654
+ lowestHeight: string;
1655
+ latestHeight: string;
1656
+ }
1657
+ interface Ecosystem {
1658
+ name: string;
1659
+ displayName: string;
1660
+ decimals: number;
1661
+ apiPath: string;
1662
+ snapshotHeightInfo: SnapshotHeightInfo;
1663
+ baseSlope: number;
1664
+ }
1665
+ interface EcosystemsResponse {
1666
+ ecosystems: Ecosystem[];
1667
+ }
1653
1668
 
1654
1669
  declare class OracleCertificate {
1655
1670
  private certificateApiEndpoint;
@@ -1657,6 +1672,7 @@ declare class OracleCertificate {
1657
1672
  constructor({ certificateApiEndpoint, http }: OracleCertificateParams);
1658
1673
  sign(data: SignatureRequest): Promise<SignatureResponse>;
1659
1674
  feegrantAllowance(granter: string, grantee: string): Promise<FeegrantAllowanceResponse>;
1675
+ listEcosystems(): Promise<EcosystemsResponse>;
1660
1676
  }
1661
1677
 
1662
1678
  type MixedData<T> = T | Array<MixedData<T>> | {
@@ -1851,6 +1867,7 @@ declare class MACI {
1851
1867
  signer: OfflineSigner;
1852
1868
  contractAddress: string;
1853
1869
  }): Promise<_cosmjs_cosmwasm_stargate.ExecuteResult>;
1870
+ getOracleCertificateConfig(): Promise<EcosystemsResponse>;
1854
1871
  }
1855
1872
 
1856
1873
  declare const circuits: Record<string, CircuitType>;
package/dist/browser.d.ts CHANGED
@@ -1650,6 +1650,21 @@ type FeegrantAllowanceResponse = {
1650
1650
  amount: string;
1651
1651
  }[];
1652
1652
  };
1653
+ interface SnapshotHeightInfo {
1654
+ lowestHeight: string;
1655
+ latestHeight: string;
1656
+ }
1657
+ interface Ecosystem {
1658
+ name: string;
1659
+ displayName: string;
1660
+ decimals: number;
1661
+ apiPath: string;
1662
+ snapshotHeightInfo: SnapshotHeightInfo;
1663
+ baseSlope: number;
1664
+ }
1665
+ interface EcosystemsResponse {
1666
+ ecosystems: Ecosystem[];
1667
+ }
1653
1668
 
1654
1669
  declare class OracleCertificate {
1655
1670
  private certificateApiEndpoint;
@@ -1657,6 +1672,7 @@ declare class OracleCertificate {
1657
1672
  constructor({ certificateApiEndpoint, http }: OracleCertificateParams);
1658
1673
  sign(data: SignatureRequest): Promise<SignatureResponse>;
1659
1674
  feegrantAllowance(granter: string, grantee: string): Promise<FeegrantAllowanceResponse>;
1675
+ listEcosystems(): Promise<EcosystemsResponse>;
1660
1676
  }
1661
1677
 
1662
1678
  type MixedData<T> = T | Array<MixedData<T>> | {
@@ -1851,6 +1867,7 @@ declare class MACI {
1851
1867
  signer: OfflineSigner;
1852
1868
  contractAddress: string;
1853
1869
  }): Promise<_cosmjs_cosmwasm_stargate.ExecuteResult>;
1870
+ getOracleCertificateConfig(): Promise<EcosystemsResponse>;
1854
1871
  }
1855
1872
 
1856
1873
  declare const circuits: Record<string, CircuitType>;
package/dist/browser.js CHANGED
@@ -30206,6 +30206,19 @@ var OracleCertificate = class {
30206
30206
  spend_limit: response.allowance.allowance.allowance.spend_limit
30207
30207
  };
30208
30208
  }
30209
+ async listEcosystems() {
30210
+ const response = await this.http.fetch(
30211
+ `${this.certificateApiEndpoint}/list`,
30212
+ {
30213
+ method: "GET",
30214
+ headers: {
30215
+ "Content-Type": "application/json"
30216
+ }
30217
+ }
30218
+ );
30219
+ const signatureData = await response.json();
30220
+ return signatureData;
30221
+ }
30209
30222
  };
30210
30223
 
30211
30224
  // src/libs/circom/index.ts
@@ -31003,6 +31016,10 @@ var MACI = class {
31003
31016
  });
31004
31017
  return client.claim();
31005
31018
  }
31019
+ async getOracleCertificateConfig() {
31020
+ const ecosystems = await this.oracleCertificate.listEcosystems();
31021
+ return ecosystems;
31022
+ }
31006
31023
  };
31007
31024
 
31008
31025
  // src/maci.ts