node_modules/@velas/solana-web3/lib/index.browser.esm.js
/**
   * Find a valid program address
   *
   * Valid program addresses must fall off the ed25519 curve.  This function
   * iterates a nonce until it finds one that when combined with the seeds
   * results in a valid program address.
   */
Find a valid program address
Valid program addresses must fall off the ed25519 curve.  This function
iterates a nonce until it finds one that when combined with the seeds
results in a valid program address.
Find a valid program address Valid program addresses must fall off the ed25519 curve . This function iterates a nonce until it finds one that when combined with the seeds results in a valid program address .
static async findProgramAddress(seeds, programId) {
    let nonce = 255;
    let address;
    while (nonce != 0) {
      try {
        const seedsWithNonce = seeds.concat(buffer.Buffer.from([nonce]));
        address = await this.createProgramAddress(seedsWithNonce, programId);
      } catch (err) {
        nonce--;
        continue;
      }
      return [address, nonce];
    }
    throw new Error("Unable to find a viable program address nonce");
  }
static async findProgramAddress ( seeds , programId ) { let nonce = 255 ; let address ; while ( nonce != 0 ) { try { const seedsWithNonce = seeds . concat ( buffer . Buffer . from ( [ nonce ] ) ) ; address = await this . createProgramAddress ( seedsWithNonce , programId ) ; } catch ( err ) { nonce -- ; continue ; } return [ address , nonce ] ; } throw new Error ( "Unable to find a viable program address nonce" ) ; }
Find a valid program address
 Valid program addresses must fall off the ed25519 curve.
Find a valid program address Valid program addresses must fall off the ed25519 curve .