Skip to main content

Crate ownable_std

Crate ownable_std 

Source

Modules§

abi

Macros§

ownable_host_abi_v1

Structs§

EmptyApi
EmptyQuerier
Empty Querier that is meant to conform the traits expected by the cosmwasm standard contract syntax. It should not be used whatsoever
ExternalEventMsg
External event emitted by ownable contracts.
IdbStateDump
Serialized contract storage dump used to move state between JS and Rust.
IdbStorage
Wrapper around MemoryStorage with helpers to load state from browser IndexedDB dumps.
InfoResponse
Response payload for ownable info queries.
MemoryStorage
In-memory Storage implementation used for tests and host-side execution.
Metadata
Standard NFT metadata object.
NFT
NFT reference used by ownables.
OwnableInfo
Core ownable ownership metadata.

Traits§

OwnerAddress
Types that can provide an owner address for ownership checks.

Functions§

create_env
Creates a default Env for host-side execution.
create_ownable_env
Creates an Env with a configurable chain id and optional timestamp.
derive_rgb_values
takes a hex-encoded hash and derives a seemingly-random rgb tuple
ensure_owner
Verifies that sender is the owner and returns a caller-provided unauthorized error otherwise.
get_random_color
returns a hex color in string format from a hash
load_owned_deps
Builds in-memory dependencies for contract execution, optionally preloaded from IndexedDB dump data.
package_title_from_name
convert an ownable package name into a display title e.g. ownable-my-first -> My First
rgb_hex
takes three u8 values representing rgb values (0-255)f and returns a hex string

Attribute Macros§

ownables_consume
Adds Consume {} to an ExecuteMsg enum.
ownables_instantiate_msg
Adds default ownables fields to an InstantiateMsg struct: InstantiateMsg { pub ownable_id: String, pub package: String, pub nft: Option, pub ownable_type: Option, pub network_id: u8, }
ownables_lock
Adds Lock {} to an ExecuteMsg enum.
ownables_query_consumed
Adds IsConsumed {} to a QueryMsg enum.
ownables_query_consumer_of
Adds IsConsumerOf { issuer: Addr, consumable_type: String } to a QueryMsg enum.
ownables_query_info
Adds GetInfo {} to a QueryMsg enum.
ownables_query_locked
Adds IsLocked {} to a QueryMsg enum.
ownables_query_metadata
Adds GetMetadata {} to a QueryMsg enum.
ownables_query_widget_state
Adds GetWidgetState {} to a QueryMsg enum.
ownables_transfer
Adds Transfer { to: Addr } to an ExecuteMsg enum.