@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.
- package/dist/browser.d.mts +17 -0
- package/dist/browser.d.ts +17 -0
- package/dist/browser.js +17 -0
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +17 -0
- package/dist/browser.mjs.map +1 -1
- package/dist/index.d.mts +17 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/libs/maci/maci.ts +5 -0
- package/src/libs/oracle-certificate/oracle-certificate.ts +16 -0
- package/src/libs/oracle-certificate/types.ts +18 -0
package/package.json
CHANGED
package/src/libs/maci/maci.ts
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
SignatureRequest,
|
|
5
5
|
SignatureResponse,
|
|
6
6
|
FeegrantAllowanceResponse,
|
|
7
|
+
EcosystemsResponse,
|
|
7
8
|
} from './types';
|
|
8
9
|
|
|
9
10
|
export class OracleCertificate {
|
|
@@ -49,4 +50,19 @@ export class OracleCertificate {
|
|
|
49
50
|
spend_limit: response.allowance.allowance.allowance.spend_limit,
|
|
50
51
|
};
|
|
51
52
|
}
|
|
53
|
+
|
|
54
|
+
async listEcosystems(): Promise<EcosystemsResponse> {
|
|
55
|
+
const response = await this.http.fetch(
|
|
56
|
+
`${this.certificateApiEndpoint}/list`,
|
|
57
|
+
{
|
|
58
|
+
method: 'GET',
|
|
59
|
+
headers: {
|
|
60
|
+
'Content-Type': 'application/json',
|
|
61
|
+
},
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
const signatureData = await response.json();
|
|
65
|
+
|
|
66
|
+
return signatureData;
|
|
67
|
+
}
|
|
52
68
|
}
|
|
@@ -27,3 +27,21 @@ export type FeegrantAllowanceResponse = {
|
|
|
27
27
|
amount: string;
|
|
28
28
|
}[];
|
|
29
29
|
};
|
|
30
|
+
|
|
31
|
+
export interface SnapshotHeightInfo {
|
|
32
|
+
lowestHeight: string;
|
|
33
|
+
latestHeight: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface Ecosystem {
|
|
37
|
+
name: string;
|
|
38
|
+
displayName: string;
|
|
39
|
+
decimals: number;
|
|
40
|
+
apiPath: string;
|
|
41
|
+
snapshotHeightInfo: SnapshotHeightInfo;
|
|
42
|
+
baseSlope: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface EcosystemsResponse {
|
|
46
|
+
ecosystems: Ecosystem[];
|
|
47
|
+
}
|