From d26834263dda85acbb55bccf800b0d41809e7a50 Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Wed, 21 Jan 2026 17:16:43 +0100 Subject: [PATCH 1/3] rename op --- .changeset/rename-grcop-to-op.md | 5 +++++ src/core/account.ts | 6 +++--- src/core/blocks/data.ts | 8 ++++---- src/core/blocks/text.ts | 8 ++++---- src/encoding.test.ts | 34 +++++++++++++++---------------- src/graph/create-entity.ts | 4 ++-- src/graph/create-property.ts | 4 ++-- src/graph/create-relation.test.ts | 6 +++--- src/graph/create-relation.ts | 4 ++-- src/graph/create-space.ts | 6 +++--- src/graph/create-type.ts | 6 +++--- src/graph/update-entity.ts | 4 ++-- src/graph/update-relation.test.ts | 4 ++-- src/ipfs.test.ts | 4 ++-- src/ipfs.ts | 4 ++-- src/proto/index.ts | 2 +- src/ranks/create-rank.ts | 4 ++-- src/types.ts | 8 +++++--- 18 files changed, 64 insertions(+), 57 deletions(-) create mode 100644 .changeset/rename-grcop-to-op.md diff --git a/.changeset/rename-grcop-to-op.md b/.changeset/rename-grcop-to-op.md new file mode 100644 index 0000000..7f995b3 --- /dev/null +++ b/.changeset/rename-grcop-to-op.md @@ -0,0 +1,5 @@ +--- +"@graphprotocol/grc-20": minor +--- + +Rename `GrcOp` to `Op` as the primary export. The `GrcOp` type is now deprecated but still available for backwards compatibility. diff --git a/src/core/account.ts b/src/core/account.ts index f54eedb..c8b8564 100644 --- a/src/core/account.ts +++ b/src/core/account.ts @@ -5,7 +5,7 @@ * @since 0.0.6 */ -import type { Op as GrcOp } from '@geoprotocol/grc-20'; +import type { Op } from '@geoprotocol/grc-20'; import { createEntity } from '../graph/create-entity.js'; import { createRelation } from '../graph/create-relation.js'; import { generate } from '../id-utils.js'; @@ -15,7 +15,7 @@ import { ACCOUNT_TYPE, ADDRESS_PROPERTY, NAME_PROPERTY, NETWORK_PROPERTY, TYPES_ type MakeAccountReturnType = { accountId: string; - ops: GrcOp[]; + ops: Op[]; }; /** @@ -36,7 +36,7 @@ export function make(address: string): MakeAccountReturnType { const accountId = generate(); const checkedAddress: string = getChecksumAddress(address); - const ops: GrcOp[] = []; + const ops: Op[] = []; const { ops: entityOps } = createEntity({ id: accountId, diff --git a/src/core/blocks/data.ts b/src/core/blocks/data.ts index 41ec99e..37b4c58 100644 --- a/src/core/blocks/data.ts +++ b/src/core/blocks/data.ts @@ -5,7 +5,7 @@ * @since 0.0.6 */ -import type { Op as GrcOp } from '@geoprotocol/grc-20'; +import type { Op } from '@geoprotocol/grc-20'; import { createRelation } from '../../graph/create-relation.js'; import { updateEntity } from '../../graph/update-entity.js'; import { Id } from '../../id.js'; @@ -48,12 +48,12 @@ type DataBlockParams = { * ``` * * @param param args {@link TextBlockParams} - * @returns ops – The ops for the Data Block entity: {@link GrcOp}[] + * @returns ops – The ops for the Data Block entity: {@link Op}[] */ -export function make({ fromId, sourceType, position, name }: DataBlockParams): GrcOp[] { +export function make({ fromId, sourceType, position, name }: DataBlockParams): Op[] { const newBlockId = generate(); - const ops: GrcOp[] = []; + const ops: Op[] = []; const { ops: dataBlockTypeOps } = createRelation({ fromEntity: newBlockId, type: TYPES_PROPERTY, diff --git a/src/core/blocks/text.ts b/src/core/blocks/text.ts index 8010609..49df609 100644 --- a/src/core/blocks/text.ts +++ b/src/core/blocks/text.ts @@ -5,7 +5,7 @@ * @since 0.0.6 */ -import type { Op as GrcOp } from '@geoprotocol/grc-20'; +import type { Op } from '@geoprotocol/grc-20'; import { createRelation } from '../../graph/create-relation.js'; import { updateEntity } from '../../graph/update-entity.js'; import { Id } from '../../id.js'; @@ -28,12 +28,12 @@ type TextBlockParams = { fromId: string; text: string; position?: string }; * ``` * * @param param args {@link TextBlockParams} - * @returns ops – The ops for the Text Block entity: {@link GrcOp}[] + * @returns ops – The ops for the Text Block entity: {@link Op}[] */ -export function make({ fromId, text, position }: TextBlockParams): GrcOp[] { +export function make({ fromId, text, position }: TextBlockParams): Op[] { const newBlockId = generate(); - const ops: GrcOp[] = []; + const ops: Op[] = []; const { ops: textBlockTypeOps } = createRelation({ fromEntity: newBlockId, diff --git a/src/encoding.test.ts b/src/encoding.test.ts index ef67820..0979511 100644 --- a/src/encoding.test.ts +++ b/src/encoding.test.ts @@ -4,7 +4,7 @@ import { formatId, type Edit as GrcEdit, type Id as GrcId, - type Op as GrcOp, + type Op, parseId, } from '@geoprotocol/grc-20'; import { describe, expect, it } from 'vitest'; @@ -55,7 +55,7 @@ describe('GRC-20 v2 Encoding', () => { expect(decoded.ops.length).toBe(1); expect(decoded.ops[0]?.type).toBe('createEntity'); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(formatId(op.id)).toBe('3af3e22d21694a078681516710b7ecf1'); expect(op.values.length).toBe(1); expect(op.values[0]?.value.type).toBe('text'); @@ -100,7 +100,7 @@ describe('GRC-20 v2 Encoding', () => { expect(decoded.name).toBe('test'); expect(decoded.ops.length).toBe(1); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(op.values[0]?.value.type).toBe('float64'); if (op.values[0]?.value.type === 'float64') { expect(op.values[0].value.value).toBe(42.5); @@ -138,7 +138,7 @@ describe('GRC-20 v2 Encoding', () => { const binary = encodeEdit(edit); const decoded = decodeEdit(binary); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(op.values[0]?.value.type).toBe('bool'); if (op.values[0]?.value.type === 'bool') { expect(op.values[0].value.value).toBe(true); @@ -178,7 +178,7 @@ describe('GRC-20 v2 Encoding', () => { const binary = encodeEdit(edit); const decoded = decodeEdit(binary); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(op.values[0]?.value.type).toBe('point'); if (op.values[0]?.value.type === 'point') { expect(op.values[0].value.lon).toBeCloseTo(-122.4194, 4); @@ -218,7 +218,7 @@ describe('GRC-20 v2 Encoding', () => { const binary = encodeEdit(edit); const decoded = decodeEdit(binary); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(op.values[0]?.value.type).toBe('date'); if (op.values[0]?.value.type === 'date') { expect(op.values[0].value.value).toBe('2024-01-15'); @@ -256,7 +256,7 @@ describe('GRC-20 v2 Encoding', () => { const binary = encodeEdit(edit); const decoded = decodeEdit(binary); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(op.values[0]?.value.type).toBe('time'); if (op.values[0]?.value.type === 'time') { expect(op.values[0].value.value).toBe('14:30:00Z'); @@ -294,7 +294,7 @@ describe('GRC-20 v2 Encoding', () => { const binary = encodeEdit(edit); const decoded = decodeEdit(binary); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(op.values[0]?.value.type).toBe('datetime'); if (op.values[0]?.value.type === 'datetime') { expect(op.values[0].value.value).toBe('2024-01-15T14:30:00Z'); @@ -332,7 +332,7 @@ describe('GRC-20 v2 Encoding', () => { const binary = encodeEdit(edit); const decoded = decodeEdit(binary); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(op.values[0]?.value.type).toBe('schedule'); if (op.values[0]?.value.type === 'schedule') { expect(op.values[0].value.value).toBe('FREQ=WEEKLY;BYDAY=MO,WE,FR'); @@ -375,7 +375,7 @@ describe('GRC-20 v2 Encoding', () => { expect(decoded.ops.length).toBe(1); expect(decoded.ops[0]?.type).toBe('createRelation'); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(formatId(op.id)).toBe('765564cac7e54c61b1dcc28ab77ec6b7'); expect(formatId(op.relationType)).toBe('cf518eafef744aadbc87fe09c2631fcd'); expect(formatId(op.from)).toBe('3af3e22d21694a078681516710b7ecf1'); @@ -414,7 +414,7 @@ describe('GRC-20 v2 Encoding', () => { const binary = encodeEdit(edit); const decoded = decodeEdit(binary); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(op.fromSpace).toBeDefined(); expect(op.toSpace).toBeDefined(); if (op.fromSpace) expect(formatId(op.fromSpace)).toBe('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); @@ -445,7 +445,7 @@ describe('GRC-20 v2 Encoding', () => { expect(decoded.ops.length).toBe(1); expect(decoded.ops[0]?.type).toBe('deleteRelation'); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(formatId(op.id)).toBe('765564cac7e54c61b1dcc28ab77ec6b7'); }); @@ -475,7 +475,7 @@ describe('GRC-20 v2 Encoding', () => { expect(decoded.ops.length).toBe(1); expect(decoded.ops[0]?.type).toBe('updateRelation'); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(formatId(op.id)).toBe('765564cac7e54c61b1dcc28ab77ec6b7'); expect(op.position).toBe('new-position'); }); @@ -502,7 +502,7 @@ describe('GRC-20 v2 Encoding', () => { const binary = encodeEdit(edit); const decoded = decodeEdit(binary); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(op.unset).toContain('fromSpace'); expect(op.unset).toContain('toSpace'); expect(op.unset).toContain('position'); @@ -551,7 +551,7 @@ describe('GRC-20 v2 Encoding', () => { expect(decoded.ops.length).toBe(1); expect(decoded.ops[0]?.type).toBe('updateEntity'); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(formatId(op.id)).toBe('3af3e22d21694a078681516710b7ecf1'); expect(op.set.length).toBe(1); expect(op.unset.length).toBe(1); @@ -581,7 +581,7 @@ describe('GRC-20 v2 Encoding', () => { expect(decoded.ops.length).toBe(1); expect(decoded.ops[0]?.type).toBe('deleteEntity'); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(formatId(op.id)).toBe('3af3e22d21694a078681516710b7ecf1'); }); @@ -609,7 +609,7 @@ describe('GRC-20 v2 Encoding', () => { expect(decoded.ops.length).toBe(1); expect(decoded.ops[0]?.type).toBe('restoreEntity'); - const op = decoded.ops[0] as Extract; + const op = decoded.ops[0] as Extract; expect(formatId(op.id)).toBe('3af3e22d21694a078681516710b7ecf1'); }); }); diff --git a/src/graph/create-entity.ts b/src/graph/create-entity.ts index d09955c..cad76f7 100644 --- a/src/graph/create-entity.ts +++ b/src/graph/create-entity.ts @@ -1,9 +1,9 @@ import { - type Op as GrcOp, type PropertyValue as GrcPropertyValue, createEntity as grcCreateEntity, createRelation as grcCreateRelation, languages, + type Op, } from '@geoprotocol/grc-20'; import { COVER_PROPERTY, DESCRIPTION_PROPERTY, NAME_PROPERTY, TYPES_PROPERTY } from '../core/ids/system.js'; import { Id } from '../id.js'; @@ -114,7 +114,7 @@ export const createEntity = ({ } const id = providedId ?? generate(); - let ops: Array = []; + let ops: Array = []; const newValues: Array = []; if (name) { diff --git a/src/graph/create-property.ts b/src/graph/create-property.ts index 7ecb894..a0256bf 100644 --- a/src/graph/create-property.ts +++ b/src/graph/create-property.ts @@ -1,4 +1,4 @@ -import { type Op as GrcOp, createRelation as grcCreateRelation } from '@geoprotocol/grc-20'; +import { createRelation as grcCreateRelation, type Op } from '@geoprotocol/grc-20'; import { BOOLEAN, BYTES, @@ -75,7 +75,7 @@ export const createProperty = (params: CreatePropertyParams): CreateResult => { } const entityId = id ?? generate(); - const ops: Array = []; + const ops: Array = []; // Create the property entity const { ops: entityOps } = createEntity({ diff --git a/src/graph/create-relation.test.ts b/src/graph/create-relation.test.ts index 82dba2c..d7306d3 100644 --- a/src/graph/create-relation.test.ts +++ b/src/graph/create-relation.test.ts @@ -1,4 +1,4 @@ -import type { CreateEntity, CreateRelation, Op as GrcOp } from '@geoprotocol/grc-20'; +import type { CreateEntity, CreateRelation, Op } from '@geoprotocol/grc-20'; import { describe, expect, it } from 'vitest'; import { CLAIM_TYPE, NEWS_STORY_TYPE } from '../core/ids/content.js'; import { COVER_PROPERTY, DESCRIPTION_PROPERTY, NAME_PROPERTY, TYPES_PROPERTY } from '../core/ids/system.js'; @@ -6,11 +6,11 @@ import { Id } from '../id.js'; import { toGrcId } from '../id-utils.js'; import { createRelation } from './create-relation.js'; -const isCreateRelationOp = (op: GrcOp): op is CreateRelation => { +const isCreateRelationOp = (op: Op): op is CreateRelation => { return op.type === 'createRelation'; }; -const isCreateEntityOp = (op: GrcOp): op is CreateEntity => { +const isCreateEntityOp = (op: Op): op is CreateEntity => { return op.type === 'createEntity'; }; diff --git a/src/graph/create-relation.ts b/src/graph/create-relation.ts index ad1e1ec..2a7a29a 100644 --- a/src/graph/create-relation.ts +++ b/src/graph/create-relation.ts @@ -1,4 +1,4 @@ -import { type Op as GrcOp, createRelation as grcCreateRelation } from '@geoprotocol/grc-20'; +import { createRelation as grcCreateRelation, type Op } from '@geoprotocol/grc-20'; import { Id } from '../id.js'; import { assertValid, generate, toGrcId } from '../id-utils.js'; import type { CreateResult, RelationParams } from '../types.js'; @@ -91,7 +91,7 @@ export const createRelation = ({ const id = providedId ?? generate(); const entityId = providedEntityId ?? generate(); - const ops: Array = []; + const ops: Array = []; ops.push( grcCreateRelation({ diff --git a/src/graph/create-space.ts b/src/graph/create-space.ts index a966725..70f59a9 100644 --- a/src/graph/create-space.ts +++ b/src/graph/create-space.ts @@ -1,4 +1,4 @@ -import type { Op as GrcOp } from '@geoprotocol/grc-20'; +import type { Op } from '@geoprotocol/grc-20'; import { IdUtils } from '../../index.js'; import { Id } from '../id.js'; import { getApiOrigin, type Network } from './constants.js'; @@ -7,7 +7,7 @@ type CreateSpaceParams = { editorAddress: string; name: string; network?: Network; - ops?: GrcOp[]; + ops?: Op[]; spaceEntityId?: string; /** @@ -19,7 +19,7 @@ type CreateSpaceParams = { type BaseDeployParams = { spaceName: string; - ops?: GrcOp[]; + ops?: Op[]; spaceEntityId?: string; }; diff --git a/src/graph/create-type.ts b/src/graph/create-type.ts index 0e91255..2c37ee6 100644 --- a/src/graph/create-type.ts +++ b/src/graph/create-type.ts @@ -1,4 +1,4 @@ -import { type Op as GrcOp, createRelation as grcCreateRelation } from '@geoprotocol/grc-20'; +import { createRelation as grcCreateRelation, type Op } from '@geoprotocol/grc-20'; import { PROPERTIES, SCHEMA_TYPE, TYPES_PROPERTY } from '../core/ids/system.js'; import { Id } from '../id.js'; import { assertValid, generate, toGrcId } from '../id-utils.js'; @@ -48,7 +48,7 @@ export const createType = ({ // set property "Types" to "Type" assertValid(id); - (ops as GrcOp[]).push( + (ops as Op[]).push( grcCreateRelation({ id: toGrcId(generate()), entity: toGrcId(generate()), @@ -62,7 +62,7 @@ export const createType = ({ for (const propertyId of properties) { assertValid(propertyId, '`propertyId` in `createType`'); // Set Properties on the Type - (ops as GrcOp[]).push( + (ops as Op[]).push( grcCreateRelation({ id: toGrcId(generate()), entity: toGrcId(generate()), diff --git a/src/graph/update-entity.ts b/src/graph/update-entity.ts index d9dc2db..854c2e0 100644 --- a/src/graph/update-entity.ts +++ b/src/graph/update-entity.ts @@ -1,8 +1,8 @@ import { - type Op as GrcOp, type PropertyValue as GrcPropertyValue, createEntity as grcCreateEntity, languages, + type Op, } from '@geoprotocol/grc-20'; import { DESCRIPTION_PROPERTY, NAME_PROPERTY } from '../core/ids/system.js'; import { Id } from '../id.js'; @@ -146,7 +146,7 @@ export const updateEntity = ({ id, name, description, values }: UpdateEntityPara } } - const op: GrcOp = grcCreateEntity({ + const op: Op = grcCreateEntity({ id: toGrcId(id), values: newValues, }); diff --git a/src/graph/update-relation.test.ts b/src/graph/update-relation.test.ts index f628633..cf9c4aa 100644 --- a/src/graph/update-relation.test.ts +++ b/src/graph/update-relation.test.ts @@ -1,10 +1,10 @@ -import type { Op as GrcOp, UpdateRelation } from '@geoprotocol/grc-20'; +import type { Op, UpdateRelation } from '@geoprotocol/grc-20'; import { describe, expect, it } from 'vitest'; import { Id } from '../id.js'; import { toGrcId } from '../id-utils.js'; import { updateRelation } from './update-relation.js'; -const isUpdateRelationOp = (op: GrcOp): op is UpdateRelation => { +const isUpdateRelationOp = (op: Op): op is UpdateRelation => { return op.type === 'updateRelation'; }; diff --git a/src/ipfs.test.ts b/src/ipfs.test.ts index 28b7002..79ece1a 100644 --- a/src/ipfs.test.ts +++ b/src/ipfs.test.ts @@ -1,4 +1,4 @@ -import type { Op as GrcOp } from '@geoprotocol/grc-20'; +import type { Op } from '@geoprotocol/grc-20'; import { describe, expect, it } from 'vitest'; import { WEBSITE_PROPERTY } from './core/ids/content.js'; import { TYPES_PROPERTY } from './core/ids/system.js'; @@ -144,7 +144,7 @@ describe('publishEdit', () => { type: TYPES_PROPERTY, }); - const ops: GrcOp[] = [...entity1.ops, ...entity2.ops, ...relation.ops]; + const ops: Op[] = [...entity1.ops, ...entity2.ops, ...relation.ops]; const { cid, editId } = await publishEdit({ name: 'multiple ops test', diff --git a/src/ipfs.ts b/src/ipfs.ts index b624bd5..d76236b 100644 --- a/src/ipfs.ts +++ b/src/ipfs.ts @@ -10,7 +10,7 @@ import { encodeEdit, type Edit as GrcEdit, type Id as GrcId, - type Op as GrcOp, + type Op, randomId, } from '@geoprotocol/grc-20'; import { Micro } from 'effect'; @@ -35,7 +35,7 @@ function hexToGrcId(hex: `0x${string}`): GrcId { type PublishEditProposalParams = { name: string; - ops: GrcOp[]; + ops: Op[]; author: `0x${string}`; network?: Network; }; diff --git a/src/proto/index.ts b/src/proto/index.ts index 067a959..c8073dc 100644 --- a/src/proto/index.ts +++ b/src/proto/index.ts @@ -4,5 +4,5 @@ * Note: As of this version, the encoding has migrated from protobuf to GRC-20 v2 binary format. */ -export type { Op as GrcOp } from '@geoprotocol/grc-20'; +export type { Op } from '@geoprotocol/grc-20'; export { decodeEdit, type Edit, type EncodeOptions, encodeEdit } from '@geoprotocol/grc-20'; diff --git a/src/ranks/create-rank.ts b/src/ranks/create-rank.ts index 1da8be3..3cce827 100644 --- a/src/ranks/create-rank.ts +++ b/src/ranks/create-rank.ts @@ -1,9 +1,9 @@ import { - type Op as GrcOp, type PropertyValue as GrcPropertyValue, createEntity as grcCreateEntity, createRelation as grcCreateRelation, languages, + type Op, } from '@geoprotocol/grc-20'; import { generateNJitteredKeysBetween } from 'fractional-indexing-jittered'; import { @@ -85,7 +85,7 @@ export const createRank = ({ } const id = providedId ?? generate(); - const ops: GrcOp[] = []; + const ops: Op[] = []; const voteIds: Id[] = []; // Create rank entity values diff --git a/src/types.ts b/src/types.ts index feb8394..45623fb 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,11 +1,13 @@ -import type { Op as GrcOp } from '@geoprotocol/grc-20'; +import type { Op } from '@geoprotocol/grc-20'; import type { SafeSmartAccountImplementation } from 'permissionless/accounts'; import type { SmartAccountClient } from 'permissionless/clients'; import type { Address, Chain, HttpTransport } from 'viem'; import type { SmartAccountImplementation } from 'viem/account-abstraction'; import type { Id } from './id.js'; -export type { GrcOp }; +export type { Op }; +/** @deprecated Use `Op` instead */ +export type GrcOp = Op; export type ValueDataType = | 'BOOLEAN' @@ -105,7 +107,7 @@ export type UpdateRelationParams = { export type CreateResult = { id: Id; - ops: GrcOp[]; + ops: Op[]; }; export type CreateImageResult = CreateResult & { From 2f7ab1d7ce4f3df7889ceb6674ad042e3bf302b6 Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Wed, 21 Jan 2026 17:25:39 +0100 Subject: [PATCH 2/3] update readme and scripts --- README.md | 4 ++-- scripts/setup-rank-types.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e4396c6..d1f54e3 100644 --- a/README.md +++ b/README.md @@ -168,9 +168,9 @@ const { id: personId, ops: createPersonOps } = Graph.createEntity({ #### Example Flow ```ts -import { Graph, type GrcOp } from '@graphprotocol/grc-20'; +import { Graph, type Op } from '@graphprotocol/grc-20'; -const ops: Array = []; +const ops: Array = []; // create an age property const { id: agePropertyId, ops: createAgePropertyOps } = Graph.createProperty({ diff --git a/scripts/setup-rank-types.ts b/scripts/setup-rank-types.ts index 29b24a9..1459194 100644 --- a/scripts/setup-rank-types.ts +++ b/scripts/setup-rank-types.ts @@ -11,7 +11,7 @@ * Usage: import { ops } from './scripts/setup-rank-types.js' */ -import type { Op as GrcOp } from '@geoprotocol/grc-20'; +import type { Op } from '@geoprotocol/grc-20'; import { RANK_TYPE, RANK_TYPE_PROPERTY, @@ -22,8 +22,8 @@ import { import { createProperty } from '../src/graph/create-property.js'; import { createType } from '../src/graph/create-type.js'; -const generateRankTypeOps = (): GrcOp[] => { - const ops: GrcOp[] = []; +const generateRankTypeOps = (): Op[] => { + const ops: Op[] = []; // 1. Create RANK_TYPE_PROPERTY - A TEXT property storing ORDINAL/WEIGHTED const rankTypeProperty = createProperty({ From 0326ab4bc3b326b8ebbbedb0afa49d64c380e825 Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Wed, 21 Jan 2026 17:44:11 +0100 Subject: [PATCH 3/3] remove Op re-export in proto. We export it with the types anyway --- src/proto/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/proto/index.ts b/src/proto/index.ts index c8073dc..0b4bb3a 100644 --- a/src/proto/index.ts +++ b/src/proto/index.ts @@ -4,5 +4,4 @@ * Note: As of this version, the encoding has migrated from protobuf to GRC-20 v2 binary format. */ -export type { Op } from '@geoprotocol/grc-20'; export { decodeEdit, type Edit, type EncodeOptions, encodeEdit } from '@geoprotocol/grc-20';