@riocrypto/common 1.0.1706 → 1.0.1711
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/build/index.d.ts +1 -11
- package/build/index.js +1 -11
- package/build/types/internal-balances.d.ts +8 -0
- package/build/types/rio-settings-update.d.ts +4 -1
- package/build/types/rio-settings.d.ts +4 -1
- package/package.json +1 -1
- package/build/clients/rio-admin-client.d.ts +0 -351
- package/build/clients/rio-admin-client.js +0 -1113
- package/build/clients/rio-client.d.ts +0 -281
- package/build/clients/rio-client.js +0 -826
- package/build/events/identity-verification-failed-event.d.ts +0 -12
- package/build/events/identity-verification-in-review-event.d.ts +0 -12
- package/build/events/identity-verification-in-review-event.js +0 -2
- package/build/events/identity-verification-passed-event.d.ts +0 -12
- package/build/events/identity-verification-passed-event.js +0 -2
- package/build/helpers/get-user-from-client-helper.d.ts +0 -3
- package/build/helpers/get-user-from-client-helper.js +0 -24
- package/build/types/IdentityVerificationType.d.ts +0 -5
- package/build/types/IdentityVerificationType.js +0 -9
- package/build/types/KYC.d.ts +0 -11
- package/build/types/KYC.js +0 -2
- /package/build/{events/identity-verification-failed-event.js → types/internal-balances.js} +0 -0
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance, AxiosStatic } from "axios";
|
|
2
|
-
import { Auth } from "../types/auth";
|
|
3
|
-
import { AuthUpdate } from "../types/auth-update";
|
|
4
|
-
import { BankPayout } from "../types/bank-payout";
|
|
5
|
-
import { CryptoAddress } from "../types/crypto-address";
|
|
6
|
-
import { Country } from "../types/country";
|
|
7
|
-
import { Fiat } from "../types/fiat";
|
|
8
|
-
import { Order } from "../types/order";
|
|
9
|
-
import { OrderInput } from "../types/order-input";
|
|
10
|
-
import { PaymentMethod } from "../types/payment-method";
|
|
11
|
-
import { PayoutMethod } from "../types/payout-method";
|
|
12
|
-
import { RioSettings } from "../types/rio-settings";
|
|
13
|
-
import { RioSettingsUpdate } from "../types/rio-settings-update";
|
|
14
|
-
import { User } from "../types/user";
|
|
15
|
-
import { UserInput } from "../types/user-input";
|
|
16
|
-
import { UserUpdate } from "../types/user-update";
|
|
17
|
-
import { BankPayment } from "../types/bank-payment";
|
|
18
|
-
import { BankAccount } from "../types/bank-account";
|
|
19
|
-
import { Quote } from "../types/quote";
|
|
20
|
-
import { Crypto } from "../types/crypto";
|
|
21
|
-
import { QuoteInput } from "../types/quote-input";
|
|
22
|
-
import { UserQuery } from "../types/user-query";
|
|
23
|
-
import { OrderQuery } from "../types/order-query";
|
|
24
|
-
import { BankAccountQuery } from "../types/bank-account-query";
|
|
25
|
-
import { Invoice } from "../types/invoice";
|
|
26
|
-
import { CryptoAddressQuery } from "../types/crypto-address-query";
|
|
27
|
-
import { ChainedQuoteInput } from "../types/chained-quote-input";
|
|
28
|
-
import { ChainedQuote } from "../types/chained-quote";
|
|
29
|
-
import { ChainedOrderInput } from "../types/chained-order-input";
|
|
30
|
-
import { ChainedOrder } from "../types/chained-order";
|
|
31
|
-
import { ChainedOrderQuery } from "../types/chained-order-query";
|
|
32
|
-
import { SecurityQuestion } from "../types/security-question";
|
|
33
|
-
import { KYCFileType } from "../types/kyc-file-type";
|
|
34
|
-
import { CountryOfOrigin } from "../types/country-of-origin";
|
|
35
|
-
import { UserType } from "../types/user-type";
|
|
36
|
-
import { UBOInput } from "../types/UBO-input";
|
|
37
|
-
import { UBO } from "../types/UBO";
|
|
38
|
-
import { UBOUpdate } from "../types/UBO-update";
|
|
39
|
-
import { IdentityVerificationType } from "../types/IdentityVerificationType";
|
|
40
|
-
import { BidInput } from "../types/bid-input";
|
|
41
|
-
import { AddressVerification } from "../types/address-verification";
|
|
42
|
-
import { BankAccountVerification } from "../types/bank-account-verification";
|
|
43
|
-
import { Onboarding } from "../types/onboarding";
|
|
44
|
-
import { Alert } from "../types/alert";
|
|
45
|
-
import { AlertTriggerCondition } from "../types/alert-trigger-condition";
|
|
46
|
-
import { Side } from "../types/side";
|
|
47
|
-
import { AlertType } from "../types/alert-type";
|
|
48
|
-
import { WebhookRegistration } from "../types/webhook-registration";
|
|
49
|
-
import { WebhookType } from "../types/webhook-type";
|
|
50
|
-
export declare class RioClient {
|
|
51
|
-
private axios;
|
|
52
|
-
constructor(axios: AxiosStatic | AxiosInstance);
|
|
53
|
-
getAddressVerification(cryptoAddressId: string): Promise<AddressVerification>;
|
|
54
|
-
getBankAccountVerification(bankAccountId: string): Promise<BankAccountVerification>;
|
|
55
|
-
getLiquidityAvailable(): Promise<{
|
|
56
|
-
buy: number;
|
|
57
|
-
sell: number;
|
|
58
|
-
}>;
|
|
59
|
-
exportOrders(page: number, startDate: Date, endDate: Date, query?: OrderQuery): Promise<Order[]>;
|
|
60
|
-
getOrders(page: number, limit?: number, query?: OrderQuery, includeOwnOrders?: boolean, startDate?: Date, endDate?: Date): Promise<Order[]>;
|
|
61
|
-
createAlert({ userId, type, priceTrigger, liquidityTrigger, destinationType, telegramDestination, }: {
|
|
62
|
-
userId: string;
|
|
63
|
-
type: AlertType;
|
|
64
|
-
priceTrigger?: {
|
|
65
|
-
country: Country;
|
|
66
|
-
condition: AlertTriggerCondition;
|
|
67
|
-
value: number;
|
|
68
|
-
side: Side;
|
|
69
|
-
fiat: Fiat;
|
|
70
|
-
crypto: Crypto;
|
|
71
|
-
cooldown?: number;
|
|
72
|
-
isRecurring?: boolean;
|
|
73
|
-
};
|
|
74
|
-
liquidityTrigger?: {
|
|
75
|
-
condition: AlertTriggerCondition;
|
|
76
|
-
value: number;
|
|
77
|
-
side: Side;
|
|
78
|
-
assetType?: "crypto" | "fiat";
|
|
79
|
-
asset?: Crypto | Fiat;
|
|
80
|
-
cooldown?: number;
|
|
81
|
-
isRecurring?: boolean;
|
|
82
|
-
};
|
|
83
|
-
destinationType: "telegram";
|
|
84
|
-
telegramDestination: {
|
|
85
|
-
chatId?: string;
|
|
86
|
-
username?: string;
|
|
87
|
-
};
|
|
88
|
-
}): Promise<{
|
|
89
|
-
code: string;
|
|
90
|
-
}>;
|
|
91
|
-
getAlerts(): Promise<Alert[]>;
|
|
92
|
-
getAlert(id: string): Promise<Alert>;
|
|
93
|
-
deleteAlert(id: string): Promise<void>;
|
|
94
|
-
updateOrder(id: string, update: {
|
|
95
|
-
notes: string;
|
|
96
|
-
}): Promise<Order>;
|
|
97
|
-
getChainedOrders(page: number, limit?: number, query?: ChainedOrderQuery): Promise<ChainedOrder[]>;
|
|
98
|
-
createQuote(input: QuoteInput): Promise<Quote>;
|
|
99
|
-
createChainedQuote(input: ChainedQuoteInput): Promise<ChainedQuote>;
|
|
100
|
-
getUsers(page: number, limit?: number, query?: UserQuery): Promise<User[]>;
|
|
101
|
-
getUBOS(page: number, limit?: number): Promise<UBO[]>;
|
|
102
|
-
updateUser(update: UserUpdate, userId?: string): Promise<User>;
|
|
103
|
-
requestOnboardingReview(country: Country, userId?: string): Promise<User>;
|
|
104
|
-
updateUBO(update: UBOUpdate, uboId?: string): Promise<UBO>;
|
|
105
|
-
uploadCOI(id: string, formData: FormData): Promise<User>;
|
|
106
|
-
uploadFile(id: string, country: CountryOfOrigin, fileType: KYCFileType, formData: FormData): Promise<User>;
|
|
107
|
-
uploadKYCReport(id: string, formData: FormData): Promise<User>;
|
|
108
|
-
createBid(input: BidInput): Promise<void>;
|
|
109
|
-
getBid(id: string): Promise<void>;
|
|
110
|
-
uploadCSF(id: string, formData: FormData): Promise<User>;
|
|
111
|
-
getRioSettings(): Promise<RioSettings>;
|
|
112
|
-
sendVerificationEmail(type: IdentityVerificationType, id: string, country: Country): Promise<void>;
|
|
113
|
-
sendUBOOnboardingEmail(email: string, associatedUserId: string, country: Country): Promise<void>;
|
|
114
|
-
sendBridgeOnboardingEmail(userId: string): Promise<void>;
|
|
115
|
-
getOnboardingRequirements(userType: UserType, country: Country, countryOfOrigin: CountryOfOrigin): Promise<{
|
|
116
|
-
textRequirements: ("personalId" | "taxId")[];
|
|
117
|
-
fileRequirements: KYCFileType[];
|
|
118
|
-
}>;
|
|
119
|
-
getUBOOnboardingRequirements(country: Country, countryOfOrigin: CountryOfOrigin): Promise<{
|
|
120
|
-
textRequirements: ("personalId" | "taxId")[];
|
|
121
|
-
fileRequirements: KYCFileType[];
|
|
122
|
-
}>;
|
|
123
|
-
createRioSettings(rioSettings: {
|
|
124
|
-
platformFee: number;
|
|
125
|
-
}): Promise<void>;
|
|
126
|
-
updateRioSettings(update: RioSettingsUpdate): Promise<void>;
|
|
127
|
-
confirmBankPayment(orderId: string, amountFiat?: number): Promise<any>;
|
|
128
|
-
createAPIKey(label: string): Promise<{
|
|
129
|
-
value: string;
|
|
130
|
-
label: string;
|
|
131
|
-
}>;
|
|
132
|
-
deleteBankAccount(id: string): Promise<void>;
|
|
133
|
-
deleteAddress(id: string): Promise<void>;
|
|
134
|
-
deleteAPIKey(id: string): Promise<void>;
|
|
135
|
-
confirmBankPayout(orderId: string): Promise<any>;
|
|
136
|
-
getUser(userId?: string): Promise<User>;
|
|
137
|
-
getUBO(id: string): Promise<UBO>;
|
|
138
|
-
createUser(user: UserInput): Promise<User>;
|
|
139
|
-
createUBO(user: UBOInput): Promise<UBO>;
|
|
140
|
-
uploadUBOFile(id: string, country: CountryOfOrigin, fileType: KYCFileType, formData: FormData): Promise<UBO>;
|
|
141
|
-
uploadProofOfAddress(id: string, formData: FormData): Promise<User>;
|
|
142
|
-
getBankPayment(orderId: string): Promise<BankPayment>;
|
|
143
|
-
verifyBankPayment(orderId: string): Promise<any>;
|
|
144
|
-
sendPhoneAuthCode(phoneNumber: string): Promise<{
|
|
145
|
-
hasAuthenticatorEnabled: boolean;
|
|
146
|
-
}>;
|
|
147
|
-
getAuth(id: string): Promise<Auth>;
|
|
148
|
-
getAuthWithoutId(): Promise<Auth>;
|
|
149
|
-
getAuths(userId?: string): Promise<Auth[]>;
|
|
150
|
-
deleteAuth(id: string): Promise<void>;
|
|
151
|
-
getSecurityQuestion(): Promise<SecurityQuestion>;
|
|
152
|
-
authHasSecurityQuestion(): Promise<Boolean>;
|
|
153
|
-
signout(): Promise<void>;
|
|
154
|
-
verifyCode(phoneNumber: string, code?: string, authenticatorCode?: string): Promise<{
|
|
155
|
-
id: string;
|
|
156
|
-
} | void>;
|
|
157
|
-
createFogbenderToken(): Promise<{
|
|
158
|
-
token: string;
|
|
159
|
-
}>;
|
|
160
|
-
createAuthenticatorSecret(): Promise<{
|
|
161
|
-
secret: string;
|
|
162
|
-
}>;
|
|
163
|
-
confirmAuthenticatorRegistration(authenticatorCode: string): Promise<void>;
|
|
164
|
-
signin(password: string): Promise<Auth>;
|
|
165
|
-
signup(password: string, securityQuestion: SecurityQuestion, securityAnswer: string): Promise<{
|
|
166
|
-
auth: Auth;
|
|
167
|
-
isAuthorizedPhoneNumberAuth: boolean;
|
|
168
|
-
}>;
|
|
169
|
-
refreshToken(): Promise<void>;
|
|
170
|
-
createOrder(order: OrderInput): Promise<Order>;
|
|
171
|
-
createChainedOrder(order: ChainedOrderInput): Promise<ChainedOrder>;
|
|
172
|
-
cancelOrder(id?: string): Promise<Order>;
|
|
173
|
-
cancelChainedOrder(id?: string): Promise<void>;
|
|
174
|
-
getOrder(id: string): Promise<Order>;
|
|
175
|
-
getChainedOrder(id: string): Promise<ChainedOrder>;
|
|
176
|
-
createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
|
|
177
|
-
getBankPayout(orderId: string): Promise<BankPayout>;
|
|
178
|
-
getBridgeOnboardingLinks(userId: string): Promise<{
|
|
179
|
-
tosLink: string;
|
|
180
|
-
kycLink: string;
|
|
181
|
-
}>;
|
|
182
|
-
getCryptoAddresses(page: number, limit?: number, query?: CryptoAddressQuery): Promise<CryptoAddress[]>;
|
|
183
|
-
startAddressVerification(addressId: string): Promise<void>;
|
|
184
|
-
completeAddressVerification(addressId: string, amount: Number): Promise<void>;
|
|
185
|
-
startBankAccountVerification(bankAccountId: string): Promise<void>;
|
|
186
|
-
completeBankAccountVerification(bankAccountId: string, amount: Number): Promise<void>;
|
|
187
|
-
getCryptoAddress(id: string): Promise<CryptoAddress>;
|
|
188
|
-
createCryptoAddress(address: string, crypto: Crypto, userId?: string, label?: string): Promise<CryptoAddress>;
|
|
189
|
-
createBridgePlaidLink(userId: string): Promise<string>;
|
|
190
|
-
createBridgeExternalAccount(userId: string, bankName: string, accountNumber: string, routingNumber: string, accountOwnerName: string, address: {
|
|
191
|
-
street1: string;
|
|
192
|
-
street2?: string;
|
|
193
|
-
city: string;
|
|
194
|
-
state: string;
|
|
195
|
-
postalCode: string;
|
|
196
|
-
country: CountryOfOrigin;
|
|
197
|
-
}): Promise<string>;
|
|
198
|
-
createBankAccount(userId: string, country: Country, fiat: Fiat, bankName: string, accountHolderName: string, accountNumber?: string, routingNumber?: string, CLABE?: string, CCI?: string, notes?: string, address?: {
|
|
199
|
-
street1: string;
|
|
200
|
-
street2?: string;
|
|
201
|
-
city: string;
|
|
202
|
-
state: string;
|
|
203
|
-
postalCode: string;
|
|
204
|
-
country: CountryOfOrigin;
|
|
205
|
-
}): Promise<BankAccount>;
|
|
206
|
-
updateBankAccount(id: string, data: {
|
|
207
|
-
notes?: string;
|
|
208
|
-
}): Promise<BankAccount>;
|
|
209
|
-
getFeesByVolume(): Promise<{
|
|
210
|
-
days: number;
|
|
211
|
-
fee: number;
|
|
212
|
-
volume: number;
|
|
213
|
-
}>;
|
|
214
|
-
getAggregateVolume(): Promise<{
|
|
215
|
-
volume: number;
|
|
216
|
-
revenue: number;
|
|
217
|
-
}>;
|
|
218
|
-
getTransactionLimits(userId: string): Promise<{
|
|
219
|
-
limit: number;
|
|
220
|
-
used: number;
|
|
221
|
-
}>;
|
|
222
|
-
getQuote(id: string): Promise<Quote>;
|
|
223
|
-
getChainedQuote(id: string): Promise<ChainedQuote>;
|
|
224
|
-
createVerificationLink(userId: string, firstName: string, lastName: string): Promise<string>;
|
|
225
|
-
getPaymentMethods(fiat: Fiat, country: Country): Promise<PaymentMethod[]>;
|
|
226
|
-
getBankAccounts(page: number, limit: number, query?: BankAccountQuery): Promise<BankAccount[]>;
|
|
227
|
-
getBankAccount(id: string): Promise<BankAccount>;
|
|
228
|
-
getSupportedPayoutMethods(fiat: Fiat, country: Country): Promise<PayoutMethod[]>;
|
|
229
|
-
createKushkiPayment(orderId: string, token: string): Promise<{
|
|
230
|
-
paymentId: string;
|
|
231
|
-
}>;
|
|
232
|
-
addAuthorizedPhoneNumber(phoneNumber: string, userId?: string): Promise<User>;
|
|
233
|
-
deleteAuthorizedPhoneNumber(phoneNumber: string, userId: string): Promise<User>;
|
|
234
|
-
createKushkiBankPayment(orderId: string): Promise<any>;
|
|
235
|
-
updateAuth(update: AuthUpdate, id: string): Promise<Auth>;
|
|
236
|
-
getInvoice(orderId: string): Promise<Invoice>;
|
|
237
|
-
createOnboardingByLink(userType: UserType, countryOfOperation: Country, brokerId?: string, referrerId?: string): Promise<{
|
|
238
|
-
id: string;
|
|
239
|
-
kycLink: string;
|
|
240
|
-
}>;
|
|
241
|
-
createUSOnboardingByLink({ userType, businessName, firstName, middleName, lastName, secondLastName, email, brokerId, referrerId, }: {
|
|
242
|
-
userType: UserType;
|
|
243
|
-
businessName?: string;
|
|
244
|
-
firstName?: string;
|
|
245
|
-
middleName?: string;
|
|
246
|
-
lastName?: string;
|
|
247
|
-
secondLastName?: string;
|
|
248
|
-
email: string;
|
|
249
|
-
brokerId?: string;
|
|
250
|
-
referrerId?: string;
|
|
251
|
-
}): Promise<{
|
|
252
|
-
id: string;
|
|
253
|
-
kycLink: string;
|
|
254
|
-
tosLink: string;
|
|
255
|
-
}>;
|
|
256
|
-
createIncrementalOnboardingByLink(userId: string, countryOfOperation: Country): Promise<{
|
|
257
|
-
id: string;
|
|
258
|
-
kycLink: string;
|
|
259
|
-
}>;
|
|
260
|
-
createIncrementalUSOnboardingByLink(userId: string): Promise<{
|
|
261
|
-
id: string;
|
|
262
|
-
kycLink: string;
|
|
263
|
-
tosLink: string;
|
|
264
|
-
}>;
|
|
265
|
-
getOnboarding(id: string): Promise<Onboarding>;
|
|
266
|
-
createWebhookRegistration({ userId, brokerId, type, url, }: {
|
|
267
|
-
userId?: string;
|
|
268
|
-
brokerId?: string;
|
|
269
|
-
type: WebhookType;
|
|
270
|
-
url: string;
|
|
271
|
-
}): Promise<{
|
|
272
|
-
id: string;
|
|
273
|
-
secret: string;
|
|
274
|
-
}>;
|
|
275
|
-
getWebhookRegistrations(page: number, query?: {
|
|
276
|
-
userId?: string;
|
|
277
|
-
brokerId?: string;
|
|
278
|
-
}): Promise<WebhookRegistration[]>;
|
|
279
|
-
getWebhookRegistration(id: string): Promise<WebhookRegistration>;
|
|
280
|
-
deleteWebhookRegistration(id: string): Promise<void>;
|
|
281
|
-
}
|