@sogni-ai/sogni-client 3.0.0-alpha.9 → 3.0.1
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/CHANGELOG.md +336 -0
- package/README.md +23 -27
- package/dist/Account/CurrentAccount.d.ts +3 -3
- package/dist/Account/CurrentAccount.js +12 -4
- package/dist/Account/CurrentAccount.js.map +1 -1
- package/dist/Account/index.d.ts +42 -13
- package/dist/Account/index.js +132 -29
- package/dist/Account/index.js.map +1 -1
- package/dist/Account/types.d.ts +21 -0
- package/dist/ApiClient/WebSocketClient/events.d.ts +55 -7
- package/dist/ApiClient/WebSocketClient/index.js +1 -1
- package/dist/ApiClient/index.d.ts +4 -2
- package/dist/ApiClient/index.js +12 -3
- package/dist/ApiClient/index.js.map +1 -1
- package/dist/ApiGroup.d.ts +0 -3
- package/dist/ApiGroup.js +0 -1
- package/dist/ApiGroup.js.map +1 -1
- package/dist/Projects/Job.d.ts +43 -0
- package/dist/Projects/Job.js +76 -0
- package/dist/Projects/Job.js.map +1 -1
- package/dist/Projects/Project.d.ts +1 -1
- package/dist/Projects/Project.js +9 -18
- package/dist/Projects/Project.js.map +1 -1
- package/dist/Projects/createJobRequestMessage.js +1 -1
- package/dist/Projects/createJobRequestMessage.js.map +1 -1
- package/dist/Projects/index.d.ts +7 -2
- package/dist/Projects/index.js +48 -10
- package/dist/Projects/index.js.map +1 -1
- package/dist/Projects/types/ControlNetParams.d.ts +7 -2
- package/dist/Projects/types/events.d.ts +6 -0
- package/dist/Projects/types/index.d.ts +16 -3
- package/dist/Projects/utils.d.ts +2 -0
- package/dist/Projects/utils.js +14 -0
- package/dist/Projects/utils.js.map +1 -0
- package/dist/index.d.ts +10 -6
- package/dist/index.js +6 -15
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.js +15 -0
- package/dist/lib/utils.js.map +1 -1
- package/dist/types/token.d.ts +1 -0
- package/dist/types/token.js +3 -0
- package/dist/types/token.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +2 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/src/Account/CurrentAccount.ts +14 -6
- package/src/Account/index.ts +163 -59
- package/src/Account/types.ts +26 -0
- package/src/ApiClient/WebSocketClient/events.ts +59 -7
- package/src/ApiClient/WebSocketClient/index.ts +1 -1
- package/src/ApiClient/index.ts +15 -4
- package/src/ApiGroup.ts +0 -4
- package/src/Projects/Job.ts +98 -0
- package/src/Projects/Project.ts +11 -19
- package/src/Projects/createJobRequestMessage.ts +2 -1
- package/src/Projects/index.ts +53 -13
- package/src/Projects/types/ControlNetParams.ts +8 -2
- package/src/Projects/types/events.ts +6 -0
- package/src/Projects/types/index.ts +17 -3
- package/src/Projects/utils.ts +12 -0
- package/src/Stats/index.ts +2 -2
- package/src/index.ts +23 -19
- package/src/lib/utils.ts +4 -0
- package/src/types/token.ts +1 -0
- package/src/version.ts +2 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ControlNet model names
|
|
3
3
|
* @inline
|
|
4
4
|
*/
|
|
5
|
-
export type ControlNetName = 'canny' | 'depth' | 'inpaint' | 'instrp2p' | 'lineart' | 'lineartanime' | 'mlsd' | 'normalbae' | 'openpose' | 'scribble' | 'segmentation' | 'shuffle' | 'softedge' | 'tile';
|
|
5
|
+
export type ControlNetName = 'canny' | 'depth' | 'inpaint' | 'instrp2p' | 'lineart' | 'lineartanime' | 'mlsd' | 'normalbae' | 'openpose' | 'scribble' | 'segmentation' | 'shuffle' | 'softedge' | 'tile' | 'instantid';
|
|
6
6
|
/**
|
|
7
7
|
* Raw ControlNet parameters passed to the API
|
|
8
8
|
*/
|
|
@@ -36,8 +36,13 @@ export interface ControlNetParams {
|
|
|
36
36
|
name: ControlNetName;
|
|
37
37
|
/**
|
|
38
38
|
* ControlNet input image
|
|
39
|
+
* Supported types:
|
|
40
|
+
* `File` - file object from input[type=file]
|
|
41
|
+
* `Buffer` - Node.js buffer object with image data
|
|
42
|
+
* `Blob` - blob object with image data
|
|
43
|
+
* `true` - indicates that the image is already uploaded to the server
|
|
39
44
|
*/
|
|
40
|
-
image?: File | Buffer | Blob;
|
|
45
|
+
image?: File | Buffer | Blob | boolean;
|
|
41
46
|
/**
|
|
42
47
|
* ControlNet strength 0 to 1. 0 full control to prompt, 1 full control to ControlNet
|
|
43
48
|
*/
|
|
@@ -22,10 +22,16 @@ export interface JobEventBase {
|
|
|
22
22
|
export interface JobInitiating extends JobEventBase {
|
|
23
23
|
type: 'initiating';
|
|
24
24
|
workerName: string;
|
|
25
|
+
positivePrompt?: string;
|
|
26
|
+
negativePrompt?: string;
|
|
27
|
+
jobIndex?: number;
|
|
25
28
|
}
|
|
26
29
|
export interface JobStarted extends JobEventBase {
|
|
27
30
|
type: 'started';
|
|
28
31
|
workerName: string;
|
|
32
|
+
positivePrompt?: string;
|
|
33
|
+
negativePrompt?: string;
|
|
34
|
+
jobIndex?: number;
|
|
29
35
|
}
|
|
30
36
|
export interface JobProgress extends JobEventBase {
|
|
31
37
|
type: 'progress';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SupernetType } from '../../ApiClient/WebSocketClient/types';
|
|
2
2
|
import { ControlNetParams } from './ControlNetParams';
|
|
3
|
+
import { TokenType } from '../../types/token';
|
|
3
4
|
export interface SupportedModel {
|
|
4
5
|
id: string;
|
|
5
6
|
name: string;
|
|
@@ -90,12 +91,14 @@ export interface ProjectParams {
|
|
|
90
91
|
*/
|
|
91
92
|
numberOfImages: number;
|
|
92
93
|
/**
|
|
93
|
-
* Generate images based on starting image.
|
|
94
|
+
* Generate images based on the starting image.
|
|
95
|
+
* Supported types:
|
|
94
96
|
* `File` - file object from input[type=file]
|
|
95
|
-
* `Buffer` - buffer object with image data
|
|
97
|
+
* `Buffer` - Node.js buffer object with image data
|
|
96
98
|
* `Blob` - blob object with image data
|
|
99
|
+
* `true` - indicates that the image is already uploaded to the server
|
|
97
100
|
*/
|
|
98
|
-
startingImage?: File | Buffer | Blob;
|
|
101
|
+
startingImage?: File | Buffer | Blob | boolean;
|
|
99
102
|
/**
|
|
100
103
|
* How strong effect of starting image should be. From 0 to 1, default 0.5
|
|
101
104
|
*/
|
|
@@ -129,6 +132,11 @@ export interface ProjectParams {
|
|
|
129
132
|
* ControlNet model parameters
|
|
130
133
|
*/
|
|
131
134
|
controlNet?: ControlNetParams;
|
|
135
|
+
/**
|
|
136
|
+
* Select which tokens to use for the project.
|
|
137
|
+
* If not specified, the Sogni token will be used.
|
|
138
|
+
*/
|
|
139
|
+
tokenType?: TokenType;
|
|
132
140
|
}
|
|
133
141
|
export type ImageUrlParams = {
|
|
134
142
|
imageId: string;
|
|
@@ -141,6 +149,10 @@ export interface EstimateRequest {
|
|
|
141
149
|
* Network to use. Can be 'fast' or 'relaxed'
|
|
142
150
|
*/
|
|
143
151
|
network: SupernetType;
|
|
152
|
+
/**
|
|
153
|
+
* Token type
|
|
154
|
+
*/
|
|
155
|
+
tokenType?: TokenType;
|
|
144
156
|
/**
|
|
145
157
|
* Model ID
|
|
146
158
|
*/
|
|
@@ -180,3 +192,4 @@ export interface EstimateRequest {
|
|
|
180
192
|
*/
|
|
181
193
|
height?: number;
|
|
182
194
|
}
|
|
195
|
+
export type EnhancementStrength = 'light' | 'medium' | 'heavy';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEnhacementStrength = getEnhacementStrength;
|
|
4
|
+
function getEnhacementStrength(strength) {
|
|
5
|
+
switch (strength) {
|
|
6
|
+
case 'light':
|
|
7
|
+
return 0.15;
|
|
8
|
+
case 'heavy':
|
|
9
|
+
return 0.49;
|
|
10
|
+
default:
|
|
11
|
+
return 0.35;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/Projects/utils.ts"],"names":[],"mappings":";;AAEA,sDASC;AATD,SAAgB,qBAAqB,CAAC,QAA6B;IACjE,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,IAAI,CAAC;QACd,KAAK,OAAO;YACV,OAAO,IAAI,CAAC;QACd;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ import Project, { ProjectStatus } from './Projects/Project';
|
|
|
9
9
|
import { AvailableModel, ProjectParams, Scheduler, TimeStepSpacing } from './Projects/types';
|
|
10
10
|
import StatsApi from './Stats';
|
|
11
11
|
import ErrorData from './types/ErrorData';
|
|
12
|
-
|
|
12
|
+
import { TokenType } from './types/token';
|
|
13
|
+
export type { AvailableModel, ErrorData, JobStatus, Logger, LogLevel, ProjectParams, ProjectStatus, Scheduler, SupernetType, TimeStepSpacing, TokenType };
|
|
13
14
|
export { ApiError, CurrentAccount, Job, Project };
|
|
14
15
|
export interface SogniClientConfig {
|
|
15
16
|
/**
|
|
@@ -26,6 +27,13 @@ export interface SogniClientConfig {
|
|
|
26
27
|
* @internal
|
|
27
28
|
*/
|
|
28
29
|
socketEndpoint?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Disable WebSocket connection. Useful for testing or when WebSocket is not needed.
|
|
32
|
+
* Note that many may not work without WebSocket connection.
|
|
33
|
+
* @experimental
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
disableSocket?: boolean;
|
|
29
37
|
/**
|
|
30
38
|
* Which network to use after logging in. Can be 'fast' or 'relaxed'
|
|
31
39
|
*/
|
|
@@ -39,10 +47,6 @@ export interface SogniClientConfig {
|
|
|
39
47
|
* @default 'warn'
|
|
40
48
|
**/
|
|
41
49
|
logLevel?: LogLevel;
|
|
42
|
-
/**
|
|
43
|
-
* If provided, the client will connect to this JSON-RPC endpoint to interact with the blockchain
|
|
44
|
-
*/
|
|
45
|
-
jsonRpcUrl?: string;
|
|
46
50
|
/**
|
|
47
51
|
* If true, the client will connect to the testnet. Ignored if jsonRpcUrl is provided
|
|
48
52
|
*/
|
|
@@ -56,7 +60,7 @@ export declare class SogniClient {
|
|
|
56
60
|
private constructor();
|
|
57
61
|
get currentAccount(): CurrentAccount;
|
|
58
62
|
/**
|
|
59
|
-
*
|
|
63
|
+
* Create client instance, with default configuration
|
|
60
64
|
* @param config
|
|
61
65
|
*/
|
|
62
66
|
static createInstance(config: SogniClientConfig): Promise<SogniClient>;
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.SogniClient = exports.Project = exports.Job = exports.CurrentAccount = exports.ApiError = void 0;
|
|
39
|
-
const ethers_1 = require("ethers");
|
|
40
39
|
// Account API
|
|
41
40
|
const Account_1 = __importDefault(require("./Account"));
|
|
42
41
|
const CurrentAccount_1 = __importDefault(require("./Account/CurrentAccount"));
|
|
@@ -66,7 +65,7 @@ class SogniClient {
|
|
|
66
65
|
return this.account.currentAccount;
|
|
67
66
|
}
|
|
68
67
|
/**
|
|
69
|
-
*
|
|
68
|
+
* Create client instance, with default configuration
|
|
70
69
|
* @param config
|
|
71
70
|
*/
|
|
72
71
|
static createInstance(config) {
|
|
@@ -75,22 +74,14 @@ class SogniClient {
|
|
|
75
74
|
const socketEndpoint = config.socketEndpoint || 'wss://socket.sogni.ai';
|
|
76
75
|
const network = config.network || 'fast';
|
|
77
76
|
const logger = config.logger || new DefaultLogger_1.DefaultLogger(config.logLevel || 'warn');
|
|
78
|
-
const isTestnet = config.testnet !== undefined ? config.testnet :
|
|
79
|
-
const client = new ApiClient_1.default(restEndpoint, socketEndpoint, config.appId, network, logger);
|
|
80
|
-
let provider;
|
|
81
|
-
if ('jsonRpcUrl' in config) {
|
|
82
|
-
provider = new ethers_1.JsonRpcProvider(config.jsonRpcUrl);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
provider = (0, ethers_1.getDefaultProvider)(isTestnet ? 84532 : 8453);
|
|
86
|
-
}
|
|
87
|
-
const chainId = yield provider.getNetwork().then((network) => network.chainId);
|
|
77
|
+
const isTestnet = config.testnet !== undefined ? config.testnet : false;
|
|
78
|
+
const client = new ApiClient_1.default(restEndpoint, socketEndpoint, config.appId, network, logger, config.disableSocket);
|
|
88
79
|
const eip712 = new EIP712Helper_1.default({
|
|
89
|
-
name: 'Sogni-testnet',
|
|
80
|
+
name: isTestnet ? 'Sogni-testnet' : 'Sogni AI',
|
|
90
81
|
version: '1',
|
|
91
|
-
chainId:
|
|
82
|
+
chainId: isTestnet ? '84532' : '8453'
|
|
92
83
|
});
|
|
93
|
-
return new SogniClient({ client,
|
|
84
|
+
return new SogniClient({ client, eip712 });
|
|
94
85
|
});
|
|
95
86
|
}
|
|
96
87
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,wDAAmC;AACnC,8EAAsD;AAiCnC,yBAjCZ,wBAAc,CAiCY;AAhCjC,YAAY;AACZ,yDAAkD;AA+BzC,yFA/BW,oBAAQ,OA+BX;AA5BjB,QAAQ;AACR,uDAAsE;AACtE,sEAA8C;AAC9C,eAAe;AACf,0DAAqC;AACrC,yDAAgD;AAuBb,cAvB5B,aAAG,CAuB4B;AAtBtC,iEAA4D;AAsBpB,kBAtBjC,iBAAO,CAsBiC;AApB/C,YAAY;AACZ,oDAA+B;AA8D/B,MAAa,WAAW;IAOtB,YAAoB,MAAiB;QACnC,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAU,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,IAAI,kBAAW,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,eAAQ,CAAC,MAAM,CAAC,CAAC;QAElC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;IACrC,CAAC;IAED;;;OAGG;IACH,MAAM,CAAO,cAAc,CAAC,MAAyB;;YACnD,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,sBAAsB,CAAC;YACnE,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,IAAI,uBAAuB,CAAC;YACxE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC;YACzC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,IAAI,6BAAa,CAAC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,CAAC;YAC7E,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;YAExE,MAAM,MAAM,GAAG,IAAI,mBAAS,CAC1B,YAAY,EACZ,cAAc,EACd,MAAM,CAAC,KAAK,EACZ,OAAO,EACP,MAAM,EACN,MAAM,CAAC,aAAa,CACrB,CAAC;YACF,MAAM,MAAM,GAAG,IAAI,sBAAY,CAAC;gBAC9B,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,UAAU;gBAC9C,OAAO,EAAE,GAAG;gBACZ,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;aACtC,CAAC,CAAC;YACH,OAAO,IAAI,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAC7C,CAAC;KAAA;CACF;AA7CD,kCA6CC"}
|
package/dist/lib/utils.d.ts
CHANGED
package/dist/lib/utils.js
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.decodeToken = decodeToken;
|
|
4
13
|
exports.decodeRefreshToken = decodeRefreshToken;
|
|
14
|
+
exports.delay = delay;
|
|
5
15
|
const jwt_decode_1 = require("jwt-decode");
|
|
6
16
|
function decodeToken(token) {
|
|
7
17
|
const data = (0, jwt_decode_1.jwtDecode)(token);
|
|
@@ -17,4 +27,9 @@ function decodeRefreshToken(token) {
|
|
|
17
27
|
expiresAt: new Date(data.exp * 1000)
|
|
18
28
|
};
|
|
19
29
|
}
|
|
30
|
+
function delay(ms) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
20
35
|
//# sourceMappingURL=utils.js.map
|
package/dist/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,kCAMC;AAED,gDAMC;AAED,sBAEC;AApBD,2CAAuC;AAEvC,SAAgB,WAAW,CAAC,KAAa;IACvC,MAAM,IAAI,GAAG,IAAA,sBAAS,EAA0D,KAAK,CAAC,CAAC;IACvF,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,IAAI;QACxB,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;KACrC,CAAC;AACJ,CAAC;AAED,SAAgB,kBAAkB,CAAC,KAAa;IAC9C,MAAM,IAAI,GAAG,IAAA,sBAAS,EAA0D,KAAK,CAAC,CAAC;IACvF,OAAO;QACL,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;KACrC,CAAC;AACJ,CAAC;AAED,SAAsB,KAAK,CAAC,EAAU;;QACpC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC;CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TokenType = 'sogni' | 'spark';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.js","sourceRoot":"","sources":["../../src/types/token.ts"],"names":[],"mappings":""}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION
|
|
1
|
+
export declare const LIB_VERSION: string;
|
package/dist/version.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LIB_VERSION = void 0;
|
|
4
|
-
|
|
4
|
+
const package_json_1 = require("../package.json");
|
|
5
|
+
exports.LIB_VERSION = package_json_1.version;
|
|
5
6
|
//# sourceMappingURL=version.js.map
|
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,kDAA0C;AAC7B,QAAA,WAAW,GAAG,sBAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import DataEntity from '../lib/DataEntity';
|
|
2
|
-
import {
|
|
2
|
+
import { Balances } from './types';
|
|
3
3
|
import { SupernetType } from '../ApiClient/WebSocketClient/types';
|
|
4
4
|
/**
|
|
5
5
|
* @inline
|
|
@@ -16,7 +16,7 @@ export interface AccountData {
|
|
|
16
16
|
*/
|
|
17
17
|
networkStatus: 'connected' | 'disconnected' | 'connecting' | 'switching';
|
|
18
18
|
network: SupernetType | null;
|
|
19
|
-
balance:
|
|
19
|
+
balance: Balances;
|
|
20
20
|
walletAddress?: string;
|
|
21
21
|
username?: string;
|
|
22
22
|
token?: string;
|
|
@@ -28,10 +28,18 @@ function getDefaults(): AccountData {
|
|
|
28
28
|
networkStatus: 'disconnected',
|
|
29
29
|
network: null,
|
|
30
30
|
balance: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
sogni: {
|
|
32
|
+
credit: '0',
|
|
33
|
+
debit: '0',
|
|
34
|
+
net: '0',
|
|
35
|
+
settled: '0'
|
|
36
|
+
},
|
|
37
|
+
spark: {
|
|
38
|
+
credit: '0',
|
|
39
|
+
debit: '0',
|
|
40
|
+
net: '0',
|
|
41
|
+
settled: '0'
|
|
42
|
+
}
|
|
35
43
|
},
|
|
36
44
|
walletAddress: undefined,
|
|
37
45
|
username: undefined,
|