# Ts-sdk: How to public share object

**URL:** <https://forums.sui.io/t/ts-sdk-how-to-public-share-object/49149>\
**Category:** SDK\
**Created:** [November 30, 2025, 1:55pm UTC](https://forums.sui.io/t/ts-sdk-how-to-public-share-object/49149 "2025-11-30T13:55:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![plyoteo](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@plyoteo](https://forums.sui.io/u/plyoteo)\
**Post date:** [November 30, 2025, 1:55pm UTC](https://forums.sui.io/t/ts-sdk-how-to-public-share-object/49149/1 "2025-11-30T13:55:36Z")

</div>

In the SUI Move ts-sdk we have the command

tx.transferObjects([obj], address)

for public\_transfer. Is there a command for public\_share\_object?

---

<div class="post-metadata">

**Author:** ![plyoteo](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@plyoteo](https://forums.sui.io/u/plyoteo)\
**Post date:** [December 3, 2025, 3:16pm UTC](https://forums.sui.io/t/ts-sdk-how-to-public-share-object/49149/2 "2025-12-03T15:16:02Z")

</div>

Since I figured it out (by accident mind you comrades), here is the answer for everybody’s future reference:

**myptb.move**

```rust
module trysui::myptb;

use std::string::{String, utf8};

public struct Item has key, store {
    id: UID,
    name: String,
}

public struct Shop has key, store {
    id: UID,
}

public fun mint(
    name: vector<u8>,
    ctx: &mut TxContext): (Item, Shop) {
        let item = Item {
            id: object::new(ctx),
            name: utf8(name),
        };

        let shop = Shop {
            id: object::new(ctx),
            };

        (item, shop)
}

```

**PTB CLI**

```bash
sui client publish
export PACKAGE=<packageId>
export TSHOP=$PACKAGE::myptb::Shop
touch exec.sh
chmod +x exec.sh

```

**exec.sh**

```auto
#!/usr/bin/bash
sui client ptb \
--move-call sui::tx_context::sender \
--assign sender \
--move-call $PACKAGE::myptb::mint '"mycats"' \
--assign res \
--assign item res.0 \
--assign shop res.1 \
--transfer-objects [item] sender \
--move-call sui::transfer::public_share_object "<$TSHOP>" shop

```

and finally

```bash
./exec.sh

```

Works like a dream.
