Skip to content

Instantly share code, notes, and snippets.

@gowrishZeeve
Last active December 2, 2022 13:32
Show Gist options
  • Save gowrishZeeve/28c8bc3431d9d8d53efdcaca10f98f46 to your computer and use it in GitHub Desktop.
Save gowrishZeeve/28c8bc3431d9d8d53efdcaca10f98f46 to your computer and use it in GitHub Desktop.
DComm - Zeeve
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.addDelegator",
"params": {
"nodeId": "",
"startTime": 1613347036,
"endTime": 1631215800,
"stakeAmount": 200000000000,
"rewardAddress": "",
"username": "<<Username>>",
"password": "<<Password>>"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.addSubnetValidator",
"params": {
"nodeID": "",
"subnetID": "",
"startTime": 1625782598,
"endTime": 1627078419,
"weight": 20,
"username": "<<Username>>",
"password": "<<Password>>"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.addValidator",
"params": {
"nodeID": "",
"startTime": 1606245174,
"endTime": 1608837056,
"stakeAmount": 2000000000000,
"rewardAddress": "",
"delegationFeeRate": 10,
"username": "<<Username>>",
"password": "<<Password>>"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.createAddress",
"params": {
"username": "<<Username>>",
"password": "<<Password>>"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.createSubnet",
"params": {
"controlKeys": [
""
],
"threshold": 1,
"from": [
""
],
"changeAddr": "",
"username": "<<Username>>",
"password": "<<Password>>"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.exportDCM",
"params": {
"to": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"amount": 54321,
"username": "<<Username>>",
"password": "<<Password>>"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.exportKey",
"params": {
"username": "<<Username>>",
"password": "<<Password>>",
"address": ""
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.getBalance",
"params": {
"address": "ATH-custom1u6eth2fg33ye63mnyu5jswtj326jaypvhyar45"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.getBlockchains",
"params": {},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.getBlockchainStatus",
"params": {
"blockchainID": "2iP8efnRxnsain5NVsZ6NGddZCRWZVm2RezqKNiKANXPqQBbqm"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.getCurrentSupply",
"params": {}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.getCurrentValidators",
"params": {},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.getHeight",
"params": {}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.getMaxStakeAmount",
"params": {
"subnetID": "",
"nodeID": "",
"startTime": 123,
"endTime": 321
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.getMinStake",
"params": {}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.getPendingValidators",
"params": {
"subnetID": "11111111111111111111111111111111LpoYY",
"nodeIDs": []
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.getRewardUTXOs",
"params": {
"txID": "2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy2Y4",
"encoding": "hex"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.getStake",
"params": {
"addresses": [
""
],
"encoding": "hex"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.getStakingAssetID",
"params": {}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.getSubnets",
"params": {},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.getTimestamp",
"params": {}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.getTotalStake",
"params": {}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.getTx",
"params": {
"txID": "UvhWUXvspiijKCjR1CC4nLHcZzMrXN5qY183g1HASeZw9spbZ",
"encoding": "hex"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.getTxStatus",
"params": {
"txID": "WW4fyJxvPX2d28gHdvvcRCWEbc9eymVhBoDcUcZNFJnDEdxkD",
"includeReason": true
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.getUTXOs",
"params": {
"addresses": [
"ATH-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p"
],
"sourceChain": "AST",
"limit": 5,
"encoding": "hex"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.getValidatorsAt",
"params": {
"height": 60,
"subnetID": "11111111111111111111111111111111LpoYY"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.importDCM",
"params": {
"username": "<<Username>>",
"password": "<<Password>>",
"sourceChain": "AST",
"to": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.importKey",
"params": {
"username": "<<Username>>",
"password": "<<Password>>",
"privateKey": ""
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.listAddresses",
"params": {
"username": "<<Username>>",
"password": "<<Password>>"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "authority.sampleValidators",
"params": {
"size": 100
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.validatedBy",
"params": {
"blockchainID": "2iP8efnRxnsain5NVsZ6NGddZCRWZVm2RezqKNiKANXPqQBbqm"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "authority.validates",
"params": {
"subnetID": "11111111111111111111111111111111LpoYY"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ATH',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"method": "dcm.export",
"params": {
"from": [
"0x07464552eae4Efb8B985d311B093d25DE1D69F91"
],
"to": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"amount": 25,
"changeAddr": "0x07464552eae4Efb8B985d311B093d25DE1D69F91",
"assetID": "FSznYPiqrJ3WtGurw54re47oDpGXQ8THc8yZ4fEDX4G8cGqbn",
"username": "<<Username>>",
"password": "<<Password>>"
},
"jsonrpc": "2.0",
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/dcm',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"method": "dcm.exportKey",
"params": {
"username": "<<Username>>",
"password": "<<Password>>",
"address": "0x07464552eae4Efb8B985d311B093d25DE1D69F91"
},
"jsonrpc": "2.0",
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/dcm',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dcm.getAtomicTx",
"params": {
"txID": "Qk1d4K6f7Cr5q9ZHecBWMbUE7VxpWKbu8o3g3mcbvLMdz7j94",
"encoding": "hex"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/dcm',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dcm.getAtomicTxStatus",
"params": {
"txID": "Qk1d4K6f7Cr5q9ZHecBWMbUE7VxpWKbu8o3g3mcbvLMdz7j94"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/dcm',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dcm.getUTXOs",
"params": {
"addresses": [
"ACT-test19dl9a50ctqea369c54egn9qatuvvzpaaqzrq6e"
],
"sourceChain": "AST",
"limit": 5,
"encoding": "hex"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/dcm',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"method": "dcm.import",
"params": {
"username": "<<Username>>",
"password": "<<Password>>",
"sourceChain": "AST",
"to": "0x07464552eae4Efb8B985d311B093d25DE1D69F91"
},
"jsonrpc": "2.0",
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/dcm',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"method": "dcm.importKey",
"params": {
"username": "<<Username>>",
"password": "<<Password>>",
"privateKey": ""
},
"jsonrpc": "2.0",
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/dcm',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.buildGenesis",
"params": {
"genesisData": {
"asset1": {
"name": "asset1",
"symbol": "MFCA",
"memo": "2Zc54v4ek37TEwu4LiV3j41PUMRd6acDDU3ZCVSxE7X",
"denomination": 1,
"initialState": {
"fixedCap": [
{
"amount": 100000,
"address": "custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p"
}
]
}
},
"asset2": {
"name": "asset2",
"symbol": "MVCA",
"memo": "2Zc54v4ek37TEwu4LiV3j41PUMRd6acDDU3ZCVSxE7X",
"denomination": 2,
"initialState": {
"variableCap": [
{
"amount": 100000,
"address": "custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p"
}
]
}
}
},
"networkId": 1337,
"encoding": "cb58"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/vm/dvm',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "dvm.createAddress",
"params": {
"username": "<<Username>>",
"password": "<<Password>>"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.createAsset",
"params": {
"name": "myVariableCapAsset",
"symbol": "MFCA",
"denomination": 0,
"minterSets": [
{
"minters": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"threshold": 1
}
],
"from": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"changeAddr": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"username": "<<Username>>",
"password": "<<Password>>"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.createFixedCapAsset",
"params": {
"name": "Test Token",
"symbol": "TEST",
"denomination": 0,
"initialHolders": [
{
"address": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"amount": 400
}
],
"from": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"changeAddr": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"username": "<<Username>>",
"password": "Password"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.createNFTAsset",
"params": {
"name": "Coincert",
"symbol": "TIXX",
"minterSets": [
{
"minters": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"threshold": 1
},
{
"minters": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"threshold": 1
}
],
"from": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"changeAddr": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"username": "<<Username>>",
"password": "<<Password>>"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.createVariableCapAsset",
"params": {
"name": "myVariableCapAsset",
"symbol": "MFCA",
"denomination": 0,
"minterSets": [
{
"minters": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"threshold": 1
}
],
"from": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"changeAddr": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"username": "<<Username>>",
"password": "<<Password>>"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.export",
"params": {
"from": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"to": "ACT-test19dl9a50ctqea369c54egn9qatuvvzpaaqzrq6e",
"amount": 4000001000000,
"assetID": "DCM",
"changeAddr": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"username": "<<Username>>",
"password": "<<Password>>"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.exportKey",
"params": {
"username": "<<Username>>",
"password": "<<Password>>",
"address": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.getAllBalances",
"params": {
"address": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"assetID":"DCM",
"pageSize":20
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.getAllBalances",
"params": {
"address": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.getAssetDescription",
"params": {
"assetID": "DCM"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.getBalance",
"params": {
"address": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"assetID": ""
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.getTx",
"params": {
"txID": "UvhWUXvspiijKCjR1CC4nLHcZzMrXN5qY183g1HASeZw9spbZ",
"encoding": "hex"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.getTxStatus",
"params": {
"txID": "UvhWUXvspiijKCjR1CC4nLHcZzMrXN5qY183g1HASeZw9spbZ"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.getUTXOs",
"params": {
"addresses": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"limit": 5,
"sourceChain": "AST",
"encoding": "hex"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.import",
"params": {
"username": "<<Username>>",
"password": "<<Password>>",
"sourceChain": "ATH",
"to": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.importKey",
"params": {
"username": "<<Username>>",
"password": "<<Password>>",
"privateKey": ""
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "dvm.listAddresses",
"params": {
"username": "<<Username>>",
"password": "<<Password>>"
},
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.mint",
"params": {
"amount": 10000000,
"assetID": "2qnR9pLQTDZ9boSbcrcjS4n1DJJkzbkNsJzgwYvmRy8uv47fZT",
"from": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"to": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"minters": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"changeAddr": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"username": "<<Username>>",
"password": "<<Password>>"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.mintNFT",
"params": {
"assetID": "2KGdt2HpFKpTH5CtGZjYt5XPWs6Pv9DLoRBhiFfntbezdRvZWP",
"payload": "2EWh72jYQvEJF9NLk",
"from": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"to": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"minters": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"changeAddr": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"username": "<<Username>>",
"password": "<<Password>>",
"encoding": "hex"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.send",
"params": {
"assetID": "",
"amount": 2000000000,
"from": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"to": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"changeAddr": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"memo": "",
"username": "<<Username>>",
"password": "<<Password>>"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.sendMultiple",
"params": {
"outputs": [
{
"assetID": "",
"to": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"amount": 1000000000
}
],
"from": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"changeAddr": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"memo": "",
"username": "<<Username>>",
"password": "<<Password>>"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "dvm.sendNFT",
"params": {
"assetID": "2KGdt2HpFKpTH5CtGZjYt5XPWs6Pv9DLoRBhiFfntbezdRvZWP",
"from": [
"AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5"
],
"to": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"groupID": 0,
"changeAddr": "AST-melbourne1v2maz72gzrllqs7zzhyaa57qdlfulkkmtnx8j5",
"username": "<<Username>>",
"password": "<<Password>>"
}
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/AST',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_baseFee",
"params": [],
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"id": 1,
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"to": "0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7",
"data": "0xc92aecc4"
},
"latest"
]
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getAssetBalance",
"params": [
"0x07464552eae4Efb8B985d311B093d25DE1D69F91",
"latest",
"2W4XDTMrQJm7YALcnCL4krU7JpoGQQaDkTdn2HbzpsqombHRaB"
],
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": [
"0x07464552eae4efb8b985d311b093d25de1d69f91",
"latest"
],
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": [
"0x0ede341037562bea2914cd358a14aa96ec928e8bf92a792ada14e363c2392cf6",
true
],
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [
"0x49B",
true
],
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": [
"0x60fb4c72e3ce0a1f3cf7bd15bbbc01ce31ba456b10112196647dcc9f0b390797"
],
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": [
"0x07464552eae4efb8b985d311b093d25de1d69f91",
"latest"
],
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0xeb9d44bca6a580b133a3150ba1da43c7e639d18be5100314580cf17c787ed05f"
],
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_maxPriorityFeePerGas",
"params": [],
"id": 1
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"id": 1,
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": [
"0x00000000000000000006a7a54537cd346802277c849be18f2e98dafd1058e6880f99ba5a1ec5dd8b5d35bc7a36980775b9a26a3956ac0d315167488bcbf16879ea7d58e138ce456a9ba6000000018b0671c927154fe5a919f85d8679555680c2b2f65c0ecfa44ecc7de3447da5ca00000001e1a8759e671cc1f5b3eb5b8d9262a0025ef2b69c7a14899087f614905da9c351000000050000000253fca1c00000000100000000000000016fac93cbe0263cbabf9b95ce415fcdc5829713c40000000253f85912e1a8759e671cc1f5b3eb5b8d9262a0025ef2b69c7a14899087f614905da9c351000000010000000900000001931a9affa22c2e24ee381541876985ef53b6e8f92796346ead0d5c330471996a3aa91fc6bc59e2aadc68a43088d4a283e9a8098a549dec23a695f878f1aa4a12019c093d52"
]
});
var config = {
method: 'post',
url: '<<NODE_URL>>/ext/bc/ACT/rpc',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var axios = require('axios');
var data = JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "health.health"
});
var config = {