Examples
Assuming the address: 19Up4xZ4Y6CBhUcXSQZdo7tHaGNYFn7EUj, according to the protocol, its inherent MetaID is: 8a15022dd74648c5158d237f41e544e6097b3f27dcc85788a4b7470c063ed33c

According to the agreement, the following paths are reserved
/info
: Stores user's basic information such as username and avatar./protocols
: Used for application protocol operations./file
: For file data storage./ft
: For storing user's fungible token (FT) asset actions./nft
: For storing user's non-fungible token (NFT) asset actions./follow
: Stores user's follow list data.
2. Create Username and Avatar
Users can set their username and avatar by constructing PIN
transactions:
Set Username: User sets their
name
toAlice
with thepath
as/info/name
.Set Avatar: User sets a specific avatar with the
path
as/info/avatar
.
Both paths are under the /info
directory, indicating they are part of the user's personal information.
Set Username:
OP_FALSE
OP_IF
metaid
create
/info/name
0
OP_0
OP_0
Alice
OP_ENDIF
Set Avatar:
OP_FALSE
OP_IF
metaid
create
/info/avatar
0
OP_0
image/jpg;binary
<pfp data>
OP_ENDIF

Submitting SimpleBuzz Protocol
Assume a user wants to post a buzz
, they need to create and submit a new PIN
in the /protocols/simplebuzz
section.
This adds the buzz
data to the /protocols/simplebuzz
path, indicating it is a record under the user's SimpleBuzz protocol.
OP_FALSE
OP_IF
metaid
create
/protocols/simplebuzz
0
0
application/json;utf-8
{"content":"Hello bitcoin world!","contentType":"text/plain","createTime":1710741614716,"quoteTx":""}
OP_ENDIF

Modification
When performing a modify
operation, use the @
symbol to point to the PIN
to be modified. For example, to modify a specific PIN
, use @{PINID}
.
OP_FALSE
OP_IF
metaid
modify
@{pinid}
0
0
application/json;utf-8
{"content":"Hello bitcoin world!!!!!!!","contentType":"text/plain","createTime":1710741614716,"quoteTx":""}
OP_ENDIF
Revocation
When performing a revoke
operation, use the @
symbol to point to the PIN
to be revoked. For example, to revoke a specific PIN
, use @{PINID}
.
OP_FALSE
OP_IF
metaid
revoke
@{pinid}
OP_0
OP_0
OP_0
OP_0
OP_ENDIF
Last updated