Skip to content

Commit 3891341

Browse files
committed
Add namespace restriction to docs
1 parent 7cc1adf commit 3891341

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

collections.mdx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,22 @@ action.
1818

1919
## Create a collection
2020

21-
You can create a collection using the client library and calling the `applySchema` method on your polybase instance.
21+
You can create a collection using the [Explorer](https://explorer.testnet.polybase.xyz) **(recommended)** or by using the client library and calling the `applySchema` method on your polybase instance.
2222

2323
<Info>
24-
You can also create a collection via the [Polybase
25-
Explorer](https://explorer.testnet.polybase.xyz). You will need to first login
24+
We recommended you use [Polybase
25+
Explorer](https://explorer.testnet.polybase.xyz) to create your Collection. You will need to first login
2626
and create an account.
2727
</Info>
2828

29+
30+
<Warning>
31+
If you use `applySchema` you will need to sign the request [sign the request](https://docs.polybase.xyz/write#signing-requests), and
32+
ensure that your namespace is in the format `pk/0x<hex_encoded_64_byte_public_key>/whatever-namespace-you-want`. Where the 64 byte public key
33+
is the public key being used to sign the request.
34+
</Warning>
35+
36+
2937
```js
3038
import { Polybase } from "@polybase/client"
3139

@@ -59,12 +67,6 @@ const createResponse = await db.applySchema(`
5967
`, 'your-namespace') // your-namespace is optional if you have defined a default namespace
6068
```
6169

62-
<Info>
63-
If you want your contract code to be updatable, then you need to ensure that
64-
you [sign the request](https://docs.polybase.xyz/write#signing-requests) when
65-
creating the contract (the first time you call `.applySchema()`)
66-
</Info>
67-
6870
<Warning>
6971
`id` field is unique and mandatory on all collections, and you must assign an `id` using
7072
`this.id = ...` within the `constructor` function.

0 commit comments

Comments
 (0)