-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial work on integrating new account model * add new `authorize` function to the keyring context --------- Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
- Loading branch information
Showing
29 changed files
with
530 additions
and
297 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
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
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
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
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,43 @@ | ||
import type { Service } from '@web3-storage/access/types' | ||
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' | ||
import.meta.env.VITE_W3UP_ACCESS_SERVICE_URL | ||
) | ||
export const accessServicePrincipal = DID.parse( | ||
//'did:web:staging.web3.storage' | ||
import.meta.env.VITE_W3UP_ACCESS_SERVICE_DID | ||
) | ||
|
||
export const accessServiceConnection = connect<Service>({ | ||
id: accessServicePrincipal, | ||
encoder: CAR, | ||
decoder: CBOR, | ||
channel: HTTP.open<Record<string, any>>({ | ||
url: accessServiceURL, | ||
method: 'POST', | ||
}), | ||
}) | ||
|
||
export const uploadServiceURL = new URL( | ||
//'https://staging.up.web3.storage' | ||
import.meta.env.VITE_W3UP_UPLOAD_SERVICE_URL | ||
) | ||
export const uploadServicePrincipal = DID.parse( | ||
//'did:web:staging.web3.storage' | ||
import.meta.env.VITE_W3UP_UPLOAD_SERVICE_DID | ||
) | ||
|
||
export const uploadServiceConnection = connect<Service>({ | ||
id: uploadServicePrincipal, | ||
encoder: CAR, | ||
decoder: CBOR, | ||
channel: HTTP.open<Record<string, any>>({ | ||
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
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
Oops, something went wrong.