@geoprotocol/geo-sdk 0.5.0 → 0.6.0
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/scripts/test-publish.d.ts +6 -0
- package/dist/scripts/test-publish.d.ts.map +1 -0
- package/dist/scripts/test-publish.js +121 -0
- package/dist/scripts/test-publish.js.map +1 -0
- package/dist/src/personal-space/publish-edit.d.ts.map +1 -1
- package/dist/src/personal-space/publish-edit.js +5 -2
- package/dist/src/personal-space/publish-edit.js.map +1 -1
- package/package.json +1 -1
- package/dist/constants.d.ts +0 -7
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -8
- package/dist/constants.js.map +0 -1
- package/dist/convert-ids.d.ts +0 -2
- package/dist/convert-ids.d.ts.map +0 -1
- package/dist/convert-ids.js +0 -42
- package/dist/convert-ids.js.map +0 -1
- package/dist/protov2.d.ts +0 -11
- package/dist/protov2.d.ts.map +0 -1
- package/dist/protov2.js +0 -11
- package/dist/protov2.js.map +0 -1
- package/dist/src/codec/convert.d.ts +0 -18
- package/dist/src/codec/convert.d.ts.map +0 -1
- package/dist/src/codec/convert.js +0 -188
- package/dist/src/codec/convert.js.map +0 -1
- package/dist/src/core/blocks/image.d.ts +0 -15
- package/dist/src/core/blocks/image.d.ts.map +0 -1
- package/dist/src/core/blocks/image.js +0 -15
- package/dist/src/core/blocks/image.js.map +0 -1
- package/dist/src/core/idsv2/content.d.ts +0 -59
- package/dist/src/core/idsv2/content.d.ts.map +0 -1
- package/dist/src/core/idsv2/content.js +0 -59
- package/dist/src/core/idsv2/content.js.map +0 -1
- package/dist/src/core/idsv2/network.d.ts +0 -5
- package/dist/src/core/idsv2/network.d.ts.map +0 -1
- package/dist/src/core/idsv2/network.js +0 -5
- package/dist/src/core/idsv2/network.js.map +0 -1
- package/dist/src/core/idsv2/system.d.ts +0 -222
- package/dist/src/core/idsv2/system.d.ts.map +0 -1
- package/dist/src/core/idsv2/system.js +0 -230
- package/dist/src/core/idsv2/system.js.map +0 -1
- package/dist/src/core/image.d.ts +0 -40
- package/dist/src/core/image.d.ts.map +0 -1
- package/dist/src/core/image.js +0 -76
- package/dist/src/core/image.js.map +0 -1
- package/dist/src/core/image.test.d.ts +0 -2
- package/dist/src/core/image.test.d.ts.map +0 -1
- package/dist/src/core/image.test.js +0 -52
- package/dist/src/core/image.test.js.map +0 -1
- package/dist/src/core/relation.d.ts +0 -88
- package/dist/src/core/relation.d.ts.map +0 -1
- package/dist/src/core/relation.js +0 -89
- package/dist/src/core/relation.js.map +0 -1
- package/dist/src/core/relation.test.d.ts +0 -2
- package/dist/src/core/relation.test.d.ts.map +0 -1
- package/dist/src/core/relation.test.js +0 -45
- package/dist/src/core/relation.test.js.map +0 -1
- package/dist/src/core/triple.d.ts +0 -50
- package/dist/src/core/triple.d.ts.map +0 -1
- package/dist/src/core/triple.js +0 -56
- package/dist/src/core/triple.js.map +0 -1
- package/dist/src/core/triple.test.d.ts +0 -2
- package/dist/src/core/triple.test.d.ts.map +0 -1
- package/dist/src/core/triple.test.js +0 -37
- package/dist/src/core/triple.test.js.map +0 -1
- package/dist/src/encodings/get-register-space-calldata.d.ts +0 -32
- package/dist/src/encodings/get-register-space-calldata.d.ts.map +0 -1
- package/dist/src/encodings/get-register-space-calldata.js +0 -39
- package/dist/src/encodings/get-register-space-calldata.js.map +0 -1
- package/dist/src/encodings/get-register-space-calldata.test.d.ts +0 -2
- package/dist/src/encodings/get-register-space-calldata.test.d.ts.map +0 -1
- package/dist/src/encodings/get-register-space-calldata.test.js +0 -15
- package/dist/src/encodings/get-register-space-calldata.test.js.map +0 -1
- package/dist/src/graph/graph.test.d.ts +0 -2
- package/dist/src/graph/graph.test.d.ts.map +0 -1
- package/dist/src/graph/graph.test.js +0 -46
- package/dist/src/graph/graph.test.js.map +0 -1
- package/dist/src/graph/helpers/create-default-properties.d.ts +0 -5
- package/dist/src/graph/helpers/create-default-properties.d.ts.map +0 -1
- package/dist/src/graph/helpers/create-default-properties.js +0 -44
- package/dist/src/graph/helpers/create-default-properties.js.map +0 -1
- package/dist/src/graph/helpers/create-properties.d.ts +0 -8
- package/dist/src/graph/helpers/create-properties.d.ts.map +0 -1
- package/dist/src/graph/helpers/create-properties.js +0 -53
- package/dist/src/graph/helpers/create-properties.js.map +0 -1
- package/dist/src/graph/serialize.d.ts +0 -5
- package/dist/src/graph/serialize.d.ts.map +0 -1
- package/dist/src/graph/serialize.js +0 -13
- package/dist/src/graph/serialize.js.map +0 -1
- package/dist/src/graph/serialize.test.d.ts +0 -2
- package/dist/src/graph/serialize.test.d.ts.map +0 -1
- package/dist/src/graph/serialize.test.js +0 -49
- package/dist/src/graph/serialize.test.js.map +0 -1
- package/dist/src/graph/unset-entity-values.d.ts +0 -21
- package/dist/src/graph/unset-entity-values.d.ts.map +0 -1
- package/dist/src/graph/unset-entity-values.js +0 -31
- package/dist/src/graph/unset-entity-values.js.map +0 -1
- package/dist/src/graph/unset-entity-values.test.d.ts +0 -2
- package/dist/src/graph/unset-entity-values.test.d.ts.map +0 -1
- package/dist/src/graph/unset-entity-values.test.js +0 -40
- package/dist/src/graph/unset-entity-values.test.js.map +0 -1
- package/dist/src/graph/unset-relation-fields.d.ts +0 -26
- package/dist/src/graph/unset-relation-fields.d.ts.map +0 -1
- package/dist/src/graph/unset-relation-fields.js +0 -38
- package/dist/src/graph/unset-relation-fields.js.map +0 -1
- package/dist/src/graph/unset-relation-fields.test.d.ts +0 -2
- package/dist/src/graph/unset-relation-fields.test.d.ts.map +0 -1
- package/dist/src/graph/unset-relation-fields.test.js +0 -70
- package/dist/src/graph/unset-relation-fields.test.js.map +0 -1
- package/dist/src/graphv2/constants.d.ts +0 -2
- package/dist/src/graphv2/constants.d.ts.map +0 -1
- package/dist/src/graphv2/constants.js +0 -2
- package/dist/src/graphv2/constants.js.map +0 -1
- package/dist/src/graphv2/create-entity.d.ts +0 -52
- package/dist/src/graphv2/create-entity.d.ts.map +0 -1
- package/dist/src/graphv2/create-entity.js +0 -140
- package/dist/src/graphv2/create-entity.js.map +0 -1
- package/dist/src/graphv2/create-entity.test.d.ts +0 -2
- package/dist/src/graphv2/create-entity.test.d.ts.map +0 -1
- package/dist/src/graphv2/create-entity.test.js +0 -158
- package/dist/src/graphv2/create-entity.test.js.map +0 -1
- package/dist/src/graphv2/create-image.d.ts +0 -28
- package/dist/src/graphv2/create-image.d.ts.map +0 -1
- package/dist/src/graphv2/create-image.js +0 -71
- package/dist/src/graphv2/create-image.js.map +0 -1
- package/dist/src/graphv2/create-image.test.d.ts +0 -2
- package/dist/src/graphv2/create-image.test.d.ts.map +0 -1
- package/dist/src/graphv2/create-image.test.js +0 -142
- package/dist/src/graphv2/create-image.test.js.map +0 -1
- package/dist/src/graphv2/create-property.d.ts +0 -22
- package/dist/src/graphv2/create-property.d.ts.map +0 -1
- package/dist/src/graphv2/create-property.js +0 -129
- package/dist/src/graphv2/create-property.js.map +0 -1
- package/dist/src/graphv2/create-property.test.d.ts +0 -2
- package/dist/src/graphv2/create-property.test.d.ts.map +0 -1
- package/dist/src/graphv2/create-property.test.js +0 -82
- package/dist/src/graphv2/create-property.test.js.map +0 -1
- package/dist/src/graphv2/create-relation.d.ts +0 -33
- package/dist/src/graphv2/create-relation.d.ts.map +0 -1
- package/dist/src/graphv2/create-relation.js +0 -66
- package/dist/src/graphv2/create-relation.js.map +0 -1
- package/dist/src/graphv2/create-relation.test.d.ts +0 -2
- package/dist/src/graphv2/create-relation.test.d.ts.map +0 -1
- package/dist/src/graphv2/create-relation.test.js +0 -208
- package/dist/src/graphv2/create-relation.test.js.map +0 -1
- package/dist/src/graphv2/create-space.d.ts +0 -13
- package/dist/src/graphv2/create-space.d.ts.map +0 -1
- package/dist/src/graphv2/create-space.js +0 -21
- package/dist/src/graphv2/create-space.js.map +0 -1
- package/dist/src/graphv2/create-type.d.ts +0 -22
- package/dist/src/graphv2/create-type.d.ts.map +0 -1
- package/dist/src/graphv2/create-type.js +0 -64
- package/dist/src/graphv2/create-type.js.map +0 -1
- package/dist/src/graphv2/create-type.test.d.ts +0 -2
- package/dist/src/graphv2/create-type.test.d.ts.map +0 -1
- package/dist/src/graphv2/create-type.test.js +0 -109
- package/dist/src/graphv2/create-type.test.js.map +0 -1
- package/dist/src/graphv2/delete-entity.d.ts +0 -14
- package/dist/src/graphv2/delete-entity.d.ts.map +0 -1
- package/dist/src/graphv2/delete-entity.js +0 -21
- package/dist/src/graphv2/delete-entity.js.map +0 -1
- package/dist/src/graphv2/delete-entity.test.d.ts +0 -2
- package/dist/src/graphv2/delete-entity.test.d.ts.map +0 -1
- package/dist/src/graphv2/delete-entity.test.js +0 -24
- package/dist/src/graphv2/delete-entity.test.js.map +0 -1
- package/dist/src/graphv2/delete-relation.d.ts +0 -14
- package/dist/src/graphv2/delete-relation.d.ts.map +0 -1
- package/dist/src/graphv2/delete-relation.js +0 -21
- package/dist/src/graphv2/delete-relation.js.map +0 -1
- package/dist/src/graphv2/delete-relation.test.d.ts +0 -2
- package/dist/src/graphv2/delete-relation.test.d.ts.map +0 -1
- package/dist/src/graphv2/delete-relation.test.js +0 -24
- package/dist/src/graphv2/delete-relation.test.js.map +0 -1
- package/dist/src/graphv2/index.d.ts +0 -12
- package/dist/src/graphv2/index.d.ts.map +0 -1
- package/dist/src/graphv2/index.js +0 -12
- package/dist/src/graphv2/index.js.map +0 -1
- package/dist/src/graphv2/remove-entity-properties.d.ts +0 -25
- package/dist/src/graphv2/remove-entity-properties.d.ts.map +0 -1
- package/dist/src/graphv2/remove-entity-properties.js +0 -24
- package/dist/src/graphv2/remove-entity-properties.js.map +0 -1
- package/dist/src/graphv2/unset-entity-values.d.ts +0 -21
- package/dist/src/graphv2/unset-entity-values.d.ts.map +0 -1
- package/dist/src/graphv2/unset-entity-values.js +0 -26
- package/dist/src/graphv2/unset-entity-values.js.map +0 -1
- package/dist/src/graphv2/unset-entity-values.test.d.ts +0 -2
- package/dist/src/graphv2/unset-entity-values.test.d.ts.map +0 -1
- package/dist/src/graphv2/unset-entity-values.test.js +0 -40
- package/dist/src/graphv2/unset-entity-values.test.js.map +0 -1
- package/dist/src/graphv2/unset-relation-fields.d.ts +0 -25
- package/dist/src/graphv2/unset-relation-fields.d.ts.map +0 -1
- package/dist/src/graphv2/unset-relation-fields.js +0 -34
- package/dist/src/graphv2/unset-relation-fields.js.map +0 -1
- package/dist/src/graphv2/unset-relation-fields.test.d.ts +0 -2
- package/dist/src/graphv2/unset-relation-fields.test.d.ts.map +0 -1
- package/dist/src/graphv2/unset-relation-fields.test.js +0 -64
- package/dist/src/graphv2/unset-relation-fields.test.js.map +0 -1
- package/dist/src/graphv2/update-entity.d.ts +0 -28
- package/dist/src/graphv2/update-entity.d.ts.map +0 -1
- package/dist/src/graphv2/update-entity.js +0 -73
- package/dist/src/graphv2/update-entity.js.map +0 -1
- package/dist/src/graphv2/update-entity.test.d.ts +0 -2
- package/dist/src/graphv2/update-entity.test.d.ts.map +0 -1
- package/dist/src/graphv2/update-entity.test.js +0 -116
- package/dist/src/graphv2/update-entity.test.js.map +0 -1
- package/dist/src/graphv2/update-relation.d.ts +0 -21
- package/dist/src/graphv2/update-relation.d.ts.map +0 -1
- package/dist/src/graphv2/update-relation.js +0 -37
- package/dist/src/graphv2/update-relation.js.map +0 -1
- package/dist/src/idv2.d.ts +0 -27
- package/dist/src/idv2.d.ts.map +0 -1
- package/dist/src/idv2.js +0 -88
- package/dist/src/idv2.js.map +0 -1
- package/dist/src/idv2.test.d.ts +0 -2
- package/dist/src/idv2.test.d.ts.map +0 -1
- package/dist/src/idv2.test.js +0 -26
- package/dist/src/idv2.test.js.map +0 -1
- package/dist/src/image.d.ts +0 -8
- package/dist/src/image.d.ts.map +0 -1
- package/dist/src/image.js +0 -8
- package/dist/src/image.js.map +0 -1
- package/dist/src/ipfsv2.d.ts +0 -96
- package/dist/src/ipfsv2.d.ts.map +0 -1
- package/dist/src/ipfsv2.js +0 -163
- package/dist/src/ipfsv2.js.map +0 -1
- package/dist/src/ipfsv2.test.d.ts +0 -2
- package/dist/src/ipfsv2.test.d.ts.map +0 -1
- package/dist/src/ipfsv2.test.js +0 -22
- package/dist/src/ipfsv2.test.js.map +0 -1
- package/dist/src/proto/edit.d.ts +0 -11
- package/dist/src/proto/edit.d.ts.map +0 -1
- package/dist/src/proto/edit.js +0 -210
- package/dist/src/proto/edit.js.map +0 -1
- package/dist/src/proto/edit.test.d.ts +0 -2
- package/dist/src/proto/edit.test.d.ts.map +0 -1
- package/dist/src/proto/edit.test.js +0 -326
- package/dist/src/proto/edit.test.js.map +0 -1
- package/dist/src/proto/editv2.d.ts +0 -11
- package/dist/src/proto/editv2.d.ts.map +0 -1
- package/dist/src/proto/editv2.js +0 -81
- package/dist/src/proto/editv2.js.map +0 -1
- package/dist/src/proto/editv2.test.d.ts +0 -2
- package/dist/src/proto/editv2.test.d.ts.map +0 -1
- package/dist/src/proto/editv2.test.js +0 -211
- package/dist/src/proto/editv2.test.js.map +0 -1
- package/dist/src/proto/gen/src/proto/ipfs_pb.d.ts +0 -530
- package/dist/src/proto/gen/src/proto/ipfs_pb.d.ts.map +0 -1
- package/dist/src/proto/gen/src/proto/ipfs_pb.js +0 -706
- package/dist/src/proto/gen/src/proto/ipfs_pb.js.map +0 -1
- package/dist/src/proto/gen/src/proto/ipfsv2_pb.d.ts +0 -410
- package/dist/src/proto/gen/src/proto/ipfsv2_pb.d.ts.map +0 -1
- package/dist/src/proto/gen/src/proto/ipfsv2_pb.js +0 -536
- package/dist/src/proto/gen/src/proto/ipfsv2_pb.js.map +0 -1
- package/dist/src/relation.d.ts +0 -7
- package/dist/src/relation.d.ts.map +0 -1
- package/dist/src/relation.js +0 -7
- package/dist/src/relation.js.map +0 -1
- package/dist/src/smart-wallet-2.test-invalid.d.ts +0 -2
- package/dist/src/smart-wallet-2.test-invalid.d.ts.map +0 -1
- package/dist/src/smart-wallet-2.test-invalid.js +0 -49
- package/dist/src/smart-wallet-2.test-invalid.js.map +0 -1
- package/dist/src/smart-wallet-2.test.d.ts +0 -2
- package/dist/src/smart-wallet-2.test.d.ts.map +0 -1
- package/dist/src/smart-wallet-2.test.js +0 -49
- package/dist/src/smart-wallet-2.test.js.map +0 -1
- package/dist/src/system-ids-v2.d.ts +0 -7
- package/dist/src/system-ids-v2.d.ts.map +0 -1
- package/dist/src/system-ids-v2.js +0 -7
- package/dist/src/system-ids-v2.js.map +0 -1
- package/dist/src/triple.d.ts +0 -7
- package/dist/src/triple.d.ts.map +0 -1
- package/dist/src/triple.js +0 -7
- package/dist/src/triple.js.map +0 -1
- package/dist/src/types-backup.d.ts +0 -134
- package/dist/src/types-backup.d.ts.map +0 -1
- package/dist/src/types-backup.js +0 -13
- package/dist/src/types-backup.js.map +0 -1
- package/dist/src/typesv2.d.ts +0 -173
- package/dist/src/typesv2.d.ts.map +0 -1
- package/dist/src/typesv2.js +0 -8
- package/dist/src/typesv2.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-publish.d.ts","sourceRoot":"","sources":["../../scripts/test-publish.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test script to verify publish-edit encoding fix.
|
|
3
|
+
* Uses smart account for gas sponsorship on Geo testnet (L3).
|
|
4
|
+
*/
|
|
5
|
+
import { personalSpace, Graph } from '../index.js';
|
|
6
|
+
import { createPublicClient, http } from 'viem';
|
|
7
|
+
import { createSmartAccountClient } from 'permissionless';
|
|
8
|
+
import { toSafeSmartAccount } from 'permissionless/accounts';
|
|
9
|
+
import { createPimlicoClient } from 'permissionless/clients/pimlico';
|
|
10
|
+
import { entryPoint07Address } from 'viem/account-abstraction';
|
|
11
|
+
import { privateKeyToAccount } from 'viem/accounts';
|
|
12
|
+
const SPACE_ID = '7fc1dc5b76b8b69624b9abc6c7978c00';
|
|
13
|
+
const PIMLICO_API_KEY = 'pim_KqHm63txxhbCYjdDaWaHqH';
|
|
14
|
+
const TESTNET_RPC_URL = 'https://rpc-geo-test-zc16z3tcvf.t.conduit.xyz';
|
|
15
|
+
const TESTNET_CHAIN_ID = 19411;
|
|
16
|
+
// Custom Safe contract addresses deployed on Geo testnet
|
|
17
|
+
const TESTNET_SAFE_ADDRESSES = {
|
|
18
|
+
safeModuleSetupAddress: "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
|
|
19
|
+
safe4337ModuleAddress: "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
|
|
20
|
+
safeProxyFactoryAddress: "0xd9d2Ba03a7754250FDD71333F444636471CACBC4",
|
|
21
|
+
safeSingletonAddress: "0x639245e8476E03e789a244f279b5843b9633b2E7",
|
|
22
|
+
multiSendAddress: "0x7B21BBDBdE8D01Df591fdc2dc0bE9956Dde1e16C",
|
|
23
|
+
multiSendCallOnlyAddress: "0x32228dDEA8b9A2bd7f2d71A958fF241D79ca5eEC",
|
|
24
|
+
};
|
|
25
|
+
// Define Geo testnet chain
|
|
26
|
+
const geoTestnet = {
|
|
27
|
+
id: TESTNET_CHAIN_ID,
|
|
28
|
+
name: 'Geo Testnet',
|
|
29
|
+
nativeCurrency: {
|
|
30
|
+
name: 'Ethereum',
|
|
31
|
+
symbol: 'ETH',
|
|
32
|
+
decimals: 18,
|
|
33
|
+
},
|
|
34
|
+
rpcUrls: {
|
|
35
|
+
default: { http: [TESTNET_RPC_URL] },
|
|
36
|
+
public: { http: [TESTNET_RPC_URL] },
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
async function main() {
|
|
40
|
+
const privateKey = process.env.GEO_PRIVATE_KEY || process.env.PRIVATE_KEY;
|
|
41
|
+
if (!privateKey) {
|
|
42
|
+
console.error('Set GEO_PRIVATE_KEY or PRIVATE_KEY environment variable');
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
const account = privateKeyToAccount(privateKey);
|
|
46
|
+
console.log('EOA address:', account.address);
|
|
47
|
+
const publicClient = createPublicClient({
|
|
48
|
+
chain: geoTestnet,
|
|
49
|
+
transport: http(TESTNET_RPC_URL),
|
|
50
|
+
});
|
|
51
|
+
const safeAccount = await toSafeSmartAccount({
|
|
52
|
+
client: publicClient,
|
|
53
|
+
owners: [account],
|
|
54
|
+
entryPoint: {
|
|
55
|
+
address: entryPoint07Address,
|
|
56
|
+
version: '0.7',
|
|
57
|
+
},
|
|
58
|
+
version: '1.4.1',
|
|
59
|
+
...TESTNET_SAFE_ADDRESSES,
|
|
60
|
+
});
|
|
61
|
+
console.log('Smart account address:', safeAccount.address);
|
|
62
|
+
const bundlerUrl = `https://api.pimlico.io/v2/${TESTNET_CHAIN_ID}/rpc?apikey=${PIMLICO_API_KEY}`;
|
|
63
|
+
const paymasterClient = createPimlicoClient({
|
|
64
|
+
transport: http(bundlerUrl),
|
|
65
|
+
chain: geoTestnet,
|
|
66
|
+
entryPoint: {
|
|
67
|
+
address: entryPoint07Address,
|
|
68
|
+
version: '0.7',
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
const smartAccountClient = createSmartAccountClient({
|
|
72
|
+
chain: geoTestnet,
|
|
73
|
+
account: safeAccount,
|
|
74
|
+
paymaster: paymasterClient,
|
|
75
|
+
bundlerTransport: http(bundlerUrl),
|
|
76
|
+
userOperation: {
|
|
77
|
+
estimateFeesPerGas: async () => {
|
|
78
|
+
return (await paymasterClient.getUserOperationGasPrice()).fast;
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
const { id, ops } = Graph.createEntity({
|
|
83
|
+
name: 'SDK Test Entity ' + Date.now(),
|
|
84
|
+
types: [],
|
|
85
|
+
});
|
|
86
|
+
console.log('Created entity:', id);
|
|
87
|
+
console.log('\nPublishing to IPFS...');
|
|
88
|
+
const { editId, cid, to, calldata } = await personalSpace.publishEdit({
|
|
89
|
+
name: 'Test publish from SDK',
|
|
90
|
+
spaceId: SPACE_ID,
|
|
91
|
+
ops,
|
|
92
|
+
author: safeAccount.address,
|
|
93
|
+
network: 'TESTNET',
|
|
94
|
+
});
|
|
95
|
+
console.log('Edit ID:', editId);
|
|
96
|
+
console.log('CID:', cid);
|
|
97
|
+
console.log('Contract (to):', to);
|
|
98
|
+
console.log('\nSending transaction via smart account...');
|
|
99
|
+
const hash = await smartAccountClient.sendTransaction({
|
|
100
|
+
to,
|
|
101
|
+
data: calldata,
|
|
102
|
+
});
|
|
103
|
+
console.log('Transaction hash:', hash);
|
|
104
|
+
console.log('\nWaiting for transaction receipt...');
|
|
105
|
+
const receipt = await publicClient.waitForTransactionReceipt({ hash });
|
|
106
|
+
console.log('Receipt status:', receipt.status);
|
|
107
|
+
console.log('Block number:', receipt.blockNumber);
|
|
108
|
+
if (receipt.status === 'success') {
|
|
109
|
+
console.log('\n✅ Transaction confirmed!');
|
|
110
|
+
console.log('Edit ID:', editId);
|
|
111
|
+
console.log('CID:', cid);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
console.log('\n❌ Transaction reverted!');
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
main().catch(err => {
|
|
118
|
+
console.error('Error:', err.message || err);
|
|
119
|
+
process.exit(1);
|
|
120
|
+
});
|
|
121
|
+
//# sourceMappingURL=test-publish.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-publish.js","sourceRoot":"","sources":["../../scripts/test-publish.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAc,MAAM,MAAM,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EA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B,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,CAAC;IAC5C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-edit.d.ts","sourceRoot":"","sources":["../../../src/personal-space/publish-edit.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAsBvE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"publish-edit.d.ts","sourceRoot":"","sources":["../../../src/personal-space/publish-edit.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAsBvE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA4BvF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { encodeAbiParameters, encodeFunctionData, toHex } from 'viem';
|
|
2
2
|
import { TESTNET } from '../../contracts.js';
|
|
3
3
|
import { SpaceRegistryAbi } from '../abis/index.js';
|
|
4
4
|
import { isValid } from '../id.js';
|
|
@@ -58,10 +58,13 @@ export async function publishEdit(params) {
|
|
|
58
58
|
author,
|
|
59
59
|
network,
|
|
60
60
|
});
|
|
61
|
+
// Encode the IPFS URI as ABI-encoded string (offset + length + data)
|
|
62
|
+
// The indexer expects this format to extract the CID
|
|
63
|
+
const encodedCid = encodeAbiParameters([{ type: 'string' }], [cid]);
|
|
61
64
|
const calldata = encodeFunctionData({
|
|
62
65
|
abi: SpaceRegistryAbi,
|
|
63
66
|
functionName: 'enter',
|
|
64
|
-
args: [spaceIdBytes16, spaceIdBytes16, EDITS_PUBLISHED, EMPTY_TOPIC,
|
|
67
|
+
args: [spaceIdBytes16, spaceIdBytes16, EDITS_PUBLISHED, EMPTY_TOPIC, encodedCid, EMPTY_SIGNATURE],
|
|
65
68
|
});
|
|
66
69
|
return {
|
|
67
70
|
editId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-edit.js","sourceRoot":"","sources":["../../../src/personal-space/publish-edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"publish-edit.js","sourceRoot":"","sources":["../../../src/personal-space/publish-edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG/E;;;GAGG;AACH,SAAS,gBAAgB,CAAC,OAAe;IACvC,qEAAqE;IACrE,sFAAsF;IACtF,IAAI,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,OAAO,KAAK,OAAO,CAAC,WAAW,EAAE,EAAmB,CAAC;IACvD,CAAC;IAED,0EAA0E;IAC1E,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QAC/B,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,qBAAqB,OAAO,sDAAsD,CAAC,CAAC;AACtG,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,MAAyB;IACzD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAG,SAAS,EAAE,GAAG,MAAM,CAAC;IAEnE,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAEjD,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;QAC7C,IAAI;QACJ,GAAG;QACH,MAAM;QACN,OAAO;KACR,CAAC,CAAC;IAEH,qEAAqE;IACrE,qDAAqD;IACrD,MAAM,UAAU,GAAG,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEpE,MAAM,QAAQ,GAAG,kBAAkB,CAAC;QAClC,GAAG,EAAE,gBAAgB;QACrB,YAAY,EAAE,OAAO;QACrB,IAAI,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,CAAC;KAClG,CAAC,CAAC;IAEH,OAAO;QACL,MAAM;QACN,GAAG;QACH,EAAE,EAAE,OAAO,CAAC,sBAAsB;QAClC,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
package/dist/constants.d.ts
DELETED
package/dist/constants.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,4BAA4B,QAA8C,CAAC"}
|
package/dist/constants.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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
|
package/dist/constants.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dist/convert-ids.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-ids.d.ts","sourceRoot":"","sources":["../convert-ids.ts"],"names":[],"mappings":""}
|
package/dist/convert-ids.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { readFile, writeFile } from 'node:fs/promises';
|
|
2
|
-
import { dirname, join } from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import { decodeBase58ToUUID } from './src/core/base58.js';
|
|
5
|
-
// Helper function to check if a string is a UUID
|
|
6
|
-
function isUUID(str) {
|
|
7
|
-
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
8
|
-
return uuidRegex.test(str);
|
|
9
|
-
}
|
|
10
|
-
async function convertIds() {
|
|
11
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
-
const __dirname = dirname(__filename);
|
|
13
|
-
const filePath = join(__dirname, 'src/core/idsv2/content.ts');
|
|
14
|
-
// Read the file content
|
|
15
|
-
const content = await readFile(filePath, 'utf-8');
|
|
16
|
-
// Find all Id() calls and convert them
|
|
17
|
-
const updatedContent = content.replace(/Id\(['"]([^'"]+)['"]\)/g, (match, id) => {
|
|
18
|
-
if (isUUID(id)) {
|
|
19
|
-
console.log(`Already a UUID: ${id}`);
|
|
20
|
-
return match;
|
|
21
|
-
}
|
|
22
|
-
try {
|
|
23
|
-
const uuid = decodeBase58ToUUID(id);
|
|
24
|
-
console.log(`Converting ${id} to UUID ${uuid}`);
|
|
25
|
-
return `Id('${uuid}')`;
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
if (error instanceof Error) {
|
|
29
|
-
console.error(`Error converting ${id}: ${error.message}`);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
console.error(`Error converting ${id}: Unknown error`);
|
|
33
|
-
}
|
|
34
|
-
return match;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
// Write the updated content back to the file
|
|
38
|
-
await writeFile(filePath, updatedContent, 'utf-8');
|
|
39
|
-
console.log('File has been updated with converted UUIDs');
|
|
40
|
-
}
|
|
41
|
-
convertIds().catch(console.error);
|
|
42
|
-
//# sourceMappingURL=convert-ids.js.map
|
package/dist/convert-ids.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-ids.js","sourceRoot":"","sources":["../convert-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,iDAAiD;AACjD,SAAS,MAAM,CA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AAS,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IACnD,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;AAC5D,CAAC;AAED,UAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
package/dist/protov2.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This module provides utility functions for working with GRC-20 protobufs
|
|
3
|
-
* in TypeScript.
|
|
4
|
-
*/
|
|
5
|
-
export * from './src/proto/gen/src/proto/ipfsv2_pb.js';
|
|
6
|
-
/**
|
|
7
|
-
* This module provides utility functions for working with the GRC-20 Edit
|
|
8
|
-
* protobuf in TypeScript.
|
|
9
|
-
*/
|
|
10
|
-
export * as EditProposal from './src/proto/editv2.js';
|
|
11
|
-
//# sourceMappingURL=protov2.d.ts.map
|
package/dist/protov2.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"protov2.d.ts","sourceRoot":"","sources":["../protov2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,wCAAwC,CAAC;AAEvD;;;GAGG;AACH,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC"}
|
package/dist/protov2.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This module provides utility functions for working with GRC-20 protobufs
|
|
3
|
-
* in TypeScript.
|
|
4
|
-
*/
|
|
5
|
-
export * from './src/proto/gen/src/proto/ipfsv2_pb.js';
|
|
6
|
-
/**
|
|
7
|
-
* This module provides utility functions for working with the GRC-20 Edit
|
|
8
|
-
* protobuf in TypeScript.
|
|
9
|
-
*/
|
|
10
|
-
export * as EditProposal from './src/proto/editv2.js';
|
|
11
|
-
//# sourceMappingURL=protov2.js.map
|
package/dist/protov2.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"protov2.js","sourceRoot":"","sources":["../protov2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,wCAAwC,CAAC;AAEvD;;;GAGG;AACH,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversion layer between grc-20-ts ops and @geoprotocol/grc-20 ops.
|
|
3
|
-
*
|
|
4
|
-
* This module bridges the high-level grc-20-ts operation types to the
|
|
5
|
-
* low-level @geoprotocol/grc-20 types used for binary encoding.
|
|
6
|
-
*/
|
|
7
|
-
import { type Id as GrcId, type Op as GrcOp } from '@geoprotocol/grc-20';
|
|
8
|
-
import type { Op } from '../types.js';
|
|
9
|
-
/**
|
|
10
|
-
* Converts an array of grc-20-ts Ops to @geoprotocol/grc-20 Ops.
|
|
11
|
-
*/
|
|
12
|
-
export declare function convertOps(ops: Op[]): GrcOp[];
|
|
13
|
-
/**
|
|
14
|
-
* Converts a hex address string to a GrcId (Uint8Array).
|
|
15
|
-
* Used for converting author addresses.
|
|
16
|
-
*/
|
|
17
|
-
export declare function hexToGrcId(hex: `0x${string}`): GrcId;
|
|
18
|
-
//# sourceMappingURL=convert.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../src/codec/convert.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,KAAK,EAAE,IAAI,KAAK,EAChB,KAAK,EAAE,IAAI,KAAK,EAUjB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,EAAE,EAAqB,MAAM,aAAa,CAAC;AAuKzD;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,CAE7C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,KAAK,MAAM,EAAE,GAAG,KAAK,CAcpD"}
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversion layer between grc-20-ts ops and @geoprotocol/grc-20 ops.
|
|
3
|
-
*
|
|
4
|
-
* This module bridges the high-level grc-20-ts operation types to the
|
|
5
|
-
* low-level @geoprotocol/grc-20 types used for binary encoding.
|
|
6
|
-
*/
|
|
7
|
-
import { createId, } from '@geoprotocol/grc-20';
|
|
8
|
-
import { toBytes } from '../id-utils.js';
|
|
9
|
-
/**
|
|
10
|
-
* Converts a grc-20-ts Id (string) to @geoprotocol/grc-20 Id (Uint8Array).
|
|
11
|
-
*/
|
|
12
|
-
function convertId(id) {
|
|
13
|
-
const bytes = toBytes(id);
|
|
14
|
-
return createId(bytes);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Converts a grc-20-ts TypedValue to @geoprotocol/grc-20 Value.
|
|
18
|
-
*/
|
|
19
|
-
function convertTypedValue(v) {
|
|
20
|
-
switch (v.type) {
|
|
21
|
-
case 'bool':
|
|
22
|
-
return { type: 'bool', value: v.value };
|
|
23
|
-
case 'float64':
|
|
24
|
-
return {
|
|
25
|
-
type: 'float64',
|
|
26
|
-
value: v.value,
|
|
27
|
-
unit: v.unit ? convertId(v.unit) : undefined,
|
|
28
|
-
};
|
|
29
|
-
case 'text':
|
|
30
|
-
return {
|
|
31
|
-
type: 'text',
|
|
32
|
-
value: v.value,
|
|
33
|
-
language: v.language ? convertId(v.language) : undefined,
|
|
34
|
-
};
|
|
35
|
-
case 'point':
|
|
36
|
-
return {
|
|
37
|
-
type: 'point',
|
|
38
|
-
lon: v.lon,
|
|
39
|
-
lat: v.lat,
|
|
40
|
-
alt: v.alt,
|
|
41
|
-
};
|
|
42
|
-
case 'date':
|
|
43
|
-
return { type: 'date', value: v.value };
|
|
44
|
-
case 'time':
|
|
45
|
-
return { type: 'time', value: v.value };
|
|
46
|
-
case 'datetime':
|
|
47
|
-
return { type: 'datetime', value: v.value };
|
|
48
|
-
case 'schedule':
|
|
49
|
-
return { type: 'schedule', value: v.value };
|
|
50
|
-
default:
|
|
51
|
-
throw new Error(`Unsupported value type: ${v.type}`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Converts a grc-20-ts Value to @geoprotocol/grc-20 PropertyValue.
|
|
56
|
-
*/
|
|
57
|
-
function convertPropertyValue(v) {
|
|
58
|
-
// Extract property and build TypedValue from remaining fields
|
|
59
|
-
const { property, ...typedValue } = v;
|
|
60
|
-
return {
|
|
61
|
-
property: convertId(property),
|
|
62
|
-
value: convertTypedValue(typedValue),
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Converts a single grc-20-ts Op to @geoprotocol/grc-20 Op.
|
|
67
|
-
*/
|
|
68
|
-
function convertOp(op) {
|
|
69
|
-
switch (op.type) {
|
|
70
|
-
case 'UPDATE_ENTITY': {
|
|
71
|
-
// In grc-20-ts, UPDATE_ENTITY is used for both create and update
|
|
72
|
-
// In @geoprotocol/grc-20, we use createEntity for new entities
|
|
73
|
-
// Since we can't know if it's a new entity, we use createEntity
|
|
74
|
-
// which acts as an upsert in the spec
|
|
75
|
-
const createEntity = {
|
|
76
|
-
type: 'createEntity',
|
|
77
|
-
id: convertId(op.entity.id),
|
|
78
|
-
values: op.entity.values.map(convertPropertyValue),
|
|
79
|
-
};
|
|
80
|
-
return createEntity;
|
|
81
|
-
}
|
|
82
|
-
case 'CREATE_RELATION': {
|
|
83
|
-
const createRelation = {
|
|
84
|
-
type: 'createRelation',
|
|
85
|
-
id: convertId(op.relation.id),
|
|
86
|
-
relationType: convertId(op.relation.type),
|
|
87
|
-
from: convertId(op.relation.fromEntity),
|
|
88
|
-
to: convertId(op.relation.toEntity),
|
|
89
|
-
entity: op.relation.entity ? convertId(op.relation.entity) : undefined,
|
|
90
|
-
position: op.relation.position,
|
|
91
|
-
fromSpace: op.relation.fromSpace ? convertId(op.relation.fromSpace) : undefined,
|
|
92
|
-
fromVersion: op.relation.fromVersion ? convertId(op.relation.fromVersion) : undefined,
|
|
93
|
-
toSpace: op.relation.toSpace ? convertId(op.relation.toSpace) : undefined,
|
|
94
|
-
toVersion: op.relation.toVersion ? convertId(op.relation.toVersion) : undefined,
|
|
95
|
-
};
|
|
96
|
-
return createRelation;
|
|
97
|
-
}
|
|
98
|
-
case 'DELETE_RELATION': {
|
|
99
|
-
const deleteRelation = {
|
|
100
|
-
type: 'deleteRelation',
|
|
101
|
-
id: convertId(op.id),
|
|
102
|
-
};
|
|
103
|
-
return deleteRelation;
|
|
104
|
-
}
|
|
105
|
-
case 'UPDATE_RELATION': {
|
|
106
|
-
// Build unset array from boolean flags
|
|
107
|
-
const unset = [];
|
|
108
|
-
// Note: grc-20-ts doesn't have unset flags in UPDATE_RELATION,
|
|
109
|
-
// those are in UNSET_RELATION_FIELDS. So we pass empty unset array.
|
|
110
|
-
const updateRelation = {
|
|
111
|
-
type: 'updateRelation',
|
|
112
|
-
id: convertId(op.relation.id),
|
|
113
|
-
position: op.relation.position,
|
|
114
|
-
fromSpace: op.relation.fromSpace ? convertId(op.relation.fromSpace) : undefined,
|
|
115
|
-
fromVersion: op.relation.fromVersion ? convertId(op.relation.fromVersion) : undefined,
|
|
116
|
-
toSpace: op.relation.toSpace ? convertId(op.relation.toSpace) : undefined,
|
|
117
|
-
toVersion: op.relation.toVersion ? convertId(op.relation.toVersion) : undefined,
|
|
118
|
-
unset,
|
|
119
|
-
};
|
|
120
|
-
return updateRelation;
|
|
121
|
-
}
|
|
122
|
-
case 'UNSET_ENTITY_VALUES': {
|
|
123
|
-
// Convert to UpdateEntity with unset values
|
|
124
|
-
const unsetValues = op.unsetEntityValues.properties.map(propertyId => ({
|
|
125
|
-
property: convertId(propertyId),
|
|
126
|
-
language: { type: 'all' },
|
|
127
|
-
}));
|
|
128
|
-
const updateEntity = {
|
|
129
|
-
type: 'updateEntity',
|
|
130
|
-
id: convertId(op.unsetEntityValues.id),
|
|
131
|
-
set: [],
|
|
132
|
-
unset: unsetValues,
|
|
133
|
-
};
|
|
134
|
-
return updateEntity;
|
|
135
|
-
}
|
|
136
|
-
case 'UNSET_RELATION_FIELDS': {
|
|
137
|
-
const unset = [];
|
|
138
|
-
if (op.unsetRelationFields.fromSpace)
|
|
139
|
-
unset.push('fromSpace');
|
|
140
|
-
if (op.unsetRelationFields.fromVersion)
|
|
141
|
-
unset.push('fromVersion');
|
|
142
|
-
if (op.unsetRelationFields.toSpace)
|
|
143
|
-
unset.push('toSpace');
|
|
144
|
-
if (op.unsetRelationFields.toVersion)
|
|
145
|
-
unset.push('toVersion');
|
|
146
|
-
if (op.unsetRelationFields.position)
|
|
147
|
-
unset.push('position');
|
|
148
|
-
const updateRelation = {
|
|
149
|
-
type: 'updateRelation',
|
|
150
|
-
id: convertId(op.unsetRelationFields.id),
|
|
151
|
-
unset,
|
|
152
|
-
};
|
|
153
|
-
return updateRelation;
|
|
154
|
-
}
|
|
155
|
-
case 'CREATE_PROPERTY': {
|
|
156
|
-
// CREATE_PROPERTY is not directly supported in GRC-20 v2 as an op type
|
|
157
|
-
// Properties are implicitly created when used. We skip this op.
|
|
158
|
-
// For now, throw an error to make it explicit.
|
|
159
|
-
throw new Error('CREATE_PROPERTY is not supported in GRC-20 v2 binary format. Properties are created implicitly.');
|
|
160
|
-
}
|
|
161
|
-
default:
|
|
162
|
-
throw new Error(`Unknown op type: ${op.type}`);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Converts an array of grc-20-ts Ops to @geoprotocol/grc-20 Ops.
|
|
167
|
-
*/
|
|
168
|
-
export function convertOps(ops) {
|
|
169
|
-
return ops.filter(op => op.type !== 'CREATE_PROPERTY').map(convertOp);
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Converts a hex address string to a GrcId (Uint8Array).
|
|
173
|
-
* Used for converting author addresses.
|
|
174
|
-
*/
|
|
175
|
-
export function hexToGrcId(hex) {
|
|
176
|
-
let hexString = hex;
|
|
177
|
-
if (hexString.startsWith('0x')) {
|
|
178
|
-
hexString = hexString.slice(2);
|
|
179
|
-
}
|
|
180
|
-
// Pad to 32 hex chars (16 bytes) if shorter
|
|
181
|
-
const paddedHex = hexString.padStart(32, '0');
|
|
182
|
-
const bytes = new Uint8Array(16);
|
|
183
|
-
for (let i = 0; i < 16; i++) {
|
|
184
|
-
bytes[i] = Number.parseInt(paddedHex.slice(i * 2, i * 2 + 2), 16);
|
|
185
|
-
}
|
|
186
|
-
return createId(bytes);
|
|
187
|
-
}
|
|
188
|
-
//# sourceMappingURL=convert.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert.js","sourceRoot":"","sources":["../../../src/codec/convert.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,QAAQ,GAYT,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGzC;;GAEG;AACH,SAAS,SAAS,CAAC,EAAe;IAChC,MAAM,KAAK,GAAG,OAAO,CAAC,EAAQ,CAAC,CAAC;IAChC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,CAAa;IACtC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QACf,KAAK,MAAM;YACT,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;QAC1C,KAAK,SAAS;YACZ,OAAO;gBACL,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;aAC7C,CAAC;QACJ,KAAK,MAAM;YACT,OAAO;gBACL,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,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**
|
|
2
|
-
* This module provides utility functions for working with image blocks
|
|
3
|
-
* in TypeScript.
|
|
4
|
-
*
|
|
5
|
-
* @since 0.0.6
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Image entities and Image Blocks are functionally the same thing. The
|
|
9
|
-
* relation consuming the entity is what gives it contextual meaning. e.g.,
|
|
10
|
-
* if the Image is consumed by an Avatar relation, then we know the image
|
|
11
|
-
* is an avatar. If it's consumed by a Block relation, then we know the
|
|
12
|
-
* image is a block.
|
|
13
|
-
*/
|
|
14
|
-
export { make } from '../image.js';
|
|
15
|
-
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../src/core/blocks/image.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;GAMG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This module provides utility functions for working with image blocks
|
|
3
|
-
* in TypeScript.
|
|
4
|
-
*
|
|
5
|
-
* @since 0.0.6
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Image entities and Image Blocks are functionally the same thing. The
|
|
9
|
-
* relation consuming the entity is what gives it contextual meaning. e.g.,
|
|
10
|
-
* if the Image is consumed by an Avatar relation, then we know the image
|
|
11
|
-
* is an avatar. If it's consumed by a Block relation, then we know the
|
|
12
|
-
* image is a block.
|
|
13
|
-
*/
|
|
14
|
-
export { make } from '../image.js';
|
|
15
|
-
//# sourceMappingURL=image.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../../../src/core/blocks/image.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;GAMG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Id } from '~/src/idv2.js';
|
|
2
|
-
export declare const ARTICLE_TYPE: Id;
|
|
3
|
-
export declare const CITY_TYPE: Id;
|
|
4
|
-
export declare const CLAIM_TYPE: Id;
|
|
5
|
-
export declare const CONTINENT_TYPE: Id;
|
|
6
|
-
export declare const COUNTRY_TYPE: Id;
|
|
7
|
-
export declare const GOAL_TYPE: Id;
|
|
8
|
-
export declare const JOB_TYPE: Id;
|
|
9
|
-
export declare const NEWS_EVENT_TYPE: Id;
|
|
10
|
-
export declare const NEWS_STORY_TYPE: Id;
|
|
11
|
-
export declare const POLICY_TYPE: Id;
|
|
12
|
-
export declare const PUBLISHER_TYPE: Id;
|
|
13
|
-
export declare const QUOTE_TYPE: Id;
|
|
14
|
-
export declare const REGION_TYPE: Id;
|
|
15
|
-
export declare const SKILL_TYPE: Id;
|
|
16
|
-
export declare const TAG_TYPE: Id;
|
|
17
|
-
export declare const TOPIC_TYPE: Id;
|
|
18
|
-
export declare const AVATAR_PROPERTY: Id;
|
|
19
|
-
export declare const BROADER_GOALS_PROPERTY: Id;
|
|
20
|
-
export declare const SUBGOALS_PROPERTY: Id;
|
|
21
|
-
export declare const DISCLAIMER_PROPERTY: Id;
|
|
22
|
-
export declare const EVENT_DATE_PROPERTY: Id;
|
|
23
|
-
export declare const RELATED_PEOPLE_PROPERTY: Id;
|
|
24
|
-
export declare const SKILLS_PROPERTY: Id;
|
|
25
|
-
export declare const ROLES_PROPERTY: Id;
|
|
26
|
-
export declare const HIGHLIGHTED_RELATED_ENTIRIES_PROPERTY: Id;
|
|
27
|
-
export declare const PUBLISHER_PROPERTY: Id;
|
|
28
|
-
export declare const AUTHORS_PROPERTY: Id;
|
|
29
|
-
export declare const WEB_ARCHIVE_URL_PROPERTY: Id;
|
|
30
|
-
export declare const PUBLISH_DATE_PROPERTY: Id;
|
|
31
|
-
export declare const OWNERS_PROPERTY: Id;
|
|
32
|
-
export declare const SOURCES_PROPERTY: Id;
|
|
33
|
-
export declare const QUOTES_THAT_SUPPORT_CLAIMS_PROPERTY: Id;
|
|
34
|
-
export declare const OPPOSING_ARGUMENTS_PROPERTY: Id;
|
|
35
|
-
export declare const SUPPORTING_ARGUMENTS_PROPERTY: Id;
|
|
36
|
-
export declare const WEBSITE_PROPERTY: Id;
|
|
37
|
-
export declare const BROADER_PROJECTS_PROPERTY: Id;
|
|
38
|
-
export declare const SUBPROJECTS_PROPERTY: Id;
|
|
39
|
-
export declare const TOPICS_PROPERTY: Id;
|
|
40
|
-
export declare const RELATED_ENTITIES_PROPERTY: Id;
|
|
41
|
-
export declare const X_PROPERTY: Id;
|
|
42
|
-
export declare const CITIES_PROPERTY: Id;
|
|
43
|
-
export declare const LOCATION_PROPERTY: Id;
|
|
44
|
-
export declare const WEB_URL_PROPERTY: Id;
|
|
45
|
-
export declare const SUBTOPICS_PROPERTY: Id;
|
|
46
|
-
export declare const RELATED_TOPICS_PROPERTY: Id;
|
|
47
|
-
export declare const COUNTRIES_PROPERTY: Id;
|
|
48
|
-
export declare const BROADER_TOPICS_PROPERTY: Id;
|
|
49
|
-
export declare const RELATED_PROJECTS_PROPERTY: Id;
|
|
50
|
-
export declare const CONTINENTS_PROPERTY: Id;
|
|
51
|
-
export declare const PERSON_PROPERTY: Id;
|
|
52
|
-
export declare const PROJECT_PROPERTY: Id;
|
|
53
|
-
export declare const RELATED_SPACES_PROPERTY: Id;
|
|
54
|
-
/**
|
|
55
|
-
* Migration 1
|
|
56
|
-
*/
|
|
57
|
-
export declare const VALUE_TYPE: Id;
|
|
58
|
-
export declare const PRINCIPLE_TYPE: Id;
|
|
59
|
-
//# sourceMappingURL=content.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/core/idsv2/content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,eAAO,MAAM,YAAY,IAA6C,CAAC;AACvE,eAAO,MAAM,SA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