SDK Reference
Initialize SDK
Initialize the SDK
Wallet Functions
Set the Wallet Details
Get Wallet Balance
Send token from one wallet to another
Get Wallet balance using wasm
Get the USD rate by token symbol (e g zcn,eth)
Check whether the wallet id is valid
Get the public encryption key by wallet mnemonic
Get test tokens for testing
Create the wallet
Recover the wallet using wallet mnemonic phrase
Initalize the bridge for calling burn and mint functions
Bridge method to burn ZCN tokens
Bridge method to mint ZCN tokens
Bridge method to get Mint WZCN Payload
Storage Functions
List all the allocations
Create an Allocation
Create an allocation with the given preferred blobbers
Get Allocation Details
Get allocation details based on authTicket
Clear the cache and get the allocation details from blockchain
Freeze the allocation so that the allocation data can no longer be modified
Cancel Allocation
Update the allocation settings
FIle Operation Functions
Bulk Upload FIles with json options
Download your own file or a shared file
List the files with allocationID and remotePath
Generate an authToken that provides the authorization to the holder to the specified file on the remotepath.
Decodes and authTicket
Delete the remote file from blobbers
Rename a file existing already on dStorage. Only the allocation's owner can rename a file
Copy the file to another folder path on blobbers
Move the file to another remote folder path on dStorage. Only the owner of the allocation can copy an object.
Play and stream the video files
Stops the current play
Gets the next segment
Create a folder on the blobbers
Gets the file stats
Download the blocks of a file
Get the lookup hash by allocation id and file path
Blobber Functions
Get Blobbers with filters for creating the allocation
Convert blobber urls to blobber ids
Get blobbers from the network
Smart Contract Functions
Send the raw SmartContract transaction, and verify the result.
Create the readpool in storage SC if the pool is missing.
Gets the information about the read pool for the allocation
Locks given number of tokes for given duration in write pool
Enable the toggle to show the logs
Enable the toggle to hide the logs
init
Initialize the SDK.
Note: Call setWallet method after initializing the SDK. This is mandatory before calling other methods in the SDK.
setWallet
Set the wallet details
Note: Call setWallet method after initializing the SDK. This is mandatory before calling other methods in the SDK.
getBalance
Get wallet balance
sendTransaction
Send the token from one wallet to another
getBalanceWasm
Get wallet balance using wasm
listAllocations
List all the allocations
createAllocation
Create an allocation
createAllocationWithBlobbers
Create an allocation with the given preferred blobbers
getAllocation
Get allocation details
getAllocationFromAuthTicket
Get allocation details based on authTicket
reloadAllocation
Clear the cache and get the allocation details from blockchain
freezeAllocation
Freeze the allocation so that the allocation data can no longer be modified
cancelAllocation
Immediately return all the remaining tokens from challenge pool back to the allocation's owner and cancels the allocation. If blobbers already got some tokens, the tokens will not be returned. Remaining min lock payment to the blobber will be funded from the allocation's write pools.
updateAllocation
Update the allocation settings
bulkUpload
Bulk upload files with json options
download
Download your own file or a shared file.
getFaucetToken
Get the test tokens for testing
executeSmartContract
Send the raw SmartContract transaction, and verify the result
listObjects
List the files with the allocationID and remotePath
share
Generate an authToken that provides the authorization to the holder to the specified file on the remotepath.
showLogs
Enable the toggle to show the logs
hideLogs
Enable the toggle to hide the logs
deleteObject
Delete the remote file from blobbers
renameObject
Rename a file existing already on dStorage. Only the allocation's owner can rename a file.
copyObject
Copy the file to another folder path on blobbers
moveObject
Move the file to another remote folder path on dStorage. Only the owner of the allocation can copy an object.
play
Play and stream the video files
stop
Stops the current play
getNextSegment
Gets the next segment
createDir
Create a folder on the blobbers
getFileStats
Gets the file stats
downloadBlocks
Download the blocks of a file
getUSDRate
Get the USD rate by token symbol (eg zcn, eth)
isWalletID
Check whether the wallet id is valid
getPublicEncryptionKey
Get the public encryption key by mnemonic
getLookupHash
Get the lookup hash by allocation id and path
getAllocationBlobbers
Get blobbers with filters for creating the allocation
getBlobberIds
convert blobber urls to blobber ids
getBlobbers
Get blobbers from the network
createReadPool
Create the readpool in storage SC if the pool is missing.
getReadPoolInfo
Gets the information about the read pool for the allocation
lockWritePool
Locks given number of tokes for given duration in write pool
createWallet
Create the wallet
recoverWallet
Recover the wallet using mnemonic
decodeAuthTicket
Decodes an authTicket
initBridge
Initialize the bridge for calling other bridge methods
burnZCN
Bridge method to burn the ZCN
mintZCN
Bridge method to mint the ZCN
getMintWZCNPayload
Bridge method to get Mint WZCN Payload
Last updated