@pax2pay/model-banking 0.0.47 → 0.1.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/Balances/index.ts +2 -1
- package/Balances/type.ts +2 -1
- package/Treasury/Account/Creatable.ts +1 -2
- package/Treasury/Account/index.ts +1 -1
- package/Treasury/Treasury.ts +1 -1
- package/Treasury/index.ts +1 -2
- package/dist/Balances/index.d.ts +1 -0
- package/dist/Balances/index.js +2 -1
- package/dist/Balances/index.js.map +1 -1
- package/dist/Balances/type.d.ts +2 -1
- package/dist/Balances/type.js +1 -0
- package/dist/Balances/type.js.map +1 -1
- package/dist/Treasury/Account/Creatable.d.ts +1 -5
- package/dist/Treasury/Account/Creatable.js.map +1 -1
- package/dist/Treasury/Account/index.d.ts +1 -1
- package/dist/Treasury/Treasury.d.ts +2 -2
- package/dist/Treasury/index.d.ts +1 -2
- package/dist/Treasury/index.js.map +1 -1
- package/package.json +1 -1
package/Balances/index.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as isoly from "isoly"
|
|
2
|
-
import { BalanceEntry } from "./type"
|
|
2
|
+
import { BalanceEntries, BalanceEntry } from "./type"
|
|
3
3
|
|
|
4
4
|
export type Balances = Partial<Record<isoly.Currency, Partial<Record<BalanceEntry, number>>>>
|
|
5
5
|
|
|
6
6
|
export namespace Balances {
|
|
7
|
+
export const entries: BalanceEntry[] = [...BalanceEntries]
|
|
7
8
|
export function is(value: Balances | any): value is Balances {
|
|
8
9
|
return (
|
|
9
10
|
typeof value == "object" &&
|
package/Balances/type.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const BalanceEntries = ["actual", "incomingReserved", "outgoingReserved"] as const
|
|
2
|
+
export type BalanceEntry = typeof BalanceEntries[number]
|
|
2
3
|
|
|
3
4
|
export namespace BalanceEntry {
|
|
4
5
|
export function is(value: any | BalanceEntry): value is BalanceEntry {
|
|
@@ -3,11 +3,10 @@ import { Realm } from "../../Realm"
|
|
|
3
3
|
import { Supplier } from "../../Supplier"
|
|
4
4
|
|
|
5
5
|
export interface Creatable {
|
|
6
|
-
meta?: { realm: Realm; supplier: Supplier }
|
|
7
6
|
name: string
|
|
8
7
|
realm: Realm
|
|
9
|
-
currencies: isoly.Currency[]
|
|
10
8
|
supplier: Supplier
|
|
9
|
+
currencies: isoly.Currency[]
|
|
11
10
|
type: "safeguarded" | "other"
|
|
12
11
|
}
|
|
13
12
|
|
package/Treasury/Treasury.ts
CHANGED
|
@@ -2,4 +2,4 @@ import * as isoly from "isoly"
|
|
|
2
2
|
import { Balances } from "../Balances"
|
|
3
3
|
import { Fiat } from "./Fiat"
|
|
4
4
|
|
|
5
|
-
export type Treasury = Record<isoly.Currency, { eMoney: Balances; fiat: Fiat }
|
|
5
|
+
export type Treasury = Partial<Record<isoly.Currency, { eMoney: Balances; fiat: Fiat }>>
|
package/Treasury/index.ts
CHANGED
|
@@ -2,13 +2,12 @@ import { Account as TreasuryAccount } from "./Account"
|
|
|
2
2
|
import { Balance as TreasuryBalance } from "./Balance"
|
|
3
3
|
import { Client as TreasuryClient } from "./Client"
|
|
4
4
|
import { Fiat as TreasuryFiat } from "./Fiat"
|
|
5
|
-
|
|
5
|
+
export { Treasury } from "./Treasury"
|
|
6
6
|
|
|
7
7
|
export namespace Treasury {
|
|
8
8
|
export type Account = TreasuryAccount
|
|
9
9
|
export type Balance = TreasuryBalance
|
|
10
10
|
export type Fiat = TreasuryFiat
|
|
11
|
-
export type Treasury = TreasuryType
|
|
12
11
|
export type Client = TreasuryClient
|
|
13
12
|
export const Account = TreasuryAccount
|
|
14
13
|
export const Balance = TreasuryBalance
|
package/dist/Balances/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as isoly from "isoly";
|
|
|
2
2
|
import { BalanceEntry } from "./type";
|
|
3
3
|
export type Balances = Partial<Record<isoly.Currency, Partial<Record<BalanceEntry, number>>>>;
|
|
4
4
|
export declare namespace Balances {
|
|
5
|
+
const entries: BalanceEntry[];
|
|
5
6
|
function is(value: Balances | any): value is Balances;
|
|
6
7
|
type Entry = BalanceEntry;
|
|
7
8
|
const Entry: typeof BalanceEntry;
|
package/dist/Balances/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as isoly from "isoly";
|
|
2
|
-
import { BalanceEntry } from "./type";
|
|
2
|
+
import { BalanceEntries, BalanceEntry } from "./type";
|
|
3
3
|
export var Balances;
|
|
4
4
|
(function (Balances) {
|
|
5
|
+
Balances.entries = [...BalanceEntries];
|
|
5
6
|
function is(value) {
|
|
6
7
|
return (typeof value == "object" &&
|
|
7
8
|
Object.entries(value).every(([k, v]) => isoly.Currency.is(k) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Balances/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Balances/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAIrD,MAAM,KAAW,QAAQ,CAiBxB;AAjBD,WAAiB,QAAQ;IACX,gBAAO,GAAmB,CAAC,GAAG,cAAc,CAAC,CAAA;IAC1D,SAAgB,EAAE,CAAC,KAAqB;QACvC,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;YACxB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAC1B,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CACV,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;gBACpB,OAAO,CAAC,IAAI,QAAQ;gBACpB,MAAM,CAAC,OAAO,CAAC,CAA4B,CAAC,CAAC,KAAK,CACjD,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,OAAO,MAAM,IAAI,QAAQ,CAC1E,CACF,CACD,CAAA;IACF,CAAC;IAZe,WAAE,KAYjB,CAAA;IAEY,cAAK,GAAG,YAAY,CAAA;AAClC,CAAC,EAjBgB,QAAQ,KAAR,QAAQ,QAiBxB"}
|
package/dist/Balances/type.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const BalanceEntries: readonly ["actual", "incomingReserved", "outgoingReserved"];
|
|
2
|
+
export type BalanceEntry = typeof BalanceEntries[number];
|
|
2
3
|
export declare namespace BalanceEntry {
|
|
3
4
|
function is(value: any | BalanceEntry): value is BalanceEntry;
|
|
4
5
|
}
|
package/dist/Balances/type.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"../","sources":["Balances/type.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"../","sources":["Balances/type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,kBAAkB,EAAE,kBAAkB,CAAU,CAAA;AAGzF,MAAM,KAAW,YAAY,CAI5B;AAJD,WAAiB,YAAY;IAC5B,SAAgB,EAAE,CAAC,KAAyB;QAC3C,OAAO,OAAO,KAAK,IAAI,QAAQ,IAAI,CAAC,KAAK,IAAI,QAAQ,IAAI,KAAK,IAAI,kBAAkB,IAAI,KAAK,IAAI,kBAAkB,CAAC,CAAA;IACrH,CAAC;IAFe,eAAE,KAEjB,CAAA;AACF,CAAC,EAJgB,YAAY,KAAZ,YAAY,QAI5B"}
|
|
@@ -2,14 +2,10 @@ import * as isoly from "isoly";
|
|
|
2
2
|
import { Realm } from "../../Realm";
|
|
3
3
|
import { Supplier } from "../../Supplier";
|
|
4
4
|
export interface Creatable {
|
|
5
|
-
meta?: {
|
|
6
|
-
realm: Realm;
|
|
7
|
-
supplier: Supplier;
|
|
8
|
-
};
|
|
9
5
|
name: string;
|
|
10
6
|
realm: Realm;
|
|
11
|
-
currencies: isoly.Currency[];
|
|
12
7
|
supplier: Supplier;
|
|
8
|
+
currencies: isoly.Currency[];
|
|
13
9
|
type: "safeguarded" | "other";
|
|
14
10
|
}
|
|
15
11
|
export declare namespace Creatable {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Creatable.js","sourceRoot":"../","sources":["Treasury/Account/Creatable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"Creatable.js","sourceRoot":"../","sources":["Treasury/Account/Creatable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAUzC,MAAM,KAAW,SAAS,CAazB;AAbD,WAAiB,SAAS;IACzB,SAAgB,EAAE,CAAC,KAAsB;QACxC,OAAO,CACN,KAAK;YACL,OAAO,KAAK,IAAI,QAAQ;YACxB,OAAO,KAAK,CAAC,IAAI,IAAI,QAAQ;YAC7B,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;YACrB,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC;YAC/B,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC;YAC3B,CAAC,KAAK,CAAC,IAAI,IAAI,aAAa,IAAI,KAAK,CAAC,IAAI,IAAI,OAAO,CAAC,CACtD,CAAA;IACF,CAAC;IAXe,YAAE,KAWjB,CAAA;AACF,CAAC,EAbgB,SAAS,KAAT,SAAS,QAazB"}
|
package/dist/Treasury/index.d.ts
CHANGED
|
@@ -2,12 +2,11 @@ import { Account as TreasuryAccount } from "./Account";
|
|
|
2
2
|
import { Balance as TreasuryBalance } from "./Balance";
|
|
3
3
|
import { Client as TreasuryClient } from "./Client";
|
|
4
4
|
import { Fiat as TreasuryFiat } from "./Fiat";
|
|
5
|
-
|
|
5
|
+
export { Treasury } from "./Treasury";
|
|
6
6
|
export declare namespace Treasury {
|
|
7
7
|
type Account = TreasuryAccount;
|
|
8
8
|
type Balance = TreasuryBalance;
|
|
9
9
|
type Fiat = TreasuryFiat;
|
|
10
|
-
type Treasury = TreasuryType;
|
|
11
10
|
type Client = TreasuryClient;
|
|
12
11
|
const Account: typeof TreasuryAccount;
|
|
13
12
|
const Balance: typeof TreasuryBalance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAA;AAInD,MAAM,KAAW,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAA;AAInD,MAAM,KAAW,QAAQ,CAQxB;AARD,WAAiB,QAAQ;IAKX,gBAAO,GAAG,eAAe,CAAA;IACzB,gBAAO,GAAG,eAAe,CAAA;IACzB,eAAM,GAAG,cAAc,CAAA;AACrC,CAAC,EARgB,QAAQ,KAAR,QAAQ,QAQxB"}
|