Skip to content

Commit

Permalink
[skyapi] refs fibercrypto#12 - Generate API client for typescript-ang…
Browse files Browse the repository at this point in the history
…ular based on HWD API 0.1.0
  • Loading branch information
stdevIvr committed Apr 10, 2019
1 parent b995976 commit 8a91329
Show file tree
Hide file tree
Showing 16 changed files with 414 additions and 151 deletions.
361 changes: 229 additions & 132 deletions lib/skyhwd/api/default.service.ts

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions lib/skyhwd/model/applySettingsRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Hardware Wallet Daemon API
* This is the hardware-wallet-daemon API
*
* OpenAPI spec version: 0.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


export interface ApplySettingsRequest {
label?: string;
usePassphrase?: boolean;
}
16 changes: 16 additions & 0 deletions lib/skyhwd/model/cSRFResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Hardware Wallet Daemon API
* This is the hardware-wallet-daemon API
*
* OpenAPI spec version: 0.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


export interface CSRFResponse {
data?: string;
}
19 changes: 17 additions & 2 deletions lib/skyhwd/model/featuresResponseData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,24 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { FeaturesResponseDataFeatures } from './featuresResponseDataFeatures';


export interface FeaturesResponseData {
features?: FeaturesResponseDataFeatures;
deviceId?: string;
passphraseProtection: boolean;
label?: string;
fwPatch: number;
fwMajor: number;
fwMinor: number;
minorVersion?: number;
pinProtection: boolean;
bootloaderHash?: string;
majorVersion?: number;
pinCached: boolean;
vendor: string;
needsBackup: boolean;
initialized: boolean;
model?: string;
passphraseCached: boolean;
patchVersion?: number;
}
3 changes: 1 addition & 2 deletions lib/skyhwd/model/generateAddressesResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { GenerateAddressesResponseData } from './generateAddressesResponseData';


export interface GenerateAddressesResponse {
data?: GenerateAddressesResponseData;
data?: Array<string>;
}
17 changes: 17 additions & 0 deletions lib/skyhwd/model/generateMnemonicRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Hardware Wallet Daemon API
* This is the hardware-wallet-daemon API
*
* OpenAPI spec version: 0.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


export interface GenerateMnemonicRequest {
wordCount: number;
usePassphrase?: boolean;
}
16 changes: 16 additions & 0 deletions lib/skyhwd/model/inlineResponse200.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Hardware Wallet Daemon API
* This is the hardware-wallet-daemon API
*
* OpenAPI spec version: 0.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


export interface InlineResponse200 {
data?: boolean;
}
14 changes: 9 additions & 5 deletions lib/skyhwd/model/models.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
export * from './applySettingsRequest';
export * from './cSRFResponse';
export * from './checkMessageSignatureRequest';
export * from './featuresResponse';
export * from './featuresResponseData';
export * from './featuresResponseDataFeatures';
export * from './generateAddressesRequest';
export * from './generateAddressesResponse';
export * from './generateAddressesResponseData';
export * from './generateMnemonicRequest';
export * from './hTTPErrorResponse';
export * from './hTTPErrorResponseError';
export * from './hTTPSuccessResponse';
export * from './passPhraseRequest';
export * from './inlineResponse200';
export * from './passphraseRequest';
export * from './pinMatrixRequest';
export * from './recoveryRequest';
export * from './setMnemonicRequest';
export * from './signMessageRequest';
export * from './signMessageResponse';
export * from './signMessageResponseData';
export * from './transactionInput';
export * from './transactionOutput';
export * from './transactionSignRequest';
export * from './transactionSignResponse';
export * from './transactionSignResponseData';
export * from './wordRequest';
16 changes: 16 additions & 0 deletions lib/skyhwd/model/passphraseRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Hardware Wallet Daemon API
* This is the hardware-wallet-daemon API
*
* OpenAPI spec version: 0.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


export interface PassphraseRequest {
passphrase: string;
}
18 changes: 18 additions & 0 deletions lib/skyhwd/model/recoveryRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Hardware Wallet Daemon API
* This is the hardware-wallet-daemon API
*
* OpenAPI spec version: 0.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


export interface RecoveryRequest {
wordCount: number;
usePassphrase?: boolean;
dryRun?: boolean;
}
16 changes: 16 additions & 0 deletions lib/skyhwd/model/setMnemonicRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Hardware Wallet Daemon API
* This is the hardware-wallet-daemon API
*
* OpenAPI spec version: 0.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


export interface SetMnemonicRequest {
mnemonic: string;
}
3 changes: 1 addition & 2 deletions lib/skyhwd/model/signMessageResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { SignMessageResponseData } from './signMessageResponseData';


export interface SignMessageResponse {
data?: SignMessageResponseData;
data?: string;
}
17 changes: 17 additions & 0 deletions lib/skyhwd/model/transactionInput.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Hardware Wallet Daemon API
* This is the hardware-wallet-daemon API
*
* OpenAPI spec version: 0.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


export interface TransactionInput {
index: number;
hash: string;
}
19 changes: 19 additions & 0 deletions lib/skyhwd/model/transactionOutput.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Hardware Wallet Daemon API
* This is the hardware-wallet-daemon API
*
* OpenAPI spec version: 0.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


export interface TransactionOutput {
addressIndex: number;
address: string;
coins: string;
hours: string;
}
10 changes: 4 additions & 6 deletions lib/skyhwd/model/transactionSignRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { TransactionInput } from './transactionInput';
import { TransactionOutput } from './transactionOutput';


export interface TransactionSignRequest {
inputs: Array<string>;
inputIndexes: Array<number>;
outputAddresses: Array<string>;
coins: Array<number>;
hours: Array<number>;
addressIndexes?: Array<number>;
transactionInputs: Array<TransactionInput>;
transactionOutputs: Array<TransactionOutput>;
}
3 changes: 1 addition & 2 deletions lib/skyhwd/model/transactionSignResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { TransactionSignResponseData } from './transactionSignResponseData';


export interface TransactionSignResponse {
data?: TransactionSignResponseData;
data?: Array<string>;
}

0 comments on commit 8a91329

Please sign in to comment.