Storage
Class: Storage
Properties overview
- Overrides: Struct({
url: Provable.Array(Field, 2),
}).constructor ↗ - url: Field[]; ↗
- Overrides: Struct({
url: Provable.Array(Field, 2),
}).empty ↗
Methods overview
Defined in: packages/storage/src/storage/storage.ts:8
Represents the off-chain storage information,
such as an IPFS hash.
Extends
- {
url
:Field
[];
}
Constructors
new Storage()
new Storage(value: {
url: [Field, Field];
}): Storage
Defined in: packages/storage/src/storage/storage.ts:11
Parameters
value
url
[Field
, Field
]
Returns
Overrides
Struct({
url: Provable.Array(Field, 2),
}).constructor
Properties
url
url: Field[];
Defined in: packages/storage/src/storage/storage.ts:9
Inherited from
Struct({
url: Provable.Array(Field, 2),
}).url
Methods
isEmpty()
isEmpty(): Bool
Defined in: packages/storage/src/storage/storage.ts:62
Returns
Bool
toString()
toString(): string
Defined in: packages/storage/src/storage/storage.ts:51
Converts the Storage instance to a string.
Returns
string
The string representation of the storage URL.
assertEquals()
static assertEquals(a: Storage, b: Storage): void
Defined in: packages/storage/src/storage/storage.ts:20
Asserts that two Storage instances are equal.
Parameters
a
The first Storage instance.
b
The second Storage instance.
Returns
void
empty()
static empty(): Storage
Defined in: packages/storage/src/storage/storage.ts:58
Returns
Overrides
Struct({
url: Provable.Array(Field, 2),
}).empty
equals()
static equals(a: Storage, b: Storage): Bool
Defined in: packages/storage/src/storage/storage.ts:31
Checks if two Storage instances are equal.
Parameters
a
The first Storage instance.
b
The second Storage instance.
Returns
Bool
A Bool indicating whether the two instances are equal.
fromString()
static fromString(url: string): Storage
Defined in: packages/storage/src/storage/storage.ts:40
Creates a Storage instance from a string.
Parameters
url
string
The string representing the storage URL.
Returns
A new Storage instance.
Updated 10 days ago