@kasufinance/kasu-sdk 2.5.0 → 2.7.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 +144 -7
- package/dist/bundle.cjs.js +1667 -21
- package/dist/bundle.esm.js +1630 -22
- package/dist/domain/au-minimum.d.ts +135 -0
- package/dist/domain/au-minimum.js +154 -0
- package/dist/domain/au-minimum.js.map +1 -0
- package/dist/domain/index.d.ts +18 -3
- package/dist/domain/index.js +13 -3
- package/dist/domain/index.js.map +1 -1
- package/dist/domain/loan-contract.d.ts +174 -0
- package/dist/domain/loan-contract.js +160 -0
- package/dist/domain/loan-contract.js.map +1 -0
- package/dist/domain/requests.d.ts +219 -0
- package/dist/domain/requests.js +218 -0
- package/dist/domain/requests.js.map +1 -0
- package/dist/domain/settlement.d.ts +97 -0
- package/dist/domain/settlement.js +117 -0
- package/dist/domain/settlement.js.map +1 -0
- package/dist/domain/wallet-errors.d.ts +92 -0
- package/dist/domain/wallet-errors.js +155 -0
- package/dist/domain/wallet-errors.js.map +1 -0
- package/dist/facade/chain-configs.js +7 -1
- package/dist/facade/chain-configs.js.map +1 -1
- package/dist/facade/deposits.js +2 -1
- package/dist/facade/deposits.js.map +1 -1
- package/dist/facade/flows.d.ts +95 -0
- package/dist/facade/flows.js +116 -0
- package/dist/facade/flows.js.map +1 -0
- package/dist/facade/index.d.ts +3 -0
- package/dist/facade/index.js +3 -0
- package/dist/facade/index.js.map +1 -1
- package/dist/facade/kasu.d.ts +6 -2
- package/dist/facade/kasu.js +28 -3
- package/dist/facade/kasu.js.map +1 -1
- package/dist/facade/read-only.d.ts +12 -0
- package/dist/facade/read-only.js +13 -0
- package/dist/facade/read-only.js.map +1 -0
- package/dist/facade/user-portfolio.d.ts +18 -0
- package/dist/facade/user-portfolio.js +23 -0
- package/dist/facade/user-portfolio.js.map +1 -1
- package/dist/flows/deposit-flow.d.ts +301 -0
- package/dist/flows/deposit-flow.js +358 -0
- package/dist/flows/deposit-flow.js.map +1 -0
- package/dist/flows/flow.d.ts +72 -0
- package/dist/flows/flow.js +110 -0
- package/dist/flows/flow.js.map +1 -0
- package/dist/flows/index.d.ts +19 -0
- package/dist/flows/index.js +17 -0
- package/dist/flows/index.js.map +1 -0
- package/dist/flows/observable.d.ts +59 -0
- package/dist/flows/observable.js +81 -0
- package/dist/flows/observable.js.map +1 -0
- package/dist/flows/withdraw-flow.d.ts +99 -0
- package/dist/flows/withdraw-flow.js +83 -0
- package/dist/flows/withdraw-flow.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/services/DataService/data-service.js +3 -11
- package/dist/services/DataService/data-service.js.map +1 -1
- package/dist/services/DataService/directus-client.d.ts +26 -0
- package/dist/services/DataService/directus-client.js +38 -0
- package/dist/services/DataService/directus-client.js.map +1 -0
- package/dist/services/UserLending/user-lending.js +11 -7
- package/dist/services/UserLending/user-lending.js.map +1 -1
- package/package.json +8 -2
- package/src/domain/au-minimum.ts +192 -0
- package/src/domain/index.ts +73 -3
- package/src/domain/loan-contract.ts +275 -0
- package/src/domain/requests.ts +467 -0
- package/src/domain/settlement.ts +161 -0
- package/src/domain/wallet-errors.ts +173 -0
- package/src/facade/chain-configs.ts +7 -1
- package/src/facade/deposits.ts +2 -3
- package/src/facade/flows.ts +172 -0
- package/src/facade/index.ts +8 -0
- package/src/facade/kasu.ts +43 -3
- package/src/facade/read-only.ts +13 -0
- package/src/facade/user-portfolio.ts +24 -0
- package/src/flows/deposit-flow.ts +775 -0
- package/src/flows/flow.ts +108 -0
- package/src/flows/index.ts +45 -0
- package/src/flows/observable.ts +97 -0
- package/src/flows/withdraw-flow.ts +210 -0
- package/src/index.ts +9 -0
- package/src/services/DataService/data-service.ts +7 -25
- package/src/services/DataService/directus-client.ts +54 -0
- package/src/services/UserLending/user-lending.ts +17 -21
- package/dist/domain/deposit-bounds.test.d.ts +0 -1
- package/dist/domain/deposit-bounds.test.js +0 -135
- package/dist/domain/deposit-bounds.test.js.map +0 -1
- package/dist/domain/partners.test.d.ts +0 -1
- package/dist/domain/partners.test.js +0 -53
- package/dist/domain/partners.test.js.map +0 -1
- package/dist/domain/pools.test.d.ts +0 -1
- package/dist/domain/pools.test.js +0 -184
- package/dist/domain/pools.test.js.map +0 -1
- package/dist/domain/rates.test.d.ts +0 -1
- package/dist/domain/rates.test.js +0 -181
- package/dist/domain/rates.test.js.map +0 -1
- package/dist/domain/tranche-display-name.test.d.ts +0 -1
- package/dist/domain/tranche-display-name.test.js +0 -58
- package/dist/domain/tranche-display-name.test.js.map +0 -1
- package/dist/domain/tranches.test.d.ts +0 -1
- package/dist/domain/tranches.test.js +0 -206
- package/dist/domain/tranches.test.js.map +0 -1
- package/dist/facade/config.test.d.ts +0 -1
- package/dist/facade/config.test.js +0 -216
- package/dist/facade/config.test.js.map +0 -1
- package/dist/facade/facade.test.d.ts +0 -1
- package/dist/facade/facade.test.js +0 -201
- package/dist/facade/facade.test.js.map +0 -1
- package/dist/services/Locking/calculate-apy.test.d.ts +0 -1
- package/dist/services/Locking/calculate-apy.test.js +0 -41
- package/dist/services/Locking/calculate-apy.test.js.map +0 -1
- package/dist/tests/sample.test.d.ts +0 -1
- package/dist/tests/sample.test.js +0 -59
- package/dist/tests/sample.test.js.map +0 -1
- package/src/domain/deposit-bounds.test.ts +0 -200
- package/src/domain/partners.test.ts +0 -83
- package/src/domain/pools.test.ts +0 -260
- package/src/domain/rates.test.ts +0 -254
- package/src/domain/tranche-display-name.test.ts +0 -96
- package/src/domain/tranches.test.ts +0 -300
- package/src/facade/config.test.ts +0 -265
- package/src/facade/facade.test.ts +0 -250
- package/src/services/Locking/calculate-apy.test.ts +0 -52
- package/src/tests/sample.test.ts +0 -63
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { DepositFlow, WithdrawFlow, } from '../flows';
|
|
11
|
+
import { READ_ONLY_MESSAGE } from './read-only';
|
|
12
|
+
/**
|
|
13
|
+
* Builds `DepositFlow` / `WithdrawFlow` instances wired to THIS Kasu instance:
|
|
14
|
+
* its chain's stable token, its `LendingPoolManager`, its signer.
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* const flow = kasu.connect(signer).flows.deposit({
|
|
18
|
+
* signMessage: (m) => signer.signMessage(m),
|
|
19
|
+
* generateContract: (req) => postToMyProxy(req),
|
|
20
|
+
* getKycSignature: (p) => postToMyBackend(p),
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* A flow built from a read-only instance constructs fine and reads fine — the
|
|
25
|
+
* write ports throw `READ_ONLY_MESSAGE` when the run reaches them, exactly as
|
|
26
|
+
* `kasu.deposits.deposit` does. Constructing is not the mistake; submitting is.
|
|
27
|
+
*
|
|
28
|
+
* It holds the `DepositsFacade` and NOTHING the facade already owns: no
|
|
29
|
+
* `UserLending`, no chain id, no signer. Two paths to one behaviour is how the
|
|
30
|
+
* KYC params a flow built came to differ from the ones `kasu.deposits`
|
|
31
|
+
* built — the same class of drift the flows themselves exist to end.
|
|
32
|
+
*/
|
|
33
|
+
export class FlowsFacade {
|
|
34
|
+
constructor(_deposits,
|
|
35
|
+
/**
|
|
36
|
+
* The chain's stable token, bound to whatever the Kasu instance holds.
|
|
37
|
+
* A factory rather than a contract: it is one `new Contract`, and a
|
|
38
|
+
* cached binding would outlive the config it was built from.
|
|
39
|
+
*/
|
|
40
|
+
_erc20,
|
|
41
|
+
/** The read-only flag `Kasu` already computed — never re-derived here. */
|
|
42
|
+
_isReadOnly,
|
|
43
|
+
/**
|
|
44
|
+
* The ERC-20 spender every deposit run approves: this chain's
|
|
45
|
+
* `LendingPoolManager`, which is the only contract the default deposit
|
|
46
|
+
* port calls. Passed to the flow so a consumer never has to hand-wire
|
|
47
|
+
* an address whose only wrong value grants an approval to the wrong
|
|
48
|
+
* contract.
|
|
49
|
+
*/
|
|
50
|
+
_spender) {
|
|
51
|
+
this._deposits = _deposits;
|
|
52
|
+
this._erc20 = _erc20;
|
|
53
|
+
this._isReadOnly = _isReadOnly;
|
|
54
|
+
this._spender = _spender;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A deposit pipeline. `readAllowance`, `approve`, `deposit` and
|
|
58
|
+
* `buildKycParams` default to the SDK's own implementations; pass any of
|
|
59
|
+
* them to override (kasu-ui approves through its sponsored-gas path, for
|
|
60
|
+
* one).
|
|
61
|
+
*
|
|
62
|
+
* Each default is applied per key with `??`, not by spreading `ports` over
|
|
63
|
+
* them: `{ ...defaults, ...ports }` lets an EXPLICITLY undefined value
|
|
64
|
+
* delete the default it was meant to keep, and
|
|
65
|
+
* `approve: sponsoredGas ? sponsoredApprove : undefined` is exactly how a
|
|
66
|
+
* consumer writes a conditional override.
|
|
67
|
+
*/
|
|
68
|
+
deposit(ports, opts) {
|
|
69
|
+
var _a, _b, _c, _d, _e;
|
|
70
|
+
return new DepositFlow({
|
|
71
|
+
signMessage: ports.signMessage,
|
|
72
|
+
generateContract: ports.generateContract,
|
|
73
|
+
getKycSignature: ports.getKycSignature,
|
|
74
|
+
buildKycParams: (_a = ports.buildKycParams) !== null && _a !== void 0 ? _a : ((userAddress) => this._deposits.buildKycParams(userAddress)),
|
|
75
|
+
readAllowance: (_b = ports.readAllowance) !== null && _b !== void 0 ? _b : ((owner, spender) => this._erc20().allowance(owner, spender)),
|
|
76
|
+
approve: (_c = ports.approve) !== null && _c !== void 0 ? _c : ((spender, amount) => __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
this._assertWritable();
|
|
78
|
+
// The EXACT amount the flow asked for. Nothing here
|
|
79
|
+
// rounds it up, and nothing here substitutes
|
|
80
|
+
// MaxUint256.
|
|
81
|
+
return yield this._erc20().approve(spender, amount);
|
|
82
|
+
})),
|
|
83
|
+
deposit: (_d = ports.deposit) !== null && _d !== void 0 ? _d : ((params) => this._deposits.deposit(params)),
|
|
84
|
+
now: ports.now,
|
|
85
|
+
}, {
|
|
86
|
+
contractTtlMs: opts === null || opts === void 0 ? void 0 : opts.contractTtlMs,
|
|
87
|
+
// Per key here too, for the same reason the ports are: an
|
|
88
|
+
// explicit `spender: undefined` must not delete the default.
|
|
89
|
+
spender: (_e = opts === null || opts === void 0 ? void 0 : opts.spender) !== null && _e !== void 0 ? _e : this._spender,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* A withdrawal pipeline. Both write ports and `buildKycParams` default to
|
|
94
|
+
* this instance; supplying `getKycSignature` turns the KYC pre-check on.
|
|
95
|
+
* Defaults are applied per key, for the reason `deposit()` gives.
|
|
96
|
+
*/
|
|
97
|
+
withdraw(ports = {}) {
|
|
98
|
+
var _a, _b, _c;
|
|
99
|
+
return new WithdrawFlow({
|
|
100
|
+
buildKycParams: (_a = ports.buildKycParams) !== null && _a !== void 0 ? _a : ((userAddress) => this._deposits.buildKycParams(userAddress)),
|
|
101
|
+
getKycSignature: ports.getKycSignature,
|
|
102
|
+
withdraw: (_b = ports.withdraw) !== null && _b !== void 0 ? _b : ((params) => this._deposits.withdraw({
|
|
103
|
+
poolId: params.poolId,
|
|
104
|
+
trancheId: params.trancheId,
|
|
105
|
+
amount: params.amount,
|
|
106
|
+
})),
|
|
107
|
+
withdrawMax: (_c = ports.withdrawMax) !== null && _c !== void 0 ? _c : ((poolId, trancheId, userAddress) => this._deposits.withdrawMax(poolId, trancheId, userAddress)),
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
_assertWritable() {
|
|
111
|
+
if (this._isReadOnly) {
|
|
112
|
+
throw new Error(READ_ONLY_MESSAGE);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=flows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flows.js","sourceRoot":"","sources":["../../src/facade/flows.ts"],"names":[],"mappings":";;;;;;;;;AAGA,OAAO,EACH,WAAW,EAIX,YAAY,GAEf,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAwBhD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,WAAW;IACpB,YACqB,SAAyB;IAC1C;;;;OAIG;IACc,MAA+B;IAChD,0EAA0E;IACzD,WAAoB;IACrC;;;;;;OAMG;IACc,QAAgB;QAhBhB,cAAS,GAAT,SAAS,CAAgB;QAMzB,WAAM,GAAN,MAAM,CAAyB;QAE/B,gBAAW,GAAX,WAAW,CAAS;QAQpB,aAAQ,GAAR,QAAQ,CAAQ;IAClC,CAAC;IAEJ;;;;;;;;;;;OAWG;IACH,OAAO,CACH,KAA+B,EAC/B,IAAyB;;QAEzB,OAAO,IAAI,WAAW,CAClB;YACI,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;YACxC,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,cAAc,EACV,MAAA,KAAK,CAAC,cAAc,mCACpB,CAAC,CAAC,WAA0B,EAAa,EAAE,CACvC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;YACnD,aAAa,EACT,MAAA,KAAK,CAAC,aAAa,mCACnB,CAAC,CAAC,KAAa,EAAE,OAAe,EAAsB,EAAE,CACpD,IAAI,CAAC,MAAM,EAAE,CA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,CAAC,CAAC;YACX,WAAW,EACP,MAAA,KAAK,CAAC,WAAW,mCACjB,CAAC,CACG,MAAc,EACd,SAAiB,EACjB,WAAmB,EACS,EAAE,CAC9B,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;SACtE,CAAC,CAAC;IACP,CAAC;IAEO,eAAe;QACnB,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACvC,CAAC;IACL,CAAC;CACJ"}
|
package/dist/facade/index.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ export { Kasu } from './kasu';
|
|
|
2
2
|
export { StrategiesFacade } from './strategies';
|
|
3
3
|
export { DepositsFacade } from './deposits';
|
|
4
4
|
export { PortfolioFacade } from './user-portfolio';
|
|
5
|
+
export { FlowsFacade } from './flows';
|
|
6
|
+
export type { DepositFlowPortOverrides, WithdrawFlowPortOverrides, } from './flows';
|
|
7
|
+
export { READ_ONLY_MESSAGE } from './read-only';
|
|
5
8
|
export { CHAIN_CONFIGS } from './chain-configs';
|
|
6
9
|
export { fetchUnusedPoolIds } from './unused-pool-ids';
|
|
7
10
|
export type { SupportedChain, ChainConfigEntry, StableAsset, KasuOptions, Strategy, StrategyTranche, FixedTermOption, DepositParams, WithdrawParams, DepositLimits, KycParams, UserPositions, PlatformStats, } from './types';
|
package/dist/facade/index.js
CHANGED
|
@@ -4,6 +4,9 @@ export { Kasu } from './kasu';
|
|
|
4
4
|
export { StrategiesFacade } from './strategies';
|
|
5
5
|
export { DepositsFacade } from './deposits';
|
|
6
6
|
export { PortfolioFacade } from './user-portfolio';
|
|
7
|
+
export { FlowsFacade } from './flows';
|
|
8
|
+
// The one refusal every write path shares
|
|
9
|
+
export { READ_ONLY_MESSAGE } from './read-only';
|
|
7
10
|
// Chain configurations
|
|
8
11
|
export { CHAIN_CONFIGS } from './chain-configs';
|
|
9
12
|
// Directus-backed helpers (I/O — not part of `domain/`)
|
package/dist/facade/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/facade/index.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,gDAAgD;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/facade/index.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,gDAAgD;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAMtC,0CAA0C;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,uBAAuB;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,wDAAwD;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/facade/kasu.d.ts
CHANGED
|
@@ -2,14 +2,16 @@ import { Provider } from '@ethersproject/providers';
|
|
|
2
2
|
import { Signer } from 'ethers';
|
|
3
3
|
import { KasuSdk } from '../kasu-sdk';
|
|
4
4
|
import { DepositsFacade } from './deposits';
|
|
5
|
+
import { FlowsFacade } from './flows';
|
|
5
6
|
import { StrategiesFacade } from './strategies';
|
|
6
7
|
import { ChainConfigEntry, KasuOptions } from './types';
|
|
7
8
|
import { PortfolioFacade } from './user-portfolio';
|
|
8
9
|
/**
|
|
9
10
|
* High-level entry point for external integrators.
|
|
10
11
|
*
|
|
11
|
-
* Provides
|
|
12
|
-
* exposes the underlying `KasuSdk` services via `.services` for
|
|
12
|
+
* Provides four domain facades — `strategies`, `deposits`, `portfolio`,
|
|
13
|
+
* `flows` — and exposes the underlying `KasuSdk` services via `.services` for
|
|
14
|
+
* power-users.
|
|
13
15
|
*
|
|
14
16
|
* ```ts
|
|
15
17
|
* import { Kasu } from '@kasufinance/kasu-sdk';
|
|
@@ -33,6 +35,8 @@ export declare class Kasu {
|
|
|
33
35
|
readonly deposits: DepositsFacade;
|
|
34
36
|
/** User positions, yields, transaction history. */
|
|
35
37
|
readonly portfolio: PortfolioFacade;
|
|
38
|
+
/** Headless deposit / withdraw state machines. */
|
|
39
|
+
readonly flows: FlowsFacade;
|
|
36
40
|
private readonly _sdk;
|
|
37
41
|
private readonly _chainConfig;
|
|
38
42
|
private readonly _signerOrProvider;
|
package/dist/facade/kasu.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { providers, Signer } from 'ethers';
|
|
2
|
+
import { IERC20MetadataAbi__factory } from '../contracts';
|
|
2
3
|
import { KasuSdk } from '../kasu-sdk';
|
|
3
4
|
import { SdkConfig } from '../sdk-config';
|
|
4
5
|
import { CHAIN_CONFIGS } from './chain-configs';
|
|
5
6
|
import { DepositsFacade } from './deposits';
|
|
7
|
+
import { FlowsFacade } from './flows';
|
|
6
8
|
import { StrategiesFacade } from './strategies';
|
|
7
9
|
import { PortfolioFacade } from './user-portfolio';
|
|
8
10
|
/**
|
|
9
11
|
* High-level entry point for external integrators.
|
|
10
12
|
*
|
|
11
|
-
* Provides
|
|
12
|
-
* exposes the underlying `KasuSdk` services via `.services` for
|
|
13
|
+
* Provides four domain facades — `strategies`, `deposits`, `portfolio`,
|
|
14
|
+
* `flows` — and exposes the underlying `KasuSdk` services via `.services` for
|
|
15
|
+
* power-users.
|
|
13
16
|
*
|
|
14
17
|
* ```ts
|
|
15
18
|
* import { Kasu } from '@kasufinance/kasu-sdk';
|
|
@@ -33,8 +36,13 @@ export class Kasu {
|
|
|
33
36
|
this._signerOrProvider = signerOrProvider;
|
|
34
37
|
this._configOverrides = configOverrides;
|
|
35
38
|
this.strategies = new StrategiesFacade(sdk.DataService, sdk.UserLending);
|
|
36
|
-
|
|
39
|
+
// Derived ONCE and handed to every facade that needs it. Each of them
|
|
40
|
+
// re-deriving `Signer.isSigner` is how two facades come to disagree
|
|
41
|
+
// about whether the same instance can write.
|
|
42
|
+
const isReadOnly = !Signer.isSigner(signerOrProvider);
|
|
43
|
+
this.deposits = new DepositsFacade(sdk.UserLending, chainConfig.chainId.toString(), isReadOnly);
|
|
37
44
|
this.portfolio = new PortfolioFacade(sdk.DataService, sdk.UserLending, sdk.Portfolio);
|
|
45
|
+
this.flows = new FlowsFacade(this.deposits, () => erc20Of(chainConfig, signerOrProvider), isReadOnly, chainConfig.contracts.LendingPoolManager);
|
|
38
46
|
}
|
|
39
47
|
/**
|
|
40
48
|
* Create a Kasu instance with built-in chain config.
|
|
@@ -166,6 +174,23 @@ function rpcUrlsOf(chainConfig) {
|
|
|
166
174
|
var _a;
|
|
167
175
|
return (_a = chainConfig.rpcUrls) !== null && _a !== void 0 ? _a : [];
|
|
168
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* The chain's stable token, bound to whatever this instance holds.
|
|
179
|
+
*
|
|
180
|
+
* Built per call rather than cached: it is one `new Contract`, and a cached
|
|
181
|
+
* binding would outlive the signer a `connect()` replaced. A config with no
|
|
182
|
+
* `stableAsset` (a hand-written entry from before 2.5.0) throws here rather
|
|
183
|
+
* than inside ethers, naming the two ports that make the flow work without
|
|
184
|
+
* one.
|
|
185
|
+
*/
|
|
186
|
+
function erc20Of(chainConfig, signerOrProvider) {
|
|
187
|
+
var _a;
|
|
188
|
+
const address = (_a = stableAssetOf(chainConfig)) === null || _a === void 0 ? void 0 : _a.address;
|
|
189
|
+
if (!address) {
|
|
190
|
+
throw new Error('Kasu: this chain config has no stableAsset; pass readAllowance and approve ports explicitly');
|
|
191
|
+
}
|
|
192
|
+
return IERC20MetadataAbi__factory.connect(address, signerOrProvider);
|
|
193
|
+
}
|
|
169
194
|
/**
|
|
170
195
|
* The read-only provider used when the caller passes no `signerOrProvider`.
|
|
171
196
|
*
|
package/dist/facade/kasu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kasu.js","sourceRoot":"","sources":["../../src/facade/kasu.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,SAAS,EAAoB,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOhD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD
|
|
1
|
+
{"version":3,"file":"kasu.js","sourceRoot":"","sources":["../../src/facade/kasu.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,SAAS,EAAoB,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOhD,OAAO,EAAE,eAAe,EAAE,MAAM,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C,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACX,6FAA6F,CAChG,CAAC;IACN,CAAC;IACD,OAAO,0BAA0B,CAAC,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAS,eAAe,CACpB,WAA6B,EAC7B,UAAkB;IAElB,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,IAAI,CAAC,GAAG,EAAE,CAAC;QACP,MAAM,IAAI,KAAK,CACX,uBAAuB,UAAU,uDAAuD,CAC3F,CAAC;IACN,CAAC;IACD,OAAO,IAAI,SAAS,CAAC,qBAAqB,CAAC,GAAG,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;AACzE,CAAC;AAED,SAAS,kBAAkB,CACvB,KAAwC;IAExC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The refusal every write path shares when the instance holds a Provider
|
|
3
|
+
* rather than a Signer.
|
|
4
|
+
*
|
|
5
|
+
* One constant, because the message's job is to name the fix — `kasu.connect`
|
|
6
|
+
* — and three near-identical wordings across the facades would be three
|
|
7
|
+
* different pieces of advice for one problem. ethers' own
|
|
8
|
+
* "sending a transaction requires a signer" arrives several frames deeper,
|
|
9
|
+
* after the params have been encoded, and says nothing about how to get a
|
|
10
|
+
* signer onto THIS object.
|
|
11
|
+
*/
|
|
12
|
+
export declare const READ_ONLY_MESSAGE = "Kasu: this instance is read-only; call kasu.connect(signer) first";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The refusal every write path shares when the instance holds a Provider
|
|
3
|
+
* rather than a Signer.
|
|
4
|
+
*
|
|
5
|
+
* One constant, because the message's job is to name the fix — `kasu.connect`
|
|
6
|
+
* — and three near-identical wordings across the facades would be three
|
|
7
|
+
* different pieces of advice for one problem. ethers' own
|
|
8
|
+
* "sending a transaction requires a signer" arrives several frames deeper,
|
|
9
|
+
* after the params have been encoded, and says nothing about how to get a
|
|
10
|
+
* signer onto THIS object.
|
|
11
|
+
*/
|
|
12
|
+
export const READ_ONLY_MESSAGE = 'Kasu: this instance is read-only; call kasu.connect(signer) first';
|
|
13
|
+
//# sourceMappingURL=read-only.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-only.js","sourceRoot":"","sources":["../../src/facade/read-only.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAC1B,mEAAmE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Provider } from '@ethersproject/providers';
|
|
2
|
+
import { RequestState } from '../domain/requests';
|
|
2
3
|
import { DataService } from '../services/DataService/data-service';
|
|
3
4
|
import { Portfolio } from '../services/Portfolio/portfolio';
|
|
4
5
|
import { UserRequest } from '../services/UserLending/types';
|
|
@@ -32,4 +33,21 @@ export declare class PortfolioFacade {
|
|
|
32
33
|
* Fetch a user's full transaction history (deposits, withdrawals, cancellations).
|
|
33
34
|
*/
|
|
34
35
|
getTransactionHistory(userAddress: `0x${string}`): Promise<UserRequest[]>;
|
|
36
|
+
/**
|
|
37
|
+
* The same history, already derived into `RequestState` rows — status
|
|
38
|
+
* code, kind, signed amount, the cancelled-amount recovery, the bundled
|
|
39
|
+
* submission count and the cycle-open signal.
|
|
40
|
+
*
|
|
41
|
+
* ```ts
|
|
42
|
+
* const rows = await kasu.portfolio.getRequestStates('0xUser...');
|
|
43
|
+
* rows.filter((r) => r.statusCode === 'pending');
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* Every application derives this from `getTransactionHistory` anyway, and
|
|
47
|
+
* the derivation is the part they were each getting subtly differently.
|
|
48
|
+
* Words are still the caller's: render `statusCode` in your own
|
|
49
|
+
* vocabulary, and call `getTrancheDisplayName` on `trancheName` at the
|
|
50
|
+
* view boundary.
|
|
51
|
+
*/
|
|
52
|
+
getRequestStates(userAddress: `0x${string}`): Promise<RequestState[]>;
|
|
35
53
|
}
|
|
@@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
import { deriveRequestState } from '../domain/requests';
|
|
10
11
|
/**
|
|
11
12
|
* High-level facade for querying a user's portfolio, positions, and history.
|
|
12
13
|
*
|
|
@@ -49,5 +50,27 @@ export class PortfolioFacade {
|
|
|
49
50
|
return yield this._userLending.getUserRequests(userAddress, currentEpoch);
|
|
50
51
|
});
|
|
51
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* The same history, already derived into `RequestState` rows — status
|
|
55
|
+
* code, kind, signed amount, the cancelled-amount recovery, the bundled
|
|
56
|
+
* submission count and the cycle-open signal.
|
|
57
|
+
*
|
|
58
|
+
* ```ts
|
|
59
|
+
* const rows = await kasu.portfolio.getRequestStates('0xUser...');
|
|
60
|
+
* rows.filter((r) => r.statusCode === 'pending');
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* Every application derives this from `getTransactionHistory` anyway, and
|
|
64
|
+
* the derivation is the part they were each getting subtly differently.
|
|
65
|
+
* Words are still the caller's: render `statusCode` in your own
|
|
66
|
+
* vocabulary, and call `getTrancheDisplayName` on `trancheName` at the
|
|
67
|
+
* view boundary.
|
|
68
|
+
*/
|
|
69
|
+
getRequestStates(userAddress) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
const requests = yield this.getTransactionHistory(userAddress);
|
|
72
|
+
return requests.map(deriveRequestState);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
52
75
|
}
|
|
53
76
|
//# sourceMappingURL=user-portfolio.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-portfolio.js","sourceRoot":"","sources":["../../src/facade/user-portfolio.ts"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"user-portfolio.js","sourceRoot":"","sources":["../../src/facade/user-portfolio.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,kBAAkB,EAAgB,MAAM,oBAAoB,CAAC;AAQtE;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IACxB,YACY,YAAyB,EACzB,YAAyB,EACzB,UAAqB;QAFrB,iBAAY,GAAZ,YAAY,CAAa;QACzB,iBAAY,GAAZ,YAAY,CAAa;QACzB,eAAU,GAAV,UAAU,CAAW;IAC9B,CAAC;IAEJ;;;;;;;;;;;OAWG;IACG,YAAY,CACd,WAAmB,EACnB,QAAmB;;YAEnB,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,CAAC;YAE/D,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CACzD,YAAY,CACf,CAAC;YAEF,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,uBAAuB,CACvD,WAAW,EACX,aAAa,EACb,YAAY,EACZ,QAAQ,CACX,CAAC;YAEF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,mBAAmB,CACrD,WAAW,EACX,KAAK,EACL,YAAY,CACf,CAAC;YAEF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;QAC9B,CAAC;KAAA;IAED;;OAEG;IACG,qBAAqB,CACvB,WAA0B;;YAE1B,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,CAAC;YAC/D,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAC1C,WAAW,EACX,YAAY,CACf,CAAC;QACN,CAAC;KAAA;IAED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