Map FID to Beneficiary Addresses
Using data from the moxie_resolve.json
file, you can easily import it and map an FID to a beneficiary address very easily using the function defined below:
- TypeScript
- JavaScript
index.ts
import data from "./moxie_resolve.json";
const resolveFidToBeneficiary = (fid: number) => {
return data
?.filter((d) => d?.fid === fid && d?.type === "WALLET_ADDRESS")
?.map((d) => d?.address);
};
index.js
const data = require("./moxie_resolve.json");
const resolveFidToBeneficiary = (fid) => {
return data
?.filter((d) => d?.fid === fid && d?.type === "WALLET_ADDRESS")
?.map((d) => d?.address);
};