diff --git a/docs/release_notes.md b/docs/release_notes.md index 59950f9..ae6e5c0 100644 --- a/docs/release_notes.md +++ b/docs/release_notes.md @@ -35,7 +35,15 @@ Token-id - Each token in your collection has a unique text-based namespace id. Library-id - Each library item in your token's asset library has a unique text-based namespace id. +v0.1.2-2 +* Adds gateway principal to the storage_info_nft_origyn query +* EXT - Adds compatibility for stoic wallet. query getEXTTokenIdentifier(token_id) to get the identifier necessary to add an NFT to a wallet. + +v0.1.2-1 + +* Fixes a bug where two buyers within a few blocks(while token send in flight) could give both set of tokens to the seller. The first to be processed now locks the NFT until the transaction success or fails. +* Also adds royalty_originator_override = "com.origyn.originator.override" that allows a minter to override the collection level originator when minting an nft. v0.1.2 diff --git a/docs/specification.md b/docs/specification.md index 21f50df..a19aaa3 100644 --- a/docs/specification.md +++ b/docs/specification.md @@ -901,6 +901,7 @@ Storage info can be pulled with the code below: allocated_storage: Nat; available_space: Nat; allocations: [AllocationRecordStable]; + gateway: Principal; }; public type AllocationRecordStable = { @@ -2000,23 +2001,26 @@ Features: ### HTTP NFT Information -exos.host/_/canister_id/_/token_id - Returns the primary asset +prptl.io/_/canister_id/_/token_id - Returns the primary asset -exos.host/_/canister_id/_/token_id/preview - Returns the preview asset +prptl.io/_/canister_id/_/token_id/preview - Returns the preview asset -exos.host/_/canister_id/_/token_id/ex - Origyn NFTs are self contained internet addressable objects. All the data for rendering is contained inside the NFT (authors can choose to host data on other platforms). Returns an HTML interface that displays the NFT according to the NFT authors specification. +prptl.io/_/canister_id/_/token_id/ex - Origyn NFTs are self contained internet addressable objects. All the data for rendering is contained inside the NFT (authors can choose to host data on other platforms). Returns an HTML interface that displays the NFT according to the NFT authors specification. -exos.host/_/canister_id/_/token_id/_/library_id - Returns the asset in the library +prptl.io/_/canister_id/_/token_id/_/library_id - Returns the asset in the library -exos.host/_/canister_id/_/token_id/_/library_id/info - Returns a json representation of assets in the library +prptl.io/_/canister_id/_/token_id/_/library_id/info - Returns a json representation of assets in the library -exos.host/_/canister_id/_/token_id/info - Returns a json representation of the metadata, including the library items +prptl.io/_/canister_id/_/token_id/info - Returns a json representation of the metadata, including the library items -exos.host/_/canister_id/_/token_id/info?query=[Query] - Returns a json representation of the metadata passed through a query +prptl.io/_/canister_id/_/token_id/info?query=[Query] - Returns a json representation of the metadata passed through a query ### Collection Information -exos.host/_/canister_id/collection - Returns a json representation of collection information +prptl.io/_/canister_id/collection - Returns a json representation of collection information + +* http routes - /ledger_info/{page}/{page_size} now returns the ledger json for the collection level +* http routes - /-/token_id/ledger_info/{page}/{page_size} now returns the ledger json for the token level diff --git a/src/origyn_nft_reference/main.mo b/src/origyn_nft_reference/main.mo index 27a3747..25537d0 100644 --- a/src/origyn_nft_reference/main.mo +++ b/src/origyn_nft_reference/main.mo @@ -1598,6 +1598,7 @@ shared (deployer) actor class Nft_Canister(__initargs : Types.InitArgs) = this { return #ok({ allocated_storage = state.state.canister_allocated_storage; available_space = state.state.canister_availible_space; + gateway = state.canister(); allocations = Iter.toArray(Iter.map(Map.vals<(Text,Text),Types.AllocationRecord>(state.state.allocations),Types.allocation_record_stabalize)); }); }; diff --git a/src/origyn_nft_reference/metadata.mo b/src/origyn_nft_reference/metadata.mo index 69ee15a..e155065 100644 --- a/src/origyn_nft_reference/metadata.mo +++ b/src/origyn_nft_reference/metadata.mo @@ -1221,7 +1221,7 @@ module { state: Types.State, token_id : Text, caller : Principal, canister : ?Principal, canister_owner: Principal) : Result.Result{ - switch(Map.get(state.state.nft_metadata, Map.thash,token_id)){ + switch(Map.get(state.state.nft_metadata, Map.thash, token_id)){ case(null){ //nft metadata doesn't exist return #err(Types.errors(#token_not_found, "get_metadata_for_token - cannot find token id in metadata- " # token_id, ?caller)); diff --git a/src/origyn_nft_reference/mint.mo b/src/origyn_nft_reference/mint.mo index cc9715e..1638430 100644 --- a/src/origyn_nft_reference/mint.mo +++ b/src/origyn_nft_reference/mint.mo @@ -353,6 +353,7 @@ module { }; var found_metadata : CandyTypes.CandyValue = #Empty; + //try to find existing metadata switch(Map.get(state.state.nft_metadata, Map.thash, id_val)){ case(null){ diff --git a/src/origyn_nft_reference/storage_canister.mo b/src/origyn_nft_reference/storage_canister.mo index 836125d..37b7148 100644 --- a/src/origyn_nft_reference/storage_canister.mo +++ b/src/origyn_nft_reference/storage_canister.mo @@ -196,6 +196,7 @@ shared (deployer) actor class Storage_Canister(__initargs : Types.StorageInitArg allocated_storage = state_current.canister_allocated_storage; available_space = state_current.canister_availible_space; allocations = Iter.toArray(Iter.map(Map.vals<(Text,Text),Types.AllocationRecord>(state_current.allocations),Types.allocation_record_stabalize)); + gateway = state_current.collection_data.owner ; }); }; @@ -204,6 +205,7 @@ shared (deployer) actor class Storage_Canister(__initargs : Types.StorageInitArg return #ok({ allocated_storage = state_current.canister_allocated_storage; available_space = state_current.canister_availible_space; + gateway = state_current.collection_data.owner; allocations = Iter.toArray(Iter.map(Map.vals<(Text,Text),Types.AllocationRecord>(state_current.allocations),Types.allocation_record_stabalize)); }); }; diff --git a/src/origyn_nft_reference/types.mo b/src/origyn_nft_reference/types.mo index 42b7273..c5b85fe 100644 --- a/src/origyn_nft_reference/types.mo +++ b/src/origyn_nft_reference/types.mo @@ -445,6 +445,7 @@ module { allocated_storage: Nat; available_space: Nat; allocations: [AllocationRecordStable]; + gateway: Principal; }; public type BucketData = { diff --git a/src/origyn_storage_reference/storage_canister.mo b/src/origyn_storage_reference/storage_canister.mo index 444ce65..d341585 100644 --- a/src/origyn_storage_reference/storage_canister.mo +++ b/src/origyn_storage_reference/storage_canister.mo @@ -193,6 +193,7 @@ shared (deployer) actor class Storage_Canister(__initargs : Types.StorageInitArg return #ok({ allocated_storage = state_current.canister_allocated_storage; available_space = state_current.canister_availible_space; + gateway = state_current.collection_data.owner ; allocations = Iter.toArray(Iter.map(Map.vals<(Text,Text),Types.AllocationRecord>(state_current.allocations),Types.allocation_record_stabalize)); }); }; @@ -202,6 +203,7 @@ shared (deployer) actor class Storage_Canister(__initargs : Types.StorageInitArg return #ok({ allocated_storage = state_current.canister_allocated_storage; available_space = state_current.canister_availible_space; + gateway = state_current.collection_data.owner ; allocations = Iter.toArray(Iter.map(Map.vals<(Text,Text),Types.AllocationRecord>(state_current.allocations),Types.allocation_record_stabalize)); }); };