-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
286 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
type CanisterInitData = record { | ||
logo : text; | ||
name : text; | ||
custodians : vec principal; | ||
symbol : text; | ||
supported_interfaces : vec SupportedInterface; | ||
}; | ||
type GenericValue = variant { | ||
Nat64Content : nat64; | ||
Nat32Content : nat32; | ||
BoolContent : bool; | ||
Nat8Content : nat8; | ||
Int64Content : int64; | ||
IntContent : int; | ||
NatContent : nat; | ||
Nat16Content : nat16; | ||
Int32Content : int32; | ||
Int8Content : int8; | ||
FloatContent : float64; | ||
Int16Content : int16; | ||
BlobContent : blob; | ||
NestedContent : vec record { text; GenericValue }; | ||
Principal : principal; | ||
TextContent : text; | ||
}; | ||
type Metadata = record { | ||
logo : opt text; | ||
name : opt text; | ||
created_at : nat64; | ||
upgraded_at : nat64; | ||
custodians : vec principal; | ||
symbol : opt text; | ||
}; | ||
type NftError = variant { | ||
UnauthorizedOperator; | ||
SelfTransfer; | ||
TokenNotFound; | ||
UnauthorizedOwner; | ||
TxNotFound; | ||
SelfApprove; | ||
OperatorNotFound; | ||
ExistedNFT; | ||
OwnerNotFound; | ||
Other : text; | ||
}; | ||
type Result = variant { Ok : nat; Err : NftError }; | ||
type Result_1 = variant { Ok : bool; Err : NftError }; | ||
type Result_2 = variant { Ok : opt principal; Err : NftError }; | ||
type Result_3 = variant { Ok : vec nat; Err : NftError }; | ||
type Result_4 = variant { Ok : vec TokenMetadata; Err : NftError }; | ||
type Result_5 = variant { Ok; Err : NftError }; | ||
type Result_6 = variant { Ok : TokenMetadata; Err : NftError }; | ||
type Result_7 = variant { Ok : TxEvent; Err : NftError }; | ||
type Stats = record { | ||
cycles : nat; | ||
total_transactions : nat; | ||
total_unique_holders : nat; | ||
total_supply : nat; | ||
}; | ||
type SupportedInterface = variant { Burn; Mint; Approval; TransactionHistory }; | ||
type TokenMetadata = record { | ||
transferred_at : opt nat64; | ||
transferred_by : opt principal; | ||
owner : opt principal; | ||
operator : opt principal; | ||
approved_at : opt nat64; | ||
approved_by : opt principal; | ||
properties : vec record { text; GenericValue }; | ||
is_burned : bool; | ||
token_identifier : nat; | ||
burned_at : opt nat64; | ||
burned_by : opt principal; | ||
minted_at : nat64; | ||
minted_by : principal; | ||
}; | ||
type TxEvent = record { | ||
time : nat64; | ||
operation : text; | ||
details : vec record { text; GenericValue }; | ||
caller : principal; | ||
}; | ||
service : (CanisterInitData) -> { | ||
approve : (principal, nat) -> (Result); | ||
balance_of : (principal) -> (Result) query; | ||
burn : (nat) -> (Result); | ||
custodians : () -> (vec principal) query; | ||
cycles : () -> (nat) query; | ||
is_approved_for_all : (principal, principal) -> (Result_1); | ||
logo : () -> (opt text) query; | ||
metadata : () -> (Metadata) query; | ||
mint : (principal, nat, vec record { text; GenericValue }) -> (Result); | ||
name : () -> (opt text) query; | ||
operator_of : (nat) -> (Result_2) query; | ||
operator_token_identifiers : (principal) -> (Result_3) query; | ||
operator_token_metadata : (principal) -> (Result_4) query; | ||
owner_of : (nat) -> (Result_2) query; | ||
owner_token_identifiers : (principal) -> (Result_3) query; | ||
owner_token_metadata : (principal) -> (Result_4) query; | ||
set_approval_for_all : (principal, bool) -> (Result); | ||
set_custodians : (vec principal) -> (); | ||
set_logo : (text) -> (); | ||
set_name : (text) -> (); | ||
set_symbol : (text) -> (); | ||
set_token_property : (nat, text, GenericValue) -> (Result_5); | ||
stats : () -> (Stats) query; | ||
supported_interfaces : () -> (vec SupportedInterface) query; | ||
symbol : () -> (opt text) query; | ||
token_metadata : (nat) -> (Result_6) query; | ||
total_supply : () -> (nat) query; | ||
total_transactions : () -> (nat) query; | ||
total_unique_holders : () -> (nat) query; | ||
transaction : (nat) -> (Result_7) query; | ||
transfer : (principal, nat) -> (Result); | ||
transfer_from : (principal, principal, nat) -> (Result); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters