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;
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);
if(err.code === dsdCst.errorCodes.WrongParametersCount.id) {
log("I have wrong parameters count..."+dsdCst.errorCodes.WrongParametersCount.name);
}
else if(err.code === dsdCst.errorCodes.ServerSideError.id) {
log("I have server error..."+ dsdCst.errorCodes.ServerSideError.name);
}
}
);
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
Deprecated API
Core API methods here
DASE API methods here
PDS API methods here
Keychain API methods here
CORE API methods
(Back)
Functions
- newUser(bchainTypeCode, credentials) ⇒
Keys
Description:
Method newUser
- getLastBlock(bchainTypeCode) ⇒
Integer
Description:
Method getLastBlock
- getTimestamps(bchainTypeCode, blocksNumbers) ⇒
Array_of_Integer
Description:
Method getTimestamps
- getBlocks(bchainTypeCode, blocksNumbers) ⇒
Array_of_Object
Description:
Method getBlocks
- sendLeos(currencyTypeCode, senderId, senderCredentials, amount, toUserId) ⇒
Integer
Description:
Method sendLeos
- transfer(srcCurrencyTypeCode, senderId, senderCredentials, srcLeosAmount) ⇒
Integer
Description:
Method transfer
- silverCostInGold(userId, silverLeosAmount) ⇒
Integer
Description:
Method silverCostInGold
- goldCostInSilver(userId, goldLeosAmount) ⇒
Integer
Description:
Method goldCostInSilver
- completeAppCashProductPurchase(userId, paymentInfo, engineName) ⇒
Integer
Description:
Method completeAppCashProductPurchase
- getAppCashProducts(appId, engineName) ⇒
Object
Description:
Method getAppCashProducts
- sendWeis_Ethereum(sender, senderCredentials, receiver, weisAmount, databytes) ⇒
Integer
Description:
Method sendWeis_Ethereum
- getSystemAccounts() ⇒
Object
Description:
Method getSystemAccounts
- getBalances(zetUserId, ethUserId, pgnUserId, flwUserId) ⇒
Object
Description:
Method getBalances
- v_getEligibilityValue(userId) ⇒
Integer
Description:
Method v_getEligibilityValue
- v_wantVote(userId, userCredentials, iWish) ⇒
Boolean
Description:
Method v_wantVote
- v_supportVoter(userId, userCredentials, voterToSupport) ⇒
Boolean
Description:
Method v_supportVoter
- v_getAccountsByCoinbases(coinbases) ⇒
Array_of_Address
Description:
Method v_getAccountsByCoinbases
- v_getVoteCostInSilverLeos(userId) ⇒
Integer
Description:
Method v_getVoteCostInSilverLeos
- v_getContractVoters(userId) ⇒
Array_of_Address
Description:
Method v_getContractVoters
- v_getQuorumVoters() ⇒
Array_of_Address
Description:
Method v_getQuorumVoters
- v_getCandidatesPool(userId) ⇒
Array_of_Address
Description:
Method v_getCandidatesPool
- v_isInCandidatesPool(userId) ⇒
Boolean
Description:
Method v_isInCandidatesPool
- v_hasPledge(userId) ⇒
Boolean
Description:
Method v_hasPledge
- v_isLicensedForVoting(userId) ⇒
Boolean
Description:
Method v_isLicensedForVoting
- getMyCoinbase() ⇒
Address
Description:
Method getMyCoinbase
- v_withdrawPledge(userId, userCredentials) ⇒
Boolean
Description:
Method v_withdrawPledge
- v_offerBuyVoting(userId, userCredentials, silverLeosAmount) ⇒
Boolean
Description:
Method v_offerBuyVoting
- offerCurrencyExchangeGoldForWeis(sellerId, sellerCredentials, buyerId, goldLeosAmount, weisAmount) ⇒
Boolean
Description:
Method offerCurrencyExchangeGoldForWeis
- offerCurrencyExchangeWeisForGold(sellerId, sellerCredentials, buyerId, goldLeosAmount, weisAmount) ⇒
Boolean
Description:
Method offerCurrencyExchangeWeisForGold
- cancelCurrencyExchangeOffer(sellerId, sellerCredentials, offerId) ⇒
Boolean
Description:
Method cancelCurrencyExchangeOffer
- getCurrencyExchangeOffers(userId, offersIds) ⇒
Array_of_Object
Description:
Method getCurrencyExchangeOffers
- acceptCurrencyExchangeGoldForWeisOffer(buyerId, buyerCredentials, offerId, goldLeosAmount) ⇒
Boolean
Description:
Method acceptCurrencyExchangeGoldForWeisOffer
- acceptCurrencyExchangeWeisForGoldOffer(buyerId, buyerCredentials, offerId, weisAmount) ⇒
Boolean
Description:
Method acceptCurrencyExchangeWeisForGoldOffer
- rejectCurrencyExchangeOffer(buyerId, buyerCredentials, offerId) ⇒
Boolean
Description:
Method rejectCurrencyExchangeOffer
- getCurrencyExchangeOffersIdsToMe(userId, pos, size) ⇒
Array_of_Integer
Description:
Method getCurrencyExchangeOffersIdsToMe
- getCurrencyExchangeOffersCountToMe(userId) ⇒
Integer
Description:
Method getCurrencyExchangeOffersCountToMe
- getCurrencyExchangeTradeHistory(tradeTypeCode, userId, startBlock) ⇒
Array_of_Event
Description:
Method getCurrencyExchangeTradeHistory
- offerTokenExchangeGoldForPnft(sellerId, sellerCredentials, buyerId, goldLeosAmount, pnftId) ⇒
Boolean
Description:
Method offerTokenExchangeGoldForPnft
- offerTokenExchangePnftForGold(sellerId, sellerCredentials, buyerId, goldLeosAmount, pnftId) ⇒
Boolean
Description:
Method offerTokenExchangePnftForGold
- cancelTokenExchangeOffer(sellerId, sellerCredentials, offerId) ⇒
Boolean
Description:
Method cancelTokenExchangeOffer
- getTokenExchangeOffers(userId, offersIds) ⇒
Array_of_Object
Description:
Method getTokenExchangeOffers
- acceptTokenExchangeGoldForPnftOffer(buyerId, buyerCredentials, offerId, goldLeosAmount) ⇒
Boolean
Description:
Method acceptTokenExchangeGoldForPnftOffer
- acceptTokenExchangePnftForGoldOffer(buyerId, buyerCredentials, offerId, pnftId) ⇒
Boolean
Description:
Method acceptTokenExchangePnftForGoldOffer
- rejectTokenExchangeOffer(buyerId, buyerCredentials, offerId) ⇒
Boolean
Description:
Method rejectTokenExchangeOffer
- getTokenExchangeOffersIdsToMe(userId, pos, size) ⇒
Array_of_Integer
Description:
Method getTokenExchangeOffersIdsToMe
- getTokenExchangeOffersCountToMe(userId) ⇒
Integer
Description:
Method getTokenExchangeOffersCountToMe
- getTokenExchangeTradeHistory(tradeTypeCode, userId, startBlock) ⇒
Array_of_Event
Description:
Method getTokenExchangeTradeHistory
- payPnftRoyalties(userId, credentials, pnftId, weisToPay, bchainTypeCode) ⇒
Boolean
Description:
Method payPnftRoyalties
- getTotalRoyaltyPctgForPnft(pnftId, bchainTypeCode) ⇒
Integer
Description:
Method getTotalRoyaltyPctgForPnft
- getTotalSatEthereumRoyaltyPercent(satId) ⇒
Integer
Description:
Method getTotalSatEthereumRoyaltyPercent
- importFromNft(userId, credentials, erc721Addr, tokenId, pnftId, bchainTypeCode) ⇒
Integer
Description:
Method importFromNft
- exportToNft(userId, credentials, pnftId, bchainTypeCode) ⇒
Boolean
Description:
Method exportToNft
- getPnft(pnftId, bchainTypeCode) ⇒
Object
Description:
Method getPnft
- erc721_safeTransferFrom(userId, credentials, erc721Addr, from, to, tokenId, bchainTypeCode) ⇒
Boolean
Description:
Method erc721_safeTransferFrom
- erc721_transferFrom(userId, credentials, erc721Addr, from, to, tokenId, bchainTypeCode) ⇒
Boolean
Description:
Method erc721_transferFrom
- erc721_approve(userId, credentials, erc721Addr, approved, tokenId, bchainTypeCode) ⇒
Boolean
Description:
Method erc721_approve
- erc721_setApprovalForAll(userId, credentials, erc721Addr, operator, approved, bchainTypeCode) ⇒
Boolean
Description:
Method erc721_setApprovalForAll
- erc721_balanceOf(erc721Addr, owner, bchainTypeCode) ⇒
Integer
Description:
Method erc721_balanceOf
- erc721_ownerOf(erc721Addr, tokenId, bchainTypeCode) ⇒
Address
Description:
Method erc721_ownerOf
- erc721_getApproved(erc721Addr, tokenId, bchainTypeCode) ⇒
Address
Description:
Method erc721_getApproved
- erc721_isApprovedForAll(erc721Addr, owner, operator, bchainTypeCode) ⇒
Boolean
Description:
Method erc721_isApprovedForAll
- erc721_tokenOfOwnerByIndex(erc721Addr, owner, index, bchainTypeCode) ⇒
Integer
Description:
Method erc721_tokenOfOwnerByIndex
newUser(bchainTypeCode, credentials) ⇒ Keys
Description:
Method newUser
Kind: global function
Returns: Keys
- Look at Type description in Docs.
Param | Type | Description |
---|
bchainTypeCode | Constant_of_Integer | (optional. default: 1) Look at Constants description in Docs. |
credentials | String | (optional. default: null) |
Example
1st:
Call (in pseudo-code):
newUser(1,'12345678');
Response json-data:
{"result":{"userId":"0xa6338a68b941684b5adb7524a06ccc396ebad5a6","pubKey":"0x0535aaa59911be010f44950df20f9b680b90f77f8d6b27fef5615b208dbdc20ca2ab237d56bd5d4aee340192e0f385e8a53d49d82e02b0d5e9dcec5abb845d31","prvKey":"0x43725c1cf6ae8ad9b88d0f49e24e2181c6ac5b9e01d4c00f578ae0909fdc07ea"}}
Example
2nd:
Call (in pseudo-code):
newUser(1,'12345678_Zetonium');
Response json-data:
{"result":{"userId":"0x5387953b5ae9761ba82381cd4bf90c0c2d610836","pubKey":"0x5749e2716c8e1f27f7f566ffef4c3862cc26fd4cfacb136c37a2f7f660b771ec9d7edb4cb0da980ceb9b8aef7bff16e6749be5627da182b79cc953831f7129f2","prvKey":"0xf3bfb49352772533c94e3363a64517e676e8cc802577045061002515114c143c"}}
Example
3th:
Call (in pseudo-code):
newUser(2,'12345678_Ethereum');
Response json-data:
{"result":{"userId":"0xec437de270daa9c9afbc431e8b280da08433c65e","pubKey":"0x8a84cff8fde8a9c2b3e166a846f1002903807238a0dfe78fd2b1837dc3e335b9ba296676e18c2f441a4e011f79d42444bb197c8e4517e5b4b24361e1f828027b","prvKey":"0xd53db5f115befcb00b7d3ea019daf731e2bfa72cfb0918de106664d79ce330ec"}}
getLastBlock(bchainTypeCode) ⇒ Integer
Description:
Method getLastBlock
Kind: global function
Param | Type | Description |
---|
bchainTypeCode | Constant_of_Integer | (optional. default: 1) Look at Constants description in Docs. |
getTimestamps(bchainTypeCode, blocksNumbers) ⇒ Array_of_Integer
Description:
Method getTimestamps
Kind: global function
Param | Type | Description |
---|
bchainTypeCode | Constant_of_Integer | (optional. default: 1) Look at Constants description in Docs. |
blocksNumbers | Array_of_Integer | |
getBlocks(bchainTypeCode, blocksNumbers) ⇒ Array_of_Object
Description:
Method getBlocks
Kind: global function
Param | Type | Description |
---|
bchainTypeCode | Constant_of_Integer | (optional. default: 1) Look at Constants description in Docs. |
blocksNumbers | Array_of_Integer | |
sendLeos(currencyTypeCode, senderId, senderCredentials, amount, toUserId) ⇒ Integer
Description:
Method sendLeos
Kind: global function
Returns: Integer
- newSrcBalance
Param | Type | Description |
---|
currencyTypeCode | Constant_of_Integer | (optional. default: 1) Look at Constants description in Docs. |
senderId | Address | |
senderCredentials | String | |
amount | Integer | |
toUserId | Address | |
Example
1st:
Call (in pseudo-code):
sendLeos(1,'0x003e8c791cb39b4cad756b9c25431d6eb3fed85c','12345678',500000000,'0xa6338a68b941684b5adb7524a06ccc396ebad5a6');
Response json-data:
{"result":"855736620000"}
Example
2nd:
Call (in pseudo-code):
sendLeos(1,'0x003e8c791cb39b4cad756b9c25431d6eb3fed85c','12345678',500000000,'0x9189313f9823231685571d81bc084f35617a9f4c');
Response json-data:
{"result":"855236620000"}
Example
3th:
Call (in pseudo-code):
sendLeos(1,'0x003e8c791cb39b4cad756b9c25431d6eb3fed85c','12345678',500000000,'0x14302f1785fd47583c929cf3684953116cbeaa95');
Response json-data:
{"result":"854736620000"}
transfer(srcCurrencyTypeCode, senderId, senderCredentials, srcLeosAmount) ⇒ Integer
Description:
Method transfer
Kind: global function
Returns: Integer
- newSrcBalance
Param | Type | Description |
---|
srcCurrencyTypeCode | Constant_of_Integer | Look at Constants description in Docs. |
senderId | Address | |
senderCredentials | String | |
srcLeosAmount | Integer | |
silverCostInGold(userId, silverLeosAmount) ⇒ Integer
Description:
Method silverCostInGold
Kind: global function
Param | Type |
---|
userId | Address |
silverLeosAmount | Integer |
goldCostInSilver(userId, goldLeosAmount) ⇒ Integer
Description:
Method goldCostInSilver
Kind: global function
Param | Type |
---|
userId | Address |
goldLeosAmount | Integer |
Example
1st:
Call (in pseudo-code):
goldCostInSilver('0xe7e0f3cddec426b44589cd1877f0aa392b207c13',1000000);
Response json-data:
{"result":"1000000"}
completeAppCashProductPurchase(userId, paymentInfo, engineName) ⇒ Integer
Description:
Method completeAppCashProductPurchase
Kind: global function
Returns: Integer
- statusCode
Param | Type |
---|
userId | Address |
paymentInfo | Object |
engineName | String |
getAppCashProducts(appId, engineName) ⇒ Object
Description:
Method getAppCashProducts
Kind: global function
Returns: Object
- products
Param | Type |
---|
appId | String |
engineName | String |
sendWeis_Ethereum(sender, senderCredentials, receiver, weisAmount, databytes) ⇒ Integer
Description:
Method sendWeis_Ethereum
Kind: global function
Returns: Integer
- newSrcBalance
Param | Type |
---|
sender | Address |
senderCredentials | String |
receiver | Address |
weisAmount | Integer |
databytes | String |
Example
1st:
Call (in pseudo-code):
sendWeis_Ethereum('0x0c46effd09207e466fdf188ab12c352fbe3377ec','12345678','0xe7e0f3cddec426b44589cd1877f0aa392b207c13',100000,null);
Response json-data:
{"result":"9998999999999999400000"}
getSystemAccounts() ⇒ Object
Description:
Method getSystemAccounts
Kind: global function
getBalances(zetUserId, ethUserId, pgnUserId, flwUserId) ⇒ Object
Description:
Method getBalances
Kind: global function
Param | Type | Description |
---|
zetUserId | Address | (optional. default: null) |
ethUserId | Address | (optional. default: null) |
pgnUserId | Address | (optional. default: null) |
flwUserId | Address | (optional. default: null) |
Example
1st:
Call (in pseudo-code):
getBalances('0xa6338a68b941684b5adb7524a06ccc396ebad5a6',null);
Response json-data:
{"result":{"silver_leos":"489000000"}}
Example
2nd:
Call (in pseudo-code):
getBalances('0x9189313f9823231685571d81bc084f35617a9f4c',null);
Response json-data:
{"result":{"silver_leos":"489000000"}}
Example
3th:
Call (in pseudo-code):
getBalances('0x14302f1785fd47583c929cf3684953116cbeaa95',null);
Response json-data:
{"result":{"silver_leos":"489000000"}}
v_getEligibilityValue(userId) ⇒ Integer
Description:
Method v_getEligibilityValue
Kind: global function
v_wantVote(userId, userCredentials, iWish) ⇒ Boolean
Description:
Method v_wantVote
Kind: global function
Returns: Boolean
- isOk
Param | Type |
---|
userId | Address |
userCredentials | String |
iWish | Boolean |
v_supportVoter(userId, userCredentials, voterToSupport) ⇒ Boolean
Description:
Method v_supportVoter
Kind: global function
Returns: Boolean
- isOk
Param | Type |
---|
userId | Address |
userCredentials | String |
voterToSupport | Address |
Example
1st:
Call (in pseudo-code):
v_supportVoter('0x003e8c791cb39b4cad756b9c25431d6eb3fed85c','12345678','0x082b4e4e0f686a9a249799acea9f05dc2fe83a4a');
Response json-data:
{"result":true}
v_getAccountsByCoinbases(coinbases) ⇒ Array_of_Address
Description:
Method v_getAccountsByCoinbases
Kind: global function
Param | Type |
---|
coinbases | Array_of_Address |
v_getVoteCostInSilverLeos(userId) ⇒ Integer
Description:
Method v_getVoteCostInSilverLeos
Kind: global function
v_getContractVoters(userId) ⇒ Array_of_Address
Description:
Method v_getContractVoters
Kind: global function
v_getQuorumVoters() ⇒ Array_of_Address
Description:
Method v_getQuorumVoters
Kind: global function
v_getCandidatesPool(userId) ⇒ Array_of_Address
Description:
Method v_getCandidatesPool
Kind: global function
v_isInCandidatesPool(userId) ⇒ Boolean
Description:
Method v_isInCandidatesPool
Kind: global function
v_hasPledge(userId) ⇒ Boolean
Description:
Method v_hasPledge
Kind: global function
v_isLicensedForVoting(userId) ⇒ Boolean
Description:
Method v_isLicensedForVoting
Kind: global function
getMyCoinbase() ⇒ Address
Description:
Method getMyCoinbase
Kind: global function
v_withdrawPledge(userId, userCredentials) ⇒ Boolean
Description:
Method v_withdrawPledge
Kind: global function
Returns: Boolean
- isOk
Param | Type |
---|
userId | Address |
userCredentials | String |
v_offerBuyVoting(userId, userCredentials, silverLeosAmount) ⇒ Boolean
Description:
Method v_offerBuyVoting
Kind: global function
Returns: Boolean
- isOk
Param | Type |
---|
userId | Address |
userCredentials | String |
silverLeosAmount | Integer |
offerCurrencyExchangeGoldForWeis(sellerId, sellerCredentials, buyerId, goldLeosAmount, weisAmount) ⇒ Boolean
Description:
Method offerCurrencyExchangeGoldForWeis
Kind: global function
Param | Type |
---|
sellerId | Address |
sellerCredentials | String |
buyerId | Address |
goldLeosAmount | Integer |
weisAmount | Integer |
offerCurrencyExchangeWeisForGold(sellerId, sellerCredentials, buyerId, goldLeosAmount, weisAmount) ⇒ Boolean
Description:
Method offerCurrencyExchangeWeisForGold
Kind: global function
Param | Type |
---|
sellerId | Address |
sellerCredentials | String |
buyerId | Address |
goldLeosAmount | Integer |
weisAmount | Integer |
cancelCurrencyExchangeOffer(sellerId, sellerCredentials, offerId) ⇒ Boolean
Description:
Method cancelCurrencyExchangeOffer
Kind: global function
Param | Type |
---|
sellerId | Address |
sellerCredentials | String |
offerId | Integer |
getCurrencyExchangeOffers(userId, offersIds) ⇒ Array_of_Object
Description:
Method getCurrencyExchangeOffers
Kind: global function
Param | Type |
---|
userId | Address |
offersIds | Array_of_Integer |
acceptCurrencyExchangeGoldForWeisOffer(buyerId, buyerCredentials, offerId, goldLeosAmount) ⇒ Boolean
Description:
Method acceptCurrencyExchangeGoldForWeisOffer
Kind: global function
Param | Type |
---|
buyerId | Address |
buyerCredentials | String |
offerId | Integer |
goldLeosAmount | Integer |
acceptCurrencyExchangeWeisForGoldOffer(buyerId, buyerCredentials, offerId, weisAmount) ⇒ Boolean
Description:
Method acceptCurrencyExchangeWeisForGoldOffer
Kind: global function
Param | Type |
---|
buyerId | Address |
buyerCredentials | String |
offerId | Integer |
weisAmount | Integer |
rejectCurrencyExchangeOffer(buyerId, buyerCredentials, offerId) ⇒ Boolean
Description:
Method rejectCurrencyExchangeOffer
Kind: global function
Param | Type |
---|
buyerId | Address |
buyerCredentials | String |
offerId | Integer |
getCurrencyExchangeOffersIdsToMe(userId, pos, size) ⇒ Array_of_Integer
Description:
Method getCurrencyExchangeOffersIdsToMe
Kind: global function
Param | Type | Description |
---|
userId | Address | |
pos | Integer | (optional. default: 0) |
size | Integer | (optional. default: 10) |
getCurrencyExchangeOffersCountToMe(userId) ⇒ Integer
Description:
Method getCurrencyExchangeOffersCountToMe
Kind: global function
getCurrencyExchangeTradeHistory(tradeTypeCode, userId, startBlock) ⇒ Array_of_Event
Description:
Method getCurrencyExchangeTradeHistory
Kind: global function
Returns: Array_of_Event
- Look at Type description in Docs.
Param | Type | Description |
---|
tradeTypeCode | Constant_of_Integer | Look at Constants description in Docs. |
userId | Address | |
startBlock | Integer | |
offerTokenExchangeGoldForPnft(sellerId, sellerCredentials, buyerId, goldLeosAmount, pnftId) ⇒ Boolean
Description:
Method offerTokenExchangeGoldForPnft
Kind: global function
Param | Type |
---|
sellerId | Address |
sellerCredentials | String |
buyerId | Address |
goldLeosAmount | Integer |
pnftId | Integer |
offerTokenExchangePnftForGold(sellerId, sellerCredentials, buyerId, goldLeosAmount, pnftId) ⇒ Boolean
Description:
Method offerTokenExchangePnftForGold
Kind: global function
Param | Type |
---|
sellerId | Address |
sellerCredentials | String |
buyerId | Address |
goldLeosAmount | Integer |
pnftId | Integer |
cancelTokenExchangeOffer(sellerId, sellerCredentials, offerId) ⇒ Boolean
Description:
Method cancelTokenExchangeOffer
Kind: global function
Param | Type |
---|
sellerId | Address |
sellerCredentials | String |
offerId | Integer |
getTokenExchangeOffers(userId, offersIds) ⇒ Array_of_Object
Description:
Method getTokenExchangeOffers
Kind: global function
Param | Type |
---|
userId | Address |
offersIds | Array_of_Integer |
acceptTokenExchangeGoldForPnftOffer(buyerId, buyerCredentials, offerId, goldLeosAmount) ⇒ Boolean
Description:
Method acceptTokenExchangeGoldForPnftOffer
Kind: global function
Param | Type |
---|
buyerId | Address |
buyerCredentials | String |
offerId | Integer |
goldLeosAmount | Integer |
acceptTokenExchangePnftForGoldOffer(buyerId, buyerCredentials, offerId, pnftId) ⇒ Boolean
Description:
Method acceptTokenExchangePnftForGoldOffer
Kind: global function
Param | Type |
---|
buyerId | Address |
buyerCredentials | String |
offerId | Integer |
pnftId | Integer |
rejectTokenExchangeOffer(buyerId, buyerCredentials, offerId) ⇒ Boolean
Description:
Method rejectTokenExchangeOffer
Kind: global function
Param | Type |
---|
buyerId | Address |
buyerCredentials | String |
offerId | Integer |
getTokenExchangeOffersIdsToMe(userId, pos, size) ⇒ Array_of_Integer
Description:
Method getTokenExchangeOffersIdsToMe
Kind: global function
Param | Type | Description |
---|
userId | Address | |
pos | Integer | (optional. default: 0) |
size | Integer | (optional. default: 10) |
getTokenExchangeOffersCountToMe(userId) ⇒ Integer
Description:
Method getTokenExchangeOffersCountToMe
Kind: global function
getTokenExchangeTradeHistory(tradeTypeCode, userId, startBlock) ⇒ Array_of_Event
Description:
Method getTokenExchangeTradeHistory
Kind: global function
Returns: Array_of_Event
- Look at Type description in Docs.
Param | Type | Description |
---|
tradeTypeCode | Constant_of_Integer | Look at Constants description in Docs. |
userId | Address | |
startBlock | Integer | |
payPnftRoyalties(userId, credentials, pnftId, weisToPay, bchainTypeCode) ⇒ Boolean
Description:
Method payPnftRoyalties
Kind: global function
Returns: Boolean
- isOk
Param | Type | Description |
---|
userId | Address | |
credentials | String | |
pnftId | Integer | |
weisToPay | Integer | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
getTotalRoyaltyPctgForPnft(pnftId, bchainTypeCode) ⇒ Integer
Description:
Method getTotalRoyaltyPctgForPnft
Kind: global function
Returns: Integer
- pctg
Param | Type | Description |
---|
pnftId | Integer | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
getTotalSatEthereumRoyaltyPercent(satId) ⇒ Integer
Description:
Method getTotalSatEthereumRoyaltyPercent
Kind: global function
Returns: Integer
- pctg
importFromNft(userId, credentials, erc721Addr, tokenId, pnftId, bchainTypeCode) ⇒ Integer
Description:
Method importFromNft
Kind: global function
Returns: Integer
- pnftId
Param | Type | Description |
---|
userId | Address | |
credentials | String | |
erc721Addr | Address | |
tokenId | Integer | |
pnftId | Integer | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
exportToNft(userId, credentials, pnftId, bchainTypeCode) ⇒ Boolean
Description:
Method exportToNft
Kind: global function
Param | Type | Description |
---|
userId | Address | |
credentials | String | |
pnftId | Integer | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
getPnft(pnftId, bchainTypeCode) ⇒ Object
Description:
Method getPnft
Kind: global function
Param | Type | Description |
---|
pnftId | Integer | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
erc721_safeTransferFrom(userId, credentials, erc721Addr, from, to, tokenId, bchainTypeCode) ⇒ Boolean
Description:
Method erc721_safeTransferFrom
Kind: global function
Param | Type | Description |
---|
userId | Address | |
credentials | String | |
erc721Addr | Address | (optional. default: null) |
from | Address | |
to | Address | |
tokenId | Integer | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
erc721_transferFrom(userId, credentials, erc721Addr, from, to, tokenId, bchainTypeCode) ⇒ Boolean
Description:
Method erc721_transferFrom
Kind: global function
Param | Type | Description |
---|
userId | Address | |
credentials | String | |
erc721Addr | Address | (optional. default: null) |
from | Address | |
to | Address | |
tokenId | Integer | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
erc721_approve(userId, credentials, erc721Addr, approved, tokenId, bchainTypeCode) ⇒ Boolean
Description:
Method erc721_approve
Kind: global function
Param | Type | Description |
---|
userId | Address | |
credentials | String | |
erc721Addr | Address | (optional. default: null) |
approved | Address | |
tokenId | Integer | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
erc721_setApprovalForAll(userId, credentials, erc721Addr, operator, approved, bchainTypeCode) ⇒ Boolean
Description:
Method erc721_setApprovalForAll
Kind: global function
Param | Type | Description |
---|
userId | Address | |
credentials | String | |
erc721Addr | Address | (optional. default: null) |
operator | Address | |
approved | Boolean | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
erc721_balanceOf(erc721Addr, owner, bchainTypeCode) ⇒ Integer
Description:
Method erc721_balanceOf
Kind: global function
Returns: Integer
- numberOfNfts
Param | Type | Description |
---|
erc721Addr | Address | (optional. default: null) |
owner | Address | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
erc721_ownerOf(erc721Addr, tokenId, bchainTypeCode) ⇒ Address
Description:
Method erc721_ownerOf
Kind: global function
Returns: Address
- owner
Param | Type | Description |
---|
erc721Addr | Address | (optional. default: null) |
tokenId | Integer | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
erc721_getApproved(erc721Addr, tokenId, bchainTypeCode) ⇒ Address
Description:
Method erc721_getApproved
Kind: global function
Returns: Address
- operator
Param | Type | Description |
---|
erc721Addr | Address | (optional. default: null) |
tokenId | Integer | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
erc721_isApprovedForAll(erc721Addr, owner, operator, bchainTypeCode) ⇒ Boolean
Description:
Method erc721_isApprovedForAll
Kind: global function
Param | Type | Description |
---|
erc721Addr | Address | (optional. default: null) |
owner | Address | |
operator | Address | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |
erc721_tokenOfOwnerByIndex(erc721Addr, owner, index, bchainTypeCode) ⇒ Integer
Description:
Method erc721_tokenOfOwnerByIndex
Kind: global function
Returns: Integer
- tokenId
Param | Type | Description |
---|
erc721Addr | Address | (optional. default: null) |
owner | Address | |
index | Integer | |
bchainTypeCode | Constant_of_Integer | (optional. default: 2) Look at Constants description in Docs. |