MystenLabs/sui

Implement ownedInputs in TransactionBlock

Tzal3x opened this issue · 0 comments

Tzal3x commented

We are building a library that needs to know the id of each owned object contained in a TransactionBlock.

Example use case:

let ownerAddress = "0xCAFE";
let id1 = "0x123";  // owned by 0xCAFE
let id2 = "0x456";  // NOT owned by 0xCAFE
const txb = new TransactionBlock();
txb.transferObjects([txb.object(id1), txb.object(id2)], txb.pure(ownerAddress))
return txb.blockData.ownedInputs() // Should return [{kind: "ownedInput", index, type, value: "0x123"}]

Please note that we need the ownedInputs before running signAndExecuteTransactionBlock.

Relative Design document is HERE.

cc: @amnn