ggez-banking-sdk
Version:
A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.
50 lines (49 loc) • 1.47 kB
JavaScript
const createDefaultBlockchainData = (overrides) => ({
result: null,
notes: null,
last_activity: null,
authentication: null,
validate: null,
function_code: null,
response_time: null,
time_zone: null,
time_zone_name: null,
info: null,
account: null,
fee: null,
transaction_data: null,
...overrides,
});
const fillBlockchainSendData = (data) => {
return createDefaultBlockchainData({
info: data.info,
transaction_data: data.transaction_data,
authentication: data.authentication,
});
};
const fillBlockchainMultiSendData = (data) => {
return createDefaultBlockchainData({
info: data.info,
transaction_data: data.transaction_data,
authentication: data.authentication,
});
};
const fillBlockchainDelegateData = (data) => {
return createDefaultBlockchainData({
info: data.info,
transaction_data: {
delegate: data.transaction_data.delegate,
},
authentication: data.authentication,
});
};
const fillBlockchainUndelegateData = (data) => {
return createDefaultBlockchainData({
info: data.info,
transaction_data: {
undelegate: data.transaction_data.undelegate,
},
authentication: data.authentication,
});
};
export { createDefaultBlockchainData, fillBlockchainSendData, fillBlockchainMultiSendData, fillBlockchainDelegateData, fillBlockchainUndelegateData, };