Skip to content

Commit b57b468

Browse files
authored
[Example app] Update Walrus services (#36)
1 parent 5d31946 commit b57b468

File tree

4 files changed

+72
-9
lines changed

4 files changed

+72
-9
lines changed

examples/frontend/src/EncryptAndUpload.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ export function WalrusUpload({ policyObject, cap_id, moduleName }: WalrusUploadP
5252
});
5353

5454
const services: WalrusService[] = [
55+
{
56+
id: 'service1',
57+
name: 'walrus.space',
58+
publisherUrl: '/publisher1',
59+
aggregatorUrl: '/aggregator1',
60+
},
5561
{
5662
id: 'service2',
5763
name: 'staketab.org',
@@ -64,6 +70,24 @@ export function WalrusUpload({ policyObject, cap_id, moduleName }: WalrusUploadP
6470
publisherUrl: '/publisher3',
6571
aggregatorUrl: '/aggregator3',
6672
},
73+
{
74+
id: 'service4',
75+
name: 'nodes.guru',
76+
publisherUrl: '/publisher4',
77+
aggregatorUrl: '/aggregator4',
78+
},
79+
{
80+
id: 'service5',
81+
name: 'banansen.dev',
82+
publisherUrl: '/publisher5',
83+
aggregatorUrl: '/aggregator5',
84+
},
85+
{
86+
id: 'service6',
87+
name: 'everstake.one',
88+
publisherUrl: '/publisher6',
89+
aggregatorUrl: '/aggregator6',
90+
},
6791
];
6892

6993
function getAggregatorUrl(path: string): string {

examples/frontend/src/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ export const downloadAndDecrypt = async (
1616
setIsDialogOpen: (open: boolean) => void,
1717
setReloadKey: (updater: (prev: number) => number) => void,
1818
) => {
19-
// TODO: add more aggregators
20-
const aggregators = ['aggregator2', 'aggregator3'];
19+
const aggregators = ['aggregator1', 'aggregator2', 'aggregator3', 'aggregator4', 'aggregator5', 'aggregator6'];
2120
// First, download all files in parallel (ignore errors)
2221
const downloadResults = await Promise.all(
2322
blobIds.map(async (blobId) => {

examples/frontend/vercel.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@
1414
},
1515
{
1616
"source": "/aggregator4/:path*",
17-
"destination": "https://https://walrus-testnet-aggregator.trusted-point.com/:path*"
17+
"destination": "https://walrus-testnet-aggregator.nodes.guru/:path*"
18+
},
19+
{
20+
"source": "/aggregator5/:path*",
21+
"destination": "https://aggregator.walrus.banansen.dev/:path*"
22+
},
23+
{
24+
"source": "/aggregator6/:path*",
25+
"destination": "https://walrus-testnet-aggregator.everstake.one/:path*"
1826
},
1927
{
2028
"source": "/publisher1/:path*",
@@ -30,7 +38,15 @@
3038
},
3139
{
3240
"source": "/publisher4/:path*",
33-
"destination": "https://walrus-testnet-publisher.trusted-point.com/:path*"
41+
"destination": "https://walrus-testnet-publisher.nodes.guru/:path*"
42+
},
43+
{
44+
"source": "/publisher5/:path*",
45+
"destination": "https://publisher.walrus.banansen.dev/:path*"
46+
},
47+
{
48+
"source": "/publisher6/:path*",
49+
"destination": "https://walrus-testnet-publisher.everstake.one/:path*"
3450
},
3551
{
3652
"source": "/(.*)",

examples/frontend/vite.config.ts

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default defineConfig({
99
target: 'https://aggregator.walrus-testnet.walrus.space',
1010
changeOrigin: true,
1111
secure: false,
12-
rewrite: (path) => path.replace(/^\/aggregator/, ''),
12+
rewrite: (path) => path.replace(/^\/aggregator1/, ''),
1313
},
1414
'/aggregator2/v1': {
1515
target: 'https://wal-aggregator-testnet.staketab.org',
@@ -24,10 +24,22 @@ export default defineConfig({
2424
rewrite: (path) => path.replace(/^\/aggregator3/, ''),
2525
},
2626
'/aggregator4/v1': {
27-
target: 'https://walrus-testnet-aggregator.trusted-point.com',
27+
target: 'https://walrus-testnet-aggregator.nodes.guru',
2828
changeOrigin: true,
2929
secure: false,
30-
rewrite: (path) => path.replace(/^\/aggregator3/, ''),
30+
rewrite: (path) => path.replace(/^\/aggregator4/, ''),
31+
},
32+
'/aggregator5/v1': {
33+
target: 'https://aggregator.walrus.banansen.dev',
34+
changeOrigin: true,
35+
secure: false,
36+
rewrite: (path) => path.replace(/^\/aggregator5/, ''),
37+
},
38+
'/aggregator6/v1': {
39+
target: 'https://walrus-testnet-aggregator.everstake.one',
40+
changeOrigin: true,
41+
secure: false,
42+
rewrite: (path) => path.replace(/^\/aggregator6/, ''),
3143
},
3244
'/publisher1/v1': {
3345
target: 'https://publisher.walrus-testnet.walrus.space',
@@ -48,10 +60,22 @@ export default defineConfig({
4860
rewrite: (path) => path.replace(/^\/publisher3/, ''),
4961
},
5062
'/publisher4/v1': {
51-
target: 'https://walrus-testnet-publisher.trusted-point.com',
63+
target: 'https://walrus-testnet-publisher.nodes.guru',
5264
changeOrigin: true,
5365
secure: false,
54-
rewrite: (path) => path.replace(/^\/publisher3/, ''),
66+
rewrite: (path) => path.replace(/^\/publisher4/, ''),
67+
},
68+
'/publisher5/v1': {
69+
target: 'https://publisher.walrus.banansen.dev',
70+
changeOrigin: true,
71+
secure: false,
72+
rewrite: (path) => path.replace(/^\/publisher5/, ''),
73+
},
74+
'/publisher6/v1': {
75+
target: 'https://walrus-testnet-publisher.everstake.one',
76+
changeOrigin: true,
77+
secure: false,
78+
rewrite: (path) => path.replace(/^\/publisher6/, ''),
5579
},
5680
},
5781
},

0 commit comments

Comments
 (0)