add subname id #20

Closed
zxq9 wants to merge 3 commits from add-subname-id into master
3 changed files with 11 additions and 1 deletions
Showing only changes of commit 91b83cfb89 - Show all commits

View File

@ -32,6 +32,7 @@
| account_pubkey | account_pubkey
| signature | signature
| name | name
| subname
| commitment | commitment
| peer_pubkey | peer_pubkey
| state | state
@ -195,6 +196,7 @@ type2enc(signature) -> ?BASE58;
type2enc(commitment) -> ?BASE58; type2enc(commitment) -> ?BASE58;
type2enc(peer_pubkey) -> ?BASE58; type2enc(peer_pubkey) -> ?BASE58;
type2enc(name) -> ?BASE58; type2enc(name) -> ?BASE58;
type2enc(subname) -> ?BASE58;
type2enc(state) -> ?BASE64; type2enc(state) -> ?BASE64;
type2enc(poi) -> ?BASE64; type2enc(poi) -> ?BASE64;
type2enc(state_trees) -> ?BASE64; type2enc(state_trees) -> ?BASE64;
@ -223,6 +225,7 @@ type2pfx(signature) -> <<"sg">>;
type2pfx(commitment) -> <<"cm">>; type2pfx(commitment) -> <<"cm">>;
type2pfx(peer_pubkey) -> <<"pp">>; type2pfx(peer_pubkey) -> <<"pp">>;
type2pfx(name) -> <<"nm">>; type2pfx(name) -> <<"nm">>;
type2pfx(subname) -> <<"sn">>;
type2pfx(state) -> <<"st">>; type2pfx(state) -> <<"st">>;
type2pfx(poi) -> <<"pi">>; type2pfx(poi) -> <<"pi">>;
type2pfx(state_trees) -> <<"ss">>; type2pfx(state_trees) -> <<"ss">>;
@ -250,6 +253,7 @@ pfx2type(<<"sg">>) -> signature;
pfx2type(<<"cm">>) -> commitment; pfx2type(<<"cm">>) -> commitment;
pfx2type(<<"pp">>) -> peer_pubkey; pfx2type(<<"pp">>) -> peer_pubkey;
pfx2type(<<"nm">>) -> name; pfx2type(<<"nm">>) -> name;
pfx2type(<<"sn">>) -> subname;
pfx2type(<<"st">>) -> state; pfx2type(<<"st">>) -> state;
pfx2type(<<"pi">>) -> poi; pfx2type(<<"pi">>) -> poi;
pfx2type(<<"ss">>) -> state_trees; pfx2type(<<"ss">>) -> state_trees;
@ -277,6 +281,7 @@ byte_size_for_type(oracle_response) -> not_applicable;
byte_size_for_type(account_pubkey) -> 32; byte_size_for_type(account_pubkey) -> 32;
byte_size_for_type(signature) -> 64; byte_size_for_type(signature) -> 64;
byte_size_for_type(name) -> not_applicable; byte_size_for_type(name) -> not_applicable;
byte_size_for_type(subname) -> not_applicable;
byte_size_for_type(commitment) -> 32; byte_size_for_type(commitment) -> 32;
byte_size_for_type(peer_pubkey) -> 32; byte_size_for_type(peer_pubkey) -> 32;
byte_size_for_type(state) -> 32; byte_size_for_type(state) -> 32;

View File

@ -52,6 +52,8 @@ tag(name_preclaim_tx) -> 33;
tag(name_update_tx) -> 34; tag(name_update_tx) -> 34;
tag(name_revoke_tx) -> 35; tag(name_revoke_tx) -> 35;
tag(name_transfer_tx) -> 36; tag(name_transfer_tx) -> 36;
tag(subname) -> 38;
tag(subname_tx) -> 39;
tag(contract) -> 40; tag(contract) -> 40;
tag(contract_call) -> 41; tag(contract_call) -> 41;
tag(contract_create_tx) -> 42; tag(contract_create_tx) -> 42;
@ -109,6 +111,8 @@ rev_tag(33) -> name_preclaim_tx;
rev_tag(34) -> name_update_tx; rev_tag(34) -> name_update_tx;
rev_tag(35) -> name_revoke_tx; rev_tag(35) -> name_revoke_tx;
rev_tag(36) -> name_transfer_tx; rev_tag(36) -> name_transfer_tx;
rev_tag(38) -> subname;
rev_tag(39) -> subname_tx;
rev_tag(40) -> contract; rev_tag(40) -> contract;
rev_tag(41) -> contract_call; rev_tag(41) -> contract_call;
rev_tag(42) -> contract_create_tx; rev_tag(42) -> contract_create_tx;

View File

@ -24,7 +24,7 @@
, val , val
}). }).
-type tag() :: 'account' | 'oracle' | 'name' -type tag() :: 'account' | 'oracle' | 'name' | 'subname'
| 'commitment' | 'contract' | 'channel'. | 'commitment' | 'contract' | 'channel'.
-type val() :: <<_:256>>. -type val() :: <<_:256>>.
-opaque(id() :: #id{}). -opaque(id() :: #id{}).
@ -41,6 +41,7 @@
-define(IS_TAG(___TAG___), ___TAG___ =:= account; -define(IS_TAG(___TAG___), ___TAG___ =:= account;
___TAG___ =:= oracle; ___TAG___ =:= oracle;
___TAG___ =:= name; ___TAG___ =:= name;
___TAG___ =:= subname;
___TAG___ =:= commitment; ___TAG___ =:= commitment;
___TAG___ =:= contract; ___TAG___ =:= contract;
___TAG___ =:= channel ___TAG___ =:= channel