@openweb3-io/wallet 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -0
- package/dist/index.d.ts +158 -0
- package/dist/index.js +339 -0
- package/dist/index.js.map +1 -0
- package/dist/openapi/apis/AddressesApi.d.ts +15 -0
- package/dist/openapi/apis/AddressesApi.js +224 -0
- package/dist/openapi/apis/AddressesApi.js.map +1 -0
- package/dist/openapi/apis/CurrenciesApi.d.ts +13 -0
- package/dist/openapi/apis/CurrenciesApi.js +138 -0
- package/dist/openapi/apis/CurrenciesApi.js.map +1 -0
- package/dist/openapi/apis/ExchangesApi.d.ts +25 -0
- package/dist/openapi/apis/ExchangesApi.js +338 -0
- package/dist/openapi/apis/ExchangesApi.js.map +1 -0
- package/dist/openapi/apis/NetworksApi.d.ts +10 -0
- package/dist/openapi/apis/NetworksApi.js +82 -0
- package/dist/openapi/apis/NetworksApi.js.map +1 -0
- package/dist/openapi/apis/RatesApi.d.ts +14 -0
- package/dist/openapi/apis/RatesApi.js +149 -0
- package/dist/openapi/apis/RatesApi.js.map +1 -0
- package/dist/openapi/apis/SweepFundsApi.d.ts +11 -0
- package/dist/openapi/apis/SweepFundsApi.js +86 -0
- package/dist/openapi/apis/SweepFundsApi.js.map +1 -0
- package/dist/openapi/apis/TransactionsApi.d.ts +25 -0
- package/dist/openapi/apis/TransactionsApi.js +322 -0
- package/dist/openapi/apis/TransactionsApi.js.map +1 -0
- package/dist/openapi/apis/WalletsApi.d.ts +22 -0
- package/dist/openapi/apis/WalletsApi.js +317 -0
- package/dist/openapi/apis/WalletsApi.js.map +1 -0
- package/dist/openapi/apis/WebhookEndpointsApi.d.ts +22 -0
- package/dist/openapi/apis/WebhookEndpointsApi.js +264 -0
- package/dist/openapi/apis/WebhookEndpointsApi.js.map +1 -0
- package/dist/openapi/apis/WebhookEventTypesApi.d.ts +10 -0
- package/dist/openapi/apis/WebhookEventTypesApi.js +65 -0
- package/dist/openapi/apis/WebhookEventTypesApi.js.map +1 -0
- package/dist/openapi/apis/WebhookEventsApi.d.ts +14 -0
- package/dist/openapi/apis/WebhookEventsApi.js +127 -0
- package/dist/openapi/apis/WebhookEventsApi.js.map +1 -0
- package/dist/openapi/apis/baseapi.d.ts +16 -0
- package/dist/openapi/apis/baseapi.js +25 -0
- package/dist/openapi/apis/baseapi.js.map +1 -0
- package/dist/openapi/apis/exception.d.ts +5 -0
- package/dist/openapi/apis/exception.js +12 -0
- package/dist/openapi/apis/exception.js.map +1 -0
- package/dist/openapi/auth/auth.d.ts +40 -0
- package/dist/openapi/auth/auth.js +42 -0
- package/dist/openapi/auth/auth.js.map +1 -0
- package/dist/openapi/configuration.d.ts +18 -0
- package/dist/openapi/configuration.js +21 -0
- package/dist/openapi/configuration.js.map +1 -0
- package/dist/openapi/http/http.d.ts +69 -0
- package/dist/openapi/http/http.js +162 -0
- package/dist/openapi/http/http.js.map +1 -0
- package/dist/openapi/http/isomorphic-fetch.d.ts +6 -0
- package/dist/openapi/http/isomorphic-fetch.js +31 -0
- package/dist/openapi/http/isomorphic-fetch.js.map +1 -0
- package/dist/openapi/index.d.ts +9 -0
- package/dist/openapi/index.js +32 -0
- package/dist/openapi/index.js.map +1 -0
- package/dist/openapi/middleware.d.ts +16 -0
- package/dist/openapi/middleware.js +17 -0
- package/dist/openapi/middleware.js.map +1 -0
- package/dist/openapi/models/Account.d.ts +22 -0
- package/dist/openapi/models/Account.js +51 -0
- package/dist/openapi/models/Account.js.map +1 -0
- package/dist/openapi/models/Address.d.ts +19 -0
- package/dist/openapi/models/Address.js +33 -0
- package/dist/openapi/models/Address.js.map +1 -0
- package/dist/openapi/models/ChainNetwork.d.ts +24 -0
- package/dist/openapi/models/ChainNetwork.js +63 -0
- package/dist/openapi/models/ChainNetwork.js.map +1 -0
- package/dist/openapi/models/CreateEndpoint.d.ts +27 -0
- package/dist/openapi/models/CreateEndpoint.js +57 -0
- package/dist/openapi/models/CreateEndpoint.js.map +1 -0
- package/dist/openapi/models/CreateExchange.d.ts +21 -0
- package/dist/openapi/models/CreateExchange.js +45 -0
- package/dist/openapi/models/CreateExchange.js.map +1 -0
- package/dist/openapi/models/CreateTransferRequest.d.ts +20 -0
- package/dist/openapi/models/CreateTransferRequest.js +39 -0
- package/dist/openapi/models/CreateTransferRequest.js.map +1 -0
- package/dist/openapi/models/CreateTransferResponse.d.ts +17 -0
- package/dist/openapi/models/CreateTransferResponse.js +21 -0
- package/dist/openapi/models/CreateTransferResponse.js.map +1 -0
- package/dist/openapi/models/CreateWalletRequest.d.ts +18 -0
- package/dist/openapi/models/CreateWalletRequest.js +27 -0
- package/dist/openapi/models/CreateWalletRequest.js.map +1 -0
- package/dist/openapi/models/CreateWithdrawReply.d.ts +17 -0
- package/dist/openapi/models/CreateWithdrawReply.js +21 -0
- package/dist/openapi/models/CreateWithdrawReply.js.map +1 -0
- package/dist/openapi/models/CreateWithdrawRequest.d.ts +23 -0
- package/dist/openapi/models/CreateWithdrawRequest.js +57 -0
- package/dist/openapi/models/CreateWithdrawRequest.js.map +1 -0
- package/dist/openapi/models/Currency.d.ts +37 -0
- package/dist/openapi/models/Currency.js +135 -0
- package/dist/openapi/models/Currency.js.map +1 -0
- package/dist/openapi/models/CurrencyNetwork.d.ts +36 -0
- package/dist/openapi/models/CurrencyNetwork.js +135 -0
- package/dist/openapi/models/CurrencyNetwork.js.map +1 -0
- package/dist/openapi/models/CurrencyPair.d.ts +18 -0
- package/dist/openapi/models/CurrencyPair.js +27 -0
- package/dist/openapi/models/CurrencyPair.js.map +1 -0
- package/dist/openapi/models/CursorPageAccount.d.ts +21 -0
- package/dist/openapi/models/CursorPageAccount.js +39 -0
- package/dist/openapi/models/CursorPageAccount.js.map +1 -0
- package/dist/openapi/models/CursorPageAddress.d.ts +21 -0
- package/dist/openapi/models/CursorPageAddress.js +39 -0
- package/dist/openapi/models/CursorPageAddress.js.map +1 -0
- package/dist/openapi/models/CursorPageChainNetwork.d.ts +21 -0
- package/dist/openapi/models/CursorPageChainNetwork.js +39 -0
- package/dist/openapi/models/CursorPageChainNetwork.js.map +1 -0
- package/dist/openapi/models/CursorPageCurrency.d.ts +21 -0
- package/dist/openapi/models/CursorPageCurrency.js +39 -0
- package/dist/openapi/models/CursorPageCurrency.js.map +1 -0
- package/dist/openapi/models/CursorPageEndpoint.d.ts +21 -0
- package/dist/openapi/models/CursorPageEndpoint.js +39 -0
- package/dist/openapi/models/CursorPageEndpoint.js.map +1 -0
- package/dist/openapi/models/CursorPageExchange.d.ts +21 -0
- package/dist/openapi/models/CursorPageExchange.js +39 -0
- package/dist/openapi/models/CursorPageExchange.js.map +1 -0
- package/dist/openapi/models/CursorPageTransaction.d.ts +21 -0
- package/dist/openapi/models/CursorPageTransaction.js +39 -0
- package/dist/openapi/models/CursorPageTransaction.js.map +1 -0
- package/dist/openapi/models/CursorPageWallet.d.ts +21 -0
- package/dist/openapi/models/CursorPageWallet.js +39 -0
- package/dist/openapi/models/CursorPageWallet.js.map +1 -0
- package/dist/openapi/models/CursorPageWebhookEvent.d.ts +21 -0
- package/dist/openapi/models/CursorPageWebhookEvent.js +39 -0
- package/dist/openapi/models/CursorPageWebhookEvent.js.map +1 -0
- package/dist/openapi/models/DeleteWebhookEndpointResponse.d.ts +17 -0
- package/dist/openapi/models/DeleteWebhookEndpointResponse.js +21 -0
- package/dist/openapi/models/DeleteWebhookEndpointResponse.js.map +1 -0
- package/dist/openapi/models/Endpoint.d.ts +29 -0
- package/dist/openapi/models/Endpoint.js +69 -0
- package/dist/openapi/models/Endpoint.js.map +1 -0
- package/dist/openapi/models/EstimateFeeRequest.d.ts +21 -0
- package/dist/openapi/models/EstimateFeeRequest.js +45 -0
- package/dist/openapi/models/EstimateFeeRequest.js.map +1 -0
- package/dist/openapi/models/EstimateFeeResponse.d.ts +18 -0
- package/dist/openapi/models/EstimateFeeResponse.js +27 -0
- package/dist/openapi/models/EstimateFeeResponse.js.map +1 -0
- package/dist/openapi/models/EstimateResponse.d.ts +21 -0
- package/dist/openapi/models/EstimateResponse.js +45 -0
- package/dist/openapi/models/EstimateResponse.js.map +1 -0
- package/dist/openapi/models/EventType.d.ts +18 -0
- package/dist/openapi/models/EventType.js +27 -0
- package/dist/openapi/models/EventType.js.map +1 -0
- package/dist/openapi/models/Exchange.d.ts +30 -0
- package/dist/openapi/models/Exchange.js +99 -0
- package/dist/openapi/models/Exchange.js.map +1 -0
- package/dist/openapi/models/ExchangeCurrencyPairs.d.ts +18 -0
- package/dist/openapi/models/ExchangeCurrencyPairs.js +27 -0
- package/dist/openapi/models/ExchangeCurrencyPairs.js.map +1 -0
- package/dist/openapi/models/ExchangeSubmitResponse.d.ts +17 -0
- package/dist/openapi/models/ExchangeSubmitResponse.js +21 -0
- package/dist/openapi/models/ExchangeSubmitResponse.js.map +1 -0
- package/dist/openapi/models/GetCurrencyPairQuotaResponse.d.ts +22 -0
- package/dist/openapi/models/GetCurrencyPairQuotaResponse.js +51 -0
- package/dist/openapi/models/GetCurrencyPairQuotaResponse.js.map +1 -0
- package/dist/openapi/models/GetRatesRequest.d.ts +18 -0
- package/dist/openapi/models/GetRatesRequest.js +21 -0
- package/dist/openapi/models/GetRatesRequest.js.map +1 -0
- package/dist/openapi/models/GetRatesResponse.d.ts +18 -0
- package/dist/openapi/models/GetRatesResponse.js +21 -0
- package/dist/openapi/models/GetRatesResponse.js.map +1 -0
- package/dist/openapi/models/ListExchangeCurrencyPairsResponse.d.ts +18 -0
- package/dist/openapi/models/ListExchangeCurrencyPairsResponse.js +21 -0
- package/dist/openapi/models/ListExchangeCurrencyPairsResponse.js.map +1 -0
- package/dist/openapi/models/ModelError.d.ts +18 -0
- package/dist/openapi/models/ModelError.js +27 -0
- package/dist/openapi/models/ModelError.js.map +1 -0
- package/dist/openapi/models/ObjectSerializer.d.ts +57 -0
- package/dist/openapi/models/ObjectSerializer.js +336 -0
- package/dist/openapi/models/ObjectSerializer.js.map +1 -0
- package/dist/openapi/models/Rate.d.ts +19 -0
- package/dist/openapi/models/Rate.js +27 -0
- package/dist/openapi/models/Rate.js.map +1 -0
- package/dist/openapi/models/ResendWebhookEventRequest.d.ts +18 -0
- package/dist/openapi/models/ResendWebhookEventRequest.js +27 -0
- package/dist/openapi/models/ResendWebhookEventRequest.js.map +1 -0
- package/dist/openapi/models/ResendWebhookEventResponse.d.ts +17 -0
- package/dist/openapi/models/ResendWebhookEventResponse.js +21 -0
- package/dist/openapi/models/ResendWebhookEventResponse.js.map +1 -0
- package/dist/openapi/models/SweepAddressRequest.d.ts +17 -0
- package/dist/openapi/models/SweepAddressRequest.js +21 -0
- package/dist/openapi/models/SweepAddressRequest.js.map +1 -0
- package/dist/openapi/models/SweepAddressResponse.d.ts +17 -0
- package/dist/openapi/models/SweepAddressResponse.js +21 -0
- package/dist/openapi/models/SweepAddressResponse.js.map +1 -0
- package/dist/openapi/models/Transaction.d.ts +32 -0
- package/dist/openapi/models/Transaction.js +99 -0
- package/dist/openapi/models/Transaction.js.map +1 -0
- package/dist/openapi/models/TransactionDirection.d.ts +1 -0
- package/dist/openapi/models/TransactionDirection.js +3 -0
- package/dist/openapi/models/TransactionDirection.js.map +1 -0
- package/dist/openapi/models/TransactionStatus.d.ts +1 -0
- package/dist/openapi/models/TransactionStatus.js +3 -0
- package/dist/openapi/models/TransactionStatus.js.map +1 -0
- package/dist/openapi/models/UpdateEndpoint.d.ts +27 -0
- package/dist/openapi/models/UpdateEndpoint.js +57 -0
- package/dist/openapi/models/UpdateEndpoint.js.map +1 -0
- package/dist/openapi/models/UpdateWalletRequest.d.ts +18 -0
- package/dist/openapi/models/UpdateWalletRequest.js +27 -0
- package/dist/openapi/models/UpdateWalletRequest.js.map +1 -0
- package/dist/openapi/models/Wallet.d.ts +20 -0
- package/dist/openapi/models/Wallet.js +39 -0
- package/dist/openapi/models/Wallet.js.map +1 -0
- package/dist/openapi/models/WebhookEvent.d.ts +22 -0
- package/dist/openapi/models/WebhookEvent.js +39 -0
- package/dist/openapi/models/WebhookEvent.js.map +1 -0
- package/dist/openapi/models/all.d.ts +48 -0
- package/dist/openapi/models/all.js +61 -0
- package/dist/openapi/models/all.js.map +1 -0
- package/dist/openapi/rxjsStub.d.ts +10 -0
- package/dist/openapi/rxjsStub.js +32 -0
- package/dist/openapi/rxjsStub.js.map +1 -0
- package/dist/openapi/servers.d.ts +17 -0
- package/dist/openapi/servers.js +31 -0
- package/dist/openapi/servers.js.map +1 -0
- package/dist/openapi/types/ObjectParamAPI.d.ts +259 -0
- package/dist/openapi/types/ObjectParamAPI.js +180 -0
- package/dist/openapi/types/ObjectParamAPI.js.map +1 -0
- package/dist/openapi/types/ObservableAPI.d.ts +150 -0
- package/dist/openapi/types/ObservableAPI.js +600 -0
- package/dist/openapi/types/ObservableAPI.js.map +1 -0
- package/dist/openapi/types/PromiseAPI.d.ts +127 -0
- package/dist/openapi/types/PromiseAPI.js +213 -0
- package/dist/openapi/types/PromiseAPI.js.map +1 -0
- package/dist/openapi/util.d.ts +1 -0
- package/dist/openapi/util.js +25 -0
- package/dist/openapi/util.js.map +1 -0
- package/package.json +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<a style="text-decoration: none" href="https://pay.openweb3.io">
|
|
3
|
+
<img width="120" src="" />
|
|
4
|
+
<p align="center">Wallet - Custody Wallet Service</p>
|
|
5
|
+
</a>
|
|
6
|
+
</h1>
|
|
7
|
+
<h2 align="center">
|
|
8
|
+
<a href="https://wallet.openweb3.io">Website</a> | <a href="https://docs.wallet.openweb3.io">Documentation</a> | <a href="https://pay.openweb3.io/slack">Community Slack</a>
|
|
9
|
+
<h2>
|
|
10
|
+
|
|
11
|
+
Typescript/Javascript library for interacting with the Wallet API and verifying wallet webhook signatures
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
[](https://www.npmjs.com/package/wallet)
|
|
15
|
+
|
|
16
|
+
[](https://wallet.openweb3.io/slack/)
|
|
17
|
+
|
|
18
|
+
# Usage Documentation
|
|
19
|
+
|
|
20
|
+
You can find general usage documentation at <https://docs.wallet.openweb3.io>. For complete API documentation with code examples for each endpoint in all of our official client libraries head over to our API documentation site at <https://api.wallet.openweb3.io>.
|
|
21
|
+
|
|
22
|
+
# Language Support
|
|
23
|
+
|
|
24
|
+
<table style="table-layout:fixed; white-space: nowrap;">
|
|
25
|
+
<th colspan="2">⚡️ Features ⚡️</th>
|
|
26
|
+
<tr>
|
|
27
|
+
<th>Officially Supported</th>
|
|
28
|
+
<th>✅</th>
|
|
29
|
+
</tr>
|
|
30
|
+
<tr>
|
|
31
|
+
<th>API Support</th>
|
|
32
|
+
<th>✅</th>
|
|
33
|
+
</tr>
|
|
34
|
+
<tr>
|
|
35
|
+
<th>Signature Verification</th>
|
|
36
|
+
<th>✅</th>
|
|
37
|
+
</tr>
|
|
38
|
+
<tr>
|
|
39
|
+
<th>Caveats</th>
|
|
40
|
+
<th>None! 🚀</th>
|
|
41
|
+
</tr>
|
|
42
|
+
</table>
|
|
43
|
+
|
|
44
|
+
# Installation
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
npm install @openweb3-io/wallet
|
|
48
|
+
# or
|
|
49
|
+
yarn add @openweb3-io/wallet
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
# Usage
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
import { Wallet } from "@openweb3-io/wallet";
|
|
56
|
+
|
|
57
|
+
const wallet = new Wallet("API-KEY", "PRIVATE KEY");
|
|
58
|
+
const chains = await wallet.chains.list({ limit: 20 });
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
# Development
|
|
62
|
+
|
|
63
|
+
First checkout the [core README](../README.md#development) for details on how to generate our API bindings, then follow the steps below.
|
|
64
|
+
|
|
65
|
+
## Requirements
|
|
66
|
+
|
|
67
|
+
- node
|
|
68
|
+
- yarn
|
|
69
|
+
|
|
70
|
+
## Building the library
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
yarn
|
|
74
|
+
yarn build
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Contributing
|
|
78
|
+
|
|
79
|
+
Before opening a PR be sure to format your code!
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
yarn lint:fix
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Running Tests
|
|
86
|
+
|
|
87
|
+
Simply run:
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
yarn test
|
|
91
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { Configuration, Currency, CursorPageCurrency, CreateEndpoint, Endpoint, CursorPageEndpoint, GetRatesRequest, GetRatesResponse, EstimateResponse, CursorPageChainNetwork, SweepAddressRequest, SweepAddressResponse, EventType, CursorPageWebhookEvent, ResendWebhookEventResponse, ResendWebhookEventRequest, CursorPageExchange, Exchange, CreateExchange, ExchangeSubmitResponse, ListExchangeCurrencyPairsResponse, CursorPageAddress, Address, CursorPageTransaction, CreateTransferRequest, CreateTransferResponse, Transaction, CreateWithdrawRequest, CreateWithdrawReply, CreateWalletRequest, Wallet, UpdateWalletRequest, CursorPageAccount, CursorPageWallet, EstimateFeeRequest, EstimateFeeResponse } from "./openapi/index";
|
|
2
|
+
export * from "./openapi/models/all";
|
|
3
|
+
export * from "./openapi/apis/exception";
|
|
4
|
+
export interface ApiClientOptions {
|
|
5
|
+
debug?: boolean;
|
|
6
|
+
serverUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class ApiClient {
|
|
9
|
+
readonly _configuration: Configuration;
|
|
10
|
+
readonly ChainNetworks: ChainNetworks;
|
|
11
|
+
readonly Currencies: Currencies;
|
|
12
|
+
readonly Rates: Rates;
|
|
13
|
+
readonly Addresses: Addresses;
|
|
14
|
+
readonly Transactions: Transactions;
|
|
15
|
+
readonly Wallets: Wallets;
|
|
16
|
+
readonly WebhookEndpoints: Endpoints;
|
|
17
|
+
readonly WebhookEventTypes: WebhookEventTypes;
|
|
18
|
+
readonly WebhookEvents: WebhookEvents;
|
|
19
|
+
readonly Sweep: Sweeps;
|
|
20
|
+
readonly Exchanges: Exchanges;
|
|
21
|
+
constructor(apiKey: string, secret: string, options: ApiClientOptions);
|
|
22
|
+
}
|
|
23
|
+
export interface PostOptions {
|
|
24
|
+
idempotencyKey?: string;
|
|
25
|
+
}
|
|
26
|
+
interface ListOptions {
|
|
27
|
+
page: number;
|
|
28
|
+
size: number;
|
|
29
|
+
}
|
|
30
|
+
interface CursorListOptions {
|
|
31
|
+
cursor?: string;
|
|
32
|
+
limit: number;
|
|
33
|
+
}
|
|
34
|
+
export interface CurrencyListOptions extends CursorListOptions {
|
|
35
|
+
rated?: boolean;
|
|
36
|
+
}
|
|
37
|
+
declare class Currencies {
|
|
38
|
+
private readonly api;
|
|
39
|
+
constructor(config: Configuration);
|
|
40
|
+
list(options: CurrencyListOptions): Promise<CursorPageCurrency>;
|
|
41
|
+
findByCode(code: string): Promise<Currency>;
|
|
42
|
+
}
|
|
43
|
+
interface EstimateOptions {
|
|
44
|
+
baseCurrency: string;
|
|
45
|
+
toCurrency: string;
|
|
46
|
+
baseAmount: string;
|
|
47
|
+
}
|
|
48
|
+
declare class Rates {
|
|
49
|
+
private readonly api;
|
|
50
|
+
constructor(config: Configuration);
|
|
51
|
+
estimate(options: EstimateOptions): Promise<EstimateResponse>;
|
|
52
|
+
getRates(getRatesRequest: GetRatesRequest): Promise<GetRatesResponse>;
|
|
53
|
+
}
|
|
54
|
+
export declare type EndpointListOptions = CursorListOptions;
|
|
55
|
+
declare class Endpoints {
|
|
56
|
+
private readonly api;
|
|
57
|
+
constructor(config: Configuration);
|
|
58
|
+
create(createEndpoint: CreateEndpoint, options?: PostOptions): Promise<Endpoint>;
|
|
59
|
+
delete(endpointId: string): Promise<void>;
|
|
60
|
+
retrieve(endpointId: string): Promise<Endpoint>;
|
|
61
|
+
list(options: EndpointListOptions): Promise<CursorPageEndpoint>;
|
|
62
|
+
}
|
|
63
|
+
export interface RefundListOptions extends ListOptions {
|
|
64
|
+
orderId?: string;
|
|
65
|
+
}
|
|
66
|
+
export declare type ListChainNetworkOptions = CursorListOptions;
|
|
67
|
+
declare class ChainNetworks {
|
|
68
|
+
private readonly api;
|
|
69
|
+
constructor(config: Configuration);
|
|
70
|
+
list(options: ListChainNetworkOptions): Promise<CursorPageChainNetwork>;
|
|
71
|
+
}
|
|
72
|
+
export declare type ListAccountsOptions = CursorListOptions;
|
|
73
|
+
export declare type ListWalletOptions = CursorListOptions;
|
|
74
|
+
declare class Wallets {
|
|
75
|
+
private readonly api;
|
|
76
|
+
constructor(config: Configuration);
|
|
77
|
+
create(createWallet: CreateWalletRequest): Promise<Wallet>;
|
|
78
|
+
retrieve(walletId: string): Promise<Wallet>;
|
|
79
|
+
update(walletId: string, updateWallet: UpdateWalletRequest): Promise<Wallet>;
|
|
80
|
+
listAccounts(walletId: string, options: ListAccountsOptions): Promise<CursorPageAccount>;
|
|
81
|
+
list(options: ListWalletOptions): Promise<CursorPageWallet>;
|
|
82
|
+
}
|
|
83
|
+
declare class WebhookEventTypes {
|
|
84
|
+
private readonly api;
|
|
85
|
+
constructor(config: Configuration);
|
|
86
|
+
list(): Promise<Array<EventType>>;
|
|
87
|
+
}
|
|
88
|
+
export interface WebhookEventsListOptions extends CursorListOptions {
|
|
89
|
+
eventTypes?: Array<string>;
|
|
90
|
+
}
|
|
91
|
+
declare class WebhookEvents {
|
|
92
|
+
private readonly api;
|
|
93
|
+
constructor(config: Configuration);
|
|
94
|
+
list(options: WebhookEventsListOptions): Promise<CursorPageWebhookEvent>;
|
|
95
|
+
resend(resendWebhookEventRequest: ResendWebhookEventRequest): Promise<ResendWebhookEventResponse>;
|
|
96
|
+
}
|
|
97
|
+
declare class Sweeps {
|
|
98
|
+
private readonly api;
|
|
99
|
+
constructor(config: Configuration);
|
|
100
|
+
sweepAddress(address: string, sweepAddressRequest: SweepAddressRequest): Promise<SweepAddressResponse>;
|
|
101
|
+
}
|
|
102
|
+
export interface ExchangeListOptions extends CursorListOptions {
|
|
103
|
+
walletId: string;
|
|
104
|
+
}
|
|
105
|
+
declare class Exchanges {
|
|
106
|
+
private readonly api;
|
|
107
|
+
constructor(config: Configuration);
|
|
108
|
+
list(options: ExchangeListOptions): Promise<CursorPageExchange>;
|
|
109
|
+
retrieve(exchangeId: string): Promise<Exchange>;
|
|
110
|
+
create(createExchange: CreateExchange): Promise<Exchange>;
|
|
111
|
+
submit(exchangeId: string): Promise<ExchangeSubmitResponse>;
|
|
112
|
+
listCurrencyPairs(): Promise<ListExchangeCurrencyPairsResponse>;
|
|
113
|
+
}
|
|
114
|
+
export interface AddressListOptions extends CursorListOptions {
|
|
115
|
+
currency?: string;
|
|
116
|
+
type?: string;
|
|
117
|
+
walletId?: string;
|
|
118
|
+
}
|
|
119
|
+
export interface GetDepositAddressOptions {
|
|
120
|
+
walletId: string;
|
|
121
|
+
currency: string;
|
|
122
|
+
network: string;
|
|
123
|
+
}
|
|
124
|
+
export interface ListDepositAddressesOptions extends CursorListOptions {
|
|
125
|
+
walletId: string;
|
|
126
|
+
currency?: string;
|
|
127
|
+
network?: string;
|
|
128
|
+
}
|
|
129
|
+
declare class Addresses {
|
|
130
|
+
private readonly api;
|
|
131
|
+
constructor(config: Configuration);
|
|
132
|
+
list(options: AddressListOptions): Promise<CursorPageAddress>;
|
|
133
|
+
getDepositAddress(options: GetDepositAddressOptions): Promise<Address>;
|
|
134
|
+
listDepositAddresses(options: ListDepositAddressesOptions): Promise<CursorPageAddress>;
|
|
135
|
+
}
|
|
136
|
+
export interface TransactionListOptions extends CursorListOptions {
|
|
137
|
+
walletId?: string;
|
|
138
|
+
network?: string;
|
|
139
|
+
currency?: string;
|
|
140
|
+
direction?: "OUT" | "IN";
|
|
141
|
+
gateway?: string;
|
|
142
|
+
txhash?: string;
|
|
143
|
+
status?: "PROCESSING" | "CANCELED" | "FAILED" | "SUCCEED";
|
|
144
|
+
}
|
|
145
|
+
declare class Transactions {
|
|
146
|
+
private readonly api;
|
|
147
|
+
constructor(config: Configuration);
|
|
148
|
+
list(options: TransactionListOptions): Promise<CursorPageTransaction>;
|
|
149
|
+
retrieve(transactionId: string): Promise<Transaction>;
|
|
150
|
+
transfer(transfer: CreateTransferRequest): Promise<CreateTransferResponse>;
|
|
151
|
+
withdraw(withdraw: CreateWithdrawRequest): Promise<CreateWithdrawReply>;
|
|
152
|
+
estimateFee(estimateFee: EstimateFeeRequest): Promise<EstimateFeeResponse>;
|
|
153
|
+
}
|
|
154
|
+
export declare class WebhookClient {
|
|
155
|
+
private readonly publicKey;
|
|
156
|
+
constructor(publicKey: string);
|
|
157
|
+
verify(payload: string, signature: string): Promise<boolean>;
|
|
158
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.WebhookClient = exports.ApiClient = void 0;
|
|
23
|
+
const index_1 = require("./openapi/index");
|
|
24
|
+
__exportStar(require("./openapi/models/all"), exports);
|
|
25
|
+
__exportStar(require("./openapi/apis/exception"), exports);
|
|
26
|
+
const crypto_1 = require("crypto");
|
|
27
|
+
const nacl = require("tweetnacl");
|
|
28
|
+
const VERSION = "0.2.0";
|
|
29
|
+
class UserAgentMiddleware {
|
|
30
|
+
pre(context) {
|
|
31
|
+
context.setHeaderParam("User-Agent", `walletpay-libs/${VERSION}/javascript`);
|
|
32
|
+
return Promise.resolve(context);
|
|
33
|
+
}
|
|
34
|
+
post(context) {
|
|
35
|
+
return Promise.resolve(context);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function signEd25519(data, secret) {
|
|
39
|
+
const hash = crypto_1.createHash("sha256");
|
|
40
|
+
hash.update(Buffer.from(data, "utf-8"));
|
|
41
|
+
const hashBuffer = hash.digest();
|
|
42
|
+
const keyPair = nacl.sign.keyPair.fromSeed(Buffer.from(secret, "hex"));
|
|
43
|
+
const signedData = nacl.sign.detached(hashBuffer, keyPair.secretKey);
|
|
44
|
+
const sign = Buffer.from(signedData).toString("hex");
|
|
45
|
+
return sign;
|
|
46
|
+
}
|
|
47
|
+
class SignatureMiddleware {
|
|
48
|
+
constructor(secret) {
|
|
49
|
+
this.secret = secret;
|
|
50
|
+
}
|
|
51
|
+
pre(context) {
|
|
52
|
+
const timestamp = new Date().getTime().toString();
|
|
53
|
+
context.setHeaderParam("x-request-time", timestamp);
|
|
54
|
+
let source = "";
|
|
55
|
+
const body = context.getBody();
|
|
56
|
+
let bodyStr = "";
|
|
57
|
+
if (body) {
|
|
58
|
+
if (typeof body === "object") {
|
|
59
|
+
bodyStr = JSON.stringify(body);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
bodyStr = String(body);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
source += bodyStr;
|
|
66
|
+
const url = new URL(context.getUrl());
|
|
67
|
+
source += url.pathname + url.search;
|
|
68
|
+
source += timestamp;
|
|
69
|
+
const sign = signEd25519(source, this.secret);
|
|
70
|
+
context.setHeaderParam("x-signature", sign);
|
|
71
|
+
return Promise.resolve(context);
|
|
72
|
+
}
|
|
73
|
+
post(context) {
|
|
74
|
+
return Promise.resolve(context);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
class ApiClient {
|
|
78
|
+
constructor(apiKey, secret, options) {
|
|
79
|
+
var _a;
|
|
80
|
+
const baseUrl = (_a = options.serverUrl) !== null && _a !== void 0 ? _a : "https://api.wallet.openweb3.io";
|
|
81
|
+
const baseServer = new index_1.ServerConfiguration(baseUrl, {});
|
|
82
|
+
const config = index_1.createConfiguration({
|
|
83
|
+
baseServer,
|
|
84
|
+
promiseMiddleware: [new UserAgentMiddleware(), new SignatureMiddleware(secret)],
|
|
85
|
+
authMethods: {
|
|
86
|
+
ApiKeyAuth: apiKey,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
this._configuration = config;
|
|
90
|
+
this.ChainNetworks = new ChainNetworks(config);
|
|
91
|
+
this.Currencies = new Currencies(config);
|
|
92
|
+
this.Rates = new Rates(config);
|
|
93
|
+
this.Addresses = new Addresses(config);
|
|
94
|
+
this.Transactions = new Transactions(config);
|
|
95
|
+
this.Wallets = new Wallets(config);
|
|
96
|
+
this.WebhookEndpoints = new Endpoints(config);
|
|
97
|
+
this.WebhookEventTypes = new WebhookEventTypes(config);
|
|
98
|
+
this.WebhookEvents = new WebhookEvents(config);
|
|
99
|
+
this.Sweep = new Sweeps(config);
|
|
100
|
+
this.Exchanges = new Exchanges(config);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.ApiClient = ApiClient;
|
|
104
|
+
class Currencies {
|
|
105
|
+
constructor(config) {
|
|
106
|
+
this.api = new index_1.CurrenciesApi(config);
|
|
107
|
+
}
|
|
108
|
+
list(options) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
return yield this.api.v1CurrenciesList(Object.assign({}, options));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
findByCode(code) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this.api.v1CurrenciesRetrieve({ code });
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
class Rates {
|
|
120
|
+
constructor(config) {
|
|
121
|
+
this.api = new index_1.RatesApi(config);
|
|
122
|
+
}
|
|
123
|
+
estimate(options) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
return yield this.api.v1RatesEstimate(Object.assign({}, options));
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
getRates(getRatesRequest) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
return yield this.api.v1RatesList({ request: getRatesRequest });
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
class Endpoints {
|
|
135
|
+
constructor(config) {
|
|
136
|
+
this.api = new index_1.WebhookEndpointsApi(config);
|
|
137
|
+
}
|
|
138
|
+
create(createEndpoint, options) {
|
|
139
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
return yield this.api.v1WebhooksCreate(Object.assign({ request: createEndpoint }, options));
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
delete(endpointId) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
yield this.api.v1WebhooksDelete({ endpointId });
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
retrieve(endpointId) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
return yield this.api.v1WebhooksRetrieve({ endpointId });
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
list(options) {
|
|
154
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
return yield this.api.v1WebhooksList(Object.assign({}, options));
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
class ChainNetworks {
|
|
160
|
+
constructor(config) {
|
|
161
|
+
this.api = new index_1.NetworksApi(config);
|
|
162
|
+
}
|
|
163
|
+
list(options) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
return yield this.api.v1NetworksList(Object.assign({}, options));
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
class Wallets {
|
|
170
|
+
constructor(config) {
|
|
171
|
+
this.api = new index_1.WalletsApi(config);
|
|
172
|
+
}
|
|
173
|
+
create(createWallet) {
|
|
174
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
return yield this.api.v1WalletsCreate({ request: createWallet });
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
retrieve(walletId) {
|
|
179
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
180
|
+
return yield this.api.v1WalletsRetrieve({ walletId });
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
update(walletId, updateWallet) {
|
|
184
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
185
|
+
return yield this.api.v1WalletsUpdate({ walletId, request: updateWallet });
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
listAccounts(walletId, options) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
+
return yield this.api.v1WalletsListAccounts(Object.assign({ walletId }, options));
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
list(options) {
|
|
194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
195
|
+
return yield this.api.v1WalletsList(Object.assign({}, options));
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
class WebhookEventTypes {
|
|
200
|
+
constructor(config) {
|
|
201
|
+
this.api = new index_1.WebhookEventTypesApi(config);
|
|
202
|
+
}
|
|
203
|
+
list() {
|
|
204
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
205
|
+
return yield this.api.v1WebhooksEventtypesList({});
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
class WebhookEvents {
|
|
210
|
+
constructor(config) {
|
|
211
|
+
this.api = new index_1.WebhookEventsApi(config);
|
|
212
|
+
}
|
|
213
|
+
list(options) {
|
|
214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
215
|
+
return yield this.api.v1WebhooksEventsList(Object.assign({}, options));
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
resend(resendWebhookEventRequest) {
|
|
219
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
+
return yield this.api.v1WebhooksEventsResend({ request: resendWebhookEventRequest });
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
class Sweeps {
|
|
225
|
+
constructor(config) {
|
|
226
|
+
this.api = new index_1.SweepFundsApi(config);
|
|
227
|
+
}
|
|
228
|
+
sweepAddress(address, sweepAddressRequest) {
|
|
229
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
230
|
+
return yield this.api.v1SweepAddress({ address, request: sweepAddressRequest });
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
class Exchanges {
|
|
235
|
+
constructor(config) {
|
|
236
|
+
this.api = new index_1.ExchangesApi(config);
|
|
237
|
+
}
|
|
238
|
+
list(options) {
|
|
239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
+
return yield this.api.v1ExchangesList(Object.assign({}, options));
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
retrieve(exchangeId) {
|
|
244
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
245
|
+
return yield this.api.v1ExchangesRetrieve({ exchangeId });
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
create(createExchange) {
|
|
249
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
250
|
+
return yield this.api.v1ExchangesCreate({ request: createExchange });
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
submit(exchangeId) {
|
|
254
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
+
return yield this.api.v1ExchangesSubmit({ exchangeId });
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
listCurrencyPairs() {
|
|
259
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
260
|
+
return yield this.api.v1ExchangesCurrencyPairs({});
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
class Addresses {
|
|
265
|
+
constructor(config) {
|
|
266
|
+
this.api = new index_1.AddressesApi(config);
|
|
267
|
+
}
|
|
268
|
+
list(options) {
|
|
269
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
+
return yield this.api.v1AddressesList(Object.assign({}, options));
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
getDepositAddress(options) {
|
|
274
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
275
|
+
return yield this.api.v1WalletsGetDepositAddress(Object.assign({}, options));
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
listDepositAddresses(options) {
|
|
279
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
280
|
+
return yield this.api.v1WalletsListDepositAddresses(Object.assign({}, options));
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
class Transactions {
|
|
285
|
+
constructor(config) {
|
|
286
|
+
this.api = new index_1.TransactionsApi(config);
|
|
287
|
+
}
|
|
288
|
+
list(options) {
|
|
289
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
290
|
+
return yield this.api.v1TransactionsList(Object.assign({}, options));
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
retrieve(transactionId) {
|
|
294
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
295
|
+
return yield this.api.v1TransactionsRetrieve({ transactionId });
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
transfer(transfer) {
|
|
299
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
300
|
+
return yield this.api.v1TransactionsTransfer({ request: transfer });
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
withdraw(withdraw) {
|
|
304
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
305
|
+
return yield this.api.v1TransactionsWithdraw({ request: withdraw });
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
estimateFee(estimateFee) {
|
|
309
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
310
|
+
return yield this.api.v1TransactionsEstimateFee({ request: estimateFee });
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
class WebhookClient {
|
|
315
|
+
constructor(publicKey) {
|
|
316
|
+
this.publicKey = publicKey;
|
|
317
|
+
}
|
|
318
|
+
verify(payload, signature) {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
try {
|
|
321
|
+
const payloadBuffer = Buffer.from(payload);
|
|
322
|
+
const signatureBuffer = Buffer.from(signature, "base64");
|
|
323
|
+
const verify = crypto_1.createVerify("sha256");
|
|
324
|
+
verify.update(payloadBuffer);
|
|
325
|
+
const isValid = verify.verify({
|
|
326
|
+
key: this.publicKey,
|
|
327
|
+
padding: crypto_1.constants.RSA_PKCS1_PADDING,
|
|
328
|
+
}, signatureBuffer);
|
|
329
|
+
return isValid;
|
|
330
|
+
}
|
|
331
|
+
catch (error) {
|
|
332
|
+
console.error("verify signature error:", error);
|
|
333
|
+
return false;
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
exports.WebhookClient = WebhookClient;
|
|
339
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mapp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sB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QACtE,CAAC;KAAA;IAEY,WAAW,CACtB,WAA+B;;YAE/B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,yBAAyB,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;QAC5E,CAAC;KAAA;CACF;AAED,MAAa,aAAa;IAGxB,YAAmB,SAAiB;QAClC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAEY,MAAM,CAAC,OAAe,EAAE,SAAiB;;YACpD,IAAI;gBAEF,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAE3C,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBAEzD,MAAM,MAAM,GAAG,qBAAY,CAAC,QAAQ,CAAC,CAAC;gBACtC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAG7B,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAC3B;oBACE,GAAG,EAAE,IAAI,CAAC,SAAS;oBACnB,OAAO,EAAE,kBAAS,CAAC,iBAAiB;iBACrC,EACD,eAAe,CAChB,CAAC;gBAEF,OAAO,OAAO,CAAC;aAChB;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;gBAChD,OAAO,KAAK,CAAC;aACd;QACH,CAAC;KAAA;CACF;AAhCD,sCAgCC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
|
+
import { Configuration } from '../configuration';
|
|
3
|
+
import { RequestContext, ResponseContext } from '../http/http';
|
|
4
|
+
import { Address } from '../models/Address';
|
|
5
|
+
import { CursorPageAddress } from '../models/CursorPageAddress';
|
|
6
|
+
export declare class AddressesApiRequestFactory extends BaseAPIRequestFactory {
|
|
7
|
+
v1AddressesList(limit: number, currency?: string, cursor?: string, type?: string, walletId?: string, _options?: Configuration): Promise<RequestContext>;
|
|
8
|
+
v1WalletsGetDepositAddress(walletId: string, currency: string, network: string, _options?: Configuration): Promise<RequestContext>;
|
|
9
|
+
v1WalletsListDepositAddresses(walletId: string, limit: number, currency?: string, cursor?: string, network?: string, _options?: Configuration): Promise<RequestContext>;
|
|
10
|
+
}
|
|
11
|
+
export declare class AddressesApiResponseProcessor {
|
|
12
|
+
v1AddressesList(response: ResponseContext): Promise<CursorPageAddress>;
|
|
13
|
+
v1WalletsGetDepositAddress(response: ResponseContext): Promise<Address>;
|
|
14
|
+
v1WalletsListDepositAddresses(response: ResponseContext): Promise<CursorPageAddress>;
|
|
15
|
+
}
|