From 8fb7a4b9b236377b346425853a4892ef445f54d8 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Mon, 26 Aug 2019 13:32:34 -0700 Subject: [PATCH 01/50] Initial --- filecoin-actor-api.yml | 68 +++++++++++ filecoin-chain-api.yml | 261 +++++++++++++++++++++++++++++++++++++++++ filecoin-node-api.yml | 30 +++++ 3 files changed, 359 insertions(+) create mode 100644 filecoin-actor-api.yml create mode 100644 filecoin-chain-api.yml create mode 100644 filecoin-node-api.yml diff --git a/filecoin-actor-api.yml b/filecoin-actor-api.yml new file mode 100644 index 0000000..2ceeda8 --- /dev/null +++ b/filecoin-actor-api.yml @@ -0,0 +1,68 @@ +openapi: 3.0.2 +info: + title: Filecoin JSON REST Actor API + description: Filecoin JSON REST Actor API Description + version: 0.1.0 +servers: +- url: http://127.0.0.1:3453/api/actor/v0 +paths: + /actors: + get: + summary: List actirs + description: List actors currently known to this node in ID order + parameters: + - name: nextPageToken + in: query + description: Next page token + required: false + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Actor' + /actors/{actorId}: + get: + summary: Find actor by ID + description: Find a single actor record by ID + parameters: + - name: actorId + in: path + description: ID of the Actor to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Actor' +components: + schemas: + Actor: + type: object + properties: + kind: + type: string + enum: [actor] + id: + type: string + role: + type: string + enum: [miner,user,storageMarket,paymentBroker] + nonce: + type: number + balance: + type: number + stateRoot: + type: string + state: + type: object + description: Role specific properties \ No newline at end of file diff --git a/filecoin-chain-api.yml b/filecoin-chain-api.yml new file mode 100644 index 0000000..2536cdf --- /dev/null +++ b/filecoin-chain-api.yml @@ -0,0 +1,261 @@ +openapi: 3.0.2 +info: + title: Filecoin JSON REST Chain API + description: Filecoin JSON REST Chain API Description + version: 0.1.0 +servers: +- url: http://127.0.0.1:3453/api/chain/v0 +paths: + /version: + get: + summary: Return version info + description: Fetch version information for the current node + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Version' + /tipsets: + get: + summary: List tipsets + description: List tipsets currently known to this node in reverse height order + parameters: + - name: nextPageToken + in: query + description: Next page token + required: false + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Tipset' + /tipsets/{tipsetId}: + get: + summary: Find tipset by ID + description: Find a single tipset record by ID + parameters: + - name: tipsetId + in: path + description: ID of the Tipset to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Tipset' + /block/{blockId}: + get: + summary: Find block by ID + description: Find a single block record by ID + parameters: + - name: blockId + in: path + description: ID of the Block to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Message' + /messages: + post: + summary: Send a message + description: This method sends a new message to an actor recipient. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Message' + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Message' + + /messages/{messageId}: + get: + summary: Find message by ID + description: Find a single message record by ID + parameters: + - name: messageId + in: path + description: ID of the message to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Message' + /executed-messages/{executedMessageId}: + get: + summary: Find executed message by ID + description: An executed message is one that has been included in a valid block in the chain. It includes return value and status information. Find a single executed message record by ID + parameters: + - name: executedMessageId + in: path + description: ID of the executed message to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ExecutedMessage' +components: + schemas: + Block: + type: object + properties: + kind: + type: string + enum: [block] + id: + type: string + header: + $ref: '#/components/schemas/BlockHeader' + executedMessages: + type: array + items: + $ref: '#/components/schemas/ExecutedMessage' + BlockHeader: + type: object + properties: + kind: + type: string + enum: [blockHeader] + readOnly: true + id: + type: string + height: + type: number + minerId: + type: string + messageListId: + type: string + recieptListId: + type: string + tickets: + type: array + items: + type: string + electionProof: + type: string + parentTipsetId: + type: string + parentWeight: + type: number + stateRoot: + type: string + timestamp: + type: number + blsAggregate: + type: string + signature: + type: string + ExecutedMessage: + type: object + properties: + kind: + type: string + enum: [executedMessage] + readOnly: true + id: + type: string + readOnly: true + blockId: + type: string + readOnly: true + message: + $ref: '#/components/schemas/Message' + exitCode: + type: number + readOnly: true + return: + type: object + readOnly: true + Message: + type: object + properties: + kind: + type: string + enum: [mxecutedMessage] + readOnly: true + id: + type: string + readOnly: true + nonce: + type: number + readOnly: true + from: + type: string + readOnly: true + to: + type: string + value: + type: number + gasPrice: + type: number + gasLimit: + type: number + method: + type: string + parameters: + type: object + signature: + type: string + readOnly: true + Tipset: + type: object + properties: + kind: + type: string + enum: [tipset] + readOnly: true + id: + type: string + readOnly: true + example: "zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ" + height: + type: number + blocks: + type: array + items: + $ref: '#/components/schemas/BlockHeader' + Version: + type: object + properties: + kind: + type: string + enum: [version] + readOnly: true + version: + type: string + example: "1.0.2" + commit: + type: string + example: "93540266a2a9972e91947a538ce70dc9c4e8077e" \ No newline at end of file diff --git a/filecoin-node-api.yml b/filecoin-node-api.yml new file mode 100644 index 0000000..18e5da7 --- /dev/null +++ b/filecoin-node-api.yml @@ -0,0 +1,30 @@ +openapi: 3.0.2 +info: + title: Filecoin JSON REST Node API + description: Filecoin JSON REST Node API Description + version: 0.1.0 +servers: +- url: http://127.0.0.1:3453/api/node/v0 +paths: + /node: + get: + summary: Get information about the current Filecoin Node + description: Get information about the current Filecoin Node + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Node' +components: + schemas: + Node: + type: object + properties: + kind: + type: string + enum: [node] + address: + type: string + \ No newline at end of file From 9843e9412359fec6fe2c9444a625f7c106e62342 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Tue, 27 Aug 2019 15:14:23 -0700 Subject: [PATCH 02/50] Merged to single file --- filecoin-actor-api.yml | 68 ------------------- filecoin-node-api.yml | 30 -------- ...oin-chain-api.yml => filecoin-rest-api.yml | 0 3 files changed, 98 deletions(-) delete mode 100644 filecoin-actor-api.yml delete mode 100644 filecoin-node-api.yml rename filecoin-chain-api.yml => filecoin-rest-api.yml (100%) diff --git a/filecoin-actor-api.yml b/filecoin-actor-api.yml deleted file mode 100644 index 2ceeda8..0000000 --- a/filecoin-actor-api.yml +++ /dev/null @@ -1,68 +0,0 @@ -openapi: 3.0.2 -info: - title: Filecoin JSON REST Actor API - description: Filecoin JSON REST Actor API Description - version: 0.1.0 -servers: -- url: http://127.0.0.1:3453/api/actor/v0 -paths: - /actors: - get: - summary: List actirs - description: List actors currently known to this node in ID order - parameters: - - name: nextPageToken - in: query - description: Next page token - required: false - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Actor' - /actors/{actorId}: - get: - summary: Find actor by ID - description: Find a single actor record by ID - parameters: - - name: actorId - in: path - description: ID of the Actor to fetch - required: true - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Actor' -components: - schemas: - Actor: - type: object - properties: - kind: - type: string - enum: [actor] - id: - type: string - role: - type: string - enum: [miner,user,storageMarket,paymentBroker] - nonce: - type: number - balance: - type: number - stateRoot: - type: string - state: - type: object - description: Role specific properties \ No newline at end of file diff --git a/filecoin-node-api.yml b/filecoin-node-api.yml deleted file mode 100644 index 18e5da7..0000000 --- a/filecoin-node-api.yml +++ /dev/null @@ -1,30 +0,0 @@ -openapi: 3.0.2 -info: - title: Filecoin JSON REST Node API - description: Filecoin JSON REST Node API Description - version: 0.1.0 -servers: -- url: http://127.0.0.1:3453/api/node/v0 -paths: - /node: - get: - summary: Get information about the current Filecoin Node - description: Get information about the current Filecoin Node - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Node' -components: - schemas: - Node: - type: object - properties: - kind: - type: string - enum: [node] - address: - type: string - \ No newline at end of file diff --git a/filecoin-chain-api.yml b/filecoin-rest-api.yml similarity index 100% rename from filecoin-chain-api.yml rename to filecoin-rest-api.yml From df97c3ba83096e23ed29de4dccae3e9820cea152 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Tue, 27 Aug 2019 16:41:46 -0700 Subject: [PATCH 03/50] Added linting tool --- .gitignore | 1 + package-lock.json | 1704 +++++++++++++++++++++++++++++++++++++++++++++ package.json | 9 + 3 files changed, 1714 insertions(+) create mode 100644 .gitignore create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..1b5f74e --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1704 @@ +{ + "name": "filecoin-rest-api", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/runtime": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.5.tgz", + "integrity": "sha512-28QvEGyQyNkB0/m2B4FU7IEZGK2NUrcMtT6BZEFALTguLk+AUT6ofsHtPk5QyjAdUkpMJ+/Em+quwz4HOt30AQ==", + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, + "@cloudflare/json-schema-walker": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@cloudflare/json-schema-walker/-/json-schema-walker-0.1.1.tgz", + "integrity": "sha512-P3n0hEgk1m6uKWgL4Yb1owzXVG4pM70G4kRnDQxZXiVvfCRtaqiHu+ZRiRPzmwGBiLTO1LWc2yR1M8oz0YkXww==" + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "better-ajv-errors": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-0.5.7.tgz", + "integrity": "sha512-O7tpXektKWVwYCH5g6Vs3lKD+sJs7JHh5guapmGJd+RTwxhFZEf4FwvbHBURUnoXsTeFaMvGuhTTmEGiHpNi6w==", + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/runtime": "^7.0.0", + "chalk": "^2.4.1", + "core-js": "^2.5.7", + "json-to-ast": "^2.0.3", + "jsonpointer": "^4.0.1", + "leven": "^2.1.0" + } + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + }, + "clipboard": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", + "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==", + "optional": true, + "requires": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-error-fragment": { + "version": "0.0.230", + "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", + "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "commander": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==" + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "core-js": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", + "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==" + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decko": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decko/-/decko-1.2.0.tgz", + "integrity": "sha1-/UPHNelnuAEzBohKVvvmZZlraBc=" + }, + "delegate": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==", + "optional": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "dom-walk": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", + "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" + }, + "dompurify": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-1.0.11.tgz", + "integrity": "sha512-XywCTXZtc/qCX3iprD1pIklRVk/uhl8BKpkTxr+ZyMVUzSUg7wkQXRBp/euJ5J5moa1QvfpvaPQVP71z1O59dQ==" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "ejs": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.2.tgz", + "integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q==" + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "requires": { + "once": "^1.4.0" + } + }, + "es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, + "format-util": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/format-util/-/format-util-1.0.3.tgz", + "integrity": "sha1-Ay3KShFiYqEsQ/TD7IVmQWxbLZU=" + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + }, + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "good-listener": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", + "optional": true, + "requires": { + "delegate": "^3.1.2" + } + }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "hoist-non-react-statics": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz", + "integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==", + "requires": { + "react-is": "^16.7.0" + } + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "http2-client": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.3.tgz", + "integrity": "sha512-nUxLymWQ9pzkzTmir24p2RtsgruLmhje7lH3hLX1IpwvyTg77fW+1brenPPP3USAR+rQ36p5sTA/x7sjCJVkAA==" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "ipaddr.js": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", + "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-pointer": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.0.tgz", + "integrity": "sha1-jlAFUKaqxUZKRzN32leqbMIoKNc=", + "requires": { + "foreach": "^2.0.4" + } + }, + "json-schema-ref-parser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-6.1.0.tgz", + "integrity": "sha512-pXe9H1m6IgIpXmE5JSb8epilNTGsmTb2iPohAXpOdhqGFbQjNeHHsZxU+C8w6T81GZxSPFLeUoqDJmzxx5IGuw==", + "requires": { + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.12.1", + "ono": "^4.0.11" + } + }, + "json-schema-to-openapi-schema": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/json-schema-to-openapi-schema/-/json-schema-to-openapi-schema-0.3.0.tgz", + "integrity": "sha512-UaaAmmbAq61yQM5yLoVOM99GP1JI8YNVEv3QWbD/79YDNNKk99uGn1k2pa+ZSfdLILi/euGguVG8URmv5gR/Bw==", + "requires": { + "@cloudflare/json-schema-walker": "^0.1.1" + } + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-to-ast": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json-to-ast/-/json-to-ast-2.1.0.tgz", + "integrity": "sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==", + "requires": { + "code-error-fragment": "0.0.230", + "grapheme-splitter": "^1.0.4" + } + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=" + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lunr": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.6.tgz", + "integrity": "sha512-swStvEyDqQ85MGpABCMBclZcLI/pBIlu8FFDtmX197+oEgKloJ67QnB+Tidh0340HmLMs39c4GrkPY3cmkXp6Q==" + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "requires": { + "p-defer": "^1.0.0" + } + }, + "mark.js": { + "version": "8.11.1", + "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", + "integrity": "sha1-GA8fnr74sOY45BZq1S24eb6y/8U=" + }, + "marked": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.3.tgz", + "integrity": "sha512-Fqa7eq+UaxfMriqzYLayfqAE40WN03jf+zHjT18/uXNuzjq3TY0XTbrAoPeqSJrAmPz11VuUA+kBPYOhHt9oOQ==" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "mem": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + } + }, + "memoize-one": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.1.1.tgz", + "integrity": "sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA==" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "requires": { + "mime-db": "1.40.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "requires": { + "dom-walk": "^0.1.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "mobx-react": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-5.4.4.tgz", + "integrity": "sha512-2mTzpyEjVB/RGk2i6KbcmP4HWcAUFox5ZRCrGvSyz49w20I4C4qql63grPpYrS9E9GKwgydBHQlA4y665LuRCQ==", + "requires": { + "hoist-non-react-statics": "^3.0.0", + "react-lifecycles-compat": "^3.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nconf": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz", + "integrity": "sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q==", + "requires": { + "async": "^1.4.0", + "ini": "^1.3.0", + "secure-keys": "^1.0.0", + "yargs": "^3.19.0" + } + }, + "nconf-yaml": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nconf-yaml/-/nconf-yaml-1.0.2.tgz", + "integrity": "sha1-/qBlMzz0K3el6AYFF5aXmdQVZXU=", + "requires": { + "js-yaml": "^3.2.3" + } + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + }, + "node-fetch-h2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", + "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", + "requires": { + "http2-client": "^1.2.5" + } + }, + "node-readfiles": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", + "integrity": "sha1-271K8SE04uY1wkXvk//Pb2BnOl0=", + "requires": { + "es6-promise": "^3.2.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "oas-kit-common": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.7.tgz", + "integrity": "sha512-8+P8gBjN9bGfa5HPgyefO78o394PUwHoQjuD4hM0Bpl56BkcxoyW4MpWMPM6ATm+yIIz4qT1igmuVukUtjP/pQ==", + "requires": { + "safe-json-stringify": "^1.2.0" + } + }, + "oas-linter": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.0.1.tgz", + "integrity": "sha512-vk8Pzqq8iZM8V0/8NJMHAbf4CMyAUnLTJPNKwCkFl6g2W7omomL3yPpseNqihwU7KgqwYDTjxJ31qavmYbeDbg==", + "requires": { + "should": "^13.2.1", + "yaml": "^1.3.1" + } + }, + "oas-resolver": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.2.5.tgz", + "integrity": "sha512-AwARII3hmdXtDAGccvjVsRLked0PNJycIG/koD6lYoGspJjxnQ3a8AmDgp7kHYnG148zusfsl8GM0cfwGmd7EA==", + "requires": { + "node-fetch-h2": "^2.3.0", + "oas-kit-common": "^1.0.7", + "reftools": "^1.0.8", + "yaml": "^1.3.1", + "yargs": "^12.0.5" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + } + } + }, + "oas-schema-walker": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.2.tgz", + "integrity": "sha512-Q9xqeUtc17ccP/dpUfARci4kwFFszyJAgR/wbDhrRR/73GqsY5uSmKaIK+RmBqO8J4jVYrrDPjQKvt1IcpQdGw==" + }, + "oas-validator": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-3.3.1.tgz", + "integrity": "sha512-WFKafxpH2KrxHG6drJiJ7M0mzGZER3XDkLtbeX8z9YNR4JvCMDlhQL7J2i+rnCxyVC8riRZGGeZpxQ0000w2HA==", + "requires": { + "ajv": "^5.5.2", + "better-ajv-errors": "^0.5.2", + "call-me-maybe": "^1.0.1", + "oas-kit-common": "^1.0.7", + "oas-linter": "^3.0.1", + "oas-resolver": "^2.2.5", + "oas-schema-walker": "^1.1.2", + "reftools": "^1.0.8", + "should": "^13.2.1", + "yaml": "^1.3.1" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "ono": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/ono/-/ono-4.0.11.tgz", + "integrity": "sha512-jQ31cORBFE6td25deYeD80wxKBMj+zBmHTrVxnc6CKhx8gho6ipmWM5zj/oeoqioZ99yqBls9Z/9Nss7J26G2g==", + "requires": { + "format-util": "^1.0.3" + } + }, + "openapi-sampler": { + "version": "1.0.0-beta.14", + "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.0.0-beta.14.tgz", + "integrity": "sha512-NNmH9YAN5AaCE4w6MQXdCrmsOJJQTswHVSp075+h+iiG+OTonpZE8HzwocozovD2imx4lamkuxGLs4E4bO4Z+g==", + "requires": { + "json-pointer": "^0.6.0" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + } + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "perfect-scrollbar": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-1.4.0.tgz", + "integrity": "sha512-/2Sk/khljhdrsamjJYS5NjrH+GKEHEwh7zFSiYyxROyYKagkE4kSn2zDQDRTOMo8mpT2jikxx6yI1dG7lNP/hw==" + }, + "polished": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/polished/-/polished-3.4.1.tgz", + "integrity": "sha512-GflTnlP5rrpDoigjczEkS6Ye7NDA4sFvAnlr5hSDrEvjiVj97Xzev3hZlLi3UB27fpxyTS9rWU64VzVLWkG+mg==", + "requires": { + "@babel/runtime": "^7.4.5" + } + }, + "prismjs": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.17.1.tgz", + "integrity": "sha512-PrEDJAFdUGbOP6xK/UsfkC5ghJsPJviKgnQOoxaDbBjwc8op68Quupwt1DeAFoG8GImPhiKXAvvsH7wDSLsu1Q==", + "requires": { + "clipboard": "^2.0.0" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "proxy-addr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", + "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.0" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "react-dropdown": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/react-dropdown/-/react-dropdown-1.6.4.tgz", + "integrity": "sha512-zTlNRZ6vzjEPsodBNgh6Xjp9IempEx9sReH3crT2Jw4S6KW2wS/BRIH3d/grYf/iXARadDRD91//uUCs9yjoLg==", + "requires": { + "classnames": "^2.2.3" + } + }, + "react-hot-loader": { + "version": "4.12.12", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.12.tgz", + "integrity": "sha512-Tkd412j5yPKHoTRsJzZb+5UJNFKkPszm7QGKGYvt+jnzTkDS+qK0u3AYPlB0MmBlwzUKVHICqq5KH9Srzda7XA==", + "requires": { + "fast-levenshtein": "^2.0.6", + "global": "^4.3.0", + "hoist-non-react-statics": "^3.3.0", + "loader-utils": "^1.1.0", + "prop-types": "^15.6.1", + "react-lifecycles-compat": "^3.0.4", + "shallowequal": "^1.1.0", + "source-map": "^0.7.3" + } + }, + "react-is": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.9.0.tgz", + "integrity": "sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw==" + }, + "react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, + "react-tabs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-3.0.0.tgz", + "integrity": "sha512-z90cDIb+5V7MzjXFHq1VLxYiMH7dDQWan7mXSw6BWQtw+9pYAnq/fEDvsPaXNyevYitvLetdW87C61uu27JVMA==", + "requires": { + "classnames": "^2.2.0", + "prop-types": "^15.5.0" + } + }, + "redoc": { + "version": "2.0.0-rc.8-1", + "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-rc.8-1.tgz", + "integrity": "sha512-/YoCdcl2QtveKz4CTXaqtOfCIaVgZZgcnfUNC5xK7xBl/LxTiNj3tUbgFmrYMLTZGzNdQ9TUJpsa7lXDKcr8Pw==", + "requires": { + "classnames": "^2.2.6", + "decko": "^1.2.0", + "dompurify": "^1.0.10", + "eventemitter3": "^3.0.0", + "json-pointer": "^0.6.0", + "json-schema-ref-parser": "^6.1.0", + "lunr": "2.3.6", + "mark.js": "^8.11.1", + "marked": "^0.6.1", + "memoize-one": "^5.0.0", + "mobx-react": "^5.4.3", + "openapi-sampler": "1.0.0-beta.14", + "perfect-scrollbar": "^1.4.0", + "polished": "^3.0.3", + "prismjs": "^1.15.0", + "prop-types": "^15.7.2", + "react-dropdown": "^1.6.4", + "react-hot-loader": "^4.8.0", + "react-tabs": "^3.0.0", + "slugify": "^1.3.4", + "stickyfill": "^1.1.1", + "swagger2openapi": "^5.2.3", + "tslib": "^1.9.3" + } + }, + "reftools": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.0.8.tgz", + "integrity": "sha512-hERpM8J+L0q8dzKFh/QqcLlKZYmTgzGZM7m8b1ptS66eg4NA/iMPm7GNw3TKZ876ndVjGpiLt0BCIfAWsUgwGg==" + }, + "regenerator-runtime": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-json-stringify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz", + "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "secure-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", + "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=" + }, + "select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=", + "optional": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "should": { + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "requires": { + "should-equal": "^2.0.0", + "should-format": "^3.0.3", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" + } + }, + "should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "requires": { + "should-type": "^1.4.0" + } + }, + "should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", + "requires": { + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" + } + }, + "should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=" + }, + "should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "requires": { + "should-type": "^1.3.0", + "should-util": "^1.0.0" + } + }, + "should-util": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "slugify": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.4.tgz", + "integrity": "sha512-KP0ZYk5hJNBS8/eIjGkFDCzGQIoZ1mnfQRYS5WM3273z+fxGWXeN0fkwf2ebEweydv9tioZIHGZKoF21U07/nw==" + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" + }, + "speccy": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/speccy/-/speccy-0.11.0.tgz", + "integrity": "sha512-f9XXngfae43WR9uz8m3yk935nsJIJH1YaRNNjEYqF+uL3yNlabFgixPKncJKXT2LfiMhhszwVSgrDgUaUvGBVQ==", + "requires": { + "commander": "^2.18.0", + "ejs": "^2.5.2", + "express": "^4.14.0", + "json-schema-to-openapi-schema": "^0.3.0", + "nconf": "^0.10.0", + "nconf-yaml": "^1.0.2", + "node-fetch": "^2.3.0", + "node-readfiles": "^0.2.0", + "oas-linter": "^3.0.0", + "oas-resolver": "^2.2.4", + "oas-validator": "^3.0.1", + "redoc": "v2.0.0-rc.8-1", + "yaml": "^1.5.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "stickyfill": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stickyfill/-/stickyfill-1.1.1.tgz", + "integrity": "sha1-OUE/7p0CXHSn5ZzuyyN4TMDxfwI=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "swagger2openapi": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-5.3.1.tgz", + "integrity": "sha512-2EIs1gJs9LH4NjrxHPJs6N0Kh9pg66He+H9gIcfn1Q9dvdqPPVTC2NRdXalqT+98rIoV9kSfAtNBD4ASC0Q1mg==", + "requires": { + "better-ajv-errors": "^0.6.1", + "call-me-maybe": "^1.0.1", + "node-fetch-h2": "^2.3.0", + "node-readfiles": "^0.2.0", + "oas-kit-common": "^1.0.7", + "oas-resolver": "^2.2.5", + "oas-schema-walker": "^1.1.2", + "oas-validator": "^3.3.1", + "reftools": "^1.0.8", + "yaml": "^1.3.1", + "yargs": "^12.0.5" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "better-ajv-errors": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-0.6.4.tgz", + "integrity": "sha512-+spBhtcCzovXWeHpt5dGylFsn3p5l9w+KcUqh/b4MFdLV+q1sT1olxD9izvwi0D3WuP06eVgeZAGLtxtTnUIDg==", + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/runtime": "^7.0.0", + "chalk": "^2.4.1", + "core-js": "^2.5.7", + "json-to-ast": "^2.0.3", + "jsonpointer": "^4.0.1", + "leven": "^2.1.0" + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + } + } + }, + "tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", + "optional": true + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yaml": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.6.0.tgz", + "integrity": "sha512-iZfse3lwrJRoSlfs/9KQ9iIXxs9++RvBFVzAqbbBiFT+giYtyanevreF9r61ZTbGMgWQBxAua3FzJiniiJXWWw==", + "requires": { + "@babel/runtime": "^7.4.5" + } + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..1b4c44a --- /dev/null +++ b/package.json @@ -0,0 +1,9 @@ +{ + "name": "filecoin-rest-api", + "description": "Filecoin JSON REST API OpenAPI Specification", + "version": "0.1.0", + "dependencies": { + "speccy": "^0.11.0" + }, + "devDependencies": {} +} From 1dbcf63a03ac340bd9ba822d9324439e9951d1c7 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Tue, 27 Aug 2019 16:50:56 -0700 Subject: [PATCH 04/50] Fix linter errors --- filecoin-rest-api.yml | 182 +++++++++++++++++++++++++++++++++++------- 1 file changed, 153 insertions(+), 29 deletions(-) diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 2536cdf..9bd87cd 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -1,26 +1,84 @@ openapi: 3.0.2 +tags: + - name: Actors + - name: Node + - name: blocks + - name: messages + - name: tipsets + description: Operations on tipsets +x-tagGroups: + - name: Chain Resources + tags: + - tipsets + - blocks + - messages + - name: Actors + tags: + - actors + - name: Control + tags: + - Node info: - title: Filecoin JSON REST Chain API - description: Filecoin JSON REST Chain API Description + title: Filecoin JSON REST API + description: Filecoin JSON REST API Description version: 0.1.0 + contact: + name: Filecoin JSON REST API SPEC + email: erik.ingenito@protocol.ai servers: - url: http://127.0.0.1:3453/api/chain/v0 paths: - /version: + /actors/actors: get: - summary: Return version info - description: Fetch version information for the current node + operationId: listActors + summary: List actors + description: List actors currently known to this node in ID order + tags: + - actors + parameters: + - name: nextPageToken + in: query + description: Next page token + required: false + schema: + type: string responses: 200: description: Success content: application/json: schema: - $ref: '#/components/schemas/Version' - /tipsets: + type: array + items: + $ref: '#/components/schemas/Actor' + /actors/{actorId}: get: + operationId: getActorById + summary: Find actor by ID + description: Find a single actor record by ID + tags: + - actors + parameters: + - name: actorId + in: path + description: ID of the Actor to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Actor' + /chain/tipsets: + get: + operationId: listTipsets summary: List tipsets description: List tipsets currently known to this node in reverse height order + tags: + - tipsets parameters: - name: nextPageToken in: query @@ -37,10 +95,13 @@ paths: type: array items: $ref: '#/components/schemas/Tipset' - /tipsets/{tipsetId}: + /chain/tipsets/{tipsetId}: get: - summary: Find tipset by ID + operationId: getTipsetById + summary: Fetch a tipset by ID description: Find a single tipset record by ID + tags: + - tipsets parameters: - name: tipsetId in: path @@ -55,10 +116,13 @@ paths: application/json: schema: $ref: '#/components/schemas/Tipset' - /block/{blockId}: + /chain/block/{blockId}: get: + operationId: getBlockById summary: Find block by ID description: Find a single block record by ID + tags: + - blocks parameters: - name: blockId in: path @@ -73,10 +137,13 @@ paths: application/json: schema: $ref: '#/components/schemas/Message' - /messages: + /chain/messages: post: + operationId: createMessage summary: Send a message description: This method sends a new message to an actor recipient. + tags: + - messages requestBody: content: application/json: @@ -89,11 +156,13 @@ paths: application/json: schema: $ref: '#/components/schemas/Message' - - /messages/{messageId}: + /chain/messages/{messageId}: get: + operationId: getMessageById summary: Find message by ID description: Find a single message record by ID + tags: + - nessages parameters: - name: messageId in: path @@ -108,10 +177,13 @@ paths: application/json: schema: $ref: '#/components/schemas/Message' - /executed-messages/{executedMessageId}: + /chain/executed-messages/{executedMessageId}: get: + operationId: getExecutedMessageById summary: Find executed message by ID description: An executed message is one that has been included in a valid block in the chain. It includes return value and status information. Find a single executed message record by ID + tags: + - messages parameters: - name: executedMessageId in: path @@ -126,8 +198,42 @@ paths: application/json: schema: $ref: '#/components/schemas/ExecutedMessage' + /control/node: + get: + operationId: getNode + summary: Get information about the current Filecoin Node + description: Get information about the current Filecoin Node + tags: + - Node + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Node' components: - schemas: + schemas: + Actor: + type: object + properties: + kind: + type: string + enum: [actor] + id: + type: string + role: + type: string + enum: [miner,user,storageMarket,paymentBroker] + nonce: + type: number + balance: + type: number + stateRoot: + type: string + state: + type: object + description: Role specific properties Block: type: object properties: @@ -229,6 +335,37 @@ components: signature: type: string readOnly: true + Node: + type: object + properties: + kind: + type: string + enum: [node] + id: + type: string + example: QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq + addresses: + type: array + items: + type: string + example: /ip4/127.0.0.1/tcp/6000/ipfs/QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq + version: + type: string + example: "1.0.2" + commit: + type: string + example: "93540266a2a9972e91947a538ce70dc9c4e8077e" + protocol: + type: object + properties: + autoSealInterval: + type: number + description: Auto-Seal Interval in Seconds + sectorSizes: + type: array + description: Supoorted sector sizes in bytes + items: + type: number Tipset: type: object properties: @@ -245,17 +382,4 @@ components: blocks: type: array items: - $ref: '#/components/schemas/BlockHeader' - Version: - type: object - properties: - kind: - type: string - enum: [version] - readOnly: true - version: - type: string - example: "1.0.2" - commit: - type: string - example: "93540266a2a9972e91947a538ce70dc9c4e8077e" \ No newline at end of file + $ref: '#/components/schemas/BlockHeader' \ No newline at end of file From 37c91a8a69ec3413e79184c57cbd4dd55d4327f0 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Tue, 27 Aug 2019 17:41:44 -0700 Subject: [PATCH 05/50] First pass at miner state --- filecoin-rest-api.yml | 53 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 9bd87cd..fc8fa9e 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -214,6 +214,53 @@ paths: $ref: '#/components/schemas/Node' components: schemas: + Sector: + type: object + properties: + id: + type: string + commR: + type: string + MinerState: + type: object + properties: + kind: + type: string + enum: [minerState] + dePledgedCollateral: + description: Collateral that is waiting to be withdrawn + type: number + dePledgeTime: + description: Time at which the depledged collateral may be withdrawn + type: number + sectors: + type: array + items: + $ref: '#/components/schemas/Sector' + provingSet: + type: array + items: + $ref: '#/components/schemas/Sector' + currentFaultSet: + type: string + nextFaultSet: + type: string + nextDoneSet: + type: string + arbitratedDeals: + type: string + power: + type: number + slashedSet: + type: array + items: + $ref: '#/components/schemas/Sector' + slashedAt: + type: number + ownedStorageCollateral: + type: number + provingPeriodEnd: + type: number Actor: type: object properties: @@ -224,7 +271,7 @@ components: type: string role: type: string - enum: [miner,user,storageMarket,paymentBroker] + enum: [miner,account,storageMarket,paymentBroker] nonce: type: number balance: @@ -232,8 +279,8 @@ components: stateRoot: type: string state: - type: object - description: Role specific properties + oneOf: + - $ref: '#/components/schemas/MinerState' Block: type: object properties: From 44b9d38c54179c58c50498c6d442a7a4fd747327 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Wed, 28 Aug 2019 09:42:34 -0700 Subject: [PATCH 06/50] Update README.md --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 66796b8..7495ac2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ # node-http-api -Implementation and specification for the Filecoin node HTTP API +OpenAPI specification for the Filecoin HTTP REST API. + +This is the specification for the HTTP REST API (to be) implemented by Filecoin nodes. Some details of its design and rationale can be found in this [Design Document](https://docs.google.com/document/d/1ANnTHOU-8612ayvvS7Ru4B1L4voojLE0R0TQ8zF1x5s/edit#heading=h.8v8p3fl8e3gj). + +## Setup +To facilitate development and review of this specification we're using [speccy](https://github.com/wework/speccy). You can install speccy using NPM or Yarn. + +```sh +$ npm install +# or +$ yarn install +``` + +## Usage +To view the specification in HTML documentation form ([ReDoc](https://github.com/Redocly/redoc)) you can invoke speccy via: +```sh +$ npm run serve +``` +And view the resulting documentation at http://localhost:5000. From 658e4ce45e628c98dcd9d4021e8e39cc75512bc3 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Wed, 28 Aug 2019 09:43:00 -0700 Subject: [PATCH 07/50] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7495ac2..5ab5686 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# node-http-api +# WIP node-http-api OpenAPI specification for the Filecoin HTTP REST API. This is the specification for the HTTP REST API (to be) implemented by Filecoin nodes. Some details of its design and rationale can be found in this [Design Document](https://docs.google.com/document/d/1ANnTHOU-8612ayvvS7Ru4B1L4voojLE0R0TQ8zF1x5s/edit#heading=h.8v8p3fl8e3gj). From 9f918b36291a31df6f1a32f319527fc9a593cabb Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Wed, 28 Aug 2019 09:43:22 -0700 Subject: [PATCH 08/50] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ab5686..787459f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# WIP node-http-api +# node-http-api (WIP) OpenAPI specification for the Filecoin HTTP REST API. This is the specification for the HTTP REST API (to be) implemented by Filecoin nodes. Some details of its design and rationale can be found in this [Design Document](https://docs.google.com/document/d/1ANnTHOU-8612ayvvS7Ru4B1L4voojLE0R0TQ8zF1x5s/edit#heading=h.8v8p3fl8e3gj). From 3fb7a3cbd6cdbc91fe263a42132725afcf7ef855 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Wed, 28 Aug 2019 09:54:38 -0700 Subject: [PATCH 09/50] Added serve script --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 1b4c44a..eb0b6ab 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,9 @@ "name": "filecoin-rest-api", "description": "Filecoin JSON REST API OpenAPI Specification", "version": "0.1.0", + "scripts": { + "serve": "speccy serve ./filecoin-rest-api.yml" + }, "dependencies": { "speccy": "^0.11.0" }, From 65d244ec7cd10125b5a1533af4b917cf1f063561 Mon Sep 17 00:00:00 2001 From: Mosh <1306020+mishmosh@users.noreply.github.com> Date: Thu, 29 Aug 2019 13:14:00 -0400 Subject: [PATCH 10/50] update readme for new repo name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 787459f..b7d4d0b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# node-http-api (WIP) +# filecoin-http-api (WIP) OpenAPI specification for the Filecoin HTTP REST API. This is the specification for the HTTP REST API (to be) implemented by Filecoin nodes. Some details of its design and rationale can be found in this [Design Document](https://docs.google.com/document/d/1ANnTHOU-8612ayvvS7Ru4B1L4voojLE0R0TQ8zF1x5s/edit#heading=h.8v8p3fl8e3gj). From a6ea98d1ad36eab8b5c179a38942d0060d5a1171 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Thu, 29 Aug 2019 13:35:11 -0700 Subject: [PATCH 11/50] Continued documentation of actor state --- filecoin-rest-api.yml | 54 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index fc8fa9e..acd3c0c 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -220,19 +220,49 @@ components: id: type: string commR: - type: string - MinerState: + type: string + EmptyActorState: + type: object + description: There is no additional state exposed by this actor + AccountActorState: + $ref: '#/components/schemas/EmptyActorState' + InitActorState: + type: object + properties: + nextId: + type: number + description: The next numerical ID to allocate to a newly instantiated Actor + StorageMarketActorState: + type: object + properties: + totalStorage: + type: number + description: Filecoin's total committed storage as of the current block. + PaymentChannelActorState: + type: object + PaymentBrokerActorState: + $ref: '#/components/schemas/EmptyActorState' + MinerActorState: type: object properties: - kind: + owner: + type: string + description: The address of the account that owns this miner. Income and returned are paid to this address. This address is also allowed to change the worker address for the miner. + worker: type: string - enum: [minerState] + description: The address of the worker account for this miner. This will be the key that is used to sign blocks created by this miner, and sign messages sent on behalf of this miner to commit sectors, submit PoSts, and other day to day miner activities. + peerId: + type: string + description: PeerID references the libp2p identity that the miner is operating. + sectorSize: + type: number + description: SectorSize is the amount of space in each sector committed to the network by this miner. dePledgedCollateral: - description: Collateral that is waiting to be withdrawn type: number + description: Collateral that is waiting to be withdrawn dePledgeTime: - description: Time at which the depledged collateral may be withdrawn type: number + description: Time at which the depledged collateral may be withdrawn sectors: type: array items: @@ -271,16 +301,22 @@ components: type: string role: type: string - enum: [miner,account,storageMarket,paymentBroker] + enum: [init,account,miner,storageMarket,paymentBroker] nonce: type: number + description: Nonce is the nonce expected on the next message from this actor. Messages are processed in strict, contiguous nonce order. balance: type: number + description: Balance is the amount of FIL in the actor's account. stateRoot: type: string - state: + description: The CID of the root of the actor's state tree. + info: oneOf: - - $ref: '#/components/schemas/MinerState' + # - $ref: '#/components/schemas/AccountActorState' + # - $ref: '#/components/schemas/InitActorState' + - $ref: '#/components/schemas/MinerActorState' + # - $ref: '#/components/schemas/StorageMarketActorState' Block: type: object properties: From b4f2f64dd72f59f0dc9666f52a5fb2d0bdf71a11 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Thu, 29 Aug 2019 14:37:20 -0700 Subject: [PATCH 12/50] Added more actor states and node info --- filecoin-rest-api.yml | 81 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 70 insertions(+), 11 deletions(-) diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index acd3c0c..442e923 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -18,6 +18,7 @@ x-tagGroups: - name: Control tags: - Node + - Address info: title: Filecoin JSON REST API description: Filecoin JSON REST API Description @@ -198,6 +199,28 @@ paths: application/json: schema: $ref: '#/components/schemas/ExecutedMessage' + # This is a terrible place for this - maybe address should be reserved for wallet operations + /control/address/{minerId}: + get: + operationId: getAddressForMiner + summary: Fetch peer address for Miner + description: Fetches the peer address(es) for the miner with the specified address. + tags: + - Address + parameters: + - name: minerId + in: path + description: The Filecoin Address of the miner to fetch the Peer (libp2p network) addresses for. + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/PeerAddresses' /control/node: get: operationId: getNode @@ -238,8 +261,6 @@ components: totalStorage: type: number description: Filecoin's total committed storage as of the current block. - PaymentChannelActorState: - type: object PaymentBrokerActorState: $ref: '#/components/schemas/EmptyActorState' MinerActorState: @@ -313,10 +334,11 @@ components: description: The CID of the root of the actor's state tree. info: oneOf: - # - $ref: '#/components/schemas/AccountActorState' - # - $ref: '#/components/schemas/InitActorState' + - $ref: '#/components/schemas/AccountActorState' + - $ref: '#/components/schemas/InitActorState' - $ref: '#/components/schemas/MinerActorState' - # - $ref: '#/components/schemas/StorageMarketActorState' + - $ref: '#/components/schemas/PaymentBrokerActorState' + - $ref: '#/components/schemas/StorageMarketActorState' Block: type: object properties: @@ -418,6 +440,12 @@ components: signature: type: string readOnly: true + PeerAddresses: + type: array + description: List of peer (network) addresses + items: + type: string + example: /ip4/127.0.0.1/tcp/6000/ipfs/QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq Node: type: object properties: @@ -428,10 +456,7 @@ components: type: string example: QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq addresses: - type: array - items: - type: string - example: /ip4/127.0.0.1/tcp/6000/ipfs/QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq + $ref: '#/components/schemas/PeerAddresses' version: type: string example: "1.0.2" @@ -448,7 +473,41 @@ components: type: array description: Supoorted sector sizes in bytes items: - type: number + type: number + bitswapStats: + type: object + properties: + blocksReceived: + type: number + blocksSent: + type: number + dataReceived: + type: number + dataSent: + type: number + dupBlksReceived: + type: number + dupDataReceived: + type: number + messagesReceived: + type: number + ProvideBufLen: + type: number + peers: + type: array + description: Filecoin Addresses of currently connected peers + items: + type: string + example: 'QmUA8TXLxsfuifpyHPxGfwWgXSCr6omqb6bdQy2KwWQCBz' + wantlist: + type: array + description: CIDs of currently desired content blocks + items: + type: string + example: 'QmQXJPWYEnt9GoYu5SXkrKMWovCX78YBjFzRSJF63Zobnj' + config: + type: object + description: Full JSON representation of the node's current configuration Tipset: type: object properties: @@ -459,7 +518,7 @@ components: id: type: string readOnly: true - example: "zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ" + example: 'zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ' height: type: number blocks: From 16013b2ff1d7e5d9f1d412773c4e749e373e65ca Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Thu, 29 Aug 2019 19:44:25 -0700 Subject: [PATCH 13/50] Add piece import and export endpoints --- filecoin-rest-api.yml | 71 ++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 21 deletions(-) diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 442e923..33d8dcf 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -19,6 +19,7 @@ x-tagGroups: tags: - Node - Address + - Pieces info: title: Filecoin JSON REST API description: Filecoin JSON REST API Description @@ -199,44 +200,72 @@ paths: application/json: schema: $ref: '#/components/schemas/ExecutedMessage' - # This is a terrible place for this - maybe address should be reserved for wallet operations - /control/address/{minerId}: + /control/node: get: - operationId: getAddressForMiner - summary: Fetch peer address for Miner - description: Fetches the peer address(es) for the miner with the specified address. + operationId: getNode + summary: Get information about the current Filecoin Node + description: Get information about the current Filecoin Node tags: - - Address - parameters: - - name: minerId - in: path - description: The Filecoin Address of the miner to fetch the Peer (libp2p network) addresses for. - required: true - schema: - type: string + - Node responses: 200: description: Success content: application/json: schema: - $ref: '#/components/schemas/PeerAddresses' - /control/node: + $ref: '#/components/schemas/Node' + /control/pieces: + post: + operationId: createPiece + summary: Add a piece to local temporary storage + description: This method imports data into the local node's temporary storage so that it can be transferred to a storage miner. + tags: + - Piece + requestBody: + content: + application/octet-stream: + schema: + type: string + format: binary + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/PieceMetadata' + /control/pieces/{pieceId}: get: - operationId: getNode - summary: Get information about the current Filecoin Node - description: Get information about the current Filecoin Node + operationId: getPieceById + summary: Fetch piece data + description: Fetch piece data from the local node's temporary storage. tags: - Node + parameters: + - name: pieceId + in: path + description: ID of the piece previously returned by corresponding createPiece POST method. + required: true + schema: + type: string responses: 200: - description: Success + description: If the request succeeds, the server returns the original data used to create the piece. content: - application/json: + application/octet-stream: schema: - $ref: '#/components/schemas/Node' + type: string + format: binary + description: The raw bytes of the originally imported data. components: schemas: + PieceMetadata: + type: object + properties: + id: + type: string + example: QmQXJPWYEnt9GoYu5SXkrKMWovCX78YBjFzRSJF63Zobnj + readOnly: true Sector: type: object properties: From e3d173d4e8f9727fa46f067e75f58873261df7bd Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 30 Aug 2019 11:46:46 -0700 Subject: [PATCH 14/50] Added some Ask endpoints --- filecoin-rest-api.yml | 118 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 113 insertions(+), 5 deletions(-) diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 33d8dcf..bac8016 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -14,12 +14,15 @@ x-tagGroups: - messages - name: Actors tags: - - actors + - Actors - name: Control tags: - Node - Address - Pieces + - name: Storage Market + tags: + - Asks info: title: Filecoin JSON REST API description: Filecoin JSON REST API Description @@ -30,13 +33,18 @@ info: servers: - url: http://127.0.0.1:3453/api/chain/v0 paths: + # /market/deals + # /market/deals/{dealCid} + # /market/deals/{dealCid} + # /channels/ + # PaymentChannelActorState /actors/actors: get: operationId: listActors summary: List actors description: List actors currently known to this node in ID order tags: - - actors + - Actors parameters: - name: nextPageToken in: query @@ -59,7 +67,7 @@ paths: summary: Find actor by ID description: Find a single actor record by ID tags: - - actors + - Actors parameters: - name: actorId in: path @@ -220,7 +228,7 @@ paths: summary: Add a piece to local temporary storage description: This method imports data into the local node's temporary storage so that it can be transferred to a storage miner. tags: - - Piece + - Pieces requestBody: content: application/octet-stream: @@ -240,7 +248,7 @@ paths: summary: Fetch piece data description: Fetch piece data from the local node's temporary storage. tags: - - Node + - Pieces parameters: - name: pieceId in: path @@ -257,8 +265,108 @@ paths: type: string format: binary description: The raw bytes of the originally imported data. + /market/asks: + get: + operationId: listAsks + summary: Lists all Asks in the market + description: This endpoint returns all Asks known to the current node ordered lexically by the Ask ID + tags: + - Asks + parameters: + - name: minerId + in: query + description: Filter returned asks by minerId. Only Asks from this miner will be returned. + required: false + example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq + schema: + type: string + - name: active + in: query + description: Filter returned asks to include only those that are still active, meaning the current node's tipset height doesn't exceed that of the Ask's specified expiration. + required: false + example: true + schema: + type: boolean + - name: nextPageToken + in: query + description: Next page token + required: false + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Ask' + + post: + operationId: createAsk + summary: Order this mining node to publish a new Ask on the network + description: This method creates a new storage market ask and publishes it for storage buyers to find and act on. + tags: + - Asks + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Ask' + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Ask' + /market/asks/{askId}: + get: + operationId: getAskById + summary: Fetch Ask data + description: Fetch data about an Ask by the Ask ID. + tags: + - Asks + parameters: + - name: askId + in: path + description: ID of the Ask to fetch. + required: true + schema: + type: string + responses: + 200: + description: If the request succeeds, the server returns the requested Ask. + content: + application/json: + schema: + $ref: '#/components/schemas/Ask' components: schemas: + Ask: + type: object + properties: + id: + type: string + readOnly: true + description: The ID of this Ask + kind: + type: string + enum: [ask] + minerId: + type: string + readOnly: true + description: The ID of the miner that published this Ask + example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq + price: + type: number + description: The price in FIL per byte per blocktime + example: 0.00000000001 + expiry: + type: number + description: The block height at which this ask expires + example: 392265 PieceMetadata: type: object properties: From 18e1feb4d18802174ee171f9d2abb3b7f803002a Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 30 Aug 2019 12:31:55 -0700 Subject: [PATCH 15/50] Add licensing info --- LICENSE-APACHE | 5 +++++ LICENSE-MIT | 19 +++++++++++++++++++ README.md | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 LICENSE-APACHE create mode 100644 LICENSE-MIT diff --git a/LICENSE-APACHE b/LICENSE-APACHE new file mode 100644 index 0000000..14478a3 --- /dev/null +++ b/LICENSE-APACHE @@ -0,0 +1,5 @@ +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 0000000..72dc60d --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,19 @@ +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md index b7d4d0b..62fa9a4 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,6 @@ To view the specification in HTML documentation form ([ReDoc](https://github.com $ npm run serve ``` And view the resulting documentation at http://localhost:5000. + +## License +Dual MIT and Apache 2 From bfce9eb45383745ccb48238582580857d58e407f Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Wed, 4 Sep 2019 12:32:19 -0700 Subject: [PATCH 16/50] GET Deals --- filecoin-rest-api.yml | 118 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 110 insertions(+), 8 deletions(-) diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index bac8016..a6482e9 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -23,6 +23,7 @@ x-tagGroups: - name: Storage Market tags: - Asks + - Deals info: title: Filecoin JSON REST API description: Filecoin JSON REST API Description @@ -33,11 +34,6 @@ info: servers: - url: http://127.0.0.1:3453/api/chain/v0 paths: - # /market/deals - # /market/deals/{dealCid} - # /market/deals/{dealCid} - # /channels/ - # PaymentChannelActorState /actors/actors: get: operationId: listActors @@ -126,7 +122,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Tipset' - /chain/block/{blockId}: + /chain/blocks/{blockId}: get: operationId: getBlockById summary: Find block by ID @@ -302,7 +298,6 @@ paths: type: array items: $ref: '#/components/schemas/Ask' - post: operationId: createAsk summary: Order this mining node to publish a new Ask on the network @@ -342,11 +337,118 @@ paths: application/json: schema: $ref: '#/components/schemas/Ask' + /market/deals: + get: + operationId: getDeals + summary: Fetch Deal information known to this node + description: This endpoint returns a list of all deals known to the current node. + tags: + - Deals + parameters: + - name: minerId + in: query + description: Filter returned Deals by minerId. Only Deals made with (or proposed to) the specified miner will be returned. + required: false + example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq + schema: + type: string + - name: clientId + in: query + description: Filter returned Deals by clientId. Only Deals initiated by the specified client will be returned. + required: false + example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy + schema: + type: string + - name: pieceId + in: query + description: Filter returned Deals by pieceId. Only Deals made to store the specified pieceId will be returned. + required: false + example: QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY + schema: + type: string + - name: nextPageToken + in: query + description: Next page token + required: false + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Deal' + # post: + # /market/deals/{dealCid} + # /channels/ + # PaymentChannelActorState + # create channel: POST /channels + # extend channel: PATCH /channels/{channelId} {} + # cancel channel (prematurely): POST /channels/{channelId}/cancel + # close channel (with final payment?): POST /channels/{channelId}/close + # reclaim funds (from expired channel): POST /channels/{channelId}/reclaim + # redeem voucher: POST /channels/{channelId}/payments + # create voucher: POST /channels/{channelId}/vouchers components: schemas: - Ask: + Deal: type: object properties: + id: + type: string + readOnly: true + description: The ID of this Deal + kind: + type: string + enum: [deal] + minerActorId: + type: string + readOnly: true + description: The ID of the miner that published this Ask + example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq + clientActorId: + type: string + readOnly: true + description: The ID of the client initiating the storage deal + example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy + pieceId: + type: string + description: The ID of the picee being stored + example: QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY + size: + type: number + description: Size of the piece being stored in bytes + example: 67003 + totalPrice: + type: number + description: The total price in FIL that will be paid for the entire storage operation + example: 0.19296864 + duration: + type: number + description: The duration of the storage deal in blocks + example: 288000 + paymentInfo: + type: object + properties: + paymentChannelActorId: + type: string + description: The address of the payment channel actor that will be used to facilitate payments + example: 3 + payerClientActorId: + type: string + description: The address of the owner of the payment channel + channelId: + type: string + description: The ID of the payment channel the client will use to pay the miner. It must already exist and have sufficient funds locked up in order to create a storage deal. + channelMessageId: + type: string + description: The ID of the message used to create the channel (so the miner can wait for it). + Ask: + type: object + properties: id: type: string readOnly: true From 996026d9bdf91bb809f81650a9f5826b0784a72b Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Thu, 5 Sep 2019 11:59:03 -0700 Subject: [PATCH 17/50] Channel endpoints --- filecoin-rest-api.yml | 189 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 174 insertions(+), 15 deletions(-) diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index a6482e9..26d222a 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -15,6 +15,7 @@ x-tagGroups: - name: Actors tags: - Actors + - Channels - name: Control tags: - Node @@ -57,7 +58,7 @@ paths: type: array items: $ref: '#/components/schemas/Actor' - /actors/{actorId}: + /actors/actors/{actorId}: # Ugh, clearly wrong get: operationId: getActorById summary: Find actor by ID @@ -381,11 +382,120 @@ paths: type: array items: $ref: '#/components/schemas/Deal' - # post: - # /market/deals/{dealCid} - # /channels/ - # PaymentChannelActorState - # create channel: POST /channels + post: + operationId: createDeal + summary: Initiate a storage deal + description: This endpoint initiates a storage deal with a storage miner. It will create an appropriate payment Channel and vouchers, and pass the deal to the target storage miner to await acceptance or rejection. + tags: + - Deals + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Deal' + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Deal' + /actors/channels: + get: + operationId: listChannels + summary: List Channels + description: List all payment channels known to this node + tags: + - Channels + parameters: + - name: nextPageToken + in: query + description: Next page token + required: false + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Channel' + post: + operationId: createChannel + summary: Create new payment Channel + description: This endpoint creates a new payment Channel with the specified characteristics + tags: + - Channels + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Channel' + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Channel' + /actors/channels/{channelId}: + get: + operationId: getChannelById + summary: Find channel by ID + description: Find a payment Channel by ID and return it + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Channel' + put: + operationId: extendChannelById + summary: Extends the duration of an existing payment channel + description: This endpoint creates a new payment Channel with the specified attributes. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: + type: string + requestBody: + content: + applications/json: + schema: + type: object + properties: + agreedEol: + type: number + description: The new chain (increased) height at which this channel will expire. + example: 2120399 + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Channel' # extend channel: PATCH /channels/{channelId} {} # cancel channel (prematurely): POST /channels/{channelId}/cancel # close channel (with final payment?): POST /channels/{channelId}/close @@ -394,36 +504,85 @@ paths: # create voucher: POST /channels/{channelId}/vouchers components: schemas: - Deal: + Channel: type: object properties: id: type: string + description: The ID of this Channel + readOnly: true + kind: + type: string + readOnly: true + enum: [channel] + targetActorId: + type: string + description: The address of the account to which funds will be transferred by this channel upon successful redemption of vouchers + example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy + amount: + type: number + description: The total amount of FIL that is in this channel and payable to the target + example: 0.19296864 + amountRedeemed: + type: number + readOnly: true + description: The total amount of FIL that has already been transfered to the target. This value cannot ever exceed amount. + example: 0 + agreedEol: + type: number + description: The original chain height at which this channel will expire. Specified upon creation and optionally extended by the creator of the channel. + example: 2120399 + actualEol: + type: number + readOnly: true + description: The actual expiration for the payment channel which can differ from agreedEol when the payment channel is in dispute + condition: + type: object readOnly: true + description: The condition specified in the most recent payment voucher for which a redemption attempt was made. + example: TODO + redeemed: + type: boolean + readOnly: true + description: A flag indicated whether or not Redeem has been called on the payment channel yet. This is necessary because AmountRedeemed can still be zero in the event of a zero-value voucher + example: true + Deal: + type: object + properties: + id: + type: string description: The ID of this Deal + readOnly: true kind: type: string + readOnly: true enum: [deal] minerActorId: type: string - readOnly: true - description: The ID of the miner that published this Ask + description: The ID of the storage miner that is fulfilling this deal example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq clientActorId: type: string readOnly: true - description: The ID of the client initiating the storage deal + description: The ID of the client initiating the storage deal (will typically be the owner of the current node) example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy pieceId: type: string description: The ID of the picee being stored example: QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY + askId: + type: string + writeOnly: true + description: The id of the Ask from the target miner for which this deal is to be proposed + example: 0 size: type: number + readOnly: true description: Size of the piece being stored in bytes example: 67003 totalPrice: type: number + readOnly: true description: The total price in FIL that will be paid for the entire storage operation example: 0.19296864 duration: @@ -432,11 +591,8 @@ components: example: 288000 paymentInfo: type: object + readOnly: true properties: - paymentChannelActorId: - type: string - description: The address of the payment channel actor that will be used to facilitate payments - example: 3 payerClientActorId: type: string description: The address of the owner of the payment channel @@ -451,8 +607,8 @@ components: properties: id: type: string - readOnly: true description: The ID of this Ask + readOnly: true kind: type: string enum: [ask] @@ -556,6 +712,7 @@ components: properties: kind: type: string + readOnly: true enum: [actor] id: type: string @@ -584,6 +741,7 @@ components: kind: type: string enum: [block] + readOnly: true id: type: string header: @@ -691,6 +849,7 @@ components: kind: type: string enum: [node] + readOnly: true id: type: string example: QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq From 6321462ba8910d41f8e374555518440e5e632606 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Mon, 9 Sep 2019 12:47:25 -0700 Subject: [PATCH 18/50] Channel and Voucher operations, and some cleanup --- filecoin-rest-api.yml | 237 ++++++++++++++++++++++++++++++++---------- 1 file changed, 180 insertions(+), 57 deletions(-) diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 26d222a..e0c642c 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -2,26 +2,26 @@ openapi: 3.0.2 tags: - name: Actors - name: Node - - name: blocks - - name: messages - - name: tipsets + - name: Blocks + - name: Messages + - name: Tipsets description: Operations on tipsets x-tagGroups: - name: Chain Resources tags: - - tipsets - - blocks - - messages - - name: Actors + - Tipsets + - Blocks + - Messages + - name: Actor Endpoints tags: - Actors - Channels - - name: Control + - name: Node Control Endpoints tags: - Node - Address - Pieces - - name: Storage Market + - name: Storage Market Endpoints tags: - Asks - Deals @@ -38,8 +38,8 @@ paths: /actors/actors: get: operationId: listActors - summary: List actors - description: List actors currently known to this node in ID order + summary: List Actors + description: List Actors currently known to this node in ID order tags: - Actors parameters: @@ -61,8 +61,8 @@ paths: /actors/actors/{actorId}: # Ugh, clearly wrong get: operationId: getActorById - summary: Find actor by ID - description: Find a single actor record by ID + summary: Find Actor by ID + description: Return information about the Actor with the specified ID tags: - Actors parameters: @@ -82,10 +82,10 @@ paths: /chain/tipsets: get: operationId: listTipsets - summary: List tipsets - description: List tipsets currently known to this node in reverse height order + summary: List Tipsets + description: List Tipsets currently known to this node in reverse height order tags: - - tipsets + - Tipsets parameters: - name: nextPageToken in: query @@ -105,10 +105,10 @@ paths: /chain/tipsets/{tipsetId}: get: operationId: getTipsetById - summary: Fetch a tipset by ID - description: Find a single tipset record by ID + summary: Fetch a Tipset by ID + description: Return information about the Tipset with the specified ID tags: - - tipsets + - Tipsets parameters: - name: tipsetId in: path @@ -127,9 +127,9 @@ paths: get: operationId: getBlockById summary: Find block by ID - description: Find a single block record by ID + description: Return information about the Block with the specified ID tags: - - blocks + - Blocks parameters: - name: blockId in: path @@ -147,10 +147,10 @@ paths: /chain/messages: post: operationId: createMessage - summary: Send a message - description: This method sends a new message to an actor recipient. + summary: Send a Message + description: This method sends a new Message to an Actor recipient. tags: - - messages + - Messages requestBody: content: application/json: @@ -166,8 +166,8 @@ paths: /chain/messages/{messageId}: get: operationId: getMessageById - summary: Find message by ID - description: Find a single message record by ID + summary: Find Message by ID + description: Return information about the Message with the specified ID tags: - nessages parameters: @@ -187,10 +187,10 @@ paths: /chain/executed-messages/{executedMessageId}: get: operationId: getExecutedMessageById - summary: Find executed message by ID - description: An executed message is one that has been included in a valid block in the chain. It includes return value and status information. Find a single executed message record by ID + summary: Find ExecutedMessage by ID + description: Return information about the ExecutedMessage with the specified ID. An executed Message is one that has been included in a valid block in the chain. It includes return value and status information. tags: - - messages + - Messages parameters: - name: executedMessageId in: path @@ -208,8 +208,8 @@ paths: /control/node: get: operationId: getNode - summary: Get information about the current Filecoin Node - description: Get information about the current Filecoin Node + summary: Return Node information + description: Get information about the current Filecoin Node. tags: - Node responses: @@ -222,7 +222,7 @@ paths: /control/pieces: post: operationId: createPiece - summary: Add a piece to local temporary storage + summary: Add a Piece to local storage description: This method imports data into the local node's temporary storage so that it can be transferred to a storage miner. tags: - Pieces @@ -445,10 +445,10 @@ paths: type: array items: $ref: '#/components/schemas/Channel' - /actors/channels/{channelId}: + /actors/channels/{channelId}: # Right now it's not possible to look up Channels by ID alone, only by Payee/ID, channel ID could just be a concatenation get: operationId: getChannelById - summary: Find channel by ID + summary: Find Channel by ID description: Find a payment Channel by ID and return it tags: - Channels @@ -466,10 +466,10 @@ paths: application/json: schema: $ref: '#/components/schemas/Channel' - put: + patch: operationId: extendChannelById - summary: Extends the duration of an existing payment channel - description: This endpoint creates a new payment Channel with the specified attributes. + summary: Extend duration of Channel + description: This endpoint extends the duration of an existing payment Channel, increasing the block height at which the Channel will timeout. Only the payer (creator) or the channel can successfully call this endpoint. tags: - Channels parameters: @@ -496,14 +496,137 @@ paths: application/json: schema: $ref: '#/components/schemas/Channel' - # extend channel: PATCH /channels/{channelId} {} - # cancel channel (prematurely): POST /channels/{channelId}/cancel - # close channel (with final payment?): POST /channels/{channelId}/close - # reclaim funds (from expired channel): POST /channels/{channelId}/reclaim - # redeem voucher: POST /channels/{channelId}/payments - # create voucher: POST /channels/{channelId}/vouchers + /actors/channels/{channelId}/close: + post: + operationId: closeChannel + summary: Close Channel + description: This endpoint closes the specified payment Channel and returns all unredeemed funds to the payee (the Channel's creator). Upon completion this Channel is effectively deleted and can never be used again. This method can only be called by target of the Channel with a valid voucher - any other invocation is an error. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + /actors/channels/{channelId}/cancel: + post: + operationId: cancelChannel + summary: Schedule Channel for cancellation + description: This endpoint reduces the actual eol (effective end date) of the Channel in an attempt to free up the funds in the channel for earlier reclaming. This endpoint can only successfullly be called by the Channel's payer as the cancel message needs to originate from that account. Cancel doesn't immediately close a channel but instead reduces the lifetime of the channel leaving a grace period during which the payee can undo the cancellation by submitting a valid voucher, thereby proving that the channel is still in use. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to cancel + required: true + schema: + type: string + responses: + 200: + description: Success + /actors/channels/{channelId}/reclaim: + post: + operationId: reclaimChannel + summary: Reclaim unspent funds in Channel + description: This endpoint is used by the creator (payer) of a Channel to reclaim unspent funds when a Channel has timed out (the chain height has exceeded the eol of the Channel). It can only successfully be called by the Channel's payer on a timed out Channel. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to reclaim + required: true + schema: + type: string + responses: + 200: + description: Success + /actors/channels/{channelId}/redeem: + post: + operationId: redeemVoucher + summary: Redeem Voucher + description: This endpoint accepts a voucher from the Channel target and redeems it. Upon checking the validity and successfully checking the voucher's condition the specified funds will be transfered from the channel to the target. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: + type: string + requestBody: + content: + applications/json: + schema: + $ref: '#/components/schemas/Voucher' + responses: + 200: + description: Success + /actors/channels/{channelId}/vouchers: + post: + operationId: createVoucher + summary: Creates Voucher + description: This endpoint accepts voucher details and returns a new signed voucher suitable for off chain transmission to the Channel target for later redemption. Only the Channel payer (creator) can call this endpoint successfully. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: + type: string + requestBody: + content: + applications/json: + schema: + $ref: '#/components/schemas/Voucher' + responses: + 200: + description: Success components: schemas: + Voucher: + type: object + properties: + channelId: + type: string + description: The ID of the payment Channel this Voucher is redeemable against. + readOnly: true + example: TODO + payer: + type: string + description: The Actor ID (address) of the creator of the payment channel for this voucher. + readOnly: true + example: TODO + target: + type: string + description: The Actor ID (address) of the recipient of the funds in this voucher. + readOnly: true + example: TODO + amount: + type: number + description: The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed. + example: 0.19296864 + validAt: + type: number + description: The block height on or after which this Voucher can be redeemed. + example: 2120399 + condition: + type: object + description: The condition that must evaluate to true for this Voucher to be redeemed. + example: TODO + signature: + type: string + description: The signature over all the data in this Voucher + example: TODO Channel: type: object properties: @@ -517,11 +640,11 @@ components: enum: [channel] targetActorId: type: string - description: The address of the account to which funds will be transferred by this channel upon successful redemption of vouchers + description: The address of the account to which funds will be transferred by this Channel upon successful redemption of vouchers example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy amount: type: number - description: The total amount of FIL that is in this channel and payable to the target + description: The total amount of FIL that is in this Channel and payable to the target example: 0.19296864 amountRedeemed: type: number @@ -530,12 +653,12 @@ components: example: 0 agreedEol: type: number - description: The original chain height at which this channel will expire. Specified upon creation and optionally extended by the creator of the channel. + description: The original chain height at which this Channel will expire. Specified upon creation and optionally extended by the creator of the channel. example: 2120399 actualEol: type: number readOnly: true - description: The actual expiration for the payment channel which can differ from agreedEol when the payment channel is in dispute + description: The actual expiration for the payment Channel which can differ from agreedEol when the payment channel is in dispute condition: type: object readOnly: true @@ -544,7 +667,7 @@ components: redeemed: type: boolean readOnly: true - description: A flag indicated whether or not Redeem has been called on the payment channel yet. This is necessary because AmountRedeemed can still be zero in the event of a zero-value voucher + description: A flag indicated whether or not Redeem has been called on the payment Channel yet. This is necessary because AmountRedeemed can still be zero in the event of a zero-value voucher example: true Deal: type: object @@ -559,26 +682,26 @@ components: enum: [deal] minerActorId: type: string - description: The ID of the storage miner that is fulfilling this deal + description: The ID of the storage miner that is fulfilling this Deal example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq clientActorId: type: string readOnly: true - description: The ID of the client initiating the storage deal (will typically be the owner of the current node) + description: The ID of the client initiating the storage Deal (will typically be the owner of the current node) example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy pieceId: type: string - description: The ID of the picee being stored + description: The ID of the Picee being stored example: QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY askId: type: string writeOnly: true - description: The id of the Ask from the target miner for which this deal is to be proposed + description: The ID of the Ask from the target miner for which this Deal is to be proposed example: 0 size: type: number readOnly: true - description: Size of the piece being stored in bytes + description: Size of the Piece being stored in bytes example: 67003 totalPrice: type: number @@ -587,7 +710,7 @@ components: example: 0.19296864 duration: type: number - description: The duration of the storage deal in blocks + description: The duration of this storage Deal in blocks example: 288000 paymentInfo: type: object @@ -595,13 +718,13 @@ components: properties: payerClientActorId: type: string - description: The address of the owner of the payment channel + description: The address of the owner of the payment Channel channelId: type: string - description: The ID of the payment channel the client will use to pay the miner. It must already exist and have sufficient funds locked up in order to create a storage deal. + description: The ID of the payment Channel the client will use to pay the miner. It must already exist and have sufficient funds locked up in order to create a storage deal. channelMessageId: type: string - description: The ID of the message used to create the channel (so the miner can wait for it). + description: The ID of the Message used to create the Channel (so the miner can wait for it). Ask: type: object properties: From 9cb9c2b3fc7188f74ef2c4554b1fd2835375a607 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Tue, 10 Sep 2019 16:58:25 -0700 Subject: [PATCH 19/50] Move components to the front --- filecoin-rest-api.yml | 1536 +++++++++++++++++++++-------------------- 1 file changed, 770 insertions(+), 766 deletions(-) diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index e0c642c..0a74206 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -1,11 +1,10 @@ openapi: 3.0.2 tags: - name: Actors - - name: Node - name: Blocks - name: Messages + - name: Node - name: Tipsets - description: Operations on tipsets x-tagGroups: - name: Chain Resources tags: @@ -34,611 +33,54 @@ info: email: erik.ingenito@protocol.ai servers: - url: http://127.0.0.1:3453/api/chain/v0 -paths: - /actors/actors: - get: - operationId: listActors - summary: List Actors - description: List Actors currently known to this node in ID order - tags: - - Actors - parameters: - - name: nextPageToken - in: query - description: Next page token - required: false - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Actor' - /actors/actors/{actorId}: # Ugh, clearly wrong - get: - operationId: getActorById - summary: Find Actor by ID - description: Return information about the Actor with the specified ID - tags: - - Actors - parameters: - - name: actorId - in: path - description: ID of the Actor to fetch - required: true - schema: +components: + schemas: + Voucher: + type: object + properties: + channelId: type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Actor' - /chain/tipsets: - get: - operationId: listTipsets - summary: List Tipsets - description: List Tipsets currently known to this node in reverse height order - tags: - - Tipsets - parameters: - - name: nextPageToken - in: query - description: Next page token - required: false - schema: + description: The ID of the payment Channel this Voucher is redeemable against. + readOnly: true + example: TODO + payer: type: string - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Tipset' - /chain/tipsets/{tipsetId}: - get: - operationId: getTipsetById - summary: Fetch a Tipset by ID - description: Return information about the Tipset with the specified ID - tags: - - Tipsets - parameters: - - name: tipsetId - in: path - description: ID of the Tipset to fetch - required: true - schema: + description: The Actor ID (address) of the creator of the payment channel for this voucher. + readOnly: true + example: TODO + target: type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Tipset' - /chain/blocks/{blockId}: - get: - operationId: getBlockById - summary: Find block by ID - description: Return information about the Block with the specified ID - tags: - - Blocks - parameters: - - name: blockId - in: path - description: ID of the Block to fetch - required: true - schema: + description: The Actor ID (address) of the recipient of the funds in this voucher. + readOnly: true + example: TODO + amount: + type: number + description: The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed. + example: 0.19296864 + validAt: + type: number + description: The block height on or after which this Voucher can be redeemed. + example: 2120399 + condition: + type: object + description: The condition that must evaluate to true for this Voucher to be redeemed. + example: TODO + signature: type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Message' - /chain/messages: - post: - operationId: createMessage - summary: Send a Message - description: This method sends a new Message to an Actor recipient. - tags: - - Messages - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Message' - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Message' - /chain/messages/{messageId}: - get: - operationId: getMessageById - summary: Find Message by ID - description: Return information about the Message with the specified ID - tags: - - nessages - parameters: - - name: messageId - in: path - description: ID of the message to fetch - required: true - schema: + description: The signature over all the data in this Voucher + example: TODO + Channel: + type: object + properties: + id: type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Message' - /chain/executed-messages/{executedMessageId}: - get: - operationId: getExecutedMessageById - summary: Find ExecutedMessage by ID - description: Return information about the ExecutedMessage with the specified ID. An executed Message is one that has been included in a valid block in the chain. It includes return value and status information. - tags: - - Messages - parameters: - - name: executedMessageId - in: path - description: ID of the executed message to fetch - required: true - schema: + description: The ID of this Channel + readOnly: true + kind: type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutedMessage' - /control/node: - get: - operationId: getNode - summary: Return Node information - description: Get information about the current Filecoin Node. - tags: - - Node - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Node' - /control/pieces: - post: - operationId: createPiece - summary: Add a Piece to local storage - description: This method imports data into the local node's temporary storage so that it can be transferred to a storage miner. - tags: - - Pieces - requestBody: - content: - application/octet-stream: - schema: - type: string - format: binary - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/PieceMetadata' - /control/pieces/{pieceId}: - get: - operationId: getPieceById - summary: Fetch piece data - description: Fetch piece data from the local node's temporary storage. - tags: - - Pieces - parameters: - - name: pieceId - in: path - description: ID of the piece previously returned by corresponding createPiece POST method. - required: true - schema: - type: string - responses: - 200: - description: If the request succeeds, the server returns the original data used to create the piece. - content: - application/octet-stream: - schema: - type: string - format: binary - description: The raw bytes of the originally imported data. - /market/asks: - get: - operationId: listAsks - summary: Lists all Asks in the market - description: This endpoint returns all Asks known to the current node ordered lexically by the Ask ID - tags: - - Asks - parameters: - - name: minerId - in: query - description: Filter returned asks by minerId. Only Asks from this miner will be returned. - required: false - example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq - schema: - type: string - - name: active - in: query - description: Filter returned asks to include only those that are still active, meaning the current node's tipset height doesn't exceed that of the Ask's specified expiration. - required: false - example: true - schema: - type: boolean - - name: nextPageToken - in: query - description: Next page token - required: false - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Ask' - post: - operationId: createAsk - summary: Order this mining node to publish a new Ask on the network - description: This method creates a new storage market ask and publishes it for storage buyers to find and act on. - tags: - - Asks - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Ask' - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Ask' - /market/asks/{askId}: - get: - operationId: getAskById - summary: Fetch Ask data - description: Fetch data about an Ask by the Ask ID. - tags: - - Asks - parameters: - - name: askId - in: path - description: ID of the Ask to fetch. - required: true - schema: - type: string - responses: - 200: - description: If the request succeeds, the server returns the requested Ask. - content: - application/json: - schema: - $ref: '#/components/schemas/Ask' - /market/deals: - get: - operationId: getDeals - summary: Fetch Deal information known to this node - description: This endpoint returns a list of all deals known to the current node. - tags: - - Deals - parameters: - - name: minerId - in: query - description: Filter returned Deals by minerId. Only Deals made with (or proposed to) the specified miner will be returned. - required: false - example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq - schema: - type: string - - name: clientId - in: query - description: Filter returned Deals by clientId. Only Deals initiated by the specified client will be returned. - required: false - example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy - schema: - type: string - - name: pieceId - in: query - description: Filter returned Deals by pieceId. Only Deals made to store the specified pieceId will be returned. - required: false - example: QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY - schema: - type: string - - name: nextPageToken - in: query - description: Next page token - required: false - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Deal' - post: - operationId: createDeal - summary: Initiate a storage deal - description: This endpoint initiates a storage deal with a storage miner. It will create an appropriate payment Channel and vouchers, and pass the deal to the target storage miner to await acceptance or rejection. - tags: - - Deals - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Deal' - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Deal' - /actors/channels: - get: - operationId: listChannels - summary: List Channels - description: List all payment channels known to this node - tags: - - Channels - parameters: - - name: nextPageToken - in: query - description: Next page token - required: false - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Channel' - post: - operationId: createChannel - summary: Create new payment Channel - description: This endpoint creates a new payment Channel with the specified characteristics - tags: - - Channels - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Channel' - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Channel' - /actors/channels/{channelId}: # Right now it's not possible to look up Channels by ID alone, only by Payee/ID, channel ID could just be a concatenation - get: - operationId: getChannelById - summary: Find Channel by ID - description: Find a payment Channel by ID and return it - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to fetch - required: true - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Channel' - patch: - operationId: extendChannelById - summary: Extend duration of Channel - description: This endpoint extends the duration of an existing payment Channel, increasing the block height at which the Channel will timeout. Only the payer (creator) or the channel can successfully call this endpoint. - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to fetch - required: true - schema: - type: string - requestBody: - content: - applications/json: - schema: - type: object - properties: - agreedEol: - type: number - description: The new chain (increased) height at which this channel will expire. - example: 2120399 - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Channel' - /actors/channels/{channelId}/close: - post: - operationId: closeChannel - summary: Close Channel - description: This endpoint closes the specified payment Channel and returns all unredeemed funds to the payee (the Channel's creator). Upon completion this Channel is effectively deleted and can never be used again. This method can only be called by target of the Channel with a valid voucher - any other invocation is an error. - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to fetch - required: true - schema: - type: string - responses: - 200: - description: Success - /actors/channels/{channelId}/cancel: - post: - operationId: cancelChannel - summary: Schedule Channel for cancellation - description: This endpoint reduces the actual eol (effective end date) of the Channel in an attempt to free up the funds in the channel for earlier reclaming. This endpoint can only successfullly be called by the Channel's payer as the cancel message needs to originate from that account. Cancel doesn't immediately close a channel but instead reduces the lifetime of the channel leaving a grace period during which the payee can undo the cancellation by submitting a valid voucher, thereby proving that the channel is still in use. - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to cancel - required: true - schema: - type: string - responses: - 200: - description: Success - /actors/channels/{channelId}/reclaim: - post: - operationId: reclaimChannel - summary: Reclaim unspent funds in Channel - description: This endpoint is used by the creator (payer) of a Channel to reclaim unspent funds when a Channel has timed out (the chain height has exceeded the eol of the Channel). It can only successfully be called by the Channel's payer on a timed out Channel. - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to reclaim - required: true - schema: - type: string - responses: - 200: - description: Success - /actors/channels/{channelId}/redeem: - post: - operationId: redeemVoucher - summary: Redeem Voucher - description: This endpoint accepts a voucher from the Channel target and redeems it. Upon checking the validity and successfully checking the voucher's condition the specified funds will be transfered from the channel to the target. - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to fetch - required: true - schema: - type: string - requestBody: - content: - applications/json: - schema: - $ref: '#/components/schemas/Voucher' - responses: - 200: - description: Success - /actors/channels/{channelId}/vouchers: - post: - operationId: createVoucher - summary: Creates Voucher - description: This endpoint accepts voucher details and returns a new signed voucher suitable for off chain transmission to the Channel target for later redemption. Only the Channel payer (creator) can call this endpoint successfully. - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to fetch - required: true - schema: - type: string - requestBody: - content: - applications/json: - schema: - $ref: '#/components/schemas/Voucher' - responses: - 200: - description: Success -components: - schemas: - Voucher: - type: object - properties: - channelId: - type: string - description: The ID of the payment Channel this Voucher is redeemable against. - readOnly: true - example: TODO - payer: - type: string - description: The Actor ID (address) of the creator of the payment channel for this voucher. - readOnly: true - example: TODO - target: - type: string - description: The Actor ID (address) of the recipient of the funds in this voucher. - readOnly: true - example: TODO - amount: - type: number - description: The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed. - example: 0.19296864 - validAt: - type: number - description: The block height on or after which this Voucher can be redeemed. - example: 2120399 - condition: - type: object - description: The condition that must evaluate to true for this Voucher to be redeemed. - example: TODO - signature: - type: string - description: The signature over all the data in this Voucher - example: TODO - Channel: - type: object - properties: - id: - type: string - description: The ID of this Channel - readOnly: true - kind: - type: string - readOnly: true - enum: [channel] - targetActorId: + readOnly: true + enum: [channel] + targetActorId: type: string description: The address of the account to which funds will be transferred by this Channel upon successful redemption of vouchers example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy @@ -693,16 +135,16 @@ components: type: string description: The ID of the Picee being stored example: QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY - askId: - type: string - writeOnly: true - description: The ID of the Ask from the target miner for which this Deal is to be proposed - example: 0 size: type: number readOnly: true description: Size of the Piece being stored in bytes example: 67003 + askId: + type: string + writeOnly: true + description: The ID of the Ask from the target miner for which this Deal is to be proposed + example: 0 totalPrice: type: number readOnly: true @@ -712,6 +154,11 @@ components: type: number description: The duration of this storage Deal in blocks example: 288000 + status: + type: string + description: The current status of the Deal + enum: [unknown,rejected,accepted,started,failed,staged,sealing,complete] + example: complete paymentInfo: type: object readOnly: true @@ -850,199 +297,756 @@ components: description: Balance is the amount of FIL in the actor's account. stateRoot: type: string - description: The CID of the root of the actor's state tree. - info: - oneOf: - - $ref: '#/components/schemas/AccountActorState' - - $ref: '#/components/schemas/InitActorState' - - $ref: '#/components/schemas/MinerActorState' - - $ref: '#/components/schemas/PaymentBrokerActorState' - - $ref: '#/components/schemas/StorageMarketActorState' - Block: + description: The CID of the root of the actor's state tree. + info: + oneOf: + - $ref: '#/components/schemas/AccountActorState' + - $ref: '#/components/schemas/InitActorState' + - $ref: '#/components/schemas/MinerActorState' + - $ref: '#/components/schemas/PaymentBrokerActorState' + - $ref: '#/components/schemas/StorageMarketActorState' + Block: + type: object + properties: + kind: + type: string + enum: [block] + readOnly: true + id: + type: string + header: + $ref: '#/components/schemas/BlockHeader' + executedMessages: + type: array + items: + $ref: '#/components/schemas/ExecutedMessage' + BlockHeader: + type: object + properties: + kind: + type: string + enum: [blockHeader] + readOnly: true + id: + type: string + height: + type: number + minerId: + type: string + messageListId: + type: string + recieptListId: + type: string + tickets: + type: array + items: + type: string + electionProof: + type: string + parentTipsetId: + type: string + parentWeight: + type: number + stateRoot: + type: string + timestamp: + type: number + blsAggregate: + type: string + signature: + type: string + ExecutedMessage: + type: object + properties: + kind: + type: string + enum: [executedMessage] + readOnly: true + id: + type: string + readOnly: true + blockId: + type: string + readOnly: true + message: + $ref: '#/components/schemas/Message' + exitCode: + type: number + readOnly: true + return: + type: object + readOnly: true + Message: + type: object + properties: + kind: + type: string + enum: [mxecutedMessage] + readOnly: true + id: + type: string + readOnly: true + nonce: + type: number + readOnly: true + from: + type: string + readOnly: true + to: + type: string + value: + type: number + gasPrice: + type: number + gasLimit: + type: number + method: + type: string + parameters: + type: object + signature: + type: string + readOnly: true + PeerAddresses: + type: array + description: List of peer (network) addresses + items: + type: string + example: /ip4/127.0.0.1/tcp/6000/ipfs/QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq + Node: type: object properties: kind: type: string - enum: [block] + enum: [node] readOnly: true id: type: string - header: - $ref: '#/components/schemas/BlockHeader' - executedMessages: - type: array - items: - $ref: '#/components/schemas/ExecutedMessage' - BlockHeader: + example: QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq + addresses: + $ref: '#/components/schemas/PeerAddresses' + version: + type: string + example: "1.0.2" + commit: + type: string + example: "93540266a2a9972e91947a538ce70dc9c4e8077e" + protocol: + type: object + properties: + autoSealInterval: + type: number + description: Auto-Seal Interval in Seconds + sectorSizes: + type: array + description: Supoorted sector sizes in bytes + items: + type: number + bitswapStats: + type: object + properties: + blocksReceived: + type: number + blocksSent: + type: number + dataReceived: + type: number + dataSent: + type: number + dupBlksReceived: + type: number + dupDataReceived: + type: number + messagesReceived: + type: number + ProvideBufLen: + type: number + peers: + type: array + description: Filecoin Addresses of currently connected peers + items: + type: string + example: 'QmUA8TXLxsfuifpyHPxGfwWgXSCr6omqb6bdQy2KwWQCBz' + wantlist: + type: array + description: CIDs of currently desired content blocks + items: + type: string + example: 'QmQXJPWYEnt9GoYu5SXkrKMWovCX78YBjFzRSJF63Zobnj' + config: + type: object + description: Full JSON representation of the node's current configuration + Tipset: type: object properties: - kind: + kind: type: string - enum: [blockHeader] + enum: [tipset] readOnly: true - id: + id: type: string - height: + readOnly: true + example: 'zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ' + height: type: number - minerId: + blocks: + type: array + items: + $ref: '#/components/schemas/BlockHeader' +paths: + /actors/actors: + get: + operationId: listActors + summary: List Actors + description: List Actors currently known to this node in ID order + tags: + - Actors + parameters: + - name: nextPageToken + in: query + description: Next page token + required: false + schema: type: string - messageListId: + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Actor' + /actors/actors/{actorId}: # Ugh, clearly wrong + get: + operationId: getActorById + summary: Find Actor by ID + description: Return information about the Actor with the specified ID + tags: + - Actors + parameters: + - name: actorId + in: path + description: ID of the Actor to fetch + required: true + schema: type: string - recieptListId: + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Actor' + /chain/tipsets: + get: + operationId: listTipsets + summary: List Tipsets + description: List Tipsets currently known to this node in reverse height order + tags: + - Tipsets + parameters: + - name: nextPageToken + in: query + description: Next page token + required: false + schema: type: string - tickets: - type: array - items: - type: string - electionProof: + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Tipset' + /chain/tipsets/{tipsetId}: + get: + operationId: getTipsetById + summary: Fetch a Tipset by ID + description: Return information about the Tipset with the specified ID + tags: + - Tipsets + parameters: + - name: tipsetId + in: path + description: ID of the Tipset to fetch + required: true + schema: type: string - parentTipsetId: + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Tipset' + /chain/blocks/{blockId}: + get: + operationId: getBlockById + summary: Find block by ID + description: Return information about the Block with the specified ID + tags: + - Blocks + parameters: + - name: blockId + in: path + description: ID of the Block to fetch + required: true + schema: type: string - parentWeight: - type: number - stateRoot: + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Message' + /chain/messages: + post: + operationId: createMessage + summary: Send a Message + description: This method sends a new Message to an Actor recipient. + tags: + - Messages + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Message' + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Message' + /chain/messages/{messageId}: + get: + operationId: getMessageById + summary: Find Message by ID + description: Return information about the Message with the specified ID + tags: + - nessages + parameters: + - name: messageId + in: path + description: ID of the message to fetch + required: true + schema: type: string - timestamp: - type: number - blsAggregate: + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Message' + /chain/executed-messages/{executedMessageId}: + get: + operationId: getExecutedMessageById + summary: Find ExecutedMessage by ID + description: Return information about the ExecutedMessage with the specified ID. An executed Message is one that has been included in a valid block in the chain. It includes return value and status information. + tags: + - Messages + parameters: + - name: executedMessageId + in: path + description: ID of the executed message to fetch + required: true + schema: type: string - signature: + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ExecutedMessage' + /control/node: + get: + operationId: getNode + summary: Return Node information + description: Get information about the current Filecoin Node. + tags: + - Node + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Node' + /control/pieces: + post: + operationId: createPiece + summary: Add a Piece to local storage + description: This method imports data into the local node's temporary storage so that it can be transferred to a storage miner. + tags: + - Pieces + requestBody: + content: + application/octet-stream: + schema: + type: string + format: binary + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/PieceMetadata' + /control/pieces/{pieceId}: + get: + operationId: getPieceById + summary: Fetch piece data + description: Fetch piece data from the local node's temporary storage. + tags: + - Pieces + parameters: + - name: pieceId + in: path + description: ID of the piece previously returned by corresponding createPiece POST method. + required: true + schema: type: string - ExecutedMessage: - type: object - properties: - kind: + responses: + 200: + description: If the request succeeds, the server returns the original data used to create the piece. + content: + application/octet-stream: + schema: + type: string + format: binary + description: The raw bytes of the originally imported data. + /market/asks: + get: + operationId: listAsks + summary: Lists all Asks in the market + description: This endpoint returns all Asks known to the current node ordered lexically by the Ask ID + tags: + - Asks + parameters: + - name: minerId + in: query + description: Filter returned asks by minerId. Only Asks from this miner will be returned. + required: false + example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq + schema: type: string - enum: [executedMessage] - readOnly: true - id: + - name: active + in: query + description: Filter returned asks to include only those that are still active, meaning the current node's tipset height doesn't exceed that of the Ask's specified expiration. + required: false + example: true + schema: + type: boolean + - name: nextPageToken + in: query + description: Next page token + required: false + schema: type: string - readOnly: true - blockId: + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Ask' + post: + operationId: createAsk + summary: Order this mining node to publish a new Ask on the network + description: This method creates a new storage market ask and publishes it for storage buyers to find and act on. + tags: + - Asks + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Ask' + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Ask' + /market/asks/{askId}: + get: + operationId: getAskById + summary: Fetch Ask data + description: Fetch data about an Ask by the Ask ID. + tags: + - Asks + parameters: + - name: askId + in: path + description: ID of the Ask to fetch. + required: true + schema: type: string - readOnly: true - message: - $ref: '#/components/schemas/Message' - exitCode: - type: number - readOnly: true - return: - type: object - readOnly: true - Message: - type: object - properties: - kind: + responses: + 200: + description: If the request succeeds, the server returns the requested Ask. + content: + application/json: + schema: + $ref: '#/components/schemas/Ask' + /market/deals: + get: + operationId: getDeals + summary: Fetch Deal information known to this node + description: This endpoint returns a list of all deals known to the current node. + tags: + - Deals + parameters: + - name: minerId + in: query + description: Filter returned Deals by minerId. Only Deals made with (or proposed to) the specified miner will be returned. + required: false + example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq + schema: type: string - enum: [mxecutedMessage] - readOnly: true - id: + - name: clientId + in: query + description: Filter returned Deals by clientId. Only Deals initiated by the specified client will be returned. + required: false + example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy + schema: type: string - readOnly: true - nonce: - type: number - readOnly: true - from: + - name: pieceId + in: query + description: Filter returned Deals by pieceId. Only Deals made to store the specified pieceId will be returned. + required: false + example: QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY + schema: type: string - readOnly: true - to: + - name: nextPageToken + in: query + description: Next page token + required: false + schema: type: string - value: - type: number - gasPrice: - type: number - gasLimit: - type: number - method: + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Deal' + post: + operationId: createDeal + summary: Initiate a storage deal + description: This endpoint initiates a storage deal with a storage miner. It will create an appropriate payment Channel and vouchers, and pass the deal to the target storage miner to await acceptance or rejection. + tags: + - Deals + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Deal' + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Deal' + /actors/channels: + get: + operationId: listChannels + summary: List Channels + description: List all payment channels known to this node + tags: + - Channels + parameters: + - name: nextPageToken + in: query + description: Next page token + required: false + schema: type: string - parameters: - type: object - signature: + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Channel' + post: + operationId: createChannel + summary: Create new payment Channel + description: This endpoint creates a new payment Channel with the specified characteristics + tags: + - Channels + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Channel' + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Channel' + /actors/channels/{channelId}: # Right now it's not possible to look up Channels by ID alone, only by Payee/ID, channel ID could just be a concatenation + get: + operationId: getChannelById + summary: Find Channel by ID + description: Find a payment Channel by ID and return it + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: type: string - readOnly: true - PeerAddresses: - type: array - description: List of peer (network) addresses - items: - type: string - example: /ip4/127.0.0.1/tcp/6000/ipfs/QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq - Node: - type: object - properties: - kind: + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Channel' + patch: + operationId: extendChannelById + summary: Extend duration of Channel + description: This endpoint extends the duration of an existing payment Channel, increasing the block height at which the Channel will timeout. Only the payer (creator) or the channel can successfully call this endpoint. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: type: string - enum: [node] - readOnly: true - id: + requestBody: + content: + applications/json: + schema: + type: object + properties: + agreedEol: + type: number + description: The new chain (increased) height at which this channel will expire. + example: 2120399 + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Channel' + /actors/channels/{channelId}/close: + post: + operationId: closeChannel + summary: Close Channel + description: This endpoint closes the specified payment Channel and returns all unredeemed funds to the payee (the Channel's creator). Upon completion this Channel is effectively deleted and can never be used again. This method can only be called by target of the Channel with a valid voucher - any other invocation is an error. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: type: string - example: QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq - addresses: - $ref: '#/components/schemas/PeerAddresses' - version: + responses: + 200: + description: Success + /actors/channels/{channelId}/cancel: + post: + operationId: cancelChannel + summary: Schedule Channel for cancellation + description: This endpoint reduces the actual eol (effective end date) of the Channel in an attempt to free up the funds in the channel for earlier reclaming. This endpoint can only successfullly be called by the Channel's payer as the cancel message needs to originate from that account. Cancel doesn't immediately close a channel but instead reduces the lifetime of the channel leaving a grace period during which the payee can undo the cancellation by submitting a valid voucher, thereby proving that the channel is still in use. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to cancel + required: true + schema: type: string - example: "1.0.2" - commit: + responses: + 200: + description: Success + /actors/channels/{channelId}/reclaim: + post: + operationId: reclaimChannel + summary: Reclaim unspent funds in Channel + description: This endpoint is used by the creator (payer) of a Channel to reclaim unspent funds when a Channel has timed out (the chain height has exceeded the eol of the Channel). It can only successfully be called by the Channel's payer on a timed out Channel. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to reclaim + required: true + schema: type: string - example: "93540266a2a9972e91947a538ce70dc9c4e8077e" - protocol: - type: object - properties: - autoSealInterval: - type: number - description: Auto-Seal Interval in Seconds - sectorSizes: - type: array - description: Supoorted sector sizes in bytes - items: - type: number - bitswapStats: - type: object - properties: - blocksReceived: - type: number - blocksSent: - type: number - dataReceived: - type: number - dataSent: - type: number - dupBlksReceived: - type: number - dupDataReceived: - type: number - messagesReceived: - type: number - ProvideBufLen: - type: number - peers: - type: array - description: Filecoin Addresses of currently connected peers - items: - type: string - example: 'QmUA8TXLxsfuifpyHPxGfwWgXSCr6omqb6bdQy2KwWQCBz' - wantlist: - type: array - description: CIDs of currently desired content blocks - items: - type: string - example: 'QmQXJPWYEnt9GoYu5SXkrKMWovCX78YBjFzRSJF63Zobnj' - config: - type: object - description: Full JSON representation of the node's current configuration - Tipset: - type: object - properties: - kind: + responses: + 200: + description: Success + /actors/channels/{channelId}/redeem: + post: + operationId: redeemVoucher + summary: Redeem Voucher + description: This endpoint accepts a voucher from the Channel target and redeems it. Upon checking the validity and successfully checking the voucher's condition the specified funds will be transfered from the channel to the target. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: type: string - enum: [tipset] - readOnly: true - id: + requestBody: + content: + applications/json: + schema: + $ref: '#/components/schemas/Voucher' + responses: + 200: + description: Success + /actors/channels/{channelId}/vouchers: + post: + operationId: createVoucher + summary: Creates Voucher + description: This endpoint accepts voucher details and returns a new signed voucher suitable for off chain transmission to the Channel target for later redemption. Only the Channel payer (creator) can call this endpoint successfully. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: type: string - readOnly: true - example: 'zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ' - height: - type: number - blocks: - type: array - items: - $ref: '#/components/schemas/BlockHeader' \ No newline at end of file + requestBody: + content: + applications/json: + schema: + $ref: '#/components/schemas/Voucher' + responses: + 200: + description: Success From 3f4862cdcfa69c432ae5f078db3b10985c9e96b4 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Thu, 12 Sep 2019 17:13:32 -0700 Subject: [PATCH 20/50] Switch to recent version of ReDoc --- README.md | 4 +- package-lock.json | 1389 +++++++++++++++++++++++++++++++++++++++++++-- package.json | 4 +- 3 files changed, 1355 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 62fa9a4..73ede4c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ OpenAPI specification for the Filecoin HTTP REST API. This is the specification for the HTTP REST API (to be) implemented by Filecoin nodes. Some details of its design and rationale can be found in this [Design Document](https://docs.google.com/document/d/1ANnTHOU-8612ayvvS7Ru4B1L4voojLE0R0TQ8zF1x5s/edit#heading=h.8v8p3fl8e3gj). ## Setup -To facilitate development and review of this specification we're using [speccy](https://github.com/wework/speccy). You can install speccy using NPM or Yarn. +To facilitate development and review we're using [speccy](https://github.com/wework/speccy) as a linter and [redoc](https://github.com/Redocly/redoc) to generate HTML documemtation. You can install them using NPM or Yarn. ```sh $ npm install @@ -13,7 +13,7 @@ $ yarn install ``` ## Usage -To view the specification in HTML documentation form ([ReDoc](https://github.com/Redocly/redoc)) you can invoke speccy via: +To view the specification in HTML form you can invoke redoc via: ```sh $ npm run serve ``` diff --git a/package-lock.json b/package-lock.json index 1b5f74e..dca7872 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,67 @@ "@babel/highlight": "^7.0.0" } }, + "@babel/generator": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.0.tgz", + "integrity": "sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA==", + "requires": { + "@babel/types": "^7.6.0", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", + "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "requires": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-module-imports": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", + "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "requires": { + "@babel/types": "^7.4.4" + } + }, "@babel/highlight": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", @@ -22,6 +83,11 @@ "js-tokens": "^4.0.0" } }, + "@babel/parser": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz", + "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==" + }, "@babel/runtime": { "version": "7.5.5", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.5.tgz", @@ -30,11 +96,80 @@ "regenerator-runtime": "^0.13.2" } }, + "@babel/template": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz", + "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==", + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.6.0", + "@babel/types": "^7.6.0" + } + }, + "@babel/traverse": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.0.tgz", + "integrity": "sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ==", + "requires": { + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.6.0", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.6.0", + "@babel/types": "^7.6.0", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "@babel/types": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, "@cloudflare/json-schema-walker": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@cloudflare/json-schema-walker/-/json-schema-walker-0.1.1.tgz", "integrity": "sha512-P3n0hEgk1m6uKWgL4Yb1owzXVG4pM70G4kRnDQxZXiVvfCRtaqiHu+ZRiRPzmwGBiLTO1LWc2yR1M8oz0YkXww==" }, + "@emotion/is-prop-valid": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.2.tgz", + "integrity": "sha512-ZQIMAA2kLUWiUeMZNJDTeCwYRx1l8SQL0kHktze4COT22occKpDML1GDUXP5/sxhOMrZO8vZw773ni4H5Snrsg==", + "requires": { + "@emotion/memoize": "0.7.2" + } + }, + "@emotion/memoize": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.2.tgz", + "integrity": "sha512-hnHhwQzvPCW1QjBWFyBtsETdllOM92BfrKWbUTmh9aeOlcVOiXvlPsK4104xH8NsaKfg86PTFsWkueQeUfMA/w==" + }, + "@emotion/unitless": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.4.tgz", + "integrity": "sha512-kBa+cDHOR9jpRJ+kcGMsysrls0leukrm68DmFQoMIWQcXdr2cZvyvypWuGYT7U+9kAExUE7+T7r6G3C3A6L8MQ==" + }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -68,6 +203,15 @@ "color-convert": "^1.9.0" } }, + "anymatch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.0.tgz", + "integrity": "sha512-Ozz7l4ixzI7Oxj2+cw+p0tVUt27BpaJ+1+q1TCeANWxHpvyn2+Un+YamBdfKu0uh8xLodGhoa1v7595NhKDAuA==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -81,11 +225,66 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + } + } + } + }, "async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, + "babel-plugin-styled-components": { + "version": "1.10.6", + "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.6.tgz", + "integrity": "sha512-gyQj/Zf1kQti66100PhrCRjI5ldjaze9O0M3emXRPAN80Zsf8+e1thpTpaXJXVHXtaM4/+dJEgZHyS9Its+8SA==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-module-imports": "^7.0.0", + "babel-plugin-syntax-jsx": "^6.18.0", + "lodash": "^4.17.11" + } + }, + "babel-plugin-syntax-jsx": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", + "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=" + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + }, "better-ajv-errors": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-0.5.7.tgz", @@ -105,6 +304,16 @@ "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==" + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + }, "body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", @@ -122,6 +331,111 @@ "type-is": "~1.6.17" } }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "requires": { + "pako": "~1.0.5" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + } + } + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + }, "bytes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", @@ -137,6 +451,11 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" }, + "camelize": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", + "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -147,6 +466,30 @@ "supports-color": "^5.3.0" } }, + "chokidar": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.0.2.tgz", + "integrity": "sha512-c4PR2egjNjI1um6bamCQ6bUNPDiyofNQruHvKgHQ4gDUP/ITSVSzNsiI5OWtHOsX323i5ha/kk4YmOZ1Ktg7KA==", + "requires": { + "anymatch": "^3.0.1", + "braces": "^3.0.2", + "fsevents": "^2.0.6", + "glob-parent": "^5.0.0", + "is-binary-path": "^2.1.0", + "is-glob": "^4.0.1", + "normalize-path": "^3.0.0", + "readdirp": "^3.1.1" + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "classnames": { "version": "2.2.6", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", @@ -206,6 +549,19 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==" }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "requires": { + "date-now": "^0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" + }, "content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", @@ -234,6 +590,45 @@ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==" }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -246,6 +641,44 @@ "which": "^1.2.9" } }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "css-color-keywords": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", + "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=" + }, + "css-to-react-native": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.3.2.tgz", + "integrity": "sha512-VOFaeZA053BqvvvqIA8c9n0+9vFppVBAHCp6JgFTtTMU3Mzi+XnelJ9XC9ul3BqFzZyQ5N+H0SnwsWT2Ebchxw==", + "requires": { + "camelize": "^1.0.0", + "css-color-keywords": "^1.0.0", + "postcss-value-parser": "^3.3.0" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -275,16 +708,40 @@ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, "dom-walk": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" + }, "dompurify": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-1.0.11.tgz", @@ -300,6 +757,25 @@ "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.2.tgz", "integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q==" }, + "elliptic": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz", + "integrity": "sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, "emojis-list": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", @@ -349,9 +825,23 @@ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, "eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", + "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==" + }, + "events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==" + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } }, "execa": { "version": "1.0.0", @@ -419,6 +909,14 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, "finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -461,6 +959,12 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, + "fsevents": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.0.7.tgz", + "integrity": "sha512-a7YT0SV3RB+DjYcppwVDLtn13UQnmg0SWZS7ezZD0UjnLwXmy8Zm21GMVGLaFGimIqcvyMQaOJBrop8MyOp1kQ==", + "optional": true + }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -474,6 +978,14 @@ "pump": "^3.0.0" } }, + "glob-parent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz", + "integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==", + "requires": { + "is-glob": "^4.0.1" + } + }, "global": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", @@ -483,6 +995,11 @@ "process": "^0.11.10" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + }, "good-listener": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", @@ -497,11 +1014,57 @@ "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" }, + "handlebars": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.2.0.tgz", + "integrity": "sha512-Kb4xn5Qh1cxAKvQnzNWZ512DhABzyFNmsaJf3OAkWNa4NkaqWcNI8Tao8Tasi0/F4JD9oyG0YxuFyvyR57d+Gw==", + "requires": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "hoist-non-react-statics": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz", @@ -527,6 +1090,11 @@ "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.3.tgz", "integrity": "sha512-nUxLymWQ9pzkzTmir24p2RtsgruLmhje7lH3hLX1IpwvyTg77fW+1brenPPP3USAR+rQ36p5sTA/x7sjCJVkAA==" }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -535,6 +1103,11 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", @@ -555,6 +1128,19 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", @@ -563,11 +1149,34 @@ "number-is-nan": "^1.0.0" } }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, + "is-what": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.3.1.tgz", + "integrity": "sha512-seFn10yAXy+yJlTRO+8VfiafC+0QJanGLMPTBWLrJm/QPauuchy0UXh8B6H5o9VA8BAzk0iYievt6mNp6gfaqA==" + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -587,6 +1196,11 @@ "esprima": "^4.0.0" } }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" + }, "json-pointer": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.0.tgz", @@ -672,6 +1286,11 @@ "path-exists": "^3.0.0" } }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -699,9 +1318,19 @@ "integrity": "sha1-GA8fnr74sOY45BZq1S24eb6y/8U=" }, "marked": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.3.tgz", - "integrity": "sha512-Fqa7eq+UaxfMriqzYLayfqAE40WN03jf+zHjT18/uXNuzjq3TY0XTbrAoPeqSJrAmPz11VuUA+kBPYOhHt9oOQ==" + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", + "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==" + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } }, "media-typer": { "version": "0.3.0", @@ -723,6 +1352,14 @@ "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.1.1.tgz", "integrity": "sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA==" }, + "merge-anything": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-2.4.1.tgz", + "integrity": "sha512-dYOIAl9GFCJNctSIHWOj9OJtarCjsD16P8ObCl6oxrujAG+kOvlwJuOD9/O9iYZ9aTi1RGpGTG9q9etIvuUikQ==", + "requires": { + "is-what": "^3.3.1" + } + }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -733,6 +1370,15 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -764,20 +1410,54 @@ "dom-walk": "^0.1.0" } }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } + } + }, + "mobx": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/mobx/-/mobx-4.13.0.tgz", + "integrity": "sha512-+hJTBIBRz4sWKpBTj2t2YbjJVlFJIGYiVoHnNUl03krsiFzXGNtqLjFvTPE1+fnN6Mq6LGfvgRKiGsBtZvZBwg==" + }, "mobx-react": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-5.4.4.tgz", - "integrity": "sha512-2mTzpyEjVB/RGk2i6KbcmP4HWcAUFox5ZRCrGvSyz49w20I4C4qql63grPpYrS9E9GKwgydBHQlA4y665LuRCQ==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-6.1.3.tgz", + "integrity": "sha512-eT/jO9dYIoB1AlZwI2VC3iX0gPOeOIqZsiwg7tDJV1B7Z69h+TZZL3dgOE0UeS2zoHhGeKbP+K+OLeLMnnkGnA==", "requires": { - "hoist-non-react-statics": "^3.0.0", - "react-lifecycles-compat": "^3.0.2" + "mobx-react-lite": "1.4.0" } }, + "mobx-react-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-1.4.0.tgz", + "integrity": "sha512-5xCuus+QITQpzKOjAOIQ/YxNhOl/En+PlNJF+5QU4Qxn9gnNMJBbweAdEW3HnuVQbfqDYEUnkGs5hmkIIStehg==" + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -807,6 +1487,11 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -825,6 +1510,36 @@ "http2-client": "^1.2.5" } }, + "node-libs-browser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + } + }, "node-readfiles": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", @@ -833,6 +1548,11 @@ "es6-promise": "^3.2.1" } }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -1008,13 +1728,34 @@ } }, "openapi-sampler": { - "version": "1.0.0-beta.14", - "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.0.0-beta.14.tgz", - "integrity": "sha512-NNmH9YAN5AaCE4w6MQXdCrmsOJJQTswHVSp075+h+iiG+OTonpZE8HzwocozovD2imx4lamkuxGLs4E4bO4Z+g==", + "version": "1.0.0-beta.15", + "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.0.0-beta.15.tgz", + "integrity": "sha512-wUD/vD3iBHKik/sME3uwUu4X3HFA53rDrPcVvLzgEELjHLbnTpSYfm4Jo9qZT1dPfBRowAnrF/VRQfOjL5QRAw==", "requires": { "json-pointer": "^0.6.0" } }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + } + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + }, "os-locale": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", @@ -1059,11 +1800,34 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, + "pako": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" + }, + "parse-asn1": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", + "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==" + }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -1079,11 +1843,28 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, + "pbkdf2": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "perfect-scrollbar": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-1.4.0.tgz", "integrity": "sha512-/2Sk/khljhdrsamjJYS5NjrH+GKEHEwh7zFSiYyxROyYKagkE4kSn2zDQDRTOMo8mpT2jikxx6yI1dG7lNP/hw==" }, + "picomatch": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz", + "integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==" + }, "polished": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/polished/-/polished-3.4.1.tgz", @@ -1092,6 +1873,11 @@ "@babel/runtime": "^7.4.5" } }, + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + }, "prismjs": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.17.1.tgz", @@ -1105,6 +1891,11 @@ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, "prop-types": { "version": "15.7.2", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", @@ -1124,6 +1915,19 @@ "ipaddr.js": "1.9.0" } }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -1133,11 +1937,43 @@ "once": "^1.3.1" } }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -1154,6 +1990,27 @@ "unpipe": "1.0.0" } }, + "react": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.9.0.tgz", + "integrity": "sha512-+7LQnFBwkiw+BobzOF6N//BdoNw0ouwmSJTEm9cglOOmsg/TMiFHZLe2sEoN5M7LgJTj9oHH0gxklfnQe66S1w==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + } + }, + "react-dom": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.9.0.tgz", + "integrity": "sha512-YFT2rxO9hM70ewk9jq0y6sQk8cL02xm4+IzYBz75CQGlClQQ1Bxq0nhHF6OtSbit+AIahujJgb/CPRibFkMNJQ==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.15.0" + } + }, "react-dropdown": { "version": "1.6.4", "resolved": "https://registry.npmjs.org/react-dropdown/-/react-dropdown-1.6.4.tgz", @@ -1163,9 +2020,9 @@ } }, "react-hot-loader": { - "version": "4.12.12", - "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.12.tgz", - "integrity": "sha512-Tkd412j5yPKHoTRsJzZb+5UJNFKkPszm7QGKGYvt+jnzTkDS+qK0u3AYPlB0MmBlwzUKVHICqq5KH9Srzda7XA==", + "version": "4.12.13", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.13.tgz", + "integrity": "sha512-4Byk3aVQhcmTnVCBvDHOEOUnMFMj81r2yRKZQSfLOG2yd/4hm/A3oK15AnCZilQExqSFSsHcK64lIIU+dU2zQQ==", "requires": { "fast-levenshtein": "^2.0.6", "global": "^4.3.0", @@ -1196,34 +2053,218 @@ "prop-types": "^15.5.0" } }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "readdirp": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.1.2.tgz", + "integrity": "sha512-8rhl0xs2cxfVsqzreYCvs8EwBfn/DhVdqtoLmw19uI3SC5avYX9teCurlErfpPXGmYtMHReGaP2RsLnFvz/lnw==", + "requires": { + "picomatch": "^2.0.4" + } + }, "redoc": { - "version": "2.0.0-rc.8-1", - "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-rc.8-1.tgz", - "integrity": "sha512-/YoCdcl2QtveKz4CTXaqtOfCIaVgZZgcnfUNC5xK7xBl/LxTiNj3tUbgFmrYMLTZGzNdQ9TUJpsa7lXDKcr8Pw==", + "version": "2.0.0-rc.14", + "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-rc.14.tgz", + "integrity": "sha512-hWYLI1kxwTDMx9ZbKP0GoQzQC6ffNV49lLrWxgFXAcDspWzblRNRRi5b4LUBOAsrPD0kHiY6hfZgvDqKSs13Tg==", "requires": { "classnames": "^2.2.6", "decko": "^1.2.0", - "dompurify": "^1.0.10", - "eventemitter3": "^3.0.0", + "dompurify": "^1.0.11", + "eventemitter3": "^4.0.0", "json-pointer": "^0.6.0", "json-schema-ref-parser": "^6.1.0", "lunr": "2.3.6", "mark.js": "^8.11.1", - "marked": "^0.6.1", - "memoize-one": "^5.0.0", - "mobx-react": "^5.4.3", - "openapi-sampler": "1.0.0-beta.14", + "marked": "^0.7.0", + "memoize-one": "^5.0.5", + "mobx-react": "^6.1.1", + "openapi-sampler": "1.0.0-beta.15", "perfect-scrollbar": "^1.4.0", - "polished": "^3.0.3", - "prismjs": "^1.15.0", + "polished": "^3.4.1", + "prismjs": "^1.17.1", "prop-types": "^15.7.2", "react-dropdown": "^1.6.4", - "react-hot-loader": "^4.8.0", + "react-hot-loader": "^4.12.10", "react-tabs": "^3.0.0", "slugify": "^1.3.4", "stickyfill": "^1.1.1", - "swagger2openapi": "^5.2.3", - "tslib": "^1.9.3" + "swagger2openapi": "^5.3.1", + "tslib": "^1.10.0", + "uri-template-lite": "^19.4.0" + } + }, + "redoc-cli": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/redoc-cli/-/redoc-cli-0.8.6.tgz", + "integrity": "sha512-YjwSts4Yh7mUYYsq064ElNI4xAETPRUIq76A51sZpGZ0+36+2elo23oQYAzCSOBX7/Bj6W5vzMHaPPDewFnZbg==", + "requires": { + "chokidar": "^3.0.2", + "handlebars": "^4.1.2", + "isarray": "^2.0.5", + "mkdirp": "^0.5.1", + "mobx": "^4.2.0", + "node-libs-browser": "^2.2.1", + "react": "^16.8.6", + "react-dom": "^16.8.6", + "redoc": "2.0.0-rc.13", + "styled-components": "^4.3.2", + "tslib": "^1.10.0", + "yargs": "^13.3.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "redoc": { + "version": "2.0.0-rc.13", + "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-rc.13.tgz", + "integrity": "sha512-t0vlss1TIUknYXTI9RIZ1nRMyIW/pjo4KMMDFOMdRq5/8jopkNyf37q25BwBuAJfDxQV+tIUoy6o+rAAffeDkQ==", + "requires": { + "classnames": "^2.2.6", + "decko": "^1.2.0", + "dompurify": "^1.0.11", + "eventemitter3": "^4.0.0", + "json-pointer": "^0.6.0", + "json-schema-ref-parser": "^6.1.0", + "lunr": "2.3.6", + "mark.js": "^8.11.1", + "marked": "^0.7.0", + "memoize-one": "^5.0.5", + "mobx-react": "^6.1.1", + "openapi-sampler": "1.0.0-beta.15", + "perfect-scrollbar": "^1.4.0", + "polished": "^3.4.1", + "prismjs": "^1.17.1", + "prop-types": "^15.7.2", + "react-dropdown": "^1.6.4", + "react-hot-loader": "^4.12.10", + "react-tabs": "^3.0.0", + "slugify": "^1.3.4", + "stickyfill": "^1.1.1", + "swagger2openapi": "^5.3.1", + "tslib": "^1.10.0", + "uri-template-lite": "^19.4.0" + } + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + }, + "yargs": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", + "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.1" + } + }, + "yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } } }, "reftools": { @@ -1246,6 +2287,15 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -1261,6 +2311,15 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "scheduler": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.15.0.tgz", + "integrity": "sha512-xAefmSfN6jqAa7Kuq7LIJY0bwAPG3xlCj0HMEBQk1lxYiDKZscY2xJ5U/61ZTrYbmNQbXa+gc7czPkVo11tnCg==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, "secure-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", @@ -1320,11 +2379,25 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, "setprototypeof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "shallowequal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", @@ -1397,9 +2470,9 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, "slugify": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.4.tgz", - "integrity": "sha512-KP0ZYk5hJNBS8/eIjGkFDCzGQIoZ1mnfQRYS5WM3273z+fxGWXeN0fkwf2ebEweydv9tioZIHGZKoF21U07/nw==" + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.5.tgz", + "integrity": "sha512-5VCnH7aS13b0UqWOs7Ef3E5rkhFe8Od+cp7wybFv5mv/sYSRkucZlJX0bamAJky7b2TTtGvrJBWVdpdEicsSrA==" }, "source-map": { "version": "0.7.3", @@ -1424,6 +2497,65 @@ "oas-validator": "^3.0.1", "redoc": "v2.0.0-rc.8-1", "yaml": "^1.5.0" + }, + "dependencies": { + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + }, + "marked": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.3.tgz", + "integrity": "sha512-Fqa7eq+UaxfMriqzYLayfqAE40WN03jf+zHjT18/uXNuzjq3TY0XTbrAoPeqSJrAmPz11VuUA+kBPYOhHt9oOQ==" + }, + "mobx-react": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-5.4.4.tgz", + "integrity": "sha512-2mTzpyEjVB/RGk2i6KbcmP4HWcAUFox5ZRCrGvSyz49w20I4C4qql63grPpYrS9E9GKwgydBHQlA4y665LuRCQ==", + "requires": { + "hoist-non-react-statics": "^3.0.0", + "react-lifecycles-compat": "^3.0.2" + } + }, + "openapi-sampler": { + "version": "1.0.0-beta.14", + "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.0.0-beta.14.tgz", + "integrity": "sha512-NNmH9YAN5AaCE4w6MQXdCrmsOJJQTswHVSp075+h+iiG+OTonpZE8HzwocozovD2imx4lamkuxGLs4E4bO4Z+g==", + "requires": { + "json-pointer": "^0.6.0" + } + }, + "redoc": { + "version": "2.0.0-rc.8-1", + "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-rc.8-1.tgz", + "integrity": "sha512-/YoCdcl2QtveKz4CTXaqtOfCIaVgZZgcnfUNC5xK7xBl/LxTiNj3tUbgFmrYMLTZGzNdQ9TUJpsa7lXDKcr8Pw==", + "requires": { + "classnames": "^2.2.6", + "decko": "^1.2.0", + "dompurify": "^1.0.10", + "eventemitter3": "^3.0.0", + "json-pointer": "^0.6.0", + "json-schema-ref-parser": "^6.1.0", + "lunr": "2.3.6", + "mark.js": "^8.11.1", + "marked": "^0.6.1", + "memoize-one": "^5.0.0", + "mobx-react": "^5.4.3", + "openapi-sampler": "1.0.0-beta.14", + "perfect-scrollbar": "^1.4.0", + "polished": "^3.0.3", + "prismjs": "^1.15.0", + "prop-types": "^15.7.2", + "react-dropdown": "^1.6.4", + "react-hot-loader": "^4.8.0", + "react-tabs": "^3.0.0", + "slugify": "^1.3.4", + "stickyfill": "^1.1.1", + "swagger2openapi": "^5.2.3", + "tslib": "^1.9.3" + } + } } }, "sprintf-js": { @@ -1441,6 +2573,27 @@ "resolved": "https://registry.npmjs.org/stickyfill/-/stickyfill-1.1.1.tgz", "integrity": "sha1-OUE/7p0CXHSn5ZzuyyN4TMDxfwI=" }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -1451,6 +2604,21 @@ "strip-ansi": "^3.0.0" } }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + } + } + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -1464,6 +2632,36 @@ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, + "styled-components": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-4.3.2.tgz", + "integrity": "sha512-NppHzIFavZ3TsIU3R1omtddJ0Bv1+j50AKh3ZWyXHuFvJq1I8qkQ5mZ7uQgD89Y8zJNx2qRo6RqAH1BmoVafHw==", + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@emotion/is-prop-valid": "^0.8.1", + "@emotion/unitless": "^0.7.0", + "babel-plugin-styled-components": ">= 1", + "css-to-react-native": "^2.2.2", + "memoize-one": "^5.0.0", + "merge-anything": "^2.2.4", + "prop-types": "^15.5.4", + "react-is": "^16.6.0", + "stylis": "^3.5.0", + "stylis-rule-sheet": "^0.0.10", + "supports-color": "^5.5.0" + } + }, + "stylis": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.4.tgz", + "integrity": "sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==" + }, + "stylis-rule-sheet": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz", + "integrity": "sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==" + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -1496,17 +2694,17 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, "better-ajv-errors": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-0.6.4.tgz", - "integrity": "sha512-+spBhtcCzovXWeHpt5dGylFsn3p5l9w+KcUqh/b4MFdLV+q1sT1olxD9izvwi0D3WuP06eVgeZAGLtxtTnUIDg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-0.6.5.tgz", + "integrity": "sha512-+K61WQC8gOWuEl9HFbnN5+Y0u1of4pipNJECebg9P8aHAgMEC8nT2FR1JaQfV0koqB68mF9NhxZNz5QQ8xm1yw==", "requires": { "@babel/code-frame": "^7.0.0", "@babel/runtime": "^7.0.0", "chalk": "^2.4.1", - "core-js": "^2.5.7", + "core-js": "^3.2.1", "json-to-ast": "^2.0.3", "jsonpointer": "^4.0.1", - "leven": "^2.1.0" + "leven": "^3.1.0" } }, "cliui": { @@ -1519,6 +2717,11 @@ "wrap-ansi": "^2.0.0" } }, + "core-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + }, "invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", @@ -1537,6 +2740,11 @@ "invert-kv": "^2.0.0" } }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==" + }, "os-locale": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", @@ -1585,22 +2793,58 @@ } } }, + "timers-browserify": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", + "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", + "requires": { + "setimmediate": "^1.0.4" + } + }, "tiny-emitter": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", "optional": true }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + }, "tslib": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -1610,11 +2854,63 @@ "mime-types": "~2.1.24" } }, + "uglify-js": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", + "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", + "optional": true, + "requires": { + "commander": "~2.20.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true + } + } + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, + "uri-template-lite": { + "version": "19.4.0", + "resolved": "https://registry.npmjs.org/uri-template-lite/-/uri-template-lite-19.4.0.tgz", + "integrity": "sha512-VY8dgwyMwnCztkzhq0cA/YhNmO+YZqow//5FdmgE2fZU/JPi+U0rPL7MRDi0F+Ch4vJ7nYidWzeWAeY7uywe9g==" + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -1625,6 +2921,11 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "vm-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", + "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==" + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -1643,6 +2944,11 @@ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", @@ -1657,6 +2963,11 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", diff --git a/package.json b/package.json index eb0b6ab..1368cd8 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,11 @@ "description": "Filecoin JSON REST API OpenAPI Specification", "version": "0.1.0", "scripts": { - "serve": "speccy serve ./filecoin-rest-api.yml" + "serve": "redoc-cli serve ./filecoin-rest-api.yml -p 5000 -w" }, "dependencies": { + "redoc": "^2.0.0-rc.14", + "redoc-cli": "^0.8.6", "speccy": "^0.11.0" }, "devDependencies": {} From 566f3dc62ee64e71a917f57402b5cdb795c49ebc Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Thu, 12 Sep 2019 17:13:49 -0700 Subject: [PATCH 21/50] Add Models to rendered documentation --- filecoin-rest-api.yml | 58 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 0a74206..60a915a 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -5,6 +5,51 @@ tags: - name: Messages - name: Node - name: Tipsets + - name: ActorModel + x-displayName: Actor + description: | + This is a description + + - name: AskModel + x-displayName: Ask + description: | + + - name: BlockModel + x-displayName: Block + description: | + + - name: BlockHeaderModel + x-displayName: BlockHeader + description: | + + - name: ChannelModel + x-displayName: Channel + description: | + + - name: DealModel + x-displayName: Deal + description: | + + - name: ExecutedMessageModel + x-displayName: ExecutedMessage + description: | + + - name: MessageModel + x-displayName: Message + description: | + + - name: NodeModel + x-displayName: Node + description: | + + - name: TipsetModel + x-displayName: Tipset + description: | + + - name: VoucherModel + x-displayName: Voucher + description: | + x-tagGroups: - name: Chain Resources tags: @@ -24,6 +69,19 @@ x-tagGroups: tags: - Asks - Deals + - name: Models + tags: + - ActorModel + - AskModel + - BlockModel + - BlockHeaderModel + - ChannelModel + - DealModel + - ExecutedMessageModel + - MessageModel + - NodeModel + - TipsetModel + - VoucherModel info: title: Filecoin JSON REST API description: Filecoin JSON REST API Description From 0b050cf4fbd088679b6d949fe22cbd49c405731a Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Thu, 12 Sep 2019 17:32:13 -0700 Subject: [PATCH 22/50] Assorted fixes --- filecoin-rest-api.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 60a915a..2b19f1f 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -96,6 +96,10 @@ components: Voucher: type: object properties: + kind: + type: string + readOnly: true + enum: [voucher] channelId: type: string description: The ID of the payment Channel this Voucher is redeemable against. @@ -439,7 +443,7 @@ components: properties: kind: type: string - enum: [mxecutedMessage] + enum: [message] readOnly: true id: type: string @@ -660,7 +664,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Message' + $ref: '#/components/schemas/Block' /chain/messages: post: operationId: createMessage From c3ecb7c64b9bbe742d1278cb41fa477c49d7cf48 Mon Sep 17 00:00:00 2001 From: Mosh <1306020+mishmosh@users.noreply.github.com> Date: Fri, 13 Sep 2019 14:53:53 -0400 Subject: [PATCH 23/50] tiny README typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73ede4c..30f1f6e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ OpenAPI specification for the Filecoin HTTP REST API. This is the specification for the HTTP REST API (to be) implemented by Filecoin nodes. Some details of its design and rationale can be found in this [Design Document](https://docs.google.com/document/d/1ANnTHOU-8612ayvvS7Ru4B1L4voojLE0R0TQ8zF1x5s/edit#heading=h.8v8p3fl8e3gj). ## Setup -To facilitate development and review we're using [speccy](https://github.com/wework/speccy) as a linter and [redoc](https://github.com/Redocly/redoc) to generate HTML documemtation. You can install them using NPM or Yarn. +To facilitate development and review we're using [speccy](https://github.com/wework/speccy) as a linter and [redoc](https://github.com/Redocly/redoc) to generate HTML documentation. You can install them using NPM or Yarn. ```sh $ npm install From 6179cf0bff52b5af620f7c3201b1fd771f950403 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Mon, 16 Sep 2019 11:19:38 -0700 Subject: [PATCH 24/50] Moved Tipsets to chain.yml --- chain.yml | 247 ++++++++++++++++++++++++++++++++++++++ filecoin-rest-api.yml | 273 ++++-------------------------------------- 2 files changed, 272 insertions(+), 248 deletions(-) create mode 100644 chain.yml diff --git a/chain.yml b/chain.yml new file mode 100644 index 0000000..eb3d7b4 --- /dev/null +++ b/chain.yml @@ -0,0 +1,247 @@ +models: + Block: + type: object + properties: + kind: + type: string + enum: [block] + readOnly: true + id: + type: string + header: + $ref: '#/models/BlockHeader' + executedMessages: + type: array + items: + $ref: '#/models/ExecutedMessage' + BlockHeader: + type: object + properties: + kind: + type: string + enum: [blockHeader] + readOnly: true + id: + type: string + height: + type: number + minerId: + type: string + messageListId: + type: string + recieptListId: + type: string + tickets: + type: array + items: + type: string + electionProof: + type: string + parentTipsetId: + type: string + parentWeight: + type: number + stateRoot: + type: string + timestamp: + type: number + blsAggregate: + type: string + signature: + type: string + ExecutedMessage: + type: object + properties: + kind: + type: string + enum: [executedMessage] + readOnly: true + id: + type: string + readOnly: true + blockId: + type: string + readOnly: true + message: + $ref: 'chain.yml#/models/Message' + exitCode: + type: number + readOnly: true + return: + type: object + readOnly: true + Message: + type: object + properties: + kind: + type: string + enum: [message] + readOnly: true + id: + type: string + readOnly: true + nonce: + type: number + readOnly: true + from: + type: string + readOnly: true + to: + type: string + value: + type: number + gasPrice: + type: number + gasLimit: + type: number + method: + type: string + parameters: + type: object + signature: + type: string + readOnly: true + Tipset: + type: object + properties: + kind: + type: string + enum: [tipset] + readOnly: true + id: + type: string + readOnly: true + example: 'zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ' + height: + type: number + blocks: + type: array + items: + $ref: '#/models/BlockHeader' +endpoints: + block_resource: + get: + operationId: getBlockById + summary: Find block by ID + description: Return information about the Block with the specified ID + tags: + - Blocks + parameters: + - name: blockId + in: path + description: ID of the Block to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/models/Block' + executed_message_resource: + get: + operationId: getExecutedMessageById + summary: Find ExecutedMessage by ID + description: Return information about the ExecutedMessage with the specified ID. An executed Message is one that has been included in a valid block in the chain. It includes return value and status information. + tags: + - Messages + parameters: + - name: executedMessageId + in: path + description: ID of the executed message to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/models/ExecutedMessage' + message_resource: + get: + operationId: getMessageById + summary: Find Message by ID + description: Return information about the Message with the specified ID + tags: + - nessages + parameters: + - name: messageId + in: path + description: ID of the message to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/models/Message' + messages_collection: + post: + operationId: createMessage + summary: Send a Message + description: This method sends a new Message to an Actor recipient. + tags: + - Messages + requestBody: + content: + application/json: + schema: + $ref: '#/models/Message' + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/models/Message' + tipset_resource: + get: + operationId: getTipsetById + summary: Fetch a Tipset by ID + description: Return information about the Tipset with the specified ID + tags: + - Tipsets + parameters: + - name: tipsetId + in: path + description: ID of the Tipset to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/models/Tipset' + tipsets_collection: + get: + operationId: listTipsets + summary: List Tipsets + description: List Tipsets currently known to this node in reverse height order + tags: + - Tipsets + parameters: + - name: nextPageToken + in: query + description: Next page token + required: false + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/models/Tipset' \ No newline at end of file diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 2b19f1f..0400717 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -1,27 +1,24 @@ openapi: 3.0.2 tags: - - name: Actors - - name: Blocks - - name: Messages - - name: Node - - name: Tipsets - name: ActorModel x-displayName: Actor description: | This is a description + - name: Actors - name: AskModel x-displayName: Ask description: | - - name: BlockModel - x-displayName: Block - description: | - - name: BlockHeaderModel x-displayName: BlockHeader description: | + - name: BlockModel + x-displayName: Block + description: | + + - name: Blocks - name: ChannelModel x-displayName: Channel description: | @@ -38,6 +35,8 @@ tags: x-displayName: Message description: | + - name: Messages + - name: Node - name: NodeModel x-displayName: Node description: | @@ -46,6 +45,7 @@ tags: x-displayName: Tipset description: | + - name: Tipsets - name: VoucherModel x-displayName: Voucher description: | @@ -93,6 +93,16 @@ servers: - url: http://127.0.0.1:3453/api/chain/v0 components: schemas: + Block: + $ref: 'chain.yml#/models/Block' + BlockHeader: + $ref: 'chain.yml#/models/BlockHeader' + ExecutedMessage: + $ref: 'chain.yml#/models/ExecutedMessage' + Message: + $ref: 'chain.yml#/models/Message' + Tipset: + $ref: 'chain.yml#/models/Tipset' Voucher: type: object properties: @@ -367,108 +377,6 @@ components: - $ref: '#/components/schemas/MinerActorState' - $ref: '#/components/schemas/PaymentBrokerActorState' - $ref: '#/components/schemas/StorageMarketActorState' - Block: - type: object - properties: - kind: - type: string - enum: [block] - readOnly: true - id: - type: string - header: - $ref: '#/components/schemas/BlockHeader' - executedMessages: - type: array - items: - $ref: '#/components/schemas/ExecutedMessage' - BlockHeader: - type: object - properties: - kind: - type: string - enum: [blockHeader] - readOnly: true - id: - type: string - height: - type: number - minerId: - type: string - messageListId: - type: string - recieptListId: - type: string - tickets: - type: array - items: - type: string - electionProof: - type: string - parentTipsetId: - type: string - parentWeight: - type: number - stateRoot: - type: string - timestamp: - type: number - blsAggregate: - type: string - signature: - type: string - ExecutedMessage: - type: object - properties: - kind: - type: string - enum: [executedMessage] - readOnly: true - id: - type: string - readOnly: true - blockId: - type: string - readOnly: true - message: - $ref: '#/components/schemas/Message' - exitCode: - type: number - readOnly: true - return: - type: object - readOnly: true - Message: - type: object - properties: - kind: - type: string - enum: [message] - readOnly: true - id: - type: string - readOnly: true - nonce: - type: number - readOnly: true - from: - type: string - readOnly: true - to: - type: string - value: - type: number - gasPrice: - type: number - gasLimit: - type: number - method: - type: string - parameters: - type: object - signature: - type: string - readOnly: true PeerAddresses: type: array description: List of peer (network) addresses @@ -538,23 +446,6 @@ components: config: type: object description: Full JSON representation of the node's current configuration - Tipset: - type: object - properties: - kind: - type: string - enum: [tipset] - readOnly: true - id: - type: string - readOnly: true - example: 'zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ' - height: - type: number - blocks: - type: array - items: - $ref: '#/components/schemas/BlockHeader' paths: /actors/actors: get: @@ -601,131 +492,17 @@ paths: schema: $ref: '#/components/schemas/Actor' /chain/tipsets: - get: - operationId: listTipsets - summary: List Tipsets - description: List Tipsets currently known to this node in reverse height order - tags: - - Tipsets - parameters: - - name: nextPageToken - in: query - description: Next page token - required: false - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Tipset' + $ref: './chain.yml#/endpoints/tipsets_collection' /chain/tipsets/{tipsetId}: - get: - operationId: getTipsetById - summary: Fetch a Tipset by ID - description: Return information about the Tipset with the specified ID - tags: - - Tipsets - parameters: - - name: tipsetId - in: path - description: ID of the Tipset to fetch - required: true - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Tipset' + $ref: './chain.yml#/endpoints/tipset_resource' /chain/blocks/{blockId}: - get: - operationId: getBlockById - summary: Find block by ID - description: Return information about the Block with the specified ID - tags: - - Blocks - parameters: - - name: blockId - in: path - description: ID of the Block to fetch - required: true - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Block' + $ref: './chain.yml#/endpoints/block_resource' /chain/messages: - post: - operationId: createMessage - summary: Send a Message - description: This method sends a new Message to an Actor recipient. - tags: - - Messages - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Message' - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Message' + $ref: './chain.yml#/endpoints/messages_collection' /chain/messages/{messageId}: - get: - operationId: getMessageById - summary: Find Message by ID - description: Return information about the Message with the specified ID - tags: - - nessages - parameters: - - name: messageId - in: path - description: ID of the message to fetch - required: true - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Message' + $ref: './chain.yml#/endpoints/message_resource' /chain/executed-messages/{executedMessageId}: - get: - operationId: getExecutedMessageById - summary: Find ExecutedMessage by ID - description: Return information about the ExecutedMessage with the specified ID. An executed Message is one that has been included in a valid block in the chain. It includes return value and status information. - tags: - - Messages - parameters: - - name: executedMessageId - in: path - description: ID of the executed message to fetch - required: true - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/ExecutedMessage' + $ref: './chain.yml#/endpoints/executed_message_resource' /control/node: get: operationId: getNode From 397e58c40dd7643e9c700c20b4f78532a51a77f5 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Mon, 16 Sep 2019 13:06:09 -0700 Subject: [PATCH 25/50] Separate actor related endpoints/models --- actors.yml | 142 ++++++++++++++++++++++++++++++++++++++++ filecoin-rest-api.yml | 146 ++---------------------------------------- 2 files changed, 148 insertions(+), 140 deletions(-) create mode 100644 actors.yml diff --git a/actors.yml b/actors.yml new file mode 100644 index 0000000..af66fea --- /dev/null +++ b/actors.yml @@ -0,0 +1,142 @@ +models: + Actor: + type: object + properties: + kind: + type: string + readOnly: true + enum: [actor] + id: + type: string + role: + type: string + enum: [init,account,miner,storageMarket,paymentBroker] + nonce: + type: number + description: Nonce is the nonce expected on the next message from this actor. Messages are processed in strict, contiguous nonce order. + balance: + type: number + description: Balance is the amount of FIL in the actor's account. + stateRoot: + type: string + description: The CID of the root of the actor's state tree. + info: + oneOf: + - $ref: '#/models/AccountActorState' + - $ref: '#/models/InitActorState' + - $ref: '#/models/MinerActorState' + - $ref: '#/models/PaymentBrokerActorState' + - $ref: '#/models/StorageMarketActorState' + AccountActorState: + $ref: '#/models/EmptyActorState' + EmptyActorState: + type: object + description: There is no additional state exposed by this actor + InitActorState: + type: object + properties: + nextId: + type: number + description: The next numerical ID to allocate to a newly instantiated Actor + MinerActorState: + type: object + properties: + owner: + type: string + description: The address of the account that owns this miner. Income and returned are paid to this address. This address is also allowed to change the worker address for the miner. + worker: + type: string + description: The address of the worker account for this miner. This will be the key that is used to sign blocks created by this miner, and sign messages sent on behalf of this miner to commit sectors, submit PoSts, and other day to day miner activities. + peerId: + type: string + description: PeerID references the libp2p identity that the miner is operating. + sectorSize: + type: number + description: SectorSize is the amount of space in each sector committed to the network by this miner. + dePledgedCollateral: + type: number + description: Collateral that is waiting to be withdrawn + dePledgeTime: + type: number + description: Time at which the depledged collateral may be withdrawn + sectors: + type: array + items: + $ref: 'filecoin-rest-api.yml#/components/schemas/Sector' + provingSet: + type: array + items: + $ref: 'filecoin-rest-api.yml#/components/schemas/Sector' + currentFaultSet: + type: string + nextFaultSet: + type: string + nextDoneSet: + type: string + arbitratedDeals: + type: string + power: + type: number + slashedSet: + type: array + items: + $ref: 'filecoin-rest-api.yml#/components/schemas/Sector' + slashedAt: + type: number + ownedStorageCollateral: + type: number + provingPeriodEnd: + type: number + PaymentBrokerActorState: + $ref: '#/models/EmptyActorState' + StorageMarketActorState: + type: object + properties: + totalStorage: + type: number + description: Filecoin's total committed storage as of the current block. +endpoints: + actors_collection: + get: + operationId: listActors + summary: List Actors + description: List Actors currently known to this node in ID order + tags: + - Actors + parameters: + - name: nextPageToken + in: query + description: Next page token + required: false + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/models/Actor' + actor_resource: + get: + operationId: getActorById + summary: Find Actor by ID + description: Return information about the Actor with the specified ID + tags: + - Actors + parameters: + - name: actorId + in: path + description: ID of the Actor to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/models/Actor' diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 0400717..6d629e6 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -93,6 +93,8 @@ servers: - url: http://127.0.0.1:3453/api/chain/v0 components: schemas: + Actor: + $ref: 'actors.yml#/models/Actor' Block: $ref: 'chain.yml#/models/Block' BlockHeader: @@ -280,103 +282,7 @@ components: id: type: string commR: - type: string - EmptyActorState: - type: object - description: There is no additional state exposed by this actor - AccountActorState: - $ref: '#/components/schemas/EmptyActorState' - InitActorState: - type: object - properties: - nextId: - type: number - description: The next numerical ID to allocate to a newly instantiated Actor - StorageMarketActorState: - type: object - properties: - totalStorage: - type: number - description: Filecoin's total committed storage as of the current block. - PaymentBrokerActorState: - $ref: '#/components/schemas/EmptyActorState' - MinerActorState: - type: object - properties: - owner: - type: string - description: The address of the account that owns this miner. Income and returned are paid to this address. This address is also allowed to change the worker address for the miner. - worker: - type: string - description: The address of the worker account for this miner. This will be the key that is used to sign blocks created by this miner, and sign messages sent on behalf of this miner to commit sectors, submit PoSts, and other day to day miner activities. - peerId: - type: string - description: PeerID references the libp2p identity that the miner is operating. - sectorSize: - type: number - description: SectorSize is the amount of space in each sector committed to the network by this miner. - dePledgedCollateral: - type: number - description: Collateral that is waiting to be withdrawn - dePledgeTime: - type: number - description: Time at which the depledged collateral may be withdrawn - sectors: - type: array - items: - $ref: '#/components/schemas/Sector' - provingSet: - type: array - items: - $ref: '#/components/schemas/Sector' - currentFaultSet: - type: string - nextFaultSet: - type: string - nextDoneSet: type: string - arbitratedDeals: - type: string - power: - type: number - slashedSet: - type: array - items: - $ref: '#/components/schemas/Sector' - slashedAt: - type: number - ownedStorageCollateral: - type: number - provingPeriodEnd: - type: number - Actor: - type: object - properties: - kind: - type: string - readOnly: true - enum: [actor] - id: - type: string - role: - type: string - enum: [init,account,miner,storageMarket,paymentBroker] - nonce: - type: number - description: Nonce is the nonce expected on the next message from this actor. Messages are processed in strict, contiguous nonce order. - balance: - type: number - description: Balance is the amount of FIL in the actor's account. - stateRoot: - type: string - description: The CID of the root of the actor's state tree. - info: - oneOf: - - $ref: '#/components/schemas/AccountActorState' - - $ref: '#/components/schemas/InitActorState' - - $ref: '#/components/schemas/MinerActorState' - - $ref: '#/components/schemas/PaymentBrokerActorState' - - $ref: '#/components/schemas/StorageMarketActorState' PeerAddresses: type: array description: List of peer (network) addresses @@ -447,50 +353,10 @@ components: type: object description: Full JSON representation of the node's current configuration paths: - /actors/actors: - get: - operationId: listActors - summary: List Actors - description: List Actors currently known to this node in ID order - tags: - - Actors - parameters: - - name: nextPageToken - in: query - description: Next page token - required: false - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Actor' - /actors/actors/{actorId}: # Ugh, clearly wrong - get: - operationId: getActorById - summary: Find Actor by ID - description: Return information about the Actor with the specified ID - tags: - - Actors - parameters: - - name: actorId - in: path - description: ID of the Actor to fetch - required: true - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Actor' + /actors: + $ref: './actors.yml#/endpoints/actors_collection' + /actors/{actorId}: + $ref: './actors.yml#/endpoints/actor_resource' /chain/tipsets: $ref: './chain.yml#/endpoints/tipsets_collection' /chain/tipsets/{tipsetId}: From 92706a43842e89343f7572c5bf69cf634c3bdb14 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Mon, 16 Sep 2019 13:18:43 -0700 Subject: [PATCH 26/50] Move channel resource/endpoints to channels.yml --- channels.yml | 271 ++++++++++++++++++++++++++++++++++++++++ filecoin-rest-api.yml | 281 +++--------------------------------------- 2 files changed, 286 insertions(+), 266 deletions(-) create mode 100644 channels.yml diff --git a/channels.yml b/channels.yml new file mode 100644 index 0000000..355e828 --- /dev/null +++ b/channels.yml @@ -0,0 +1,271 @@ +models: + Voucher: + type: object + properties: + kind: + type: string + readOnly: true + enum: [voucher] + channelId: + type: string + description: The ID of the payment Channel this Voucher is redeemable against. + readOnly: true + example: TODO + payer: + type: string + description: The Actor ID (address) of the creator of the payment channel for this voucher. + readOnly: true + example: TODO + target: + type: string + description: The Actor ID (address) of the recipient of the funds in this voucher. + readOnly: true + example: TODO + amount: + type: number + description: The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed. + example: 0.19296864 + validAt: + type: number + description: The block height on or after which this Voucher can be redeemed. + example: 2120399 + condition: + type: object + description: The condition that must evaluate to true for this Voucher to be redeemed. + example: TODO + signature: + type: string + description: The signature over all the data in this Voucher + example: TODO + Channel: + type: object + properties: + id: + type: string + description: The ID of this Channel + readOnly: true + kind: + type: string + readOnly: true + enum: [channel] + targetActorId: + type: string + description: The address of the account to which funds will be transferred by this Channel upon successful redemption of vouchers + example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy + amount: + type: number + description: The total amount of FIL that is in this Channel and payable to the target + example: 0.19296864 + amountRedeemed: + type: number + readOnly: true + description: The total amount of FIL that has already been transfered to the target. This value cannot ever exceed amount. + example: 0 + agreedEol: + type: number + description: The original chain height at which this Channel will expire. Specified upon creation and optionally extended by the creator of the channel. + example: 2120399 + actualEol: + type: number + readOnly: true + description: The actual expiration for the payment Channel which can differ from agreedEol when the payment channel is in dispute + condition: + type: object + readOnly: true + description: The condition specified in the most recent payment voucher for which a redemption attempt was made. + example: TODO + redeemed: + type: boolean + readOnly: true + description: A flag indicated whether or not Redeem has been called on the payment Channel yet. This is necessary because AmountRedeemed can still be zero in the event of a zero-value voucher + example: true +endpoints: + channels_collection: + get: + operationId: listChannels + summary: List Channels + description: List all payment channels known to this node + tags: + - Channels + parameters: + - name: nextPageToken + in: query + description: Next page token + required: false + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/models/Channel' + post: + operationId: createChannel + summary: Create new payment Channel + description: This endpoint creates a new payment Channel with the specified characteristics + tags: + - Channels + requestBody: + content: + application/json: + schema: + $ref: '#/models/Channel' + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/models/Channel' + channel_resource: + get: + operationId: getChannelById + summary: Find Channel by ID + description: Find a payment Channel by ID and return it + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/models/Channel' + patch: + operationId: extendChannelById + summary: Extend duration of Channel + description: This endpoint extends the duration of an existing payment Channel, increasing the block height at which the Channel will timeout. Only the payer (creator) or the channel can successfully call this endpoint. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: + type: string + requestBody: + content: + applications/json: + schema: + type: object + properties: + agreedEol: + type: number + description: The new chain (increased) height at which this channel will expire. + example: 2120399 + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/models/Channel' + channel_resource_close: + post: + operationId: closeChannel + summary: Close Channel + description: This endpoint closes the specified payment Channel and returns all unredeemed funds to the payee (the Channel's creator). Upon completion this Channel is effectively deleted and can never be used again. This method can only be called by target of the Channel with a valid voucher - any other invocation is an error. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: + type: string + responses: + 200: + description: Success + channel_resource_cancel: + post: + operationId: cancelChannel + summary: Schedule Channel for cancellation + description: This endpoint reduces the actual eol (effective end date) of the Channel in an attempt to free up the funds in the channel for earlier reclaming. This endpoint can only successfullly be called by the Channel's payer as the cancel message needs to originate from that account. Cancel doesn't immediately close a channel but instead reduces the lifetime of the channel leaving a grace period during which the payee can undo the cancellation by submitting a valid voucher, thereby proving that the channel is still in use. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to cancel + required: true + schema: + type: string + responses: + 200: + description: Success + channel_resource_reclaim: + post: + operationId: reclaimChannel + summary: Reclaim unspent funds in Channel + description: This endpoint is used by the creator (payer) of a Channel to reclaim unspent funds when a Channel has timed out (the chain height has exceeded the eol of the Channel). It can only successfully be called by the Channel's payer on a timed out Channel. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to reclaim + required: true + schema: + type: string + responses: + 200: + description: Success + channel_resource_redeem: + post: + operationId: redeemVoucher + summary: Redeem Voucher + description: This endpoint accepts a voucher from the Channel target and redeems it. Upon checking the validity and successfully checking the voucher's condition the specified funds will be transfered from the channel to the target. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: + type: string + requestBody: + content: + applications/json: + schema: + $ref: '#/models/Voucher' + responses: + 200: + description: Success + channel_resource_vouchers: + post: + operationId: createVoucher + summary: Creates Voucher + description: This endpoint accepts voucher details and returns a new signed voucher suitable for off chain transmission to the Channel target for later redemption. Only the Channel payer (creator) can call this endpoint successfully. + tags: + - Channels + parameters: + - name: channelId + in: path + description: ID of the Channel to fetch + required: true + schema: + type: string + requestBody: + content: + applications/json: + schema: + $ref: '#/models/Voucher' + responses: + 200: + description: Success \ No newline at end of file diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 6d629e6..5b4d07d 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -99,6 +99,8 @@ components: $ref: 'chain.yml#/models/Block' BlockHeader: $ref: 'chain.yml#/models/BlockHeader' + Channel: + $ref: 'channels.yml#/models/Channel' ExecutedMessage: $ref: 'chain.yml#/models/ExecutedMessage' Message: @@ -106,85 +108,7 @@ components: Tipset: $ref: 'chain.yml#/models/Tipset' Voucher: - type: object - properties: - kind: - type: string - readOnly: true - enum: [voucher] - channelId: - type: string - description: The ID of the payment Channel this Voucher is redeemable against. - readOnly: true - example: TODO - payer: - type: string - description: The Actor ID (address) of the creator of the payment channel for this voucher. - readOnly: true - example: TODO - target: - type: string - description: The Actor ID (address) of the recipient of the funds in this voucher. - readOnly: true - example: TODO - amount: - type: number - description: The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed. - example: 0.19296864 - validAt: - type: number - description: The block height on or after which this Voucher can be redeemed. - example: 2120399 - condition: - type: object - description: The condition that must evaluate to true for this Voucher to be redeemed. - example: TODO - signature: - type: string - description: The signature over all the data in this Voucher - example: TODO - Channel: - type: object - properties: - id: - type: string - description: The ID of this Channel - readOnly: true - kind: - type: string - readOnly: true - enum: [channel] - targetActorId: - type: string - description: The address of the account to which funds will be transferred by this Channel upon successful redemption of vouchers - example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy - amount: - type: number - description: The total amount of FIL that is in this Channel and payable to the target - example: 0.19296864 - amountRedeemed: - type: number - readOnly: true - description: The total amount of FIL that has already been transfered to the target. This value cannot ever exceed amount. - example: 0 - agreedEol: - type: number - description: The original chain height at which this Channel will expire. Specified upon creation and optionally extended by the creator of the channel. - example: 2120399 - actualEol: - type: number - readOnly: true - description: The actual expiration for the payment Channel which can differ from agreedEol when the payment channel is in dispute - condition: - type: object - readOnly: true - description: The condition specified in the most recent payment voucher for which a redemption attempt was made. - example: TODO - redeemed: - type: boolean - readOnly: true - description: A flag indicated whether or not Redeem has been called on the payment Channel yet. This is necessary because AmountRedeemed can still be zero in the event of a zero-value voucher - example: true + $ref: 'channels.yml#/models/Voucher' Deal: type: object properties: @@ -566,192 +490,17 @@ paths: type: array items: $ref: '#/components/schemas/Deal' - /actors/channels: - get: - operationId: listChannels - summary: List Channels - description: List all payment channels known to this node - tags: - - Channels - parameters: - - name: nextPageToken - in: query - description: Next page token - required: false - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Channel' - post: - operationId: createChannel - summary: Create new payment Channel - description: This endpoint creates a new payment Channel with the specified characteristics - tags: - - Channels - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Channel' - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Channel' - /actors/channels/{channelId}: # Right now it's not possible to look up Channels by ID alone, only by Payee/ID, channel ID could just be a concatenation - get: - operationId: getChannelById - summary: Find Channel by ID - description: Find a payment Channel by ID and return it - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to fetch - required: true - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Channel' - patch: - operationId: extendChannelById - summary: Extend duration of Channel - description: This endpoint extends the duration of an existing payment Channel, increasing the block height at which the Channel will timeout. Only the payer (creator) or the channel can successfully call this endpoint. - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to fetch - required: true - schema: - type: string - requestBody: - content: - applications/json: - schema: - type: object - properties: - agreedEol: - type: number - description: The new chain (increased) height at which this channel will expire. - example: 2120399 - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Channel' - /actors/channels/{channelId}/close: - post: - operationId: closeChannel - summary: Close Channel - description: This endpoint closes the specified payment Channel and returns all unredeemed funds to the payee (the Channel's creator). Upon completion this Channel is effectively deleted and can never be used again. This method can only be called by target of the Channel with a valid voucher - any other invocation is an error. - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to fetch - required: true - schema: - type: string - responses: - 200: - description: Success - /actors/channels/{channelId}/cancel: - post: - operationId: cancelChannel - summary: Schedule Channel for cancellation - description: This endpoint reduces the actual eol (effective end date) of the Channel in an attempt to free up the funds in the channel for earlier reclaming. This endpoint can only successfullly be called by the Channel's payer as the cancel message needs to originate from that account. Cancel doesn't immediately close a channel but instead reduces the lifetime of the channel leaving a grace period during which the payee can undo the cancellation by submitting a valid voucher, thereby proving that the channel is still in use. - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to cancel - required: true - schema: - type: string - responses: - 200: - description: Success - /actors/channels/{channelId}/reclaim: - post: - operationId: reclaimChannel - summary: Reclaim unspent funds in Channel - description: This endpoint is used by the creator (payer) of a Channel to reclaim unspent funds when a Channel has timed out (the chain height has exceeded the eol of the Channel). It can only successfully be called by the Channel's payer on a timed out Channel. - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to reclaim - required: true - schema: - type: string - responses: - 200: - description: Success + /channels: + $ref: 'channels.yml#/endpoints/channels_collection' + /channels/{channelId}: # Right now it's not possible to look up Channels by ID alone, only by Payee/ID, channel ID could just be a concatenation + $ref: 'channels.yml#/endpoints/channel_resource' + /channels/{channelId}/close: + $ref: 'channels.yml#/endpoints/channel_resource_close' + /channels/{channelId}/cancel: + $ref: 'channels.yml#/endpoints/channel_resource_cancel' + /channels/{channelId}/reclaim: + $ref: 'channels.yml#/endpoints/channel_resource_reclaim' /actors/channels/{channelId}/redeem: - post: - operationId: redeemVoucher - summary: Redeem Voucher - description: This endpoint accepts a voucher from the Channel target and redeems it. Upon checking the validity and successfully checking the voucher's condition the specified funds will be transfered from the channel to the target. - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to fetch - required: true - schema: - type: string - requestBody: - content: - applications/json: - schema: - $ref: '#/components/schemas/Voucher' - responses: - 200: - description: Success + $ref: 'channels.yml#/endpoints/channel_resource_redeem' /actors/channels/{channelId}/vouchers: - post: - operationId: createVoucher - summary: Creates Voucher - description: This endpoint accepts voucher details and returns a new signed voucher suitable for off chain transmission to the Channel target for later redemption. Only the Channel payer (creator) can call this endpoint successfully. - tags: - - Channels - parameters: - - name: channelId - in: path - description: ID of the Channel to fetch - required: true - schema: - type: string - requestBody: - content: - applications/json: - schema: - $ref: '#/components/schemas/Voucher' - responses: - 200: - description: Success + $ref: 'channels.yml#/endpoints/channel_resource_vouchers' From 51f2bea318a71a971a1ffae25e2c1d930199f8c2 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Mon, 16 Sep 2019 13:36:32 -0700 Subject: [PATCH 27/50] Move market resource/endpoints to market.yml --- filecoin-rest-api.yml | 246 +++--------------------------------------- market.yml | 226 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 242 insertions(+), 230 deletions(-) create mode 100644 market.yml diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 5b4d07d..3b7ae56 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -94,13 +94,17 @@ servers: components: schemas: Actor: - $ref: 'actors.yml#/models/Actor' + $ref: 'actors.yml#/models/Actor' + Ask: + $ref: 'market.yml#/models/Ask' Block: $ref: 'chain.yml#/models/Block' BlockHeader: $ref: 'chain.yml#/models/BlockHeader' Channel: $ref: 'channels.yml#/models/Channel' + Deal: + $ref: 'market.yml#/models/Deal' ExecutedMessage: $ref: 'chain.yml#/models/ExecutedMessage' Message: @@ -109,90 +113,6 @@ components: $ref: 'chain.yml#/models/Tipset' Voucher: $ref: 'channels.yml#/models/Voucher' - Deal: - type: object - properties: - id: - type: string - description: The ID of this Deal - readOnly: true - kind: - type: string - readOnly: true - enum: [deal] - minerActorId: - type: string - description: The ID of the storage miner that is fulfilling this Deal - example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq - clientActorId: - type: string - readOnly: true - description: The ID of the client initiating the storage Deal (will typically be the owner of the current node) - example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy - pieceId: - type: string - description: The ID of the Picee being stored - example: QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY - size: - type: number - readOnly: true - description: Size of the Piece being stored in bytes - example: 67003 - askId: - type: string - writeOnly: true - description: The ID of the Ask from the target miner for which this Deal is to be proposed - example: 0 - totalPrice: - type: number - readOnly: true - description: The total price in FIL that will be paid for the entire storage operation - example: 0.19296864 - duration: - type: number - description: The duration of this storage Deal in blocks - example: 288000 - status: - type: string - description: The current status of the Deal - enum: [unknown,rejected,accepted,started,failed,staged,sealing,complete] - example: complete - paymentInfo: - type: object - readOnly: true - properties: - payerClientActorId: - type: string - description: The address of the owner of the payment Channel - channelId: - type: string - description: The ID of the payment Channel the client will use to pay the miner. It must already exist and have sufficient funds locked up in order to create a storage deal. - channelMessageId: - type: string - description: The ID of the Message used to create the Channel (so the miner can wait for it). - Ask: - type: object - properties: - id: - type: string - description: The ID of this Ask - readOnly: true - kind: - type: string - enum: [ask] - minerId: - type: string - readOnly: true - description: The ID of the miner that published this Ask - example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq - price: - type: number - description: The price in FIL per byte per blocktime - example: 0.00000000001 - expiry: - type: number - description: The block height at which this ask expires - example: 392265 PieceMetadata: type: object properties: @@ -349,147 +269,11 @@ paths: schema: type: string format: binary - description: The raw bytes of the originally imported data. - /market/asks: - get: - operationId: listAsks - summary: Lists all Asks in the market - description: This endpoint returns all Asks known to the current node ordered lexically by the Ask ID - tags: - - Asks - parameters: - - name: minerId - in: query - description: Filter returned asks by minerId. Only Asks from this miner will be returned. - required: false - example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq - schema: - type: string - - name: active - in: query - description: Filter returned asks to include only those that are still active, meaning the current node's tipset height doesn't exceed that of the Ask's specified expiration. - required: false - example: true - schema: - type: boolean - - name: nextPageToken - in: query - description: Next page token - required: false - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Ask' - post: - operationId: createAsk - summary: Order this mining node to publish a new Ask on the network - description: This method creates a new storage market ask and publishes it for storage buyers to find and act on. - tags: - - Asks - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Ask' - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Ask' - /market/asks/{askId}: - get: - operationId: getAskById - summary: Fetch Ask data - description: Fetch data about an Ask by the Ask ID. - tags: - - Asks - parameters: - - name: askId - in: path - description: ID of the Ask to fetch. - required: true - schema: - type: string - responses: - 200: - description: If the request succeeds, the server returns the requested Ask. - content: - application/json: - schema: - $ref: '#/components/schemas/Ask' - /market/deals: - get: - operationId: getDeals - summary: Fetch Deal information known to this node - description: This endpoint returns a list of all deals known to the current node. - tags: - - Deals - parameters: - - name: minerId - in: query - description: Filter returned Deals by minerId. Only Deals made with (or proposed to) the specified miner will be returned. - required: false - example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq - schema: - type: string - - name: clientId - in: query - description: Filter returned Deals by clientId. Only Deals initiated by the specified client will be returned. - required: false - example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy - schema: - type: string - - name: pieceId - in: query - description: Filter returned Deals by pieceId. Only Deals made to store the specified pieceId will be returned. - required: false - example: QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY - schema: - type: string - - name: nextPageToken - in: query - description: Next page token - required: false - schema: - type: string - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Deal' - post: - operationId: createDeal - summary: Initiate a storage deal - description: This endpoint initiates a storage deal with a storage miner. It will create an appropriate payment Channel and vouchers, and pass the deal to the target storage miner to await acceptance or rejection. - tags: - - Deals - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Deal' - responses: - 200: - description: Success - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Deal' + description: The raw bytes of the originally imported data. + /actors/channels/{channelId}/redeem: + $ref: 'channels.yml#/endpoints/channel_resource_redeem' + /actors/channels/{channelId}/vouchers: + $ref: 'channels.yml#/endpoints/channel_resource_vouchers' /channels: $ref: 'channels.yml#/endpoints/channels_collection' /channels/{channelId}: # Right now it's not possible to look up Channels by ID alone, only by Payee/ID, channel ID could just be a concatenation @@ -500,7 +284,9 @@ paths: $ref: 'channels.yml#/endpoints/channel_resource_cancel' /channels/{channelId}/reclaim: $ref: 'channels.yml#/endpoints/channel_resource_reclaim' - /actors/channels/{channelId}/redeem: - $ref: 'channels.yml#/endpoints/channel_resource_redeem' - /actors/channels/{channelId}/vouchers: - $ref: 'channels.yml#/endpoints/channel_resource_vouchers' + /market/asks: + $ref: 'market.yml#/endpoints/asks_collection' + /market/asks/{askId}: + $ref: 'market.yml#/endpoints/ask_resource' + /market/deals: + $ref: 'market.yml#/endpoints/deals_collection' diff --git a/market.yml b/market.yml new file mode 100644 index 0000000..7d5dee5 --- /dev/null +++ b/market.yml @@ -0,0 +1,226 @@ +models: + Ask: + type: object + properties: + id: + type: string + description: The ID of this Ask + readOnly: true + kind: + type: string + enum: [ask] + minerId: + type: string + readOnly: true + description: The ID of the miner that published this Ask + example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq + price: + type: number + description: The price in FIL per byte per blocktime + example: 0.00000000001 + expiry: + type: number + description: The block height at which this ask expires + example: 392265 + Deal: + type: object + properties: + id: + type: string + description: The ID of this Deal + readOnly: true + kind: + type: string + readOnly: true + enum: [deal] + minerActorId: + type: string + description: The ID of the storage miner that is fulfilling this Deal + example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq + clientActorId: + type: string + readOnly: true + description: The ID of the client initiating the storage Deal (will typically be the owner of the current node) + example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy + pieceId: + type: string + description: The ID of the Picee being stored + example: QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY + size: + type: number + readOnly: true + description: Size of the Piece being stored in bytes + example: 67003 + askId: + type: string + writeOnly: true + description: The ID of the Ask from the target miner for which this Deal is to be proposed + example: 0 + totalPrice: + type: number + readOnly: true + description: The total price in FIL that will be paid for the entire storage operation + example: 0.19296864 + duration: + type: number + description: The duration of this storage Deal in blocks + example: 288000 + status: + type: string + description: The current status of the Deal + enum: [unknown,rejected,accepted,started,failed,staged,sealing,complete] + example: complete + paymentInfo: + type: object + readOnly: true + properties: + payerClientActorId: + type: string + description: The address of the owner of the payment Channel + channelId: + type: string + description: The ID of the payment Channel the client will use to pay the miner. It must already exist and have sufficient funds locked up in order to create a storage deal. + channelMessageId: + type: string + description: The ID of the Message used to create the Channel (so the miner can wait for it). +endpoints: + asks_collection: + get: + operationId: listAsks + summary: Lists all Asks in the market + description: This endpoint returns all Asks known to the current node ordered lexically by the Ask ID + tags: + - Asks + parameters: + - name: minerId + in: query + description: Filter returned asks by minerId. Only Asks from this miner will be returned. + required: false + example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq + schema: + type: string + - name: active + in: query + description: Filter returned asks to include only those that are still active, meaning the current node's tipset height doesn't exceed that of the Ask's specified expiration. + required: false + example: true + schema: + type: boolean + - name: nextPageToken + in: query + description: Next page token + required: false + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/models/Ask' + post: + operationId: createAsk + summary: Order this mining node to publish a new Ask on the network + description: This method creates a new storage market ask and publishes it for storage buyers to find and act on. + tags: + - Asks + requestBody: + content: + application/json: + schema: + $ref: '#/models/Ask' + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/models/Ask' + ask_resource: + get: + operationId: getAskById + summary: Fetch Ask data + description: Fetch data about an Ask by the Ask ID. + tags: + - Asks + parameters: + - name: askId + in: path + description: ID of the Ask to fetch. + required: true + schema: + type: string + responses: + 200: + description: If the request succeeds, the server returns the requested Ask. + content: + application/json: + schema: + $ref: '#/models/Ask' + deals_collection: + get: + operationId: getDeals + summary: Fetch Deal information known to this node + description: This endpoint returns a list of all deals known to the current node. + tags: + - Deals + parameters: + - name: minerId + in: query + description: Filter returned Deals by minerId. Only Deals made with (or proposed to) the specified miner will be returned. + required: false + example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq + schema: + type: string + - name: clientId + in: query + description: Filter returned Deals by clientId. Only Deals initiated by the specified client will be returned. + required: false + example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy + schema: + type: string + - name: pieceId + in: query + description: Filter returned Deals by pieceId. Only Deals made to store the specified pieceId will be returned. + required: false + example: QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY + schema: + type: string + - name: nextPageToken + in: query + description: Next page token + required: false + schema: + type: string + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/models/Deal' + post: + operationId: createDeal + summary: Initiate a storage deal + description: This endpoint initiates a storage deal with a storage miner. It will create an appropriate payment Channel and vouchers, and pass the deal to the target storage miner to await acceptance or rejection. + tags: + - Deals + requestBody: + content: + application/json: + schema: + $ref: '#/models/Deal' + responses: + 200: + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/models/Deal' \ No newline at end of file From 346a696e8ab10545b942adbe89842aab982e3fa0 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Mon, 16 Sep 2019 13:49:58 -0700 Subject: [PATCH 28/50] Move control resource/endpoints to control.yml --- control.yml | 135 +++++++++++++++++++++++++++++++++++++++ filecoin-rest-api.yml | 142 ++++-------------------------------------- 2 files changed, 147 insertions(+), 130 deletions(-) create mode 100644 control.yml diff --git a/control.yml b/control.yml new file mode 100644 index 0000000..09a8d83 --- /dev/null +++ b/control.yml @@ -0,0 +1,135 @@ +models: + PieceMetadata: + type: object + properties: + id: + type: string + example: QmQXJPWYEnt9GoYu5SXkrKMWovCX78YBjFzRSJF63Zobnj + readOnly: true + PeerAddresses: + type: array + description: List of peer (network) addresses + items: + type: string + example: /ip4/127.0.0.1/tcp/6000/ipfs/QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq + Node: + type: object + properties: + kind: + type: string + enum: [node] + readOnly: true + id: + type: string + example: QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq + addresses: + $ref: '#/models/PeerAddresses' + version: + type: string + example: "1.0.2" + commit: + type: string + example: "93540266a2a9972e91947a538ce70dc9c4e8077e" + protocol: + type: object + properties: + autoSealInterval: + type: number + description: Auto-Seal Interval in Seconds + sectorSizes: + type: array + description: Supoorted sector sizes in bytes + items: + type: number + bitswapStats: + type: object + properties: + blocksReceived: + type: number + blocksSent: + type: number + dataReceived: + type: number + dataSent: + type: number + dupBlksReceived: + type: number + dupDataReceived: + type: number + messagesReceived: + type: number + provideBufLen: + type: number + peers: + type: array + description: Filecoin Addresses of currently connected peers + items: + type: string + example: 'QmUA8TXLxsfuifpyHPxGfwWgXSCr6omqb6bdQy2KwWQCBz' + wantlist: + type: array + description: CIDs of currently desired content blocks + items: + type: string + example: 'QmQXJPWYEnt9GoYu5SXkrKMWovCX78YBjFzRSJF63Zobnj' + config: + type: object + description: Full JSON representation of the node's current configuration +endpoints: + node_resource: + get: + operationId: getNode + summary: Return Node information + description: Get information about the current Filecoin Node. + tags: + - Node + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/models/Node' + pieces_collection: + post: + operationId: createPiece + summary: Add a Piece to local storage + description: This method imports data into the local node's temporary storage so that it can be transferred to a storage miner. + tags: + - Pieces + requestBody: + content: + application/octet-stream: + schema: + type: string + format: binary + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/models/PieceMetadata' + piece_resource: + get: + operationId: getPieceById + summary: Fetch piece data + description: Fetch piece data from the local node's temporary storage. + tags: + - Pieces + parameters: + - name: pieceId + in: path + description: ID of the piece previously returned by corresponding createPiece POST method. + required: true + schema: + type: string + responses: + 200: + description: If the request succeeds, the server returns the original data used to create the piece. + content: + application/octet-stream: + schema: + type: string + format: binary + description: The raw bytes of the originally imported data. \ No newline at end of file diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 3b7ae56..7d22e41 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -59,6 +59,8 @@ x-tagGroups: - name: Actor Endpoints tags: - Actors + - name: Channel Endpoints + tags: - Channels - name: Node Control Endpoints tags: @@ -109,93 +111,24 @@ components: $ref: 'chain.yml#/models/ExecutedMessage' Message: $ref: 'chain.yml#/models/Message' + Node: + $ref: 'control.yml#/models/Node' + PeerAddresses: + $ref: 'control.yml#/models/PieceMetadata' + PieceMetadata: + $ref: 'control.yml#/models/PieceMetadata' Tipset: $ref: 'chain.yml#/models/Tipset' Voucher: $ref: 'channels.yml#/models/Voucher' - PieceMetadata: - type: object - properties: - id: - type: string - example: QmQXJPWYEnt9GoYu5SXkrKMWovCX78YBjFzRSJF63Zobnj - readOnly: true Sector: +# $ref: 'control.yml#/models/Sector' type: object properties: id: type: string commR: type: string - PeerAddresses: - type: array - description: List of peer (network) addresses - items: - type: string - example: /ip4/127.0.0.1/tcp/6000/ipfs/QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq - Node: - type: object - properties: - kind: - type: string - enum: [node] - readOnly: true - id: - type: string - example: QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq - addresses: - $ref: '#/components/schemas/PeerAddresses' - version: - type: string - example: "1.0.2" - commit: - type: string - example: "93540266a2a9972e91947a538ce70dc9c4e8077e" - protocol: - type: object - properties: - autoSealInterval: - type: number - description: Auto-Seal Interval in Seconds - sectorSizes: - type: array - description: Supoorted sector sizes in bytes - items: - type: number - bitswapStats: - type: object - properties: - blocksReceived: - type: number - blocksSent: - type: number - dataReceived: - type: number - dataSent: - type: number - dupBlksReceived: - type: number - dupDataReceived: - type: number - messagesReceived: - type: number - ProvideBufLen: - type: number - peers: - type: array - description: Filecoin Addresses of currently connected peers - items: - type: string - example: 'QmUA8TXLxsfuifpyHPxGfwWgXSCr6omqb6bdQy2KwWQCBz' - wantlist: - type: array - description: CIDs of currently desired content blocks - items: - type: string - example: 'QmQXJPWYEnt9GoYu5SXkrKMWovCX78YBjFzRSJF63Zobnj' - config: - type: object - description: Full JSON representation of the node's current configuration paths: /actors: $ref: './actors.yml#/endpoints/actors_collection' @@ -214,62 +147,11 @@ paths: /chain/executed-messages/{executedMessageId}: $ref: './chain.yml#/endpoints/executed_message_resource' /control/node: - get: - operationId: getNode - summary: Return Node information - description: Get information about the current Filecoin Node. - tags: - - Node - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/Node' + $ref: './control.yml#/endpoints/node_resource' /control/pieces: - post: - operationId: createPiece - summary: Add a Piece to local storage - description: This method imports data into the local node's temporary storage so that it can be transferred to a storage miner. - tags: - - Pieces - requestBody: - content: - application/octet-stream: - schema: - type: string - format: binary - responses: - 200: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/PieceMetadata' + $ref: './control.yml#/endpoints/pieces_collection' /control/pieces/{pieceId}: - get: - operationId: getPieceById - summary: Fetch piece data - description: Fetch piece data from the local node's temporary storage. - tags: - - Pieces - parameters: - - name: pieceId - in: path - description: ID of the piece previously returned by corresponding createPiece POST method. - required: true - schema: - type: string - responses: - 200: - description: If the request succeeds, the server returns the original data used to create the piece. - content: - application/octet-stream: - schema: - type: string - format: binary - description: The raw bytes of the originally imported data. + $ref: './control.yml#/endpoints/piece_resource' /actors/channels/{channelId}/redeem: $ref: 'channels.yml#/endpoints/channel_resource_redeem' /actors/channels/{channelId}/vouchers: From 97104809a6ec1f78b11e096b428979ea97b0c41e Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Mon, 16 Sep 2019 13:54:35 -0700 Subject: [PATCH 29/50] Moved Sector model to actors.yml --- actors.yml | 13 ++++++++++--- filecoin-rest-api.yml | 8 +------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/actors.yml b/actors.yml index af66fea..7c224f1 100644 --- a/actors.yml +++ b/actors.yml @@ -62,11 +62,11 @@ models: sectors: type: array items: - $ref: 'filecoin-rest-api.yml#/components/schemas/Sector' + $ref: 'actors.yml#/models/Sector' provingSet: type: array items: - $ref: 'filecoin-rest-api.yml#/components/schemas/Sector' + $ref: 'actors.yml#/models/Sector' currentFaultSet: type: string nextFaultSet: @@ -80,7 +80,7 @@ models: slashedSet: type: array items: - $ref: 'filecoin-rest-api.yml#/components/schemas/Sector' + $ref: 'actors.yml#/models/Sector' slashedAt: type: number ownedStorageCollateral: @@ -89,6 +89,13 @@ models: type: number PaymentBrokerActorState: $ref: '#/models/EmptyActorState' + Sector: + type: object + properties: + id: + type: string + commR: + type: string StorageMarketActorState: type: object properties: diff --git a/filecoin-rest-api.yml b/filecoin-rest-api.yml index 7d22e41..3840b1c 100644 --- a/filecoin-rest-api.yml +++ b/filecoin-rest-api.yml @@ -122,13 +122,7 @@ components: Voucher: $ref: 'channels.yml#/models/Voucher' Sector: -# $ref: 'control.yml#/models/Sector' - type: object - properties: - id: - type: string - commR: - type: string + $ref: 'actors.yml#/models/Sector' paths: /actors: $ref: './actors.yml#/endpoints/actors_collection' From 6e96db997f4b14c2636c8830b41317bc5f42bfa9 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Mon, 16 Sep 2019 13:55:06 -0700 Subject: [PATCH 30/50] Renamed filecoin-rest-api.yml -> api.yml --- filecoin-rest-api.yml => api.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename filecoin-rest-api.yml => api.yml (100%) diff --git a/filecoin-rest-api.yml b/api.yml similarity index 100% rename from filecoin-rest-api.yml rename to api.yml From a8a5064b65409e265b1b592e406c899f1739db52 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Mon, 16 Sep 2019 13:55:56 -0700 Subject: [PATCH 31/50] Fix serve command --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1368cd8..cec709c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "Filecoin JSON REST API OpenAPI Specification", "version": "0.1.0", "scripts": { - "serve": "redoc-cli serve ./filecoin-rest-api.yml -p 5000 -w" + "serve": "redoc-cli serve ./api.yml -p 5000 -w" }, "dependencies": { "redoc": "^2.0.0-rc.14", From 52e91f11ba19fd648fd6a02fbd1dd03c0dee8c52 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Wed, 18 Sep 2019 10:31:20 -0700 Subject: [PATCH 32/50] Added basic security definition --- api.yml | 10 ++++++++++ chain.yml | 14 +++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/api.yml b/api.yml index 3840b1c..a6f6496 100644 --- a/api.yml +++ b/api.yml @@ -93,7 +93,17 @@ info: email: erik.ingenito@protocol.ai servers: - url: http://127.0.0.1:3453/api/chain/v0 +security: + - bearerToken: [] components: + securitySchemes: + bearerToken : + type: http + scheme: bearer + bearerFormat: Token + responses: + UnauthorizedError: + description: Access token is missing or invalid schemas: Actor: $ref: 'actors.yml#/models/Actor' diff --git a/chain.yml b/chain.yml index eb3d7b4..dcadf85 100644 --- a/chain.yml +++ b/chain.yml @@ -140,6 +140,8 @@ endpoints: application/json: schema: $ref: '#/models/Block' + 401: + $ref: 'api.yml#/components/responses/UnauthorizedError' executed_message_resource: get: operationId: getExecutedMessageById @@ -161,6 +163,8 @@ endpoints: application/json: schema: $ref: '#/models/ExecutedMessage' + 401: + $ref: 'api.yml#/components/responses/UnauthorizedError' message_resource: get: operationId: getMessageById @@ -182,6 +186,8 @@ endpoints: application/json: schema: $ref: '#/models/Message' + 401: + $ref: 'api.yml#/components/responses/UnauthorizedError' messages_collection: post: operationId: createMessage @@ -201,6 +207,8 @@ endpoints: application/json: schema: $ref: '#/models/Message' + 401: + $ref: 'api.yml#/components/responses/UnauthorizedError' tipset_resource: get: operationId: getTipsetById @@ -222,6 +230,8 @@ endpoints: application/json: schema: $ref: '#/models/Tipset' + 401: + $ref: 'api.yml#/components/responses/UnauthorizedError' tipsets_collection: get: operationId: listTipsets @@ -244,4 +254,6 @@ endpoints: schema: type: array items: - $ref: '#/models/Tipset' \ No newline at end of file + $ref: '#/models/Tipset' + 401: + $ref: 'api.yml#/components/responses/UnauthorizedError' \ No newline at end of file From 3e95f6ef48782b012e9b5446e7f317f867b6eac3 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Wed, 18 Sep 2019 10:31:38 -0700 Subject: [PATCH 33/50] Improved description of Block/Header --- api.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api.yml b/api.yml index a6f6496..5ae544b 100644 --- a/api.yml +++ b/api.yml @@ -13,10 +13,12 @@ tags: - name: BlockHeaderModel x-displayName: BlockHeader description: | + A BlockHeader contains information relating to a Block. In the Filecoin specification there is no difference between a BlockHeader and a Block, but for the purposees of this API a Block wraps a BlockHeader and additionally contains the full contents of all messages included in that Block. - name: BlockModel x-displayName: Block description: | + A Block contains information relevant to a particular point in time over which the network may achieve consensus. Blocks are mined as part of the consensus mechanism by elected miners and then included in a Tipset. - name: Blocks - name: ChannelModel From 5af9a39182877ab108d509ae6adca858d95fa54e Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Wed, 18 Sep 2019 10:32:07 -0700 Subject: [PATCH 34/50] Improved description of properties in Chain models --- chain.yml | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/chain.yml b/chain.yml index dcadf85..406e414 100644 --- a/chain.yml +++ b/chain.yml @@ -8,6 +8,8 @@ models: readOnly: true id: type: string + description: The CID ([Content Identifier](https://github.com/ipld/cid)) of the Block + example: bafy2bzaceahv3kv4yllfdfrvtsr6rn5g5277dmxhx4tu4uvhvg2udpuate3te header: $ref: '#/models/BlockHeader' executedMessages: @@ -23,32 +25,70 @@ models: readOnly: true id: type: string + description: The CID ([Content Identifier](https://github.com/ipld/cid)) of the Block + example: bafy2bzaceahv3kv4yllfdfrvtsr6rn5g5277dmxhx4tu4uvhvg2udpuate3te height: type: number + description: Height is the chain height of this block. + example: 200193 minerId: type: string - messageListId: + description: The address of the miner Actor that mined this block. + example: t2usk2yzfu23uq2wyuc3w6ov233nxyhkysju2suba + messagesCID: type: string - recieptListId: + description: The CID ([Content Identifier](https://github.com/ipld/cid)) of the of bls and secpk signed trees of Messages included in this Block. + example: bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a + recieptsCID: type: string + description: The CID ([Content Identifier](https://github.com/ipld/cid)) of the of tree containing receipts for the messages included in this block. Receipts are the return values and errors codes resulting from messages. + example: bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a tickets: type: array items: - type: string + type: object + description: A Ticket is a marker of a tick of the blockchain's clock. It is the source of randomness for proofs of storage and leader election. It is generated by the miner of a block using a VRF and a VDF. + properties: + vrfProof: + type: string + description: A base64 encoded string representing the binary proof output of running a VRF on the VDFResult of the parent ticket. + example: QsIHRoYj... + vdfResult: + type: string + description: A base64 encoded string of data derived by running a VDF on vrfProof + example: cyBjbG9j... + vdfProof: + type: string + description: A base64 encoded string of the proof of delay during computation of vdfResult + example: nkgYSBwZ... electionProof: type: string + description: A base64 encoded byte array that represents the proof that the miner of this Block is a leader at this round. + example: V8896JC51ikqPVqYUCVbHzUfaOgjTBF6BYc8G/2P9CJMAg8MJzOi1j3F8hJSj/C6tKTLd9qHpLEjRpiGUzz04gE= parentTipsetId: type: string + description: The ID of the Tipset on which this block was based. In the spec this field is defined as an array of Block IDs, which is effectively equivalent to a Tipset ID in this API. + example: bafy2bzacebnsn4ywt2cgejgp32rgsv4vaylrqe32axw4cfadxhoutxxb7puzs parentWeight: type: number + description: parentWeight is the aggregate chain weight ([spec](https://github.com/filecoin-project/specs/blob/master/expected-consensus.md#chain-weighting)) of the parent Tipset. + example: 2001934 stateRoot: type: string + description: The CID ([Content Identifier](https://github.com/ipld/cid)) of the root of the tree containing Actor state after the application of all the messages mined int his Block. + example: bafyreih4xzehg7qudgdwve27pvmtblnc3ib5ql7haeouainjnavyo46eoy timestamp: type: number + description: The block Timestamp is used to enforce a form of block delay by honest miners. Unix time UTC timestamp (in seconds) stored as an unsigned integer. + example: 1568753711 blsAggregate: type: string - signature: + description: A base64 encoded representation of the aggregated BLS signature for all the messages in this block that were signed using BLS signatures + example: TODO + blockSig: type: string + description: A base64 encoded representation of the signature over the hash of this entire block with the miner's worker key to ensure that it is not tampered with after creation + example: TODO ExecutedMessage: type: object properties: @@ -59,17 +99,25 @@ models: id: type: string readOnly: true + description: The CID ([Content Identifier](https://github.com/ipld/cid)) of this ExecutedMessage + example: bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a blockId: type: string readOnly: true + description: The CID of the mined block that included this ExecutedMessage. + example: bafy2bzacebakx3c5g22seerja562tqb32bhecp4w2quj4mhvmovy4oqzbr2u4 message: $ref: 'chain.yml#/models/Message' exitCode: type: number readOnly: true + description: The exit value returned by the method this message was sent to. 0 is success, anything else is an error code in unix style. + example: 0 return: type: object readOnly: true + description: The base64 encoded return values, if any, from processing a message. This can be non-empty even in the case of error (e.g., to provide programmatically readable detail about errors). + example: 3AE= Message: type: object properties: From 66374713290b4d7412f1c16db4e0ef35bcb77a0a Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Wed, 18 Sep 2019 10:32:47 -0700 Subject: [PATCH 35/50] Improved descriptions of Market model properties. --- market.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/market.yml b/market.yml index 7d5dee5..375e412 100644 --- a/market.yml +++ b/market.yml @@ -4,7 +4,7 @@ models: properties: id: type: string - description: The ID of this Ask + description: The ID of this Ask. readOnly: true kind: type: string @@ -12,15 +12,15 @@ models: minerId: type: string readOnly: true - description: The ID of the miner that published this Ask + description: The ID (address) of the miner Actor that published this Ask. example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq price: type: number - description: The price in FIL per byte per blocktime + description: The price in FIL per byte per blocktime being proposed in this Ask. example: 0.00000000001 expiry: type: number - description: The block height at which this ask expires + description: The block height at which this Ask expires. example: 392265 Deal: type: object From e67c59ffc32f8a314ffaf9b8b0fc3fe32be5184b Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Wed, 18 Sep 2019 12:05:18 -0700 Subject: [PATCH 36/50] Create static html version of documentation --- actors.yml => api/actors.yml | 0 api.yml => api/api.yml | 0 chain.yml => api/chain.yml | 0 channels.yml => api/channels.yml | 0 control.yml => api/control.yml | 0 market.yml => api/market.yml | 0 html/filecoin-http-api.html | 481 +++++++++++++++++++++++++++++++ package.json | 4 +- 8 files changed, 484 insertions(+), 1 deletion(-) rename actors.yml => api/actors.yml (100%) rename api.yml => api/api.yml (100%) rename chain.yml => api/chain.yml (100%) rename channels.yml => api/channels.yml (100%) rename control.yml => api/control.yml (100%) rename market.yml => api/market.yml (100%) create mode 100644 html/filecoin-http-api.html diff --git a/actors.yml b/api/actors.yml similarity index 100% rename from actors.yml rename to api/actors.yml diff --git a/api.yml b/api/api.yml similarity index 100% rename from api.yml rename to api/api.yml diff --git a/chain.yml b/api/chain.yml similarity index 100% rename from chain.yml rename to api/chain.yml diff --git a/channels.yml b/api/channels.yml similarity index 100% rename from channels.yml rename to api/channels.yml diff --git a/control.yml b/api/control.yml similarity index 100% rename from control.yml rename to api/control.yml diff --git a/market.yml b/api/market.yml similarity index 100% rename from market.yml rename to api/market.yml diff --git a/html/filecoin-http-api.html b/html/filecoin-http-api.html new file mode 100644 index 0000000..4a24461 --- /dev/null +++ b/html/filecoin-http-api.html @@ -0,0 +1,481 @@ + + + + + + Filecoin REST API + + + + + + + + + +

Filecoin JSON REST API (0.1.0)

Download OpenAPI specification:Download

Filecoin JSON REST API SPEC: erik.ingenito@protocol.ai

Filecoin JSON REST API Description

+

Authentication

bearerToken

Security scheme type: HTTP
HTTP Authorization Scheme bearer
Bearer format "Token"

Tipsets

List Tipsets

List Tipsets currently known to this node in reverse height order

+
Authorizations:
query Parameters
nextPageToken
string

Next page token

+

Responses

200

Success

+
401

Access token is missing or invalid

+
get /chain/tipsets
http://127.0.0.1:3453/api/chain/v0/chain/tipsets

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Fetch a Tipset by ID

Return information about the Tipset with the specified ID

+
Authorizations:
path Parameters
tipsetId
required
string

ID of the Tipset to fetch

+

Responses

200

Success

+
401

Access token is missing or invalid

+
get /chain/tipsets/{tipsetId}
http://127.0.0.1:3453/api/chain/v0/chain/tipsets/{tipsetId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "tipset",
  • "id": "zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ",
  • "height": 0,
  • "blocks":
    [
    ]
}

Blocks

Find block by ID

Return information about the Block with the specified ID

+
Authorizations:
path Parameters
blockId
required
string

ID of the Block to fetch

+

Responses

200

Success

+
401

Access token is missing or invalid

+
get /chain/blocks/{blockId}
http://127.0.0.1:3453/api/chain/v0/chain/blocks/{blockId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "block",
  • "id": "bafy2bzaceahv3kv4yllfdfrvtsr6rn5g5277dmxhx4tu4uvhvg2udpuate3te",
  • "header":
    {
    },
  • "executedMessages":
    [
    ]
}

Messages

Send a Message

This method sends a new Message to an Actor recipient.

+
Authorizations:
Request Body schema: application/json
to
string
value
number
gasPrice
number
gasLimit
number
method
string
parameters
object

Responses

200

Success

+
401

Access token is missing or invalid

+
post /chain/messages
http://127.0.0.1:3453/api/chain/v0/chain/messages

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "to": "string",
  • "value": 0,
  • "gasPrice": 0,
  • "gasLimit": 0,
  • "method": "string",
  • "parameters": { }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "message",
  • "id": "string",
  • "nonce": 0,
  • "from": "string",
  • "to": "string",
  • "value": 0,
  • "gasPrice": 0,
  • "gasLimit": 0,
  • "method": "string",
  • "parameters": { },
  • "signature": "string"
}

Find ExecutedMessage by ID

Return information about the ExecutedMessage with the specified ID. An executed Message is one that has been included in a valid block in the chain. It includes return value and status information.

+
Authorizations:
path Parameters
executedMessageId
required
string

ID of the executed message to fetch

+

Responses

200

Success

+
401

Access token is missing or invalid

+
get /chain/executed-messages/{executedMessageId}
http://127.0.0.1:3453/api/chain/v0/chain/executed-messages/{executedMessageId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "executedMessage",
  • "id": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "blockId": "bafy2bzacebakx3c5g22seerja562tqb32bhecp4w2quj4mhvmovy4oqzbr2u4",
  • "message":
    {
    },
  • "exitCode": 0,
  • "return": "3AE="
}

Actors

List Actors

List Actors currently known to this node in ID order

+
Authorizations:
query Parameters
nextPageToken
string

Next page token

+

Responses

200

Success

+
get /actors
http://127.0.0.1:3453/api/chain/v0/actors

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Find Actor by ID

Return information about the Actor with the specified ID

+
Authorizations:
path Parameters
actorId
required
string

ID of the Actor to fetch

+

Responses

200

Success

+
get /actors/{actorId}
http://127.0.0.1:3453/api/chain/v0/actors/{actorId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "actor",
  • "id": "string",
  • "role": "init",
  • "nonce": 0,
  • "balance": 0,
  • "stateRoot": "string",
  • "info": { }
}

Channels

Redeem Voucher

This endpoint accepts a voucher from the Channel target and redeems it. Upon checking the validity and successfully checking the voucher's condition the specified funds will be transfered from the channel to the target.

+
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to fetch

+
Request Body schema: applications/json
amount
number

The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed.

+
validAt
number

The block height on or after which this Voucher can be redeemed.

+
condition
object

The condition that must evaluate to true for this Voucher to be redeemed.

+
signature
string

The signature over all the data in this Voucher

+

Responses

200

Success

+
post /actors/channels/{channelId}/redeem
http://127.0.0.1:3453/api/chain/v0/actors/channels/{channelId}/redeem

Request samples

Content type
applications/json
Copy
Expand all Collapse all
{
  • "amount": 0.19296864,
  • "validAt": 2120399,
  • "condition": "TODO",
  • "signature": "TODO"
}

Creates Voucher

This endpoint accepts voucher details and returns a new signed voucher suitable for off chain transmission to the Channel target for later redemption. Only the Channel payer (creator) can call this endpoint successfully.

+
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to fetch

+
Request Body schema: applications/json
amount
number

The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed.

+
validAt
number

The block height on or after which this Voucher can be redeemed.

+
condition
object

The condition that must evaluate to true for this Voucher to be redeemed.

+
signature
string

The signature over all the data in this Voucher

+

Responses

200

Success

+
post /actors/channels/{channelId}/vouchers
http://127.0.0.1:3453/api/chain/v0/actors/channels/{channelId}/vouchers

Request samples

Content type
applications/json
Copy
Expand all Collapse all
{
  • "amount": 0.19296864,
  • "validAt": 2120399,
  • "condition": "TODO",
  • "signature": "TODO"
}

List Channels

List all payment channels known to this node

+
Authorizations:
query Parameters
nextPageToken
string

Next page token

+

Responses

200

Success

+
get /channels
http://127.0.0.1:3453/api/chain/v0/channels

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Create new payment Channel

This endpoint creates a new payment Channel with the specified characteristics

+
Authorizations:
Request Body schema: application/json
targetActorId
string

The address of the account to which funds will be transferred by this Channel upon successful redemption of vouchers

+
amount
number

The total amount of FIL that is in this Channel and payable to the target

+
agreedEol
number

The original chain height at which this Channel will expire. Specified upon creation and optionally extended by the creator of the channel.

+

Responses

200

Success

+
post /channels
http://127.0.0.1:3453/api/chain/v0/channels

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "agreedEol": 2120399
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Find Channel by ID

Find a payment Channel by ID and return it

+
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to fetch

+

Responses

200

Success

+
get /channels/{channelId}
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "channel",
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "amountRedeemed": 0,
  • "agreedEol": 2120399,
  • "actualEol": 0,
  • "condition": "TODO",
  • "redeemed": true
}

Extend duration of Channel

This endpoint extends the duration of an existing payment Channel, increasing the block height at which the Channel will timeout. Only the payer (creator) or the channel can successfully call this endpoint.

+
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to fetch

+
Request Body schema: applications/json
agreedEol
number

The new chain (increased) height at which this channel will expire.

+

Responses

200

Success

+
patch /channels/{channelId}
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}

Request samples

Content type
applications/json
Copy
Expand all Collapse all
{
  • "agreedEol": 2120399
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "channel",
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "amountRedeemed": 0,
  • "agreedEol": 2120399,
  • "actualEol": 0,
  • "condition": "TODO",
  • "redeemed": true
}

Close Channel

This endpoint closes the specified payment Channel and returns all unredeemed funds to the payee (the Channel's creator). Upon completion this Channel is effectively deleted and can never be used again. This method can only be called by target of the Channel with a valid voucher - any other invocation is an error.

+
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to fetch

+

Responses

200

Success

+
post /channels/{channelId}/close
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}/close

Schedule Channel for cancellation

This endpoint reduces the actual eol (effective end date) of the Channel in an attempt to free up the funds in the channel for earlier reclaming. This endpoint can only successfullly be called by the Channel's payer as the cancel message needs to originate from that account. Cancel doesn't immediately close a channel but instead reduces the lifetime of the channel leaving a grace period during which the payee can undo the cancellation by submitting a valid voucher, thereby proving that the channel is still in use.

+
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to cancel

+

Responses

200

Success

+
post /channels/{channelId}/cancel
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}/cancel

Reclaim unspent funds in Channel

This endpoint is used by the creator (payer) of a Channel to reclaim unspent funds when a Channel has timed out (the chain height has exceeded the eol of the Channel). It can only successfully be called by the Channel's payer on a timed out Channel.

+
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to reclaim

+

Responses

200

Success

+
post /channels/{channelId}/reclaim
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}/reclaim

Node

Return Node information

Get information about the current Filecoin Node.

+
Authorizations:

Responses

200

Success

+
get /control/node
http://127.0.0.1:3453/api/chain/v0/control/node

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "node",
  • "id": "QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq",
  • "addresses":
    [
    ],
  • "version": "1.0.2",
  • "commit": "93540266a2a9972e91947a538ce70dc9c4e8077e",
  • "protocol":
    {
    },
  • "bitswapStats":
    {
    },
  • "config": { }
}

Pieces

Add a Piece to local storage

This method imports data into the local node's temporary storage so that it can be transferred to a storage miner.

+
Authorizations:
Request Body schema: application/octet-stream
string <binary>

Responses

200

Success

+
post /control/pieces
http://127.0.0.1:3453/api/chain/v0/control/pieces

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "QmQXJPWYEnt9GoYu5SXkrKMWovCX78YBjFzRSJF63Zobnj"
}

Fetch piece data

Fetch piece data from the local node's temporary storage.

+
Authorizations:
path Parameters
pieceId
required
string

ID of the piece previously returned by corresponding createPiece POST method.

+

Responses

200

If the request succeeds, the server returns the original data used to create the piece.

+
get /control/pieces/{pieceId}
http://127.0.0.1:3453/api/chain/v0/control/pieces/{pieceId}

Asks

Lists all Asks in the market

This endpoint returns all Asks known to the current node ordered lexically by the Ask ID

+
Authorizations:
query Parameters
minerId
string
Example: minerId=t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq

Filter returned asks by minerId. Only Asks from this miner will be returned.

+
active
boolean
Example: active=true

Filter returned asks to include only those that are still active, meaning the current node's tipset height doesn't exceed that of the Ask's specified expiration.

+
nextPageToken
string

Next page token

+

Responses

200

Success

+
get /market/asks
http://127.0.0.1:3453/api/chain/v0/market/asks

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Order this mining node to publish a new Ask on the network

This method creates a new storage market ask and publishes it for storage buyers to find and act on.

+
Authorizations:
Request Body schema: application/json
kind
string
Value: "ask"
price
number

The price in FIL per byte per blocktime being proposed in this Ask.

+
expiry
number

The block height at which this Ask expires.

+

Responses

200

Success

+
post /market/asks
http://127.0.0.1:3453/api/chain/v0/market/asks

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "ask",
  • "price": 1e-11,
  • "expiry": 392265
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "ask",
  • "minerId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "price": 1e-11,
  • "expiry": 392265
}

Fetch Ask data

Fetch data about an Ask by the Ask ID.

+
Authorizations:
path Parameters
askId
required
string

ID of the Ask to fetch.

+

Responses

200

If the request succeeds, the server returns the requested Ask.

+
get /market/asks/{askId}
http://127.0.0.1:3453/api/chain/v0/market/asks/{askId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "ask",
  • "minerId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "price": 1e-11,
  • "expiry": 392265
}

Deals

Fetch Deal information known to this node

This endpoint returns a list of all deals known to the current node.

+
Authorizations:
query Parameters
minerId
string
Example: minerId=t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq

Filter returned Deals by minerId. Only Deals made with (or proposed to) the specified miner will be returned.

+
clientId
string
Example: clientId=t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy

Filter returned Deals by clientId. Only Deals initiated by the specified client will be returned.

+
pieceId
string
Example: pieceId=QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY

Filter returned Deals by pieceId. Only Deals made to store the specified pieceId will be returned.

+
nextPageToken
string

Next page token

+

Responses

200

Success

+
get /market/deals
http://127.0.0.1:3453/api/chain/v0/market/deals

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Initiate a storage deal

This endpoint initiates a storage deal with a storage miner. It will create an appropriate payment Channel and vouchers, and pass the deal to the target storage miner to await acceptance or rejection.

+
Authorizations:
Request Body schema: application/json
minerActorId
string

The ID of the storage miner that is fulfilling this Deal

+
pieceId
string

The ID of the Picee being stored

+
askId
string

The ID of the Ask from the target miner for which this Deal is to be proposed

+
duration
number

The duration of this storage Deal in blocks

+
status
string
Enum: "unknown" "rejected" "accepted" "started" "failed" "staged" "sealing" "complete"

The current status of the Deal

+

Responses

200

Success

+
post /market/deals
http://127.0.0.1:3453/api/chain/v0/market/deals

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "minerActorId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "pieceId": "QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY",
  • "askId": 0,
  • "duration": 288000,
  • "status": "complete"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Actor

This is a description

+
kind
string
Value: "actor"
id
string
role
string
Enum: "init" "account" "miner" "storageMarket" "paymentBroker"
nonce
number

Nonce is the nonce expected on the next message from this actor. Messages are processed in strict, contiguous nonce order.

+
balance
number

Balance is the amount of FIL in the actor's account.

+
stateRoot
string

The CID of the root of the actor's state tree.

+
info
object or object or object or object or object
Copy
Expand all Collapse all
{
  • "kind": "actor",
  • "id": "string",
  • "role": "init",
  • "nonce": 0,
  • "balance": 0,
  • "stateRoot": "string",
  • "info": { }
}

Ask

id
string

The ID of this Ask.

+
kind
string
Value: "ask"
minerId
string

The ID (address) of the miner Actor that published this Ask.

+
price
number

The price in FIL per byte per blocktime being proposed in this Ask.

+
expiry
number

The block height at which this Ask expires.

+
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "ask",
  • "minerId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "price": 1e-11,
  • "expiry": 392265
}

Block

A Block contains information relevant to a particular point in time over which the network may achieve consensus. Blocks are mined as part of the consensus mechanism by elected miners and then included in a Tipset.

+
kind
string
Value: "block"
id
string

The CID (Content Identifier) of the Block

+
header
object (BlockHeader)
executedMessages
Array of objects (ExecutedMessage)
Copy
Expand all Collapse all
{
  • "kind": "block",
  • "id": "bafy2bzaceahv3kv4yllfdfrvtsr6rn5g5277dmxhx4tu4uvhvg2udpuate3te",
  • "header":
    {
    },
  • "executedMessages":
    [
    ]
}

BlockHeader

A BlockHeader contains information relating to a Block. In the Filecoin specification there is no difference between a BlockHeader and a Block, but for the purposees of this API a Block wraps a BlockHeader and additionally contains the full contents of all messages included in that Block.

+
kind
string
Value: "blockHeader"
id
string

The CID (Content Identifier) of the Block

+
height
number

Height is the chain height of this block.

+
minerId
string

The address of the miner Actor that mined this block.

+
messagesCID
string

The CID (Content Identifier) of the of bls and secpk signed trees of Messages included in this Block.

+
recieptsCID
string

The CID (Content Identifier) of the of tree containing receipts for the messages included in this block. Receipts are the return values and errors codes resulting from messages.

+
tickets
Array of objects
electionProof
string

A base64 encoded byte array that represents the proof that the miner of this Block is a leader at this round.

+
parentTipsetId
string

The ID of the Tipset on which this block was based. In the spec this field is defined as an array of Block IDs, which is effectively equivalent to a Tipset ID in this API.

+
parentWeight
number

parentWeight is the aggregate chain weight (spec) of the parent Tipset.

+
stateRoot
string

The CID (Content Identifier) of the root of the tree containing Actor state after the application of all the messages mined int his Block.

+
timestamp
number

The block Timestamp is used to enforce a form of block delay by honest miners. Unix time UTC timestamp (in seconds) stored as an unsigned integer.

+
blsAggregate
string

A base64 encoded representation of the aggregated BLS signature for all the messages in this block that were signed using BLS signatures

+
blockSig
string

A base64 encoded representation of the signature over the hash of this entire block with the miner's worker key to ensure that it is not tampered with after creation

+
Copy
Expand all Collapse all
{
  • "kind": "blockHeader",
  • "id": "bafy2bzaceahv3kv4yllfdfrvtsr6rn5g5277dmxhx4tu4uvhvg2udpuate3te",
  • "height": 200193,
  • "minerId": "t2usk2yzfu23uq2wyuc3w6ov233nxyhkysju2suba",
  • "messagesCID": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "recieptsCID": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "tickets":
    [
    ],
  • "electionProof": "V8896JC51ikqPVqYUCVbHzUfaOgjTBF6BYc8G/2P9CJMAg8MJzOi1j3F8hJSj/C6tKTLd9qHpLEjRpiGUzz04gE=",
  • "parentTipsetId": "bafy2bzacebnsn4ywt2cgejgp32rgsv4vaylrqe32axw4cfadxhoutxxb7puzs",
  • "parentWeight": 2001934,
  • "stateRoot": "bafyreih4xzehg7qudgdwve27pvmtblnc3ib5ql7haeouainjnavyo46eoy",
  • "timestamp": 1568753711,
  • "blsAggregate": "TODO",
  • "blockSig": "TODO"
}

Channel

id
string

The ID of this Channel

+
kind
string
Value: "channel"
targetActorId
string

The address of the account to which funds will be transferred by this Channel upon successful redemption of vouchers

+
amount
number

The total amount of FIL that is in this Channel and payable to the target

+
amountRedeemed
number

The total amount of FIL that has already been transfered to the target. This value cannot ever exceed amount.

+
agreedEol
number

The original chain height at which this Channel will expire. Specified upon creation and optionally extended by the creator of the channel.

+
actualEol
number

The actual expiration for the payment Channel which can differ from agreedEol when the payment channel is in dispute

+
condition
object

The condition specified in the most recent payment voucher for which a redemption attempt was made.

+
redeemed
boolean

A flag indicated whether or not Redeem has been called on the payment Channel yet. This is necessary because AmountRedeemed can still be zero in the event of a zero-value voucher

+
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "channel",
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "amountRedeemed": 0,
  • "agreedEol": 2120399,
  • "actualEol": 0,
  • "condition": "TODO",
  • "redeemed": true
}

Deal

id
string

The ID of this Deal

+
kind
string
Value: "deal"
minerActorId
string

The ID of the storage miner that is fulfilling this Deal

+
clientActorId
string

The ID of the client initiating the storage Deal (will typically be the owner of the current node)

+
pieceId
string

The ID of the Picee being stored

+
size
number

Size of the Piece being stored in bytes

+
totalPrice
number

The total price in FIL that will be paid for the entire storage operation

+
duration
number

The duration of this storage Deal in blocks

+
status
string
Enum: "unknown" "rejected" "accepted" "started" "failed" "staged" "sealing" "complete"

The current status of the Deal

+
paymentInfo
object
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "deal",
  • "minerActorId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "clientActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "pieceId": "QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY",
  • "size": 67003,
  • "totalPrice": 0.19296864,
  • "duration": 288000,
  • "status": "complete",
  • "paymentInfo":
    {
    }
}

ExecutedMessage

kind
string
Value: "executedMessage"
id
string

The CID (Content Identifier) of this ExecutedMessage

+
blockId
string

The CID of the mined block that included this ExecutedMessage.

+
message
object (Message)
exitCode
number

The exit value returned by the method this message was sent to. 0 is success, anything else is an error code in unix style.

+
return
object

The base64 encoded return values, if any, from processing a message. This can be non-empty even in the case of error (e.g., to provide programmatically readable detail about errors).

+
Copy
Expand all Collapse all
{
  • "kind": "executedMessage",
  • "id": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "blockId": "bafy2bzacebakx3c5g22seerja562tqb32bhecp4w2quj4mhvmovy4oqzbr2u4",
  • "message":
    {
    },
  • "exitCode": 0,
  • "return": "3AE="
}

Message

kind
string
Value: "message"
id
string
nonce
number
from
string
to
string
value
number
gasPrice
number
gasLimit
number
method
string
parameters
object
signature
string
Copy
Expand all Collapse all
{
  • "kind": "message",
  • "id": "string",
  • "nonce": 0,
  • "from": "string",
  • "to": "string",
  • "value": 0,
  • "gasPrice": 0,
  • "gasLimit": 0,
  • "method": "string",
  • "parameters": { },
  • "signature": "string"
}

Node

kind
string
Value: "node"
id
string
addresses
Array of strings

List of peer (network) addresses

+
version
string
commit
string
protocol
object
bitswapStats
object
config
object

Full JSON representation of the node's current configuration

+
Copy
Expand all Collapse all
{
  • "kind": "node",
  • "id": "QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq",
  • "addresses":
    [
    ],
  • "version": "1.0.2",
  • "commit": "93540266a2a9972e91947a538ce70dc9c4e8077e",
  • "protocol":
    {
    },
  • "bitswapStats":
    {
    },
  • "config": { }
}

Tipset

kind
string
Value: "tipset"
id
string
height
number
blocks
Array of objects (BlockHeader)
Copy
Expand all Collapse all
{
  • "kind": "tipset",
  • "id": "zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ",
  • "height": 0,
  • "blocks":
    [
    ]
}

Voucher

kind
string
Value: "voucher"
channelId
string

The ID of the payment Channel this Voucher is redeemable against.

+
payer
string

The Actor ID (address) of the creator of the payment channel for this voucher.

+
target
string

The Actor ID (address) of the recipient of the funds in this voucher.

+
amount
number

The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed.

+
validAt
number

The block height on or after which this Voucher can be redeemed.

+
condition
object

The condition that must evaluate to true for this Voucher to be redeemed.

+
signature
string

The signature over all the data in this Voucher

+
Copy
Expand all Collapse all
{
  • "kind": "voucher",
  • "channelId": "TODO",
  • "payer": "TODO",
  • "target": "TODO",
  • "amount": 0.19296864,
  • "validAt": 2120399,
  • "condition": "TODO",
  • "signature": "TODO"
}
+ + + + \ No newline at end of file diff --git a/package.json b/package.json index cec709c..d2ee6a9 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,9 @@ "description": "Filecoin JSON REST API OpenAPI Specification", "version": "0.1.0", "scripts": { - "serve": "redoc-cli serve ./api.yml -p 5000 -w" + "serve": "redoc-cli serve api/api.yml -p 5000 -w", + "html": "redoc-cli bundle api/api.yml -o html/filecoin-http-api.html --title 'Filecoin REST API'", + "lint": "speccy lint api/api.yml" }, "dependencies": { "redoc": "^2.0.0-rc.14", From 24eba66c8a7aa095787fc2bc623ecb3d9be37780 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Wed, 18 Sep 2019 13:28:06 -0700 Subject: [PATCH 37/50] Configure for GH Pages --- html/filecoin-http-api.html => docs/index.html | 0 package.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename html/filecoin-http-api.html => docs/index.html (100%) diff --git a/html/filecoin-http-api.html b/docs/index.html similarity index 100% rename from html/filecoin-http-api.html rename to docs/index.html diff --git a/package.json b/package.json index d2ee6a9..5ce0889 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "0.1.0", "scripts": { "serve": "redoc-cli serve api/api.yml -p 5000 -w", - "html": "redoc-cli bundle api/api.yml -o html/filecoin-http-api.html --title 'Filecoin REST API'", + "html": "redoc-cli bundle api/api.yml -o docs/index.html --title 'Filecoin REST API'", "lint": "speccy lint api/api.yml" }, "dependencies": { From 175b1416b1d1378a80e833f4ed446af2cc692704 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 20 Sep 2019 09:43:15 -0700 Subject: [PATCH 38/50] Improved Auth documentation --- api/api.yml | 19 +++++++++++++++---- docs/index.html | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/api/api.yml b/api/api.yml index 5ae544b..7157417 100644 --- a/api/api.yml +++ b/api/api.yml @@ -96,13 +96,24 @@ info: servers: - url: http://127.0.0.1:3453/api/chain/v0 security: - - bearerToken: [] + - 'Bearer Token Authentication': [] components: securitySchemes: - bearerToken : + 'Bearer Token Authentication': type: http - scheme: bearer - bearerFormat: Token + scheme: Bearer Token + description: | + V0 of this API supports all or nothing authentication and authorization suitable for use by the owner/operator of the current node, and nothing else. Callers of the API must provide a bearer token included in the Authorization header of each request. This token should be provided by the node for use by the caller via some out of band mechanism (like a file created on the filesystem upon initialization or upon startup). + + This API must be served over SSL/TLS. Future versions of the API can add more complex schemes. + + Here is an example of using a node provided bearer token and a node provided CA cert used for self-signed TLS with curl. This example assumes the cert and token both reside in the .filecoin folder and where generated by the go-filecoin daemon: + ``` + $ AUTH="Authorization: Bearer $(xxd -ps -u -c 1000 $HOME/.filecoin/api/admin.token)" + $ curl -X GET --cacert $HOME/.filecoin/api/tls.cert --header "$AUTH" \ + > https://localhost:3453/api/filecoin/v0/tipsets + ``` + responses: UnauthorizedError: description: Access token is missing or invalid diff --git a/docs/index.html b/docs/index.html index 4a24461..b8986eb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -478,4 +478,4 @@ - \ No newline at end of file + From 0d7b13a5931dbf537a2667815205e67b25056469 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 20 Sep 2019 09:45:22 -0700 Subject: [PATCH 39/50] Generate new docs --- docs/index.html | 59 +++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/docs/index.html b/docs/index.html index b8986eb..ec2e45d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -321,96 +321,101 @@ -231.5279,231.248 -231.873,231.248 -0.3451,0 -104.688, -104.0616 -231.873,-231.248 z " fill="currentColor">

Filecoin JSON REST API (0.1.0)

Download OpenAPI specification:Download

Filecoin JSON REST API SPEC: erik.ingenito@protocol.ai

Filecoin JSON REST API Description

-

Authentication

bearerToken

Security scheme type: HTTP
HTTP Authorization Scheme bearer
Bearer format "Token"

Tipsets

List Tipsets

List Tipsets currently known to this node in reverse height order

-
Authorizations:
query Parameters
nextPageToken
string

Next page token

+

Authentication

Bearer Token Authentication

V0 of this API supports all or nothing authentication and authorization suitable for use by the owner/operator of the current node, and nothing else. Callers of the API must provide a bearer token included in the Authorization header of each request. This token should be provided by the node for use by the caller via some out of band mechanism (like a file created on the filesystem upon initialization or upon startup).

+

This API must be served over SSL/TLS. Future versions of the API can add more complex schemes.

+

Here is an example of using a node provided bearer token and a node provided CA cert used for self-signed TLS with curl. This example assumes the cert and token both reside in the .filecoin folder and where generated by the go-filecoin daemon:

+
$ AUTH="Authorization: Bearer $(xxd -ps -u -c 1000 $HOME/.filecoin/api/admin.token)"
+$ curl -X GET --cacert $HOME/.filecoin/api/tls.cert --header "$AUTH" \
+> https://localhost:3453/api/filecoin/v0/tipsets
Security scheme type: HTTP
HTTP Authorization Scheme Bearer Token

Tipsets

List Tipsets

List Tipsets currently known to this node in reverse height order

+
query Parameters
nextPageToken
string

Next page token

Responses

200

Success

401

Access token is missing or invalid

get /chain/tipsets
http://127.0.0.1:3453/api/chain/v0/chain/tipsets

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Fetch a Tipset by ID

Return information about the Tipset with the specified ID

-
Authorizations:
path Parameters
tipsetId
required
string

ID of the Tipset to fetch

+
path Parameters
tipsetId
required
string

ID of the Tipset to fetch

Responses

200

Success

401

Access token is missing or invalid

get /chain/tipsets/{tipsetId}
http://127.0.0.1:3453/api/chain/v0/chain/tipsets/{tipsetId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "tipset",
  • "id": "zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ",
  • "height": 0,
  • "blocks":
    [
    ]
}

Blocks

Find block by ID

Return information about the Block with the specified ID

-
Authorizations:
path Parameters
blockId
required
string

ID of the Block to fetch

+
path Parameters
blockId
required
string

ID of the Block to fetch

Responses

200

Success

401

Access token is missing or invalid

get /chain/blocks/{blockId}
http://127.0.0.1:3453/api/chain/v0/chain/blocks/{blockId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "block",
  • "id": "bafy2bzaceahv3kv4yllfdfrvtsr6rn5g5277dmxhx4tu4uvhvg2udpuate3te",
  • "header":
    {
    },
  • "executedMessages":
    [
    ]
}

Messages

Send a Message

This method sends a new Message to an Actor recipient.

-
Authorizations:
Request Body schema: application/json
to
string
value
number
gasPrice
number
gasLimit
number
method
string
parameters
object

Responses

200

Success

+
Request Body schema: application/json
to
string
value
number
gasPrice
number
gasLimit
number
method
string
parameters
object

Responses

200

Success

401

Access token is missing or invalid

post /chain/messages
http://127.0.0.1:3453/api/chain/v0/chain/messages

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "to": "string",
  • "value": 0,
  • "gasPrice": 0,
  • "gasLimit": 0,
  • "method": "string",
  • "parameters": { }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "message",
  • "id": "string",
  • "nonce": 0,
  • "from": "string",
  • "to": "string",
  • "value": 0,
  • "gasPrice": 0,
  • "gasLimit": 0,
  • "method": "string",
  • "parameters": { },
  • "signature": "string"
}

Find ExecutedMessage by ID

Return information about the ExecutedMessage with the specified ID. An executed Message is one that has been included in a valid block in the chain. It includes return value and status information.

-
Authorizations:
path Parameters
executedMessageId
required
string

ID of the executed message to fetch

+
path Parameters
executedMessageId
required
string

ID of the executed message to fetch

Responses

200

Success

401

Access token is missing or invalid

get /chain/executed-messages/{executedMessageId}
http://127.0.0.1:3453/api/chain/v0/chain/executed-messages/{executedMessageId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "executedMessage",
  • "id": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "blockId": "bafy2bzacebakx3c5g22seerja562tqb32bhecp4w2quj4mhvmovy4oqzbr2u4",
  • "message":
    {
    },
  • "exitCode": 0,
  • "return": "3AE="
}

Actors

List Actors

List Actors currently known to this node in ID order

-
Authorizations:
query Parameters
nextPageToken
string

Next page token

+
query Parameters
nextPageToken
string

Next page token

Responses

200

Success

get /actors
http://127.0.0.1:3453/api/chain/v0/actors

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Find Actor by ID

Return information about the Actor with the specified ID

-
Authorizations:
path Parameters
actorId
required
string

ID of the Actor to fetch

+
path Parameters
actorId
required
string

ID of the Actor to fetch

Responses

200

Success

get /actors/{actorId}
http://127.0.0.1:3453/api/chain/v0/actors/{actorId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "actor",
  • "id": "string",
  • "role": "init",
  • "nonce": 0,
  • "balance": 0,
  • "stateRoot": "string",
  • "info": { }
}

Channels

Redeem Voucher

This endpoint accepts a voucher from the Channel target and redeems it. Upon checking the validity and successfully checking the voucher's condition the specified funds will be transfered from the channel to the target.

-
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to fetch

+
path Parameters
channelId
required
string

ID of the Channel to fetch

Request Body schema: applications/json
amount
number

The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed.

validAt
number

The block height on or after which this Voucher can be redeemed.

condition
object

The condition that must evaluate to true for this Voucher to be redeemed.

signature
string

The signature over all the data in this Voucher

Responses

200

Success

post /actors/channels/{channelId}/redeem
http://127.0.0.1:3453/api/chain/v0/actors/channels/{channelId}/redeem

Request samples

Content type
applications/json
Copy
Expand all Collapse all
{
  • "amount": 0.19296864,
  • "validAt": 2120399,
  • "condition": "TODO",
  • "signature": "TODO"
}

Creates Voucher

This endpoint accepts voucher details and returns a new signed voucher suitable for off chain transmission to the Channel target for later redemption. Only the Channel payer (creator) can call this endpoint successfully.

-
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to fetch

+
path Parameters
channelId
required
string

ID of the Channel to fetch

Request Body schema: applications/json
amount
number

The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed.

validAt
number

The block height on or after which this Voucher can be redeemed.

condition
object

The condition that must evaluate to true for this Voucher to be redeemed.

signature
string

The signature over all the data in this Voucher

Responses

200

Success

post /actors/channels/{channelId}/vouchers
http://127.0.0.1:3453/api/chain/v0/actors/channels/{channelId}/vouchers

Request samples

Content type
applications/json
Copy
Expand all Collapse all
{
  • "amount": 0.19296864,
  • "validAt": 2120399,
  • "condition": "TODO",
  • "signature": "TODO"
}

List Channels

List all payment channels known to this node

-
Authorizations:
query Parameters
nextPageToken
string

Next page token

+
query Parameters
nextPageToken
string

Next page token

Responses

200

Success

get /channels
http://127.0.0.1:3453/api/chain/v0/channels

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Create new payment Channel

This endpoint creates a new payment Channel with the specified characteristics

-
Authorizations:
Request Body schema: application/json
targetActorId
string

The address of the account to which funds will be transferred by this Channel upon successful redemption of vouchers

+
Request Body schema: application/json
targetActorId
string

The address of the account to which funds will be transferred by this Channel upon successful redemption of vouchers

amount
number

The total amount of FIL that is in this Channel and payable to the target

agreedEol
number

The original chain height at which this Channel will expire. Specified upon creation and optionally extended by the creator of the channel.

Responses

200

Success

post /channels
http://127.0.0.1:3453/api/chain/v0/channels

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "agreedEol": 2120399
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Find Channel by ID

Find a payment Channel by ID and return it

-
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to fetch

+
path Parameters
channelId
required
string

ID of the Channel to fetch

Responses

200

Success

get /channels/{channelId}
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "channel",
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "amountRedeemed": 0,
  • "agreedEol": 2120399,
  • "actualEol": 0,
  • "condition": "TODO",
  • "redeemed": true
}

Extend duration of Channel

This endpoint extends the duration of an existing payment Channel, increasing the block height at which the Channel will timeout. Only the payer (creator) or the channel can successfully call this endpoint.

-
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to fetch

+
path Parameters
channelId
required
string

ID of the Channel to fetch

Request Body schema: applications/json
agreedEol
number

The new chain (increased) height at which this channel will expire.

Responses

200

Success

patch /channels/{channelId}
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}

Request samples

Content type
applications/json
Copy
Expand all Collapse all
{
  • "agreedEol": 2120399
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "channel",
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "amountRedeemed": 0,
  • "agreedEol": 2120399,
  • "actualEol": 0,
  • "condition": "TODO",
  • "redeemed": true
}

Close Channel

This endpoint closes the specified payment Channel and returns all unredeemed funds to the payee (the Channel's creator). Upon completion this Channel is effectively deleted and can never be used again. This method can only be called by target of the Channel with a valid voucher - any other invocation is an error.

-
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to fetch

+
path Parameters
channelId
required
string

ID of the Channel to fetch

Responses

200

Success

post /channels/{channelId}/close
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}/close

Schedule Channel for cancellation

This endpoint reduces the actual eol (effective end date) of the Channel in an attempt to free up the funds in the channel for earlier reclaming. This endpoint can only successfullly be called by the Channel's payer as the cancel message needs to originate from that account. Cancel doesn't immediately close a channel but instead reduces the lifetime of the channel leaving a grace period during which the payee can undo the cancellation by submitting a valid voucher, thereby proving that the channel is still in use.

-
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to cancel

+
path Parameters
channelId
required
string

ID of the Channel to cancel

Responses

200

Success

post /channels/{channelId}/cancel
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}/cancel

Reclaim unspent funds in Channel

This endpoint is used by the creator (payer) of a Channel to reclaim unspent funds when a Channel has timed out (the chain height has exceeded the eol of the Channel). It can only successfully be called by the Channel's payer on a timed out Channel.

-
Authorizations:
path Parameters
channelId
required
string

ID of the Channel to reclaim

+
path Parameters
channelId
required
string

ID of the Channel to reclaim

Responses

200

Success

post /channels/{channelId}/reclaim
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}/reclaim

Node

Return Node information

Get information about the current Filecoin Node.

-
Authorizations:

Responses

200

Success

+

Responses

200

Success

get /control/node
http://127.0.0.1:3453/api/chain/v0/control/node

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "node",
  • "id": "QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq",
  • "addresses":
    [
    ],
  • "version": "1.0.2",
  • "commit": "93540266a2a9972e91947a538ce70dc9c4e8077e",
  • "protocol":
    {
    },
  • "bitswapStats":
    {
    },
  • "config": { }
}

Pieces

Add a Piece to local storage

This method imports data into the local node's temporary storage so that it can be transferred to a storage miner.

-
Authorizations:
Request Body schema: application/octet-stream
string <binary>

Responses

200

Success

+
Request Body schema: application/octet-stream
string <binary>

Responses

200

Success

post /control/pieces
http://127.0.0.1:3453/api/chain/v0/control/pieces

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "QmQXJPWYEnt9GoYu5SXkrKMWovCX78YBjFzRSJF63Zobnj"
}

Fetch piece data

Fetch piece data from the local node's temporary storage.

-
Authorizations:
path Parameters
pieceId
required
string

ID of the piece previously returned by corresponding createPiece POST method.

+
path Parameters
pieceId
required
string

ID of the piece previously returned by corresponding createPiece POST method.

Responses

200

If the request succeeds, the server returns the original data used to create the piece.

get /control/pieces/{pieceId}
http://127.0.0.1:3453/api/chain/v0/control/pieces/{pieceId}

Asks

Lists all Asks in the market

This endpoint returns all Asks known to the current node ordered lexically by the Ask ID

-
Authorizations:
query Parameters
minerId
string
Example: minerId=t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq

Filter returned asks by minerId. Only Asks from this miner will be returned.

+
query Parameters
minerId
string
Example: minerId=t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq

Filter returned asks by minerId. Only Asks from this miner will be returned.

active
boolean
Example: active=true

Filter returned asks to include only those that are still active, meaning the current node's tipset height doesn't exceed that of the Ask's specified expiration.

nextPageToken
string

Next page token

Responses

200

Success

get /market/asks
http://127.0.0.1:3453/api/chain/v0/market/asks

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Order this mining node to publish a new Ask on the network

This method creates a new storage market ask and publishes it for storage buyers to find and act on.

-
Authorizations:
Request Body schema: application/json
kind
string
Value: "ask"
price
number

The price in FIL per byte per blocktime being proposed in this Ask.

+
Request Body schema: application/json
kind
string
Value: "ask"
price
number

The price in FIL per byte per blocktime being proposed in this Ask.

expiry
number

The block height at which this Ask expires.

Responses

200

Success

post /market/asks
http://127.0.0.1:3453/api/chain/v0/market/asks

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "ask",
  • "price": 1e-11,
  • "expiry": 392265
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "ask",
  • "minerId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "price": 1e-11,
  • "expiry": 392265
}

Fetch Ask data

Fetch data about an Ask by the Ask ID.

-
Authorizations:
path Parameters
askId
required
string

ID of the Ask to fetch.

+
path Parameters
askId
required
string

ID of the Ask to fetch.

Responses

200

If the request succeeds, the server returns the requested Ask.

get /market/asks/{askId}
http://127.0.0.1:3453/api/chain/v0/market/asks/{askId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "ask",
  • "minerId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "price": 1e-11,
  • "expiry": 392265
}

Deals

Fetch Deal information known to this node

This endpoint returns a list of all deals known to the current node.

-
Authorizations:
query Parameters
minerId
string
Example: minerId=t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq

Filter returned Deals by minerId. Only Deals made with (or proposed to) the specified miner will be returned.

+
query Parameters
minerId
string
Example: minerId=t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq

Filter returned Deals by minerId. Only Deals made with (or proposed to) the specified miner will be returned.

clientId
string
Example: clientId=t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy

Filter returned Deals by clientId. Only Deals initiated by the specified client will be returned.

pieceId
string
Example: pieceId=QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY

Filter returned Deals by pieceId. Only Deals made to store the specified pieceId will be returned.

nextPageToken
string

Next page token

Responses

200

Success

get /market/deals
http://127.0.0.1:3453/api/chain/v0/market/deals

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Initiate a storage deal

This endpoint initiates a storage deal with a storage miner. It will create an appropriate payment Channel and vouchers, and pass the deal to the target storage miner to await acceptance or rejection.

-
Authorizations:
Request Body schema: application/json
minerActorId
string

The ID of the storage miner that is fulfilling this Deal

+
Request Body schema: application/json
minerActorId
string

The ID of the storage miner that is fulfilling this Deal

pieceId
string

The ID of the Picee being stored

askId
string

The ID of the Ask from the target miner for which this Deal is to be proposed

duration
number

The duration of this storage Deal in blocks

@@ -470,7 +475,7 @@
signature
string

The signature over all the data in this Voucher

Copy
Expand all Collapse all
{
  • "kind": "voucher",
  • "channelId": "TODO",
  • "payer": "TODO",
  • "target": "TODO",
  • "amount": 0.19296864,
  • "validAt": 2120399,
  • "condition": "TODO",
  • "signature": "TODO"
}
- + \ No newline at end of file From 77115b33642ad44c7e49989657de5d531344849e Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 27 Sep 2019 12:40:08 -0700 Subject: [PATCH 40/50] Rename Actor id to Actor address --- api/actors.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/api/actors.yml b/api/actors.yml index 7c224f1..46fd5ae 100644 --- a/api/actors.yml +++ b/api/actors.yml @@ -6,8 +6,9 @@ models: type: string readOnly: true enum: [actor] - id: + address: type: string + description: The identifier that refers to an Actor in the Filecoin state. All Actors have an address. To learn more, take a look at the [address spec.](https://github.com/filecoin-project/specs/blob/master/address.md). role: type: string enum: [init,account,miner,storageMarket,paymentBroker] @@ -107,7 +108,7 @@ endpoints: get: operationId: listActors summary: List Actors - description: List Actors currently known to this node in ID order + description: List Actors currently known to this node in address order tags: - Actors parameters: @@ -128,15 +129,15 @@ endpoints: $ref: '#/models/Actor' actor_resource: get: - operationId: getActorById + operationId: getActorByAddress summary: Find Actor by ID description: Return information about the Actor with the specified ID tags: - Actors parameters: - - name: actorId + - name: address in: path - description: ID of the Actor to fetch + description: The address of the Actor to fetch required: true schema: type: string From de3839c8b68559f20eff0240c086c51a7a6bf585 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 27 Sep 2019 12:43:20 -0700 Subject: [PATCH 41/50] Fix Actor state model names --- api/actors.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/api/actors.yml b/api/actors.yml index 46fd5ae..bfbb93f 100644 --- a/api/actors.yml +++ b/api/actors.yml @@ -11,7 +11,7 @@ models: description: The identifier that refers to an Actor in the Filecoin state. All Actors have an address. To learn more, take a look at the [address spec.](https://github.com/filecoin-project/specs/blob/master/address.md). role: type: string - enum: [init,account,miner,storageMarket,paymentBroker] + enum: [Init,Account,StorageMiner,StorageMarket,PaymentChannel,MultisigAccount] nonce: type: number description: Nonce is the nonce expected on the next message from this actor. Messages are processed in strict, contiguous nonce order. @@ -25,8 +25,8 @@ models: oneOf: - $ref: '#/models/AccountActorState' - $ref: '#/models/InitActorState' - - $ref: '#/models/MinerActorState' - - $ref: '#/models/PaymentBrokerActorState' + - $ref: '#/models/PaymentChannelActorState' + - $ref: '#/models/StorageMinerActorState' - $ref: '#/models/StorageMarketActorState' AccountActorState: $ref: '#/models/EmptyActorState' @@ -39,7 +39,15 @@ models: nextId: type: number description: The next numerical ID to allocate to a newly instantiated Actor - MinerActorState: + PaymentChannelActorState: + $ref: '#/models/EmptyActorState' + StorageMarketActorState: + type: object + properties: + totalStorage: + type: number + description: Filecoin's total committed storage as of the current block. + StorageMinerActorState: type: object properties: owner: @@ -88,8 +96,6 @@ models: type: number provingPeriodEnd: type: number - PaymentBrokerActorState: - $ref: '#/models/EmptyActorState' Sector: type: object properties: @@ -97,12 +103,6 @@ models: type: string commR: type: string - StorageMarketActorState: - type: object - properties: - totalStorage: - type: number - description: Filecoin's total committed storage as of the current block. endpoints: actors_collection: get: From 193a2758ac6da297960f0c375a443de903e7959e Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 27 Sep 2019 12:44:24 -0700 Subject: [PATCH 42/50] Rename Actor stateRoot to Actor head for consistency with spec --- api/actors.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/actors.yml b/api/actors.yml index bfbb93f..3d677af 100644 --- a/api/actors.yml +++ b/api/actors.yml @@ -18,9 +18,9 @@ models: balance: type: number description: Balance is the amount of FIL in the actor's account. - stateRoot: + head: type: string - description: The CID of the root of the actor's state tree. + description: The CID ([Content Identifier](https://github.com/ipld/cid)) of the root of the Actor's state tree. info: oneOf: - $ref: '#/models/AccountActorState' From 8c86f396107c0ffc4a5908f8937e7e86cb4298fa Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 27 Sep 2019 12:44:37 -0700 Subject: [PATCH 43/50] Add codeCid to Actor --- api/actors.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/actors.yml b/api/actors.yml index 3d677af..007739e 100644 --- a/api/actors.yml +++ b/api/actors.yml @@ -21,6 +21,9 @@ models: head: type: string description: The CID ([Content Identifier](https://github.com/ipld/cid)) of the root of the Actor's state tree. + codeCid: + type: string + description: The CID ([Content Identifier](https://github.com/ipld/cid)) of the VM code for this actor's implementation (or a constant for actors implemented in Go code). Code may be nil for an uninitialized actor (which exists because it has received a balance) info: oneOf: - $ref: '#/models/AccountActorState' From 1518b4bea32093e483faad117f0d893528044031 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 27 Sep 2019 12:45:20 -0700 Subject: [PATCH 44/50] Add Actor model description with link to spec --- api/api.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/api/api.yml b/api/api.yml index 7157417..8a0e2ac 100644 --- a/api/api.yml +++ b/api/api.yml @@ -3,7 +3,17 @@ tags: - name: ActorModel x-displayName: Actor description: | - This is a description + Actor is the central abstraction of entities in the system. See the [Actor Specification](https://github.com/filecoin-project/specs/blob/master/data-structures.md#actor) for more information. + + Both individual accounts, as well as contracts (user & system level) are represented as actors. An actor has the following core functionality implemented on a system level: + - track a Filecoin balance, using the `Balance` field + - execute code stored in the `Code` field + - read & write memory + - replay protection, using the `Nonce` field + + Value sent to a non-existent address will be tracked as an empty actor that has a Balance but nil Code and Memory. You must nil check Code cids before comparing them. + + More specific capabilities for individual accounts or contract specific must be implemented inside the code. - name: Actors - name: AskModel From a0dcaaa85a7b562ee18d9fa75803295782cf0995 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 27 Sep 2019 14:29:07 -0700 Subject: [PATCH 45/50] Improve auth scheme description --- api/api.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/api.yml b/api/api.yml index 8a0e2ac..c0c519c 100644 --- a/api/api.yml +++ b/api/api.yml @@ -113,9 +113,11 @@ components: type: http scheme: Bearer Token description: | - V0 of this API supports all or nothing authentication and authorization suitable for use by the owner/operator of the current node, and nothing else. Callers of the API must provide a bearer token included in the Authorization header of each request. This token should be provided by the node for use by the caller via some out of band mechanism (like a file created on the filesystem upon initialization or upon startup). + The authentication scheme for this API is implementation dependent. Implementations should feel free to use the scheme and granularity they deem fit. This document describes the scheme used by the [go-filecoin](https://github.com/filecoin-project/go-filecoin) daemon. - This API must be served over SSL/TLS. Future versions of the API can add more complex schemes. + Go-filecoin will initially (v0) support a simple all or nothing authentication and authorization suitable for use by the owner/operator of the current node, and nothing else. Consumers of this API must provide a bearer token included in the Authorization header of each request. This token is provided by the go-filecoin node for use by the caller via some out of band mechanism (like a file created on the filesystem upon initialization or upon startup). More sophisticated authentication and authorization will follow. + + The nature of this style of authentication makes it suitable for use only when served over SSL/TLS. Here is an example of using a node provided bearer token and a node provided CA cert used for self-signed TLS with curl. This example assumes the cert and token both reside in the .filecoin folder and where generated by the go-filecoin daemon: ``` @@ -123,7 +125,6 @@ components: $ curl -X GET --cacert $HOME/.filecoin/api/tls.cert --header "$AUTH" \ > https://localhost:3453/api/filecoin/v0/tipsets ``` - responses: UnauthorizedError: description: Access token is missing or invalid From 4b9511e4653bebabea809046ed7d407b053c3369 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 27 Sep 2019 16:28:03 -0700 Subject: [PATCH 46/50] Better descriptions and renaming to match spec --- api/api.yml | 93 ++++++++++------ api/chain.yml | 4 +- api/market.yml | 48 ++++---- api/{channels.yml => payment_channels.yml} | 124 ++++++++++----------- 4 files changed, 147 insertions(+), 122 deletions(-) rename api/{channels.yml => payment_channels.yml} (56%) diff --git a/api/api.yml b/api/api.yml index c0c519c..8d1aa57 100644 --- a/api/api.yml +++ b/api/api.yml @@ -3,7 +3,9 @@ tags: - name: ActorModel x-displayName: Actor description: | - Actor is the central abstraction of entities in the system. See the [Actor Specification](https://github.com/filecoin-project/specs/blob/master/data-structures.md#actor) for more information. + Actor is the central abstraction of entities in the system. + + See the [Actor Specification](https://github.com/filecoin-project/specs/blob/master/data-structures.md#actor) and the [Actor Definition](https://github.com/filecoin-project/specs/blob/master/definitions.md#actor) for more information. Both individual accounts, as well as contracts (user & system level) are represented as actors. An actor has the following core functionality implemented on a system level: - track a Filecoin balance, using the `Balance` field @@ -19,26 +21,33 @@ tags: - name: AskModel x-displayName: Ask description: | + An Ask is a price advertisement by a storage miner for storing data. - name: BlockHeaderModel x-displayName: BlockHeader description: | A BlockHeader contains information relating to a Block. In the Filecoin specification there is no difference between a BlockHeader and a Block, but for the purposees of this API a Block wraps a BlockHeader and additionally contains the full contents of all messages included in that Block. + + See the [BlockHeader Specificiation](https://github.com/filecoin-project/specs/blob/master/data-structures.md#block) for more information. + - name: BlockModel x-displayName: Block description: | A Block contains information relevant to a particular point in time over which the network may achieve consensus. Blocks are mined as part of the consensus mechanism by elected miners and then included in a Tipset. + + See the [BlockHeader Specificiation](https://github.com/filecoin-project/specs/blob/master/data-structures.md#block) for more information. + - name: Blocks - - name: ChannelModel - x-displayName: Channel - description: | - - - name: DealModel - x-displayName: Deal + - name: PaymentChannelModel + x-displayName: PaymentChannel description: | - + A PaymentChannel is setup between actors in the Filecoin system to enable off-chain payments with on-chain guarantees, making settlement more efficient. + + See the [Payment Channel Actor Description](https://github.com/filecoin-project/specs/blob/master/actors.md#payment-channel-actor) for more information. + + - name: ExecutedMessageModel x-displayName: ExecutedMessage description: | @@ -46,6 +55,10 @@ tags: - name: MessageModel x-displayName: Message description: | + A Message is an exchange of information between two actors modeled as a function call. Messages are the equivalent of transactions in Ethereum. + + See the [Message Specification](https://github.com/filecoin-project/specs/blob/master/data-structures.md#message) for more information. + - name: Messages - name: Node @@ -53,9 +66,21 @@ tags: x-displayName: Node description: | + - name: StorageDealModel + x-displayName: StorageDeal + description: | + A StorageDeal represents the agreement between between two Actors; one Actor paying the other (via a PaymentChannel) to store data on their behalf. + + See a description of how StorageDeals work in the [Filecoin Storage Market Specification](https://github.com/filecoin-project/specs/blob/master/storage-market.md) + + - name: TipsetModel x-displayName: Tipset description: | + A TipSet is a set of blocks that have the same parent set and same number of tickets, which implies they will have been mined at the same height. A TipSet can contain multiple blocks if more than one miner successfully mines a block at the same height as another miner. + + See the [Tipset Specification](https://github.com/filecoin-project/specs/blob/master/data-structures.md#tipset) and the [Tipset Description] in the consensus specification for more information + - name: Tipsets - name: VoucherModel @@ -71,9 +96,9 @@ x-tagGroups: - name: Actor Endpoints tags: - Actors - - name: Channel Endpoints + - name: Payment Channel Endpoints tags: - - Channels + - PaymentChannels - name: Node Control Endpoints tags: - Node @@ -82,15 +107,15 @@ x-tagGroups: - name: Storage Market Endpoints tags: - Asks - - Deals + - StorageDeals - name: Models tags: - ActorModel - AskModel - BlockModel - BlockHeaderModel - - ChannelModel - - DealModel + - PaymentChannelModel + - StorageDealModel - ExecutedMessageModel - MessageModel - NodeModel @@ -137,10 +162,10 @@ components: $ref: 'chain.yml#/models/Block' BlockHeader: $ref: 'chain.yml#/models/BlockHeader' - Channel: - $ref: 'channels.yml#/models/Channel' - Deal: - $ref: 'market.yml#/models/Deal' + PaymentChannel: + $ref: 'payment_channels.yml#/models/PaymentChannel' + StorageDeal: + $ref: 'market.yml#/models/StorageDeal' ExecutedMessage: $ref: 'chain.yml#/models/ExecutedMessage' Message: @@ -154,7 +179,7 @@ components: Tipset: $ref: 'chain.yml#/models/Tipset' Voucher: - $ref: 'channels.yml#/models/Voucher' + $ref: 'payment_channels.yml#/models/Voucher' Sector: $ref: 'actors.yml#/models/Sector' paths: @@ -180,23 +205,23 @@ paths: $ref: './control.yml#/endpoints/pieces_collection' /control/pieces/{pieceId}: $ref: './control.yml#/endpoints/piece_resource' - /actors/channels/{channelId}/redeem: - $ref: 'channels.yml#/endpoints/channel_resource_redeem' - /actors/channels/{channelId}/vouchers: - $ref: 'channels.yml#/endpoints/channel_resource_vouchers' - /channels: - $ref: 'channels.yml#/endpoints/channels_collection' - /channels/{channelId}: # Right now it's not possible to look up Channels by ID alone, only by Payee/ID, channel ID could just be a concatenation - $ref: 'channels.yml#/endpoints/channel_resource' - /channels/{channelId}/close: - $ref: 'channels.yml#/endpoints/channel_resource_close' - /channels/{channelId}/cancel: - $ref: 'channels.yml#/endpoints/channel_resource_cancel' - /channels/{channelId}/reclaim: - $ref: 'channels.yml#/endpoints/channel_resource_reclaim' + /payment_channels/{paymentChannelId}/redeem: + $ref: 'payment_channels.yml#/endpoints/payment_channel_resource_redeem' + /payment_channels/{paymentChannelId}/vouchers: + $ref: 'payment_channels.yml#/endpoints/payment_channel_resource_vouchers' + /payment_channels: + $ref: 'payment_channels.yml#/endpoints/payment_channels_collection' + /payment_channels/{paymentChannelId}: # Right now it's not possible to look up Channels by ID alone, only by Payee/ID, channel ID could just be a concatenation + $ref: 'payment_channels.yml#/endpoints/payment_channel_resource' + /payment_channels/{paymentChannelId}/close: + $ref: 'payment_channels.yml#/endpoints/payment_channel_resource_close' + /payment_channels/{paymentChannelId}/cancel: + $ref: 'payment_channels.yml#/endpoints/payment_channel_resource_cancel' + /payment_channels/{paymentChannelId}/reclaim: + $ref: 'payment_channels.yml#/endpoints/payment_channel_resource_reclaim' /market/asks: $ref: 'market.yml#/endpoints/asks_collection' /market/asks/{askId}: $ref: 'market.yml#/endpoints/ask_resource' - /market/deals: - $ref: 'market.yml#/endpoints/deals_collection' + /market/storage_deals: + $ref: 'market.yml#/endpoints/storage_deals_collection' diff --git a/api/chain.yml b/api/chain.yml index 406e414..a5b6d87 100644 --- a/api/chain.yml +++ b/api/chain.yml @@ -35,11 +35,11 @@ models: type: string description: The address of the miner Actor that mined this block. example: t2usk2yzfu23uq2wyuc3w6ov233nxyhkysju2suba - messagesCID: + messagesCid: type: string description: The CID ([Content Identifier](https://github.com/ipld/cid)) of the of bls and secpk signed trees of Messages included in this Block. example: bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a - recieptsCID: + recieptsCid: type: string description: The CID ([Content Identifier](https://github.com/ipld/cid)) of the of tree containing receipts for the messages included in this block. Receipts are the return values and errors codes resulting from messages. example: bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a diff --git a/api/market.yml b/api/market.yml index 375e412..186bec0 100644 --- a/api/market.yml +++ b/api/market.yml @@ -22,25 +22,25 @@ models: type: number description: The block height at which this Ask expires. example: 392265 - Deal: + StorageDeal: type: object properties: id: type: string - description: The ID of this Deal + description: The ID of this StorageDeal readOnly: true kind: type: string readOnly: true - enum: [deal] + enum: [storageDeal] minerActorId: type: string - description: The ID of the storage miner that is fulfilling this Deal + description: The ID of the storage miner that is fulfilling this StorageDeal example: t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq clientActorId: type: string readOnly: true - description: The ID of the client initiating the storage Deal (will typically be the owner of the current node) + description: The ID of the client initiating the StorageDeal (will typically be the owner of the current node) example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy pieceId: type: string @@ -54,7 +54,7 @@ models: askId: type: string writeOnly: true - description: The ID of the Ask from the target miner for which this Deal is to be proposed + description: The ID of the Ask from the target miner for which this StorageDeal is to be proposed example: 0 totalPrice: type: number @@ -63,11 +63,11 @@ models: example: 0.19296864 duration: type: number - description: The duration of this storage Deal in blocks + description: The duration of this StorageDeal in blocks example: 288000 status: type: string - description: The current status of the Deal + description: The current status of the StorageDeal enum: [unknown,rejected,accepted,started,failed,staged,sealing,complete] example: complete paymentInfo: @@ -76,13 +76,13 @@ models: properties: payerClientActorId: type: string - description: The address of the owner of the payment Channel - channelId: + description: The address of the owner of the PaymentChannel + paymentChannelId: type: string - description: The ID of the payment Channel the client will use to pay the miner. It must already exist and have sufficient funds locked up in order to create a storage deal. - channelMessageId: + description: The ID of the PaymentChannel the client will use to pay the miner. It must already exist and have sufficient funds locked up in order to create a StorageDeal. + paymentChannelMessageId: type: string - description: The ID of the Message used to create the Channel (so the miner can wait for it). + description: The ID of the Message used to create the PaymentChannel (so the miner can wait for it). endpoints: asks_collection: get: @@ -160,13 +160,13 @@ endpoints: application/json: schema: $ref: '#/models/Ask' - deals_collection: + storage_deals_collection: get: - operationId: getDeals - summary: Fetch Deal information known to this node + operationId: getStorageDeals + summary: Fetch StorageDeal information known to this node description: This endpoint returns a list of all deals known to the current node. tags: - - Deals + - StorageDeals parameters: - name: minerId in: query @@ -203,18 +203,18 @@ endpoints: schema: type: array items: - $ref: '#/models/Deal' + $ref: '#/models/StorageDeal' post: - operationId: createDeal - summary: Initiate a storage deal - description: This endpoint initiates a storage deal with a storage miner. It will create an appropriate payment Channel and vouchers, and pass the deal to the target storage miner to await acceptance or rejection. + operationId: createStorageDeal + summary: Initiate a StorageDeal + description: This endpoint initiates a storage deal with a storage miner. It will create an appropriate PaymentChannel and vouchers, and pass the deal to the target storage miner to await acceptance or rejection. tags: - - Deals + - StorageDeals requestBody: content: application/json: schema: - $ref: '#/models/Deal' + $ref: '#/models/StorageDeal' responses: 200: description: Success @@ -223,4 +223,4 @@ endpoints: schema: type: array items: - $ref: '#/models/Deal' \ No newline at end of file + $ref: '#/models/StorageDeal' \ No newline at end of file diff --git a/api/channels.yml b/api/payment_channels.yml similarity index 56% rename from api/channels.yml rename to api/payment_channels.yml index 355e828..06bcb78 100644 --- a/api/channels.yml +++ b/api/payment_channels.yml @@ -6,9 +6,9 @@ models: type: string readOnly: true enum: [voucher] - channelId: + paymentChannelId: type: string - description: The ID of the payment Channel this Voucher is redeemable against. + description: The ID of the PaymentChannel this Voucher is redeemable against. readOnly: true example: TODO payer: @@ -37,24 +37,24 @@ models: type: string description: The signature over all the data in this Voucher example: TODO - Channel: + PaymentChannel: type: object properties: id: type: string - description: The ID of this Channel + description: The ID of this PaymentChannel readOnly: true kind: type: string readOnly: true - enum: [channel] + enum: [paymentChannel] targetActorId: type: string - description: The address of the account to which funds will be transferred by this Channel upon successful redemption of vouchers + description: The address of the account to which funds will be transferred by this PaymentChannel upon successful redemption of vouchers example: t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy amount: type: number - description: The total amount of FIL that is in this Channel and payable to the target + description: The total amount of FIL that is in this PaymentChannel and payable to the target example: 0.19296864 amountRedeemed: type: number @@ -63,12 +63,12 @@ models: example: 0 agreedEol: type: number - description: The original chain height at which this Channel will expire. Specified upon creation and optionally extended by the creator of the channel. + description: The original chain height at which this PaymentChannel will expire. Specified upon creation and optionally extended by the creator of the channel. example: 2120399 actualEol: type: number readOnly: true - description: The actual expiration for the payment Channel which can differ from agreedEol when the payment channel is in dispute + description: The actual expiration for the payment PaymentChannel which can differ from agreedEol when the payment channel is in dispute condition: type: object readOnly: true @@ -77,16 +77,16 @@ models: redeemed: type: boolean readOnly: true - description: A flag indicated whether or not Redeem has been called on the payment Channel yet. This is necessary because AmountRedeemed can still be zero in the event of a zero-value voucher + description: A flag indicated whether or not Redeem has been called on the payment PaymentChannel yet. This is necessary because AmountRedeemed can still be zero in the event of a zero-value voucher example: true endpoints: - channels_collection: + payment_channels_collection: get: - operationId: listChannels - summary: List Channels - description: List all payment channels known to this node + operationId: listPaymentChannels + summary: List Payment Channels + description: List all PaymentChannels known to this node tags: - - Channels + - PaymentChannels parameters: - name: nextPageToken in: query @@ -102,18 +102,18 @@ endpoints: schema: type: array items: - $ref: '#/models/Channel' + $ref: '#/models/PaymentChannel' post: - operationId: createChannel - summary: Create new payment Channel - description: This endpoint creates a new payment Channel with the specified characteristics + operationId: createPaymentChannel + summary: Create new PaymentChannel + description: This endpoint creates a new PaymentChannel with the specified characteristics tags: - Channels requestBody: content: application/json: schema: - $ref: '#/models/Channel' + $ref: '#/models/PaymentChannel' responses: 200: description: Success @@ -122,18 +122,18 @@ endpoints: schema: type: array items: - $ref: '#/models/Channel' - channel_resource: + $ref: '#/models/PaymentChannel' + payment_channel_resource: get: - operationId: getChannelById - summary: Find Channel by ID - description: Find a payment Channel by ID and return it + operationId: getPaymentChannelById + summary: Find PaymentChannel by ID + description: Find a PaymentChannel by ID and return it tags: - - Channels + - PaymentChannels parameters: - - name: channelId + - name: paymentChannelId in: path - description: ID of the Channel to fetch + description: ID of the PaymentChannel to fetch required: true schema: type: string @@ -143,17 +143,17 @@ endpoints: content: application/json: schema: - $ref: '#/models/Channel' + $ref: '#/models/PaymentChannel' patch: - operationId: extendChannelById - summary: Extend duration of Channel - description: This endpoint extends the duration of an existing payment Channel, increasing the block height at which the Channel will timeout. Only the payer (creator) or the channel can successfully call this endpoint. + operationId: extendPaymentChannelById + summary: Extend duration of PaymentChannel + description: This endpoint extends the duration of an existing PaymentChannel, increasing the block height at which the PaymentChannel will timeout. Only the payer (creator) or the PaymentChannel can successfully call this endpoint. tags: - - Channels + - PaymentChannels parameters: - - name: channelId + - name: paymentChannelId in: path - description: ID of the Channel to fetch + description: ID of the PaymentChannel to fetch required: true schema: type: string @@ -165,7 +165,7 @@ endpoints: properties: agreedEol: type: number - description: The new chain (increased) height at which this channel will expire. + description: The new chain (increased) height at which this PaymentChannel will expire. example: 2120399 responses: 200: @@ -173,31 +173,31 @@ endpoints: content: application/json: schema: - $ref: '#/models/Channel' - channel_resource_close: + $ref: '#/models/PaymentChannel' + payment_channel_resource_close: post: - operationId: closeChannel - summary: Close Channel - description: This endpoint closes the specified payment Channel and returns all unredeemed funds to the payee (the Channel's creator). Upon completion this Channel is effectively deleted and can never be used again. This method can only be called by target of the Channel with a valid voucher - any other invocation is an error. + operationId: closePaymentChannel + summary: Close PaymentChannel + description: This endpoint closes the specified PaymentChannel and returns all unredeemed funds to the payee (the PaymentChannel's creator). Upon completion this PaymentChannel is effectively deleted and can never be used again. This method can only be called by target of the PaymentChannel with a valid voucher - any other invocation is an error. tags: - - Channels + - PaymentChannel parameters: - - name: channelId + - name: paymentChannel in: path - description: ID of the Channel to fetch + description: ID of the PaymentChannel to fetch required: true schema: type: string responses: 200: description: Success - channel_resource_cancel: + payment_channel_resource_cancel: post: operationId: cancelChannel - summary: Schedule Channel for cancellation - description: This endpoint reduces the actual eol (effective end date) of the Channel in an attempt to free up the funds in the channel for earlier reclaming. This endpoint can only successfullly be called by the Channel's payer as the cancel message needs to originate from that account. Cancel doesn't immediately close a channel but instead reduces the lifetime of the channel leaving a grace period during which the payee can undo the cancellation by submitting a valid voucher, thereby proving that the channel is still in use. + summary: Schedule PaymentChannel for cancellation + description: This endpoint reduces the actual eol (effective end date) of the PaymentChannel in an attempt to free up the funds in the channel for earlier reclaming. This endpoint can only successfullly be called by the PaymentChannel's payer as the cancel message needs to originate from that account. Cancel doesn't immediately close a channel but instead reduces the lifetime of the channel leaving a grace period during which the payee can undo the cancellation by submitting a valid voucher, thereby proving that the channel is still in use. tags: - - Channels + - PaymentChannels parameters: - name: channelId in: path @@ -208,15 +208,15 @@ endpoints: responses: 200: description: Success - channel_resource_reclaim: + payment_channel_resource_reclaim: post: operationId: reclaimChannel summary: Reclaim unspent funds in Channel - description: This endpoint is used by the creator (payer) of a Channel to reclaim unspent funds when a Channel has timed out (the chain height has exceeded the eol of the Channel). It can only successfully be called by the Channel's payer on a timed out Channel. + description: This endpoint is used by the creator (payer) of a PaymentChannel to reclaim unspent funds when a PaymentChannel has timed out (the chain height has exceeded the eol of the PaymentChannel). It can only successfully be called by the PaymentChannel's payer on a timed out PaymentChannel. tags: - - Channels + - PaymentChannels parameters: - - name: channelId + - name: paymentChannelId in: path description: ID of the Channel to reclaim required: true @@ -225,17 +225,17 @@ endpoints: responses: 200: description: Success - channel_resource_redeem: + payment_channel_resource_redeem: post: operationId: redeemVoucher summary: Redeem Voucher - description: This endpoint accepts a voucher from the Channel target and redeems it. Upon checking the validity and successfully checking the voucher's condition the specified funds will be transfered from the channel to the target. + description: This endpoint accepts a voucher from the PaymentChannel target and redeems it. Upon checking the validity and successfully checking the voucher's condition the specified funds will be transfered from the channel to the target. tags: - - Channels + - PaymentChannels parameters: - - name: channelId + - name: paymentChannelId in: path - description: ID of the Channel to fetch + description: ID of the PaymentChannel to fetch required: true schema: type: string @@ -247,17 +247,17 @@ endpoints: responses: 200: description: Success - channel_resource_vouchers: + payment_channel_resource_vouchers: post: operationId: createVoucher summary: Creates Voucher - description: This endpoint accepts voucher details and returns a new signed voucher suitable for off chain transmission to the Channel target for later redemption. Only the Channel payer (creator) can call this endpoint successfully. + description: This endpoint accepts voucher details and returns a new signed voucher suitable for off chain transmission to the PaymentChannel target for later redemption. Only the PaymentChannel payer (creator) can call this endpoint successfully. tags: - - Channels + - PaymentChannels parameters: - - name: channelId + - name: paymentChannelId in: path - description: ID of the Channel to fetch + description: ID of the PaymentChannel to fetch required: true schema: type: string From 096d8a038351cae3196041ccbf256f1923d8e84e Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 27 Sep 2019 17:14:25 -0700 Subject: [PATCH 47/50] Linter error fixes --- api/actors.yml | 4 ++-- api/api.yml | 26 +++++++++++++------------- api/payment_channels.yml | 6 +++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/api/actors.yml b/api/actors.yml index 007739e..1a91866 100644 --- a/api/actors.yml +++ b/api/actors.yml @@ -133,8 +133,8 @@ endpoints: actor_resource: get: operationId: getActorByAddress - summary: Find Actor by ID - description: Return information about the Actor with the specified ID + summary: Find Actor by Address + description: Return information about the Actor with the specified Address tags: - Actors parameters: diff --git a/api/api.yml b/api/api.yml index 8d1aa57..1b09f5c 100644 --- a/api/api.yml +++ b/api/api.yml @@ -40,14 +40,6 @@ tags: - name: Blocks - - name: PaymentChannelModel - x-displayName: PaymentChannel - description: | - A PaymentChannel is setup between actors in the Filecoin system to enable off-chain payments with on-chain guarantees, making settlement more efficient. - - See the [Payment Channel Actor Description](https://github.com/filecoin-project/specs/blob/master/actors.md#payment-channel-actor) for more information. - - - name: ExecutedMessageModel x-displayName: ExecutedMessage description: | @@ -66,6 +58,14 @@ tags: x-displayName: Node description: | + - name: PaymentChannelModel + x-displayName: PaymentChannel + description: | + A PaymentChannel is setup between actors in the Filecoin system to enable off-chain payments with on-chain guarantees, making settlement more efficient. + + See the [Payment Channel Actor Description](https://github.com/filecoin-project/specs/blob/master/actors.md#payment-channel-actor) for more information. + + - name: StorageDealModel x-displayName: StorageDeal description: | @@ -114,11 +114,11 @@ x-tagGroups: - AskModel - BlockModel - BlockHeaderModel - - PaymentChannelModel - - StorageDealModel - ExecutedMessageModel - MessageModel - NodeModel + - PaymentChannelModel + - StorageDealModel - TipsetModel - VoucherModel info: @@ -131,10 +131,10 @@ info: servers: - url: http://127.0.0.1:3453/api/chain/v0 security: - - 'Bearer Token Authentication': [] + - BearerTokenAuth: [] components: securitySchemes: - 'Bearer Token Authentication': + BearerTokenAuth: type: http scheme: Bearer Token description: | @@ -185,7 +185,7 @@ components: paths: /actors: $ref: './actors.yml#/endpoints/actors_collection' - /actors/{actorId}: + /actors/{address}: $ref: './actors.yml#/endpoints/actor_resource' /chain/tipsets: $ref: './chain.yml#/endpoints/tipsets_collection' diff --git a/api/payment_channels.yml b/api/payment_channels.yml index 06bcb78..0a61399 100644 --- a/api/payment_channels.yml +++ b/api/payment_channels.yml @@ -108,7 +108,7 @@ endpoints: summary: Create new PaymentChannel description: This endpoint creates a new PaymentChannel with the specified characteristics tags: - - Channels + - PaymentChannels requestBody: content: application/json: @@ -182,7 +182,7 @@ endpoints: tags: - PaymentChannel parameters: - - name: paymentChannel + - name: paymentChannelId in: path description: ID of the PaymentChannel to fetch required: true @@ -199,7 +199,7 @@ endpoints: tags: - PaymentChannels parameters: - - name: channelId + - name: paymentChannelId in: path description: ID of the Channel to cancel required: true From 68f05dfabfa07291129f2ab30f0981e30765e6e2 Mon Sep 17 00:00:00 2001 From: Erik Ingenito Date: Fri, 27 Sep 2019 17:16:06 -0700 Subject: [PATCH 48/50] Updated HTML --- docs/index.html | 177 +++++++++++++++++++++++++++--------------------- 1 file changed, 99 insertions(+), 78 deletions(-) diff --git a/docs/index.html b/docs/index.html index ec2e45d..0389839 100644 --- a/docs/index.html +++ b/docs/index.html @@ -302,7 +302,7 @@ -

Filecoin JSON REST API (0.1.0)

Download OpenAPI specification:Download

Filecoin JSON REST API SPEC: erik.ingenito@protocol.ai

Filecoin JSON REST API Description

-

Authentication

Bearer Token Authentication

V0 of this API supports all or nothing authentication and authorization suitable for use by the owner/operator of the current node, and nothing else. Callers of the API must provide a bearer token included in the Authorization header of each request. This token should be provided by the node for use by the caller via some out of band mechanism (like a file created on the filesystem upon initialization or upon startup).

-

This API must be served over SSL/TLS. Future versions of the API can add more complex schemes.

+

Authentication

BearerTokenAuth

The authentication scheme for this API is implementation dependent. Implementations should feel free to use the scheme and granularity they deem fit. This document describes the scheme used by the go-filecoin daemon.

+

Go-filecoin will initially (v0) support a simple all or nothing authentication and authorization suitable for use by the owner/operator of the current node, and nothing else. Consumers of this API must provide a bearer token included in the Authorization header of each request. This token is provided by the go-filecoin node for use by the caller via some out of band mechanism (like a file created on the filesystem upon initialization or upon startup). More sophisticated authentication and authorization will follow.

+

The nature of this style of authentication makes it suitable for use only when served over SSL/TLS.

Here is an example of using a node provided bearer token and a node provided CA cert used for self-signed TLS with curl. This example assumes the cert and token both reside in the .filecoin folder and where generated by the go-filecoin daemon:

$ AUTH="Authorization: Bearer $(xxd -ps -u -c 1000 $HOME/.filecoin/api/admin.token)"
 $ curl -X GET --cacert $HOME/.filecoin/api/tls.cert --header "$AUTH" \
 > https://localhost:3453/api/filecoin/v0/tipsets
Security scheme type: HTTP
HTTP Authorization Scheme Bearer Token

Tipsets

List Tipsets

List Tipsets currently known to this node in reverse height order

-
query Parameters
nextPageToken
string

Next page token

+
Authorizations:
query Parameters
nextPageToken
string

Next page token

Responses

200

Success

401

Access token is missing or invalid

-
get /chain/tipsets
http://127.0.0.1:3453/api/chain/v0/chain/tipsets

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Fetch a Tipset by ID

Return information about the Tipset with the specified ID

-
path Parameters
tipsetId
required
string

ID of the Tipset to fetch

+
get /chain/tipsets
http://127.0.0.1:3453/api/chain/v0/chain/tipsets

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Fetch a Tipset by ID

Return information about the Tipset with the specified ID

+
Authorizations:
path Parameters
tipsetId
required
string

ID of the Tipset to fetch

Responses

200

Success

401

Access token is missing or invalid

-
get /chain/tipsets/{tipsetId}
http://127.0.0.1:3453/api/chain/v0/chain/tipsets/{tipsetId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "tipset",
  • "id": "zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ",
  • "height": 0,
  • "blocks":
    [
    ]
}

Blocks

Find block by ID

Return information about the Block with the specified ID

-
path Parameters
blockId
required
string

ID of the Block to fetch

+
get /chain/tipsets/{tipsetId}
http://127.0.0.1:3453/api/chain/v0/chain/tipsets/{tipsetId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "tipset",
  • "id": "zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ",
  • "height": 0,
  • "blocks":
    [
    ]
}

Blocks

Find block by ID

Return information about the Block with the specified ID

+
Authorizations:
path Parameters
blockId
required
string

ID of the Block to fetch

Responses

200

Success

401

Access token is missing or invalid

-
get /chain/blocks/{blockId}
http://127.0.0.1:3453/api/chain/v0/chain/blocks/{blockId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "block",
  • "id": "bafy2bzaceahv3kv4yllfdfrvtsr6rn5g5277dmxhx4tu4uvhvg2udpuate3te",
  • "header":
    {
    },
  • "executedMessages":
    [
    ]
}

Messages

Send a Message

This method sends a new Message to an Actor recipient.

-
Request Body schema: application/json
to
string
value
number
gasPrice
number
gasLimit
number
method
string
parameters
object

Responses

200

Success

+
get /chain/blocks/{blockId}
http://127.0.0.1:3453/api/chain/v0/chain/blocks/{blockId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "block",
  • "id": "bafy2bzaceahv3kv4yllfdfrvtsr6rn5g5277dmxhx4tu4uvhvg2udpuate3te",
  • "header":
    {
    },
  • "executedMessages":
    [
    ]
}

Messages

Send a Message

This method sends a new Message to an Actor recipient.

+
Authorizations:
Request Body schema: application/json
to
string
value
number
gasPrice
number
gasLimit
number
method
string
parameters
object

Responses

200

Success

401

Access token is missing or invalid

post /chain/messages
http://127.0.0.1:3453/api/chain/v0/chain/messages

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "to": "string",
  • "value": 0,
  • "gasPrice": 0,
  • "gasLimit": 0,
  • "method": "string",
  • "parameters": { }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "message",
  • "id": "string",
  • "nonce": 0,
  • "from": "string",
  • "to": "string",
  • "value": 0,
  • "gasPrice": 0,
  • "gasLimit": 0,
  • "method": "string",
  • "parameters": { },
  • "signature": "string"
}

Find ExecutedMessage by ID

Return information about the ExecutedMessage with the specified ID. An executed Message is one that has been included in a valid block in the chain. It includes return value and status information.

-
path Parameters
executedMessageId
required
string

ID of the executed message to fetch

+
Authorizations:
path Parameters
executedMessageId
required
string

ID of the executed message to fetch

Responses

200

Success

401

Access token is missing or invalid

-
get /chain/executed-messages/{executedMessageId}
http://127.0.0.1:3453/api/chain/v0/chain/executed-messages/{executedMessageId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "executedMessage",
  • "id": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "blockId": "bafy2bzacebakx3c5g22seerja562tqb32bhecp4w2quj4mhvmovy4oqzbr2u4",
  • "message":
    {
    },
  • "exitCode": 0,
  • "return": "3AE="
}

Actors

List Actors

List Actors currently known to this node in ID order

-
query Parameters
nextPageToken
string

Next page token

+
get /chain/executed-messages/{executedMessageId}
http://127.0.0.1:3453/api/chain/v0/chain/executed-messages/{executedMessageId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "executedMessage",
  • "id": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "blockId": "bafy2bzacebakx3c5g22seerja562tqb32bhecp4w2quj4mhvmovy4oqzbr2u4",
  • "message":
    {
    },
  • "exitCode": 0,
  • "return": "3AE="
}

Actors

List Actors

List Actors currently known to this node in address order

+
Authorizations:
query Parameters
nextPageToken
string

Next page token

Responses

200

Success

-
get /actors
http://127.0.0.1:3453/api/chain/v0/actors

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Find Actor by ID

Return information about the Actor with the specified ID

-
path Parameters
actorId
required
string

ID of the Actor to fetch

+
get /actors
http://127.0.0.1:3453/api/chain/v0/actors

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Find Actor by Address

Return information about the Actor with the specified Address

+
Authorizations:
path Parameters
address
required
string

The address of the Actor to fetch

Responses

200

Success

-
get /actors/{actorId}
http://127.0.0.1:3453/api/chain/v0/actors/{actorId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "actor",
  • "id": "string",
  • "role": "init",
  • "nonce": 0,
  • "balance": 0,
  • "stateRoot": "string",
  • "info": { }
}

Channels

Redeem Voucher

This endpoint accepts a voucher from the Channel target and redeems it. Upon checking the validity and successfully checking the voucher's condition the specified funds will be transfered from the channel to the target.

-
path Parameters
channelId
required
string

ID of the Channel to fetch

+
get /actors/{address}
http://127.0.0.1:3453/api/chain/v0/actors/{address}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "actor",
  • "address": "string",
  • "role": "Init",
  • "nonce": 0,
  • "balance": 0,
  • "head": "string",
  • "codeCid": "string",
  • "info": { }
}

PaymentChannels

Redeem Voucher

This endpoint accepts a voucher from the PaymentChannel target and redeems it. Upon checking the validity and successfully checking the voucher's condition the specified funds will be transfered from the channel to the target.

+
Authorizations:
path Parameters
paymentChannelId
required
string

ID of the PaymentChannel to fetch

Request Body schema: applications/json
amount
number

The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed.

validAt
number

The block height on or after which this Voucher can be redeemed.

condition
object

The condition that must evaluate to true for this Voucher to be redeemed.

signature
string

The signature over all the data in this Voucher

Responses

200

Success

-
post /actors/channels/{channelId}/redeem
http://127.0.0.1:3453/api/chain/v0/actors/channels/{channelId}/redeem

Request samples

Content type
applications/json
Copy
Expand all Collapse all
{
  • "amount": 0.19296864,
  • "validAt": 2120399,
  • "condition": "TODO",
  • "signature": "TODO"
}

Creates Voucher

This endpoint accepts voucher details and returns a new signed voucher suitable for off chain transmission to the Channel target for later redemption. Only the Channel payer (creator) can call this endpoint successfully.

-
path Parameters
channelId
required
string

ID of the Channel to fetch

+
post /payment_channels/{paymentChannelId}/redeem
http://127.0.0.1:3453/api/chain/v0/payment_channels/{paymentChannelId}/redeem

Request samples

Content type
applications/json
Copy
Expand all Collapse all
{
  • "amount": 0.19296864,
  • "validAt": 2120399,
  • "condition": "TODO",
  • "signature": "TODO"
}

Creates Voucher

This endpoint accepts voucher details and returns a new signed voucher suitable for off chain transmission to the PaymentChannel target for later redemption. Only the PaymentChannel payer (creator) can call this endpoint successfully.

+
Authorizations:
path Parameters
paymentChannelId
required
string

ID of the PaymentChannel to fetch

Request Body schema: applications/json
amount
number

The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed.

validAt
number

The block height on or after which this Voucher can be redeemed.

condition
object

The condition that must evaluate to true for this Voucher to be redeemed.

signature
string

The signature over all the data in this Voucher

Responses

200

Success

-
post /actors/channels/{channelId}/vouchers
http://127.0.0.1:3453/api/chain/v0/actors/channels/{channelId}/vouchers

Request samples

Content type
applications/json
Copy
Expand all Collapse all
{
  • "amount": 0.19296864,
  • "validAt": 2120399,
  • "condition": "TODO",
  • "signature": "TODO"
}

List Channels

List all payment channels known to this node

-
query Parameters
nextPageToken
string

Next page token

+
post /payment_channels/{paymentChannelId}/vouchers
http://127.0.0.1:3453/api/chain/v0/payment_channels/{paymentChannelId}/vouchers

Request samples

Content type
applications/json
Copy
Expand all Collapse all
{
  • "amount": 0.19296864,
  • "validAt": 2120399,
  • "condition": "TODO",
  • "signature": "TODO"
}

List Payment Channels

List all PaymentChannels known to this node

+
Authorizations:
query Parameters
nextPageToken
string

Next page token

Responses

200

Success

-
get /channels
http://127.0.0.1:3453/api/chain/v0/channels

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Create new payment Channel

This endpoint creates a new payment Channel with the specified characteristics

-
Request Body schema: application/json
targetActorId
string

The address of the account to which funds will be transferred by this Channel upon successful redemption of vouchers

-
amount
number

The total amount of FIL that is in this Channel and payable to the target

-
agreedEol
number

The original chain height at which this Channel will expire. Specified upon creation and optionally extended by the creator of the channel.

+
get /payment_channels
http://127.0.0.1:3453/api/chain/v0/payment_channels

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Create new PaymentChannel

This endpoint creates a new PaymentChannel with the specified characteristics

+
Authorizations:
Request Body schema: application/json
targetActorId
string

The address of the account to which funds will be transferred by this PaymentChannel upon successful redemption of vouchers

+
amount
number

The total amount of FIL that is in this PaymentChannel and payable to the target

+
agreedEol
number

The original chain height at which this PaymentChannel will expire. Specified upon creation and optionally extended by the creator of the channel.

Responses

200

Success

-
post /channels
http://127.0.0.1:3453/api/chain/v0/channels

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "agreedEol": 2120399
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Find Channel by ID

Find a payment Channel by ID and return it

-
path Parameters
channelId
required
string

ID of the Channel to fetch

+
post /payment_channels
http://127.0.0.1:3453/api/chain/v0/payment_channels

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "agreedEol": 2120399
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Find PaymentChannel by ID

Find a PaymentChannel by ID and return it

+
Authorizations:
path Parameters
paymentChannelId
required
string

ID of the PaymentChannel to fetch

Responses

200

Success

-
get /channels/{channelId}
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "channel",
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "amountRedeemed": 0,
  • "agreedEol": 2120399,
  • "actualEol": 0,
  • "condition": "TODO",
  • "redeemed": true
}

Extend duration of Channel

This endpoint extends the duration of an existing payment Channel, increasing the block height at which the Channel will timeout. Only the payer (creator) or the channel can successfully call this endpoint.

-
path Parameters
channelId
required
string

ID of the Channel to fetch

-
Request Body schema: applications/json
agreedEol
number

The new chain (increased) height at which this channel will expire.

+
get /payment_channels/{paymentChannelId}
http://127.0.0.1:3453/api/chain/v0/payment_channels/{paymentChannelId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "paymentChannel",
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "amountRedeemed": 0,
  • "agreedEol": 2120399,
  • "actualEol": 0,
  • "condition": "TODO",
  • "redeemed": true
}

Extend duration of PaymentChannel

This endpoint extends the duration of an existing PaymentChannel, increasing the block height at which the PaymentChannel will timeout. Only the payer (creator) or the PaymentChannel can successfully call this endpoint.

+
Authorizations:
path Parameters
paymentChannelId
required
string

ID of the PaymentChannel to fetch

+
Request Body schema: applications/json
agreedEol
number

The new chain (increased) height at which this PaymentChannel will expire.

Responses

200

Success

-
patch /channels/{channelId}
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}

Request samples

Content type
applications/json
Copy
Expand all Collapse all
{
  • "agreedEol": 2120399
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "channel",
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "amountRedeemed": 0,
  • "agreedEol": 2120399,
  • "actualEol": 0,
  • "condition": "TODO",
  • "redeemed": true
}

Close Channel

This endpoint closes the specified payment Channel and returns all unredeemed funds to the payee (the Channel's creator). Upon completion this Channel is effectively deleted and can never be used again. This method can only be called by target of the Channel with a valid voucher - any other invocation is an error.

-
path Parameters
channelId
required
string

ID of the Channel to fetch

+
patch /payment_channels/{paymentChannelId}
http://127.0.0.1:3453/api/chain/v0/payment_channels/{paymentChannelId}

Request samples

Content type
applications/json
Copy
Expand all Collapse all
{
  • "agreedEol": 2120399
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "paymentChannel",
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "amountRedeemed": 0,
  • "agreedEol": 2120399,
  • "actualEol": 0,
  • "condition": "TODO",
  • "redeemed": true
}

Schedule PaymentChannel for cancellation

This endpoint reduces the actual eol (effective end date) of the PaymentChannel in an attempt to free up the funds in the channel for earlier reclaming. This endpoint can only successfullly be called by the PaymentChannel's payer as the cancel message needs to originate from that account. Cancel doesn't immediately close a channel but instead reduces the lifetime of the channel leaving a grace period during which the payee can undo the cancellation by submitting a valid voucher, thereby proving that the channel is still in use.

+
Authorizations:
path Parameters
paymentChannelId
required
string

ID of the Channel to cancel

Responses

200

Success

-
post /channels/{channelId}/close
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}/close

Schedule Channel for cancellation

This endpoint reduces the actual eol (effective end date) of the Channel in an attempt to free up the funds in the channel for earlier reclaming. This endpoint can only successfullly be called by the Channel's payer as the cancel message needs to originate from that account. Cancel doesn't immediately close a channel but instead reduces the lifetime of the channel leaving a grace period during which the payee can undo the cancellation by submitting a valid voucher, thereby proving that the channel is still in use.

-
path Parameters
channelId
required
string

ID of the Channel to cancel

+
post /payment_channels/{paymentChannelId}/cancel
http://127.0.0.1:3453/api/chain/v0/payment_channels/{paymentChannelId}/cancel

Reclaim unspent funds in Channel

This endpoint is used by the creator (payer) of a PaymentChannel to reclaim unspent funds when a PaymentChannel has timed out (the chain height has exceeded the eol of the PaymentChannel). It can only successfully be called by the PaymentChannel's payer on a timed out PaymentChannel.

+
Authorizations:
path Parameters
paymentChannelId
required
string

ID of the Channel to reclaim

Responses

200

Success

-
post /channels/{channelId}/cancel
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}/cancel

Reclaim unspent funds in Channel

This endpoint is used by the creator (payer) of a Channel to reclaim unspent funds when a Channel has timed out (the chain height has exceeded the eol of the Channel). It can only successfully be called by the Channel's payer on a timed out Channel.

-
path Parameters
channelId
required
string

ID of the Channel to reclaim

-

Responses

200

Success

-
post /channels/{channelId}/reclaim
http://127.0.0.1:3453/api/chain/v0/channels/{channelId}/reclaim

Node

Return Node information

Get information about the current Filecoin Node.

-

Responses

200

Success

+
post /payment_channels/{paymentChannelId}/reclaim
http://127.0.0.1:3453/api/chain/v0/payment_channels/{paymentChannelId}/reclaim

Node

Return Node information

Get information about the current Filecoin Node.

+
Authorizations:

Responses

200

Success

get /control/node
http://127.0.0.1:3453/api/chain/v0/control/node

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "node",
  • "id": "QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq",
  • "addresses":
    [
    ],
  • "version": "1.0.2",
  • "commit": "93540266a2a9972e91947a538ce70dc9c4e8077e",
  • "protocol":
    {
    },
  • "bitswapStats":
    {
    },
  • "config": { }
}

Pieces

Add a Piece to local storage

This method imports data into the local node's temporary storage so that it can be transferred to a storage miner.

-
Request Body schema: application/octet-stream
string <binary>

Responses

200

Success

+
Authorizations:
Request Body schema: application/octet-stream
string <binary>

Responses

200

Success

post /control/pieces
http://127.0.0.1:3453/api/chain/v0/control/pieces

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "QmQXJPWYEnt9GoYu5SXkrKMWovCX78YBjFzRSJF63Zobnj"
}

Fetch piece data

Fetch piece data from the local node's temporary storage.

-
path Parameters
pieceId
required
string

ID of the piece previously returned by corresponding createPiece POST method.

+
Authorizations:
path Parameters
pieceId
required
string

ID of the piece previously returned by corresponding createPiece POST method.

Responses

200

If the request succeeds, the server returns the original data used to create the piece.

get /control/pieces/{pieceId}
http://127.0.0.1:3453/api/chain/v0/control/pieces/{pieceId}

Asks

Lists all Asks in the market

This endpoint returns all Asks known to the current node ordered lexically by the Ask ID

-
query Parameters
minerId
string
Example: minerId=t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq

Filter returned asks by minerId. Only Asks from this miner will be returned.

+
Authorizations:
query Parameters
minerId
string
Example: minerId=t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq

Filter returned asks by minerId. Only Asks from this miner will be returned.

active
boolean
Example: active=true

Filter returned asks to include only those that are still active, meaning the current node's tipset height doesn't exceed that of the Ask's specified expiration.

nextPageToken
string

Next page token

Responses

200

Success

get /market/asks
http://127.0.0.1:3453/api/chain/v0/market/asks

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Order this mining node to publish a new Ask on the network

This method creates a new storage market ask and publishes it for storage buyers to find and act on.

-
Request Body schema: application/json
kind
string
Value: "ask"
price
number

The price in FIL per byte per blocktime being proposed in this Ask.

+
Authorizations:
Request Body schema: application/json
kind
string
Value: "ask"
price
number

The price in FIL per byte per blocktime being proposed in this Ask.

expiry
number

The block height at which this Ask expires.

Responses

200

Success

post /market/asks
http://127.0.0.1:3453/api/chain/v0/market/asks

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "kind": "ask",
  • "price": 1e-11,
  • "expiry": 392265
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "ask",
  • "minerId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "price": 1e-11,
  • "expiry": 392265
}

Fetch Ask data

Fetch data about an Ask by the Ask ID.

-
path Parameters
askId
required
string

ID of the Ask to fetch.

+
Authorizations:
path Parameters
askId
required
string

ID of the Ask to fetch.

Responses

200

If the request succeeds, the server returns the requested Ask.

-
get /market/asks/{askId}
http://127.0.0.1:3453/api/chain/v0/market/asks/{askId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "ask",
  • "minerId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "price": 1e-11,
  • "expiry": 392265
}

Deals

Fetch Deal information known to this node

This endpoint returns a list of all deals known to the current node.

-
query Parameters
minerId
string
Example: minerId=t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq

Filter returned Deals by minerId. Only Deals made with (or proposed to) the specified miner will be returned.

+
get /market/asks/{askId}
http://127.0.0.1:3453/api/chain/v0/market/asks/{askId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "ask",
  • "minerId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "price": 1e-11,
  • "expiry": 392265
}

StorageDeals

Fetch StorageDeal information known to this node

This endpoint returns a list of all deals known to the current node.

+
Authorizations:
query Parameters
minerId
string
Example: minerId=t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq

Filter returned Deals by minerId. Only Deals made with (or proposed to) the specified miner will be returned.

clientId
string
Example: clientId=t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy

Filter returned Deals by clientId. Only Deals initiated by the specified client will be returned.

pieceId
string
Example: pieceId=QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY

Filter returned Deals by pieceId. Only Deals made to store the specified pieceId will be returned.

nextPageToken
string

Next page token

Responses

200

Success

-
get /market/deals
http://127.0.0.1:3453/api/chain/v0/market/deals

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Initiate a storage deal

This endpoint initiates a storage deal with a storage miner. It will create an appropriate payment Channel and vouchers, and pass the deal to the target storage miner to await acceptance or rejection.

-
Request Body schema: application/json
minerActorId
string

The ID of the storage miner that is fulfilling this Deal

+
get /market/storage_deals
http://127.0.0.1:3453/api/chain/v0/market/storage_deals

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Initiate a StorageDeal

This endpoint initiates a storage deal with a storage miner. It will create an appropriate PaymentChannel and vouchers, and pass the deal to the target storage miner to await acceptance or rejection.

+
Authorizations:
Request Body schema: application/json
minerActorId
string

The ID of the storage miner that is fulfilling this StorageDeal

pieceId
string

The ID of the Picee being stored

-
askId
string

The ID of the Ask from the target miner for which this Deal is to be proposed

-
duration
number

The duration of this storage Deal in blocks

-
status
string
Enum: "unknown" "rejected" "accepted" "started" "failed" "staged" "sealing" "complete"

The current status of the Deal

+
askId
string

The ID of the Ask from the target miner for which this StorageDeal is to be proposed

+
duration
number

The duration of this StorageDeal in blocks

+
status
string
Enum: "unknown" "rejected" "accepted" "started" "failed" "staged" "sealing" "complete"

The current status of the StorageDeal

Responses

200

Success

-
post /market/deals
http://127.0.0.1:3453/api/chain/v0/market/deals

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "minerActorId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "pieceId": "QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY",
  • "askId": 0,
  • "duration": 288000,
  • "status": "complete"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Actor

This is a description

-
kind
string
Value: "actor"
id
string
role
string
Enum: "init" "account" "miner" "storageMarket" "paymentBroker"
nonce
number

Nonce is the nonce expected on the next message from this actor. Messages are processed in strict, contiguous nonce order.

+
post /market/storage_deals
http://127.0.0.1:3453/api/chain/v0/market/storage_deals

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "minerActorId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "pieceId": "QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY",
  • "askId": 0,
  • "duration": 288000,
  • "status": "complete"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Actor

Actor is the central abstraction of entities in the system.

+

See the Actor Specification and the Actor Definition for more information.

+

Both individual accounts, as well as contracts (user & system level) are represented as actors. An actor has the following core functionality implemented on a system level:

+
    +
  • track a Filecoin balance, using the Balance field
  • +
  • execute code stored in the Code field
  • +
  • read & write memory
  • +
  • replay protection, using the Nonce field
  • +
+

Value sent to a non-existent address will be tracked as an empty actor that has a Balance but nil Code and Memory. You must nil check Code cids before comparing them.

+

More specific capabilities for individual accounts or contract specific must be implemented inside the code.

+
kind
string
Value: "actor"
address
string

The identifier that refers to an Actor in the Filecoin state. All Actors have an address. To learn more, take a look at the address spec..

+
role
string
Enum: "Init" "Account" "StorageMiner" "StorageMarket" "PaymentChannel" "MultisigAccount"
nonce
number

Nonce is the nonce expected on the next message from this actor. Messages are processed in strict, contiguous nonce order.

balance
number

Balance is the amount of FIL in the actor's account.

-
stateRoot
string

The CID of the root of the actor's state tree.

-
info
object or object or object or object or object
Copy
Expand all Collapse all
{
  • "kind": "actor",
  • "id": "string",
  • "role": "init",
  • "nonce": 0,
  • "balance": 0,
  • "stateRoot": "string",
  • "info": { }
}

Ask

id
string

The ID of this Ask.

+
head
string

The CID (Content Identifier) of the root of the Actor's state tree.

+
codeCid
string

The CID (Content Identifier) of the VM code for this actor's implementation (or a constant for actors implemented in Go code). Code may be nil for an uninitialized actor (which exists because it has received a balance)

+
info
object or object or object or object or object
Copy
Expand all Collapse all
{
  • "kind": "actor",
  • "address": "string",
  • "role": "Init",
  • "nonce": 0,
  • "balance": 0,
  • "head": "string",
  • "codeCid": "string",
  • "info": { }
}

Ask

An Ask is a price advertisement by a storage miner for storing data.

+
id
string

The ID of this Ask.

kind
string
Value: "ask"
minerId
string

The ID (address) of the miner Actor that published this Ask.

price
number

The price in FIL per byte per blocktime being proposed in this Ask.

expiry
number

The block height at which this Ask expires.

Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "ask",
  • "minerId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "price": 1e-11,
  • "expiry": 392265
}

Block

A Block contains information relevant to a particular point in time over which the network may achieve consensus. Blocks are mined as part of the consensus mechanism by elected miners and then included in a Tipset.

+

See the BlockHeader Specificiation for more information.

kind
string
Value: "block"
id
string

The CID (Content Identifier) of the Block

-
header
object (BlockHeader)
executedMessages
Array of objects (ExecutedMessage)
Copy
Expand all Collapse all
{
  • "kind": "block",
  • "id": "bafy2bzaceahv3kv4yllfdfrvtsr6rn5g5277dmxhx4tu4uvhvg2udpuate3te",
  • "header":
    {
    },
  • "executedMessages":
    [
    ]
}

BlockHeader

A BlockHeader contains information relating to a Block. In the Filecoin specification there is no difference between a BlockHeader and a Block, but for the purposees of this API a Block wraps a BlockHeader and additionally contains the full contents of all messages included in that Block.

+
header
object (BlockHeader)
executedMessages
Array of objects (ExecutedMessage)
Copy
Expand all Collapse all
{
  • "kind": "block",
  • "id": "bafy2bzaceahv3kv4yllfdfrvtsr6rn5g5277dmxhx4tu4uvhvg2udpuate3te",
  • "header":
    {
    },
  • "executedMessages":
    [
    ]
}

BlockHeader

A BlockHeader contains information relating to a Block. In the Filecoin specification there is no difference between a BlockHeader and a Block, but for the purposees of this API a Block wraps a BlockHeader and additionally contains the full contents of all messages included in that Block.

+

See the BlockHeader Specificiation for more information.

kind
string
Value: "blockHeader"
id
string

The CID (Content Identifier) of the Block

height
number

Height is the chain height of this block.

minerId
string

The address of the miner Actor that mined this block.

-
messagesCID
string

The CID (Content Identifier) of the of bls and secpk signed trees of Messages included in this Block.

-
recieptsCID
string

The CID (Content Identifier) of the of tree containing receipts for the messages included in this block. Receipts are the return values and errors codes resulting from messages.

+
messagesCid
string

The CID (Content Identifier) of the of bls and secpk signed trees of Messages included in this Block.

+
recieptsCid
string

The CID (Content Identifier) of the of tree containing receipts for the messages included in this block. Receipts are the return values and errors codes resulting from messages.

tickets
Array of objects
electionProof
string

A base64 encoded byte array that represents the proof that the miner of this Block is a leader at this round.

parentTipsetId
string

The ID of the Tipset on which this block was based. In the spec this field is defined as an array of Block IDs, which is effectively equivalent to a Tipset ID in this API.

parentWeight
number

parentWeight is the aggregate chain weight (spec) of the parent Tipset.

@@ -444,38 +457,46 @@
timestamp
number

The block Timestamp is used to enforce a form of block delay by honest miners. Unix time UTC timestamp (in seconds) stored as an unsigned integer.

blsAggregate
string

A base64 encoded representation of the aggregated BLS signature for all the messages in this block that were signed using BLS signatures

blockSig
string

A base64 encoded representation of the signature over the hash of this entire block with the miner's worker key to ensure that it is not tampered with after creation

-
Copy
Expand all Collapse all
{
  • "kind": "blockHeader",
  • "id": "bafy2bzaceahv3kv4yllfdfrvtsr6rn5g5277dmxhx4tu4uvhvg2udpuate3te",
  • "height": 200193,
  • "minerId": "t2usk2yzfu23uq2wyuc3w6ov233nxyhkysju2suba",
  • "messagesCID": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "recieptsCID": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "tickets":
    [
    ],
  • "electionProof": "V8896JC51ikqPVqYUCVbHzUfaOgjTBF6BYc8G/2P9CJMAg8MJzOi1j3F8hJSj/C6tKTLd9qHpLEjRpiGUzz04gE=",
  • "parentTipsetId": "bafy2bzacebnsn4ywt2cgejgp32rgsv4vaylrqe32axw4cfadxhoutxxb7puzs",
  • "parentWeight": 2001934,
  • "stateRoot": "bafyreih4xzehg7qudgdwve27pvmtblnc3ib5ql7haeouainjnavyo46eoy",
  • "timestamp": 1568753711,
  • "blsAggregate": "TODO",
  • "blockSig": "TODO"
}

Channel

id
string

The ID of this Channel

-
kind
string
Value: "channel"
targetActorId
string

The address of the account to which funds will be transferred by this Channel upon successful redemption of vouchers

-
amount
number

The total amount of FIL that is in this Channel and payable to the target

+
Copy
Expand all Collapse all
{
  • "kind": "blockHeader",
  • "id": "bafy2bzaceahv3kv4yllfdfrvtsr6rn5g5277dmxhx4tu4uvhvg2udpuate3te",
  • "height": 200193,
  • "minerId": "t2usk2yzfu23uq2wyuc3w6ov233nxyhkysju2suba",
  • "messagesCid": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "recieptsCid": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "tickets":
    [
    ],
  • "electionProof": "V8896JC51ikqPVqYUCVbHzUfaOgjTBF6BYc8G/2P9CJMAg8MJzOi1j3F8hJSj/C6tKTLd9qHpLEjRpiGUzz04gE=",
  • "parentTipsetId": "bafy2bzacebnsn4ywt2cgejgp32rgsv4vaylrqe32axw4cfadxhoutxxb7puzs",
  • "parentWeight": 2001934,
  • "stateRoot": "bafyreih4xzehg7qudgdwve27pvmtblnc3ib5ql7haeouainjnavyo46eoy",
  • "timestamp": 1568753711,
  • "blsAggregate": "TODO",
  • "blockSig": "TODO"
}

ExecutedMessage

kind
string
Value: "executedMessage"
id
string

The CID (Content Identifier) of this ExecutedMessage

+
blockId
string

The CID of the mined block that included this ExecutedMessage.

+
message
object (Message)
exitCode
number

The exit value returned by the method this message was sent to. 0 is success, anything else is an error code in unix style.

+
return
object

The base64 encoded return values, if any, from processing a message. This can be non-empty even in the case of error (e.g., to provide programmatically readable detail about errors).

+
Copy
Expand all Collapse all
{
  • "kind": "executedMessage",
  • "id": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "blockId": "bafy2bzacebakx3c5g22seerja562tqb32bhecp4w2quj4mhvmovy4oqzbr2u4",
  • "message":
    {
    },
  • "exitCode": 0,
  • "return": "3AE="
}

Message

A Message is an exchange of information between two actors modeled as a function call. Messages are the equivalent of transactions in Ethereum.

+

See the Message Specification for more information.

+
kind
string
Value: "message"
id
string
nonce
number
from
string
to
string
value
number
gasPrice
number
gasLimit
number
method
string
parameters
object
signature
string
Copy
Expand all Collapse all
{
  • "kind": "message",
  • "id": "string",
  • "nonce": 0,
  • "from": "string",
  • "to": "string",
  • "value": 0,
  • "gasPrice": 0,
  • "gasLimit": 0,
  • "method": "string",
  • "parameters": { },
  • "signature": "string"
}

Node

kind
string
Value: "node"
id
string
addresses
Array of strings

List of peer (network) addresses

+
version
string
commit
string
protocol
object
bitswapStats
object
config
object

Full JSON representation of the node's current configuration

+
Copy
Expand all Collapse all
{
  • "kind": "node",
  • "id": "QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq",
  • "addresses":
    [
    ],
  • "version": "1.0.2",
  • "commit": "93540266a2a9972e91947a538ce70dc9c4e8077e",
  • "protocol":
    {
    },
  • "bitswapStats":
    {
    },
  • "config": { }
}

PaymentChannel

A PaymentChannel is setup between actors in the Filecoin system to enable off-chain payments with on-chain guarantees, making settlement more efficient.

+

See the Payment Channel Actor Description for more information.

+
id
string

The ID of this PaymentChannel

+
kind
string
Value: "paymentChannel"
targetActorId
string

The address of the account to which funds will be transferred by this PaymentChannel upon successful redemption of vouchers

+
amount
number

The total amount of FIL that is in this PaymentChannel and payable to the target

amountRedeemed
number

The total amount of FIL that has already been transfered to the target. This value cannot ever exceed amount.

-
agreedEol
number

The original chain height at which this Channel will expire. Specified upon creation and optionally extended by the creator of the channel.

-
actualEol
number

The actual expiration for the payment Channel which can differ from agreedEol when the payment channel is in dispute

+
agreedEol
number

The original chain height at which this PaymentChannel will expire. Specified upon creation and optionally extended by the creator of the channel.

+
actualEol
number

The actual expiration for the payment PaymentChannel which can differ from agreedEol when the payment channel is in dispute

condition
object

The condition specified in the most recent payment voucher for which a redemption attempt was made.

-
redeemed
boolean

A flag indicated whether or not Redeem has been called on the payment Channel yet. This is necessary because AmountRedeemed can still be zero in the event of a zero-value voucher

-
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "channel",
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "amountRedeemed": 0,
  • "agreedEol": 2120399,
  • "actualEol": 0,
  • "condition": "TODO",
  • "redeemed": true
}

Deal

id
string

The ID of this Deal

-
kind
string
Value: "deal"
minerActorId
string

The ID of the storage miner that is fulfilling this Deal

-
clientActorId
string

The ID of the client initiating the storage Deal (will typically be the owner of the current node)

+
redeemed
boolean

A flag indicated whether or not Redeem has been called on the payment PaymentChannel yet. This is necessary because AmountRedeemed can still be zero in the event of a zero-value voucher

+
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "paymentChannel",
  • "targetActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "amount": 0.19296864,
  • "amountRedeemed": 0,
  • "agreedEol": 2120399,
  • "actualEol": 0,
  • "condition": "TODO",
  • "redeemed": true
}

StorageDeal

A StorageDeal represents the agreement between between two Actors; one Actor paying the other (via a PaymentChannel) to store data on their behalf.

+

See a description of how StorageDeals work in the Filecoin Storage Market Specification

+
id
string

The ID of this StorageDeal

+
kind
string
Value: "storageDeal"
minerActorId
string

The ID of the storage miner that is fulfilling this StorageDeal

+
clientActorId
string

The ID of the client initiating the StorageDeal (will typically be the owner of the current node)

pieceId
string

The ID of the Picee being stored

size
number

Size of the Piece being stored in bytes

totalPrice
number

The total price in FIL that will be paid for the entire storage operation

-
duration
number

The duration of this storage Deal in blocks

-
status
string
Enum: "unknown" "rejected" "accepted" "started" "failed" "staged" "sealing" "complete"

The current status of the Deal

-
paymentInfo
object
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "deal",
  • "minerActorId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "clientActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "pieceId": "QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY",
  • "size": 67003,
  • "totalPrice": 0.19296864,
  • "duration": 288000,
  • "status": "complete",
  • "paymentInfo":
    {
    }
}

ExecutedMessage

kind
string
Value: "executedMessage"
id
string

The CID (Content Identifier) of this ExecutedMessage

-
blockId
string

The CID of the mined block that included this ExecutedMessage.

-
message
object (Message)
exitCode
number

The exit value returned by the method this message was sent to. 0 is success, anything else is an error code in unix style.

-
return
object

The base64 encoded return values, if any, from processing a message. This can be non-empty even in the case of error (e.g., to provide programmatically readable detail about errors).

-
Copy
Expand all Collapse all
{
  • "kind": "executedMessage",
  • "id": "bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a",
  • "blockId": "bafy2bzacebakx3c5g22seerja562tqb32bhecp4w2quj4mhvmovy4oqzbr2u4",
  • "message":
    {
    },
  • "exitCode": 0,
  • "return": "3AE="
}

Message

kind
string
Value: "message"
id
string
nonce
number
from
string
to
string
value
number
gasPrice
number
gasLimit
number
method
string
parameters
object
signature
string
Copy
Expand all Collapse all
{
  • "kind": "message",
  • "id": "string",
  • "nonce": 0,
  • "from": "string",
  • "to": "string",
  • "value": 0,
  • "gasPrice": 0,
  • "gasLimit": 0,
  • "method": "string",
  • "parameters": { },
  • "signature": "string"
}

Node

kind
string
Value: "node"
id
string
addresses
Array of strings

List of peer (network) addresses

-
version
string
commit
string
protocol
object
bitswapStats
object
config
object

Full JSON representation of the node's current configuration

-
Copy
Expand all Collapse all
{
  • "kind": "node",
  • "id": "QmeGwW4Nm543yYe5gchbETzzpcUJsPc7xtLkj7g5GCmMLq",
  • "addresses":
    [
    ],
  • "version": "1.0.2",
  • "commit": "93540266a2a9972e91947a538ce70dc9c4e8077e",
  • "protocol":
    {
    },
  • "bitswapStats":
    {
    },
  • "config": { }
}

Tipset

kind
string
Value: "tipset"
id
string
height
number
blocks
Array of objects (BlockHeader)
Copy
Expand all Collapse all
{
  • "kind": "tipset",
  • "id": "zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ",
  • "height": 0,
  • "blocks":
    [
    ]
}

Voucher

kind
string
Value: "voucher"
channelId
string

The ID of the payment Channel this Voucher is redeemable against.

+
duration
number

The duration of this StorageDeal in blocks

+
status
string
Enum: "unknown" "rejected" "accepted" "started" "failed" "staged" "sealing" "complete"

The current status of the StorageDeal

+
paymentInfo
object
Copy
Expand all Collapse all
{
  • "id": "string",
  • "kind": "storageDeal",
  • "minerActorId": "t2ytzk7whxrjb77kg4wd5fqy2cfse5jxajkqczfcq",
  • "clientActorId": "t17vmiuyzqa3ygd4gsj5rsgglbj737wyztb4cohfy",
  • "pieceId": "QmYRHQCRVSznLwaR8kXtVH4KSZU5fqFPPSkxv9xsJV2QCY",
  • "size": 67003,
  • "totalPrice": 0.19296864,
  • "duration": 288000,
  • "status": "complete",
  • "paymentInfo":
    {
    }
}

Tipset

A TipSet is a set of blocks that have the same parent set and same number of tickets, which implies they will have been mined at the same height. A TipSet can contain multiple blocks if more than one miner successfully mines a block at the same height as another miner.

+

See the Tipset Specification and the [Tipset Description] in the consensus specification for more information

+
kind
string
Value: "tipset"
id
string
height
number
blocks
Array of objects (BlockHeader)
Copy
Expand all Collapse all
{
  • "kind": "tipset",
  • "id": "zDPWYqFCyaQ9QJHr1qWZ19rFg3YRkcuXREkvpiHRJZhGN5T8SnyJ",
  • "height": 0,
  • "blocks":
    [
    ]
}

Voucher

kind
string
Value: "voucher"
paymentChannelId
string

The ID of the PaymentChannel this Voucher is redeemable against.

payer
string

The Actor ID (address) of the creator of the payment channel for this voucher.

target
string

The Actor ID (address) of the recipient of the funds in this voucher.

amount
number

The amount of FIL this Voucher is worth. This amount is sent to the target when this voucher is redeemed.

validAt
number

The block height on or after which this Voucher can be redeemed.

condition
object

The condition that must evaluate to true for this Voucher to be redeemed.

signature
string

The signature over all the data in this Voucher

-
Copy
Expand all Collapse all
{
  • "kind": "voucher",
  • "channelId": "TODO",
  • "payer": "TODO",
  • "target": "TODO",
  • "amount": 0.19296864,
  • "validAt": 2120399,
  • "condition": "TODO",
  • "signature": "TODO"
}
+
Copy
Expand all Collapse all
{
  • "kind": "voucher",
  • "paymentChannelId": "TODO",
  • "payer": "TODO",
  • "target": "TODO",
  • "amount": 0.19296864,
  • "validAt": 2120399,
  • "condition": "TODO",
  • "signature": "TODO"
}