syntax = "proto3";

package nft;

import "koinos/options.proto";

message royalty {
   uint64 percentage = 1 [jstype = JS_STRING];
   bytes address = 2 [(koinos.btype) = ADDRESS];
}

message royalties {
   repeated royalty value = 1;
}

message metadata_args {
   bytes token_id = 1 [(koinos.btype) = HEX];
   string metadata = 2;
}

message info {
   string name = 1;
   string symbol = 2;
   string uri = 3;
   string description = 4;
}

message balance_of_args {
   bytes owner = 1 [(koinos.btype) = ADDRESS];
}

message token {
   bytes token_id = 1 [(koinos.btype) = HEX];
}

message is_approved_for_all_args {
   bytes owner = 1 [(koinos.btype) = ADDRESS];
   bytes operator = 2 [(koinos.btype) = ADDRESS];
}

message mint_args {
   bytes to = 1 [(koinos.btype) = ADDRESS];
   bytes token_id = 2 [(koinos.btype) = HEX];
}

message burn_args {
   bytes token_id = 1 [(koinos.btype) = HEX];
}

message transfer_args {
   bytes from = 1 [(koinos.btype) = ADDRESS];
   bytes to = 2 [(koinos.btype) = ADDRESS];
   bytes token_id = 3 [(koinos.btype) = HEX];
   string memo = 4;
}

message approve_args {
   bytes approver_address = 1 [(koinos.btype) = ADDRESS];
   bytes to = 2 [(koinos.btype) = ADDRESS];
   bytes token_id = 3 [(koinos.btype) = HEX];
}

message set_approval_for_all_args {
   bytes approver_address = 1 [(koinos.btype) = ADDRESS];
   bytes operator_address = 2 [(koinos.btype) = ADDRESS];
   bool approved = 3;
}

message get_operators_args {
   bytes owner = 1 [(koinos.btype) = ADDRESS];
   bytes start = 2 [(koinos.btype) = ADDRESS];
   int32 limit = 3;
   bool descending = 4;
}

message get_operators_return {
   bytes owner = 1 [(koinos.btype) = ADDRESS];
   repeated bytes operators = 2 [(koinos.btype) = ADDRESS];
}

message get_tokens_args {
   bytes start = 1 [(koinos.btype) = HEX];
   int32 limit = 2;
   bool descending = 3;
}

message get_tokens_by_owner_args {
   bytes owner = 1 [(koinos.btype) = ADDRESS];
   bytes start = 2 [(koinos.btype) = HEX];
   int32 limit = 3;
   bool descending = 4;
}

message token_ids {
   repeated bytes token_ids = 1 [(koinos.btype) = HEX];
}