···4949 * @param {string|null} inviteCode - The invite code you got from the PDS you are migrating to. If null does not include one
5050 * @param {function|null} statusUpdateHandler - a function that takes a string used to update the UI. Like (status) => console.log(status)
5151 * @param {string|null} twoFactorCode - Optional, but needed if it fails with 2fa required
5252+ * @param verificationCode - Optional verification captcha code for account creation if the PDS requires it
5253 */
5353- async migrate(oldHandle, password, newPdsUrl, newEmail, newHandle, inviteCode, statusUpdateHandler = null, twoFactorCode = null) {
5454+ async migrate(oldHandle, password, newPdsUrl, newEmail, newHandle, inviteCode, statusUpdateHandler = null, twoFactorCode = null, verificationCode = null) {
5455 //Leaving this logic that either sets the agent to bsky.social, or the PDS since it's what I found worked best for migrations.
5556 // handleAndPDSResolver should be able to handle it, but there have been edge cases and this was what worked best
5657 oldHandle = cleanHandle(oldHandle);
···115116 if (inviteCode) {
116117 createAccountRequest.inviteCode = inviteCode;
117118 }
119119+ if (verificationCode) {
120120+ createAccountRequest.verificationCode = verificationCode;
121121+ }
118122 const createNewAccount = await newAgent.com.atproto.server.createAccount(
119123 createAccountRequest,
120124 {
···3535 * @param {string|null} inviteCode - The invite code you got from the PDS you are migrating to. If null does not include one
3636 * @param {function|null} statusUpdateHandler - a function that takes a string used to update the UI. Like (status) => console.log(status)
3737 * @param {string|null} twoFactorCode - Optional, but needed if it fails with 2fa required
3838+ * @param verificationCode - Optional verification captcha code for account creation if the PDS requires it
3839 */
3939- migrate(oldHandle: string, password: string, newPdsUrl: string, newEmail: string, newHandle: string, inviteCode: string | null, statusUpdateHandler?: Function | null, twoFactorCode?: string | null): Promise<void>;
4040+ migrate(oldHandle: string, password: string, newPdsUrl: string, newEmail: string, newHandle: string, inviteCode: string | null, statusUpdateHandler?: Function | null, twoFactorCode?: string | null, verificationCode?: any): Promise<void>;
4041 /**
4142 * Sign and submits the PLC operation to officially migrate the account
4243 * @param {string} token - the PLC token sent in the email. If you're just wanting to run this rerun migrate with all the flags set as false except for migratePlcRecord