Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for AuthAccount.check #68

Merged
merged 1 commit into from
May 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/cadence/language/accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,14 @@ pub struct AuthAccount {
/// The path must be a storage path, i.e., only the domain `storage` is allowed
pub fun borrow<T: &Any>(from: StoragePath): T?

/// Returns true if the object in account storage under the given path satisfies the given type,
/// i.e. could be borrowed using the given type.
///
/// The given type must not necessarily be exactly the same as the type of the borrowed object.
///
/// The path must be a storage path, i.e., only the domain `storage` is allowed.
pub fun check<T: &Any>(from: StoragePath): Bool

/// Creates a capability at the given public or private path,
/// which targets the given public, private, or storage path.
///
Expand Down