-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove circular dependencies form keychain package
- Loading branch information
1 parent
4a29e42
commit 140f62d
Showing
4 changed files
with
58 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { IdentityKeyPair } from './utils'; | ||
|
||
interface RefreshOptions { | ||
gaiaUrl: string; | ||
} | ||
|
||
export interface Identity { | ||
keyPair: IdentityKeyPair; | ||
address: string; | ||
usernames: string[]; | ||
defaultUsername?: string; | ||
profile?: Profile; | ||
profileUrl(gaiaUrl: string): Promise<string>; | ||
appPrivateKey(appDomain: string): string; | ||
fetchNames(): Promise<string[]>; | ||
refresh(opts: RefreshOptions): void; | ||
makeAuthResponse(options: { | ||
appDomain: string; | ||
gaiaUrl: string; | ||
transitPublicKey: string; | ||
scopes: string[] | undefined; | ||
stxAddress: string | undefined; | ||
}): Promise<string>; | ||
} | ||
|
||
const PERSON_TYPE = 'Person'; | ||
const CONTEXT = 'http://schema.org'; | ||
const IMAGE_TYPE = 'ImageObject'; | ||
|
||
export interface ProfileImage { | ||
'@type': typeof IMAGE_TYPE; | ||
name: string; | ||
contentUrl: string; | ||
} | ||
|
||
export interface Profile { | ||
'@type': typeof PERSON_TYPE; | ||
'@context': typeof CONTEXT; | ||
apps?: { | ||
[origin: string]: string; | ||
}; | ||
appsMeta?: { | ||
[origin: string]: { | ||
publicKey: string; | ||
storage: string; | ||
}; | ||
}; | ||
name?: string; | ||
image?: ProfileImage[]; | ||
[key: string]: any; | ||
} |
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
140f62d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: