( auth: web3.PublicKey, appId: number )
| 18 | } |
| 19 | |
| 20 | export function appAccountKey( |
| 21 | auth: web3.PublicKey, |
| 22 | appId: number |
| 23 | ): web3.PublicKey { |
| 24 | return web3.PublicKey.findProgramAddressSync( |
| 25 | [ |
| 26 | Buffer.from("APP"), |
| 27 | auth.toBuffer(), |
| 28 | new BN(appId).toArrayLike(Buffer, "be", 1), |
| 29 | ], |
| 30 | global.program.programId |
| 31 | )[0] |
| 32 | } |
| 33 | |
| 34 | export function findAppAddress( |
| 35 | auth: web3.PublicKey, |
no test coverage detected