Skip to content

Storage Costs

Understanding storage costs helps you budget effectively and avoid service interruptions. This guide covers the SDK APIs for calculating costs, funding your account, and querying account state.

Storage operates on a pay-per-epoch model where you deposit USDFC tokens and set allowances that control how much the storage service can spend.

Pricing has two recurring rates and a set of small one-time fees.

ComponentCostNotes
Storage$2.50/TiB/month per copyCharged only while pieces exist. Empty data sets are free.
Proving Service$0.024/data set/monthFlat per-data-set fee, added on top of the storage rate.
CDN egressup to $0.014/GiB downloadedOptional, via Filecoin Beam. About half this when served from cache.

The monthly rate for an active data set is (bytes / TiB) × $2.50 + $0.024. There is no minimum floor.

Each on-chain operation pays a small fee to the storage provider, covering the gas that provider spends on your behalf:

OperationFee
Create data set$0.025
Add pieces$0.0005 + $0.0003 per piece
Schedule piece removals$0.002 per call
Terminate service$0.00112 (user-initiated only)

These are fractions of a cent. Think of them like gas: negligible for normal use, only adding up at very high operation volumes. They are paid from a small lockup reserve (~$0.10) held while the data set is active, not billed separately on every call. See How the fees and lockup work below.

These examples use plain arithmetic for clarity. For programmatic cost calculation, use getUploadCosts() — see Querying Upload Costs below.

Example 1: NFT Collection (10,000 × 5 KiB ≈ 48.82 MiB)

Section titled “Example 1: NFT Collection (10,000 × 5 KiB ≈ 48.82 MiB)”
// 48.82 MiB is tiny, so the storage rate is negligible.
// The recurring cost is dominated by the flat proving fee.
const
const STORAGE_PRICE_PER_TIB_PER_MONTH: 2.5
STORAGE_PRICE_PER_TIB_PER_MONTH
= 2.5;
const
const PROVING_FEE_PER_MONTH: 0.024
PROVING_FEE_PER_MONTH
= 0.024;
const
const storageTiB: number
storageTiB
= 48.82 / 1024 / 1024; // ≈ 0.0000466 TiB
const
const storageCostPerMonth: number
storageCostPerMonth
=
const storageTiB: number
storageTiB
*
const STORAGE_PRICE_PER_TIB_PER_MONTH: 2.5
STORAGE_PRICE_PER_TIB_PER_MONTH
; // ≈ $0.00012
// Per copy, per month
const
const costPerMonth: number
costPerMonth
=
const storageCostPerMonth: number
storageCostPerMonth
+
const PROVING_FEE_PER_MONTH: 0.024
PROVING_FEE_PER_MONTH
; // ≈ 0.0241 USDFC
const
const costFor24Months: number
costFor24Months
=
const costPerMonth: number
costPerMonth
* 24; // ≈ 0.578 USDFC
DurationPer copy
1 month≈ 0.024 USDFC
24 months≈ 0.58 USDFC

The default 2-copy configuration roughly doubles the recurring cost. One-time fees apply once: $0.025 to create the data set plus the per-batch add-pieces fee.


  • Storage: 1,000 users × 100 MiB ≈ 100,000 MiB
  • Traffic: 1,000 users × 100 MiB/month ≈ 100,000 MiB/month egress
const
const STORAGE_PRICE_PER_TIB_PER_MONTH: 2.5
STORAGE_PRICE_PER_TIB_PER_MONTH
= 2.5; // $2.50/TiB/month
const
const PROVING_FEE_PER_MONTH: 0.024
PROVING_FEE_PER_MONTH
= 0.024; // flat per-data-set
const
const CDN_EGRESS_PRICE_PER_TIB: 14
CDN_EGRESS_PRICE_PER_TIB
= 14; // up to $14/TiB on a cache miss
const
const storageMiB: 100000
storageMiB
= 100_000;
const
const egressMiB: 100000
egressMiB
= 100_000;
// Storage: 100,000 MiB ≈ 0.0953 TiB
const
const storageTiB: number
storageTiB
=
const storageMiB: 100000
storageMiB
/ 1024 / 1024;
// Egress: 100,000 MiB ≈ 0.0953 TiB
const
const egressTiB: number
egressTiB
=
const egressMiB: 100000
egressMiB
/ 1024 / 1024;
// Storage cost per month: 0.0953 TiB × $2.50 ≈ $0.238/month
const
const storageCostPerMonth: number
storageCostPerMonth
=
const storageTiB: number
storageTiB
*
const STORAGE_PRICE_PER_TIB_PER_MONTH: 2.5
STORAGE_PRICE_PER_TIB_PER_MONTH
;
// Egress cost per month (worst case, all cache misses): 0.0953 TiB × $14 ≈ $1.334/month
const
const egressCostPerMonth: number
egressCostPerMonth
=
const egressTiB: number
egressTiB
*
const CDN_EGRESS_PRICE_PER_TIB: 14
CDN_EGRESS_PRICE_PER_TIB
;
// Total cost per month: $0.238 + $0.024 proving + $1.334 egress ≈ $1.596/month
const
const totalCostPerMonth: number
totalCostPerMonth
=
const storageCostPerMonth: number
storageCostPerMonth
+
const PROVING_FEE_PER_MONTH: 0.024
PROVING_FEE_PER_MONTH
+
const egressCostPerMonth: number
egressCostPerMonth
;
// Total cost for 24 months: $1.596/month × 24 ≈ $38.30
const
const totalCostFor24Months: number
totalCostFor24Months
=
const totalCostPerMonth: number
totalCostPerMonth
* 24;
Cost ComponentPer Month24 Months
Storage≈ 0.238 USDFC≈ 5.71 USDFC
Proving Service≈ 0.024 USDFC≈ 0.576 USDFC
CDN Egress≈ 1.334 USDFC≈ 32.016 USDFC
Total≈ 1.596 USDFC≈ 38.30 USDFC

Egress here is the worst case where every byte is a cache miss. When content is served from the Filecoin Beam cache, egress is roughly half this.

Most developers can stop at the tables above. This section explains the mechanics behind the per-operation fees and the lockup reserve for anyone who needs the detail.

The proving fee is additive, not a floor. Earlier pricing used a single monthly minimum. The rate is now (bytes / TiB) × $2.50 + $0.024, so storage scales with size and the proving fee is a flat addition per data set. A data set with no pieces pays nothing until the first piece is added.

Add-pieces pricing scales with batch size. Each addPieces call costs $0.0005 + $0.0003 × N, where N is the number of pieces in the batch. The base fee is shared across the batch, so adding many pieces in one call is cheaper per piece than adding them one at a time. When estimating the cost of a single piece, assume the single-piece price ($0.0008); batching only makes it cheaper.

Fees are paid from a small lockup reserve, not billed per call. When a data set is created, ~$0.10 of USDFC is locked as a lifecycle reserve on the data set’s payment rail. One-time fees are drawn from this reserve as operations happen, and the reserve is topped back up toward its target as it is drawn down. You see ~$0.10 of additional locked USDFC while the data set is active. It is refunded when the rail is finalized.

Why the reserve exists: wind-down after termination

Filecoin Pay does not allow raising a rail’s fixed lockup once the rail has been terminated. The lifecycle reserve gives you headroom to run wind-down operations (such as scheduling piece removals) after termination, when the reserve can no longer be refilled.

If you expect to need more wind-down operations than the reserve covers, fund the reserve before terminating. User-initiated termination charges the $0.00112 termination fee and makes a best-effort top-up of the reserve. Provider-initiated termination charges no fee and does not top up, so those data sets are limited to whatever was in the reserve at termination.

For the full lockup model (streaming versus fixed lockup, rail settlement, finalization), see the Filecoin Pay spec. The Payments & Storage cookbook covers the same mechanics in SDK terms, though its pricing figures predate this update.

Use getUploadCosts() to preview costs without executing any transaction. This is useful for displaying pricing in a UI or letting users confirm before proceeding.

Getting the costs for uploading to an existing data set:

// With currentDataSetSize — accurate floor-aware delta
const {
const rate: {
perEpoch: bigint;
perMonth: bigint;
}
rate
,
const depositNeeded: bigint
depositNeeded
} = await
const synapse: Synapse
synapse
.
Synapse.storage: StorageManager
storage
.
StorageManager.getUploadCosts(options: Omit<GetUploadCostsOptions, "clientAddress">): Promise<UploadCosts>
getUploadCosts
({
isNewDataSet?: boolean | undefined
isNewDataSet
: false,
currentDataSetSize?: bigint | undefined
currentDataSetSize
: 50n *
const SIZE_CONSTANTS: {
readonly KiB: 1024n;
readonly MiB: bigint;
readonly GiB: bigint;
readonly TiB: bigint;
readonly PiB: bigint;
readonly MAX_UPLOAD_SIZE: 1065353216;
readonly MIN_UPLOAD_SIZE: 127;
readonly DEFAULT_UPLOAD_BATCH_SIZE: 32;
readonly BYTES_PER_LEAF: 32n;
}
SIZE_CONSTANTS
.
type MiB: bigint
MiB
,
dataSize: bigint
dataSize
: 100n *
const SIZE_CONSTANTS: {
readonly KiB: 1024n;
readonly MiB: bigint;
readonly GiB: bigint;
readonly TiB: bigint;
readonly PiB: bigint;
readonly MAX_UPLOAD_SIZE: 1065353216;
readonly MIN_UPLOAD_SIZE: 127;
readonly DEFAULT_UPLOAD_BATCH_SIZE: 32;
readonly BYTES_PER_LEAF: 32n;
}
SIZE_CONSTANTS
.
type MiB: bigint
MiB
,
})
// Shows incremental cost (newRate - currentRate), handles floor-to-floor
// Without currentDataSetSize — safe overestimate for floor cases
const
const costs2: getUploadCosts.OutputType
costs2
= await
const synapse: Synapse
synapse
.
Synapse.storage: StorageManager
storage
.
StorageManager.getUploadCosts(options: Omit<GetUploadCostsOptions, "clientAddress">): Promise<UploadCosts>
getUploadCosts
({
isNewDataSet?: boolean | undefined
isNewDataSet
: false,
dataSize: bigint
dataSize
: 100n *
const SIZE_CONSTANTS: {
readonly KiB: 1024n;
readonly MiB: bigint;
readonly GiB: bigint;
readonly TiB: bigint;
readonly PiB: bigint;
readonly MAX_UPLOAD_SIZE: 1065353216;
readonly MIN_UPLOAD_SIZE: 127;
readonly DEFAULT_UPLOAD_BATCH_SIZE: 32;
readonly BYTES_PER_LEAF: 32n;
}
SIZE_CONSTANTS
.
type MiB: bigint
MiB
,
})
// Accurate for above-floor datasets, overestimates for floor-priced ones

Getting the costs for uploading to a new data set:

const {
const rate: {
perEpoch: bigint;
perMonth: bigint;
}
rate
,
const depositNeeded: bigint
depositNeeded
,
const needsFwssMaxApproval: boolean
needsFwssMaxApproval
,
const ready: boolean
ready
} = await
const synapse: Synapse
synapse
.
Synapse.storage: StorageManager
storage
.
StorageManager.getUploadCosts(options: Omit<GetUploadCostsOptions, "clientAddress">): Promise<UploadCosts>
getUploadCosts
({
dataSize: bigint
dataSize
: 100n *
const SIZE_CONSTANTS: {
readonly KiB: 1024n;
readonly MiB: bigint;
readonly GiB: bigint;
readonly TiB: bigint;
readonly PiB: bigint;
readonly MAX_UPLOAD_SIZE: 1065353216;
readonly MIN_UPLOAD_SIZE: 127;
readonly DEFAULT_UPLOAD_BATCH_SIZE: 32;
readonly BYTES_PER_LEAF: 32n;
}
SIZE_CONSTANTS
.
type MiB: bigint
MiB
,
isNewDataSet?: boolean | undefined
isNewDataSet
: true,
withCDN?: boolean | undefined
withCDN
: true,
})
// Storage rate per epoch (30 seconds)
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Rate per epoch:",
function formatUnits(value: bigint, options?: FormatUnitsOptions): string
formatUnits
(
const rate: {
perEpoch: bigint;
perMonth: bigint;
}
rate
.
perEpoch: bigint
perEpoch
), "USDFC")
// Storage rate per month
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Rate per month:",
function formatUnits(value: bigint, options?: FormatUnitsOptions): string
formatUnits
(
const rate: {
perEpoch: bigint;
perMonth: bigint;
}
rate
.
perMonth: bigint
perMonth
), "USDFC")
// USDFC to deposit
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Deposit needed:",
function formatUnits(value: bigint, options?: FormatUnitsOptions): string
formatUnits
(
const depositNeeded: bigint
depositNeeded
), "USDFC")
// Whether FWSS needs to be approved
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Needs approval:",
const needsFwssMaxApproval: boolean
needsFwssMaxApproval
)
// Whether the account is ready to upload
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Ready to upload:",
const ready: boolean
ready
)

Before uploading, the WarmStorage operator must be approved and your account must be funded. FWSS uses a 30-day lockup (prepayment) period. If your account becomes underfunded, the provider may terminate the storage agreement, after which you have 30 days before data removal.

prepare() computes costs and returns a ready-to-execute transaction. This is the recommended approach — it handles deposit calculation, operator approval, and contract call routing in one step.

const {
const costs: getUploadCosts.OutputType
costs
,
const transaction: {
depositAmount: bigint;
includesApproval: boolean;
execute: (options?: {
onHash?: (hash: Hash) => void;
}) => Promise<{
hash: Hash;
receipt: import("viem").TransactionReceipt | null;
}>;
} | null
transaction
} = await
const synapse: Synapse
synapse
.
Synapse.storage: StorageManager
storage
.
StorageManager.prepare(options: PrepareOptions): Promise<PrepareResult>
prepare
({
PrepareOptions.dataSize: bigint
dataSize
:
const SIZE_CONSTANTS: {
readonly KiB: 1024n;
readonly MiB: bigint;
readonly GiB: bigint;
readonly TiB: bigint;
readonly PiB: bigint;
readonly MAX_UPLOAD_SIZE: 1065353216;
readonly MIN_UPLOAD_SIZE: 127;
readonly DEFAULT_UPLOAD_BATCH_SIZE: 32;
readonly BYTES_PER_LEAF: 32n;
}
SIZE_CONSTANTS
.
type GiB: bigint
GiB
,
})
// Inspect costs
const {
const rate: {
perEpoch: bigint;
perMonth: bigint;
}
rate
,
const depositNeeded: bigint
depositNeeded
} =
const costs: getUploadCosts.OutputType
costs
// Upload costs breakdown
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Rate per month:",
function formatUnits(value: bigint, options?: FormatUnitsOptions): string
formatUnits
(
const rate: {
perEpoch: bigint;
perMonth: bigint;
}
rate
.
perMonth: bigint
perMonth
))
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Deposit needed:",
function formatUnits(value: bigint, options?: FormatUnitsOptions): string
formatUnits
(
const depositNeeded: bigint
depositNeeded
))
// Execute if the account isn't ready
if (
const transaction: {
depositAmount: bigint;
includesApproval: boolean;
execute: (options?: {
onHash?: (hash: Hash) => void;
}) => Promise<{
hash: Hash;
receipt: import("viem").TransactionReceipt | null;
}>;
} | null
transaction
) {
const {
const depositAmount: bigint
depositAmount
,
const includesApproval: boolean
includesApproval
} =
const transaction: {
depositAmount: bigint;
includesApproval: boolean;
execute: (options?: {
onHash?: (hash: Hash) => void;
}) => Promise<{
hash: Hash;
receipt: import("viem").TransactionReceipt | null;
}>;
}
transaction
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Deposit amount:",
function formatUnits(value: bigint, options?: FormatUnitsOptions): string
formatUnits
(
const depositAmount: bigint
depositAmount
))
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Includes approval:",
const includesApproval: boolean
includesApproval
)
const {
const hash: `0x${string}`
hash
} = await
const transaction: {
depositAmount: bigint;
includesApproval: boolean;
execute: (options?: {
onHash?: (hash: Hash) => void;
}) => Promise<{
hash: Hash;
receipt: import("viem").TransactionReceipt | null;
}>;
}
transaction
.
execute: (options?: {
onHash?: (hash: Hash) => void;
}) => Promise<{
hash: Hash;
receipt: import("viem").TransactionReceipt | null;
}>
execute
()
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Transaction confirmed:",
const hash: `0x${string}`
hash
)
}
// Now safe to upload

When storing data across multiple providers, pass an array of contexts. The SDK aggregates per-context lockup while computing account-level values (debt, runway, buffer) once.

import {
class Synapse
Synapse
,
function formatUnits(value: bigint, options?: FormatUnitsOptions): string
formatUnits
,
const SIZE_CONSTANTS: {
readonly KiB: 1024n;
readonly MiB: bigint;
readonly GiB: bigint;
readonly TiB: bigint;
readonly PiB: bigint;
readonly MAX_UPLOAD_SIZE: 1065353216;
readonly MIN_UPLOAD_SIZE: 127;
readonly DEFAULT_UPLOAD_BATCH_SIZE: 32;
readonly BYTES_PER_LEAF: 32n;
}
SIZE_CONSTANTS
,
const TIME_CONSTANTS: {
readonly EPOCH_DURATION: 30;
readonly EPOCHS_PER_HOUR: 120n;
readonly EPOCHS_PER_DAY: 2880n;
readonly EPOCHS_PER_MONTH: 86400n;
readonly DAYS_PER_MONTH: 30n;
readonly DEFAULT_LOCKUP_DAYS: 30n;
readonly PERMIT_DEADLINE_DURATION: 3600;
}
TIME_CONSTANTS
} from "@filoz/synapse-sdk"
import {
function privateKeyToAccount(privateKey: Hex, options?: PrivateKeyToAccountOptions): PrivateKeyAccount

@description Creates an Account from a private key.

@returnsA Private Key Account.

privateKeyToAccount
} from 'viem/accounts'
const
const synapse: Synapse
synapse
=
class Synapse
Synapse
.
Synapse.create(options: SynapseOptions): Synapse
create
({
SynapseOptions.account: `0x${string}` | Account
account
:
function privateKeyToAccount(privateKey: Hex, options?: PrivateKeyToAccountOptions): PrivateKeyAccount

@description Creates an Account from a private key.

@returnsA Private Key Account.

privateKeyToAccount
('0x...'),
SynapseOptions.source: string | null
source
: 'my-app' })
const
const contexts: StorageContext[]
contexts
= await
const synapse: Synapse
synapse
.
Synapse.storage: StorageManager
storage
.
StorageManager.createContexts(options?: CreateContextsOptions): Promise<StorageContext[]>
createContexts
({
CreateContextsOptions.copies?: number | undefined
copies
: 3 })
// 1-year runway
const
const oneYear: bigint
oneYear
=
const TIME_CONSTANTS: {
readonly EPOCH_DURATION: 30;
readonly EPOCHS_PER_HOUR: 120n;
readonly EPOCHS_PER_DAY: 2880n;
readonly EPOCHS_PER_MONTH: 86400n;
readonly DAYS_PER_MONTH: 30n;
readonly DEFAULT_LOCKUP_DAYS: 30n;
readonly PERMIT_DEADLINE_DURATION: 3600;
}
TIME_CONSTANTS
.
type EPOCHS_PER_MONTH: 86400n
EPOCHS_PER_MONTH
* 12n
// Prepare a single deposit covering all 3 copies for 1 year
const {
const costs: getUploadCosts.OutputType
costs
,
const transaction: {
depositAmount: bigint;
includesApproval: boolean;
execute: (options?: {
onHash?: (hash: Hash) => void;
}) => Promise<{
hash: Hash;
receipt: import("viem").TransactionReceipt | null;
}>;
} | null
transaction
} = await
const synapse: Synapse
synapse
.
Synapse.storage: StorageManager
storage
.
StorageManager.prepare(options: PrepareOptions): Promise<PrepareResult>
prepare
({
PrepareOptions.context?: StorageContext | StorageContext[] | undefined
context
:
const contexts: StorageContext[]
contexts
,
PrepareOptions.dataSize: bigint
dataSize
: 50n *
const SIZE_CONSTANTS: {
readonly KiB: 1024n;
readonly MiB: bigint;
readonly GiB: bigint;
readonly TiB: bigint;
readonly PiB: bigint;
readonly MAX_UPLOAD_SIZE: 1065353216;
readonly MIN_UPLOAD_SIZE: 127;
readonly DEFAULT_UPLOAD_BATCH_SIZE: 32;
readonly BYTES_PER_LEAF: 32n;
}
SIZE_CONSTANTS
.
type GiB: bigint
GiB
,
PrepareOptions.extraRunwayEpochs?: bigint | undefined
extraRunwayEpochs
:
const oneYear: bigint
oneYear
,
})
const {
const rate: {
perEpoch: bigint;
perMonth: bigint;
}
rate
,
const depositNeeded: bigint
depositNeeded
,
const ready: boolean
ready
} =
const costs: getUploadCosts.OutputType
costs
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Monthly rate (per copy):",
function formatUnits(value: bigint, options?: FormatUnitsOptions): string
formatUnits
(
const rate: {
perEpoch: bigint;
perMonth: bigint;
}
rate
.
perMonth: bigint
perMonth
), "USDFC")
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Total deposit needed:",
function formatUnits(value: bigint, options?: FormatUnitsOptions): string
formatUnits
(
const depositNeeded: bigint
depositNeeded
), "USDFC")
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Account ready:",
const ready: boolean
ready
)
if (
const transaction: {
depositAmount: bigint;
includesApproval: boolean;
execute: (options?: {
onHash?: (hash: Hash) => void;
}) => Promise<{
hash: Hash;
receipt: import("viem").TransactionReceipt | null;
}>;
} | null
transaction
) {
const {
const hash: `0x${string}`
hash
} = await
const transaction: {
depositAmount: bigint;
includesApproval: boolean;
execute: (options?: {
onHash?: (hash: Hash) => void;
}) => Promise<{
hash: Hash;
receipt: import("viem").TransactionReceipt | null;
}>;
}
transaction
.
execute: (options?: {
onHash?: (hash: Hash) => void;
}) => Promise<{
hash: Hash;
receipt: import("viem").TransactionReceipt | null;
}>
execute
()
var console: Console
console
.
Console.log(...data: any[]): void

The console.log() static method outputs a message to the console.

MDN Reference

log
("Funded:",
const hash: `0x${string}`
hash
)
}

prepare() returns:

  • costs: The full UploadCosts breakdown
  • transaction: A transaction object with execute(), or null if the account is already ready

The transaction automatically picks the right contract call:

  • Needs deposit + approval: calls depositWithPermitAndApproveOperator
  • Needs approval only: calls approveService
  • Needs deposit only: calls depositWithPermit
  • Already ready: returns transaction: null

Read-only APIs for account-level cost visibility.

// Aggregate rate across all active rails
const {
const ratePerEpoch: any
ratePerEpoch
,
const ratePerMonth: any
ratePerMonth
} = await
any
synapse
.
any
payments
.
any
totalAccountRate
()
// Sum of lockupFixed across all rails (including terminated but not finalized)
const {
const totalFixedLockup: any
totalFixedLockup
} = await
any
synapse
.
any
payments
.
any
totalAccountLockup
()
// Total storage size across all live datasets
import {
function getAccountTotalStorageSize(client: Client<Transport, Chain>, options: getAccountTotalStorageSize.OptionsType): Promise<getAccountTotalStorageSize.OutputType>
getAccountTotalStorageSize
} from '@filoz/synapse-core/warm-storage'
const {
const totalSizeBytes: bigint
totalSizeBytes
,
const datasetCount: number
datasetCount
} = await
function getAccountTotalStorageSize(client: Client<Transport, Chain>, options: getAccountTotalStorageSize.OptionsType): Promise<getAccountTotalStorageSize.OutputType>
getAccountTotalStorageSize
(
any
client
, {
address: `0x${string}`
address
: '0x...',
})

All rate values come in both per-epoch (contract-native) and per-month (ratePerEpoch * EPOCHS_PER_MONTH) units. Note that ratePerMonth from totalAccountRate() is computed as ratePerEpoch * EPOCHS_PER_MONTH — this is slightly less than the full-precision rate.perMonth returned by getUploadCosts() due to integer truncation. See Rate Precision for details.