@seedprotocol/sdk 0.1.102 → 0.1.104

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.
@@ -1,4 +1,4 @@
1
- export { g as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, f as GET_PROPERTIES, G as GET_SCHEMAS, a as GET_SCHEMA_BY_NAME, b as GET_SEEDS, c as GET_SEED_IDS, d as GET_STORAGE_TRANSACTION_ID, e as GET_VERSIONS, I as Item, h as itemMachineAll, i as itemMachineSingle } from './index-C63Ut7kK.js';
1
+ export { g as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, f as GET_PROPERTIES, G as GET_SCHEMAS, a as GET_SCHEMA_BY_NAME, b as GET_SEEDS, c as GET_SEED_IDS, d as GET_STORAGE_TRANSACTION_ID, e as GET_VERSIONS, I as Item, h as itemMachineAll, i as itemMachineSingle } from './index-opZLss_R.js';
2
2
  import './constants-rmQ8zg8_.js';
3
3
  import '@ethereum-attestation-service/eas-sdk';
4
4
  import 'thirdweb';
@@ -29,4 +29,4 @@ import 'rxjs';
29
29
  import 'drizzle-orm/sqlite-proxy';
30
30
  import '@zenfs/dom';
31
31
  import 'arweave';
32
- //# sourceMappingURL=index-D4vrRdvL.js.map
32
+ //# sourceMappingURL=index-S6aUqdI6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-D4vrRdvL.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index-S6aUqdI6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -26,8 +26,7 @@ import { BehaviorSubject } from 'rxjs';
26
26
  import { drizzle } from 'drizzle-orm/sqlite-proxy';
27
27
  import { WebAccess } from '@zenfs/dom';
28
28
  import Arweave from 'arweave';
29
- import { ZERO_ADDRESS } from 'thirdweb';
30
- import { SchemaEncoder } from '@ethereum-attestation-service/eas-sdk';
29
+ import { SchemaEncoder, ZERO_ADDRESS } from '@ethereum-attestation-service/eas-sdk';
31
30
 
32
31
  const isNode = () => {
33
32
  return (typeof process !== 'undefined' &&
@@ -1068,7 +1067,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
1068
1067
  if (propertyRecordSchema &&
1069
1068
  propertyRecordSchema.storageType &&
1070
1069
  propertyRecordSchema.storageType === 'ItemStorage') {
1071
- const { Item } = yield import('./index-D4vrRdvL.js');
1070
+ const { Item } = yield import('./index-S6aUqdI6.js');
1072
1071
  const item = yield Item.find({
1073
1072
  seedLocalId,
1074
1073
  modelName: itemModelName,
@@ -2622,7 +2621,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
2622
2621
  if (!models$1) {
2623
2622
  return;
2624
2623
  }
2625
- const { models: SeedModels } = yield import('./seed.schema.config-BCA5sEAY.js');
2624
+ const { models: SeedModels } = yield import('./seed.schema.config-D5w2jMZV.js');
2626
2625
  const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
2627
2626
  let hasModelsInDb = false;
2628
2627
  const schemaDefsByModelName = new Map();
@@ -5846,6 +5845,7 @@ const getPublishPayload = (seedLocalId) => __awaiter(void 0, void 0, void 0, fun
5846
5845
  continue;
5847
5846
  }
5848
5847
  const easDataType = INTERNAL_DATA_TYPES[itemProperty.propertyDef.dataType].eas;
5848
+ let schemaUid = itemProperty.schemaUid;
5849
5849
  let propertyNameForSchema = propertyName;
5850
5850
  let propertyValue = itemProperty.getService().getSnapshot()
5851
5851
  .context.propertyValue;
@@ -5873,13 +5873,14 @@ const getPublishPayload = (seedLocalId) => __awaiter(void 0, void 0, void 0, fun
5873
5873
  continue;
5874
5874
  }
5875
5875
  const foundPropertySchema = yield getSchemaForItemProperty({
5876
- schemaUid: itemProperty.schemaUid,
5876
+ schemaUid,
5877
5877
  propertyName: propertyNameForSchema,
5878
5878
  easDataType,
5879
5879
  });
5880
5880
  if (!foundPropertySchema) {
5881
5881
  throw new Error(`No schema found for property ${itemProperty.propertyName} ${itemProperty.localId}`);
5882
5882
  }
5883
+ schemaUid = foundPropertySchema.id;
5883
5884
  const data = [
5884
5885
  {
5885
5886
  name: toSnakeCase(propertyNameForSchema),
@@ -5891,13 +5892,14 @@ const getPublishPayload = (seedLocalId) => __awaiter(void 0, void 0, void 0, fun
5891
5892
  const dataEncoder = new SchemaEncoder(easSchemaDefinition);
5892
5893
  const encodedData = dataEncoder.encodeData(data);
5893
5894
  listOfAttestations.push({
5894
- schema: itemProperty.schemaUid,
5895
+ schema: schemaUid,
5895
5896
  data: [
5896
5897
  Object.assign(Object.assign({}, defaultAttestationData), { data: encodedData }),
5897
5898
  ],
5898
5899
  });
5899
5900
  }
5900
- return [
5901
+ console.log('ZERO_ADDRESS: ', ZERO_ADDRESS);
5902
+ const payload = [
5901
5903
  {
5902
5904
  localId,
5903
5905
  seedIsRevocable,
@@ -5909,6 +5911,8 @@ const getPublishPayload = (seedLocalId) => __awaiter(void 0, void 0, void 0, fun
5909
5911
  propertiesToUpdate,
5910
5912
  },
5911
5913
  ];
5914
+ console.log('payload: ', payload);
5915
+ return payload;
5912
5916
  });
5913
5917
 
5914
5918
  var _a$1;
@@ -6697,7 +6701,7 @@ const client = {
6697
6701
  console.error('fs listeners not ready during init');
6698
6702
  }
6699
6703
  globalService.send({ type: 'init', endpoints, models, addresses });
6700
- import('./seed.schema.config-BCA5sEAY.js').then(({ models }) => {
6704
+ import('./seed.schema.config-D5w2jMZV.js').then(({ models }) => {
6701
6705
  for (const [key, value] of Object.entries(models)) {
6702
6706
  setModel(key, value);
6703
6707
  }
@@ -7650,4 +7654,4 @@ if (isNode()) {
7650
7654
  }
7651
7655
 
7652
7656
  export { GET_SCHEMAS as G, Item as I, Json as J, List as L, Model as M, Property as P, Relation as R, Text as T, GET_SCHEMA_BY_NAME as a, GET_SEEDS as b, GET_SEED_IDS as c, GET_STORAGE_TRANSACTION_ID as d, GET_VERSIONS as e, GET_PROPERTIES as f, GET_ALL_PROPERTIES_FOR_ALL_VERSIONS as g, itemMachineAll as h, itemMachineSingle as i, ImageSrc as j, ItemProperty as k, useItem as l, useItemProperties as m, useCreateItem as n, useItemProperty as o, useDeleteItem as p, useGlobalServiceStatus as q, useServices as r, getGlobalService as s, client as t, useItems as u, getCorrectId as v, withSeed as w };
7653
- //# sourceMappingURL=index-C63Ut7kK.js.map
7657
+ //# sourceMappingURL=index-opZLss_R.js.map