@exponent-labs/loopscale-deserializer 0.9.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/build/index.d.ts +159 -0
- package/build/index.js +383 -0
- package/build/index.js.map +1 -0
- package/build/loopscale.json +6734 -0
- package/build/types/CapMonitor.d.ts +24 -0
- package/build/types/CapMonitor.js +78 -0
- package/build/types/CapMonitor.js.map +1 -0
- package/build/types/CollateralData.d.ts +25 -0
- package/build/types/CollateralData.js +74 -0
- package/build/types/CollateralData.js.map +1 -0
- package/build/types/Duration.d.ts +17 -0
- package/build/types/Duration.js +59 -0
- package/build/types/Duration.js.map +1 -0
- package/build/types/ExternalYieldAccounts.d.ts +18 -0
- package/build/types/ExternalYieldAccounts.js +60 -0
- package/build/types/ExternalYieldAccounts.js.map +1 -0
- package/build/types/Ledger.d.ts +54 -0
- package/build/types/Ledger.js +134 -0
- package/build/types/Ledger.js.map +1 -0
- package/build/types/index.d.ts +5 -0
- package/build/types/index.js +14 -0
- package/build/types/index.js.map +1 -0
- package/package.json +19 -0
- package/src/index.ts +504 -0
- package/src/loopscale.json +6734 -0
- package/src/types/CapMonitor.ts +70 -0
- package/src/types/CollateralData.ts +66 -0
- package/src/types/Duration.ts +48 -0
- package/src/types/ExternalYieldAccounts.ts +51 -0
- package/src/types/Ledger.ts +146 -0
- package/src/types/index.ts +5 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import BN from "bn.js";
|
|
2
|
+
export interface CapMonitorFields {
|
|
3
|
+
startTime1hr: BN;
|
|
4
|
+
startTime24hr: BN;
|
|
5
|
+
principal1hr: BN;
|
|
6
|
+
principal24hr: BN;
|
|
7
|
+
}
|
|
8
|
+
export interface CapMonitorJSON {
|
|
9
|
+
startTime1hr: string;
|
|
10
|
+
startTime24hr: string;
|
|
11
|
+
principal1hr: string;
|
|
12
|
+
principal24hr: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class CapMonitor {
|
|
15
|
+
readonly startTime1hr: BN;
|
|
16
|
+
readonly startTime24hr: BN;
|
|
17
|
+
readonly principal1hr: BN;
|
|
18
|
+
readonly principal24hr: BN;
|
|
19
|
+
constructor(fields: CapMonitorFields);
|
|
20
|
+
static layout(property?: string): any;
|
|
21
|
+
static fromDecoded(obj: any): CapMonitor;
|
|
22
|
+
toJSON(): CapMonitorJSON;
|
|
23
|
+
static fromJSON(obj: CapMonitorJSON): CapMonitor;
|
|
24
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.CapMonitor = void 0;
|
|
30
|
+
const bn_js_1 = __importDefault(require("bn.js")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
31
|
+
const borsh = __importStar(require("@coral-xyz/borsh"));
|
|
32
|
+
class CapMonitor {
|
|
33
|
+
startTime1hr;
|
|
34
|
+
startTime24hr;
|
|
35
|
+
principal1hr;
|
|
36
|
+
principal24hr;
|
|
37
|
+
constructor(fields) {
|
|
38
|
+
this.startTime1hr = fields.startTime1hr;
|
|
39
|
+
this.startTime24hr = fields.startTime24hr;
|
|
40
|
+
this.principal1hr = fields.principal1hr;
|
|
41
|
+
this.principal24hr = fields.principal24hr;
|
|
42
|
+
}
|
|
43
|
+
static layout(property) {
|
|
44
|
+
return borsh.struct([
|
|
45
|
+
borsh.u64("startTime1hr"),
|
|
46
|
+
borsh.u64("startTime24hr"),
|
|
47
|
+
borsh.u64("principal1hr"),
|
|
48
|
+
borsh.u64("principal24hr"),
|
|
49
|
+
], property);
|
|
50
|
+
}
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
52
|
+
static fromDecoded(obj) {
|
|
53
|
+
return new CapMonitor({
|
|
54
|
+
startTime1hr: obj.startTime1hr,
|
|
55
|
+
startTime24hr: obj.startTime24hr,
|
|
56
|
+
principal1hr: obj.principal1hr,
|
|
57
|
+
principal24hr: obj.principal24hr,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
toJSON() {
|
|
61
|
+
return {
|
|
62
|
+
startTime1hr: this.startTime1hr.toString(),
|
|
63
|
+
startTime24hr: this.startTime24hr.toString(),
|
|
64
|
+
principal1hr: this.principal1hr.toString(),
|
|
65
|
+
principal24hr: this.principal24hr.toString(),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
static fromJSON(obj) {
|
|
69
|
+
return new CapMonitor({
|
|
70
|
+
startTime1hr: new bn_js_1.default(obj.startTime1hr),
|
|
71
|
+
startTime24hr: new bn_js_1.default(obj.startTime24hr),
|
|
72
|
+
principal1hr: new bn_js_1.default(obj.principal1hr),
|
|
73
|
+
principal24hr: new bn_js_1.default(obj.principal24hr),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.CapMonitor = CapMonitor;
|
|
78
|
+
//# sourceMappingURL=CapMonitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CapMonitor.js","sourceRoot":"","sources":["../../src/types/CapMonitor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAsB,CAAC,wDAAwD;AAC/E,wDAAyC;AAgBzC,MAAa,UAAU;IACZ,YAAY,CAAI;IAChB,aAAa,CAAI;IACjB,YAAY,CAAI;IAChB,aAAa,CAAI;IAE1B,YAAY,MAAwB;QAClC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAA;QACvC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAA;QACzC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAA;QACvC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAA;IAC3C,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,QAAiB;QAC7B,OAAO,KAAK,CAAC,MAAM,CACjB;YACE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC;YACzB,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC;YAC1B,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC;YACzB,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC;SAC3B,EACD,QAAQ,CACT,CAAA;IACH,CAAC;IAED,8DAA8D;IAC9D,MAAM,CAAC,WAAW,CAAC,GAAQ;QACzB,OAAO,IAAI,UAAU,CAAC;YACpB,YAAY,EAAE,GAAG,CAAC,YAAY;YAC9B,aAAa,EAAE,GAAG,CAAC,aAAa;YAChC,YAAY,EAAE,GAAG,CAAC,YAAY;YAC9B,aAAa,EAAE,GAAG,CAAC,aAAa;SACjC,CAAC,CAAA;IACJ,CAAC;IAED,MAAM;QACJ,OAAO;YACL,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE;YAC1C,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE;YAC5C,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE;YAC1C,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE;SAC7C,CAAA;IACH,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,GAAmB;QACjC,OAAO,IAAI,UAAU,CAAC;YACpB,YAAY,EAAE,IAAI,eAAE,CAAC,GAAG,CAAC,YAAY,CAAC;YACtC,aAAa,EAAE,IAAI,eAAE,CAAC,GAAG,CAAC,aAAa,CAAC;YACxC,YAAY,EAAE,IAAI,eAAE,CAAC,GAAG,CAAC,YAAY,CAAC;YACtC,aAAa,EAAE,IAAI,eAAE,CAAC,GAAG,CAAC,aAAa,CAAC;SACzC,CAAC,CAAA;IACJ,CAAC;CACF;AApDD,gCAoDC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
import BN from "bn.js";
|
|
3
|
+
export interface CollateralDataFields {
|
|
4
|
+
assetMint: PublicKey;
|
|
5
|
+
amount: BN;
|
|
6
|
+
assetType: number;
|
|
7
|
+
assetIdentifier: PublicKey;
|
|
8
|
+
}
|
|
9
|
+
export interface CollateralDataJSON {
|
|
10
|
+
assetMint: string;
|
|
11
|
+
amount: string;
|
|
12
|
+
assetType: number;
|
|
13
|
+
assetIdentifier: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class CollateralData {
|
|
16
|
+
readonly assetMint: PublicKey;
|
|
17
|
+
readonly amount: BN;
|
|
18
|
+
readonly assetType: number;
|
|
19
|
+
readonly assetIdentifier: PublicKey;
|
|
20
|
+
constructor(fields: CollateralDataFields);
|
|
21
|
+
static layout(property?: string): any;
|
|
22
|
+
static fromDecoded(obj: any): CollateralData;
|
|
23
|
+
toJSON(): CollateralDataJSON;
|
|
24
|
+
static fromJSON(obj: CollateralDataJSON): CollateralData;
|
|
25
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.CollateralData = void 0;
|
|
30
|
+
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
31
|
+
const bn_js_1 = __importDefault(require("bn.js")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
32
|
+
const borsh = __importStar(require("@coral-xyz/borsh"));
|
|
33
|
+
class CollateralData {
|
|
34
|
+
assetMint;
|
|
35
|
+
amount;
|
|
36
|
+
assetType;
|
|
37
|
+
assetIdentifier;
|
|
38
|
+
constructor(fields) {
|
|
39
|
+
this.assetMint = fields.assetMint;
|
|
40
|
+
this.amount = fields.amount;
|
|
41
|
+
this.assetType = fields.assetType;
|
|
42
|
+
this.assetIdentifier = fields.assetIdentifier;
|
|
43
|
+
}
|
|
44
|
+
static layout(property) {
|
|
45
|
+
return borsh.struct([borsh.publicKey("assetMint"), borsh.u64("amount"), borsh.u8("assetType"), borsh.publicKey("assetIdentifier")], property);
|
|
46
|
+
}
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
+
static fromDecoded(obj) {
|
|
49
|
+
return new CollateralData({
|
|
50
|
+
assetMint: obj.assetMint,
|
|
51
|
+
amount: obj.amount,
|
|
52
|
+
assetType: obj.assetType,
|
|
53
|
+
assetIdentifier: obj.assetIdentifier,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
toJSON() {
|
|
57
|
+
return {
|
|
58
|
+
assetMint: this.assetMint.toString(),
|
|
59
|
+
amount: this.amount.toString(),
|
|
60
|
+
assetType: this.assetType,
|
|
61
|
+
assetIdentifier: this.assetIdentifier.toString(),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
static fromJSON(obj) {
|
|
65
|
+
return new CollateralData({
|
|
66
|
+
assetMint: new web3_js_1.PublicKey(obj.assetMint),
|
|
67
|
+
amount: new bn_js_1.default(obj.amount),
|
|
68
|
+
assetType: obj.assetType,
|
|
69
|
+
assetIdentifier: new web3_js_1.PublicKey(obj.assetIdentifier),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.CollateralData = CollateralData;
|
|
74
|
+
//# sourceMappingURL=CollateralData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollateralData.js","sourceRoot":"","sources":["../../src/types/CollateralData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2C,CAAC,wDAAwD;AACpG,kDAAsB,CAAC,wDAAwD;AAC/E,wDAAyC;AAgBzC,MAAa,cAAc;IAChB,SAAS,CAAW;IACpB,MAAM,CAAI;IACV,SAAS,CAAQ;IACjB,eAAe,CAAW;IAEnC,YAAY,MAA4B;QACtC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,CAAA;IAC/C,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,QAAiB;QAC7B,OAAO,KAAK,CAAC,MAAM,CACjB,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,EAC9G,QAAQ,CACT,CAAA;IACH,CAAC;IAED,8DAA8D;IAC9D,MAAM,CAAC,WAAW,CAAC,GAAQ;QACzB,OAAO,IAAI,cAAc,CAAC;YACxB,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,eAAe,EAAE,GAAG,CAAC,eAAe;SACrC,CAAC,CAAA;IACJ,CAAC;IAED,MAAM;QACJ,OAAO;YACL,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;YACpC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YAC9B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE;SACjD,CAAA;IACH,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,GAAuB;QACrC,OAAO,IAAI,cAAc,CAAC;YACxB,SAAS,EAAE,IAAI,mBAAS,CAAC,GAAG,CAAC,SAAS,CAAC;YACvC,MAAM,EAAE,IAAI,eAAE,CAAC,GAAG,CAAC,MAAM,CAAC;YAC1B,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,eAAe,EAAE,IAAI,mBAAS,CAAC,GAAG,CAAC,eAAe,CAAC;SACpD,CAAC,CAAA;IACJ,CAAC;CACF;AA/CD,wCA+CC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface DurationFields {
|
|
2
|
+
duration: number;
|
|
3
|
+
durationType: number;
|
|
4
|
+
}
|
|
5
|
+
export interface DurationJSON {
|
|
6
|
+
duration: number;
|
|
7
|
+
durationType: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class Duration {
|
|
10
|
+
readonly duration: number;
|
|
11
|
+
readonly durationType: number;
|
|
12
|
+
constructor(fields: DurationFields);
|
|
13
|
+
static layout(property?: string): any;
|
|
14
|
+
static fromDecoded(obj: any): Duration;
|
|
15
|
+
toJSON(): DurationJSON;
|
|
16
|
+
static fromJSON(obj: DurationJSON): Duration;
|
|
17
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Duration = void 0;
|
|
27
|
+
const borsh = __importStar(require("@coral-xyz/borsh"));
|
|
28
|
+
class Duration {
|
|
29
|
+
duration;
|
|
30
|
+
durationType;
|
|
31
|
+
constructor(fields) {
|
|
32
|
+
this.duration = fields.duration;
|
|
33
|
+
this.durationType = fields.durationType;
|
|
34
|
+
}
|
|
35
|
+
static layout(property) {
|
|
36
|
+
return borsh.struct([borsh.u32("duration"), borsh.u8("durationType")], property);
|
|
37
|
+
}
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
39
|
+
static fromDecoded(obj) {
|
|
40
|
+
return new Duration({
|
|
41
|
+
duration: obj.duration,
|
|
42
|
+
durationType: obj.durationType,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
toJSON() {
|
|
46
|
+
return {
|
|
47
|
+
duration: this.duration,
|
|
48
|
+
durationType: this.durationType,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
static fromJSON(obj) {
|
|
52
|
+
return new Duration({
|
|
53
|
+
duration: obj.duration,
|
|
54
|
+
durationType: obj.durationType,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.Duration = Duration;
|
|
59
|
+
//# sourceMappingURL=Duration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Duration.js","sourceRoot":"","sources":["../../src/types/Duration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wDAAyC;AAYzC,MAAa,QAAQ;IACV,QAAQ,CAAQ;IAChB,YAAY,CAAQ;IAE7B,YAAY,MAAsB;QAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAA;QAC/B,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAA;IACzC,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,QAAiB;QAC7B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;IAClF,CAAC;IAED,8DAA8D;IAC9D,MAAM,CAAC,WAAW,CAAC,GAAQ;QACzB,OAAO,IAAI,QAAQ,CAAC;YAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,YAAY,EAAE,GAAG,CAAC,YAAY;SAC/B,CAAC,CAAA;IACJ,CAAC;IAED,MAAM;QACJ,OAAO;YACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAA;IACH,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,GAAiB;QAC/B,OAAO,IAAI,QAAQ,CAAC;YAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,YAAY,EAAE,GAAG,CAAC,YAAY;SAC/B,CAAC,CAAA;IACJ,CAAC;CACF;AAlCD,4BAkCC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
export interface ExternalYieldAccountsFields {
|
|
3
|
+
externalYieldAccount: PublicKey;
|
|
4
|
+
externalYieldVault: PublicKey;
|
|
5
|
+
}
|
|
6
|
+
export interface ExternalYieldAccountsJSON {
|
|
7
|
+
externalYieldAccount: string;
|
|
8
|
+
externalYieldVault: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class ExternalYieldAccounts {
|
|
11
|
+
readonly externalYieldAccount: PublicKey;
|
|
12
|
+
readonly externalYieldVault: PublicKey;
|
|
13
|
+
constructor(fields: ExternalYieldAccountsFields);
|
|
14
|
+
static layout(property?: string): any;
|
|
15
|
+
static fromDecoded(obj: any): ExternalYieldAccounts;
|
|
16
|
+
toJSON(): ExternalYieldAccountsJSON;
|
|
17
|
+
static fromJSON(obj: ExternalYieldAccountsJSON): ExternalYieldAccounts;
|
|
18
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.ExternalYieldAccounts = void 0;
|
|
27
|
+
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
28
|
+
const borsh = __importStar(require("@coral-xyz/borsh"));
|
|
29
|
+
class ExternalYieldAccounts {
|
|
30
|
+
externalYieldAccount;
|
|
31
|
+
externalYieldVault;
|
|
32
|
+
constructor(fields) {
|
|
33
|
+
this.externalYieldAccount = fields.externalYieldAccount;
|
|
34
|
+
this.externalYieldVault = fields.externalYieldVault;
|
|
35
|
+
}
|
|
36
|
+
static layout(property) {
|
|
37
|
+
return borsh.struct([borsh.publicKey("externalYieldAccount"), borsh.publicKey("externalYieldVault")], property);
|
|
38
|
+
}
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
|
+
static fromDecoded(obj) {
|
|
41
|
+
return new ExternalYieldAccounts({
|
|
42
|
+
externalYieldAccount: obj.externalYieldAccount,
|
|
43
|
+
externalYieldVault: obj.externalYieldVault,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
toJSON() {
|
|
47
|
+
return {
|
|
48
|
+
externalYieldAccount: this.externalYieldAccount.toString(),
|
|
49
|
+
externalYieldVault: this.externalYieldVault.toString(),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
static fromJSON(obj) {
|
|
53
|
+
return new ExternalYieldAccounts({
|
|
54
|
+
externalYieldAccount: new web3_js_1.PublicKey(obj.externalYieldAccount),
|
|
55
|
+
externalYieldVault: new web3_js_1.PublicKey(obj.externalYieldVault),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.ExternalYieldAccounts = ExternalYieldAccounts;
|
|
60
|
+
//# sourceMappingURL=ExternalYieldAccounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalYieldAccounts.js","sourceRoot":"","sources":["../../src/types/ExternalYieldAccounts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2C,CAAC,wDAAwD;AACpG,wDAAyC;AAYzC,MAAa,qBAAqB;IACvB,oBAAoB,CAAW;IAC/B,kBAAkB,CAAW;IAEtC,YAAY,MAAmC;QAC7C,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAA;QACvD,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAA;IACrD,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,QAAiB;QAC7B,OAAO,KAAK,CAAC,MAAM,CACjB,CAAC,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC,EAChF,QAAQ,CACT,CAAA;IACH,CAAC;IAED,8DAA8D;IAC9D,MAAM,CAAC,WAAW,CAAC,GAAQ;QACzB,OAAO,IAAI,qBAAqB,CAAC;YAC/B,oBAAoB,EAAE,GAAG,CAAC,oBAAoB;YAC9C,kBAAkB,EAAE,GAAG,CAAC,kBAAkB;SAC3C,CAAC,CAAA;IACJ,CAAC;IAED,MAAM;QACJ,OAAO;YACL,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE;YAC1D,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE;SACvD,CAAA;IACH,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,GAA8B;QAC5C,OAAO,IAAI,qBAAqB,CAAC;YAC/B,oBAAoB,EAAE,IAAI,mBAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC;YAC7D,kBAAkB,EAAE,IAAI,mBAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC;SAC1D,CAAC,CAAA;IACJ,CAAC;CACF;AArCD,sDAqCC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
import BN from "bn.js";
|
|
3
|
+
import { Duration, DurationFields, DurationJSON } from "./Duration";
|
|
4
|
+
export interface LedgerFields {
|
|
5
|
+
status: number;
|
|
6
|
+
strategy: PublicKey;
|
|
7
|
+
principalMint: PublicKey;
|
|
8
|
+
marketInformation: PublicKey;
|
|
9
|
+
principalDue: BN;
|
|
10
|
+
principalRepaid: BN;
|
|
11
|
+
interestOutstanding: BN;
|
|
12
|
+
lastInterestUpdatedTime: BN;
|
|
13
|
+
duration: DurationFields;
|
|
14
|
+
/** PodDecimal: 24 bytes stored as 3 x u64 */
|
|
15
|
+
interestPerSecond: Array<BN>;
|
|
16
|
+
startTime: BN;
|
|
17
|
+
endTime: BN;
|
|
18
|
+
apy: BN;
|
|
19
|
+
}
|
|
20
|
+
export interface LedgerJSON {
|
|
21
|
+
status: number;
|
|
22
|
+
strategy: string;
|
|
23
|
+
principalMint: string;
|
|
24
|
+
marketInformation: string;
|
|
25
|
+
principalDue: string;
|
|
26
|
+
principalRepaid: string;
|
|
27
|
+
interestOutstanding: string;
|
|
28
|
+
lastInterestUpdatedTime: string;
|
|
29
|
+
duration: DurationJSON;
|
|
30
|
+
interestPerSecond: Array<string>;
|
|
31
|
+
startTime: string;
|
|
32
|
+
endTime: string;
|
|
33
|
+
apy: string;
|
|
34
|
+
}
|
|
35
|
+
export declare class Ledger {
|
|
36
|
+
readonly status: number;
|
|
37
|
+
readonly strategy: PublicKey;
|
|
38
|
+
readonly principalMint: PublicKey;
|
|
39
|
+
readonly marketInformation: PublicKey;
|
|
40
|
+
readonly principalDue: BN;
|
|
41
|
+
readonly principalRepaid: BN;
|
|
42
|
+
readonly interestOutstanding: BN;
|
|
43
|
+
readonly lastInterestUpdatedTime: BN;
|
|
44
|
+
readonly duration: Duration;
|
|
45
|
+
readonly interestPerSecond: Array<BN>;
|
|
46
|
+
readonly startTime: BN;
|
|
47
|
+
readonly endTime: BN;
|
|
48
|
+
readonly apy: BN;
|
|
49
|
+
constructor(fields: LedgerFields);
|
|
50
|
+
static layout(property?: string): any;
|
|
51
|
+
static fromDecoded(obj: any): Ledger;
|
|
52
|
+
toJSON(): LedgerJSON;
|
|
53
|
+
static fromJSON(obj: LedgerJSON): Ledger;
|
|
54
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.Ledger = void 0;
|
|
30
|
+
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
31
|
+
const bn_js_1 = __importDefault(require("bn.js")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
32
|
+
const borsh = __importStar(require("@coral-xyz/borsh"));
|
|
33
|
+
const Duration_1 = require("./Duration");
|
|
34
|
+
class Ledger {
|
|
35
|
+
status;
|
|
36
|
+
strategy;
|
|
37
|
+
principalMint;
|
|
38
|
+
marketInformation;
|
|
39
|
+
principalDue;
|
|
40
|
+
principalRepaid;
|
|
41
|
+
interestOutstanding;
|
|
42
|
+
lastInterestUpdatedTime;
|
|
43
|
+
duration;
|
|
44
|
+
interestPerSecond;
|
|
45
|
+
startTime;
|
|
46
|
+
endTime;
|
|
47
|
+
apy;
|
|
48
|
+
constructor(fields) {
|
|
49
|
+
this.status = fields.status;
|
|
50
|
+
this.strategy = fields.strategy;
|
|
51
|
+
this.principalMint = fields.principalMint;
|
|
52
|
+
this.marketInformation = fields.marketInformation;
|
|
53
|
+
this.principalDue = fields.principalDue;
|
|
54
|
+
this.principalRepaid = fields.principalRepaid;
|
|
55
|
+
this.interestOutstanding = fields.interestOutstanding;
|
|
56
|
+
this.lastInterestUpdatedTime = fields.lastInterestUpdatedTime;
|
|
57
|
+
this.duration = new Duration_1.Duration({ ...fields.duration });
|
|
58
|
+
this.interestPerSecond = fields.interestPerSecond;
|
|
59
|
+
this.startTime = fields.startTime;
|
|
60
|
+
this.endTime = fields.endTime;
|
|
61
|
+
this.apy = fields.apy;
|
|
62
|
+
}
|
|
63
|
+
static layout(property) {
|
|
64
|
+
return borsh.struct([
|
|
65
|
+
borsh.u8("status"),
|
|
66
|
+
borsh.publicKey("strategy"),
|
|
67
|
+
borsh.publicKey("principalMint"),
|
|
68
|
+
borsh.publicKey("marketInformation"),
|
|
69
|
+
borsh.u64("principalDue"),
|
|
70
|
+
borsh.u64("principalRepaid"),
|
|
71
|
+
borsh.u64("interestOutstanding"),
|
|
72
|
+
borsh.u64("lastInterestUpdatedTime"),
|
|
73
|
+
Duration_1.Duration.layout("duration"),
|
|
74
|
+
borsh.array(borsh.u64(), 3, "interestPerSecond"),
|
|
75
|
+
borsh.u64("startTime"),
|
|
76
|
+
borsh.u64("endTime"),
|
|
77
|
+
borsh.u64("apy"),
|
|
78
|
+
], property);
|
|
79
|
+
}
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
81
|
+
static fromDecoded(obj) {
|
|
82
|
+
return new Ledger({
|
|
83
|
+
status: obj.status,
|
|
84
|
+
strategy: obj.strategy,
|
|
85
|
+
principalMint: obj.principalMint,
|
|
86
|
+
marketInformation: obj.marketInformation,
|
|
87
|
+
principalDue: obj.principalDue,
|
|
88
|
+
principalRepaid: obj.principalRepaid,
|
|
89
|
+
interestOutstanding: obj.interestOutstanding,
|
|
90
|
+
lastInterestUpdatedTime: obj.lastInterestUpdatedTime,
|
|
91
|
+
duration: Duration_1.Duration.fromDecoded(obj.duration),
|
|
92
|
+
interestPerSecond: obj.interestPerSecond,
|
|
93
|
+
startTime: obj.startTime,
|
|
94
|
+
endTime: obj.endTime,
|
|
95
|
+
apy: obj.apy,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
toJSON() {
|
|
99
|
+
return {
|
|
100
|
+
status: this.status,
|
|
101
|
+
strategy: this.strategy.toString(),
|
|
102
|
+
principalMint: this.principalMint.toString(),
|
|
103
|
+
marketInformation: this.marketInformation.toString(),
|
|
104
|
+
principalDue: this.principalDue.toString(),
|
|
105
|
+
principalRepaid: this.principalRepaid.toString(),
|
|
106
|
+
interestOutstanding: this.interestOutstanding.toString(),
|
|
107
|
+
lastInterestUpdatedTime: this.lastInterestUpdatedTime.toString(),
|
|
108
|
+
duration: this.duration.toJSON(),
|
|
109
|
+
interestPerSecond: this.interestPerSecond.map((item) => item.toString()),
|
|
110
|
+
startTime: this.startTime.toString(),
|
|
111
|
+
endTime: this.endTime.toString(),
|
|
112
|
+
apy: this.apy.toString(),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
static fromJSON(obj) {
|
|
116
|
+
return new Ledger({
|
|
117
|
+
status: obj.status,
|
|
118
|
+
strategy: new web3_js_1.PublicKey(obj.strategy),
|
|
119
|
+
principalMint: new web3_js_1.PublicKey(obj.principalMint),
|
|
120
|
+
marketInformation: new web3_js_1.PublicKey(obj.marketInformation),
|
|
121
|
+
principalDue: new bn_js_1.default(obj.principalDue),
|
|
122
|
+
principalRepaid: new bn_js_1.default(obj.principalRepaid),
|
|
123
|
+
interestOutstanding: new bn_js_1.default(obj.interestOutstanding),
|
|
124
|
+
lastInterestUpdatedTime: new bn_js_1.default(obj.lastInterestUpdatedTime),
|
|
125
|
+
duration: Duration_1.Duration.fromJSON(obj.duration),
|
|
126
|
+
interestPerSecond: obj.interestPerSecond.map((item) => new bn_js_1.default(item)),
|
|
127
|
+
startTime: new bn_js_1.default(obj.startTime),
|
|
128
|
+
endTime: new bn_js_1.default(obj.endTime),
|
|
129
|
+
apy: new bn_js_1.default(obj.apy),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.Ledger = Ledger;
|
|
134
|
+
//# sourceMappingURL=Ledger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ledger.js","sourceRoot":"","sources":["../../src/types/Ledger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2C,CAAC,wDAAwD;AACpG,kDAAsB,CAAC,wDAAwD;AAC/E,wDAAyC;AAEzC,yCAAmE;AAmCnE,MAAa,MAAM;IACR,MAAM,CAAQ;IACd,QAAQ,CAAW;IACnB,aAAa,CAAW;IACxB,iBAAiB,CAAW;IAC5B,YAAY,CAAI;IAChB,eAAe,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D,QAAQ,EAAE,mBAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;YACzC,iBAAiB,EAAE,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,eAAE,CAAC,IAAI,CAAC,CAAC;YACpE,SAAS,EAAE,IAAI,eAAE,CAAC,GAAG,CAAC,SAAS,CAAC;YAChC,OAAO,EAAE,IAAI,eAAE,CAAC,GAAG,CAAC,OAAO,CAAC;YAC5B,GAAG,EAAE,IAAI,eAAE,CAAC,GAAG,CAAC,GAAG,CAAC;SACrB,CAAC,CAAA;IACJ,CAAC;CACF;AA1GD,wBA0GC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { CapMonitor, CapMonitorFields, CapMonitorJSON } from "./CapMonitor";
|
|
2
|
+
export { CollateralData, CollateralDataFields, CollateralDataJSON } from "./CollateralData";
|
|
3
|
+
export { Duration, DurationFields, DurationJSON } from "./Duration";
|
|
4
|
+
export { ExternalYieldAccounts, ExternalYieldAccountsFields, ExternalYieldAccountsJSON } from "./ExternalYieldAccounts";
|
|
5
|
+
export { Ledger, LedgerFields, LedgerJSON } from "./Ledger";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Ledger = exports.ExternalYieldAccounts = exports.Duration = exports.CollateralData = exports.CapMonitor = void 0;
|
|
4
|
+
var CapMonitor_1 = require("./CapMonitor");
|
|
5
|
+
Object.defineProperty(exports, "CapMonitor", { enumerable: true, get: function () { return CapMonitor_1.CapMonitor; } });
|
|
6
|
+
var CollateralData_1 = require("./CollateralData");
|
|
7
|
+
Object.defineProperty(exports, "CollateralData", { enumerable: true, get: function () { return CollateralData_1.CollateralData; } });
|
|
8
|
+
var Duration_1 = require("./Duration");
|
|
9
|
+
Object.defineProperty(exports, "Duration", { enumerable: true, get: function () { return Duration_1.Duration; } });
|
|
10
|
+
var ExternalYieldAccounts_1 = require("./ExternalYieldAccounts");
|
|
11
|
+
Object.defineProperty(exports, "ExternalYieldAccounts", { enumerable: true, get: function () { return ExternalYieldAccounts_1.ExternalYieldAccounts; } });
|
|
12
|
+
var Ledger_1 = require("./Ledger");
|
|
13
|
+
Object.defineProperty(exports, "Ledger", { enumerable: true, get: function () { return Ledger_1.Ledger; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,2CAA2E;AAAlE,wGAAA,UAAU,OAAA;AACnB,mDAA2F;AAAlF,gHAAA,cAAc,OAAA;AACvB,uCAAmE;AAA1D,oGAAA,QAAQ,OAAA;AACjB,iEAAuH;AAA9G,8HAAA,qBAAqB,OAAA;AAC9B,mCAA2D;AAAlD,gGAAA,MAAM,OAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@exponent-labs/loopscale-deserializer",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"main": "build/index.js",
|
|
5
|
+
"types": "build/index.d.ts",
|
|
6
|
+
"license": "AGPL-3.0",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc --build"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@coral-xyz/borsh": "^0.28.0",
|
|
12
|
+
"@solana/web3.js": "1.95.8",
|
|
13
|
+
"bn.js": "^5.2.1",
|
|
14
|
+
"decimal.js": "^10.4.3"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"typescript": "5.4.5"
|
|
18
|
+
}
|
|
19
|
+
}
|