You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
In order to transform this library into more OOP-conform code I went through the code and wrote together some classes:
Auth
App
AuthRequest
AuthResponse
Profiles
Profile
LoginProfile
Person
Organization
CreativeWork
ProfileToken
Proof
?Service
Facebook
Github
HackerNews
Instagram
LinkedIn
Twitter
Storage
interface GaiaHubConfig
address: string
url_prefix: string
token: string
server: string
class GaiaHub
public static getBucketUrl(gaiaHubUrl: string, appPrivateKey: string): Promise<string>
public static getFullReadUrl(filename: string, gaiaHubConfig: GaiaHubConfig): string
public static connect(gaiaHubUrl: string, challengeSignerHex: string): Promise<GaiaHubConfig>
public static setLocalConnection(): Promise<GaiaHubConfig>
public static getOrSetLocalConnection(): Promise<GaiaHubConfig>
public static upload(path: string, contents: any, gaiaHubConfig: GaiaHubConfig, contentType: string = 'application/octet-stream'): Promise<string>
public getAppBucketUrl(gaiaHubUrl: string, appPrivateKey: string): Promise<string>
public getAppFullReadUrl(path: string, username: string, appOrigin: string, zoneFileLookupURL: string = 'http://localhost:6270/v1/names/'): Promise<string>
public getFile(path: string, decrypt: boolean = true, username?: string, app?: string, zoneFileLookupURL?: string): Promise<string | ArrayBuffer>
public putFile(path: string, content: string | Buffer, encrypt: boolean = true): Promise<string>
public deleteFile(path: string): Promise<void>
Zone files
class ProfileZoneFile
public static fromJSON(json: JsonZoneFile): ProfileZoneFile
public static fromString(string: string): ProfileZoneFile
public readonly name: string
public readonly profileTokenUrl: string
constructor(name: string, profileTokenUrl: string)
public getProfileTokenUrl(): string
public toJSON(): JsonZoneFile
public toString(): string
public resolveToProfile(): Promise<Profile>
public resolveToPerson(): Promise<Person>
Then later getting back to the crypto and operations part of this and trying to put these things into proper classes too.
The text was updated successfully, but these errors were encountered: