Client side atproto account migrator in your web browser, along with services for backups and adversarial migrations. pdsmoover.com
pds atproto migrations moo cow
at main 62 lines 2.3 kB view raw
1/** 2 * Class to help find missing blobs from the did's previous PDS and import them into the current PDS 3 */ 4export class MissingBlobs { 5 /** 6 * The user's current PDS agent 7 * @type {AtpAgent} 8 */ 9 currentPdsAgent: AtpAgent; 10 /** 11 * The user's old PDS agent 12 * @type {AtpAgent} 13 */ 14 oldPdsAgent: AtpAgent; 15 /** 16 * the user's did 17 * @type {string|null} 18 */ 19 did: string | null; 20 /** 21 * The user's current PDS url 22 * @type {null} 23 */ 24 currentPdsUrl: any; 25 /** 26 * A list of the missing cids blobs from the old PDS. In this case if a retry upload fails it gets put in this array for the ui 27 * @type {string[]} 28 */ 29 missingBlobs: string[]; 30 /** 31 * Logs the user into the current PDS and gets the account status 32 * @param handle {string} 33 * @param password {string} 34 * @param twoFactorCode {string|null} 35 * @returns {Promise<{accountStatus: OutputSchema, missingBlobsCount: number}>} 36 */ 37 currentAgentLogin(handle: string, password: string, twoFactorCode?: string | null): Promise<{ 38 accountStatus: OutputSchema; 39 missingBlobsCount: number; 40 }>; 41 /** 42 * Logs into the old PDS and gets the account status. 43 * Does not need a handle 44 * since it is assumed the user has already logged in with the current PDS and we are using their did 45 * @param password {string} 46 * @param twoFactorCode {string|null} 47 * @param pdsUrl {string|null} - If you know the url of the old PDS you can pass it in here. If not it will be guessed at from plc ops 48 * @returns {Promise<void>} 49 */ 50 oldAgentLogin(password: string, twoFactorCode?: string | null, pdsUrl?: string | null): Promise<void>; 51 /** 52 * Gets the missing blobs from the old PDS and uploads them to the current PDS 53 * @param statusUpdateHandler {function} - A function to update the status of the migration. This is useful for showing the user the progress of the migration 54 * @returns {Promise<{accountStatus: OutputSchema, missingBlobsCount: number}>} 55 */ 56 migrateMissingBlobs(statusUpdateHandler: Function): Promise<{ 57 accountStatus: OutputSchema; 58 missingBlobsCount: number; 59 }>; 60} 61import { AtpAgent } from '@atproto/api'; 62//# sourceMappingURL=missingBlobs.d.ts.map