@pax2pay/model-banking 0.1.254 → 0.1.256
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/Account/index.ts +2 -0
- package/Client/Treasury.ts +2 -2
- package/Operation/Signer.ts +18 -0
- package/Operation/index.ts +5 -7
- package/Treasury/Snapshot/Fragment.ts +32 -0
- package/Treasury/Snapshot/Warning/Overdraft.ts +16 -0
- package/Treasury/Snapshot/Warning/index.ts +7 -0
- package/Treasury/Snapshot/index.ts +14 -0
- package/Treasury/index.ts +7 -3
- package/dist/Account/index.d.ts +1 -0
- package/dist/Account/index.js +1 -0
- package/dist/Account/index.js.map +1 -1
- package/dist/Client/Treasury.d.ts +1 -1
- package/dist/Client/Treasury.js +1 -1
- package/dist/Client/Treasury.js.map +1 -1
- package/dist/Operation/Signer.d.ts +14 -0
- package/dist/Operation/Signer.js +17 -0
- package/dist/Operation/Signer.js.map +1 -0
- package/dist/Operation/index.d.ts +4 -1
- package/dist/Operation/index.js +4 -6
- package/dist/Operation/index.js.map +1 -1
- package/dist/Treasury/Snapshot/Fragment.d.ts +19 -0
- package/dist/Treasury/Snapshot/Fragment.js +20 -0
- package/dist/Treasury/Snapshot/Fragment.js.map +1 -0
- package/dist/Treasury/Snapshot/Warning/Overdraft.d.ts +10 -0
- package/dist/Treasury/Snapshot/Warning/Overdraft.js +11 -0
- package/dist/Treasury/Snapshot/Warning/Overdraft.js.map +1 -0
- package/dist/Treasury/Snapshot/Warning/index.d.ts +5 -0
- package/dist/Treasury/Snapshot/Warning/index.js +6 -0
- package/dist/Treasury/Snapshot/Warning/index.js.map +1 -0
- package/dist/Treasury/Snapshot/index.d.ts +192 -0
- package/dist/Treasury/Snapshot/index.js +11 -0
- package/dist/Treasury/Snapshot/index.js.map +1 -0
- package/dist/Treasury/index.d.ts +7 -3
- package/dist/Treasury/index.js +2 -0
- package/dist/Treasury/index.js.map +1 -1
- package/package.json +1 -1
- package/Treasury/Fiat/index.ts +0 -10
- package/Treasury/Treasury.ts +0 -5
- package/dist/Treasury/Fiat/index.d.ts +0 -9
- package/dist/Treasury/Fiat/index.js +0 -2
- package/dist/Treasury/Fiat/index.js.map +0 -1
- package/dist/Treasury/Treasury.d.ts +0 -7
- package/dist/Treasury/Treasury.js +0 -2
- package/dist/Treasury/Treasury.js.map +0 -1
package/Account/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface Account extends Account.Creatable {
|
|
|
10
10
|
readonly created: isoly.DateTime
|
|
11
11
|
readonly balances: Balances
|
|
12
12
|
readonly rails: Rail.Address[]
|
|
13
|
+
key?: string
|
|
13
14
|
//readonly rules: Rule[]
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -20,6 +21,7 @@ export namespace Account {
|
|
|
20
21
|
created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
|
|
21
22
|
balances: isly.fromIs("Balances", Balances.is),
|
|
22
23
|
rails: isly.fromIs("Rail.Address", Rail.Address.is).array(),
|
|
24
|
+
key: isly.string().optional(),
|
|
23
25
|
})
|
|
24
26
|
export const is = type.is
|
|
25
27
|
export const flaw = type.flaw
|
package/Client/Treasury.ts
CHANGED
|
@@ -13,9 +13,9 @@ export class Treasury extends rest.Collection<gracely.Error> {
|
|
|
13
13
|
async change(currency: isoly.Currency, changes: Result[]): Promise<gracely.Result> {
|
|
14
14
|
return this.client.patch(`/treasury/${currency}`, changes)
|
|
15
15
|
}
|
|
16
|
-
async fetch(hour?: isoly.DateTime): Promise<TreasuryModel | gracely.Error> {
|
|
16
|
+
async fetch(hour?: isoly.DateTime): Promise<TreasuryModel.Snapshot | gracely.Error> {
|
|
17
17
|
const path = hour ? `/${isoly.DateTime.truncate(hour, "hours")}` : ""
|
|
18
|
-
return this.client.get<TreasuryModel>(`/treasury
|
|
18
|
+
return this.client.get<TreasuryModel.Snapshot>(`/treasury/snapshot/${path}`)
|
|
19
19
|
}
|
|
20
20
|
async listTransactions(accountId: string): Promise<TreasuryModel.Transaction[] | gracely.Error> {
|
|
21
21
|
return this.client.get<TreasuryModel.Transaction[]>(`/treasury/account/${accountId}/transaction`)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cryptly } from "cryptly"
|
|
2
|
+
import type { Operation } from "./index"
|
|
3
|
+
|
|
4
|
+
export class Signer {
|
|
5
|
+
private readonly signer = cryptly.Signer.create("RSA", "SHA-256", this.keys.public, this.keys.private)
|
|
6
|
+
|
|
7
|
+
private constructor(private readonly keys: { public?: string; private?: string }) {}
|
|
8
|
+
async sign(operation: Operation & { previous: string }): Promise<string> {
|
|
9
|
+
return this.signer.sign(JSON.stringify(operation))
|
|
10
|
+
}
|
|
11
|
+
async verify(operation: Operation): Promise<boolean> {
|
|
12
|
+
return this.signer.verify(JSON.stringify({ ...operation, signature: undefined }), operation.signature ?? "")
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
static open(keys: { public?: string; private?: string }): Signer {
|
|
16
|
+
return new Signer(keys)
|
|
17
|
+
}
|
|
18
|
+
}
|
package/Operation/index.ts
CHANGED
|
@@ -2,14 +2,17 @@ import { isoly } from "isoly"
|
|
|
2
2
|
import { isly } from "isly"
|
|
3
3
|
import { Changes as OperationChanges } from "./Changes"
|
|
4
4
|
import { Creatable as OperationCreatable } from "./Creatable"
|
|
5
|
+
import { Signer as OperationSigner } from "./Signer"
|
|
5
6
|
|
|
6
7
|
export interface Operation extends OperationCreatable {
|
|
7
8
|
transaction: string
|
|
8
9
|
counter: number
|
|
9
10
|
created: isoly.DateTime
|
|
10
11
|
signature?: string
|
|
12
|
+
previous?: string
|
|
11
13
|
}
|
|
12
14
|
export namespace Operation {
|
|
15
|
+
export const Signer = OperationSigner
|
|
13
16
|
export type Creatable = OperationCreatable
|
|
14
17
|
export const Creatable = OperationCreatable
|
|
15
18
|
export type Changes = OperationChanges
|
|
@@ -22,21 +25,16 @@ export namespace Operation {
|
|
|
22
25
|
counter: isly.number(),
|
|
23
26
|
created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
|
|
24
27
|
signature: isly.string().optional(),
|
|
28
|
+
previous: isly.string().optional(),
|
|
25
29
|
})
|
|
26
30
|
export const is = type.is
|
|
27
31
|
export const flaw = type.flaw
|
|
28
|
-
|
|
29
|
-
function sign(precursor: string): string | undefined {
|
|
30
|
-
const signature = Number.parseInt(precursor)
|
|
31
|
-
return Number.isNaN(signature) ? undefined : (signature + 1).toString()
|
|
32
|
-
}
|
|
33
|
-
export function fromCreatable(transaction: string, creatable: Creatable, oldSignature?: string): Operation {
|
|
32
|
+
export function fromCreatable(transaction: string, creatable: Creatable): Operation {
|
|
34
33
|
return {
|
|
35
34
|
...creatable,
|
|
36
35
|
transaction,
|
|
37
36
|
counter: 0,
|
|
38
37
|
created: isoly.DateTime.now(),
|
|
39
|
-
signature: oldSignature && sign(oldSignature),
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { isly } from "isly"
|
|
2
|
+
import { Balances } from "../../Balances"
|
|
3
|
+
import { Account } from "../Account"
|
|
4
|
+
import { Warning } from "./Warning"
|
|
5
|
+
|
|
6
|
+
export interface Fragment {
|
|
7
|
+
warnings: Warning[]
|
|
8
|
+
emoney: Balances.Balance
|
|
9
|
+
fiat: {
|
|
10
|
+
safe: number
|
|
11
|
+
unsafe: number
|
|
12
|
+
total: number // emoney issuable total amount
|
|
13
|
+
other: number
|
|
14
|
+
buffer: number
|
|
15
|
+
accounts: Account[]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export namespace Fragment {
|
|
20
|
+
export const type = isly.object<Fragment>({
|
|
21
|
+
warnings: Warning.type.array(),
|
|
22
|
+
emoney: Balances.Balance.type,
|
|
23
|
+
fiat: isly.object({
|
|
24
|
+
safe: isly.number(),
|
|
25
|
+
unsafe: isly.number(),
|
|
26
|
+
total: isly.number(),
|
|
27
|
+
other: isly.number(),
|
|
28
|
+
buffer: isly.number(),
|
|
29
|
+
accounts: Account.type.array(),
|
|
30
|
+
}),
|
|
31
|
+
})
|
|
32
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isly } from "isly"
|
|
2
|
+
import { Balances } from "../../../Balances"
|
|
3
|
+
|
|
4
|
+
export interface Overdraft {
|
|
5
|
+
type: "overdraft"
|
|
6
|
+
account: string
|
|
7
|
+
balance: Balances.Balance
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export namespace Overdraft {
|
|
11
|
+
export const type = isly.object<Overdraft>({
|
|
12
|
+
type: isly.string("overdraft"),
|
|
13
|
+
account: isly.string(),
|
|
14
|
+
balance: Balances.Balance.type,
|
|
15
|
+
})
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isoly } from "isoly"
|
|
2
|
+
import { isly } from "isly"
|
|
3
|
+
import { Fragment as SnapshotFragment } from "./Fragment"
|
|
4
|
+
import { Warning as SnapshotWarning } from "./Warning"
|
|
5
|
+
|
|
6
|
+
export type Snapshot = Partial<Record<isoly.Currency, Snapshot.Fragment>>
|
|
7
|
+
|
|
8
|
+
export namespace Snapshot {
|
|
9
|
+
export type Fragment = SnapshotFragment
|
|
10
|
+
export const Fragment = SnapshotFragment
|
|
11
|
+
export type Warning = SnapshotWarning
|
|
12
|
+
export const Warning = SnapshotWarning
|
|
13
|
+
export const type = isly.record(isly.fromIs("Currency", isoly.Currency.is), Fragment.type)
|
|
14
|
+
}
|
package/Treasury/index.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
2
|
import { Account as TreasuryAccount } from "./Account"
|
|
3
3
|
import { Balance as TreasuryBalance } from "./Balance"
|
|
4
|
-
import {
|
|
4
|
+
import { Snapshot as TreasurySnapshot } from "./Snapshot"
|
|
5
5
|
import { Transaction as TreasuryTransaction } from "./Transaction"
|
|
6
6
|
|
|
7
|
-
export { Treasury } from "./Treasury"
|
|
8
7
|
export namespace Treasury {
|
|
9
8
|
export function key(hour?: isoly.DateTime): isoly.DateTime {
|
|
10
9
|
const now = isoly.DateTime.now()
|
|
@@ -17,8 +16,13 @@ export namespace Treasury {
|
|
|
17
16
|
export type Account = TreasuryAccount
|
|
18
17
|
export type Transaction = TreasuryTransaction
|
|
19
18
|
export type Balance = TreasuryBalance
|
|
20
|
-
export type Fiat = TreasuryFiat
|
|
21
19
|
export const Balance = TreasuryBalance
|
|
20
|
+
export type Snapshot = TreasurySnapshot
|
|
21
|
+
export const Snapshot = TreasurySnapshot
|
|
22
|
+
export namespace Snapshot {
|
|
23
|
+
export type Fragment = TreasurySnapshot.Fragment
|
|
24
|
+
export type Warning = TreasurySnapshot.Warning
|
|
25
|
+
}
|
|
22
26
|
export namespace Account {
|
|
23
27
|
export type Creatable = TreasuryAccount.Creatable
|
|
24
28
|
export const Creatable = TreasuryAccount.Creatable
|
package/dist/Account/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface Account extends Account.Creatable {
|
|
|
9
9
|
readonly created: isoly.DateTime;
|
|
10
10
|
readonly balances: Balances;
|
|
11
11
|
readonly rails: Rail.Address[];
|
|
12
|
+
key?: string;
|
|
12
13
|
}
|
|
13
14
|
export declare namespace Account {
|
|
14
15
|
const type: isly.object.ExtendableType<Account>;
|
package/dist/Account/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export var Account;
|
|
|
12
12
|
created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
|
|
13
13
|
balances: isly.fromIs("Balances", Balances.is),
|
|
14
14
|
rails: isly.fromIs("Rail.Address", Rail.Address.is).array(),
|
|
15
|
+
key: isly.string().optional(),
|
|
15
16
|
});
|
|
16
17
|
Account.is = Account.type.is;
|
|
17
18
|
Account.flaw = Account.type.flaw;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,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AAA,IAAI,CAAC,IAAI,CAAA;IAC7B,SAAgB,YAAY,CAAC,KAA+B;QAC3D,OAAO,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IACvC,CAAC;IAFe,oBAAY,eAE3B,CAAA;IAGY,iBAAS,GAAG,gBAAgB,CAAA;AAC1C,CAAC,EAjBgB,OAAO,KAAP,OAAO,QAiBvB"}
|
|
@@ -7,6 +7,6 @@ import { Result } from "../Treasury/Balance";
|
|
|
7
7
|
export declare class Treasury extends rest.Collection<gracely.Error> {
|
|
8
8
|
constructor(client: http.Client);
|
|
9
9
|
change(currency: isoly.Currency, changes: Result[]): Promise<gracely.Result>;
|
|
10
|
-
fetch(hour?: isoly.DateTime): Promise<TreasuryModel | gracely.Error>;
|
|
10
|
+
fetch(hour?: isoly.DateTime): Promise<TreasuryModel.Snapshot | gracely.Error>;
|
|
11
11
|
listTransactions(accountId: string): Promise<TreasuryModel.Transaction[] | gracely.Error>;
|
|
12
12
|
}
|
package/dist/Client/Treasury.js
CHANGED
|
@@ -9,7 +9,7 @@ export class Treasury extends rest.Collection {
|
|
|
9
9
|
}
|
|
10
10
|
async fetch(hour) {
|
|
11
11
|
const path = hour ? `/${isoly.DateTime.truncate(hour, "hours")}` : "";
|
|
12
|
-
return this.client.get(`/treasury
|
|
12
|
+
return this.client.get(`/treasury/snapshot/${path}`);
|
|
13
13
|
}
|
|
14
14
|
async listTransactions(accountId) {
|
|
15
15
|
return this.client.get(`/treasury/account/${accountId}/transaction`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Treasury.js","sourceRoot":"../","sources":["Client/Treasury.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAIpC,MAAM,OAAO,QAAS,SAAQ,IAAI,CAAC,UAAyB;IAC3D,YAAY,MAAmB;QAC9B,KAAK,CAAC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AAqB,SAAS,cAAc,CAAC,CAAA;IAClG,CAAC;CACD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Operation } from "./index";
|
|
2
|
+
export declare class Signer {
|
|
3
|
+
private readonly keys;
|
|
4
|
+
private readonly signer;
|
|
5
|
+
private constructor();
|
|
6
|
+
sign(operation: Operation & {
|
|
7
|
+
previous: string;
|
|
8
|
+
}): Promise<string>;
|
|
9
|
+
verify(operation: Operation): Promise<boolean>;
|
|
10
|
+
static open(keys: {
|
|
11
|
+
public?: string;
|
|
12
|
+
private?: string;
|
|
13
|
+
}): Signer;
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cryptly } from "cryptly";
|
|
2
|
+
export class Signer {
|
|
3
|
+
constructor(keys) {
|
|
4
|
+
this.keys = keys;
|
|
5
|
+
this.signer = cryptly.Signer.create("RSA", "SHA-256", this.keys.public, this.keys.private);
|
|
6
|
+
}
|
|
7
|
+
async sign(operation) {
|
|
8
|
+
return this.signer.sign(JSON.stringify(operation));
|
|
9
|
+
}
|
|
10
|
+
async verify(operation) {
|
|
11
|
+
return this.signer.verify(JSON.stringify({ ...operation, signature: undefined }), operation.signature ?? "");
|
|
12
|
+
}
|
|
13
|
+
static open(keys) {
|
|
14
|
+
return new Signer(keys);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=Signer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Signer.js","sourceRoot":"../","sources":["Operation/Signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAGjC,MAAM,OAAO,MAAM;IAGlB,YAAqC,IAA2C;QAA3C,SAAI,GAAJ,IAAI,CAAuC;QAF/D,WAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAEnB,CAAC;IACpF,KAAK,CAAC,IAAI,CAAC,SAA2C;QACrD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAA;IACnD,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,SAAoB;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,CAAC,SAAS,IAAI,EAAE,CAAC,CAAA;IAC7G,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,IAA2C;QACtD,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC;CACD"}
|
|
@@ -2,13 +2,16 @@ import { isoly } from "isoly";
|
|
|
2
2
|
import { isly } from "isly";
|
|
3
3
|
import { Changes as OperationChanges } from "./Changes";
|
|
4
4
|
import { Creatable as OperationCreatable } from "./Creatable";
|
|
5
|
+
import { Signer as OperationSigner } from "./Signer";
|
|
5
6
|
export interface Operation extends OperationCreatable {
|
|
6
7
|
transaction: string;
|
|
7
8
|
counter: number;
|
|
8
9
|
created: isoly.DateTime;
|
|
9
10
|
signature?: string;
|
|
11
|
+
previous?: string;
|
|
10
12
|
}
|
|
11
13
|
export declare namespace Operation {
|
|
14
|
+
const Signer: typeof OperationSigner;
|
|
12
15
|
type Creatable = OperationCreatable;
|
|
13
16
|
const Creatable: typeof OperationCreatable;
|
|
14
17
|
type Changes = OperationChanges;
|
|
@@ -19,5 +22,5 @@ export declare namespace Operation {
|
|
|
19
22
|
const type: isly.object.ExtendableType<Operation>;
|
|
20
23
|
const is: isly.Type.IsFunction<Operation>;
|
|
21
24
|
const flaw: isly.Type.FlawFunction;
|
|
22
|
-
function fromCreatable(transaction: string, creatable: Creatable
|
|
25
|
+
function fromCreatable(transaction: string, creatable: Creatable): Operation;
|
|
23
26
|
}
|
package/dist/Operation/index.js
CHANGED
|
@@ -2,8 +2,10 @@ import { isoly } from "isoly";
|
|
|
2
2
|
import { isly } from "isly";
|
|
3
3
|
import { Changes as OperationChanges } from "./Changes";
|
|
4
4
|
import { Creatable as OperationCreatable } from "./Creatable";
|
|
5
|
+
import { Signer as OperationSigner } from "./Signer";
|
|
5
6
|
export var Operation;
|
|
6
7
|
(function (Operation) {
|
|
8
|
+
Operation.Signer = OperationSigner;
|
|
7
9
|
Operation.Creatable = OperationCreatable;
|
|
8
10
|
Operation.Changes = OperationChanges;
|
|
9
11
|
Operation.type = OperationCreatable.type.extend({
|
|
@@ -11,20 +13,16 @@ export var Operation;
|
|
|
11
13
|
counter: isly.number(),
|
|
12
14
|
created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
|
|
13
15
|
signature: isly.string().optional(),
|
|
16
|
+
previous: isly.string().optional(),
|
|
14
17
|
});
|
|
15
18
|
Operation.is = Operation.type.is;
|
|
16
19
|
Operation.flaw = Operation.type.flaw;
|
|
17
|
-
function
|
|
18
|
-
const signature = Number.parseInt(precursor);
|
|
19
|
-
return Number.isNaN(signature) ? undefined : (signature + 1).toString();
|
|
20
|
-
}
|
|
21
|
-
function fromCreatable(transaction, creatable, oldSignature) {
|
|
20
|
+
function fromCreatable(transaction, creatable) {
|
|
22
21
|
return {
|
|
23
22
|
...creatable,
|
|
24
23
|
transaction,
|
|
25
24
|
counter: 0,
|
|
26
25
|
created: isoly.DateTime.now(),
|
|
27
|
-
signature: oldSignature && sign(oldSignature),
|
|
28
26
|
};
|
|
29
27
|
}
|
|
30
28
|
Operation.fromCreatable = fromCreatable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Operation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA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C,QAAQ,CAAC,GAAG,EAAE;SAC7B,CAAA;IACF,CAAC;IAPe,uBAAa,gBAO5B,CAAA;AACF,CAAC,EA1BgB,SAAS,KAAT,SAAS,QA0BzB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
import { Balances } from "../../Balances";
|
|
3
|
+
import { Account } from "../Account";
|
|
4
|
+
import { Warning } from "./Warning";
|
|
5
|
+
export interface Fragment {
|
|
6
|
+
warnings: Warning[];
|
|
7
|
+
emoney: Balances.Balance;
|
|
8
|
+
fiat: {
|
|
9
|
+
safe: number;
|
|
10
|
+
unsafe: number;
|
|
11
|
+
total: number;
|
|
12
|
+
other: number;
|
|
13
|
+
buffer: number;
|
|
14
|
+
accounts: Account[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare namespace Fragment {
|
|
18
|
+
const type: isly.object.ExtendableType<Fragment>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
import { Balances } from "../../Balances";
|
|
3
|
+
import { Account } from "../Account";
|
|
4
|
+
import { Warning } from "./Warning";
|
|
5
|
+
export var Fragment;
|
|
6
|
+
(function (Fragment) {
|
|
7
|
+
Fragment.type = isly.object({
|
|
8
|
+
warnings: Warning.type.array(),
|
|
9
|
+
emoney: Balances.Balance.type,
|
|
10
|
+
fiat: isly.object({
|
|
11
|
+
safe: isly.number(),
|
|
12
|
+
unsafe: isly.number(),
|
|
13
|
+
total: isly.number(),
|
|
14
|
+
other: isly.number(),
|
|
15
|
+
buffer: isly.number(),
|
|
16
|
+
accounts: Account.type.array(),
|
|
17
|
+
}),
|
|
18
|
+
});
|
|
19
|
+
})(Fragment || (Fragment = {}));
|
|
20
|
+
//# sourceMappingURL=Fragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fragment.js","sourceRoot":"../","sources":["Treasury/Snapshot/Fragment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAenC,MAAM,KAAW,QAAQ,CAaxB;AAbD,WAAiB,QAAQ;IACX,aAAI,GAAG,IAAI,CAAC,MAAM,CAAW;QACzC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;QAC9B,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI;QAC7B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;YACjB,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YACrB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;YACpB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;YACpB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YACrB,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;SAC9B,CAAC;KACF,CAAC,CAAA;AACH,CAAC,EAbgB,QAAQ,KAAR,QAAQ,QAaxB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
import { Balances } from "../../../Balances";
|
|
3
|
+
export interface Overdraft {
|
|
4
|
+
type: "overdraft";
|
|
5
|
+
account: string;
|
|
6
|
+
balance: Balances.Balance;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace Overdraft {
|
|
9
|
+
const type: isly.object.ExtendableType<Overdraft>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
import { Balances } from "../../../Balances";
|
|
3
|
+
export var Overdraft;
|
|
4
|
+
(function (Overdraft) {
|
|
5
|
+
Overdraft.type = isly.object({
|
|
6
|
+
type: isly.string("overdraft"),
|
|
7
|
+
account: isly.string(),
|
|
8
|
+
balance: Balances.Balance.type,
|
|
9
|
+
});
|
|
10
|
+
})(Overdraft || (Overdraft = {}));
|
|
11
|
+
//# sourceMappingURL=Overdraft.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Overdraft.js","sourceRoot":"../","sources":["Treasury/Snapshot/Warning/Overdraft.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAQ5C,MAAM,KAAW,SAAS,CAMzB;AAND,WAAiB,SAAS;IACZ,cAAI,GAAG,IAAI,CAAC,MAAM,CAAY;QAC1C,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QAC9B,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;QACtB,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI;KAC9B,CAAC,CAAA;AACH,CAAC,EANgB,SAAS,KAAT,SAAS,QAMzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/Snapshot/Warning/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAIvC,MAAM,KAAW,OAAO,CAEvB;AAFD,WAAiB,OAAO;IACV,YAAI,GAAG,SAAS,CAAC,IAAI,CAAA;AACnC,CAAC,EAFgB,OAAO,KAAP,OAAO,QAEvB"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { isoly } from "isoly";
|
|
2
|
+
import { isly } from "isly";
|
|
3
|
+
import { Fragment as SnapshotFragment } from "./Fragment";
|
|
4
|
+
import { Warning as SnapshotWarning } from "./Warning";
|
|
5
|
+
export type Snapshot = Partial<Record<isoly.Currency, Snapshot.Fragment>>;
|
|
6
|
+
export declare namespace Snapshot {
|
|
7
|
+
type Fragment = SnapshotFragment;
|
|
8
|
+
const Fragment: typeof SnapshotFragment;
|
|
9
|
+
type Warning = SnapshotWarning;
|
|
10
|
+
const Warning: typeof SnapshotWarning;
|
|
11
|
+
const type: isly.Type<{
|
|
12
|
+
BTN: any;
|
|
13
|
+
CHE: any;
|
|
14
|
+
MKD: any;
|
|
15
|
+
AED: any;
|
|
16
|
+
AFN: any;
|
|
17
|
+
ALL: any;
|
|
18
|
+
AMD: any;
|
|
19
|
+
ANG: any;
|
|
20
|
+
AOA: any;
|
|
21
|
+
ARS: any;
|
|
22
|
+
AUD: any;
|
|
23
|
+
AWG: any;
|
|
24
|
+
AZN: any;
|
|
25
|
+
BAM: any;
|
|
26
|
+
BBD: any;
|
|
27
|
+
BDT: any;
|
|
28
|
+
BGN: any;
|
|
29
|
+
BHD: any;
|
|
30
|
+
BIF: any;
|
|
31
|
+
BMD: any;
|
|
32
|
+
BND: any;
|
|
33
|
+
BOB: any;
|
|
34
|
+
BOV: any;
|
|
35
|
+
BRL: any;
|
|
36
|
+
BSD: any;
|
|
37
|
+
BWP: any;
|
|
38
|
+
BYN: any;
|
|
39
|
+
BZD: any;
|
|
40
|
+
CAD: any;
|
|
41
|
+
CDF: any;
|
|
42
|
+
CHF: any;
|
|
43
|
+
CHW: any;
|
|
44
|
+
CLF: any;
|
|
45
|
+
CLP: any;
|
|
46
|
+
CNY: any;
|
|
47
|
+
COP: any;
|
|
48
|
+
COU: any;
|
|
49
|
+
CRC: any;
|
|
50
|
+
CUC: any;
|
|
51
|
+
CUP: any;
|
|
52
|
+
CVE: any;
|
|
53
|
+
CZK: any;
|
|
54
|
+
DJF: any;
|
|
55
|
+
DKK: any;
|
|
56
|
+
DOP: any;
|
|
57
|
+
DZD: any;
|
|
58
|
+
EGP: any;
|
|
59
|
+
ERN: any;
|
|
60
|
+
ETB: any;
|
|
61
|
+
EUR: any;
|
|
62
|
+
FJD: any;
|
|
63
|
+
FKP: any;
|
|
64
|
+
GBP: any;
|
|
65
|
+
GEL: any;
|
|
66
|
+
GHS: any;
|
|
67
|
+
GIP: any;
|
|
68
|
+
GMD: any;
|
|
69
|
+
GNF: any;
|
|
70
|
+
GTQ: any;
|
|
71
|
+
GYD: any;
|
|
72
|
+
HKD: any;
|
|
73
|
+
HNL: any;
|
|
74
|
+
HRK: any;
|
|
75
|
+
HTG: any;
|
|
76
|
+
HUF: any;
|
|
77
|
+
IDR: any;
|
|
78
|
+
ILS: any;
|
|
79
|
+
INR: any;
|
|
80
|
+
IQD: any;
|
|
81
|
+
IRR: any;
|
|
82
|
+
ISK: any;
|
|
83
|
+
JMD: any;
|
|
84
|
+
JOD: any;
|
|
85
|
+
JPY: any;
|
|
86
|
+
KES: any;
|
|
87
|
+
KGS: any;
|
|
88
|
+
KHR: any;
|
|
89
|
+
KMF: any;
|
|
90
|
+
KPW: any;
|
|
91
|
+
KRW: any;
|
|
92
|
+
KWD: any;
|
|
93
|
+
KYD: any;
|
|
94
|
+
KZT: any;
|
|
95
|
+
LAK: any;
|
|
96
|
+
LBP: any;
|
|
97
|
+
LKR: any;
|
|
98
|
+
LRD: any;
|
|
99
|
+
LSL: any;
|
|
100
|
+
LYD: any;
|
|
101
|
+
MAD: any;
|
|
102
|
+
MDL: any;
|
|
103
|
+
MGA: any;
|
|
104
|
+
MMK: any;
|
|
105
|
+
MNT: any;
|
|
106
|
+
MOP: any;
|
|
107
|
+
MRU: any;
|
|
108
|
+
MUR: any;
|
|
109
|
+
MVR: any;
|
|
110
|
+
MWK: any;
|
|
111
|
+
MXN: any;
|
|
112
|
+
MXV: any;
|
|
113
|
+
MYR: any;
|
|
114
|
+
MZN: any;
|
|
115
|
+
NAD: any;
|
|
116
|
+
NGN: any;
|
|
117
|
+
NIO: any;
|
|
118
|
+
NOK: any;
|
|
119
|
+
NPR: any;
|
|
120
|
+
NZD: any;
|
|
121
|
+
OMR: any;
|
|
122
|
+
PAB: any;
|
|
123
|
+
PEN: any;
|
|
124
|
+
PGK: any;
|
|
125
|
+
PHP: any;
|
|
126
|
+
PKR: any;
|
|
127
|
+
PLN: any;
|
|
128
|
+
PYG: any;
|
|
129
|
+
QAR: any;
|
|
130
|
+
RON: any;
|
|
131
|
+
RSD: any;
|
|
132
|
+
RUB: any;
|
|
133
|
+
RWF: any;
|
|
134
|
+
SAR: any;
|
|
135
|
+
SBD: any;
|
|
136
|
+
SCR: any;
|
|
137
|
+
SDG: any;
|
|
138
|
+
SEK: any;
|
|
139
|
+
SGD: any;
|
|
140
|
+
SHP: any;
|
|
141
|
+
SLL: any;
|
|
142
|
+
SOS: any;
|
|
143
|
+
SRD: any;
|
|
144
|
+
SSP: any;
|
|
145
|
+
STN: any;
|
|
146
|
+
SVC: any;
|
|
147
|
+
SYP: any;
|
|
148
|
+
SZL: any;
|
|
149
|
+
THB: any;
|
|
150
|
+
TJS: any;
|
|
151
|
+
TMT: any;
|
|
152
|
+
TND: any;
|
|
153
|
+
TOP: any;
|
|
154
|
+
TRY: any;
|
|
155
|
+
TTD: any;
|
|
156
|
+
TWD: any;
|
|
157
|
+
TZS: any;
|
|
158
|
+
UAH: any;
|
|
159
|
+
UGX: any;
|
|
160
|
+
USD: any;
|
|
161
|
+
USN: any;
|
|
162
|
+
UYI: any;
|
|
163
|
+
UYU: any;
|
|
164
|
+
UYW: any;
|
|
165
|
+
UZS: any;
|
|
166
|
+
VES: any;
|
|
167
|
+
VND: any;
|
|
168
|
+
VUV: any;
|
|
169
|
+
WST: any;
|
|
170
|
+
XAF: any;
|
|
171
|
+
XAG: any;
|
|
172
|
+
XAU: any;
|
|
173
|
+
XBA: any;
|
|
174
|
+
XBB: any;
|
|
175
|
+
XBC: any;
|
|
176
|
+
XBD: any;
|
|
177
|
+
XCD: any;
|
|
178
|
+
XDR: any;
|
|
179
|
+
XOF: any;
|
|
180
|
+
XPD: any;
|
|
181
|
+
XPF: any;
|
|
182
|
+
XPT: any;
|
|
183
|
+
XSU: any;
|
|
184
|
+
XTS: any;
|
|
185
|
+
XUA: any;
|
|
186
|
+
XXX: any;
|
|
187
|
+
YER: any;
|
|
188
|
+
ZAR: any;
|
|
189
|
+
ZMW: any;
|
|
190
|
+
ZWL: any;
|
|
191
|
+
}>;
|
|
192
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isoly } from "isoly";
|
|
2
|
+
import { isly } from "isly";
|
|
3
|
+
import { Fragment as SnapshotFragment } from "./Fragment";
|
|
4
|
+
import { Warning as SnapshotWarning } from "./Warning";
|
|
5
|
+
export var Snapshot;
|
|
6
|
+
(function (Snapshot) {
|
|
7
|
+
Snapshot.Fragment = SnapshotFragment;
|
|
8
|
+
Snapshot.Warning = SnapshotWarning;
|
|
9
|
+
Snapshot.type = isly.record(isly.fromIs("Currency", isoly.Currency.is), Snapshot.Fragment.type);
|
|
10
|
+
})(Snapshot || (Snapshot = {}));
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/Snapshot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAItD,MAAM,KAAW,QAAQ,CAMxB;AAND,WAAiB,QAAQ;IAEX,iBAAQ,GAAG,gBAAgB,CAAA;IAE3B,gBAAO,GAAG,eAAe,CAAA;IACzB,aAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAA,QAAQ,CAAC,IAAI,CAAC,CAAA;AAC3F,CAAC,EANgB,QAAQ,KAAR,QAAQ,QAMxB"}
|
package/dist/Treasury/index.d.ts
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { Account as TreasuryAccount } from "./Account";
|
|
3
3
|
import { Balance as TreasuryBalance } from "./Balance";
|
|
4
|
-
import {
|
|
4
|
+
import { Snapshot as TreasurySnapshot } from "./Snapshot";
|
|
5
5
|
import { Transaction as TreasuryTransaction } from "./Transaction";
|
|
6
|
-
export { Treasury } from "./Treasury";
|
|
7
6
|
export declare namespace Treasury {
|
|
8
7
|
function key(hour?: isoly.DateTime): isoly.DateTime;
|
|
9
8
|
type Account = TreasuryAccount;
|
|
10
9
|
type Transaction = TreasuryTransaction;
|
|
11
10
|
type Balance = TreasuryBalance;
|
|
12
|
-
type Fiat = TreasuryFiat;
|
|
13
11
|
const Balance: typeof TreasuryBalance;
|
|
12
|
+
type Snapshot = TreasurySnapshot;
|
|
13
|
+
const Snapshot: typeof TreasurySnapshot;
|
|
14
|
+
namespace Snapshot {
|
|
15
|
+
type Fragment = TreasurySnapshot.Fragment;
|
|
16
|
+
type Warning = TreasurySnapshot.Warning;
|
|
17
|
+
}
|
|
14
18
|
namespace Account {
|
|
15
19
|
type Creatable = TreasuryAccount.Creatable;
|
|
16
20
|
const Creatable: typeof import("./Account/Creatable").Creatable;
|
package/dist/Treasury/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { Account as TreasuryAccount } from "./Account";
|
|
3
3
|
import { Balance as TreasuryBalance } from "./Balance";
|
|
4
|
+
import { Snapshot as TreasurySnapshot } from "./Snapshot";
|
|
4
5
|
export var Treasury;
|
|
5
6
|
(function (Treasury) {
|
|
6
7
|
function key(hour) {
|
|
@@ -10,6 +11,7 @@ export var Treasury;
|
|
|
10
11
|
}
|
|
11
12
|
Treasury.key = key;
|
|
12
13
|
Treasury.Balance = TreasuryBalance;
|
|
14
|
+
Treasury.Snapshot = TreasurySnapshot;
|
|
13
15
|
let Account;
|
|
14
16
|
(function (Account) {
|
|
15
17
|
Account.Creatable = TreasuryAccount.Creatable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAGzD,MAAM,KAAW,QAAQ,CAgCxB;AAhCD,WAAiB,QAAQ;IACxB,SAAgB,GAAG,CAAC,IAAqB;QACxC,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAA;QAChC,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;QAC1F,OAAO,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAC7B,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EACxG,OAAO,CACP,CAAA;IACF,CAAC;IAPe,YAAG,MAOlB,CAAA;IAIY,gBAAO,GAAG,eAAe,CAAA;IAEzB,iBAAQ,GAAG,gBAAgB,CAAA;IAKxC,IAAiB,OAAO,CAYvB;IAZD,WAAiB,OAAO;QAEV,iBAAS,GAAG,eAAe,CAAC,SAAS,CAAA;QAErC,gBAAQ,GAAG,eAAe,CAAC,QAAQ,CAAA;QAEnC,iBAAS,GAAG,eAAe,CAAC,SAAS,CAAA;QAErC,kBAAU,GAAG,eAAe,CAAC,UAAU,CAAA;QAEvC,gBAAQ,GAAG,eAAe,CAAC,QAAQ,CAAA;QACnC,UAAE,GAAG,eAAe,CAAC,EAAE,CAAA;IACrC,CAAC,EAZgB,OAAO,GAAP,gBAAO,KAAP,gBAAO,QAYvB;AACF,CAAC,EAhCgB,QAAQ,KAAR,QAAQ,QAgCxB"}
|
package/package.json
CHANGED
package/Treasury/Fiat/index.ts
DELETED
package/Treasury/Treasury.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/Fiat/index.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Treasury.js","sourceRoot":"../","sources":["Treasury/Treasury.ts"],"names":[],"mappings":""}
|