文件名称:cog:Codius的齿轮
文件大小:15KB
文件格式:ZIP
更新时间:2024-05-27 22:42:40
JavaScript
齿轮 由流支付驱动的合同引擎 const Koa = require ( 'koa' ) const KoaCog = require ( 'koa-cog' ) const SPSP = require ( 'ilp-protocol-spsp' ) const router = require ( 'koa-router' ) ( ) const parser = require ( 'koa-bodyparser' ) ( ) const app = new Koa ( ) const cog = new KoaCog ( ) router . get ( '/' , cog . paid ( ) , async ctx => { const accountant = new KoaCog . Accountant ( ctx . ilpStream ) // Before
【文件预览】:
cog-master
----.gitignore(14B)
----README.md(715B)
----examples()
--------simple.js(690B)
--------double.js(993B)
--------simple.client.js(262B)
----package.json(875B)
----src()
--------cog-accountant.js(1KB)
--------koa-cog.js(2KB)
--------hapi-cog.js(1KB)
--------listener.js(2KB)
----index.js(236B)
----package-lock.json(33KB)