Accounts
struct PublicAccount { let address: Address // Storage operations fun getCapability<T>(_ path: Path): Capability<T>? fun getLinkTarget(_ path: Path): Path? }fun getAccount(_ address: Address): PublicAccountstruct AuthAccount { let address: Address // Contract code fun setCode(_ code: [UInt8], ... contractInitializerArguments) // Key management fun addPublicKey(_ publicKey: [UInt8]) fun removePublicKey(_ index: Int) // Storage operations fun save<T>(_ value: T, to: Path) fun load<T>(from: Path): T? fun copy<T: AnyStruct>(from: Path): T? fun borrow<T: &Any>(from: Path): T? fun link<T: &Any>(_ newCapabilityPath: Path, target: Path): Capability<T>? fun getLinkTarget(_ path: Path): Path? fun unlink(_ path: Path) fun getCapability<T: &Any>(_ path Path): Capability<T>? }
Last updated