@plutonlabs/sdk 0.0.9-beta → 0.0.11-beta

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.
@@ -2,4 +2,5 @@ export * from './chain_contract.dto';
2
2
  export * from './chain_transaction.dto';
3
3
  export * from './chain_transaction_event_log.dto';
4
4
  export * from './pluton_request.dto';
5
+ export * from './pluton_middleware_request.dto';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/chainsync/domain/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/chainsync/domain/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC"}
@@ -18,4 +18,5 @@ __exportStar(require("./chain_contract.dto"), exports);
18
18
  __exportStar(require("./chain_transaction.dto"), exports);
19
19
  __exportStar(require("./chain_transaction_event_log.dto"), exports);
20
20
  __exportStar(require("./pluton_request.dto"), exports);
21
+ __exportStar(require("./pluton_middleware_request.dto"), exports);
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/chainsync/domain/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,0DAAwC;AACxC,oEAAkD;AAClD,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/chainsync/domain/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,0DAAwC;AACxC,oEAAkD;AAClD,uDAAqC;AACrC,kEAAgD"}
@@ -0,0 +1,9 @@
1
+ import BigNumber from 'bignumber.js';
2
+ export declare class PlutonMiddlewareRequestDto {
3
+ id: string;
4
+ user: string;
5
+ initiationExpiry: BigNumber;
6
+ orderDataType: string;
7
+ orderData: string;
8
+ }
9
+ //# sourceMappingURL=pluton_middleware_request.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pluton_middleware_request.dto.d.ts","sourceRoot":"","sources":["../../../../../src/modules/chainsync/domain/dto/pluton_middleware_request.dto.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AAIrC,qBAAa,0BAA0B;IAGrC,EAAE,EAAE,MAAM,CAAC;IAIX,IAAI,EAAE,MAAM,CAAC;IAKb,gBAAgB,EAAE,SAAS,CAAC;IAK5B,aAAa,EAAE,MAAM,CAAC;IAItB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.PlutonMiddlewareRequestDto = void 0;
16
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
+ const class_transformer_1 = require("class-transformer");
18
+ const class_validator_1 = require("class-validator");
19
+ class PlutonMiddlewareRequestDto {
20
+ }
21
+ exports.PlutonMiddlewareRequestDto = PlutonMiddlewareRequestDto;
22
+ __decorate([
23
+ (0, class_validator_1.IsUUID)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ __metadata("design:type", String)
26
+ ], PlutonMiddlewareRequestDto.prototype, "id", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.IsNotEmpty)(),
30
+ __metadata("design:type", String)
31
+ ], PlutonMiddlewareRequestDto.prototype, "user", void 0);
32
+ __decorate([
33
+ (0, class_transformer_1.Transform)(({ value }) => value.toString()),
34
+ (0, class_validator_1.IsString)(),
35
+ (0, class_validator_1.IsNotEmpty)(),
36
+ __metadata("design:type", bignumber_js_1.default)
37
+ ], PlutonMiddlewareRequestDto.prototype, "initiationExpiry", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsString)(),
40
+ (0, class_validator_1.MaxLength)(64),
41
+ (0, class_validator_1.IsNotEmpty)(),
42
+ __metadata("design:type", String)
43
+ ], PlutonMiddlewareRequestDto.prototype, "orderDataType", void 0);
44
+ __decorate([
45
+ (0, class_validator_1.IsString)(),
46
+ (0, class_validator_1.IsNotEmpty)(),
47
+ __metadata("design:type", String)
48
+ ], PlutonMiddlewareRequestDto.prototype, "orderData", void 0);
49
+ //# sourceMappingURL=pluton_middleware_request.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pluton_middleware_request.dto.js","sourceRoot":"","sources":["../../../../../src/modules/chainsync/domain/dto/pluton_middleware_request.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,yDAA8C;AAC9C,qDAA0E;AAE1E,MAAa,0BAA0B;CAsBtC;AAtBD,gEAsBC;AAnBC;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;sDACF;AAIX;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACA;AAKb;IAHC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC1C,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;8BACK,sBAAS;oEAAC;AAK5B;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,EAAE,CAAC;IACb,IAAA,4BAAU,GAAE;;iEACS;AAItB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACK"}
@@ -2,4 +2,5 @@ export * from './network.dto';
2
2
  export * from './network.update.dto';
3
3
  export * from './network_provider.dto';
4
4
  export * from './network_provider.update.dto';
5
+ export * from './network_tokens_view.dto';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/network/domain/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/network/domain/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAA"}
@@ -18,4 +18,5 @@ __exportStar(require("./network.dto"), exports);
18
18
  __exportStar(require("./network.update.dto"), exports);
19
19
  __exportStar(require("./network_provider.dto"), exports);
20
20
  __exportStar(require("./network_provider.update.dto"), exports);
21
+ __exportStar(require("./network_tokens_view.dto"), exports);
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/network/domain/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,uDAAqC;AACrC,yDAAuC;AACvC,gEAA8C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/network/domain/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,uDAAqC;AACrC,yDAAuC;AACvC,gEAA8C;AAC9C,4DAAyC"}
@@ -0,0 +1,46 @@
1
+ export declare class NetworkTokensViewDto {
2
+ static from<T extends {
3
+ name: string;
4
+ image: string;
5
+ coinType: number;
6
+ chainId: number;
7
+ version: number;
8
+ tokens: any;
9
+ }>(obj: T): NetworkTokensViewDto;
10
+ static listFrom<T extends {
11
+ name: string;
12
+ image: string;
13
+ coinType: number;
14
+ chainId: number;
15
+ version: number;
16
+ tokens: any;
17
+ }>(objs: T[]): NetworkTokensViewDto[];
18
+ name: string;
19
+ image: string;
20
+ coinType: number;
21
+ chainId: number;
22
+ version: number;
23
+ tokens: TokenView[];
24
+ }
25
+ export declare class TokenView {
26
+ static from<T extends {
27
+ name: string;
28
+ image: string;
29
+ symbol: string;
30
+ contract?: string;
31
+ decimals: number;
32
+ }>(obj: T): TokenView;
33
+ static listFrom<T extends {
34
+ name: string;
35
+ image: string;
36
+ symbol: string;
37
+ contract?: string;
38
+ decimals: number;
39
+ }>(objs: T[]): TokenView[];
40
+ name: string;
41
+ image: string;
42
+ symbol: string;
43
+ contract?: string;
44
+ decimals: number;
45
+ }
46
+ //# sourceMappingURL=network_tokens_view.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network_tokens_view.dto.d.ts","sourceRoot":"","sources":["../../../../../src/modules/network/domain/dto/network_tokens_view.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,oBAAoB;WACjB,IAAI,CAChB,CAAC,SAAS;QACR,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,E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M,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TokenView = exports.NetworkTokensViewDto = void 0;
4
+ const list_1 = require("../../../../common/utils/list");
5
+ class NetworkTokensViewDto {
6
+ static from(obj) {
7
+ const dto = new NetworkTokensViewDto();
8
+ dto.name = obj.name;
9
+ dto.image = obj.image;
10
+ dto.coinType = obj.coinType;
11
+ dto.chainId = obj.chainId;
12
+ dto.version = obj.version;
13
+ dto.tokens = dto.tokens;
14
+ return dto;
15
+ }
16
+ static listFrom(objs) {
17
+ return (0, list_1.makeList)(objs, NetworkTokensViewDto.from);
18
+ }
19
+ }
20
+ exports.NetworkTokensViewDto = NetworkTokensViewDto;
21
+ class TokenView {
22
+ static from(obj) {
23
+ const dto = new TokenView();
24
+ dto.name = obj.name;
25
+ dto.image = obj.image;
26
+ dto.symbol = obj.symbol;
27
+ if (dto.contract && dto.contract.length > 0) {
28
+ dto.contract = obj.contract;
29
+ }
30
+ dto.decimals = obj.decimals;
31
+ return dto;
32
+ }
33
+ static listFrom(objs) {
34
+ return (0, list_1.makeList)(objs, TokenView.from);
35
+ }
36
+ }
37
+ exports.TokenView = TokenView;
38
+ //# sourceMappingURL=network_tokens_view.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network_tokens_view.dto.js","sourceRoot":"","sources":["../../../../../src/modules/network/domain/dto/network_tokens_view.dto.ts"],"names":[],"mappings":";;;AAAA,wDAAyD;AAEzD,MAAa,oBAAoB;IACxB,MAAM,CAAC,IAAI,CAShB,GAAM;QACN,MAAM,GAAG,GAAG,IAAI,oBAAoB,EAAE,CAAC;QACvC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QACpB,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QACtB,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC5B,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;QAC1B,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;QAC1B,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,MAAqB,CAAC;QACvC,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,CAAC,QAAQ,CASb,IAAS;QACT,OAAO,IAAA,eAAQ,EAAC,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;CAaF;AA7CD,oDA6CC;AAED,MAAa,SAAS;IACb,MAAM,CAAC,IAAI,CAQhB,GAAM;QACN,MAAM,GAAG,GAAG,IAAI,SAAS,EAAE,CAAC;QAC5B,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QACpB,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QACtB,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QACxB,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5C,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC9B,CAAC;QACD,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC5B,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,CAAC,QAAQ,CAQb,IAAS;QACT,OAAO,IAAA,eAAQ,EAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;CAOF;AAtCD,8BAsCC"}
package/package.json CHANGED
@@ -1,25 +1,25 @@
1
- {
2
- "name": "@plutonlabs/sdk",
3
- "version": "0.0.9-beta",
4
- "main": "dist/index.js",
5
- "types": "dist/index.d.ts",
6
- "files": [
7
- "dist"
8
- ],
9
- "scripts": {
10
- "build": "tsc"
11
- },
12
- "keywords": [],
13
- "author": "",
14
- "license": "ISC",
15
- "description": "",
16
- "devDependencies": {
17
- "typescript": "^5.7.3"
18
- },
19
- "dependencies": {
20
- "@plutonlabs/sdk": "^0.0.3-beta",
21
- "bignumber.js": "^9.1.2",
22
- "class-transformer": "^0.5.1",
23
- "class-validator": "^0.14.1"
24
- }
25
- }
1
+ {
2
+ "name": "@plutonlabs/sdk",
3
+ "version": "0.0.11-beta",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "scripts": {
10
+ "build": "tsc"
11
+ },
12
+ "keywords": [],
13
+ "author": "",
14
+ "license": "ISC",
15
+ "description": "",
16
+ "devDependencies": {
17
+ "typescript": "^5.7.3"
18
+ },
19
+ "dependencies": {
20
+ "@plutonlabs/sdk": "^0.0.3-beta",
21
+ "bignumber.js": "^9.1.2",
22
+ "class-transformer": "^0.5.1",
23
+ "class-validator": "^0.14.1"
24
+ }
25
+ }
package/Readme.md DELETED
@@ -1 +0,0 @@
1
- # pluton-sdk