( app: web3.PublicKey, tierId: number )
| 51 | } |
| 52 | |
| 53 | export function tierAccountKey( |
| 54 | app: web3.PublicKey, |
| 55 | tierId: number |
| 56 | ): web3.PublicKey { |
| 57 | return web3.PublicKey.findProgramAddressSync( |
| 58 | [ |
| 59 | Buffer.from("SUBSCRIPTION_TIER"), |
| 60 | app.toBuffer(), |
| 61 | new BN(tierId).toArrayLike(Buffer, "be", 1), |
| 62 | ], |
| 63 | global.program.programId |
| 64 | )[0] |
| 65 | } |
| 66 | |
| 67 | export function subscriptionAccountKey( |
| 68 | subscriber: web3.PublicKey, |
no test coverage detected