# setDocument(contract, sender, title, uri, documentHash, currency)

<table data-header-hidden><thead><tr><th width="145.5"></th><th></th></tr></thead><tbody><tr><td>Feature</td><td>Returns raw operation that set document for security token. <br><mark style="color:red;"><strong>Note : Only contract’s owner (or operator) can execute the function.</strong></mark></td></tr><tr><td>Parameters</td><td><code>string</code> contract address, <br><code>string</code> sender, <br><code>string</code> title, <br><code>string</code> uri, <br><code>string</code> documentHash, <br><code>string</code> currency</td></tr><tr><td>Return Value</td><td><code>object</code> setDocumentOperation</td></tr></tbody></table>

example

```javascript
const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const title = "test document title"
const uri = "www.abcd_efgh.com";
const documentHash = "381yXYxtWCavzPxeUXRewT412gbLt2hx7VanKazkBrsnyfPPBdXfoG52Yb2wkF8vC3KJyoWgETpsN6k97mQ8tUXr1CmTedcj";
const currencyID = "MCC";

const setDocumentOperation = mitum.sto.setDocument(contractAddress, sender, title, uri, documentHash, currencyID);
console.log(setDocumentOperation);

//output
Operation {
  id: 'mitum',
  fact: SetDocumentFact {
    hint: Hint { s: 'mitum-sto-set-document-operation-fact' },
    token: Token { s: '2023-11-23 05:20:52.595 +0000 UTC' },
    _hash: <Buffer 9a d3 f7 eb ab 7d 09 a1 d8 32 c1 d9 e3 92 34 46 19 c0 c0 ab 57 84 78 f8 35 d6 32 7e 0d b3 7a 96>,
    sender: Address {
      s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
      type: 'mitum'
    },
    contract: Address {
      s: '0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca',
      type: 'mitum'
    },
    currency: CurrencyID { s: 'MCC' },
    title: 'Sto title',
    uri: 'www.abcd_efgh.com',
    documentHash: '381yXYxtWCavzPxeUXRewT412gbLt2hx7VanKazkBrsnyfPPBdXfoG52Yb2wkF8vC3KJyoWgETpsN6k97mQ8tUXr1CmTedcj'
  },
  hint: Hint { s: 'mitum-sto-set-document-operation' },
  _factSigns: [],
  _hash: <Buffer >
}
```
