@@ -122,22 +122,23 @@ export class EVaultClient {
122122 }
123123
124124 async storeMetaEnvelope ( envelope : MetaEnvelope ) : Promise < string > {
125- const client = await this . ensureClient ( envelope . w3id ) . catch ( ( ) => {
126- return null ;
127- } ) ;
128- if ( ! client ) return v4 ( ) ;
129-
130- const response = await client
131- . request < StoreMetaEnvelopeResponse > ( STORE_META_ENVELOPE , {
132- input : {
133- ontology : envelope . schemaId ,
134- payload : envelope . data ,
135- acl : [ "*" ] ,
136- } ,
137- } )
138- . catch ( ( ) => null ) ;
139- if ( ! response ) return v4 ( ) ;
140- return response . storeMetaEnvelope . metaEnvelope . id ;
125+ // const client = await this.ensureClient(envelope.w3id).catch(() => {
126+ // return null;
127+ // });
128+ // if (!client) return v4();
129+ //
130+ // const response = await client
131+ // .request<StoreMetaEnvelopeResponse>(STORE_META_ENVELOPE, {
132+ // input: {
133+ // ontology: envelope.schemaId,
134+ // payload: envelope.data,
135+ // acl: ["*"],
136+ // },
137+ // })
138+ // .catch(() => null);
139+ // if (!response) return v4();
140+ // return response.storeMetaEnvelope.metaEnvelope.id;
141+ return v4 ( ) ;
141142 }
142143
143144 async storeReference ( referenceId : string , w3id : string ) : Promise < void > {
@@ -178,28 +179,29 @@ export class EVaultClient {
178179 async updateMetaEnvelopeById (
179180 id : string ,
180181 envelope : MetaEnvelope ,
181- ) : Promise < StoreMetaEnvelopeResponse [ "storeMetaEnvelope" ] > {
182- const client = await this . ensureClient ( envelope . w3id ) . catch ( ( ) => null ) ;
183- if ( ! client ) throw new Error ( ) ;
184-
185- try {
186- const variables = {
187- id,
188- input : {
189- ontology : envelope . schemaId ,
190- payload : envelope . data ,
191- acl : [ "*" ] ,
192- } ,
193- } ;
194-
195- const response = await client . request < StoreMetaEnvelopeResponse > (
196- UPDATE_META_ENVELOPE ,
197- variables ,
198- ) ;
199- return response . updateMetaEnvelopeById ;
200- } catch ( error ) {
201- console . error ( "Error updating meta envelope:" , error ) ;
202- throw error ;
203- }
182+ ) : Promise < void > {
183+ // const client = await this.ensureClient(envelope.w3id).catch(() => null);
184+ // if (!client) throw new Error();
185+ //
186+ // try {
187+ // const variables = {
188+ // id,
189+ // input: {
190+ // ontology: envelope.schemaId,
191+ // payload: envelope.data,
192+ // acl: ["*"],
193+ // },
194+ // };
195+ //
196+ // const response = await client.request<StoreMetaEnvelopeResponse>(
197+ // UPDATE_META_ENVELOPE,
198+ // variables,
199+ // );
200+ // return response.updateMetaEnvelopeById;
201+ // } catch (error) {
202+ // console.error("Error updating meta envelope:", error);
203+ // throw error;
204+ // }
205+ return ;
204206 }
205207}
0 commit comments