# ⚠️ multiApprove(contract, sender, approved, nft

<table><thead><tr><th width="146.5">Feature</th><th>Return raw operation for approving permission for multiple NFT of sender to other accounts.</th></tr></thead><tbody><tr><td>Parameters</td><td><p><code>string</code> | <code>string[]</code> contract address, // If given a string, it is automatically converted to an array filled with the same values. </p><p><code>string</code> sender, </p><p><code>string[]</code> approved, // array of account to approve each nft </p><p><code>int[]</code> nftIdx, // array of index of nft to approve </p><p><code>string</code> currency</p></td></tr><tr><td>Return Value</td><td><code>object</code> approve operation with multi item</td></tr></tbody></table>

example1. approve two nfts with index 0 and 1 of one CA(`0x41…`) to account(`0x07…`).

```javascript
const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const approved = ["0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca", "0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca"];
const nftIdx = [0,1];
const currencyID = "MCC";
const approveOperation = mitum.nft.multiApprove(contractAddress, sender, approved, nftIdx, currencyID);
console.log(approveOperation);

// output
Operation {
  id: 'mitum',
  fact: ApproveFact {
    hint: Hint { s: 'mitum-nft-approve-operation-fact' },
    token: Token { s: '2023-10-10 04:53:48.582 +0000 UTC' },
    _hash: <Buffer 95 13 b1 c0 86 87 f7 d5 2e 18 c4 25 10 fa d8 0b 91 ee 66 c3 92 30 15 d7 c4 43 95 d7 6a 31 6a cc>,
    sender: Address {
      s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
      type: 'mitum'
    },
    items: [ [ApproveItem] ]
  },
  hint: Hint { s: 'mitum-nft-approve-operation' },
  _factSigns: [],
  _hash: <Buffer >
}
```

example2. approve nft with index 0 of CA(`0x41…`) to account(`0x07…`) and nft with index 0 of CA(`0xA1…`) to account(`0xAB…`) at once.

```javascript
const contractAddress = ["0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca", "0xA16532383f12A9a3dF61E9ff997a0211483AA8dEfca"];
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const approved = ["0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca", "0xABC52ebcd61C0D448863df7d69389612953Bc698fca"];
const nftIdx = [0, 0];
const currencyID = "MCC";
const approveOperation = mitum.nft.multiApprove(contractAddress, sender, approved, nftIdx, currencyID);
console.log(approveOperation);

// output
Operation {
  id: 'mitum',
  fact: MintFact {
    hint: Hint { s: 'mitum-nft-mint-operation-fact' },
    token: Token { s: '2025-01-14 03:08:06.751 +0000 UTC' },
    _hash: <Buffer d0 63 9a 8e 8b 4a b5 34 04 cc a3 d5 2a a5 69 1c 83 62 b9 84 97 24 b8 03 78 67 5e 65 fc 48 c5 a0>,
    sender: Address {
      s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
      type: 'mitum'
    },
    items: [ [MintItem], [MintItem] ]
  },
  hint: Hint { s: 'mitum-nft-mint-operation' },
  _factSigns: [],
  _hash: <Buffer >
}
```
