Use NTF RPC create ntf offer

I want to create an offer through the chia rpc wallet create_offer_for_ids instruction but I don’t know what the parameters are。Who can tell me

coco@cocos-MBP daemon % ./chia rpc wallet create_offer_for_ids ‘{“offer”:{“nft15ky645meswangfh7723ywgvzf43lu5wkwlzqn9v455ywkqtn4fnqvrmt7w”:-1,“2”:1000},“free”:200}’
Request failed: {‘error’: “invalid literal for int() with base 10: ‘nft15ky645meswangfh7723ywgvzf43lu5wkwlzqn9v455ywkqtn4fnqvrmt7w’”, ‘success’: False}
coco@cocos-MBP daemon %

coco@cocos-MBP daemon % ./chia wallet make_offer -o “nft15ky645meswangfh7723ywgvzf43lu5wkwlzqn9v455ywkqtn4fnqvrmt7w”:-1 -r “2”:100 -p ./a.txt

Wallet keys:

    • 3872970220 (Synced)
  1. 137414125

Choose a wallet key [1-2] (‘q’ to quit, or Enter to use 3872970220): 1

Exception from ‘wallet’ {‘error’: “‘NFTWallet’ object has no attribute ‘get_name’”, ‘success’: False}

Try this:

./chia wallet make_offer -o "nft15ky645meswangfh7723ywgvzf43lu5wkwlzqn9v455ywkqtn4fnqvrmt7w:1" -r "2":100 -p ./a.txt

I want to create using RPC, but the following error occurred:

/chia rpc wallet create_offer_for_ids ‘{“offer”:{“f6d3ba16a0eb8982b7569fdaaec045ad862d743f1dc60b75969457b423e48c50”:1,“1”:-1000}}’
Request failed: {‘error’: ‘Error creating offer: driver_dict specified PuzzleInfo(info={'type': 'CAT', 'tail': '0xf6d3ba16a0eb8982b7569fdaaec045ad862d743f1dc60b75969457b423e48c50'}), was expecting PuzzleInfo(info={'type': 'singleton', 'launcher_id': '0xf6d3ba16a0eb8982b7569fdaaec045ad862d743f1dc60b75969457b423e48c50', 'launcher_ph': '0xeff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9', 'also': {'type': 'metadata', 'metadata': '((117 “https://6l2ishk4sqnim2jzprnxi3cei4v7qyierzhs32zumwsxfzpeb4.arweave.net/8vSJHV_yUGoZpOXxbdGxERyv4YQSOTy3rNGWlcuXkDw”) (104 . 0xbee2cae0cc2cc8fe93b61e29e8aeb70f09ce27fa59b9ec1af3b74aa285c7240a) (28021 “https://drdk5rb4r7ci5x4mqdqlxlwlxircbiml5xytryllpil2junvhy.arweave.net/HEauxDyPxI7fjIDgu67LuiIgo-Yvt8Tjha3oXpNG1Ps”) (28008 . 0xcf36c5c42f080db75fe907a7f0d38d5f9f90a2ffd827540b452b2086c7b15e1e) (27765) (27752 . 0x00) (29550 . 1) (29556 . 1))', 'updater_hash': '0xfe8a4b4e27a2e29a4d3fc7ce9d527adbcaccbab6ada3903ccf3ba9a769d2d78b', 'also': {'type': 'ownership', 'owner': '()', 'transfer_program': {'type': 'royalty transfer program', 'launcher_id': '0xf6d3ba16a0eb8982b7569fdaaec045ad862d743f1dc60b75969457b423e48c50', 'royalty_address': '0x50c065d539852dc1a51a735fa37a6d29598ad4c01248854269521c31617143be', 'royalty_percentage': '500'}}}})’, ‘success’: False}
coco@cocos-MBP daemon %

thank you I’ve solved it

1 Like

If you want to use NFT RPC you have to use launcher_id (aka launcher coin id). Here is some example:

{
    "offer": {
        "1": 1000000000000,
        "cc4138f8debe4fbedf26ccae0f965be19c67a49d525f1416c0749c3c865dxxx": -1
    },
    "fee": 50000000
}