forked from storacha/w3ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
experiment: get sign-up-in connected to localhost access-api
this includes a hasty workaround for storacha/w3up#344
- Loading branch information
Showing
3 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// via https://filecoinproject.slack.com/archives/C02BZPRS9HP/p1669658502951759?thread_ts=1669658366.189139&cid=C02BZPRS9HP | ||
|
||
import { connect } from '@ucanto/client' | ||
import { CAR, CBOR, HTTP } from '@ucanto/transport' | ||
import * as DID from '@ipld/dag-ucan/did' | ||
|
||
// export const accessServiceURL = new URL('https://w3access-staging.protocol-labs.workers.dev') | ||
// export const accessServicePrincipal = DID.parse('did:key:z6MkwTYX2JHHd8bmaEuDdS1LJjrpFspirjDcQ4DvAiDP49Gm') | ||
export const accessServiceURL = new URL('http://localhost:8787') | ||
export const accessServicePrincipal = DID.parse('did:web:local.web3.storage') | ||
|
||
|
||
export const accessServiceConnection = connect({ | ||
id: accessServicePrincipal, | ||
encoder: CAR, | ||
decoder: CBOR, | ||
channel: HTTP.open({ | ||
url: accessServiceURL, | ||
method: 'POST' | ||
}) | ||
}) | ||
|
||
export const uploadServiceURL = new URL('https://staging.up.web3.storage') | ||
export const uploadServicePrincipal = DID.parse('did:key:z6MkhcbEpJpEvNVDd3n5RurquVdqs5dPU16JDU5VZTDtFgnn') | ||
|
||
export const uploadServiceConnection = connect({ | ||
id: uploadServicePrincipal, | ||
encoder: CAR, | ||
decoder: CBOR, | ||
channel: HTTP.open({ | ||
url: uploadServiceURL, | ||
method: 'POST' | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters