You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const result =awaitfetch('https://geobrowser.io/api/ipfs/upload-binary', {
119
+
const result =awaitfetch('https://geobrowser.io/api/ipfs/upload', {
120
120
method: 'POST',
121
121
body: formData,
122
122
});
@@ -130,14 +130,18 @@ Once you've uploaded the binary encoded Edit to IPFS and have correctly formed `
130
130
131
131
The calldata used to write the edit onchain depends on the governance structure of the space. Currently The Graph supports two governance modes, one with voting and one without. The API exposes metadata about each space, its governance structure, and what smart contracts exist for it.
132
132
133
-
We expose an API for fetching the appropriate calldata for the correct contract address based for each space.
133
+
We expose an API for fetching the appropriate calldata for the correct contract addresses for each space.
134
134
135
135
```ts
136
-
// You'll need to know your space id ahead of time
136
+
// You'll need to know your space id and have an IPFS hash ahead of time
137
137
const spaceId ='space-id';
138
+
const cid ='ipfs://hash';
138
139
139
140
// This returns the correct contract address and calldata depending on the space id
140
-
const result =awaitfetch(`https://geobrowser.io/api/edit-calldata?spaceId=${spaceId}&cid=${cid}`);
141
+
const result =awaitfetch(`https://geobrowser.io/space/${spaceId}/edit/calldata`, {
You can deploy spaces programmatically using the API. Currently there are two types of governance modes for spaces: one with voting and one without. They're called PUBLIC or PERSONAL spaces respectively. The API only supports deploying the PERSONAL governance mode currently.
0 commit comments