Skip to content

Instantly share code, notes, and snippets.

View aitorjs's full-sized avatar
💪
Looking for a good remote job!

aitor aitorjs

💪
Looking for a good remote job!
View GitHub Profile
pragma solidity ^0.4.11;
// import './IERC20.sol';
// contract FuncToken is IERC20 {
contract FuncToken {
uint public constant _totalSupply = 1000000;
string public constant symbol = "FUNC";
@aitorjs
aitorjs / lnbits.js
Last active February 15, 2022 17:48
call to lnbits openapi using swagger-client
const SwaggerClient = require('swagger-client');
async function main() {
const requestInterceptor = (request) => {
request.headers["X-API-KEY"] = 'MY-X-API-KEY';
request.headers["Content-Type"] = 'application/json';
return request;
};
const client = await SwaggerClient({ url: 'https://legend.lnbits.com/openapi.json', requestInterceptor })
window.addEventListener("DOMContentLoaded", function () {
console.log("APARECE");
})}