@kasufinance/kasu-sdk 2.7.1 → 2.8.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 +45 -1
- package/dist/bundle.cjs.js +260 -7
- package/dist/bundle.esm.js +260 -8
- package/dist/facade/flows.d.ts +17 -1
- package/dist/facade/flows.js +15 -2
- package/dist/facade/flows.js.map +1 -1
- package/dist/facade/kasu.js +2 -1
- package/dist/facade/kasu.js.map +1 -1
- package/dist/flows/deposit-flow.d.ts +135 -4
- package/dist/flows/deposit-flow.js +244 -4
- package/dist/flows/deposit-flow.js.map +1 -1
- package/dist/flows/index.d.ts +2 -2
- package/dist/flows/index.js +1 -1
- package/dist/flows/index.js.map +1 -1
- package/package.json +1 -1
- package/src/facade/flows.ts +12 -0
- package/src/facade/kasu.ts +1 -0
- package/src/flows/deposit-flow.ts +384 -6
- package/src/flows/index.ts +2 -0
|
@@ -45,6 +45,20 @@ import { WaitableTransaction } from './observable';
|
|
|
45
45
|
* 8. **`request-sign` / `request-confirm`** — KYC signature, then the deposit,
|
|
46
46
|
* then the receipt.
|
|
47
47
|
*
|
|
48
|
+
* ## The batch path
|
|
49
|
+
*
|
|
50
|
+
* A consumer that can submit several calls as ONE atomic transaction supplies
|
|
51
|
+
* the optional `depositBatch` port. When the allowance is short, that port is
|
|
52
|
+
* present and the stable token is known, steps 7 and 8 become one: the SDK
|
|
53
|
+
* encodes `approve(spender, amount)` and `requestDepositWithKyc(...)` itself
|
|
54
|
+
* and hands both to the port. Because a batch has no wallet prompt per call,
|
|
55
|
+
* the run first PARKS on `awaiting-authorise` until the consumer calls
|
|
56
|
+
* `authoriseTransfer()` (or `declineTransfer()`) — nothing moves money
|
|
57
|
+
* without an explicit authorisation. The TTL is checked again after it, and
|
|
58
|
+
* the KYC signature is fetched only then, because it carries a block
|
|
59
|
+
* expiration of its own. Without the port, or with the allowance already
|
|
60
|
+
* sufficient, the run is exactly the two-transaction pipeline above.
|
|
61
|
+
*
|
|
48
62
|
* ## Failure codes
|
|
49
63
|
*
|
|
50
64
|
* A wallet rejection (`isUserRejected`) is `'cancelled'` — the lender changed
|
|
@@ -79,7 +93,12 @@ import { WaitableTransaction } from './observable';
|
|
|
79
93
|
* Where the run is. `success`, `declined` and `error` are terminal; everything
|
|
80
94
|
* else is in flight.
|
|
81
95
|
*/
|
|
82
|
-
export type DepositPhase = 'idle' | 'generating-sign' | 'generating-fetch' | 'awaiting-accept' | 'accepting-sign' | 'approve'
|
|
96
|
+
export type DepositPhase = 'idle' | 'generating-sign' | 'generating-fetch' | 'awaiting-accept' | 'accepting-sign' | 'approve'
|
|
97
|
+
/**
|
|
98
|
+
* Batch path only: the run is PARKED until `authoriseTransfer()` or
|
|
99
|
+
* `declineTransfer()`. Step `request`.
|
|
100
|
+
*/
|
|
101
|
+
| 'awaiting-authorise' | 'request-sign' | 'request-confirm' | 'success' | 'declined' | 'error';
|
|
83
102
|
/**
|
|
84
103
|
* The four steps a lender sees as a badge. `approve` drops out of the sequence
|
|
85
104
|
* when the allowance already covers the deposit, which is why `stepIndex` and
|
|
@@ -125,6 +144,34 @@ export type DepositFailure = {
|
|
|
125
144
|
reason: 'contract-expired';
|
|
126
145
|
};
|
|
127
146
|
export type { WaitableTransaction };
|
|
147
|
+
/**
|
|
148
|
+
* One call of an atomic batch: a target and its ABI-encoded calldata. No
|
|
149
|
+
* value — neither call the deposit batch makes sends the native token.
|
|
150
|
+
*/
|
|
151
|
+
export interface BatchCall {
|
|
152
|
+
to: string;
|
|
153
|
+
data: string;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* What a `depositBatch` port throws when it KNOWS the batch reverted — from a
|
|
157
|
+
* simulation before sending, or from the submitter refusing to broadcast a
|
|
158
|
+
* batch that would revert. The run ends `{ step: 'request', reason:
|
|
159
|
+
* 'reverted', revertError }`.
|
|
160
|
+
*
|
|
161
|
+
* `revertError` is the custom error the contract named (`'ClearingIsPending'`,
|
|
162
|
+
* `'UserNotKycd'`, …), exactly as the ABI declares it. Pass `''` when the
|
|
163
|
+
* batch is known to revert but not why: the consumer then renders its generic
|
|
164
|
+
* `reverted` copy, which is what an unknown name gets anyway.
|
|
165
|
+
*
|
|
166
|
+
* Any OTHER throw from the port is read the way a direct deposit's is — a
|
|
167
|
+
* wallet rejection is `cancelled`, a decodable revert is `reverted`, and
|
|
168
|
+
* everything else is `failed` with the error kept. A port that cannot tell is
|
|
169
|
+
* better off throwing what it has than guessing a name.
|
|
170
|
+
*/
|
|
171
|
+
export declare class BatchRevertedError extends Error {
|
|
172
|
+
readonly revertError: string;
|
|
173
|
+
constructor(revertError: string, message?: string);
|
|
174
|
+
}
|
|
128
175
|
/** What the KYC signing service hands back. */
|
|
129
176
|
export interface KycSignature {
|
|
130
177
|
signature: string;
|
|
@@ -217,10 +264,34 @@ export interface DepositPorts {
|
|
|
217
264
|
approve(spender: string, amount: BigNumber): Promise<WaitableTransaction>;
|
|
218
265
|
/** `requestDepositWithKyc`. Defaults to `kasu.deposits.deposit`. */
|
|
219
266
|
deposit(params: DepositParams): Promise<WaitableTransaction>;
|
|
267
|
+
/**
|
|
268
|
+
* OPTIONAL, and with no default: submit several calls as ONE atomic
|
|
269
|
+
* transaction — all of them apply, or none does. How is the consumer's
|
|
270
|
+
* business; the SDK owns what goes in and in which order.
|
|
271
|
+
*
|
|
272
|
+
* When supplied, the allowance is short and the flow knows the stable
|
|
273
|
+
* token (`DepositFlowOptions.stableAsset`), the run takes the batch path:
|
|
274
|
+
* it parks on `awaiting-authorise`, then hands this port exactly two calls
|
|
275
|
+
* —
|
|
276
|
+
*
|
|
277
|
+
* 0. `stableAsset.approve(spender, amount)` — the EXACT deposit amount,
|
|
278
|
+
* never `MaxUint256`;
|
|
279
|
+
* 1. `spender.requestDepositWithKyc(pool, tranche, amount, '0x',
|
|
280
|
+
* fixedTermConfigId, depositData, { blockExpiration, signature })` —
|
|
281
|
+
* the call the default `deposit` port makes.
|
|
282
|
+
*
|
|
283
|
+
* and neither `approve` nor `deposit` is called. Resolve with something
|
|
284
|
+
* whose `wait()` settles when the batch is mined. Throw
|
|
285
|
+
* `BatchRevertedError` when the batch is known to revert.
|
|
286
|
+
*/
|
|
287
|
+
depositBatch?(calls: BatchCall[]): Promise<WaitableTransaction>;
|
|
220
288
|
/** ms-epoch clock. Defaults to `Date.now`; injected so the TTL is testable. */
|
|
221
289
|
now?(): number;
|
|
222
290
|
}
|
|
223
|
-
/**
|
|
291
|
+
/**
|
|
292
|
+
* Construction options. `kasu.flows.deposit()` fills `spender` and
|
|
293
|
+
* `stableAsset` in.
|
|
294
|
+
*/
|
|
224
295
|
export interface DepositFlowOptions {
|
|
225
296
|
/** Agreement validity window; defaults to `CONTRACT_TTL_MS`. */
|
|
226
297
|
contractTtlMs?: number;
|
|
@@ -231,6 +302,17 @@ export interface DepositFlowOptions {
|
|
|
231
302
|
* deposit port calls.
|
|
232
303
|
*/
|
|
233
304
|
spender?: string;
|
|
305
|
+
/**
|
|
306
|
+
* The ERC-20 the deposit is paid in — the target of the batch path's
|
|
307
|
+
* approve call. `kasu.flows.deposit()` passes this chain's
|
|
308
|
+
* `stableAsset.address`.
|
|
309
|
+
*
|
|
310
|
+
* Without it the batch path is never taken, even when `depositBatch` is
|
|
311
|
+
* supplied: an approve encoded against a guessed token is an approval
|
|
312
|
+
* granted on the wrong contract inside a transaction that then reverts.
|
|
313
|
+
* The run falls back to the `approve` and `deposit` ports instead.
|
|
314
|
+
*/
|
|
315
|
+
stableAsset?: string;
|
|
234
316
|
}
|
|
235
317
|
export interface DepositFlowInput {
|
|
236
318
|
poolId: string;
|
|
@@ -268,10 +350,24 @@ export interface DepositState {
|
|
|
268
350
|
step: DepositStep | null;
|
|
269
351
|
/** 1-based badge position of `step`; `0` while idle. */
|
|
270
352
|
stepIndex: number;
|
|
271
|
-
/**
|
|
353
|
+
/**
|
|
354
|
+
* `4`, or `3` when the allowance already covers the deposit or the run
|
|
355
|
+
* is batched.
|
|
356
|
+
*/
|
|
272
357
|
stepTotal: number;
|
|
273
|
-
/**
|
|
358
|
+
/**
|
|
359
|
+
* Whether the separate approve STEP is in scope for this run. `false`
|
|
360
|
+
* on a batched run too: its approval rides inside the request step's
|
|
361
|
+
* single transaction, so it never enters `approve` and counts as a
|
|
362
|
+
* three-step run on every badge.
|
|
363
|
+
*/
|
|
274
364
|
approvalRequired: boolean;
|
|
365
|
+
/**
|
|
366
|
+
* Whether this run approves and deposits as ONE atomic batch through the
|
|
367
|
+
* `depositBatch` port. Decided by the allowance pre-check, before the
|
|
368
|
+
* first signature, and `false` on every two-transaction run.
|
|
369
|
+
*/
|
|
370
|
+
batched: boolean;
|
|
275
371
|
/** The generated agreement, from `generating-fetch` onwards. */
|
|
276
372
|
contract: GenerateContractResponse | null;
|
|
277
373
|
/** Set with `phase: 'error'`, cleared by `reset()`. */
|
|
@@ -289,6 +385,7 @@ export declare class DepositFlow extends Flow<DepositState, DepositFlowInput> {
|
|
|
289
385
|
private readonly _ports;
|
|
290
386
|
private readonly _ttlMs;
|
|
291
387
|
private readonly _defaultSpender;
|
|
388
|
+
private readonly _stableAsset;
|
|
292
389
|
private readonly _now;
|
|
293
390
|
/**
|
|
294
391
|
* The accept handshake. The run parks on this promise; `acceptContract`,
|
|
@@ -308,6 +405,12 @@ export declare class DepositFlow extends Flow<DepositState, DepositFlowInput> {
|
|
|
308
405
|
* A stale token simply is not the current generation.
|
|
309
406
|
*/
|
|
310
407
|
private _acceptingFor;
|
|
408
|
+
/**
|
|
409
|
+
* The batch path's authorisation handshake. Same shape and lifetime as
|
|
410
|
+
* `_accept`: the run parks on it, `authoriseTransfer`, `declineTransfer`
|
|
411
|
+
* and `reset` settle it, and it is cleared the moment it settles.
|
|
412
|
+
*/
|
|
413
|
+
private _authorise;
|
|
311
414
|
constructor(_ports: DepositPorts, opts?: DepositFlowOptions);
|
|
312
415
|
/**
|
|
313
416
|
* Sign the agreement and resume the parked run. A no-op when nothing is
|
|
@@ -323,10 +426,38 @@ export declare class DepositFlow extends Flow<DepositState, DepositFlowInput> {
|
|
|
323
426
|
* out of a prompt that never answers.
|
|
324
427
|
*/
|
|
325
428
|
declineContract(): void;
|
|
429
|
+
/**
|
|
430
|
+
* Batch path: authorise the single transaction that approves and deposits,
|
|
431
|
+
* and resume the parked run. A no-op when nothing is parked on
|
|
432
|
+
* `awaiting-authorise`, so a double tap cannot submit twice.
|
|
433
|
+
*
|
|
434
|
+
* The batch has no wallet prompt per call, so this is the lender's
|
|
435
|
+
* explicit consent to the transfer — call it only from their action.
|
|
436
|
+
*/
|
|
437
|
+
authoriseTransfer(): void;
|
|
438
|
+
/**
|
|
439
|
+
* Batch path: refuse the transfer. The run ends on `error` with `{ step:
|
|
440
|
+
* 'request', reason: 'cancelled' }` and nothing is submitted. A no-op when
|
|
441
|
+
* nothing is parked on `awaiting-authorise`.
|
|
442
|
+
*/
|
|
443
|
+
declineTransfer(): void;
|
|
326
444
|
/** True only while THIS generation is waiting on the acceptance signature. */
|
|
327
445
|
private _isAccepting;
|
|
328
446
|
/** `reset()`: unpark the abandoned run and drop its handshake. */
|
|
329
447
|
protected _onAbandon(): void;
|
|
330
448
|
protected _run(input: DepositFlowInput, token: number): Promise<void>;
|
|
449
|
+
/**
|
|
450
|
+
* The batch path, from the accepted agreement to the receipt.
|
|
451
|
+
*
|
|
452
|
+
* 1. PARK on `awaiting-authorise`. A batch puts no wallet prompt in front
|
|
453
|
+
* of each call, so the flow waits for an explicit authorisation before
|
|
454
|
+
* any money moves. `declineTransfer()` ends it as `cancelled`.
|
|
455
|
+
* 2. Re-check the TTL: the lender may have idled on the authorisation as
|
|
456
|
+
* long as they did on the agreement.
|
|
457
|
+
* 3. Only now fetch the KYC signature — it has a block expiration of its
|
|
458
|
+
* own, and an authorisation left open must not spend it.
|
|
459
|
+
* 4. Encode both calls and hand them to `depositBatch`; then the receipt.
|
|
460
|
+
*/
|
|
461
|
+
private _runBatch;
|
|
331
462
|
private _fail;
|
|
332
463
|
}
|
|
@@ -8,10 +8,37 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { utils } from 'ethers';
|
|
11
|
+
import { IERC20MetadataAbi__factory } from '../contracts/factories/IERC20MetadataAbi__factory';
|
|
12
|
+
import { ILendingPoolManagerAbi__factory } from '../contracts/factories/ILendingPoolManagerAbi__factory';
|
|
11
13
|
import { asContractType, buildLegacyContractRequestMessage, buildLoanAgreementSignMessage, encodeDepositData, } from '../domain/loan-contract';
|
|
12
14
|
import { decodeRevert } from '../domain/revert-errors';
|
|
13
15
|
import { classifyWalletFailure, isUnpredictableGas, } from '../domain/wallet-errors';
|
|
14
16
|
import { Flow } from './flow';
|
|
17
|
+
/**
|
|
18
|
+
* What a `depositBatch` port throws when it KNOWS the batch reverted — from a
|
|
19
|
+
* simulation before sending, or from the submitter refusing to broadcast a
|
|
20
|
+
* batch that would revert. The run ends `{ step: 'request', reason:
|
|
21
|
+
* 'reverted', revertError }`.
|
|
22
|
+
*
|
|
23
|
+
* `revertError` is the custom error the contract named (`'ClearingIsPending'`,
|
|
24
|
+
* `'UserNotKycd'`, …), exactly as the ABI declares it. Pass `''` when the
|
|
25
|
+
* batch is known to revert but not why: the consumer then renders its generic
|
|
26
|
+
* `reverted` copy, which is what an unknown name gets anyway.
|
|
27
|
+
*
|
|
28
|
+
* Any OTHER throw from the port is read the way a direct deposit's is — a
|
|
29
|
+
* wallet rejection is `cancelled`, a decodable revert is `reverted`, and
|
|
30
|
+
* everything else is `failed` with the error kept. A port that cannot tell is
|
|
31
|
+
* better off throwing what it has than guessing a name.
|
|
32
|
+
*/
|
|
33
|
+
export class BatchRevertedError extends Error {
|
|
34
|
+
constructor(revertError, message) {
|
|
35
|
+
super(message !== null && message !== void 0 ? message : `DepositFlow: the batch reverted${revertError ? ` with ${revertError}` : ''}`);
|
|
36
|
+
this.name = 'BatchRevertedError';
|
|
37
|
+
this.revertError = revertError;
|
|
38
|
+
// Keeps `instanceof` honest under a down-levelled build.
|
|
39
|
+
Object.setPrototypeOf(this, BatchRevertedError.prototype);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
15
42
|
/** Generated agreements are valid for five minutes upstream. */
|
|
16
43
|
export const CONTRACT_TTL_MS = 5 * 60 * 1000;
|
|
17
44
|
/** What a run without a spender, from either source, fails with. */
|
|
@@ -38,9 +65,43 @@ const INITIAL = {
|
|
|
38
65
|
stepIndex: 0,
|
|
39
66
|
stepTotal: 4,
|
|
40
67
|
approvalRequired: true,
|
|
68
|
+
batched: false,
|
|
41
69
|
contract: null,
|
|
42
70
|
failure: null,
|
|
43
71
|
};
|
|
72
|
+
const ERC20 = IERC20MetadataAbi__factory.createInterface();
|
|
73
|
+
const LENDING_POOL_MANAGER = ILendingPoolManagerAbi__factory.createInterface();
|
|
74
|
+
/**
|
|
75
|
+
* The batch path's two calls, encoded by the SDK so no consumer has to: the
|
|
76
|
+
* EXACT-amount approve, then the very `requestDepositWithKyc` the default
|
|
77
|
+
* `deposit` port sends — `swapData` `'0x'`, no value. Both read `amount` from
|
|
78
|
+
* the same variable, so the batch cannot approve one figure and deposit
|
|
79
|
+
* another.
|
|
80
|
+
*/
|
|
81
|
+
function encodeDepositBatch(args) {
|
|
82
|
+
const { stableAsset, spender, input, depositData, kyc } = args;
|
|
83
|
+
return [
|
|
84
|
+
{
|
|
85
|
+
to: stableAsset,
|
|
86
|
+
data: ERC20.encodeFunctionData('approve', [spender, input.amount]),
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
to: spender,
|
|
90
|
+
data: LENDING_POOL_MANAGER.encodeFunctionData('requestDepositWithKyc', [
|
|
91
|
+
input.poolId,
|
|
92
|
+
input.trancheId,
|
|
93
|
+
input.amount,
|
|
94
|
+
'0x',
|
|
95
|
+
input.fixedTermConfigId,
|
|
96
|
+
depositData,
|
|
97
|
+
{
|
|
98
|
+
blockExpiration: kyc.blockExpiration,
|
|
99
|
+
signature: kyc.signature,
|
|
100
|
+
},
|
|
101
|
+
]),
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
}
|
|
44
105
|
/** 1-based badge position, with `approve` dropped when it is out of scope. */
|
|
45
106
|
function stepIndexOf(step, approvalRequired) {
|
|
46
107
|
const order = approvalRequired
|
|
@@ -86,6 +147,22 @@ function classifyRequest(err) {
|
|
|
86
147
|
}
|
|
87
148
|
return classifyWalletFailure('request', err);
|
|
88
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* A `depositBatch` rejection. A submitter that KNOWS the batch reverts says so
|
|
152
|
+
* with `BatchRevertedError`; anything else is read exactly as a direct
|
|
153
|
+
* deposit's throw is, so a non-wallet error can never become `cancelled`.
|
|
154
|
+
*/
|
|
155
|
+
function classifyBatch(err) {
|
|
156
|
+
if (err instanceof BatchRevertedError) {
|
|
157
|
+
return {
|
|
158
|
+
step: 'request',
|
|
159
|
+
reason: 'reverted',
|
|
160
|
+
revertError: err.revertError,
|
|
161
|
+
error: err,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
return classifyRequest(err);
|
|
165
|
+
}
|
|
89
166
|
// ---------------------------------------------------------------------------
|
|
90
167
|
// The flow
|
|
91
168
|
// ---------------------------------------------------------------------------
|
|
@@ -112,8 +189,15 @@ export class DepositFlow extends Flow {
|
|
|
112
189
|
* A stale token simply is not the current generation.
|
|
113
190
|
*/
|
|
114
191
|
this._acceptingFor = null;
|
|
192
|
+
/**
|
|
193
|
+
* The batch path's authorisation handshake. Same shape and lifetime as
|
|
194
|
+
* `_accept`: the run parks on it, `authoriseTransfer`, `declineTransfer`
|
|
195
|
+
* and `reset` settle it, and it is cleared the moment it settles.
|
|
196
|
+
*/
|
|
197
|
+
this._authorise = null;
|
|
115
198
|
this._ttlMs = (_a = opts === null || opts === void 0 ? void 0 : opts.contractTtlMs) !== null && _a !== void 0 ? _a : CONTRACT_TTL_MS;
|
|
116
199
|
this._defaultSpender = opts === null || opts === void 0 ? void 0 : opts.spender;
|
|
200
|
+
this._stableAsset = opts === null || opts === void 0 ? void 0 : opts.stableAsset;
|
|
117
201
|
// Called through the ports object, never captured off it: a consumer
|
|
118
202
|
// whose clock is a method on its own object keeps its `this`.
|
|
119
203
|
this._now = () => { var _a, _b; return (_b = (_a = _ports.now) === null || _a === void 0 ? void 0 : _a.call(_ports)) !== null && _b !== void 0 ? _b : Date.now(); };
|
|
@@ -175,6 +259,33 @@ export class DepositFlow extends Flow {
|
|
|
175
259
|
this._accept = null;
|
|
176
260
|
bridge.settle({ kind: 'declined' });
|
|
177
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Batch path: authorise the single transaction that approves and deposits,
|
|
264
|
+
* and resume the parked run. A no-op when nothing is parked on
|
|
265
|
+
* `awaiting-authorise`, so a double tap cannot submit twice.
|
|
266
|
+
*
|
|
267
|
+
* The batch has no wallet prompt per call, so this is the lender's
|
|
268
|
+
* explicit consent to the transfer — call it only from their action.
|
|
269
|
+
*/
|
|
270
|
+
authoriseTransfer() {
|
|
271
|
+
const bridge = this._authorise;
|
|
272
|
+
if (!bridge)
|
|
273
|
+
return;
|
|
274
|
+
this._authorise = null;
|
|
275
|
+
bridge.settle({ kind: 'authorised' });
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Batch path: refuse the transfer. The run ends on `error` with `{ step:
|
|
279
|
+
* 'request', reason: 'cancelled' }` and nothing is submitted. A no-op when
|
|
280
|
+
* nothing is parked on `awaiting-authorise`.
|
|
281
|
+
*/
|
|
282
|
+
declineTransfer() {
|
|
283
|
+
const bridge = this._authorise;
|
|
284
|
+
if (!bridge)
|
|
285
|
+
return;
|
|
286
|
+
this._authorise = null;
|
|
287
|
+
bridge.settle({ kind: 'declined' });
|
|
288
|
+
}
|
|
178
289
|
/** True only while THIS generation is waiting on the acceptance signature. */
|
|
179
290
|
_isAccepting() {
|
|
180
291
|
return (this._acceptingFor !== null &&
|
|
@@ -186,6 +297,9 @@ export class DepositFlow extends Flow {
|
|
|
186
297
|
this._accept = null;
|
|
187
298
|
this._acceptingFor = null;
|
|
188
299
|
bridge === null || bridge === void 0 ? void 0 : bridge.settle({ kind: 'abandoned' });
|
|
300
|
+
const authorise = this._authorise;
|
|
301
|
+
this._authorise = null;
|
|
302
|
+
authorise === null || authorise === void 0 ? void 0 : authorise.settle({ kind: 'abandoned' });
|
|
189
303
|
}
|
|
190
304
|
// -----------------------------------------------------------------------
|
|
191
305
|
_run(input, token) {
|
|
@@ -193,6 +307,7 @@ export class DepositFlow extends Flow {
|
|
|
193
307
|
var _a;
|
|
194
308
|
this._accept = null;
|
|
195
309
|
this._acceptingFor = null;
|
|
310
|
+
this._authorise = null;
|
|
196
311
|
const ports = this._ports;
|
|
197
312
|
const owner = input.userAddress.toLowerCase();
|
|
198
313
|
// 0. The spender, from the input or from the chain config the facade
|
|
@@ -213,21 +328,32 @@ export class DepositFlow extends Flow {
|
|
|
213
328
|
// live, never cached: an exact-amount approval is fully consumed by
|
|
214
329
|
// the deposit it paid for, so a stale allowance is exactly the value
|
|
215
330
|
// that would wrongly skip the approve and revert the deposit.
|
|
216
|
-
let
|
|
331
|
+
let allowanceShort = true;
|
|
217
332
|
try {
|
|
218
333
|
const allowance = yield ports.readAllowance(owner, spender);
|
|
219
|
-
|
|
334
|
+
allowanceShort = allowance.lt(input.amount);
|
|
220
335
|
}
|
|
221
336
|
catch (_b) {
|
|
222
337
|
// A read failure is not a reason to skip an approval. Assume one is
|
|
223
338
|
// needed: the cost is a redundant approve, the alternative is a
|
|
224
339
|
// reverted deposit.
|
|
225
|
-
|
|
340
|
+
allowanceShort = true;
|
|
226
341
|
}
|
|
227
342
|
if (!this._store.isCurrent(token))
|
|
228
343
|
return;
|
|
344
|
+
// The path is chosen HERE, with the allowance, so the badge is right
|
|
345
|
+
// from the first state the lender sees. Batch only when there is an
|
|
346
|
+
// approval to fold in, a port to submit it, and a known token to
|
|
347
|
+
// approve on — never a guessed one. A batched run never enters the
|
|
348
|
+
// `approve` step, so every badge counts it as a three-step run.
|
|
349
|
+
const stableAsset = this._stableAsset;
|
|
350
|
+
const batched = allowanceShort &&
|
|
351
|
+
typeof ports.depositBatch === 'function' &&
|
|
352
|
+
!!stableAsset;
|
|
353
|
+
const approvalRequired = allowanceShort && !batched;
|
|
229
354
|
// 2. Generate — sign the auth message.
|
|
230
|
-
this._store.patch(Object.assign({ approvalRequired,
|
|
355
|
+
this._store.patch(Object.assign({ approvalRequired,
|
|
356
|
+
batched, phase: 'generating-sign' }, badgeFor('generate', approvalRequired)), token);
|
|
231
357
|
const timestamp = this._now();
|
|
232
358
|
const signedMessage = buildAuthMessage(input, owner, timestamp);
|
|
233
359
|
let signature;
|
|
@@ -329,6 +455,18 @@ export class DepositFlow extends Flow {
|
|
|
329
455
|
});
|
|
330
456
|
return;
|
|
331
457
|
}
|
|
458
|
+
if (batched && stableAsset) {
|
|
459
|
+
yield this._runBatch({
|
|
460
|
+
token,
|
|
461
|
+
input,
|
|
462
|
+
owner,
|
|
463
|
+
spender,
|
|
464
|
+
stableAsset,
|
|
465
|
+
depositData,
|
|
466
|
+
contract,
|
|
467
|
+
});
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
332
470
|
// 6. Approve — the EXACT amount, never `MaxUint256`. House rule: an
|
|
333
471
|
// unlimited allowance outlives the deposit it was granted for, and a
|
|
334
472
|
// later exploit of the spender would drain a wallet that has long
|
|
@@ -392,6 +530,108 @@ export class DepositFlow extends Flow {
|
|
|
392
530
|
this._store.patch(Object.assign({ phase: 'success' }, badgeFor('request', approvalRequired)), token);
|
|
393
531
|
});
|
|
394
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* The batch path, from the accepted agreement to the receipt.
|
|
535
|
+
*
|
|
536
|
+
* 1. PARK on `awaiting-authorise`. A batch puts no wallet prompt in front
|
|
537
|
+
* of each call, so the flow waits for an explicit authorisation before
|
|
538
|
+
* any money moves. `declineTransfer()` ends it as `cancelled`.
|
|
539
|
+
* 2. Re-check the TTL: the lender may have idled on the authorisation as
|
|
540
|
+
* long as they did on the agreement.
|
|
541
|
+
* 3. Only now fetch the KYC signature — it has a block expiration of its
|
|
542
|
+
* own, and an authorisation left open must not spend it.
|
|
543
|
+
* 4. Encode both calls and hand them to `depositBatch`; then the receipt.
|
|
544
|
+
*/
|
|
545
|
+
_runBatch(args) {
|
|
546
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
547
|
+
const { token, input, owner, spender, stableAsset, depositData } = args;
|
|
548
|
+
const ports = this._ports;
|
|
549
|
+
// A batched run is a three-step run on every badge.
|
|
550
|
+
const approvalRequired = false;
|
|
551
|
+
// Every settler clears the handshake before settling it, so there is
|
|
552
|
+
// nothing to clear here — and clearing it anyway could drop the
|
|
553
|
+
// handshake of a NEWER run that `reset(); start()` already parked.
|
|
554
|
+
const outcome = yield new Promise((resolve) => {
|
|
555
|
+
this._authorise = { settle: resolve };
|
|
556
|
+
this._store.patch(Object.assign({ phase: 'awaiting-authorise' }, badgeFor('request', approvalRequired)), token);
|
|
557
|
+
});
|
|
558
|
+
if (!this._store.isCurrent(token))
|
|
559
|
+
return;
|
|
560
|
+
if (outcome.kind === 'declined') {
|
|
561
|
+
this._fail(token, approvalRequired, {
|
|
562
|
+
step: 'request',
|
|
563
|
+
reason: 'cancelled',
|
|
564
|
+
});
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
if (outcome.kind !== 'authorised')
|
|
568
|
+
return;
|
|
569
|
+
if (this._now() > args.contract.timestamp + this._ttlMs) {
|
|
570
|
+
this._fail(token, approvalRequired, {
|
|
571
|
+
step: 'request',
|
|
572
|
+
reason: 'contract-expired',
|
|
573
|
+
});
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
this._store.patch(Object.assign({ phase: 'request-sign' }, badgeFor('request', approvalRequired)), token);
|
|
577
|
+
// The consumer's backend, so `failed` — never `cancelled` — exactly as
|
|
578
|
+
// on the two-transaction path.
|
|
579
|
+
let kyc;
|
|
580
|
+
try {
|
|
581
|
+
const kycParams = yield ports.buildKycParams(owner);
|
|
582
|
+
kyc = yield ports.getKycSignature(kycParams);
|
|
583
|
+
}
|
|
584
|
+
catch (err) {
|
|
585
|
+
this._fail(token, approvalRequired, {
|
|
586
|
+
step: 'request',
|
|
587
|
+
reason: 'failed',
|
|
588
|
+
error: err,
|
|
589
|
+
});
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
if (!this._store.isCurrent(token))
|
|
593
|
+
return;
|
|
594
|
+
// Encoded from values a backend returned (the KYC signature), so a
|
|
595
|
+
// shape the coder refuses is a failure the consumer can render, not a
|
|
596
|
+
// rejection out of a `start()` that promises it has none.
|
|
597
|
+
let calls;
|
|
598
|
+
try {
|
|
599
|
+
calls = encodeDepositBatch({
|
|
600
|
+
stableAsset,
|
|
601
|
+
spender,
|
|
602
|
+
input,
|
|
603
|
+
depositData,
|
|
604
|
+
kyc,
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
catch (err) {
|
|
608
|
+
this._fail(token, approvalRequired, {
|
|
609
|
+
step: 'request',
|
|
610
|
+
reason: 'failed',
|
|
611
|
+
error: err,
|
|
612
|
+
});
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
try {
|
|
616
|
+
// Called through the ports object, so a port that is a method
|
|
617
|
+
// keeps its `this`. Its presence decided the path; a consumer
|
|
618
|
+
// that removed it since gets a `failed`, not a crash.
|
|
619
|
+
if (typeof ports.depositBatch !== 'function') {
|
|
620
|
+
throw new Error('DepositFlow: the depositBatch port is gone');
|
|
621
|
+
}
|
|
622
|
+
const tx = yield ports.depositBatch(calls);
|
|
623
|
+
this._store.patch(Object.assign({ phase: 'request-confirm' }, badgeFor('request', approvalRequired)), token);
|
|
624
|
+
yield tx.wait();
|
|
625
|
+
}
|
|
626
|
+
catch (err) {
|
|
627
|
+
this._fail(token, approvalRequired, classifyBatch(err));
|
|
628
|
+
return;
|
|
629
|
+
}
|
|
630
|
+
if (!this._store.isCurrent(token))
|
|
631
|
+
return;
|
|
632
|
+
this._store.patch(Object.assign({ phase: 'success' }, badgeFor('request', approvalRequired)), token);
|
|
633
|
+
});
|
|
634
|
+
}
|
|
395
635
|
_fail(token, approvalRequired, failure) {
|
|
396
636
|
this._store.patch(Object.assign({ phase: 'error', failure }, badgeFor(failure.step, approvalRequired)), token);
|
|
397
637
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deposit-flow.js","sourceRoot":"","sources":["../../src/flows/deposit-flow.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAa,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,EACH,cAAc,EACd,iCAAiC,EACjC,6BAA6B,EAC7B,iBAAiB,GAEpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACH,qBAAqB,EACrB,kBAAkB,GACrB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAuT9B,gEAAgE;AAChE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAE7C,oEAAoE;AACpE,MAAM,CAAC,MAAM,kBAAkB,GAC3B,yGAAyG,CAAC;AAE9G,oEAAoE;AACpE,MAAM,CAAC,MAAM,8BAA8B,GACvC,6GAA6G,CAAC;AAElH,yEAAyE;AACzE,MAAM,CAAC,MAAM,oCAAoC,GAC7C,yGAAyG,CAAC;AAE9G;;;;;;;;GAQG;AACH,SAAS,mBAAmB,CAAC,SAAkB;IAC3C,OAAO,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,OAAO,GAAiB;IAC1B,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC;IACZ,gBAAgB,EAAE,IAAI;IACtB,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;CAChB,CA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ows/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
export { Flow } from './flow';
|
|
14
14
|
export { FlowStore } from './observable';
|
|
15
15
|
export type { WaitableTransaction } from './observable';
|
|
16
|
-
export { CONTRACT_TTL_MS, DepositFlow, INVALID_ACCEPTANCE_SIGNATURE_MESSAGE, INVALID_AUTH_SIGNATURE_MESSAGE, NO_SPENDER_MESSAGE, } from './deposit-flow';
|
|
17
|
-
export type { ContractMessageRequest, DepositFailure, DepositFlowInput, DepositFlowOptions, DepositPhase, DepositPorts, DepositState, DepositStep, GenerateContractRequest, KycSignature, LegacyContractRequest, LoanAgreementRequest, } from './deposit-flow';
|
|
16
|
+
export { BatchRevertedError, CONTRACT_TTL_MS, DepositFlow, INVALID_ACCEPTANCE_SIGNATURE_MESSAGE, INVALID_AUTH_SIGNATURE_MESSAGE, NO_SPENDER_MESSAGE, } from './deposit-flow';
|
|
17
|
+
export type { BatchCall, ContractMessageRequest, DepositFailure, DepositFlowInput, DepositFlowOptions, DepositPhase, DepositPorts, DepositState, DepositStep, GenerateContractRequest, KycSignature, LegacyContractRequest, LoanAgreementRequest, } from './deposit-flow';
|
|
18
18
|
export { NO_KYC_PARAMS_MESSAGE, WithdrawFlow } from './withdraw-flow';
|
|
19
19
|
export type { WithdrawFailure, WithdrawFlowInput, WithdrawPhase, WithdrawPorts, WithdrawState, WithdrawStep, } from './withdraw-flow';
|
package/dist/flows/index.js
CHANGED
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export { Flow } from './flow';
|
|
14
14
|
export { FlowStore } from './observable';
|
|
15
|
-
export { CONTRACT_TTL_MS, DepositFlow, INVALID_ACCEPTANCE_SIGNATURE_MESSAGE, INVALID_AUTH_SIGNATURE_MESSAGE, NO_SPENDER_MESSAGE, } from './deposit-flow';
|
|
15
|
+
export { BatchRevertedError, CONTRACT_TTL_MS, DepositFlow, INVALID_ACCEPTANCE_SIGNATURE_MESSAGE, INVALID_AUTH_SIGNATURE_MESSAGE, NO_SPENDER_MESSAGE, } from './deposit-flow';
|
|
16
16
|
export { NO_KYC_PARAMS_MESSAGE, WithdrawFlow } from './withdraw-flow';
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
package/dist/flows/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/flows/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EACH,eAAe,EACf,WAAW,EACX,oCAAoC,EACpC,8BAA8B,EAC9B,kBAAkB,GACrB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/flows/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EACH,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,oCAAoC,EACpC,8BAA8B,EAC9B,kBAAkB,GACrB,MAAM,gBAAgB,CAAC;AAiBxB,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
package/package.json
CHANGED