DAPP Services

​dappservices​

​get_package_info - returns package info

1
/*
2
3
dappNetwork.get_package_info
4
* account name
5
* service name - service names are listed under the services section of the docs as the Contract name
6
​
7
*/
8
​
9
const response = await (await getClient()).dappNetwork.get_package_info( "cardgame1112", "accountless1" );
10
console.log(response);
11
// {
12
// api: 'https://kylin-dsp-2.liquidapps.io',
13
// package_json_uri: 'https://kylin-dsp-2.liquidapps.io/liquidaccts2.dsp-package.json',
14
// package_id: 'liquidaccts2',
15
// service: 'accountless1',
16
// provider: 'heliosselene',
17
// quota: '10.0000 QUOTA',
18
// package_period: 60,
19
// min_stake_quantity: '10.0000 DAPP',
20
// min_unstake_period: 3600,
21
// enabled: 0
22
// }
Copied!

​get_table_accountext - returns entire accountext table

1
/*
2
3
dappNetwork.get_table_accountext
4
​
5
*/
6
​
7
const response = await (await getClient()).dappNetwork.get_table_accountext();
8
for (const row of response.rows) {
9
console.log(row);
10
// {
11
// id: 144,
12
// account: 'mailcontract',
13
// service: 'ipfsservice1',
14
// provider: 'heliosselene',
15
// quota: '9.9907 QUOTA',
16
// balance: '10.0000 DAPP',
17
// last_usage: '1564112241500',
18
// last_reward: '1564112241500',
19
// package: 'ipfs1',
20
// pending_package: 'ipfs1',
21
// package_started: '1564112241500',
22
// package_end: '1564112301500'
23
// }
24
}
Copied!

​get_table_accountext_by_account_service - returns entire accountext by account and service specified

1
/*
2
3
dappNetwork.get_table_accountext_by_account_service
4
* account name
5
* service name - service names are listed under the services section of the docs as the Contract name
6
​
7
*/
8
​
9
const response = await (await getClient()).dappNetwork.get_table_accountext_by_account_service('cardgame1112', 'ipfsservice1');
10
for (const row of response.rows) {
11
console.log(row);
12
// {
13
// id: 144,
14
// account: 'mailcontract',
15
// service: 'ipfsservice1',
16
// provider: 'heliosselene',
17
// quota: '9.9907 QUOTA',
18
// balance: '10.0000 DAPP',
19
// last_usage: '1564112241500',
20
// last_reward: '1564112241500',
21
// package: 'ipfs1',
22
// pending_package: 'ipfs1',
23
// package_started: '1564112241500',
24
// package_end: '1564112301500'
25
// }
26
}
Copied!

​get_table_accountext_by_account_service_provider - returns entire accountext by account, service, and provider specified

1
/*
2
3
dappNetwork.get_table_accountext_by_account_service_provider
4
* account name
5
* service name - service names are listed under the services section of the docs as the Contract name
6
* provider name - DSP name
7
​
8
*/
9
​
10
const response = await (await getClient()).dappNetwork.get_table_accountext_by_account_service_provider('cardgame1112', 'ipfsservice1','heliosselene');
11
for (const row of response.rows) {
12
console.log(row);
13
// {
14
// id: 144,
15
// account: 'mailcontract',
16
// service: 'ipfsservice1',
17
// provider: 'heliosselene',
18
// quota: '9.9907 QUOTA',
19
// balance: '10.0000 DAPP',
20
// last_usage: '1564112241500',
21
// last_reward: '1564112241500',
22
// package: 'ipfs1',
23
// pending_package: 'ipfs1',
24
// package_started: '1564112241500',
25
// package_end: '1564112301500'
26
// }
27
}
Copied!

​get_table_package - returns entire package table

1
/*
2
3
dappNetwork.get_table_package
4
* [limit] - optional limit for how many packages to return
5
​
6
*/
7
​
8
const response = await (await getClient()).dappNetwork.get_table_package({ limit: 500 });
9
for (const row of response.rows) {
10
console.log(row);
11
// {
12
// id: 9,
13
// api_endpoint: 'https://kylin-dsp-2.liquidapps.io',
14
// package_json_uri: 'https://kylin-dsp-2.liquidapps.io/package1.dsp-package.json',
15
// package_id: 'package1',
16
// service: 'ipfsservice1',
17
// provider: 'heliosselene',
18
// quota: '1.0000 QUOTA',
19
// package_period: 86400,
20
// min_stake_quantity: '10.0000 DAPP',
21
// min_unstake_period: 3600,
22
// enabled: 1
23
// }
24
}
Copied!

​get_table_package_by_package_service_provider - returns packages by package, service, and DSP name

1
/*
2
3
dappNetwork.get_table_package_by_package_service_provider
4
* package name
5
* service name - service names are listed under the services section of the docs as the Contract name
6
* DSP name
7
* [limit] - optional limit for how many packages to return
8
​
9
*/
10
​
11
const response = await (await getClient()).dappNetwork.get_table_package_by_package_service_provider('package1', 'ipfsservice1', 'heliosselene', { limit: 500 });
12
for (const row of response.rows) {
13
console.log(row);
14
// {
15
// id: 9,
16
// api_endpoint: 'https://kylin-dsp-2.liquidapps.io',
17
// package_json_uri: 'https://kylin-dsp-2.liquidapps.io/package1.dsp-package.json',
18
// package_id: 'package1',
19
// service: 'ipfsservice1',
20
// provider: 'heliosselene',
21
// quota: '1.0000 QUOTA',
22
// package_period: 86400,
23
// min_stake_quantity: '10.0000 DAPP',
24
// min_unstake_period: 3600,
25
// enabled: 1
26
// }
27
}
Copied!

​get_table_packagext - returns a packages selected inflation rate and quota cost for actions

1
/*
2
3
dappNetwork.get_table_packagext
4
* [limit] - optional limit for how many packages to return
5
​
6
*/
7
​
8
const response = await (await getClient()).dappNetwork.get_table_packagext({ limit: 500 });
9
for (const row of response.rows) {
10
console.log(row);
11
}
Copied!

​get_table_packagext_by_package_service_provider - returns DSP packagext entries that match the package and dsp service provided

1
/*
2
3
dappNetwork.get_table_packagext_by_package_service_provider
4
* package name
5
* service name - service names are listed under the services section of the docs as the Contract name
6
* DSP name
7
* [limit] - optional limit for how many packages to return
8
​
9
*/
10
​
11
const response = await (await getClient()).dappNetwork.get_table_packagext_by_package_service_provider('package1', 'ipfsservice1', 'heliosselene', { limit: 500 });
12
for (const row of response.rows) {
13
console.log(row);
14
}
Copied!

​get_table_refunds - returns refund table details for account name specified

1
/*
2
3
dappNetwork.get_table_refunds
4
* account name
5
​
6
*/
7
​
8
const response = await (await getClient()).dappNetwork.get_table_refunds('heliosselene');
9
for (const row of response.rows) {
10
console.log(row);
11
// {
12
// id: 0,
13
// account: 'heliosselene',
14
// amount: '10.0000 DAPP',
15
// unstake_time: 12345678
16
// provider: 'heliosselene',
17
// service: 'ipfsservice1'
18
// }
19
}
Copied!

​get_table_staking - returns staking table details for account name specified

1
/*
2
3
dappNetwork.get_table_staking
4
* account name
5
​
6
*/
7
​
8
const response = await (await getClient()).dappNetwork.get_table_staking('cardgame1112');
9
for (const row of response.rows) {
10
console.log(row);
11
// {
12
// id: 0,
13
// account: 'cardgame1112',
14
// balance: '10.0000 DAPP',
15
// provider: 'uuddlrlrbass',
16
// service: 'accountless1'
17
// }
18
}
Copied!
Copy link
Contents
dappservices