@t-0/provider-sdk 1.0.22 → 1.0.24
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 +2 -2
- package/lib/client/client.d.ts +3 -33
- package/lib/client/client.js +4 -5
- package/lib/common/gen/tzero/v1/common/common_pb.d.ts +64 -0
- package/lib/common/gen/tzero/v1/common/common_pb.js +53 -0
- package/lib/common/gen/tzero/v1/common/payment_method_pb.d.ts +122 -0
- package/lib/common/gen/tzero/v1/common/payment_method_pb.js +57 -0
- package/lib/common/gen/tzero/v1/payment/network_pb.d.ts +567 -0
- package/lib/common/gen/tzero/v1/payment/network_pb.js +144 -0
- package/lib/common/gen/tzero/v1/payment/provider_pb.d.ts +641 -0
- package/lib/common/gen/tzero/v1/payment/provider_pb.js +203 -0
- package/lib/common/gen/tzero/v1/payment_intent/provider/provider_pb.d.ts +296 -0
- package/lib/common/gen/tzero/v1/payment_intent/provider/provider_pb.js +84 -0
- package/lib/common/gen/tzero/v1/payment_intent/recipient/recipient_pb.d.ts +214 -0
- package/lib/common/gen/tzero/v1/payment_intent/recipient/recipient_pb.js +59 -0
- package/lib/common/gen/tzero/v1/public/public_pb.d.ts +234 -0
- package/lib/common/gen/tzero/v1/public/public_pb.js +85 -0
- package/lib/gen/common/common_pb.d.ts +39 -1
- package/lib/gen/common/common_pb.js +42 -2
- package/lib/gen/common/payment_method_pb.d.ts +77 -6
- package/lib/gen/common/payment_method_pb.js +41 -2
- package/lib/gen/network/network_pb.d.ts +16 -98
- package/lib/gen/network/network_pb.js +2 -21
- package/lib/gen/network/provider_pb.d.ts +20 -98
- package/lib/gen/network/provider_pb.js +1 -21
- package/lib/gen/payment_intent/provider/provider_pb.d.ts +296 -0
- package/lib/gen/payment_intent/provider/provider_pb.js +84 -0
- package/lib/gen/payment_intent/recipient/recipient_pb.d.ts +214 -0
- package/lib/gen/payment_intent/recipient/recipient_pb.js +59 -0
- package/lib/index.d.ts +6 -4
- package/lib/index.js +6 -4
- package/lib/payment_intent/provider/index.d.ts +1 -0
- package/lib/payment_intent/provider/index.js +1 -0
- package/lib/payment_intent/recipient/index.d.ts +1 -0
- package/lib/payment_intent/recipient/index.js +1 -0
- package/lib/service/service.d.ts +6 -2
- package/lib/service/service.js +4 -6
- package/package.json +7 -7
|
@@ -0,0 +1,641 @@
|
|
|
1
|
+
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { PaymentMethod } from "../common/payment_method_pb";
|
|
3
|
+
import type { Decimal } from "../common/common_pb";
|
|
4
|
+
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
|
5
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
6
|
+
/**
|
|
7
|
+
* Describes the file tzero/v1/payment/provider.proto.
|
|
8
|
+
*/
|
|
9
|
+
export declare const file_tzero_v1_payment_provider: GenFile;
|
|
10
|
+
/**
|
|
11
|
+
* @generated from message tzero.v1.payment.AppendLedgerEntriesRequest
|
|
12
|
+
*/
|
|
13
|
+
export type AppendLedgerEntriesRequest = Message<"tzero.v1.payment.AppendLedgerEntriesRequest"> & {
|
|
14
|
+
/**
|
|
15
|
+
* *
|
|
16
|
+
* This is a list of transactions that were appended to the ledger of the provider.
|
|
17
|
+
* The transaction_id should be used to identify the transaction and ensure that it is processed only once.
|
|
18
|
+
*
|
|
19
|
+
* @generated from field: repeated tzero.v1.payment.AppendLedgerEntriesRequest.Transaction transactions = 20;
|
|
20
|
+
*/
|
|
21
|
+
transactions: AppendLedgerEntriesRequest_Transaction[];
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Describes the message tzero.v1.payment.AppendLedgerEntriesRequest.
|
|
25
|
+
* Use `create(AppendLedgerEntriesRequestSchema)` to create a new message.
|
|
26
|
+
*/
|
|
27
|
+
export declare const AppendLedgerEntriesRequestSchema: GenMessage<AppendLedgerEntriesRequest>;
|
|
28
|
+
/**
|
|
29
|
+
* @generated from message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction
|
|
30
|
+
*/
|
|
31
|
+
export type AppendLedgerEntriesRequest_Transaction = Message<"tzero.v1.payment.AppendLedgerEntriesRequest.Transaction"> & {
|
|
32
|
+
/**
|
|
33
|
+
* *
|
|
34
|
+
* transaction_id is an incrementally growing identifier for the transaction.
|
|
35
|
+
* It could have gaps and could be out of order, but it is unique for each transaction.
|
|
36
|
+
*
|
|
37
|
+
* @generated from field: uint64 transaction_id = 10;
|
|
38
|
+
*/
|
|
39
|
+
transactionId: bigint;
|
|
40
|
+
/**
|
|
41
|
+
* *
|
|
42
|
+
* entries is a list of ledger entries that were appended to the ledger of the provider.
|
|
43
|
+
* Each entry represents a financial event that occurred in the provider's accounts.
|
|
44
|
+
*
|
|
45
|
+
* @generated from field: repeated tzero.v1.payment.AppendLedgerEntriesRequest.LedgerEntry entries = 30;
|
|
46
|
+
*/
|
|
47
|
+
entries: AppendLedgerEntriesRequest_LedgerEntry[];
|
|
48
|
+
/**
|
|
49
|
+
* *
|
|
50
|
+
* transaction_details is a oneof field that contains details about the transaction.
|
|
51
|
+
* It can be one of the following: PayIn, PayoutReservation, Payout, ProviderSettlement, FeeSettlement, PayoutReservationRelease.
|
|
52
|
+
*
|
|
53
|
+
* @generated from oneof tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.transaction_details
|
|
54
|
+
*/
|
|
55
|
+
transactionDetails: {
|
|
56
|
+
/**
|
|
57
|
+
* @generated from field: tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.PayIn pay_in = 110;
|
|
58
|
+
*/
|
|
59
|
+
value: AppendLedgerEntriesRequest_Transaction_PayIn;
|
|
60
|
+
case: "payIn";
|
|
61
|
+
} | {
|
|
62
|
+
/**
|
|
63
|
+
* @generated from field: tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.PayoutReservation payout_reservation = 120;
|
|
64
|
+
*/
|
|
65
|
+
value: AppendLedgerEntriesRequest_Transaction_PayoutReservation;
|
|
66
|
+
case: "payoutReservation";
|
|
67
|
+
} | {
|
|
68
|
+
/**
|
|
69
|
+
* @generated from field: tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.Payout payout = 130;
|
|
70
|
+
*/
|
|
71
|
+
value: AppendLedgerEntriesRequest_Transaction_Payout;
|
|
72
|
+
case: "payout";
|
|
73
|
+
} | {
|
|
74
|
+
/**
|
|
75
|
+
* @generated from field: tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.ProviderSettlement provider_settlement = 140;
|
|
76
|
+
*/
|
|
77
|
+
value: AppendLedgerEntriesRequest_Transaction_ProviderSettlement;
|
|
78
|
+
case: "providerSettlement";
|
|
79
|
+
} | {
|
|
80
|
+
/**
|
|
81
|
+
* @generated from field: tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.FeeSettlement fee_settlement = 150;
|
|
82
|
+
*/
|
|
83
|
+
value: AppendLedgerEntriesRequest_Transaction_FeeSettlement;
|
|
84
|
+
case: "feeSettlement";
|
|
85
|
+
} | {
|
|
86
|
+
/**
|
|
87
|
+
* @generated from field: tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.PayoutReservationRelease payout_reservation_release = 160;
|
|
88
|
+
*/
|
|
89
|
+
value: AppendLedgerEntriesRequest_Transaction_PayoutReservationRelease;
|
|
90
|
+
case: "payoutReservationRelease";
|
|
91
|
+
} | {
|
|
92
|
+
case: undefined;
|
|
93
|
+
value?: undefined;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Describes the message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.
|
|
98
|
+
* Use `create(AppendLedgerEntriesRequest_TransactionSchema)` to create a new message.
|
|
99
|
+
*/
|
|
100
|
+
export declare const AppendLedgerEntriesRequest_TransactionSchema: GenMessage<AppendLedgerEntriesRequest_Transaction>;
|
|
101
|
+
/**
|
|
102
|
+
* @generated from message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.PayIn
|
|
103
|
+
*/
|
|
104
|
+
export type AppendLedgerEntriesRequest_Transaction_PayIn = Message<"tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.PayIn"> & {
|
|
105
|
+
/**
|
|
106
|
+
* @generated from field: uint64 payment_id = 10;
|
|
107
|
+
*/
|
|
108
|
+
paymentId: bigint;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Describes the message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.PayIn.
|
|
112
|
+
* Use `create(AppendLedgerEntriesRequest_Transaction_PayInSchema)` to create a new message.
|
|
113
|
+
*/
|
|
114
|
+
export declare const AppendLedgerEntriesRequest_Transaction_PayInSchema: GenMessage<AppendLedgerEntriesRequest_Transaction_PayIn>;
|
|
115
|
+
/**
|
|
116
|
+
* @generated from message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.PayoutReservation
|
|
117
|
+
*/
|
|
118
|
+
export type AppendLedgerEntriesRequest_Transaction_PayoutReservation = Message<"tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.PayoutReservation"> & {
|
|
119
|
+
/**
|
|
120
|
+
* @generated from field: uint64 payment_id = 10;
|
|
121
|
+
*/
|
|
122
|
+
paymentId: bigint;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Describes the message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.PayoutReservation.
|
|
126
|
+
* Use `create(AppendLedgerEntriesRequest_Transaction_PayoutReservationSchema)` to create a new message.
|
|
127
|
+
*/
|
|
128
|
+
export declare const AppendLedgerEntriesRequest_Transaction_PayoutReservationSchema: GenMessage<AppendLedgerEntriesRequest_Transaction_PayoutReservation>;
|
|
129
|
+
/**
|
|
130
|
+
* @generated from message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.Payout
|
|
131
|
+
*/
|
|
132
|
+
export type AppendLedgerEntriesRequest_Transaction_Payout = Message<"tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.Payout"> & {
|
|
133
|
+
/**
|
|
134
|
+
* @generated from field: uint64 payment_id = 10;
|
|
135
|
+
*/
|
|
136
|
+
paymentId: bigint;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Describes the message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.Payout.
|
|
140
|
+
* Use `create(AppendLedgerEntriesRequest_Transaction_PayoutSchema)` to create a new message.
|
|
141
|
+
*/
|
|
142
|
+
export declare const AppendLedgerEntriesRequest_Transaction_PayoutSchema: GenMessage<AppendLedgerEntriesRequest_Transaction_Payout>;
|
|
143
|
+
/**
|
|
144
|
+
* @generated from message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.ProviderSettlement
|
|
145
|
+
*/
|
|
146
|
+
export type AppendLedgerEntriesRequest_Transaction_ProviderSettlement = Message<"tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.ProviderSettlement"> & {
|
|
147
|
+
/**
|
|
148
|
+
* @generated from field: uint64 settlement_id = 10;
|
|
149
|
+
*/
|
|
150
|
+
settlementId: bigint;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Describes the message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.ProviderSettlement.
|
|
154
|
+
* Use `create(AppendLedgerEntriesRequest_Transaction_ProviderSettlementSchema)` to create a new message.
|
|
155
|
+
*/
|
|
156
|
+
export declare const AppendLedgerEntriesRequest_Transaction_ProviderSettlementSchema: GenMessage<AppendLedgerEntriesRequest_Transaction_ProviderSettlement>;
|
|
157
|
+
/**
|
|
158
|
+
* @generated from message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.FeeSettlement
|
|
159
|
+
*/
|
|
160
|
+
export type AppendLedgerEntriesRequest_Transaction_FeeSettlement = Message<"tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.FeeSettlement"> & {
|
|
161
|
+
/**
|
|
162
|
+
* @generated from field: uint64 fee_settlement_id = 10;
|
|
163
|
+
*/
|
|
164
|
+
feeSettlementId: bigint;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Describes the message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.FeeSettlement.
|
|
168
|
+
* Use `create(AppendLedgerEntriesRequest_Transaction_FeeSettlementSchema)` to create a new message.
|
|
169
|
+
*/
|
|
170
|
+
export declare const AppendLedgerEntriesRequest_Transaction_FeeSettlementSchema: GenMessage<AppendLedgerEntriesRequest_Transaction_FeeSettlement>;
|
|
171
|
+
/**
|
|
172
|
+
* @generated from message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.PayoutReservationRelease
|
|
173
|
+
*/
|
|
174
|
+
export type AppendLedgerEntriesRequest_Transaction_PayoutReservationRelease = Message<"tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.PayoutReservationRelease"> & {
|
|
175
|
+
/**
|
|
176
|
+
* @generated from field: uint64 payment_id = 10;
|
|
177
|
+
*/
|
|
178
|
+
paymentId: bigint;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Describes the message tzero.v1.payment.AppendLedgerEntriesRequest.Transaction.PayoutReservationRelease.
|
|
182
|
+
* Use `create(AppendLedgerEntriesRequest_Transaction_PayoutReservationReleaseSchema)` to create a new message.
|
|
183
|
+
*/
|
|
184
|
+
export declare const AppendLedgerEntriesRequest_Transaction_PayoutReservationReleaseSchema: GenMessage<AppendLedgerEntriesRequest_Transaction_PayoutReservationRelease>;
|
|
185
|
+
/**
|
|
186
|
+
* @generated from message tzero.v1.payment.AppendLedgerEntriesRequest.LedgerEntry
|
|
187
|
+
*/
|
|
188
|
+
export type AppendLedgerEntriesRequest_LedgerEntry = Message<"tzero.v1.payment.AppendLedgerEntriesRequest.LedgerEntry"> & {
|
|
189
|
+
/**
|
|
190
|
+
* 1 is network account, others are ids of participants
|
|
191
|
+
*
|
|
192
|
+
* @generated from field: uint32 account_owner_id = 10;
|
|
193
|
+
*/
|
|
194
|
+
accountOwnerId: number;
|
|
195
|
+
/**
|
|
196
|
+
* *
|
|
197
|
+
* account_type is the type of the account that the entry belongs to.
|
|
198
|
+
* It is used to categorize the entries and understand the nature of the financial event.
|
|
199
|
+
*
|
|
200
|
+
* @generated from field: tzero.v1.payment.AppendLedgerEntriesRequest.AccountType account_type = 20;
|
|
201
|
+
*/
|
|
202
|
+
accountType: AppendLedgerEntriesRequest_AccountType;
|
|
203
|
+
/**
|
|
204
|
+
* *
|
|
205
|
+
* It is the currency of the entry. If the transaction contains entries with multiple currencies, the exchange_rate
|
|
206
|
+
* field should be provided to be used to convert the amounts to USD.
|
|
207
|
+
*
|
|
208
|
+
* @generated from field: string currency = 30;
|
|
209
|
+
*/
|
|
210
|
+
currency: string;
|
|
211
|
+
/**
|
|
212
|
+
* *
|
|
213
|
+
* debit is the amount that was debited from the account.
|
|
214
|
+
* If the entry is a credit, this field should be 0.
|
|
215
|
+
*
|
|
216
|
+
* @generated from field: tzero.v1.common.Decimal debit = 40;
|
|
217
|
+
*/
|
|
218
|
+
debit?: Decimal;
|
|
219
|
+
/**
|
|
220
|
+
* *
|
|
221
|
+
* credit is the amount that was credited to the account.
|
|
222
|
+
* If the entry is a debit, this field should be 0.
|
|
223
|
+
*
|
|
224
|
+
* @generated from field: tzero.v1.common.Decimal credit = 50;
|
|
225
|
+
*/
|
|
226
|
+
credit?: Decimal;
|
|
227
|
+
/**
|
|
228
|
+
* *
|
|
229
|
+
* exchange_rate is the exchange rate of the currency to USD if the currency is not USD and the transaction contains
|
|
230
|
+
* entries with multiple currencies. Exchange rate for the base currency USD and the quote currency provided in the entry.
|
|
231
|
+
*
|
|
232
|
+
* @generated from field: tzero.v1.common.Decimal exchange_rate = 60;
|
|
233
|
+
*/
|
|
234
|
+
exchangeRate?: Decimal;
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* Describes the message tzero.v1.payment.AppendLedgerEntriesRequest.LedgerEntry.
|
|
238
|
+
* Use `create(AppendLedgerEntriesRequest_LedgerEntrySchema)` to create a new message.
|
|
239
|
+
*/
|
|
240
|
+
export declare const AppendLedgerEntriesRequest_LedgerEntrySchema: GenMessage<AppendLedgerEntriesRequest_LedgerEntry>;
|
|
241
|
+
/**
|
|
242
|
+
* @generated from enum tzero.v1.payment.AppendLedgerEntriesRequest.AccountType
|
|
243
|
+
*/
|
|
244
|
+
export declare enum AppendLedgerEntriesRequest_AccountType {
|
|
245
|
+
/**
|
|
246
|
+
* @generated from enum value: ACCOUNT_TYPE_UNSPECIFIED = 0;
|
|
247
|
+
*/
|
|
248
|
+
UNSPECIFIED = 0,
|
|
249
|
+
/**
|
|
250
|
+
* Reflects the user's payable balance, the amount that the provider owes to the user.
|
|
251
|
+
*
|
|
252
|
+
* @generated from enum value: ACCOUNT_TYPE_USER_PAYABLE = 1;
|
|
253
|
+
*/
|
|
254
|
+
USER_PAYABLE = 1,
|
|
255
|
+
/**
|
|
256
|
+
* Reflects the cash balance of the provider.
|
|
257
|
+
*
|
|
258
|
+
* @generated from enum value: ACCOUNT_TYPE_CASH = 2;
|
|
259
|
+
*/
|
|
260
|
+
CASH = 2,
|
|
261
|
+
/**
|
|
262
|
+
* This is the reserve account of the provider, which reflects the reserve of balance to reduce the limit available from one provider to another.
|
|
263
|
+
*
|
|
264
|
+
* @generated from enum value: ACCOUNT_TYPE_RESERVE = 3;
|
|
265
|
+
*/
|
|
266
|
+
RESERVE = 3,
|
|
267
|
+
/**
|
|
268
|
+
* This is the mirror account for the reserve. To keep the double entry accounting principle.
|
|
269
|
+
*
|
|
270
|
+
* @generated from enum value: ACCOUNT_TYPE_RESERVE_USAGE = 4;
|
|
271
|
+
*/
|
|
272
|
+
RESERVE_USAGE = 4,
|
|
273
|
+
/**
|
|
274
|
+
* Reflects how much the provider owes to the network or other participants.
|
|
275
|
+
*
|
|
276
|
+
* @generated from enum value: ACCOUNT_TYPE_PROVIDER_PAYABLE = 5;
|
|
277
|
+
*/
|
|
278
|
+
PROVIDER_PAYABLE = 5,
|
|
279
|
+
/**
|
|
280
|
+
* Reflects how much the provider is owed by the network or other participants.
|
|
281
|
+
*
|
|
282
|
+
* @generated from enum value: ACCOUNT_TYPE_PROVIDER_RECEIVABLE = 6;
|
|
283
|
+
*/
|
|
284
|
+
PROVIDER_RECEIVABLE = 6,
|
|
285
|
+
/**
|
|
286
|
+
* Reflects the fees that the provider owes to the network.
|
|
287
|
+
*
|
|
288
|
+
* @generated from enum value: ACCOUNT_TYPE_FEE_PAYABLE = 7;
|
|
289
|
+
*/
|
|
290
|
+
FEE_PAYABLE = 7,
|
|
291
|
+
/**
|
|
292
|
+
* Reflects the fees that the network is owed by the provider.
|
|
293
|
+
*
|
|
294
|
+
* @generated from enum value: ACCOUNT_TYPE_FEE_RECEIVABLE = 8;
|
|
295
|
+
*/
|
|
296
|
+
FEE_RECEIVABLE = 8,
|
|
297
|
+
/**
|
|
298
|
+
* Reflects the fees that the provider has to pay for the services provided by the network.
|
|
299
|
+
*
|
|
300
|
+
* @generated from enum value: ACCOUNT_TYPE_FEE_EXPENSE = 9;
|
|
301
|
+
*/
|
|
302
|
+
FEE_EXPENSE = 9,
|
|
303
|
+
/**
|
|
304
|
+
* Reflects the settlement balance of the provider with the network or other participants.
|
|
305
|
+
*
|
|
306
|
+
* @generated from enum value: ACCOUNT_TYPE_PROVIDER_SETTLEMENT = 10;
|
|
307
|
+
*/
|
|
308
|
+
PROVIDER_SETTLEMENT = 10
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Describes the enum tzero.v1.payment.AppendLedgerEntriesRequest.AccountType.
|
|
312
|
+
*/
|
|
313
|
+
export declare const AppendLedgerEntriesRequest_AccountTypeSchema: GenEnum<AppendLedgerEntriesRequest_AccountType>;
|
|
314
|
+
/**
|
|
315
|
+
* @generated from message tzero.v1.payment.AppendLedgerEntriesResponse
|
|
316
|
+
*/
|
|
317
|
+
export type AppendLedgerEntriesResponse = Message<"tzero.v1.payment.AppendLedgerEntriesResponse"> & {};
|
|
318
|
+
/**
|
|
319
|
+
* Describes the message tzero.v1.payment.AppendLedgerEntriesResponse.
|
|
320
|
+
* Use `create(AppendLedgerEntriesResponseSchema)` to create a new message.
|
|
321
|
+
*/
|
|
322
|
+
export declare const AppendLedgerEntriesResponseSchema: GenMessage<AppendLedgerEntriesResponse>;
|
|
323
|
+
/**
|
|
324
|
+
* @generated from message tzero.v1.payment.PayoutRequest
|
|
325
|
+
*/
|
|
326
|
+
export type PayoutRequest = Message<"tzero.v1.payment.PayoutRequest"> & {
|
|
327
|
+
/**
|
|
328
|
+
* *
|
|
329
|
+
* payment id assigned by the network (provider should store this id to provide details in UpdatePayout later)
|
|
330
|
+
*
|
|
331
|
+
* @generated from field: int64 payment_id = 10;
|
|
332
|
+
*/
|
|
333
|
+
paymentId: bigint;
|
|
334
|
+
/**
|
|
335
|
+
* *
|
|
336
|
+
* payout id assigned by the network (provider should store this id to provide details in UpdatePayout later)
|
|
337
|
+
*
|
|
338
|
+
* @generated from field: int64 payout_id = 20;
|
|
339
|
+
*/
|
|
340
|
+
payoutId: bigint;
|
|
341
|
+
/**
|
|
342
|
+
* *
|
|
343
|
+
* currency of the payout (participant could support multiple currencies)
|
|
344
|
+
* This is the currency in which the payout should be made.
|
|
345
|
+
*
|
|
346
|
+
* @generated from field: string currency = 30;
|
|
347
|
+
*/
|
|
348
|
+
currency: string;
|
|
349
|
+
/**
|
|
350
|
+
* *
|
|
351
|
+
* client quote id of the quote used for this payout (the provider provides the quote IDs in the UpdateQuote rpc)
|
|
352
|
+
* This is the identifier of the quote that was used to calculate the payout amount.
|
|
353
|
+
*
|
|
354
|
+
* @generated from field: string client_quote_id = 40;
|
|
355
|
+
*/
|
|
356
|
+
clientQuoteId: string;
|
|
357
|
+
/**
|
|
358
|
+
* *
|
|
359
|
+
* amount in currency of the payout
|
|
360
|
+
* This is the amount that should be paid out to the recipient.
|
|
361
|
+
*
|
|
362
|
+
* *
|
|
363
|
+
* payout_method is the payment method for the payout, e.g. bank transfer, crypto transfer, etc.
|
|
364
|
+
* This is used to specify how the payout should be made.
|
|
365
|
+
*
|
|
366
|
+
* @generated from field: tzero.v1.common.Decimal amount = 50;
|
|
367
|
+
*/
|
|
368
|
+
amount?: Decimal;
|
|
369
|
+
/**
|
|
370
|
+
* @generated from field: optional tzero.v1.common.PaymentMethod payout_method = 60;
|
|
371
|
+
*/
|
|
372
|
+
payoutMethod?: PaymentMethod;
|
|
373
|
+
/**
|
|
374
|
+
* *
|
|
375
|
+
* optional reference for the payment, up to 140 characters
|
|
376
|
+
*
|
|
377
|
+
* @generated from field: optional string reference = 70;
|
|
378
|
+
*/
|
|
379
|
+
reference?: string;
|
|
380
|
+
/**
|
|
381
|
+
* *
|
|
382
|
+
* Pay-in provider id which initiated the pay out.
|
|
383
|
+
*
|
|
384
|
+
* @generated from field: uint32 pay_in_provider_id = 80;
|
|
385
|
+
*/
|
|
386
|
+
payInProviderId: number;
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* Describes the message tzero.v1.payment.PayoutRequest.
|
|
390
|
+
* Use `create(PayoutRequestSchema)` to create a new message.
|
|
391
|
+
*/
|
|
392
|
+
export declare const PayoutRequestSchema: GenMessage<PayoutRequest>;
|
|
393
|
+
/**
|
|
394
|
+
* @generated from message tzero.v1.payment.PayoutResponse
|
|
395
|
+
*/
|
|
396
|
+
export type PayoutResponse = Message<"tzero.v1.payment.PayoutResponse"> & {};
|
|
397
|
+
/**
|
|
398
|
+
* Describes the message tzero.v1.payment.PayoutResponse.
|
|
399
|
+
* Use `create(PayoutResponseSchema)` to create a new message.
|
|
400
|
+
*/
|
|
401
|
+
export declare const PayoutResponseSchema: GenMessage<PayoutResponse>;
|
|
402
|
+
/**
|
|
403
|
+
* @generated from message tzero.v1.payment.UpdatePaymentRequest
|
|
404
|
+
*/
|
|
405
|
+
export type UpdatePaymentRequest = Message<"tzero.v1.payment.UpdatePaymentRequest"> & {
|
|
406
|
+
/**
|
|
407
|
+
* *
|
|
408
|
+
* payment_id is a payment id in the T-0 network.
|
|
409
|
+
*
|
|
410
|
+
* @generated from field: uint64 payment_id = 5;
|
|
411
|
+
*/
|
|
412
|
+
paymentId: bigint;
|
|
413
|
+
/**
|
|
414
|
+
* *
|
|
415
|
+
* payment_client_id is a payment id assigned by the client, this is the same id that was provided in the CreatePaymentRequest.
|
|
416
|
+
*
|
|
417
|
+
* @generated from field: string payment_client_id = 10;
|
|
418
|
+
*/
|
|
419
|
+
paymentClientId: string;
|
|
420
|
+
/**
|
|
421
|
+
* @generated from oneof tzero.v1.payment.UpdatePaymentRequest.result
|
|
422
|
+
*/
|
|
423
|
+
result: {
|
|
424
|
+
/**
|
|
425
|
+
* *
|
|
426
|
+
* Success response - means the payout was executed successfully and the payment is now complete. This happens when
|
|
427
|
+
* the payout is successfully processed by the payout provider, and the payment was made to the recipient.
|
|
428
|
+
*
|
|
429
|
+
* @generated from field: tzero.v1.payment.UpdatePaymentRequest.Success success = 20;
|
|
430
|
+
*/
|
|
431
|
+
value: UpdatePaymentRequest_Success;
|
|
432
|
+
case: "success";
|
|
433
|
+
} | {
|
|
434
|
+
/**
|
|
435
|
+
* *
|
|
436
|
+
* Failure response - means the payout was not executed successfully, e.g. the payout provider could not process the payout.
|
|
437
|
+
*
|
|
438
|
+
* @generated from field: tzero.v1.payment.UpdatePaymentRequest.Failure failure = 30;
|
|
439
|
+
*/
|
|
440
|
+
value: UpdatePaymentRequest_Failure;
|
|
441
|
+
case: "failure";
|
|
442
|
+
} | {
|
|
443
|
+
case: undefined;
|
|
444
|
+
value?: undefined;
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
/**
|
|
448
|
+
* Describes the message tzero.v1.payment.UpdatePaymentRequest.
|
|
449
|
+
* Use `create(UpdatePaymentRequestSchema)` to create a new message.
|
|
450
|
+
*/
|
|
451
|
+
export declare const UpdatePaymentRequestSchema: GenMessage<UpdatePaymentRequest>;
|
|
452
|
+
/**
|
|
453
|
+
* @generated from message tzero.v1.payment.UpdatePaymentRequest.Success
|
|
454
|
+
*/
|
|
455
|
+
export type UpdatePaymentRequest_Success = Message<"tzero.v1.payment.UpdatePaymentRequest.Success"> & {
|
|
456
|
+
/**
|
|
457
|
+
* amount in currency of the payout
|
|
458
|
+
*
|
|
459
|
+
* @generated from field: tzero.v1.common.Decimal payout_amount = 10;
|
|
460
|
+
*/
|
|
461
|
+
payoutAmount?: Decimal;
|
|
462
|
+
/**
|
|
463
|
+
* time of the payout
|
|
464
|
+
*
|
|
465
|
+
* @generated from field: google.protobuf.Timestamp paid_out_at = 50;
|
|
466
|
+
*/
|
|
467
|
+
paidOutAt?: Timestamp;
|
|
468
|
+
};
|
|
469
|
+
/**
|
|
470
|
+
* Describes the message tzero.v1.payment.UpdatePaymentRequest.Success.
|
|
471
|
+
* Use `create(UpdatePaymentRequest_SuccessSchema)` to create a new message.
|
|
472
|
+
*/
|
|
473
|
+
export declare const UpdatePaymentRequest_SuccessSchema: GenMessage<UpdatePaymentRequest_Success>;
|
|
474
|
+
/**
|
|
475
|
+
* @generated from message tzero.v1.payment.UpdatePaymentRequest.Failure
|
|
476
|
+
*/
|
|
477
|
+
export type UpdatePaymentRequest_Failure = Message<"tzero.v1.payment.UpdatePaymentRequest.Failure"> & {};
|
|
478
|
+
/**
|
|
479
|
+
* Describes the message tzero.v1.payment.UpdatePaymentRequest.Failure.
|
|
480
|
+
* Use `create(UpdatePaymentRequest_FailureSchema)` to create a new message.
|
|
481
|
+
*/
|
|
482
|
+
export declare const UpdatePaymentRequest_FailureSchema: GenMessage<UpdatePaymentRequest_Failure>;
|
|
483
|
+
/**
|
|
484
|
+
* @generated from enum tzero.v1.payment.UpdatePaymentRequest.Failure.Reason
|
|
485
|
+
*/
|
|
486
|
+
export declare enum UpdatePaymentRequest_Failure_Reason {
|
|
487
|
+
/**
|
|
488
|
+
* @generated from enum value: REASON_UNSPECIFIED = 0;
|
|
489
|
+
*/
|
|
490
|
+
UNSPECIFIED = 0
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Describes the enum tzero.v1.payment.UpdatePaymentRequest.Failure.Reason.
|
|
494
|
+
*/
|
|
495
|
+
export declare const UpdatePaymentRequest_Failure_ReasonSchema: GenEnum<UpdatePaymentRequest_Failure_Reason>;
|
|
496
|
+
/**
|
|
497
|
+
* @generated from message tzero.v1.payment.UpdatePaymentResponse
|
|
498
|
+
*/
|
|
499
|
+
export type UpdatePaymentResponse = Message<"tzero.v1.payment.UpdatePaymentResponse"> & {};
|
|
500
|
+
/**
|
|
501
|
+
* Describes the message tzero.v1.payment.UpdatePaymentResponse.
|
|
502
|
+
* Use `create(UpdatePaymentResponseSchema)` to create a new message.
|
|
503
|
+
*/
|
|
504
|
+
export declare const UpdatePaymentResponseSchema: GenMessage<UpdatePaymentResponse>;
|
|
505
|
+
/**
|
|
506
|
+
* All the amounts are in USD
|
|
507
|
+
*
|
|
508
|
+
* @generated from message tzero.v1.payment.UpdateLimitRequest
|
|
509
|
+
*/
|
|
510
|
+
export type UpdateLimitRequest = Message<"tzero.v1.payment.UpdateLimitRequest"> & {
|
|
511
|
+
/**
|
|
512
|
+
* *
|
|
513
|
+
* can contain one or more Limit messages, each representing a credit limit for a specific counterparty provider.
|
|
514
|
+
*
|
|
515
|
+
* @generated from field: repeated tzero.v1.payment.UpdateLimitRequest.Limit limits = 10;
|
|
516
|
+
*/
|
|
517
|
+
limits: UpdateLimitRequest_Limit[];
|
|
518
|
+
};
|
|
519
|
+
/**
|
|
520
|
+
* Describes the message tzero.v1.payment.UpdateLimitRequest.
|
|
521
|
+
* Use `create(UpdateLimitRequestSchema)` to create a new message.
|
|
522
|
+
*/
|
|
523
|
+
export declare const UpdateLimitRequestSchema: GenMessage<UpdateLimitRequest>;
|
|
524
|
+
/**
|
|
525
|
+
* @generated from message tzero.v1.payment.UpdateLimitRequest.Limit
|
|
526
|
+
*/
|
|
527
|
+
export type UpdateLimitRequest_Limit = Message<"tzero.v1.payment.UpdateLimitRequest.Limit"> & {
|
|
528
|
+
/**
|
|
529
|
+
* *
|
|
530
|
+
* Incrementally growing for the provider - same as in Ledger.
|
|
531
|
+
*
|
|
532
|
+
* @generated from field: int64 version = 10;
|
|
533
|
+
*/
|
|
534
|
+
version: bigint;
|
|
535
|
+
/**
|
|
536
|
+
* *
|
|
537
|
+
* the Id of the counterparty (creditor) provider, e.g. the provider that is providing the credit limit.
|
|
538
|
+
* It's usually the payOut provider, which provides the credit line to the payIn provider.
|
|
539
|
+
*
|
|
540
|
+
* @generated from field: int32 creditor_id = 15;
|
|
541
|
+
*/
|
|
542
|
+
creditorId: number;
|
|
543
|
+
/**
|
|
544
|
+
* *
|
|
545
|
+
* payout_limit = credit_limit - credit_usage, negative value means credit limit is exceeded,
|
|
546
|
+
* e.g. if counterparty decreased credit limit
|
|
547
|
+
*
|
|
548
|
+
* @generated from field: tzero.v1.common.Decimal payout_limit = 20;
|
|
549
|
+
*/
|
|
550
|
+
payoutLimit?: Decimal;
|
|
551
|
+
/**
|
|
552
|
+
* *
|
|
553
|
+
* This is the credit limit that the counterparty is willing to extend to the provider.
|
|
554
|
+
*
|
|
555
|
+
* @generated from field: tzero.v1.common.Decimal credit_limit = 30;
|
|
556
|
+
*/
|
|
557
|
+
creditLimit?: Decimal;
|
|
558
|
+
/**
|
|
559
|
+
* *
|
|
560
|
+
* This is the credit usage that the provider has used so far. It is the sum of all payouts made by the provider
|
|
561
|
+
* minus the settlement net (settlement balance). It could be negative if the provider has received more
|
|
562
|
+
* in settlements than maid payouts (pre-settlement).
|
|
563
|
+
*
|
|
564
|
+
* @generated from field: tzero.v1.common.Decimal credit_usage = 40;
|
|
565
|
+
*/
|
|
566
|
+
creditUsage?: Decimal;
|
|
567
|
+
};
|
|
568
|
+
/**
|
|
569
|
+
* Describes the message tzero.v1.payment.UpdateLimitRequest.Limit.
|
|
570
|
+
* Use `create(UpdateLimitRequest_LimitSchema)` to create a new message.
|
|
571
|
+
*/
|
|
572
|
+
export declare const UpdateLimitRequest_LimitSchema: GenMessage<UpdateLimitRequest_Limit>;
|
|
573
|
+
/**
|
|
574
|
+
* *
|
|
575
|
+
* Empty message - means no response is needed.
|
|
576
|
+
*
|
|
577
|
+
* @generated from message tzero.v1.payment.UpdateLimitResponse
|
|
578
|
+
*/
|
|
579
|
+
export type UpdateLimitResponse = Message<"tzero.v1.payment.UpdateLimitResponse"> & {};
|
|
580
|
+
/**
|
|
581
|
+
* Describes the message tzero.v1.payment.UpdateLimitResponse.
|
|
582
|
+
* Use `create(UpdateLimitResponseSchema)` to create a new message.
|
|
583
|
+
*/
|
|
584
|
+
export declare const UpdateLimitResponseSchema: GenMessage<UpdateLimitResponse>;
|
|
585
|
+
/**
|
|
586
|
+
* *
|
|
587
|
+
* This service must be implemented by the provider.
|
|
588
|
+
*
|
|
589
|
+
* All methods of this service must be idempotent, meaning they are safe to retry and multiple calls with the same parameters must not have additional effect.
|
|
590
|
+
*
|
|
591
|
+
* @generated from service tzero.v1.payment.ProviderService
|
|
592
|
+
*/
|
|
593
|
+
export declare const ProviderService: GenService<{
|
|
594
|
+
/**
|
|
595
|
+
* *
|
|
596
|
+
* Network instructs the provider to execute a payout to the recipient.
|
|
597
|
+
* This method should be idempotent, meaning that multiple calls with the same parameters will have no additional effect.
|
|
598
|
+
*
|
|
599
|
+
* @generated from rpc tzero.v1.payment.ProviderService.PayOut
|
|
600
|
+
*/
|
|
601
|
+
payOut: {
|
|
602
|
+
methodKind: "unary";
|
|
603
|
+
input: typeof PayoutRequestSchema;
|
|
604
|
+
output: typeof PayoutResponseSchema;
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* *
|
|
608
|
+
* Network provides an update on the status of a payment. This can be either a success or a failure.
|
|
609
|
+
* This method should be idempotent, meaning that multiple calls with the same parameters will have no additional effect.
|
|
610
|
+
*
|
|
611
|
+
* @generated from rpc tzero.v1.payment.ProviderService.UpdatePayment
|
|
612
|
+
*/
|
|
613
|
+
updatePayment: {
|
|
614
|
+
methodKind: "unary";
|
|
615
|
+
input: typeof UpdatePaymentRequestSchema;
|
|
616
|
+
output: typeof UpdatePaymentResponseSchema;
|
|
617
|
+
};
|
|
618
|
+
/**
|
|
619
|
+
* *
|
|
620
|
+
* This rpc is used to notify the provider about the changes in credit limit and/or credit usage.
|
|
621
|
+
*
|
|
622
|
+
* @generated from rpc tzero.v1.payment.ProviderService.UpdateLimit
|
|
623
|
+
*/
|
|
624
|
+
updateLimit: {
|
|
625
|
+
methodKind: "unary";
|
|
626
|
+
input: typeof UpdateLimitRequestSchema;
|
|
627
|
+
output: typeof UpdateLimitResponseSchema;
|
|
628
|
+
};
|
|
629
|
+
/**
|
|
630
|
+
* *
|
|
631
|
+
* Network can send all the updates about ledger entries of the provider's accounts. It can be used to
|
|
632
|
+
* keep track of the provider's exposure to other participants and other important financial events. (see the list in the message below)
|
|
633
|
+
*
|
|
634
|
+
* @generated from rpc tzero.v1.payment.ProviderService.AppendLedgerEntries
|
|
635
|
+
*/
|
|
636
|
+
appendLedgerEntries: {
|
|
637
|
+
methodKind: "unary";
|
|
638
|
+
input: typeof AppendLedgerEntriesRequestSchema;
|
|
639
|
+
output: typeof AppendLedgerEntriesResponseSchema;
|
|
640
|
+
};
|
|
641
|
+
}>;
|