orionx-sdk
Advanced tools
Comparing version 2.0.0-rc5 to 2.0.0-rc6
@@ -6,2 +6,3 @@ import Api from './api'; | ||
import Markets from './markets'; | ||
import Transactions from './transactions'; | ||
export declare class Orionx { | ||
@@ -16,4 +17,5 @@ private readonly apiKey; | ||
markets: Markets; | ||
transactions: Transactions; | ||
constructor(apiKey: string, apiSecret: string, apiEndpoint: string, callMock?: (endpoint: string, body: any, headers: any) => Response, hasherMock?: (secret: string, timestamp: any, payload: string) => string); | ||
} | ||
export default Orionx; |
@@ -12,2 +12,3 @@ "use strict"; | ||
const markets_1 = __importDefault(require("./markets")); | ||
const transactions_1 = __importDefault(require("./transactions")); | ||
class Orionx { | ||
@@ -23,2 +24,3 @@ constructor(apiKey, apiSecret, apiEndpoint, callMock, hasherMock) { | ||
this.markets = new markets_1.default(this.apiClient); | ||
this.transactions = new transactions_1.default(this.apiClient); | ||
} | ||
@@ -25,0 +27,0 @@ } |
@@ -8,3 +8,4 @@ import { GetTransactionsParameters } from './types'; | ||
send(fromWalletId: string, network: string, amount: number, contactId?: string, description?: string, clientId?: string): Promise<any>; | ||
withdrawalRequest(walletId: string, accountId: string, amount: number): Promise<any>; | ||
convert(quoteOptionId: string, amount: number, marketCode: string, sell: boolean): Promise<void>; | ||
} |
@@ -147,2 +147,33 @@ "use strict"; | ||
} | ||
withdrawalRequest(walletId, accountId, amount) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const query = ` | ||
mutation sdk_withdrawalRequest( | ||
$walletId: ID | ||
$accountId: ID | ||
$amount: BigInt | ||
) { | ||
withdrawalRequest( | ||
walletId: $walletId | ||
accountId: $accountId | ||
amount: $amount | ||
) { | ||
_id | ||
amount | ||
commission | ||
currency | ||
date | ||
type | ||
description | ||
} | ||
} | ||
`; | ||
const response = yield this.apiClient.call(query, { | ||
walletId, | ||
accountId, | ||
amount, | ||
}); | ||
return response; | ||
}); | ||
} | ||
convert(quoteOptionId, amount, marketCode, sell) { | ||
@@ -149,0 +180,0 @@ return __awaiter(this, void 0, void 0, function* () { |
{ | ||
"name": "orionx-sdk", | ||
"version": "2.0.0-rc5", | ||
"version": "2.0.0-rc6", | ||
"description": "Official Orionx SDK for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57489
935