@geoprotocol/geo-sdk 0.1.1
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/README.md +528 -0
- package/dist/abis.d.ts +7 -0
- package/dist/abis.d.ts.map +1 -0
- package/dist/abis.js +7 -0
- package/dist/abis.js.map +1 -0
- package/dist/constants.d.ts +7 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +8 -0
- package/dist/constants.js.map +1 -0
- package/dist/contracts.d.ts +31 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +31 -0
- package/dist/contracts.js.map +1 -0
- package/dist/convert-ids.d.ts +2 -0
- package/dist/convert-ids.d.ts.map +1 -0
- package/dist/convert-ids.js +42 -0
- package/dist/convert-ids.js.map +1 -0
- package/dist/examples/ranks/create-ordinal-rank.d.ts +8 -0
- package/dist/examples/ranks/create-ordinal-rank.d.ts.map +1 -0
- package/dist/examples/ranks/create-ordinal-rank.js +42 -0
- package/dist/examples/ranks/create-ordinal-rank.js.map +1 -0
- package/dist/examples/ranks/create-weighted-rank.d.ts +8 -0
- package/dist/examples/ranks/create-weighted-rank.d.ts.map +1 -0
- package/dist/examples/ranks/create-weighted-rank.js +42 -0
- package/dist/examples/ranks/create-weighted-rank.js.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/proto.d.ts +5 -0
- package/dist/proto.d.ts.map +1 -0
- package/dist/proto.js +5 -0
- package/dist/proto.js.map +1 -0
- package/dist/protov2.d.ts +11 -0
- package/dist/protov2.d.ts.map +1 -0
- package/dist/protov2.js +11 -0
- package/dist/protov2.js.map +1 -0
- package/dist/scripts/setup-rank-types.d.ts +15 -0
- package/dist/scripts/setup-rank-types.d.ts.map +1 -0
- package/dist/scripts/setup-rank-types.js +62 -0
- package/dist/scripts/setup-rank-types.js.map +1 -0
- package/dist/src/abis/dao-space-factory.d.ts +276 -0
- package/dist/src/abis/dao-space-factory.d.ts.map +1 -0
- package/dist/src/abis/dao-space-factory.js +359 -0
- package/dist/src/abis/dao-space-factory.js.map +1 -0
- package/dist/src/abis/dao-space.d.ts +698 -0
- package/dist/src/abis/dao-space.d.ts.map +1 -0
- package/dist/src/abis/dao-space.js +906 -0
- package/dist/src/abis/dao-space.js.map +1 -0
- package/dist/src/abis/dao.d.ts +899 -0
- package/dist/src/abis/dao.d.ts.map +1 -0
- package/dist/src/abis/dao.js +1159 -0
- package/dist/src/abis/dao.js.map +1 -0
- package/dist/src/abis/governance-setup.d.ts +351 -0
- package/dist/src/abis/governance-setup.d.ts.map +1 -0
- package/dist/src/abis/governance-setup.js +461 -0
- package/dist/src/abis/governance-setup.js.map +1 -0
- package/dist/src/abis/index.d.ts +13 -0
- package/dist/src/abis/index.d.ts.map +1 -0
- package/dist/src/abis/index.js +13 -0
- package/dist/src/abis/index.js.map +1 -0
- package/dist/src/abis/main-voting.d.ts +1504 -0
- package/dist/src/abis/main-voting.d.ts.map +1 -0
- package/dist/src/abis/main-voting.js +1943 -0
- package/dist/src/abis/main-voting.js.map +1 -0
- package/dist/src/abis/member-access.d.ts +567 -0
- package/dist/src/abis/member-access.d.ts.map +1 -0
- package/dist/src/abis/member-access.js +735 -0
- package/dist/src/abis/member-access.js.map +1 -0
- package/dist/src/abis/personal-space-admin-setup.d.ts +259 -0
- package/dist/src/abis/personal-space-admin-setup.d.ts.map +1 -0
- package/dist/src/abis/personal-space-admin-setup.js +340 -0
- package/dist/src/abis/personal-space-admin-setup.js.map +1 -0
- package/dist/src/abis/personal-space-admin.d.ts +431 -0
- package/dist/src/abis/personal-space-admin.d.ts.map +1 -0
- package/dist/src/abis/personal-space-admin.js +555 -0
- package/dist/src/abis/personal-space-admin.js.map +1 -0
- package/dist/src/abis/plugin-setup-processor.d.ts +998 -0
- package/dist/src/abis/plugin-setup-processor.d.ts.map +1 -0
- package/dist/src/abis/plugin-setup-processor.js +1293 -0
- package/dist/src/abis/plugin-setup-processor.js.map +1 -0
- package/dist/src/abis/space-registry.d.ts +413 -0
- package/dist/src/abis/space-registry.d.ts.map +1 -0
- package/dist/src/abis/space-registry.js +537 -0
- package/dist/src/abis/space-registry.js.map +1 -0
- package/dist/src/abis/space-setup.d.ts +310 -0
- package/dist/src/abis/space-setup.d.ts.map +1 -0
- package/dist/src/abis/space-setup.js +407 -0
- package/dist/src/abis/space-setup.js.map +1 -0
- package/dist/src/abis/space.d.ts +359 -0
- package/dist/src/abis/space.d.ts.map +1 -0
- package/dist/src/abis/space.js +462 -0
- package/dist/src/abis/space.js.map +1 -0
- package/dist/src/account.d.ts +8 -0
- package/dist/src/account.d.ts.map +1 -0
- package/dist/src/account.js +8 -0
- package/dist/src/account.js.map +1 -0
- package/dist/src/blocks.d.ts +15 -0
- package/dist/src/blocks.d.ts.map +1 -0
- package/dist/src/blocks.js +15 -0
- package/dist/src/blocks.js.map +1 -0
- package/dist/src/codec/convert.d.ts +18 -0
- package/dist/src/codec/convert.d.ts.map +1 -0
- package/dist/src/codec/convert.js +188 -0
- package/dist/src/codec/convert.js.map +1 -0
- package/dist/src/core/account.d.ts +28 -0
- package/dist/src/core/account.d.ts.map +1 -0
- package/dist/src/core/account.js +67 -0
- package/dist/src/core/account.js.map +1 -0
- package/dist/src/core/account.test.d.ts +2 -0
- package/dist/src/core/account.test.d.ts.map +1 -0
- package/dist/src/core/account.test.js +80 -0
- package/dist/src/core/account.test.js.map +1 -0
- package/dist/src/core/base58.d.ts +43 -0
- package/dist/src/core/base58.d.ts.map +1 -0
- package/dist/src/core/base58.js +68 -0
- package/dist/src/core/base58.js.map +1 -0
- package/dist/src/core/base58.test.d.ts +2 -0
- package/dist/src/core/base58.test.d.ts.map +1 -0
- package/dist/src/core/base58.test.js +17 -0
- package/dist/src/core/base58.test.js.map +1 -0
- package/dist/src/core/blocks/data.d.ts +34 -0
- package/dist/src/core/blocks/data.d.ts.map +1 -0
- package/dist/src/core/blocks/data.js +77 -0
- package/dist/src/core/blocks/data.js.map +1 -0
- package/dist/src/core/blocks/data.test.d.ts +2 -0
- package/dist/src/core/blocks/data.test.d.ts.map +1 -0
- package/dist/src/core/blocks/data.test.js +96 -0
- package/dist/src/core/blocks/data.test.js.map +1 -0
- package/dist/src/core/blocks/image.d.ts +15 -0
- package/dist/src/core/blocks/image.d.ts.map +1 -0
- package/dist/src/core/blocks/image.js +15 -0
- package/dist/src/core/blocks/image.js.map +1 -0
- package/dist/src/core/blocks/text.d.ts +31 -0
- package/dist/src/core/blocks/text.d.ts.map +1 -0
- package/dist/src/core/blocks/text.js +57 -0
- package/dist/src/core/blocks/text.js.map +1 -0
- package/dist/src/core/blocks/text.test.d.ts +2 -0
- package/dist/src/core/blocks/text.test.d.ts.map +1 -0
- package/dist/src/core/blocks/text.test.js +93 -0
- package/dist/src/core/blocks/text.test.js.map +1 -0
- package/dist/src/core/get-checksum-address.d.ts +10 -0
- package/dist/src/core/get-checksum-address.d.ts.map +1 -0
- package/dist/src/core/get-checksum-address.js +20 -0
- package/dist/src/core/get-checksum-address.js.map +1 -0
- package/dist/src/core/ids/content.d.ts +60 -0
- package/dist/src/core/ids/content.d.ts.map +1 -0
- package/dist/src/core/ids/content.js +60 -0
- package/dist/src/core/ids/content.js.map +1 -0
- package/dist/src/core/ids/network.d.ts +5 -0
- package/dist/src/core/ids/network.d.ts.map +1 -0
- package/dist/src/core/ids/network.js +5 -0
- package/dist/src/core/ids/network.js.map +1 -0
- package/dist/src/core/ids/system.d.ts +239 -0
- package/dist/src/core/ids/system.d.ts.map +1 -0
- package/dist/src/core/ids/system.js +247 -0
- package/dist/src/core/ids/system.js.map +1 -0
- package/dist/src/core/idsv2/content.d.ts +59 -0
- package/dist/src/core/idsv2/content.d.ts.map +1 -0
- package/dist/src/core/idsv2/content.js +59 -0
- package/dist/src/core/idsv2/content.js.map +1 -0
- package/dist/src/core/idsv2/network.d.ts +5 -0
- package/dist/src/core/idsv2/network.d.ts.map +1 -0
- package/dist/src/core/idsv2/network.js +5 -0
- package/dist/src/core/idsv2/network.js.map +1 -0
- package/dist/src/core/idsv2/system.d.ts +222 -0
- package/dist/src/core/idsv2/system.d.ts.map +1 -0
- package/dist/src/core/idsv2/system.js +230 -0
- package/dist/src/core/idsv2/system.js.map +1 -0
- package/dist/src/core/image.d.ts +40 -0
- package/dist/src/core/image.d.ts.map +1 -0
- package/dist/src/core/image.js +76 -0
- package/dist/src/core/image.js.map +1 -0
- package/dist/src/core/image.test.d.ts +2 -0
- package/dist/src/core/image.test.d.ts.map +1 -0
- package/dist/src/core/image.test.js +52 -0
- package/dist/src/core/image.test.js.map +1 -0
- package/dist/src/core/position.d.ts +26 -0
- package/dist/src/core/position.d.ts.map +1 -0
- package/dist/src/core/position.js +41 -0
- package/dist/src/core/position.js.map +1 -0
- package/dist/src/core/position.test.d.ts +2 -0
- package/dist/src/core/position.test.d.ts.map +1 -0
- package/dist/src/core/position.test.js +126 -0
- package/dist/src/core/position.test.js.map +1 -0
- package/dist/src/core/relation.d.ts +88 -0
- package/dist/src/core/relation.d.ts.map +1 -0
- package/dist/src/core/relation.js +89 -0
- package/dist/src/core/relation.js.map +1 -0
- package/dist/src/core/relation.test.d.ts +2 -0
- package/dist/src/core/relation.test.d.ts.map +1 -0
- package/dist/src/core/relation.test.js +45 -0
- package/dist/src/core/relation.test.js.map +1 -0
- package/dist/src/core/scheme.d.ts +78 -0
- package/dist/src/core/scheme.d.ts.map +1 -0
- package/dist/src/core/scheme.js +99 -0
- package/dist/src/core/scheme.js.map +1 -0
- package/dist/src/core/scheme.test.d.ts +2 -0
- package/dist/src/core/scheme.test.d.ts.map +1 -0
- package/dist/src/core/scheme.test.js +34 -0
- package/dist/src/core/scheme.test.js.map +1 -0
- package/dist/src/core/triple.d.ts +50 -0
- package/dist/src/core/triple.d.ts.map +1 -0
- package/dist/src/core/triple.js +56 -0
- package/dist/src/core/triple.js.map +1 -0
- package/dist/src/core/triple.test.d.ts +2 -0
- package/dist/src/core/triple.test.d.ts.map +1 -0
- package/dist/src/core/triple.test.js +37 -0
- package/dist/src/core/triple.test.js.map +1 -0
- package/dist/src/encoding.d.ts +12 -0
- package/dist/src/encoding.d.ts.map +1 -0
- package/dist/src/encoding.js +30 -0
- package/dist/src/encoding.js.map +1 -0
- package/dist/src/encoding.test.d.ts +2 -0
- package/dist/src/encoding.test.d.ts.map +1 -0
- package/dist/src/encoding.test.js +644 -0
- package/dist/src/encoding.test.js.map +1 -0
- package/dist/src/encodings/get-accept-editor-arguments.d.ts +11 -0
- package/dist/src/encodings/get-accept-editor-arguments.d.ts.map +1 -0
- package/dist/src/encodings/get-accept-editor-arguments.js +23 -0
- package/dist/src/encodings/get-accept-editor-arguments.js.map +1 -0
- package/dist/src/encodings/get-accept-subspace-arguments.d.ts +11 -0
- package/dist/src/encodings/get-accept-subspace-arguments.d.ts.map +1 -0
- package/dist/src/encodings/get-accept-subspace-arguments.js +23 -0
- package/dist/src/encodings/get-accept-subspace-arguments.js.map +1 -0
- package/dist/src/encodings/get-calldata-for-space-governance-type.d.ts +8 -0
- package/dist/src/encodings/get-calldata-for-space-governance-type.d.ts.map +1 -0
- package/dist/src/encodings/get-calldata-for-space-governance-type.js +19 -0
- package/dist/src/encodings/get-calldata-for-space-governance-type.js.map +1 -0
- package/dist/src/encodings/get-create-dao-space-calldata.d.ts +157 -0
- package/dist/src/encodings/get-create-dao-space-calldata.d.ts.map +1 -0
- package/dist/src/encodings/get-create-dao-space-calldata.js +208 -0
- package/dist/src/encodings/get-create-dao-space-calldata.js.map +1 -0
- package/dist/src/encodings/get-create-dao-space-calldata.test.d.ts +2 -0
- package/dist/src/encodings/get-create-dao-space-calldata.test.d.ts.map +1 -0
- package/dist/src/encodings/get-create-dao-space-calldata.test.js +185 -0
- package/dist/src/encodings/get-create-dao-space-calldata.test.js.map +1 -0
- package/dist/src/encodings/get-create-personal-space-calldata.d.ts +33 -0
- package/dist/src/encodings/get-create-personal-space-calldata.d.ts.map +1 -0
- package/dist/src/encodings/get-create-personal-space-calldata.js +43 -0
- package/dist/src/encodings/get-create-personal-space-calldata.js.map +1 -0
- package/dist/src/encodings/get-create-personal-space-calldata.test.d.ts +2 -0
- package/dist/src/encodings/get-create-personal-space-calldata.test.d.ts.map +1 -0
- package/dist/src/encodings/get-create-personal-space-calldata.test.js +15 -0
- package/dist/src/encodings/get-create-personal-space-calldata.test.js.map +1 -0
- package/dist/src/encodings/get-process-geo-proposal-arguments.d.ts +7 -0
- package/dist/src/encodings/get-process-geo-proposal-arguments.d.ts.map +1 -0
- package/dist/src/encodings/get-process-geo-proposal-arguments.js +23 -0
- package/dist/src/encodings/get-process-geo-proposal-arguments.js.map +1 -0
- package/dist/src/encodings/get-register-space-calldata.d.ts +32 -0
- package/dist/src/encodings/get-register-space-calldata.d.ts.map +1 -0
- package/dist/src/encodings/get-register-space-calldata.js +39 -0
- package/dist/src/encodings/get-register-space-calldata.js.map +1 -0
- package/dist/src/encodings/get-register-space-calldata.test.d.ts +2 -0
- package/dist/src/encodings/get-register-space-calldata.test.d.ts.map +1 -0
- package/dist/src/encodings/get-register-space-calldata.test.js +15 -0
- package/dist/src/encodings/get-register-space-calldata.test.js.map +1 -0
- package/dist/src/encodings/get-remove-editor-arguments.d.ts +11 -0
- package/dist/src/encodings/get-remove-editor-arguments.d.ts.map +1 -0
- package/dist/src/encodings/get-remove-editor-arguments.js +23 -0
- package/dist/src/encodings/get-remove-editor-arguments.js.map +1 -0
- package/dist/src/encodings/get-remove-subspace-arguments.d.ts +11 -0
- package/dist/src/encodings/get-remove-subspace-arguments.d.ts.map +1 -0
- package/dist/src/encodings/get-remove-subspace-arguments.js +23 -0
- package/dist/src/encodings/get-remove-subspace-arguments.js.map +1 -0
- package/dist/src/encodings/index.d.ts +9 -0
- package/dist/src/encodings/index.d.ts.map +1 -0
- package/dist/src/encodings/index.js +9 -0
- package/dist/src/encodings/index.js.map +1 -0
- package/dist/src/full-flow-test.test.d.ts +2 -0
- package/dist/src/full-flow-test.test.d.ts.map +1 -0
- package/dist/src/full-flow-test.test.js +142 -0
- package/dist/src/full-flow-test.test.js.map +1 -0
- package/dist/src/graph/constants.d.ts +4 -0
- package/dist/src/graph/constants.d.ts.map +1 -0
- package/dist/src/graph/constants.js +8 -0
- package/dist/src/graph/constants.js.map +1 -0
- package/dist/src/graph/create-entity.d.ts +54 -0
- package/dist/src/graph/create-entity.d.ts.map +1 -0
- package/dist/src/graph/create-entity.js +272 -0
- package/dist/src/graph/create-entity.js.map +1 -0
- package/dist/src/graph/create-entity.test.d.ts +2 -0
- package/dist/src/graph/create-entity.test.d.ts.map +1 -0
- package/dist/src/graph/create-entity.test.js +459 -0
- package/dist/src/graph/create-entity.test.js.map +1 -0
- package/dist/src/graph/create-image.d.ts +28 -0
- package/dist/src/graph/create-image.d.ts.map +1 -0
- package/dist/src/graph/create-image.js +77 -0
- package/dist/src/graph/create-image.js.map +1 -0
- package/dist/src/graph/create-image.test.d.ts +2 -0
- package/dist/src/graph/create-image.test.d.ts.map +1 -0
- package/dist/src/graph/create-image.test.js +233 -0
- package/dist/src/graph/create-image.test.js.map +1 -0
- package/dist/src/graph/create-property.d.ts +24 -0
- package/dist/src/graph/create-property.d.ts.map +1 -0
- package/dist/src/graph/create-property.js +113 -0
- package/dist/src/graph/create-property.js.map +1 -0
- package/dist/src/graph/create-property.test.d.ts +2 -0
- package/dist/src/graph/create-property.test.d.ts.map +1 -0
- package/dist/src/graph/create-property.test.js +203 -0
- package/dist/src/graph/create-property.test.js.map +1 -0
- package/dist/src/graph/create-relation.d.ts +42 -0
- package/dist/src/graph/create-relation.d.ts.map +1 -0
- package/dist/src/graph/create-relation.js +110 -0
- package/dist/src/graph/create-relation.js.map +1 -0
- package/dist/src/graph/create-relation.test.d.ts +2 -0
- package/dist/src/graph/create-relation.test.d.ts.map +1 -0
- package/dist/src/graph/create-relation.test.js +358 -0
- package/dist/src/graph/create-relation.test.js.map +1 -0
- package/dist/src/graph/create-space.d.ts +37 -0
- package/dist/src/graph/create-space.d.ts.map +1 -0
- package/dist/src/graph/create-space.js +67 -0
- package/dist/src/graph/create-space.js.map +1 -0
- package/dist/src/graph/create-type.d.ts +22 -0
- package/dist/src/graph/create-type.d.ts.map +1 -0
- package/dist/src/graph/create-type.js +63 -0
- package/dist/src/graph/create-type.js.map +1 -0
- package/dist/src/graph/create-type.test.d.ts +2 -0
- package/dist/src/graph/create-type.test.d.ts.map +1 -0
- package/dist/src/graph/create-type.test.js +117 -0
- package/dist/src/graph/create-type.test.js.map +1 -0
- package/dist/src/graph/delete-entity.d.ts +14 -0
- package/dist/src/graph/delete-entity.d.ts.map +1 -0
- package/dist/src/graph/delete-entity.js +19 -0
- package/dist/src/graph/delete-entity.js.map +1 -0
- package/dist/src/graph/delete-entity.test.d.ts +2 -0
- package/dist/src/graph/delete-entity.test.d.ts.map +1 -0
- package/dist/src/graph/delete-entity.test.js +21 -0
- package/dist/src/graph/delete-entity.test.js.map +1 -0
- package/dist/src/graph/delete-relation.d.ts +14 -0
- package/dist/src/graph/delete-relation.d.ts.map +1 -0
- package/dist/src/graph/delete-relation.js +19 -0
- package/dist/src/graph/delete-relation.js.map +1 -0
- package/dist/src/graph/delete-relation.test.d.ts +2 -0
- package/dist/src/graph/delete-relation.test.d.ts.map +1 -0
- package/dist/src/graph/delete-relation.test.js +21 -0
- package/dist/src/graph/delete-relation.test.js.map +1 -0
- package/dist/src/graph/graph.test.d.ts +2 -0
- package/dist/src/graph/graph.test.d.ts.map +1 -0
- package/dist/src/graph/graph.test.js +46 -0
- package/dist/src/graph/graph.test.js.map +1 -0
- package/dist/src/graph/helpers/create-default-properties.d.ts +5 -0
- package/dist/src/graph/helpers/create-default-properties.d.ts.map +1 -0
- package/dist/src/graph/helpers/create-default-properties.js +44 -0
- package/dist/src/graph/helpers/create-default-properties.js.map +1 -0
- package/dist/src/graph/helpers/create-properties.d.ts +8 -0
- package/dist/src/graph/helpers/create-properties.d.ts.map +1 -0
- package/dist/src/graph/helpers/create-properties.js +53 -0
- package/dist/src/graph/helpers/create-properties.js.map +1 -0
- package/dist/src/graph/index.d.ts +13 -0
- package/dist/src/graph/index.d.ts.map +1 -0
- package/dist/src/graph/index.js +12 -0
- package/dist/src/graph/index.js.map +1 -0
- package/dist/src/graph/serialize.d.ts +5 -0
- package/dist/src/graph/serialize.d.ts.map +1 -0
- package/dist/src/graph/serialize.js +13 -0
- package/dist/src/graph/serialize.js.map +1 -0
- package/dist/src/graph/serialize.test.d.ts +2 -0
- package/dist/src/graph/serialize.test.d.ts.map +1 -0
- package/dist/src/graph/serialize.test.js +49 -0
- package/dist/src/graph/serialize.test.js.map +1 -0
- package/dist/src/graph/unset-entity-values.d.ts +21 -0
- package/dist/src/graph/unset-entity-values.d.ts.map +1 -0
- package/dist/src/graph/unset-entity-values.js +31 -0
- package/dist/src/graph/unset-entity-values.js.map +1 -0
- package/dist/src/graph/unset-entity-values.test.d.ts +2 -0
- package/dist/src/graph/unset-entity-values.test.d.ts.map +1 -0
- package/dist/src/graph/unset-entity-values.test.js +40 -0
- package/dist/src/graph/unset-entity-values.test.js.map +1 -0
- package/dist/src/graph/unset-relation-fields.d.ts +26 -0
- package/dist/src/graph/unset-relation-fields.d.ts.map +1 -0
- package/dist/src/graph/unset-relation-fields.js +38 -0
- package/dist/src/graph/unset-relation-fields.js.map +1 -0
- package/dist/src/graph/unset-relation-fields.test.d.ts +2 -0
- package/dist/src/graph/unset-relation-fields.test.d.ts.map +1 -0
- package/dist/src/graph/unset-relation-fields.test.js +70 -0
- package/dist/src/graph/unset-relation-fields.test.js.map +1 -0
- package/dist/src/graph/update-entity.d.ts +27 -0
- package/dist/src/graph/update-entity.d.ts.map +1 -0
- package/dist/src/graph/update-entity.js +153 -0
- package/dist/src/graph/update-entity.js.map +1 -0
- package/dist/src/graph/update-entity.test.d.ts +2 -0
- package/dist/src/graph/update-entity.test.d.ts.map +1 -0
- package/dist/src/graph/update-entity.test.js +208 -0
- package/dist/src/graph/update-entity.test.js.map +1 -0
- package/dist/src/graph/update-relation.d.ts +21 -0
- package/dist/src/graph/update-relation.d.ts.map +1 -0
- package/dist/src/graph/update-relation.js +43 -0
- package/dist/src/graph/update-relation.js.map +1 -0
- package/dist/src/graph/update-relation.test.d.ts +2 -0
- package/dist/src/graph/update-relation.test.d.ts.map +1 -0
- package/dist/src/graph/update-relation.test.js +230 -0
- package/dist/src/graph/update-relation.test.js.map +1 -0
- package/dist/src/graphv2/constants.d.ts +2 -0
- package/dist/src/graphv2/constants.d.ts.map +1 -0
- package/dist/src/graphv2/constants.js +2 -0
- package/dist/src/graphv2/constants.js.map +1 -0
- package/dist/src/graphv2/create-entity.d.ts +52 -0
- package/dist/src/graphv2/create-entity.d.ts.map +1 -0
- package/dist/src/graphv2/create-entity.js +140 -0
- package/dist/src/graphv2/create-entity.js.map +1 -0
- package/dist/src/graphv2/create-entity.test.d.ts +2 -0
- package/dist/src/graphv2/create-entity.test.d.ts.map +1 -0
- package/dist/src/graphv2/create-entity.test.js +158 -0
- package/dist/src/graphv2/create-entity.test.js.map +1 -0
- package/dist/src/graphv2/create-image.d.ts +28 -0
- package/dist/src/graphv2/create-image.d.ts.map +1 -0
- package/dist/src/graphv2/create-image.js +71 -0
- package/dist/src/graphv2/create-image.js.map +1 -0
- package/dist/src/graphv2/create-image.test.d.ts +2 -0
- package/dist/src/graphv2/create-image.test.d.ts.map +1 -0
- package/dist/src/graphv2/create-image.test.js +142 -0
- package/dist/src/graphv2/create-image.test.js.map +1 -0
- package/dist/src/graphv2/create-property.d.ts +22 -0
- package/dist/src/graphv2/create-property.d.ts.map +1 -0
- package/dist/src/graphv2/create-property.js +129 -0
- package/dist/src/graphv2/create-property.js.map +1 -0
- package/dist/src/graphv2/create-property.test.d.ts +2 -0
- package/dist/src/graphv2/create-property.test.d.ts.map +1 -0
- package/dist/src/graphv2/create-property.test.js +82 -0
- package/dist/src/graphv2/create-property.test.js.map +1 -0
- package/dist/src/graphv2/create-relation.d.ts +33 -0
- package/dist/src/graphv2/create-relation.d.ts.map +1 -0
- package/dist/src/graphv2/create-relation.js +66 -0
- package/dist/src/graphv2/create-relation.js.map +1 -0
- package/dist/src/graphv2/create-relation.test.d.ts +2 -0
- package/dist/src/graphv2/create-relation.test.d.ts.map +1 -0
- package/dist/src/graphv2/create-relation.test.js +208 -0
- package/dist/src/graphv2/create-relation.test.js.map +1 -0
- package/dist/src/graphv2/create-space.d.ts +13 -0
- package/dist/src/graphv2/create-space.d.ts.map +1 -0
- package/dist/src/graphv2/create-space.js +21 -0
- package/dist/src/graphv2/create-space.js.map +1 -0
- package/dist/src/graphv2/create-type.d.ts +22 -0
- package/dist/src/graphv2/create-type.d.ts.map +1 -0
- package/dist/src/graphv2/create-type.js +64 -0
- package/dist/src/graphv2/create-type.js.map +1 -0
- package/dist/src/graphv2/create-type.test.d.ts +2 -0
- package/dist/src/graphv2/create-type.test.d.ts.map +1 -0
- package/dist/src/graphv2/create-type.test.js +109 -0
- package/dist/src/graphv2/create-type.test.js.map +1 -0
- package/dist/src/graphv2/delete-entity.d.ts +14 -0
- package/dist/src/graphv2/delete-entity.d.ts.map +1 -0
- package/dist/src/graphv2/delete-entity.js +21 -0
- package/dist/src/graphv2/delete-entity.js.map +1 -0
- package/dist/src/graphv2/delete-entity.test.d.ts +2 -0
- package/dist/src/graphv2/delete-entity.test.d.ts.map +1 -0
- package/dist/src/graphv2/delete-entity.test.js +24 -0
- package/dist/src/graphv2/delete-entity.test.js.map +1 -0
- package/dist/src/graphv2/delete-relation.d.ts +14 -0
- package/dist/src/graphv2/delete-relation.d.ts.map +1 -0
- package/dist/src/graphv2/delete-relation.js +21 -0
- package/dist/src/graphv2/delete-relation.js.map +1 -0
- package/dist/src/graphv2/delete-relation.test.d.ts +2 -0
- package/dist/src/graphv2/delete-relation.test.d.ts.map +1 -0
- package/dist/src/graphv2/delete-relation.test.js +24 -0
- package/dist/src/graphv2/delete-relation.test.js.map +1 -0
- package/dist/src/graphv2/index.d.ts +12 -0
- package/dist/src/graphv2/index.d.ts.map +1 -0
- package/dist/src/graphv2/index.js +12 -0
- package/dist/src/graphv2/index.js.map +1 -0
- package/dist/src/graphv2/remove-entity-properties.d.ts +25 -0
- package/dist/src/graphv2/remove-entity-properties.d.ts.map +1 -0
- package/dist/src/graphv2/remove-entity-properties.js +24 -0
- package/dist/src/graphv2/remove-entity-properties.js.map +1 -0
- package/dist/src/graphv2/unset-entity-values.d.ts +21 -0
- package/dist/src/graphv2/unset-entity-values.d.ts.map +1 -0
- package/dist/src/graphv2/unset-entity-values.js +26 -0
- package/dist/src/graphv2/unset-entity-values.js.map +1 -0
- package/dist/src/graphv2/unset-entity-values.test.d.ts +2 -0
- package/dist/src/graphv2/unset-entity-values.test.d.ts.map +1 -0
- package/dist/src/graphv2/unset-entity-values.test.js +40 -0
- package/dist/src/graphv2/unset-entity-values.test.js.map +1 -0
- package/dist/src/graphv2/unset-relation-fields.d.ts +25 -0
- package/dist/src/graphv2/unset-relation-fields.d.ts.map +1 -0
- package/dist/src/graphv2/unset-relation-fields.js +34 -0
- package/dist/src/graphv2/unset-relation-fields.js.map +1 -0
- package/dist/src/graphv2/unset-relation-fields.test.d.ts +2 -0
- package/dist/src/graphv2/unset-relation-fields.test.d.ts.map +1 -0
- package/dist/src/graphv2/unset-relation-fields.test.js +64 -0
- package/dist/src/graphv2/unset-relation-fields.test.js.map +1 -0
- package/dist/src/graphv2/update-entity.d.ts +28 -0
- package/dist/src/graphv2/update-entity.d.ts.map +1 -0
- package/dist/src/graphv2/update-entity.js +73 -0
- package/dist/src/graphv2/update-entity.js.map +1 -0
- package/dist/src/graphv2/update-entity.test.d.ts +2 -0
- package/dist/src/graphv2/update-entity.test.d.ts.map +1 -0
- package/dist/src/graphv2/update-entity.test.js +116 -0
- package/dist/src/graphv2/update-entity.test.js.map +1 -0
- package/dist/src/graphv2/update-relation.d.ts +21 -0
- package/dist/src/graphv2/update-relation.d.ts.map +1 -0
- package/dist/src/graphv2/update-relation.js +37 -0
- package/dist/src/graphv2/update-relation.js.map +1 -0
- package/dist/src/id-utils.d.ts +36 -0
- package/dist/src/id-utils.d.ts.map +1 -0
- package/dist/src/id-utils.js +100 -0
- package/dist/src/id-utils.js.map +1 -0
- package/dist/src/id-utils.test.d.ts +2 -0
- package/dist/src/id-utils.test.d.ts.map +1 -0
- package/dist/src/id-utils.test.js +33 -0
- package/dist/src/id-utils.test.js.map +1 -0
- package/dist/src/id.d.ts +11 -0
- package/dist/src/id.d.ts.map +1 -0
- package/dist/src/id.js +13 -0
- package/dist/src/id.js.map +1 -0
- package/dist/src/id.test.d.ts +2 -0
- package/dist/src/id.test.d.ts.map +1 -0
- package/dist/src/id.test.js +14 -0
- package/dist/src/id.test.js.map +1 -0
- package/dist/src/idv2.d.ts +27 -0
- package/dist/src/idv2.d.ts.map +1 -0
- package/dist/src/idv2.js +88 -0
- package/dist/src/idv2.js.map +1 -0
- package/dist/src/idv2.test.d.ts +2 -0
- package/dist/src/idv2.test.d.ts.map +1 -0
- package/dist/src/idv2.test.js +26 -0
- package/dist/src/idv2.test.js.map +1 -0
- package/dist/src/image.d.ts +8 -0
- package/dist/src/image.d.ts.map +1 -0
- package/dist/src/image.js +8 -0
- package/dist/src/image.js.map +1 -0
- package/dist/src/internal/uuid.d.ts +11 -0
- package/dist/src/internal/uuid.d.ts.map +1 -0
- package/dist/src/internal/uuid.js +18 -0
- package/dist/src/internal/uuid.js.map +1 -0
- package/dist/src/ipfs.d.ts +98 -0
- package/dist/src/ipfs.d.ts.map +1 -0
- package/dist/src/ipfs.js +192 -0
- package/dist/src/ipfs.js.map +1 -0
- package/dist/src/ipfs.test.d.ts +2 -0
- package/dist/src/ipfs.test.d.ts.map +1 -0
- package/dist/src/ipfs.test.js +137 -0
- package/dist/src/ipfs.test.js.map +1 -0
- package/dist/src/ipfsv2.d.ts +96 -0
- package/dist/src/ipfsv2.d.ts.map +1 -0
- package/dist/src/ipfsv2.js +163 -0
- package/dist/src/ipfsv2.js.map +1 -0
- package/dist/src/ipfsv2.test.d.ts +2 -0
- package/dist/src/ipfsv2.test.d.ts.map +1 -0
- package/dist/src/ipfsv2.test.js +22 -0
- package/dist/src/ipfsv2.test.js.map +1 -0
- package/dist/src/position.d.ts +7 -0
- package/dist/src/position.d.ts.map +1 -0
- package/dist/src/position.js +7 -0
- package/dist/src/position.js.map +1 -0
- package/dist/src/proto/edit.d.ts +11 -0
- package/dist/src/proto/edit.d.ts.map +1 -0
- package/dist/src/proto/edit.js +210 -0
- package/dist/src/proto/edit.js.map +1 -0
- package/dist/src/proto/edit.test.d.ts +2 -0
- package/dist/src/proto/edit.test.d.ts.map +1 -0
- package/dist/src/proto/edit.test.js +326 -0
- package/dist/src/proto/edit.test.js.map +1 -0
- package/dist/src/proto/editv2.d.ts +11 -0
- package/dist/src/proto/editv2.d.ts.map +1 -0
- package/dist/src/proto/editv2.js +81 -0
- package/dist/src/proto/editv2.js.map +1 -0
- package/dist/src/proto/editv2.test.d.ts +2 -0
- package/dist/src/proto/editv2.test.d.ts.map +1 -0
- package/dist/src/proto/editv2.test.js +211 -0
- package/dist/src/proto/editv2.test.js.map +1 -0
- package/dist/src/proto/gen/src/proto/ipfs_pb.d.ts +530 -0
- package/dist/src/proto/gen/src/proto/ipfs_pb.d.ts.map +1 -0
- package/dist/src/proto/gen/src/proto/ipfs_pb.js +706 -0
- package/dist/src/proto/gen/src/proto/ipfs_pb.js.map +1 -0
- package/dist/src/proto/gen/src/proto/ipfsv2_pb.d.ts +410 -0
- package/dist/src/proto/gen/src/proto/ipfsv2_pb.d.ts.map +1 -0
- package/dist/src/proto/gen/src/proto/ipfsv2_pb.js +536 -0
- package/dist/src/proto/gen/src/proto/ipfsv2_pb.js.map +1 -0
- package/dist/src/proto/index.d.ts +7 -0
- package/dist/src/proto/index.d.ts.map +1 -0
- package/dist/src/proto/index.js +7 -0
- package/dist/src/proto/index.js.map +1 -0
- package/dist/src/ranks/create-rank.d.ts +42 -0
- package/dist/src/ranks/create-rank.d.ts.map +1 -0
- package/dist/src/ranks/create-rank.js +146 -0
- package/dist/src/ranks/create-rank.js.map +1 -0
- package/dist/src/ranks/create-rank.test.d.ts +2 -0
- package/dist/src/ranks/create-rank.test.d.ts.map +1 -0
- package/dist/src/ranks/create-rank.test.js +333 -0
- package/dist/src/ranks/create-rank.test.js.map +1 -0
- package/dist/src/ranks/index.d.ts +3 -0
- package/dist/src/ranks/index.d.ts.map +1 -0
- package/dist/src/ranks/index.js +3 -0
- package/dist/src/ranks/index.js.map +1 -0
- package/dist/src/ranks/types.d.ts +30 -0
- package/dist/src/ranks/types.d.ts.map +1 -0
- package/dist/src/ranks/types.js +2 -0
- package/dist/src/ranks/types.js.map +1 -0
- package/dist/src/relation.d.ts +7 -0
- package/dist/src/relation.d.ts.map +1 -0
- package/dist/src/relation.js +7 -0
- package/dist/src/relation.js.map +1 -0
- package/dist/src/scheme.d.ts +7 -0
- package/dist/src/scheme.d.ts.map +1 -0
- package/dist/src/scheme.js +7 -0
- package/dist/src/scheme.js.map +1 -0
- package/dist/src/smart-wallet-2.test-invalid.d.ts +2 -0
- package/dist/src/smart-wallet-2.test-invalid.d.ts.map +1 -0
- package/dist/src/smart-wallet-2.test-invalid.js +49 -0
- package/dist/src/smart-wallet-2.test-invalid.js.map +1 -0
- package/dist/src/smart-wallet-2.test.d.ts +2 -0
- package/dist/src/smart-wallet-2.test.d.ts.map +1 -0
- package/dist/src/smart-wallet-2.test.js +49 -0
- package/dist/src/smart-wallet-2.test.js.map +1 -0
- package/dist/src/smart-wallet.d.ts +26 -0
- package/dist/src/smart-wallet.d.ts.map +1 -0
- package/dist/src/smart-wallet.js +100 -0
- package/dist/src/smart-wallet.js.map +1 -0
- package/dist/src/smart-wallet.test.d.ts +2 -0
- package/dist/src/smart-wallet.test.d.ts.map +1 -0
- package/dist/src/smart-wallet.test.js +66 -0
- package/dist/src/smart-wallet.test.js.map +1 -0
- package/dist/src/system-ids-v2.d.ts +7 -0
- package/dist/src/system-ids-v2.d.ts.map +1 -0
- package/dist/src/system-ids-v2.js +7 -0
- package/dist/src/system-ids-v2.js.map +1 -0
- package/dist/src/system-ids.d.ts +7 -0
- package/dist/src/system-ids.d.ts.map +1 -0
- package/dist/src/system-ids.js +7 -0
- package/dist/src/system-ids.js.map +1 -0
- package/dist/src/triple.d.ts +7 -0
- package/dist/src/triple.d.ts.map +1 -0
- package/dist/src/triple.js +7 -0
- package/dist/src/triple.js.map +1 -0
- package/dist/src/types-backup.d.ts +134 -0
- package/dist/src/types-backup.d.ts.map +1 -0
- package/dist/src/types-backup.js +13 -0
- package/dist/src/types-backup.js.map +1 -0
- package/dist/src/types.d.ts +176 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +8 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/typesv2.d.ts +173 -0
- package/dist/src/typesv2.d.ts.map +1 -0
- package/dist/src/typesv2.js +8 -0
- package/dist/src/typesv2.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
# Geo SDK
|
|
2
|
+
|
|
3
|
+
A collection of tools for interacting with The Graph.
|
|
4
|
+
|
|
5
|
+
## Installing
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install @geoprotocol/geo-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
### Data flow
|
|
14
|
+
|
|
15
|
+
Data in The Graph lives both offchain and onchain. This data is written to IPFS, and the resulting content identitifier is then posted onchain before being read by the indexing stack. After the indexer finishes processing the data it's exposed by the API.
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
### Spaces
|
|
19
|
+
|
|
20
|
+
On The Graph, knowledge is organized into spaces. Anyone can create a space for a community, project or individual. Spaces are organized onchain into a set of multiple smart contracts. These smart contracts represent the space itself, its data and its governance process. Depending on which onchain actions you're taking you might be interacting with one or more of these smart contracts.
|
|
21
|
+
|
|
22
|
+
### Relations
|
|
23
|
+
|
|
24
|
+
Relations describe the edges within the graph. Relations are themselves entities that include details about the relationship. For example a Company can have Team Members. Each Team Member relation can have an attribute describing when the person joined the team. This is a model that is commonly called a property graph.
|
|
25
|
+
|
|
26
|
+
### Entities
|
|
27
|
+
|
|
28
|
+
An entity is a unique identifier representing a person, a place, an idea, a concept, or anything else. Entities are comprised of triples and relations which provide semantic meaning as to what the entity _is_. An entity's data can be composed from multiple spaces at once. This property is what enables pluralism within The Graph.
|
|
29
|
+
|
|
30
|
+
[More about entities and knowledge graphs](https://www.geobrowser.io/space/6tfhqywXtteatMeGUtd5EB/XYo6aR3VqFQSEcf6AeTikW)
|
|
31
|
+
|
|
32
|
+
[More about pluralism](https://www.geobrowser.io/space/6tfhqywXtteatMeGUtd5EB/5WHP8BuoCdSiqtfy87SYWG)
|
|
33
|
+
|
|
34
|
+
### Ops and edits
|
|
35
|
+
|
|
36
|
+
Data in The Graph is stored as an Op (operation). Ops represent a set of changes applied to entities. A change could be setting or deleting a triple or a relation. Both triples and relations are represented as Ops.
|
|
37
|
+
|
|
38
|
+
When writing data, these ops are grouped into a logical set called an "Edit." An Edit has a name, authors, and other metadata to represent the set of changes. This edit is then encoded into a binary representation for storage efficiency.
|
|
39
|
+
|
|
40
|
+
[Ops and edits in GRC-20](https://github.com/yanivtal/graph-improvement-proposals/blob/new-ops/grcs/0020-knowledge-graph.md#101-operations-op)
|
|
41
|
+
|
|
42
|
+
## Using
|
|
43
|
+
|
|
44
|
+
### Unique IDs
|
|
45
|
+
|
|
46
|
+
Entities throughout The Graph are referenced via globally unique identifiers. The SDK exposes APIs for creating these IDs.
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import { Id } from '@geoprotocol/geo-sdk';
|
|
50
|
+
|
|
51
|
+
const newId = Id.generate();
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Creating properties, types and entities
|
|
55
|
+
|
|
56
|
+
Working with triple and relations ops is a low level API and give you maximum flexibility. In order to ease the process of creating and updating data, the library also exports APIs for creating properties, types and entities.
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import { Graph } from '@geoprotocol/geo-sdk';
|
|
60
|
+
|
|
61
|
+
// create a property
|
|
62
|
+
const propertyResult = Graph.createProperty({
|
|
63
|
+
name: 'name of the property',
|
|
64
|
+
dataType: 'TEXT', // BOOLEAN | INT64 | FLOAT64 | DECIMAL | TEXT | BYTES | DATE | TIME | DATETIME | SCHEDULE | POINT | EMBEDDING | RELATION
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// create a type
|
|
68
|
+
const { id: personTypeId, ops: createPersonTypeOps } = Graph.createType({
|
|
69
|
+
name: 'name of the type',
|
|
70
|
+
properties: […listOfPropertyIds],
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// create an image
|
|
74
|
+
const { id: imageId, ops: createImageOps } = await Graph.createImage({
|
|
75
|
+
url: 'https://example.com/image.png',
|
|
76
|
+
// blob: new Blob([fs.readFileSync(path.join(__dirname, 'cover.png'))], { type: 'image/png' });
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// create an entity
|
|
80
|
+
const { id: restaurantId, ops: createRestaurantOps } = Graph.createEntity({
|
|
81
|
+
name: 'name of the entity',
|
|
82
|
+
description: 'description of the entity',
|
|
83
|
+
types: […listOfTypeIds],
|
|
84
|
+
cover: imageId,
|
|
85
|
+
values: [
|
|
86
|
+
{
|
|
87
|
+
property: propertyId,
|
|
88
|
+
type: 'text',
|
|
89
|
+
value: 'value of the property',
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
relations: {
|
|
93
|
+
// relation property
|
|
94
|
+
[relationPropertyId]: {
|
|
95
|
+
toEntity: 'id of the entity',
|
|
96
|
+
id: 'id of the relation', // optional
|
|
97
|
+
position: positionString, // optional
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
#### Typed values
|
|
104
|
+
|
|
105
|
+
Values are passed as typed objects with a `type` field that determines the value format:
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
import { Graph, Id } from '@geoprotocol/geo-sdk';
|
|
109
|
+
|
|
110
|
+
const { id: personId, ops: createPersonOps } = Graph.createEntity({
|
|
111
|
+
values: [
|
|
112
|
+
// Text value (with optional language)
|
|
113
|
+
{
|
|
114
|
+
property: someTextPropertyId,
|
|
115
|
+
type: 'text',
|
|
116
|
+
value: 'Hello',
|
|
117
|
+
language: Id('dad6e52a5e944e559411cfe3a3c3ea64'), // optional
|
|
118
|
+
},
|
|
119
|
+
// Number value (with optional unit)
|
|
120
|
+
{
|
|
121
|
+
property: someNumberPropertyId,
|
|
122
|
+
type: 'float64',
|
|
123
|
+
value: 42.5,
|
|
124
|
+
unit: Id('016c9b1cd8a84e4d9e844e40878bb235'), // optional
|
|
125
|
+
},
|
|
126
|
+
// Boolean value
|
|
127
|
+
{
|
|
128
|
+
property: someBooleanPropertyId,
|
|
129
|
+
type: 'bool',
|
|
130
|
+
value: true,
|
|
131
|
+
},
|
|
132
|
+
// Point value (with optional altitude)
|
|
133
|
+
{
|
|
134
|
+
property: somePointPropertyId,
|
|
135
|
+
type: 'point',
|
|
136
|
+
lon: -122.4194,
|
|
137
|
+
lat: 37.7749,
|
|
138
|
+
alt: 10.5, // optional
|
|
139
|
+
},
|
|
140
|
+
// Date value (ISO 8601 format: YYYY-MM-DD)
|
|
141
|
+
{
|
|
142
|
+
property: someDatePropertyId,
|
|
143
|
+
type: 'date',
|
|
144
|
+
value: '2024-01-15',
|
|
145
|
+
},
|
|
146
|
+
// Time value (ISO 8601 format with timezone)
|
|
147
|
+
{
|
|
148
|
+
property: someTimePropertyId,
|
|
149
|
+
type: 'time',
|
|
150
|
+
value: '14:30:00Z',
|
|
151
|
+
},
|
|
152
|
+
// Datetime value (ISO 8601 combined format)
|
|
153
|
+
{
|
|
154
|
+
property: someDatetimePropertyId,
|
|
155
|
+
type: 'datetime',
|
|
156
|
+
value: '2024-01-15T14:30:00Z',
|
|
157
|
+
},
|
|
158
|
+
// Schedule value (iCalendar RRULE format)
|
|
159
|
+
{
|
|
160
|
+
property: someSchedulePropertyId,
|
|
161
|
+
type: 'schedule',
|
|
162
|
+
value: 'FREQ=WEEKLY;BYDAY=MO,WE,FR',
|
|
163
|
+
},
|
|
164
|
+
]
|
|
165
|
+
});
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
#### Example Flow
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
import { Graph, type Op } from '@geoprotocol/geo-sdk';
|
|
172
|
+
|
|
173
|
+
const ops: Array<Op> = [];
|
|
174
|
+
|
|
175
|
+
// create an age property
|
|
176
|
+
const { id: agePropertyId, ops: createAgePropertyOps } = Graph.createProperty({
|
|
177
|
+
dataType: 'INT64',
|
|
178
|
+
name: 'Age',
|
|
179
|
+
});
|
|
180
|
+
ops.push(...createAgePropertyOps);
|
|
181
|
+
|
|
182
|
+
// create a likes property
|
|
183
|
+
const { id: likesPropertyId, ops: createLikesPropertyOps } = Graph.createProperty({
|
|
184
|
+
dataType: 'RELATION',
|
|
185
|
+
name: 'Likes',
|
|
186
|
+
});
|
|
187
|
+
ops.push(...createLikesPropertyOps);
|
|
188
|
+
|
|
189
|
+
// create a person type
|
|
190
|
+
const { id: personTypeId, ops: createPersonTypeOps } = Graph.createType({
|
|
191
|
+
name: 'Person',
|
|
192
|
+
cover: personCoverId,
|
|
193
|
+
properties: [agePropertyId, likesPropertyId],
|
|
194
|
+
});
|
|
195
|
+
ops.push(...createPersonTypeOps);
|
|
196
|
+
|
|
197
|
+
// create an restaurant cover image
|
|
198
|
+
const { id: restaurantCoverId, ops: createRestaurantCoverOps } = await Graph.createImage({
|
|
199
|
+
url: 'https://example.com/image.png',
|
|
200
|
+
});
|
|
201
|
+
ops.push(...createRestaurantCoverOps);
|
|
202
|
+
|
|
203
|
+
// create a restaurant entity with a website property
|
|
204
|
+
const restaurantTypeId = 'A9QizqoXSqjfPUBjLoPJa2';
|
|
205
|
+
const { id: restaurantId, ops: createRestaurantOps } = Graph.createEntity({
|
|
206
|
+
name: 'Yum Yum',
|
|
207
|
+
description: 'A restaurant serving fusion cuisine',
|
|
208
|
+
cover: restaurantCoverId,
|
|
209
|
+
types: [restaurantTypeId],
|
|
210
|
+
values: [
|
|
211
|
+
{
|
|
212
|
+
property: WEBSITE_PROPERTY,
|
|
213
|
+
type: 'text',
|
|
214
|
+
value: 'https://example.com',
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
});
|
|
218
|
+
ops.push(...createRestaurantOps);
|
|
219
|
+
|
|
220
|
+
// create a person cover image
|
|
221
|
+
const { id: personCoverId, ops: createPersonCoverOps } = await Graph.createImage({
|
|
222
|
+
url: 'https://example.com/avatar.png',
|
|
223
|
+
});
|
|
224
|
+
ops.push(...createPersonCoverOps);
|
|
225
|
+
|
|
226
|
+
// create a person entity with a likes relation to the restaurant entity
|
|
227
|
+
const { id: personId, ops: createPersonOps } = Graph.createEntity({
|
|
228
|
+
name: 'Jane Doe',
|
|
229
|
+
types: [personTypeId],
|
|
230
|
+
cover: personCoverId,
|
|
231
|
+
values: [
|
|
232
|
+
{
|
|
233
|
+
property: agePropertyId,
|
|
234
|
+
type: 'float64',
|
|
235
|
+
value: 42,
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
relations: {
|
|
239
|
+
[likesPropertyId]: {
|
|
240
|
+
toEntity: restaurantId,
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
});
|
|
244
|
+
ops.push(...createPersonOps);
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Writing an edit to IPFS
|
|
248
|
+
|
|
249
|
+
Once you have a set of ops ready to publish, you'll need to binary encode them into an Edit and upload the Edit to IPFS.
|
|
250
|
+
|
|
251
|
+
Currently the indexer only supports reading a specific gateway. You should use our IPFS API to guarantee data availability for your published data while in early access.
|
|
252
|
+
|
|
253
|
+
Additionally, the indexer expects that IPFS CIDs be prefixed with `ipfs://` so it knows how to process it correctly. The API already returns the CID prefixed with `ipfs://`.
|
|
254
|
+
|
|
255
|
+
We've abstracted the IPFS publishing and binary encoding into a single API.
|
|
256
|
+
|
|
257
|
+
```ts
|
|
258
|
+
import { Ipfs } from '@geoprotocol/geo-sdk';
|
|
259
|
+
|
|
260
|
+
const { cid, editId } = await Ipfs.publishEdit({
|
|
261
|
+
name: 'Edit name',
|
|
262
|
+
ops: ops,
|
|
263
|
+
author: '0x000000000000000000000000000000000000',
|
|
264
|
+
network: 'TESTNET', // TESTNET (defaults to TESTNET)
|
|
265
|
+
})
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Publishing an edit onchain using SpaceRegistry
|
|
269
|
+
|
|
270
|
+
Once you've uploaded the binary encoded Edit to IPFS and have correctly formed `ipfs://hash`, you can write this to a space using the SpaceRegistry contract.
|
|
271
|
+
|
|
272
|
+
```ts
|
|
273
|
+
import { createPublicClient, encodeAbiParameters, encodeFunctionData, type Hex, http, keccak256, toHex } from 'viem';
|
|
274
|
+
import { SpaceRegistryAbi, getWalletClient } from '@geoprotocol/geo-sdk';
|
|
275
|
+
|
|
276
|
+
// Contract addresses for testnet
|
|
277
|
+
const SPACE_REGISTRY_ADDRESS = '0xB01683b2f0d38d43fcD4D9aAB980166988924132' as const;
|
|
278
|
+
const EDITS_PUBLISHED = keccak256(toHex('GOVERNANCE.EDITS_PUBLISHED'));
|
|
279
|
+
|
|
280
|
+
// You'll need your space ID in hex format (bytes16) and an IPFS CID
|
|
281
|
+
const spaceIdHex = '0x...' as Hex; // bytes16 space ID
|
|
282
|
+
const cid = 'ipfs://hash';
|
|
283
|
+
|
|
284
|
+
const walletClient = await getWalletClient({
|
|
285
|
+
privateKey: addressPrivateKey,
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
// Encode the CID as a single string
|
|
289
|
+
const enterData = encodeAbiParameters([{ type: 'string' }], [cid]);
|
|
290
|
+
|
|
291
|
+
const calldata = encodeFunctionData({
|
|
292
|
+
abi: SpaceRegistryAbi,
|
|
293
|
+
functionName: 'enter',
|
|
294
|
+
args: [
|
|
295
|
+
spaceIdHex, // fromSpaceId (bytes16)
|
|
296
|
+
spaceIdHex, // toSpaceId (bytes16)
|
|
297
|
+
EDITS_PUBLISHED, // action
|
|
298
|
+
'0x0000000000000000000000000000000000000000000000000000000000000000' as Hex, // topic
|
|
299
|
+
enterData, // data
|
|
300
|
+
'0x' as Hex, // signature (empty for direct calls)
|
|
301
|
+
],
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
const txResult = await walletClient.sendTransaction({
|
|
305
|
+
account: walletClient.account,
|
|
306
|
+
to: SPACE_REGISTRY_ADDRESS,
|
|
307
|
+
value: 0n,
|
|
308
|
+
data: calldata,
|
|
309
|
+
});
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Getting a wallet client
|
|
313
|
+
|
|
314
|
+
```ts
|
|
315
|
+
import { privateKeyToAccount } from 'viem/accounts';
|
|
316
|
+
import { getWalletClient } from "@geoprotocol/geo-sdk";
|
|
317
|
+
|
|
318
|
+
// IMPORTANT: Be careful with your private key. Don't commit it to version control.
|
|
319
|
+
// You can get your private key using https://www.geobrowser.io/export-wallet
|
|
320
|
+
const addressPrivateKey = '0xTODO';
|
|
321
|
+
const { address } = privateKeyToAccount(addressPrivateKey);
|
|
322
|
+
|
|
323
|
+
// Take the address and enter it in Faucet to get some testnet ETH https://faucet.conduit.xyz/geo-test-zc16z3tcvf
|
|
324
|
+
|
|
325
|
+
const walletClient = await getWalletClient({
|
|
326
|
+
privateKey: addressPrivateKey,
|
|
327
|
+
});
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### Publishing an edit onchain using your Geo Account
|
|
331
|
+
|
|
332
|
+
The Geo Genesis browser uses a smart account associated with your account to publish edits. There may be situations where you want to use the same account in your code as you do on Geo Genesis. In order to get the smart account wallet client you can use the `getSmartAccountWalletClient` function.
|
|
333
|
+
|
|
334
|
+
To use `getSmartAccountWalletClient` you'll need the private key associated with your Geo account. You can get your private key using https://www.geobrowser.io/export-wallet.
|
|
335
|
+
|
|
336
|
+
Transaction costs from your smart account will be sponsored by the Geo team for the duration of the early access period. Eventually you will need to provide your own API key or provide funds to your smart account.
|
|
337
|
+
|
|
338
|
+
```ts
|
|
339
|
+
import { getSmartAccountWalletClient } from '@geoprotocol/geo-sdk';
|
|
340
|
+
|
|
341
|
+
// IMPORTANT: Be careful with your private key. Don't commit it to version control.
|
|
342
|
+
// You can get your private key using https://www.geobrowser.io/export-wallet
|
|
343
|
+
const privateKey = `0x${privateKeyFromGeoWallet}`;
|
|
344
|
+
const smartAccountWalletClient = await getSmartAccountWalletClient({
|
|
345
|
+
privateKey,
|
|
346
|
+
// rpcUrl, // optional
|
|
347
|
+
});
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Creating a personal space
|
|
351
|
+
|
|
352
|
+
You can create personal spaces using the SpaceRegistry contract. Personal spaces are owned by a single address and don't require voting for governance.
|
|
353
|
+
|
|
354
|
+
```ts
|
|
355
|
+
import { createPublicClient, encodeAbiParameters, encodeFunctionData, type Hex, http, keccak256, toHex } from 'viem';
|
|
356
|
+
import { SpaceRegistryAbi, getWalletClient } from '@geoprotocol/geo-sdk';
|
|
357
|
+
|
|
358
|
+
const SPACE_REGISTRY_ADDRESS = '0xB01683b2f0d38d43fcD4D9aAB980166988924132' as const;
|
|
359
|
+
const EMPTY_SPACE_ID = '0x00000000000000000000000000000000' as Hex;
|
|
360
|
+
|
|
361
|
+
const walletClient = await getWalletClient({
|
|
362
|
+
privateKey: addressPrivateKey,
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
const account = walletClient.account;
|
|
366
|
+
const rpcUrl = walletClient.chain?.rpcUrls?.default?.http?.[0];
|
|
367
|
+
|
|
368
|
+
const publicClient = createPublicClient({
|
|
369
|
+
transport: http(rpcUrl),
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
// Check if a personal space already exists for this address
|
|
373
|
+
let spaceIdHex = await publicClient.readContract({
|
|
374
|
+
address: SPACE_REGISTRY_ADDRESS,
|
|
375
|
+
abi: SpaceRegistryAbi,
|
|
376
|
+
functionName: 'addressToSpaceId',
|
|
377
|
+
args: [account.address],
|
|
378
|
+
}) as Hex;
|
|
379
|
+
|
|
380
|
+
// Create a personal space if one doesn't exist
|
|
381
|
+
if (spaceIdHex.toLowerCase() === EMPTY_SPACE_ID.toLowerCase()) {
|
|
382
|
+
const createSpaceTxHash = await walletClient.sendTransaction({
|
|
383
|
+
account: walletClient.account,
|
|
384
|
+
to: SPACE_REGISTRY_ADDRESS,
|
|
385
|
+
value: 0n,
|
|
386
|
+
data: encodeFunctionData({
|
|
387
|
+
abi: SpaceRegistryAbi,
|
|
388
|
+
functionName: 'registerSpaceId',
|
|
389
|
+
args: [
|
|
390
|
+
keccak256(toHex('EOA_SPACE')), // _type
|
|
391
|
+
encodeAbiParameters([{ type: 'string' }], ['1.0.0']), // _version
|
|
392
|
+
],
|
|
393
|
+
}),
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
await publicClient.waitForTransactionReceipt({ hash: createSpaceTxHash });
|
|
397
|
+
|
|
398
|
+
// Re-fetch the space ID after creation
|
|
399
|
+
spaceIdHex = await publicClient.readContract({
|
|
400
|
+
address: SPACE_REGISTRY_ADDRESS,
|
|
401
|
+
abi: SpaceRegistryAbi,
|
|
402
|
+
functionName: 'addressToSpaceId',
|
|
403
|
+
args: [account.address],
|
|
404
|
+
}) as Hex;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// Convert bytes16 hex to UUID string (without dashes)
|
|
408
|
+
const spaceId = spaceIdHex.slice(2, 34).toLowerCase();
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
## Full Publishing Flow
|
|
412
|
+
|
|
413
|
+
This example shows the complete flow for creating a personal space and publishing an edit on testnet.
|
|
414
|
+
|
|
415
|
+
```ts
|
|
416
|
+
import { createPublicClient, encodeAbiParameters, encodeFunctionData, type Hex, http, keccak256, toHex } from 'viem';
|
|
417
|
+
import { privateKeyToAccount } from 'viem/accounts';
|
|
418
|
+
import { Graph, Ipfs, SpaceRegistryAbi, getWalletClient } from '@geoprotocol/geo-sdk';
|
|
419
|
+
|
|
420
|
+
// Contract addresses for testnet
|
|
421
|
+
const SPACE_REGISTRY_ADDRESS = '0xB01683b2f0d38d43fcD4D9aAB980166988924132' as const;
|
|
422
|
+
const EMPTY_SPACE_ID = '0x00000000000000000000000000000000' as Hex;
|
|
423
|
+
const EDITS_PUBLISHED = keccak256(toHex('GOVERNANCE.EDITS_PUBLISHED'));
|
|
424
|
+
|
|
425
|
+
// IMPORTANT: Be careful with your private key. Don't commit it to version control.
|
|
426
|
+
// You can get your private key using https://www.geobrowser.io/export-wallet
|
|
427
|
+
const addressPrivateKey = '0xTODO' as `0x${string}`;
|
|
428
|
+
const { address } = privateKeyToAccount(addressPrivateKey);
|
|
429
|
+
|
|
430
|
+
// Take the address and enter it in Faucet to get some testnet ETH https://faucet.conduit.xyz/geo-test-zc16z3tcvf
|
|
431
|
+
|
|
432
|
+
// Get wallet client for testnet
|
|
433
|
+
const walletClient = await getWalletClient({
|
|
434
|
+
privateKey: addressPrivateKey,
|
|
435
|
+
});
|
|
436
|
+
|
|
437
|
+
const account = walletClient.account;
|
|
438
|
+
const rpcUrl = walletClient.chain?.rpcUrls?.default?.http?.[0];
|
|
439
|
+
|
|
440
|
+
const publicClient = createPublicClient({
|
|
441
|
+
transport: http(rpcUrl),
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
// Check if a personal space already exists for this address
|
|
445
|
+
let spaceIdHex = await publicClient.readContract({
|
|
446
|
+
address: SPACE_REGISTRY_ADDRESS,
|
|
447
|
+
abi: SpaceRegistryAbi,
|
|
448
|
+
functionName: 'addressToSpaceId',
|
|
449
|
+
args: [account.address],
|
|
450
|
+
}) as Hex;
|
|
451
|
+
|
|
452
|
+
// Create a personal space if one doesn't exist
|
|
453
|
+
if (spaceIdHex.toLowerCase() === EMPTY_SPACE_ID.toLowerCase()) {
|
|
454
|
+
console.log('Creating personal space...');
|
|
455
|
+
|
|
456
|
+
const createSpaceTxHash = await walletClient.sendTransaction({
|
|
457
|
+
account: walletClient.account,
|
|
458
|
+
to: SPACE_REGISTRY_ADDRESS,
|
|
459
|
+
value: 0n,
|
|
460
|
+
data: encodeFunctionData({
|
|
461
|
+
abi: SpaceRegistryAbi,
|
|
462
|
+
functionName: 'registerSpaceId',
|
|
463
|
+
args: [
|
|
464
|
+
keccak256(toHex('EOA_SPACE')), // _type
|
|
465
|
+
encodeAbiParameters([{ type: 'string' }], ['1.0.0']), // _version
|
|
466
|
+
],
|
|
467
|
+
}),
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
await publicClient.waitForTransactionReceipt({ hash: createSpaceTxHash });
|
|
471
|
+
|
|
472
|
+
// Re-fetch the space ID after creation
|
|
473
|
+
spaceIdHex = await publicClient.readContract({
|
|
474
|
+
address: SPACE_REGISTRY_ADDRESS,
|
|
475
|
+
abi: SpaceRegistryAbi,
|
|
476
|
+
functionName: 'addressToSpaceId',
|
|
477
|
+
args: [account.address],
|
|
478
|
+
}) as Hex;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
// Convert bytes16 hex to UUID string (without dashes)
|
|
482
|
+
const spaceId = spaceIdHex.slice(2, 34).toLowerCase();
|
|
483
|
+
console.log('spaceId', spaceId);
|
|
484
|
+
|
|
485
|
+
// Create an entity with some data
|
|
486
|
+
const { ops, id: entityId } = Graph.createEntity({
|
|
487
|
+
name: 'Test Entity',
|
|
488
|
+
description: 'Created via SDK',
|
|
489
|
+
});
|
|
490
|
+
console.log('entityId', entityId);
|
|
491
|
+
|
|
492
|
+
// Publish the edit to IPFS
|
|
493
|
+
const { cid, editId } = await Ipfs.publishEdit({
|
|
494
|
+
name: 'Test Edit',
|
|
495
|
+
ops,
|
|
496
|
+
author: account.address,
|
|
497
|
+
network: 'TESTNET',
|
|
498
|
+
});
|
|
499
|
+
console.log('cid', cid);
|
|
500
|
+
console.log('editId', editId);
|
|
501
|
+
|
|
502
|
+
// Publish edit on-chain via SpaceRegistry.enter(...)
|
|
503
|
+
const enterData = encodeAbiParameters([{ type: 'string' }], [cid]);
|
|
504
|
+
|
|
505
|
+
const calldata = encodeFunctionData({
|
|
506
|
+
abi: SpaceRegistryAbi,
|
|
507
|
+
functionName: 'enter',
|
|
508
|
+
args: [
|
|
509
|
+
spaceIdHex, // fromSpaceId (bytes16)
|
|
510
|
+
spaceIdHex, // toSpaceId (bytes16)
|
|
511
|
+
EDITS_PUBLISHED, // action
|
|
512
|
+
'0x0000000000000000000000000000000000000000000000000000000000000000' as Hex, // topic
|
|
513
|
+
enterData, // data
|
|
514
|
+
'0x' as Hex, // signature (empty for direct calls)
|
|
515
|
+
],
|
|
516
|
+
});
|
|
517
|
+
|
|
518
|
+
const publishTxHash = await walletClient.sendTransaction({
|
|
519
|
+
account: walletClient.account,
|
|
520
|
+
to: SPACE_REGISTRY_ADDRESS,
|
|
521
|
+
value: 0n,
|
|
522
|
+
data: calldata,
|
|
523
|
+
});
|
|
524
|
+
console.log('publishTxHash', publishTxHash);
|
|
525
|
+
|
|
526
|
+
const publishReceipt = await publicClient.waitForTransactionReceipt({ hash: publishTxHash });
|
|
527
|
+
console.log('Successfully published edit to space', spaceId);
|
|
528
|
+
```
|
package/dist/abis.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../abis.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,qBAAqB,CAAC"}
|
package/dist/abis.js
ADDED
package/dist/abis.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abis.js","sourceRoot":"","sources":["../abis.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,4BAA4B,QAA8C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides common constants used in the knowledge graph.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.0.6
|
|
5
|
+
*/
|
|
6
|
+
import { Position, PositionRange } from './src/position.js';
|
|
7
|
+
export const INITIAL_RELATION_INDEX_VALUE = Position.createBetween(PositionRange.FIRST);
|
|
8
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,CAAC,MAAM,4BAA4B,GAAG,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides the known contract addresses for smart contracts
|
|
3
|
+
* used in the knowledge graph.
|
|
4
|
+
*
|
|
5
|
+
* @since 0.0.6
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Mainnet contract addresses
|
|
9
|
+
*/
|
|
10
|
+
export declare const MAINNET: {
|
|
11
|
+
readonly SPACE_PLUGIN_REPO_ADDRESS: "0xd9559df98e4103CDf0A119d4bff1537B383E462c";
|
|
12
|
+
readonly PERSONAL_SPACE_ADMIN_PLUGIN_REPO_ADDRESS: "0xa00870c6501349E126E71Dc1705fBaa2B5aeac0d";
|
|
13
|
+
readonly GOVERNANCE_PLUGIN_REPO_ADDRESS: "0x81A45db7E303eED5D8e0B84b39d96DBa23192Eab";
|
|
14
|
+
readonly DAO_FACTORY_ADDRESS: "0x9012fcc278a860B66e644cE491a1CbabFBb34a72";
|
|
15
|
+
readonly ENS_REGISTRY_ADDRESS: "0x81C575f78903F8aC1FD73dEC06d20ffdC51c9b4E";
|
|
16
|
+
readonly PLUGIN_SETUP_PROCESSOR_ADDRESS: "0xfcC0Aba63c1F1f887099EAB0d1A624A5B7A82Fc2";
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Testnet contract addresses
|
|
20
|
+
*/
|
|
21
|
+
export declare const TESTNET: {
|
|
22
|
+
readonly SPACE_PLUGIN_REPO_ADDRESS: "0xE6eE188B3CDfBCA60152B1cC99BAafCf83bE57BE";
|
|
23
|
+
readonly PERSONAL_SPACE_ADMIN_PLUGIN_REPO_ADDRESS: "0xc368129A081aE3d3dbB0C6DeC408FbB097b73aE2";
|
|
24
|
+
readonly GOVERNANCE_PLUGIN_REPO_ADDRESS: "0x94A8FB48258E1094aa71fBc9F33196B7A9fFfb4f";
|
|
25
|
+
readonly DAO_FACTORY_ADDRESS: "0xb138AE700C352BB1aC75688e8ceCB98CDDaa7F09";
|
|
26
|
+
readonly DAO_SPACE_FACTORY_ADDRESS: "0x19f56F9Ed2c2ED2B5884668E392DcA4396F7feBd";
|
|
27
|
+
readonly ENS_REGISTRY_ADDRESS: "0xD065A680075d0e27777bAa63CFFf17e1713a19Df";
|
|
28
|
+
readonly PLUGIN_SETUP_PROCESSOR_ADDRESS: "0x3C9be4b42B313318091344A261DCDCd02DCd5736";
|
|
29
|
+
readonly SPACE_REGISTRY_ADDRESS: "0xB01683b2f0d38d43fcD4D9aAB980166988924132";
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../contracts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,OAAO;;;;;;;CAOV,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,OAAO;;;;;;;;;CASV,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides the known contract addresses for smart contracts
|
|
3
|
+
* used in the knowledge graph.
|
|
4
|
+
*
|
|
5
|
+
* @since 0.0.6
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Mainnet contract addresses
|
|
9
|
+
*/
|
|
10
|
+
export const MAINNET = {
|
|
11
|
+
SPACE_PLUGIN_REPO_ADDRESS: '0xd9559df98e4103CDf0A119d4bff1537B383E462c',
|
|
12
|
+
PERSONAL_SPACE_ADMIN_PLUGIN_REPO_ADDRESS: '0xa00870c6501349E126E71Dc1705fBaa2B5aeac0d',
|
|
13
|
+
GOVERNANCE_PLUGIN_REPO_ADDRESS: '0x81A45db7E303eED5D8e0B84b39d96DBa23192Eab',
|
|
14
|
+
DAO_FACTORY_ADDRESS: '0x9012fcc278a860B66e644cE491a1CbabFBb34a72',
|
|
15
|
+
ENS_REGISTRY_ADDRESS: '0x81C575f78903F8aC1FD73dEC06d20ffdC51c9b4E',
|
|
16
|
+
PLUGIN_SETUP_PROCESSOR_ADDRESS: '0xfcC0Aba63c1F1f887099EAB0d1A624A5B7A82Fc2',
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Testnet contract addresses
|
|
20
|
+
*/
|
|
21
|
+
export const TESTNET = {
|
|
22
|
+
SPACE_PLUGIN_REPO_ADDRESS: '0xE6eE188B3CDfBCA60152B1cC99BAafCf83bE57BE',
|
|
23
|
+
PERSONAL_SPACE_ADMIN_PLUGIN_REPO_ADDRESS: '0xc368129A081aE3d3dbB0C6DeC408FbB097b73aE2',
|
|
24
|
+
GOVERNANCE_PLUGIN_REPO_ADDRESS: '0x94A8FB48258E1094aa71fBc9F33196B7A9fFfb4f',
|
|
25
|
+
DAO_FACTORY_ADDRESS: '0xb138AE700C352BB1aC75688e8ceCB98CDDaa7F09',
|
|
26
|
+
DAO_SPACE_FACTORY_ADDRESS: '0x19f56F9Ed2c2ED2B5884668E392DcA4396F7feBd',
|
|
27
|
+
ENS_REGISTRY_ADDRESS: '0xD065A680075d0e27777bAa63CFFf17e1713a19Df',
|
|
28
|
+
PLUGIN_SETUP_PROCESSOR_ADDRESS: '0x3C9be4b42B313318091344A261DCDCd02DCd5736',
|
|
29
|
+
SPACE_REGISTRY_ADDRESS: '0xB01683b2f0d38d43fcD4D9aAB980166988924132',
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=contracts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../contracts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,yBAAyB,EAAE,4CAA4C;IACvE,wCAAwC,EAAE,4CAA4C;IACtF,8BAA8B,EAAE,4CAA4C;IAC5E,mBAAmB,EAAE,4CAA4C;IACjE,oBAAoB,EAAE,4CAA4C;IAClE,8BAA8B,EAAE,4CAA4C;CACpE,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,yBAAyB,EAAE,4CAA4C;IACvE,wCAAwC,EAAE,4CAA4C;IACtF,8BAA8B,EAAE,4CAA4C;IAC5E,mBAAmB,EAAE,4CAA4C;IACjE,yBAAyB,EAAE,4CAA4C;IACvE,oBAAoB,EAAE,4CAA4C;IAClE,8BAA8B,EAAE,4CAA4C;IAC5E,sBAAsB,EAAE,4CAA4C;CAC5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-ids.d.ts","sourceRoot":"","sources":["../convert-ids.ts"],"names":[],"mappings":""}
|