Repository: ../sdks
Add a helper method to get IPFS cost quote before building transaction.
Files to modify
src/websdk/demosclass.ts - Add ipfsQuote method
Implementation
/**
* Get a cost quote for an IPFS operation without submitting a transaction.
* Use this to populate tx.content.custom_charges before signing.
*
* @param fileSize - Size of file in bytes
* @param operation - 'add' or 'pin'
* @returns Cost quote with breakdown
*/
async ipfsQuote(fileSize: number, operation: 'add' | 'pin' = 'add'): Promise<IpfsQuote> {
return this.nodeCall("ipfsQuote", { fileSize, operation })
}
Verification
bun run build in ../sdks must pass
- Commit and push to SDK repo
- WAIT for user to publish new SDK version before continuing
Repository:
../sdksAdd a helper method to get IPFS cost quote before building transaction.
Files to modify
src/websdk/demosclass.ts- Add ipfsQuote methodImplementation
Verification
bun run buildin ../sdks must pass