@show-karma/karma-gap-sdk 0.3.7 → 0.3.9
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/core/class/AllGapSchemas.d.ts +9 -0
- package/core/class/AllGapSchemas.js +19 -0
- package/core/class/Schema.d.ts +4 -4
- package/core/class/Schema.js +32 -33
- package/core/class/contract/GapContract.d.ts +2 -2
- package/core/class/contract/GapContract.js +25 -22
- package/core/class/entities/Grant.js +11 -5
- package/core/class/entities/Milestone.js +11 -5
- package/core/class/entities/Project.js +11 -5
- package/core/class/types/attestations.d.ts +2 -0
- package/core/consts.d.ts +1 -1
- package/core/consts.js +102 -103
- package/core/types.d.ts +1 -1
- package/core/utils/get-web3-provider.d.ts +2 -4
- package/core/utils/get-web3-provider.js +1 -1
- package/package.json +3 -3
- package/core/class/AttestationIPFS.d.ts +0 -7
- package/core/class/AttestationIPFS.js +0 -10
- package/core/class/GraphQL/Fetcher.d.ts +0 -132
- package/core/class/GraphQL/Fetcher.js +0 -7
- package/core/class/GraphQL/GAPFetcher.d.ts +0 -160
- package/core/class/GraphQL/GAPFetcher.js +0 -516
- package/core/class/IPFS/IPFS.d.ts +0 -13
- package/core/class/IPFS/IPFS.js +0 -24
- package/core/class/contract/MultiAttest.d.ts +0 -10
- package/core/class/contract/MultiAttest.js +0 -19
- package/readme.md +0 -841
package/core/class/IPFS/IPFS.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IPFS = void 0;
|
|
4
|
-
const nft_storage_1 = require("nft.storage");
|
|
5
|
-
const SchemaError_1 = require("../SchemaError");
|
|
6
|
-
class IPFS {
|
|
7
|
-
constructor(ipfsKey) {
|
|
8
|
-
this.client = new nft_storage_1.NFTStorage({ token: ipfsKey });
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Insert the data in the IPFS and return the cid.
|
|
12
|
-
*/
|
|
13
|
-
async save(data) {
|
|
14
|
-
try {
|
|
15
|
-
const blob = new nft_storage_1.Blob([JSON.stringify(data)], { type: 'application/json' });
|
|
16
|
-
const cid = await this.client.storeBlob(blob);
|
|
17
|
-
return cid;
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
throw new SchemaError_1.AttestationError('IPFS_UPLOAD', `Error adding data to IPFS`);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.IPFS = IPFS;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SignerOrProvider } from "@ethereum-attestation-service/eas-sdk/dist/transaction";
|
|
2
|
-
import { Hex, MultiAttestData } from "core/types";
|
|
3
|
-
export declare class MultiAttest {
|
|
4
|
-
/**
|
|
5
|
-
* Performs a referenced multi attestation.
|
|
6
|
-
*
|
|
7
|
-
* @returns an array with the attestation UIDs.
|
|
8
|
-
*/
|
|
9
|
-
static send(signer: SignerOrProvider, payload: MultiAttestData[]): Promise<Hex[]>;
|
|
10
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MultiAttest = void 0;
|
|
4
|
-
const GAP_1 = require("../GAP");
|
|
5
|
-
class MultiAttest {
|
|
6
|
-
/**
|
|
7
|
-
* Performs a referenced multi attestation.
|
|
8
|
-
*
|
|
9
|
-
* @returns an array with the attestation UIDs.
|
|
10
|
-
*/
|
|
11
|
-
static async send(signer, payload) {
|
|
12
|
-
const contract = GAP_1.GAP.getMulticall(signer);
|
|
13
|
-
const tx = await contract.functions.multiSequentialAttest(payload);
|
|
14
|
-
const result = await tx.wait?.();
|
|
15
|
-
const attestations = result.logs?.map((m) => m.data);
|
|
16
|
-
return attestations;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.MultiAttest = MultiAttest;
|