Skip to content

Commit 7c69df7

Browse files
committed
docs: Added example and output to sandboxing page
1 parent f66626d commit 7c69df7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/src/concepts/sandboxing.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,21 @@ const expectedTxSandbox = (id: string): string => {
3434
};
3535
```
3636

37+
Example:
38+
39+
```typescript
40+
const id = 'gnWKBqFXMJrrksEWrXLQRUQQQeFhv4uVxesHBcT8i6o';
41+
const expectedTxSandbox = (id): string => {
42+
return toB32(fromB64Url(id));
43+
};
44+
console.log(expectedTxSandbox);
45+
```
46+
47+
Example Output:
48+
49+
```console
50+
qj2yubvbk4yjv24syelk24wqivcbaqpbmg7yxfof5mdqlrh4rova
51+
```
52+
53+
3754
View the full code for generating browser sandbox values [here](https://github.com/ar-io/arweave-gateway/blob/719f43f8d6135adf44c87701e95f58105638710a/src/gateway/middleware/sandbox.ts#L69).

0 commit comments

Comments
 (0)