Socket
Socket
Sign inDemoInstall

dsd-client-conn-lib

Package Overview
Dependencies
Maintainers
1
Versions
209
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dsd-client-conn-lib

Provides convenient way to call PDS server API of edzLabs.com's PDS service. Full API reference is located at [app.dase.io](https:*app.dase.io)


Version published
Weekly downloads
11
decreased by-21.43%
Maintainers
1
Weekly downloads
 
Created
Source

Description

Provides convenient way to call PDS server API of edzLabs.com's PDS service. Full API reference is located at app.dase.io

Examples

var CONN = require("dsd-client-conn-lib");
var dsdConn = CONN.connClient2;
var dsdCst = CONN.Consts;
//default host for all is "partner.dase.io"
//but you may specify different hosts and ports like that:
//dsdConn.setCoreServer({ host: "partner.dase.io", port: 5090 });
//dsdConn.setDaseServer({ host: "partner.dase.io", port: 5100 });
//dsdConn.setPdsServer({ host: "partner.dase.io", port: 5200 });
//dsdConn.setKeychainServer({ host: "partner.dase.io", port: 5110 });

function log(title, msg) {
    console.log(title, msg ? msg : "");
 }

log("sendSilver should success");

dsdConn.getCoreClient().sendSilver({
    senderId: "0x003e8c791cb39b4cad756b9c25431d6eb3fed85c",
    senderPassword: "12345678",
    silverAmount: 100,
    toUserId: "0xb35ef3e31f2944d252eda42801caf5d890d1d7f9"
}).then(
    ok => { log("sendSilver ok: ", ok); },
    err => { log("sendSilver err: ", err); }
);

log("sendSilver2 should error");

dsdConn.getDaseClient().sendSilver({
    senderId: "0x003e8c791cb39b4cad756b9c25431d6eb3fed85c",
    senderPassword: "12345678",
    toUserId: "0xb35ef3e31f2944d252eda42801caf5d890d1d7f9"
}).then(
    ok => { log("sendSilver2 ok: ", ok); },
    err => {
        log("sendSilver2 err: ", err);

        *specify error handlers if necessary
        if(err.code === dsdCst.errorCodes.WrongParametersCount.id) {
            log("I have wrong parameters count..."+dsdCst.errorCodes.WrongParametersCount.name);
            *do something
        }
        else if(err.code === dsdCst.errorCodes.ServerSideError.id) {
            log("I have server error..."+ dsdCst.errorCodes.ServerSideError.name);
            *do something
        }
    }
);


console.log("addDab should success");

dsdConn.getPdsClient().addDab({
    ownerId: "0x003e8c791cb39b4cad756b9c25431d6eb3fed85c",
    assetUrl: "http:*localhost",
    ownerPassword: "12345678",
    publicDescription: "new client lib asset"
}).then(
    ok => { log("addDab ok: ", ok); },
    err => { log("addDab err: ", err); }
);

API reference

Core API methods here

DASE API methods here

PDS API methods here

Keychain API methods here

CORE API methods

(Back)

Functions

newUser(password)Keys

Description: Method newUser

newUser_Public(password)Keys

Description: Method newUser_Public

getKeys(userId, password)Keys

Description: Method getKeys

getKeys_Public(userId, password)Keys

Description: Method getKeys_Public

sendWeis_Public(sender, senderPassword, receiver, weiAmount, databytes)Transaction

Description: Method sendWeis_Public

getSilverBalance(userId)Integer

Description: Method getSilverBalance

getAddressByPubKey(pubKey)Address

Description: Method getAddressByPubKey

getSystemAccounts()Object

Description: Method getSystemAccounts

getGoldBalance_Public(userId)Integer

Description: Method getGoldBalance_Public

transferOut(srcUserId, password, destUserId, amount)Transaction

Description: Method transferOut

transferOut_Public(srcUserId, password, destUserId, amount)Transaction

Description: Method transferOut_Public

getBalanceWeis_Public(userId)Integer

Description: Method getBalanceWeis_Public

buyGoldForWeis_Public(userId, password, goldAmount, weisAmount)Integer

Description: Method buyGoldForWeis_Public

weisAmountForGold_Public(userId, goldAmount)Integer

Description: Method weisAmountForGold_Public

getLastBlock()Integer

Description: Method getLastBlock

getLastBlock_Public()Integer

Description: Method getLastBlock_Public

silverCostInGold(userId, silverAmount)Integer

Description: Method silverCostInGold

goldCostInSilver_Public(userId, goldAmount)Integer

Description: Method goldCostInSilver_Public

approveUserToSpendMySilver(fromUserId, password, silverAmount, toUserId)Transaction

Description: Method approveUserToSpendMySilver

approveTreasuryToSpendMySilver(fromUserId, password, silverAmount)Transaction

Description: Method approveTreasuryToSpendMySilver

sendSilver(senderId, senderPassword, silverAmount, toUserId)Transaction

Description: Method sendSilver

sendGold_Public(senderId, senderPassword, goldAmount, toUserId)Transaction

Description: Method sendGold_Public

spendAlienSilver(spenderId, password, fromUserId, silverAmount, toUserId)Transaction

Description: Method spendAlienSilver

isValidUser(account, password)Boolean

Description: Method isValidUser

isValidUser_Public(account, password)Boolean

Description: Method isValidUser_Public

getEligibilityValue(userId)Integer

Description: Method getEligibilityValue

wantVote(userId, userPassword, iWish)Transaction

Description: Method wantVote

getVoteRewardInSilver(userId)Integer

Description: Method getVoteRewardInSilver

getVoteCostInSilver(userId)Integer

Description: Method getVoteCostInSilver

getContractVoters(userId)Address

Description: Method getContractVoters

getQuorumVoters()Address

Description: Method getQuorumVoters

getCandidatesPool(userId)Address

Description: Method getCandidatesPool

isInCandidatesPool(userId)Boolean

Description: Method isInCandidatesPool

hasPledge(userId)Boolean

Description: Method hasPledge

isLicensedForVoting(userId)Boolean

Description: Method isLicensedForVoting

getMyCoinbase()Address

Description: Method getMyCoinbase

withdrawPledge(userId, userPassword)Transaction

Description: Method withdrawPledge

offerBuyVoting(userId, userPassword, silverAmount)Transaction

Description: Method offerBuyVoting

offerExchangeGoldForWeis(seller, sellerPassword, buyer, goldAmount, weisAmount)Boolean

Description: Method offerExchangeGoldForWeis

offerExchangeWeisForGold(seller, sellerPassword, buyer, goldAmount, weisAmount)Boolean

Description: Method offerExchangeWeisForGold

recallExchangeOffer(seller, sellerPassword, offerId)Boolean

Description: Method recallExchangeOffer

getExchangeOffer(userId, offerId)Object

Description: Method getExchangeOffer

getExchangeOffers(userId, offersIds)Object

Description: Method getExchangeOffers

acceptExchangeGoldForWeisOffer(buyer, buyerPassword, offerId, goldAmount)Boolean

Description: Method acceptExchangeGoldForWeisOffer

acceptExchangeWeisForGoldOffer(buyer, buyerPassword, offerId, weisAmount)Boolean

Description: Method acceptExchangeWeisForGoldOffer

declineExchangeOffer(buyer, buyerPassword, offerId)Boolean

Description: Method declineExchangeOffer

getExchangeOffersIdsToMe(userId, pos, size)Integer

Description: Method getExchangeOffersIdsToMe

getExchangeOffersCountFor(userId)Integer

Description: Method getExchangeOffersCountFor

getExchangePurchaseHistory(userId, startBlock)Event

Description: Method getExchangePurchaseHistory

getExchangeSellHistory(userId, startBlock)Event

Description: Method getExchangeSellHistory

sendMessageSecured(userId, userPassword, cipherText)Transaction

Description: Method sendMessageSecured

getMessageSecured(userId, messageId)BytesArray

Description: Method getMessageSecured

getMessagesSecuredCount(userId)Integer

Description: Method getMessagesSecuredCount

getLastReadMessageIndex(userId)Integer

Description: Method getLastReadMessageIndex

setAttributeSecured(userId, userPassword, attrId, cipherText)Transaction

Description: Method setAttributeSecured

getAttributeSecured(userId, attrId)BytesArray

Description: Method getAttributeSecured

newUser(password) ⇒ Keys

Description: Method newUser

Kind: global function
Returns: Keys - Look at Type description in Docs.

ParamType
passwordString

newUser_Public(password) ⇒ Keys

Description: Method newUser_Public

Kind: global function
Returns: Keys - Look at Type description in Docs.

ParamType
passwordString

getKeys(userId, password) ⇒ Keys

Description: Method getKeys

Kind: global function
Returns: Keys - Look at Type description in Docs.

ParamType
userIdAddress
passwordString

getKeys_Public(userId, password) ⇒ Keys

Description: Method getKeys_Public

Kind: global function
Returns: Keys - Look at Type description in Docs.

ParamType
userIdAddress
passwordString

sendWeis_Public(sender, senderPassword, receiver, weiAmount, databytes) ⇒ Transaction

Description: Method sendWeis_Public

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
senderAddress
senderPasswordString
receiverAddress
weiAmountInteger
databytesString

getSilverBalance(userId) ⇒ Integer

Description: Method getSilverBalance

Kind: global function

ParamType
userIdAddress

getAddressByPubKey(pubKey) ⇒ Address

Description: Method getAddressByPubKey

Kind: global function

ParamType
pubKeyString

getSystemAccounts() ⇒ Object

Description: Method getSystemAccounts

Kind: global function

getGoldBalance_Public(userId) ⇒ Integer

Description: Method getGoldBalance_Public

Kind: global function

ParamType
userIdAddress

transferOut(srcUserId, password, destUserId, amount) ⇒ Transaction

Description: Method transferOut

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
srcUserIdAddress
passwordString
destUserIdAddress
amountInteger

transferOut_Public(srcUserId, password, destUserId, amount) ⇒ Transaction

Description: Method transferOut_Public

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
srcUserIdAddress
passwordString
destUserIdAddress
amountInteger

getBalanceWeis_Public(userId) ⇒ Integer

Description: Method getBalanceWeis_Public

Kind: global function

ParamType
userIdAddress

buyGoldForWeis_Public(userId, password, goldAmount, weisAmount) ⇒ Integer

Description: Method buyGoldForWeis_Public

Kind: global function

ParamType
userIdAddress
passwordString
goldAmountInteger
weisAmountInteger

weisAmountForGold_Public(userId, goldAmount) ⇒ Integer

Description: Method weisAmountForGold_Public

Kind: global function

ParamType
userIdAddress
goldAmountInteger

getLastBlock() ⇒ Integer

Description: Method getLastBlock

Kind: global function

getLastBlock_Public() ⇒ Integer

Description: Method getLastBlock_Public

Kind: global function

silverCostInGold(userId, silverAmount) ⇒ Integer

Description: Method silverCostInGold

Kind: global function

ParamType
userIdAddress
silverAmountInteger

goldCostInSilver_Public(userId, goldAmount) ⇒ Integer

Description: Method goldCostInSilver_Public

Kind: global function

ParamType
userIdAddress
goldAmountInteger

approveUserToSpendMySilver(fromUserId, password, silverAmount, toUserId) ⇒ Transaction

Description: Method approveUserToSpendMySilver

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
fromUserIdAddress
passwordString
silverAmountInteger
toUserIdAddress

approveTreasuryToSpendMySilver(fromUserId, password, silverAmount) ⇒ Transaction

Description: Method approveTreasuryToSpendMySilver

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
fromUserIdAddress
passwordString
silverAmountInteger

sendSilver(senderId, senderPassword, silverAmount, toUserId) ⇒ Transaction

Description: Method sendSilver

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
senderIdAddress
senderPasswordString
silverAmountInteger
toUserIdAddress

sendGold_Public(senderId, senderPassword, goldAmount, toUserId) ⇒ Transaction

Description: Method sendGold_Public

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
senderIdAddress
senderPasswordString
goldAmountInteger
toUserIdAddress

spendAlienSilver(spenderId, password, fromUserId, silverAmount, toUserId) ⇒ Transaction

Description: Method spendAlienSilver

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
spenderIdAddress
passwordString
fromUserIdAddress
silverAmountInteger
toUserIdAddress

isValidUser(account, password) ⇒ Boolean

Description: Method isValidUser

Kind: global function

ParamType
accountAddress
passwordString

isValidUser_Public(account, password) ⇒ Boolean

Description: Method isValidUser_Public

Kind: global function

ParamType
accountAddress
passwordString

getEligibilityValue(userId) ⇒ Integer

Description: Method getEligibilityValue

Kind: global function

ParamType
userIdAddress

wantVote(userId, userPassword, iWish) ⇒ Transaction

Description: Method wantVote

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
userIdAddress
userPasswordString
iWishBoolean

getVoteRewardInSilver(userId) ⇒ Integer

Description: Method getVoteRewardInSilver

Kind: global function

ParamType
userIdAddress

getVoteCostInSilver(userId) ⇒ Integer

Description: Method getVoteCostInSilver

Kind: global function

ParamType
userIdAddress

getContractVoters(userId) ⇒ Address

Description: Method getContractVoters

Kind: global function
Returns: Address - - Array of

ParamType
userIdAddress

getQuorumVoters() ⇒ Address

Description: Method getQuorumVoters

Kind: global function
Returns: Address - - Array of

getCandidatesPool(userId) ⇒ Address

Description: Method getCandidatesPool

Kind: global function
Returns: Address - - Array of

ParamType
userIdAddress

isInCandidatesPool(userId) ⇒ Boolean

Description: Method isInCandidatesPool

Kind: global function

ParamType
userIdAddress

hasPledge(userId) ⇒ Boolean

Description: Method hasPledge

Kind: global function

ParamType
userIdAddress

isLicensedForVoting(userId) ⇒ Boolean

Description: Method isLicensedForVoting

Kind: global function

ParamType
userIdAddress

getMyCoinbase() ⇒ Address

Description: Method getMyCoinbase

Kind: global function

withdrawPledge(userId, userPassword) ⇒ Transaction

Description: Method withdrawPledge

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
userIdAddress
userPasswordString

offerBuyVoting(userId, userPassword, silverAmount) ⇒ Transaction

Description: Method offerBuyVoting

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
userIdAddress
userPasswordString
silverAmountInteger

offerExchangeGoldForWeis(seller, sellerPassword, buyer, goldAmount, weisAmount) ⇒ Boolean

Description: Method offerExchangeGoldForWeis

Kind: global function

ParamType
sellerAddress
sellerPasswordString
buyerAddress
goldAmountInteger
weisAmountInteger

offerExchangeWeisForGold(seller, sellerPassword, buyer, goldAmount, weisAmount) ⇒ Boolean

Description: Method offerExchangeWeisForGold

Kind: global function

ParamType
sellerAddress
sellerPasswordString
buyerAddress
goldAmountInteger
weisAmountInteger

recallExchangeOffer(seller, sellerPassword, offerId) ⇒ Boolean

Description: Method recallExchangeOffer

Kind: global function

ParamType
sellerAddress
sellerPasswordString
offerIdInteger

getExchangeOffer(userId, offerId) ⇒ Object

Description: Method getExchangeOffer

Kind: global function

ParamType
userIdAddress
offerIdInteger

getExchangeOffers(userId, offersIds) ⇒ Object

Description: Method getExchangeOffers

Kind: global function
Returns: Object - - Array of

ParamType
userIdAddress
offersIdsInteger

acceptExchangeGoldForWeisOffer(buyer, buyerPassword, offerId, goldAmount) ⇒ Boolean

Description: Method acceptExchangeGoldForWeisOffer

Kind: global function

ParamType
buyerAddress
buyerPasswordString
offerIdInteger
goldAmountInteger

acceptExchangeWeisForGoldOffer(buyer, buyerPassword, offerId, weisAmount) ⇒ Boolean

Description: Method acceptExchangeWeisForGoldOffer

Kind: global function

ParamType
buyerAddress
buyerPasswordString
offerIdInteger
weisAmountInteger

declineExchangeOffer(buyer, buyerPassword, offerId) ⇒ Boolean

Description: Method declineExchangeOffer

Kind: global function

ParamType
buyerAddress
buyerPasswordString
offerIdInteger

getExchangeOffersIdsToMe(userId, pos, size) ⇒ Integer

Description: Method getExchangeOffersIdsToMe

Kind: global function
Returns: Integer - - Array of

ParamTypeDescription
userIdAddress
posInteger(optional. default: 0)
sizeInteger(optional. default: 10)

getExchangeOffersCountFor(userId) ⇒ Integer

Description: Method getExchangeOffersCountFor

Kind: global function

ParamType
userIdAddress

getExchangePurchaseHistory(userId, startBlock) ⇒ Event

Description: Method getExchangePurchaseHistory

Kind: global function
Returns: Event - - Array of Look at Type description in Docs.

ParamType
userIdAddress
startBlockInteger

getExchangeSellHistory(userId, startBlock) ⇒ Event

Description: Method getExchangeSellHistory

Kind: global function
Returns: Event - - Array of Look at Type description in Docs.

ParamType
userIdAddress
startBlockInteger

sendMessageSecured(userId, userPassword, cipherText) ⇒ Transaction

Description: Method sendMessageSecured

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
userIdAddress
userPasswordString
cipherTextBytesArray

getMessageSecured(userId, messageId) ⇒ BytesArray

Description: Method getMessageSecured

Kind: global function

ParamType
userIdAddress
messageIdInteger

getMessagesSecuredCount(userId) ⇒ Integer

Description: Method getMessagesSecuredCount

Kind: global function

ParamType
userIdAddress

getLastReadMessageIndex(userId) ⇒ Integer

Description: Method getLastReadMessageIndex

Kind: global function

ParamType
userIdAddress

setAttributeSecured(userId, userPassword, attrId, cipherText) ⇒ Transaction

Description: Method setAttributeSecured

Kind: global function
Returns: Transaction - Look at Type description in Docs.

ParamType
userIdAddress
userPasswordString
attrIdInteger
cipherTextBytesArray

getAttributeSecured(userId, attrId) ⇒ BytesArray

Description: Method getAttributeSecured

Kind: global function

ParamType
userIdAddress
attrIdInteger

DASE API methods

(Back)

Functions

addDab(ownerId, ownerPassword, assetUrl, publicDescription, linkedDabId, custodians, publicityType, dataHash)Integer

Description: Method addDab

addDabList(ownerId, ownerPassword, dataArr)Integer

Description: Method addDabList

addTag(ownerId, ownerPassword, publicDescription, custodians, title, encryptedKey)Integer

Description: Method addTag

getTagsIdsForDab(dabId, requestor)Integer

Description: Method getTagsIdsForDab

getOwnedDabsIds(userId)Integer

Description: Method getOwnedDabsIds

getSharedDabsIds(userId)Integer

Description: Method getSharedDabsIds

getCustodiedDabsIds(userId)Integer

Description: Method getCustodiedDabsIds

getDabs(userId, dabIds)Asset

Description: Method getDabs

getDabParentsIds(dabId, maxLength, requestor)Integer

Description: Method getDabParentsIds

getTagEncryptedKey(buyer, seller, tagId)Key

Description: Method getTagEncryptedKey

exploreTagRelationsPage(userId, userPassword, rootTagId, tagId, pos)Dab

Description: Method exploreTagRelationsPage

getAvailableDabs(userId, dabTypeCode, licenseTypeCode, pos, size)Dab

Description: Method getAvailableDabs

getAvailableLicenses(userId, dabTypeCode, licenseTypeCode, pos, size)License

Description: Method getAvailableLicenses

getAvailableLicensesForDab(userId, dabId)License

Description: Method getAvailableLicensesForDab

getSellOfferedLicenses(userId, dabTypeCode, licenseTypeCode, pos, size)License

Description: Method getSellOfferedLicenses

getBuyOfferedLicenses(userId, dabTypeCode, licenseTypeCode, pos, size)License

Description: Method getBuyOfferedLicenses

getSellOfferedLicensesForDab(userId, dabId)License

Description: Method getSellOfferedLicensesForDab

getBuyOfferedLicensesForDab(userId, dabId)License

Description: Method getBuyOfferedLicensesForDab

actualiseDeals(userId, userPassword, licenseTypeCode)Boolean

Description: Method actualiseDeals

getDabsPage(userId, startDabId, pageSize)Asset

Description: Method getDabsPage

getDabsForTag(userId, tagTitle, tagId)Asset

Description: Method getDabsForTag

offerSellOwnership(seller, sellerPassword, buyer, dabId, minPrice)Boolean

Description: Method offerSellOwnership

offerBuyOwnership(buyer, buyerPassword, dabId, maxPrice)Boolean

Description: Method offerBuyOwnership

approveOwnershipDeal(custodian, custodianPassword, buyer, dabId)Boolean

Description: Method approveOwnershipDeal

offerBuyCustody(buyer, buyerPassword, dabId, maxPrice)Boolean

Description: Method offerBuyCustody

offerSellCustody(seller, sellerPassword, buyer, dabId, minPrice)Boolean

Description: Method offerSellCustody

approveCustodyDeal(custodian, custodianPassword, buyer, dabId)Boolean

Description: Method approveCustodyDeal

offerSellAccess(seller, sellerPassword, buyerId, dabId, minPrice)Boolean

Description: Method offerSellAccess

offerBuyAccess(buyer, buyerPassword, dabId, maxPrice)Boolean

Description: Method offerBuyAccess

approveAccessDeal(custodian, custodianPassword, buyer, dabId)Boolean

Description: Method approveAccessDeal

offerSellReshare(seller, sellerPassword, buyerId, dabId, minPrice)Boolean

Description: Method offerSellReshare

offerBuyReshare(buyer, buyerPassword, dabId, maxPrice)Boolean

Description: Method offerBuyReshare

approveReshareDeal(custodian, custodianPassword, buyer, dabId)Boolean

Description: Method approveReshareDeal

offerSellTag(seller, sellerPassword, buyerId, dabId, minPrice, tagId)Boolean

Description: Method offerSellTag

offerBuyTag(buyer, buyerPassword, dabId, maxPrice, tagId)Boolean

Description: Method offerBuyTag

approveTagDeal(custodian, custodianPassword, buyer, dabId, tagId)Boolean

Description: Method approveTagDeal

offerSellTagAccess(seller, sellerPassword, buyerId, dabId, minPrice)Boolean

Description: Method offerSellTagAccess

offerBuyTagAccess(buyer, buyerPassword, dabId, maxPrice)Boolean

Description: Method offerBuyTagAccess

approveTagAccessDeal(custodian, custodianPassword, buyer, dabId)Boolean

Description: Method approveTagAccessDeal

offerSellExplore(seller, sellerPassword, buyerId, dabId, minPrice, buyerPubKeyEncryptedTagKey)Boolean

Description: Method offerSellExplore

offerBuyExplore(buyer, buyerPassword, dabId, maxPrice)Boolean

Description: Method offerBuyExplore

approveExploreDeal(custodian, custodianPassword, buyer, dabId)Boolean

Description: Method approveExploreDeal

offerSellBulk(seller, sellerPassword, buyerId, dabId, minPrice)Boolean

Description: Method offerSellBulk

offerBuyBulk(buyer, buyerPassword, dabId, maxPrice)Boolean

Description: Method offerBuyBulk

approveBulkDeal(custodian, custodianPassword, buyer, dabId)Boolean

Description: Method approveBulkDeal

offerSellTransitive(seller, sellerPassword, buyerId, dabId, minPrice)Boolean

Description: Method offerSellTransitive

offerBuyTransitive(buyer, buyerPassword, dabId, maxPrice)Boolean

Description: Method offerBuyTransitive

approveTransitiveDeal(custodian, custodianPassword, buyer, dabId)Boolean

Description: Method approveTransitiveDeal

getTotalLicenseFee(licenseTypeCode)Integer

Description: Method getTotalLicenseFee

trustToBuyAccess(seller, sellerPassword, buyer, dabId, minPrice)Boolean

Description: Method trustToBuyAccess

trustToBuyOwnership(seller, sellerPassword, buyer, dabId, minPrice)Boolean

Description: Method trustToBuyOwnership

untrustToBuyAccess(seller, sellerPassword, buyer, dabId)Boolean

Description: Method untrustToBuyAccess

untrustToBuyOwnership(seller, sellerPassword, buyer, dabId)Boolean

Description: Method untrustToBuyOwnership

getDealsForDab(userId, dabId)Deal

Description: Method getDealsForDab

addRelation(userId, userPassword, licenseTypeCode, fromDabId, toDabId)Boolean

Description: Method addRelation

isHierarchicalChildOf(userId, parentDabId, dabId)Boolean

Description: Method isHierarchicalChildOf

checkUserPrvPayment(msgId, userId, userPassword, userToCheck, zetonsAmount)Integer

Description: Method checkUserPrvPayment

addDataSecured(userId, userPassword, dabHash, cipherText)Integer

Description: Method addDataSecured

getSecuredDabsInfoPage(userId, startDabId, pageSize)BytesArray

Description: Method getSecuredDabsInfoPage

getSecuredDabsInfo(userId, dabsIds)BytesArray

Description: Method getSecuredDabsInfo

listSecuredOwnedDabs(userId)BytesArray

Description: Method listSecuredOwnedDabs

listSecuredSharedDabs(userId)BytesArray

Description: Method listSecuredSharedDabs

listSecuredCustodiedDabs(userId)BytesArray

Description: Method listSecuredCustodiedDabs

getSecuredDabsInfo(userId, dabsIds)BytesArray

Description: Method getSecuredDabsInfo

payBill(userId, userPassword, price, signature, seller)Integer

Description: Method payBill

addDab(ownerId, ownerPassword, assetUrl, publicDescription, linkedDabId, custodians, publicityType, dataHash) ⇒ Integer

Description: Method addDab

Kind: global function

ParamTypeDescription
ownerIdAddress
ownerPasswordString
assetUrlString
publicDescriptionString
linkedDabIdInteger(optional. default: 0)
custodiansAddress(optional. default: []) - Array of
publicityTypeInteger(optional. default: 0) Look at Constants description in Docs.
dataHashInteger(optional. default: 0)

addDabList(ownerId, ownerPassword, dataArr) ⇒ Integer

Description: Method addDabList

Kind: global function
Returns: Integer - - Array of

ParamTypeDescription
ownerIdAddress
ownerPasswordString
dataArrObjectArray of

addTag(ownerId, ownerPassword, publicDescription, custodians, title, encryptedKey) ⇒ Integer

Description: Method addTag

Kind: global function

ParamTypeDescription
ownerIdAddress
ownerPasswordString
publicDescriptionString
custodiansAddress(optional. default: []) - Array of
titleString
encryptedKeyString(optional. default: null)

getTagsIdsForDab(dabId, requestor) ⇒ Integer

Description: Method getTagsIdsForDab

Kind: global function
Returns: Integer - - Array of

ParamType
dabIdInteger
requestorAddress

getOwnedDabsIds(userId) ⇒ Integer

Description: Method getOwnedDabsIds

Kind: global function
Returns: Integer - - Array of

ParamType
userIdAddress

getSharedDabsIds(userId) ⇒ Integer

Description: Method getSharedDabsIds

Kind: global function
Returns: Integer - - Array of

ParamType
userIdAddress

getCustodiedDabsIds(userId) ⇒ Integer

Description: Method getCustodiedDabsIds

Kind: global function
Returns: Integer - - Array of

ParamType
userIdAddress

getDabs(userId, dabIds) ⇒ Asset

Description: Method getDabs

Kind: global function
Returns: Asset - - Array of Look at Type description in Docs.

ParamTypeDescription
userIdAddress
dabIdsIntegerArray of

getDabParentsIds(dabId, maxLength, requestor) ⇒ Integer

Description: Method getDabParentsIds

Kind: global function
Returns: Integer - - Array of

ParamType
dabIdInteger
maxLengthInteger
requestorAddress

getTagEncryptedKey(buyer, seller, tagId) ⇒ Key

Description: Method getTagEncryptedKey

Kind: global function
Returns: Key - Look at Type description in Docs.

ParamType
buyerAddress
sellerAddress
tagIdInteger

exploreTagRelationsPage(userId, userPassword, rootTagId, tagId, pos) ⇒ Dab

Description: Method exploreTagRelationsPage

Kind: global function
Returns: Dab - - Array of Look at Type description in Docs.

ParamTypeDescription
userIdAddress
userPasswordString
rootTagIdInteger
tagIdInteger
posInteger(optional. default: 0)

getAvailableDabs(userId, dabTypeCode, licenseTypeCode, pos, size) ⇒ Dab

Description: Method getAvailableDabs

Kind: global function
Returns: Dab - - Array of Look at Type description in Docs.

ParamTypeDescription
userIdAddress
dabTypeCodeIntegerLook at Constants description in Docs.
licenseTypeCodeIntegerLook at Constants description in Docs.
posInteger(optional. default: 0)
sizeInteger(optional. default: 10)

getAvailableLicenses(userId, dabTypeCode, licenseTypeCode, pos, size) ⇒ License

Description: Method getAvailableLicenses

Kind: global function
Returns: License - - Array of Look at Type description in Docs.

ParamTypeDescription
userIdAddress
dabTypeCodeIntegerLook at Constants description in Docs.
licenseTypeCodeIntegerLook at Constants description in Docs.
posInteger(optional. default: 0)
sizeInteger(optional. default: 10)

getAvailableLicensesForDab(userId, dabId) ⇒ License

Description: Method getAvailableLicensesForDab

Kind: global function
Returns: License - - Array of Look at Type description in Docs.

ParamType
userIdAddress
dabIdInteger

getSellOfferedLicenses(userId, dabTypeCode, licenseTypeCode, pos, size) ⇒ License

Description: Method getSellOfferedLicenses

Kind: global function
Returns: License - - Array of Look at Type description in Docs.

ParamTypeDescription
userIdAddress
dabTypeCodeIntegerLook at Constants description in Docs.
licenseTypeCodeIntegerLook at Constants description in Docs.
posInteger(optional. default: 0)
sizeInteger(optional. default: 10)

getBuyOfferedLicenses(userId, dabTypeCode, licenseTypeCode, pos, size) ⇒ License

Description: Method getBuyOfferedLicenses

Kind: global function
Returns: License - - Array of Look at Type description in Docs.

ParamTypeDescription
userIdAddress
dabTypeCodeIntegerLook at Constants description in Docs.
licenseTypeCodeIntegerLook at Constants description in Docs.
posInteger(optional. default: 0)
sizeInteger(optional. default: 10)

getSellOfferedLicensesForDab(userId, dabId) ⇒ License

Description: Method getSellOfferedLicensesForDab

Kind: global function
Returns: License - - Array of Look at Type description in Docs.

ParamType
userIdAddress
dabIdInteger

getBuyOfferedLicensesForDab(userId, dabId) ⇒ License

Description: Method getBuyOfferedLicensesForDab

Kind: global function
Returns: License - - Array of Look at Type description in Docs.

ParamType
userIdAddress
dabIdInteger

actualiseDeals(userId, userPassword, licenseTypeCode) ⇒ Boolean

Description: Method actualiseDeals

Kind: global function

ParamTypeDescription
userIdAddress
userPasswordString
licenseTypeCodeIntegerLook at Constants description in Docs.

getDabsPage(userId, startDabId, pageSize) ⇒ Asset

Description: Method getDabsPage

Kind: global function
Returns: Asset - - Array of Look at Type description in Docs.

ParamTypeDescription
userIdAddress
startDabIdInteger(optional. default: 0)
pageSizeInteger(optional. default: 10)

getDabsForTag(userId, tagTitle, tagId) ⇒ Asset

Description: Method getDabsForTag

Kind: global function
Returns: Asset - - Array of Look at Type description in Docs.

ParamTypeDescription
userIdAddress
tagTitleString(optional. default: "")
tagIdInteger(optional. default: null)

offerSellOwnership(seller, sellerPassword, buyer, dabId, minPrice) ⇒ Boolean

Description: Method offerSellOwnership

Kind: global function

ParamType
sellerAddress
sellerPasswordString
buyerAddress
dabIdInteger
minPriceInteger

offerBuyOwnership(buyer, buyerPassword, dabId, maxPrice) ⇒ Boolean

Description: Method offerBuyOwnership

Kind: global function

ParamType
buyerAddress
buyerPasswordString
dabIdInteger
maxPriceInteger

approveOwnershipDeal(custodian, custodianPassword, buyer, dabId) ⇒ Boolean

Description: Method approveOwnershipDeal

Kind: global function

ParamType
custodianAddress
custodianPasswordString
buyerAddress
dabIdInteger

offerBuyCustody(buyer, buyerPassword, dabId, maxPrice) ⇒ Boolean

Description: Method offerBuyCustody

Kind: global function

ParamType
buyerAddress
buyerPasswordString
dabIdInteger
maxPriceInteger

offerSellCustody(seller, sellerPassword, buyer, dabId, minPrice) ⇒ Boolean

Description: Method offerSellCustody

Kind: global function

ParamType
sellerAddress
sellerPasswordString
buyerAddress
dabIdInteger
minPriceInteger

approveCustodyDeal(custodian, custodianPassword, buyer, dabId) ⇒ Boolean

Description: Method approveCustodyDeal

Kind: global function

ParamType
custodianAddress
custodianPasswordString
buyerAddress
dabIdInteger

offerSellAccess(seller, sellerPassword, buyerId, dabId, minPrice) ⇒ Boolean

Description: Method offerSellAccess

Kind: global function

ParamType
sellerAddress
sellerPasswordString
buyerIdAddress
dabIdInteger
minPriceInteger

offerBuyAccess(buyer, buyerPassword, dabId, maxPrice) ⇒ Boolean

Description: Method offerBuyAccess

Kind: global function

ParamType
buyerAddress
buyerPasswordString
dabIdInteger
maxPriceInteger

approveAccessDeal(custodian, custodianPassword, buyer, dabId) ⇒ Boolean

Description: Method approveAccessDeal

Kind: global function

ParamType
custodianAddress
custodianPasswordString
buyerAddress
dabIdInteger

offerSellReshare(seller, sellerPassword, buyerId, dabId, minPrice) ⇒ Boolean

Description: Method offerSellReshare

Kind: global function

ParamType
sellerAddress
sellerPasswordString
buyerIdAddress
dabIdInteger
minPriceInteger

offerBuyReshare(buyer, buyerPassword, dabId, maxPrice) ⇒ Boolean

Description: Method offerBuyReshare

Kind: global function

ParamType
buyerAddress
buyerPasswordString
dabIdInteger
maxPriceInteger

approveReshareDeal(custodian, custodianPassword, buyer, dabId) ⇒ Boolean

Description: Method approveReshareDeal

Kind: global function

ParamType
custodianAddress
custodianPasswordString
buyerAddress
dabIdInteger

offerSellTag(seller, sellerPassword, buyerId, dabId, minPrice, tagId) ⇒ Boolean

Description: Method offerSellTag

Kind: global function
Returns: Boolean - isOK

ParamType
sellerAddress
sellerPasswordString
buyerIdAddress
dabIdInteger
minPriceInteger
tagIdInteger

offerBuyTag(buyer, buyerPassword, dabId, maxPrice, tagId) ⇒ Boolean

Description: Method offerBuyTag

Kind: global function
Returns: Boolean - isOK

ParamType
buyerAddress
buyerPasswordString
dabIdInteger
maxPriceInteger
tagIdInteger

approveTagDeal(custodian, custodianPassword, buyer, dabId, tagId) ⇒ Boolean

Description: Method approveTagDeal

Kind: global function
Returns: Boolean - isOK

ParamType
custodianAddress
custodianPasswordString
buyerAddress
dabIdInteger
tagIdInteger

offerSellTagAccess(seller, sellerPassword, buyerId, dabId, minPrice) ⇒ Boolean

Description: Method offerSellTagAccess

Kind: global function
Returns: Boolean - isOK

ParamType
sellerAddress
sellerPasswordString
buyerIdAddress
dabIdInteger
minPriceInteger

offerBuyTagAccess(buyer, buyerPassword, dabId, maxPrice) ⇒ Boolean

Description: Method offerBuyTagAccess

Kind: global function
Returns: Boolean - isOK

ParamType
buyerAddress
buyerPasswordString
dabIdInteger
maxPriceInteger

approveTagAccessDeal(custodian, custodianPassword, buyer, dabId) ⇒ Boolean

Description: Method approveTagAccessDeal

Kind: global function
Returns: Boolean - isOK

ParamType
custodianAddress
custodianPasswordString
buyerAddress
dabIdInteger

offerSellExplore(seller, sellerPassword, buyerId, dabId, minPrice, buyerPubKeyEncryptedTagKey) ⇒ Boolean

Description: Method offerSellExplore

Kind: global function
Returns: Boolean - isOK

ParamTypeDescription
sellerAddress
sellerPasswordString
buyerIdAddress
dabIdInteger
minPriceInteger
buyerPubKeyEncryptedTagKeyString(optional. default: null)

offerBuyExplore(buyer, buyerPassword, dabId, maxPrice) ⇒ Boolean

Description: Method offerBuyExplore

Kind: global function
Returns: Boolean - isOK

ParamType
buyerAddress
buyerPasswordString
dabIdInteger
maxPriceInteger

approveExploreDeal(custodian, custodianPassword, buyer, dabId) ⇒ Boolean

Description: Method approveExploreDeal

Kind: global function
Returns: Boolean - isOK

ParamType
custodianAddress
custodianPasswordString
buyerAddress
dabIdInteger

offerSellBulk(seller, sellerPassword, buyerId, dabId, minPrice) ⇒ Boolean

Description: Method offerSellBulk

Kind: global function
Returns: Boolean - isOK

ParamType
sellerAddress
sellerPasswordString
buyerIdAddress
dabIdInteger
minPriceInteger

offerBuyBulk(buyer, buyerPassword, dabId, maxPrice) ⇒ Boolean

Description: Method offerBuyBulk

Kind: global function
Returns: Boolean - isOK

ParamType
buyerAddress
buyerPasswordString
dabIdInteger
maxPriceInteger

approveBulkDeal(custodian, custodianPassword, buyer, dabId) ⇒ Boolean

Description: Method approveBulkDeal

Kind: global function
Returns: Boolean - isOK

ParamType
custodianAddress
custodianPasswordString
buyerAddress
dabIdInteger

offerSellTransitive(seller, sellerPassword, buyerId, dabId, minPrice) ⇒ Boolean

Description: Method offerSellTransitive

Kind: global function
Returns: Boolean - isOK

ParamType
sellerAddress
sellerPasswordString
buyerIdAddress
dabIdInteger
minPriceInteger

offerBuyTransitive(buyer, buyerPassword, dabId, maxPrice) ⇒ Boolean

Description: Method offerBuyTransitive

Kind: global function
Returns: Boolean - isOK

ParamType
buyerAddress
buyerPasswordString
dabIdInteger
maxPriceInteger

approveTransitiveDeal(custodian, custodianPassword, buyer, dabId) ⇒ Boolean

Description: Method approveTransitiveDeal

Kind: global function
Returns: Boolean - isOK

ParamType
custodianAddress
custodianPasswordString
buyerAddress
dabIdInteger

getTotalLicenseFee(licenseTypeCode) ⇒ Integer

Description: Method getTotalLicenseFee

Kind: global function

ParamTypeDescription
licenseTypeCodeIntegerLook at Constants description in Docs.

trustToBuyAccess(seller, sellerPassword, buyer, dabId, minPrice) ⇒ Boolean

Description: Method trustToBuyAccess

Kind: global function
Returns: Boolean - isOK

ParamType
sellerAddress
sellerPasswordString
buyerAddress
dabIdInteger
minPriceInteger

trustToBuyOwnership(seller, sellerPassword, buyer, dabId, minPrice) ⇒ Boolean

Description: Method trustToBuyOwnership

Kind: global function
Returns: Boolean - isOK

ParamType
sellerAddress
sellerPasswordString
buyerAddress
dabIdInteger
minPriceInteger

untrustToBuyAccess(seller, sellerPassword, buyer, dabId) ⇒ Boolean

Description: Method untrustToBuyAccess

Kind: global function

ParamType
sellerAddress
sellerPasswordString
buyerAddress
dabIdInteger

untrustToBuyOwnership(seller, sellerPassword, buyer, dabId) ⇒ Boolean

Description: Method untrustToBuyOwnership

Kind: global function

ParamType
sellerAddress
sellerPasswordString
buyerAddress
dabIdInteger

getDealsForDab(userId, dabId) ⇒ Deal

Description: Method getDealsForDab

Kind: global function
Returns: Deal - - Array of Look at Type description in Docs.

ParamType
userIdAddress
dabIdInteger

addRelation(userId, userPassword, licenseTypeCode, fromDabId, toDabId) ⇒ Boolean

Description: Method addRelation

Kind: global function

ParamTypeDescription
userIdAddress
userPasswordString
licenseTypeCodeIntegerLook at Constants description in Docs.
fromDabIdInteger
toDabIdInteger

isHierarchicalChildOf(userId, parentDabId, dabId) ⇒ Boolean

Description: Method isHierarchicalChildOf

Kind: global function

ParamType
userIdAddress
parentDabIdInteger
dabIdInteger

checkUserPrvPayment(msgId, userId, userPassword, userToCheck, zetonsAmount) ⇒ Integer

Description: Method checkUserPrvPayment

Kind: global function
Returns: Integer - msgId

ParamType
msgIdInteger
userIdAddress
userPasswordString
userToCheckAddress
zetonsAmountInteger

addDataSecured(userId, userPassword, dabHash, cipherText) ⇒ Integer

Description: Method addDataSecured

Kind: global function
Returns: Integer - dabId

ParamType
userIdAddress
userPasswordString
dabHashString
cipherTextString

getSecuredDabsInfoPage(userId, startDabId, pageSize) ⇒ BytesArray

Description: Method getSecuredDabsInfoPage

Kind: global function
Returns: BytesArray - cipheredText - Array of

ParamTypeDescription
userIdAddress
startDabIdInteger
pageSizeInteger(optional. default: 10)

getSecuredDabsInfo(userId, dabsIds) ⇒ BytesArray

Description: Method getSecuredDabsInfo

Kind: global function
Returns: BytesArray - cipheredText - Array of

ParamTypeDescription
userIdAddress
dabsIdsIntegerArray of

listSecuredOwnedDabs(userId) ⇒ BytesArray

Description: Method listSecuredOwnedDabs

Kind: global function
Returns: BytesArray - cipheredText - Array of

ParamType
userIdAddress

listSecuredSharedDabs(userId) ⇒ BytesArray

Description: Method listSecuredSharedDabs

Kind: global function
Returns: BytesArray - cipheredText - Array of

ParamType
userIdAddress

listSecuredCustodiedDabs(userId) ⇒ BytesArray

Description: Method listSecuredCustodiedDabs

Kind: global function
Returns: BytesArray - cipheredText

ParamType
userIdAddress

getSecuredDabsInfo(userId, dabsIds) ⇒ BytesArray

Description: Method getSecuredDabsInfo

Kind: global function
Returns: BytesArray - cipheredText - Array of

ParamTypeDescription
userIdAddress
dabsIdsIntegerArray of

payBill(userId, userPassword, price, signature, seller) ⇒ Integer

Description: Method payBill

Kind: global function
Returns: Integer - paidAmount

ParamType
userIdAddress
userPasswordString
priceInteger
signatureString
sellerAddress

PDS API methods

(Back)

Functions

listVaults(ownerId)Vault

Description: Method listVaults

getUploadTicket(userId, password, vaultAuth)Ticket

Description: Method getUploadTicket

getAccessTicket(dabId, buyer, seller, argsBuyerSignature, publicKey, vaultAuth)Ticket

Description: Method getAccessTicket

getAccessTicketSecured(dealMessageId, buyer, seller, argsBuyerSignature, publicKey, vaultAuth)Ticket

Description: Method getAccessTicketSecured

getBulkAccessTicket(dabId, buyer, bulkSeller, tagId, argsBuyerSignature, publicKey, vaultAuth)Ticket

Description: Method getBulkAccessTicket

listVaults(ownerId) ⇒ Vault

Description: Method listVaults

Kind: global function
Returns: Vault - - Array of Look at Type description in Docs.

ParamType
ownerIdAddress

getUploadTicket(userId, password, vaultAuth) ⇒ Ticket

Description: Method getUploadTicket

Kind: global function
Returns: Ticket - Look at Type description in Docs.

ParamType
userIdAddress
passwordString
vaultAuthObject

getAccessTicket(dabId, buyer, seller, argsBuyerSignature, publicKey, vaultAuth) ⇒ Ticket

Description: Method getAccessTicket

Kind: global function
Returns: Ticket - Look at Type description in Docs.

ParamType
dabIdInteger
buyerAddress
sellerAddress
argsBuyerSignatureString
publicKeyString
vaultAuthObject

getAccessTicketSecured(dealMessageId, buyer, seller, argsBuyerSignature, publicKey, vaultAuth) ⇒ Ticket

Description: Method getAccessTicketSecured

Kind: global function
Returns: Ticket - Look at Type description in Docs.

ParamType
dealMessageIdInteger
buyerAddress
sellerAddress
argsBuyerSignatureString
publicKeyString
vaultAuthObject

getBulkAccessTicket(dabId, buyer, bulkSeller, tagId, argsBuyerSignature, publicKey, vaultAuth) ⇒ Ticket

Description: Method getBulkAccessTicket

Kind: global function
Returns: Ticket - Look at Type description in Docs.

ParamType
dabIdInteger
buyerAddress
bulkSellerAddress
tagIdInteger
argsBuyerSignatureString
publicKeyString
vaultAuthObject

KEYCHAIN API methods

(Back)

Functions

newAccount(account, secret, encryptedKeyData)Boolean

Description: Method newAccount

getChallenge(account)String

Description: Method getChallenge

getEncryptedKeyData(account, responseOnChallenge)BytesArray

Description: Method getEncryptedKeyData

setEncryptedKeyData(account, responseOnChallenge, keyData)

Description: Method setEncryptedKeyData

newAccount(account, secret, encryptedKeyData) ⇒ Boolean

Description: Method newAccount

Kind: global function

ParamType
accountString
secretString
encryptedKeyDataBytesArray

getChallenge(account) ⇒ String

Description: Method getChallenge

Kind: global function

ParamType
accountString

getEncryptedKeyData(account, responseOnChallenge) ⇒ BytesArray

Description: Method getEncryptedKeyData

Kind: global function

ParamType
accountString
responseOnChallengeString

setEncryptedKeyData(account, responseOnChallenge, keyData) ⇒

Description: Method setEncryptedKeyData

Kind: global function
Returns: unspecified

ParamType
accountString
responseOnChallengeString
keyDataBytesArray

FAQs

Package last updated on 29 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc