This repository was archived by the owner on Oct 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
140 additions
and
6,747 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,4 @@ jspm_packages | |
bin | ||
.idea | ||
docs | ||
src/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
language: node_js | ||
node_js: | ||
- "6.1" | ||
- "6.3" | ||
before_script: | ||
- tsc -p tsconfig.json | ||
after_script: | ||
- npm run coveralls | ||
- npm run coveralls | ||
env: | ||
- CXX=g++-4.8 | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-4.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference path="typings/main.d.ts" /> | ||
export { IpfsConnector } from './src/IpfsConnector'; | ||
export { IpfsApiHelper } from './src/IpfsApiHelper'; | ||
export { IpfsBin } from './src/IpfsBin'; | ||
export { events as ipfsEvents } from './src/constants'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/// <reference path="../typings/main.d.ts" /> | ||
/// <reference types="node" /> | ||
/// <reference types="bluebird" /> | ||
import * as Promise from 'bluebird'; | ||
export declare class IpfsApiHelper { | ||
apiClient: any; | ||
OBJECT_MAX_SIZE: number; | ||
REQUEST_TIMEOUT: number; | ||
LINK_SYMBOL: string; | ||
constructor(provider: any); | ||
add(data: Object | Buffer): any; | ||
addFile(dataBuffer: Buffer): any; | ||
get(objectHash: string): any; | ||
getObject(objectHash: string): any; | ||
getFile(hash: string): Promise<{}>; | ||
private _getStats(objectHash); | ||
updateObject(hash: string, newData: Object): any; | ||
resolve(path: string): any; | ||
constructObjLink(data: any): any; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path="../typings/main.d.ts" /> | ||
/// <reference types="bluebird" /> | ||
import * as Promise from 'bluebird'; | ||
import Wrapper = require('bin-wrapper'); | ||
export declare class IpfsBin { | ||
wrapper: Wrapper; | ||
constructor(target?: string); | ||
getPath(): string; | ||
check(): Promise<{}>; | ||
deleteBin(): Promise<{}>; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/// <reference path="../typings/main.d.ts" /> | ||
/// <reference types="node" /> | ||
/// <reference types="bluebird" /> | ||
import * as Promise from 'bluebird'; | ||
import { IpfsApiHelper } from './IpfsApiHelper'; | ||
import { EventEmitter } from 'events'; | ||
export declare class IpfsConnector extends EventEmitter { | ||
private process; | ||
private downloadManager; | ||
options: { | ||
retry: boolean; | ||
apiAddress: string; | ||
args: string[]; | ||
executable: string; | ||
extra: { | ||
env: {} & { | ||
IPFS_PATH: string; | ||
}; | ||
detached: boolean; | ||
}; | ||
}; | ||
serviceStatus: { | ||
api: boolean; | ||
process: boolean; | ||
}; | ||
private _callbacks; | ||
private logger; | ||
private _api; | ||
constructor(enforcer: Symbol); | ||
static getInstance(): IpfsConnector; | ||
readonly api: IpfsApiHelper; | ||
setLogger(logger: {}): void; | ||
setBinPath(path: string): void; | ||
setConfig(option: string, value: string): void; | ||
setIpfsFolder(target: string): void; | ||
checkExecutable(): Promise<{}>; | ||
start(): Promise<boolean>; | ||
private _start(); | ||
private _attachStartingEvents(); | ||
private _flushStartingEvents(); | ||
private _pipeStd(); | ||
stop(signal?: string): this; | ||
private _init(); | ||
getPorts(): { | ||
gateway: number; | ||
api: number; | ||
swarm: number; | ||
}; | ||
setPorts(ports: { | ||
gateway?: number; | ||
api?: number; | ||
swarm?: number; | ||
}, restart?: boolean): Promise<any>; | ||
} |
Oops, something went wrong.