Modules§
Macros§
Structs§
- Empty
Api - Empty
Querier - Empty Querier that is meant to conform the traits expected by the cosmwasm standard contract syntax. It should not be used whatsoever
- External
Event Msg - External event emitted by ownable contracts.
- IdbState
Dump - Serialized contract storage dump used to move state between JS and Rust.
- IdbStorage
- Wrapper around
MemoryStoragewith helpers to load state from browser IndexedDB dumps. - Info
Response - Response payload for ownable info queries.
- Memory
Storage - In-memory
Storageimplementation used for tests and host-side execution. - Metadata
- Standard NFT metadata object.
- NFT
- NFT reference used by ownables.
- Ownable
Info - Core ownable ownership metadata.
Traits§
- Owner
Address - Types that can provide an owner address for ownership checks.
Functions§
- create_
env - Creates a default
Envfor host-side execution. - create_
ownable_ env - Creates an
Envwith 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
senderis 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 anExecuteMsgenum. - ownables_
instantiate_ msg - Adds default ownables fields to an
InstantiateMsgstruct: InstantiateMsg { pub ownable_id: String, pub package: String, pub nft: Option, pub ownable_type: Option , pub network_id: u8, } - ownables_
lock - Adds
Lock {}to anExecuteMsgenum. - ownables_
query_ consumed - Adds
IsConsumed {}to aQueryMsgenum. - ownables_
query_ consumer_ of - Adds
IsConsumerOf { issuer: Addr, consumable_type: String }to aQueryMsgenum. - ownables_
query_ info - Adds
GetInfo {}to aQueryMsgenum. - ownables_
query_ locked - Adds
IsLocked {}to aQueryMsgenum. - ownables_
query_ metadata - Adds
GetMetadata {}to aQueryMsgenum. - ownables_
query_ widget_ state - Adds
GetWidgetState {}to aQueryMsgenum. - ownables_
transfer - Adds
Transfer { to: Addr }to anExecuteMsgenum.