示例#1
0
# IDENT
msgstr = MM_util.createidentmsgstr( mod_btc, mod_bm, "MM mod" )
mod = savemsg(mod_btc, 'ident', msgstr)
print mod

msgstr = MM_util.createidentmsgstr( vendor_btc, vendor_bm, "MM vendor" )
vendor = savemsg(vendor_btc, 'ident', msgstr)
print vendor

msgstr = MM_util.createidentmsgstr( buyer_btc, buyer_bm, "MM buyer" )
buyer = savemsg(buyer_btc, 'ident', msgstr)
print buyer

# TAG
msgstr = MM_util.createtagmsgstr( vendor_btc, vendor.hash, "Anything", \
                "The most useless tag of all! Can be ascribed to anything." )
tag = savemsg(vendor_btc, 'tags', msgstr)
print tag

# MARKET
msgstr = MM_util.createmarketmsgstr( mod_btc, mod.hash, "MEGAMARKET", \
                "Where all the people can trade all the things!",
                "0.1",
                "10" )
market = savemsg(mod_btc, 'market', msgstr)
print market

# REG
vreg_txid = "721c2cfcb6a170eda89d667dd217e543f63a6b131499ed90ada1e28ee6c377c3"
msgstr = MM_util.createregmsgstr(vendor_btc, mod.hash, vendor.hash, vreg_txid)
vreg = savemsg(vendor_btc, 'reg', msgstr)
示例#2
0
# IDENT
msgstr = MM_util.createidentmsgstr(mod_btc, mod_bm, "MM mod")
mod = savemsg(mod_btc, 'ident', msgstr)
print mod

msgstr = MM_util.createidentmsgstr(vendor_btc, vendor_bm, "MM vendor")
vendor = savemsg(vendor_btc, 'ident', msgstr)
print vendor

msgstr = MM_util.createidentmsgstr(buyer_btc, buyer_bm, "MM buyer")
buyer = savemsg(buyer_btc, 'ident', msgstr)
print buyer

# TAG
msgstr = MM_util.createtagmsgstr( vendor_btc, vendor.hash, "Anything", \
                "The most useless tag of all! Can be ascribed to anything." )
tag = savemsg(vendor_btc, 'tags', msgstr)
print tag

# MARKET
msgstr = MM_util.createmarketmsgstr( mod_btc, mod.hash, "MEGAMARKET", \
                "Where all the people can trade all the things!",
                "0.1",
                "10" )
market = savemsg(mod_btc, 'market', msgstr)
print market

# REG
vreg_txid = "721c2cfcb6a170eda89d667dd217e543f63a6b131499ed90ada1e28ee6c377c3"
msgstr = MM_util.createregmsgstr(vendor_btc, mod.hash, vendor.hash, vreg_txid)
vreg = savemsg(vendor_btc, 'reg', msgstr)