-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update vanilla sign-up example (#129)
This just updates the vanilla sign up/in example to use the new stuff from #119. I've got the file upload example nearly done as well, but need to wrap things up for the day, so I'll finish it tomorrow. @alanshaw this PR is targeting the branch from #119, so feel free to pull it in there if you want. Otherwise I'll retarget this one after that one merges. Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
- Loading branch information
1 parent
c824e44
commit 012a565
Showing
2 changed files
with
72 additions
and
32 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,29 @@ | ||
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 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' | ||
}) | ||
}) |