@plutonlabs/sdk 0.0.3-beta → 0.0.4-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.
package/Readme.md ADDED
@@ -0,0 +1 @@
1
+ # pluton-sdk
@@ -1,8 +1,8 @@
1
1
  export declare class ChainTransactionDto {
2
2
  static from<T extends {
3
3
  id: string;
4
- requestQuoteId: string;
5
- responseQuoteId: string;
4
+ quoteRequestId: string;
5
+ quoteResponseId: string;
6
6
  blockNumber?: number;
7
7
  blockHash?: string;
8
8
  hash: string;
@@ -20,8 +20,8 @@ export declare class ChainTransactionDto {
20
20
  }>(tx: T): ChainTransactionDto;
21
21
  static listFrom<T extends {
22
22
  id: string;
23
- requestQuoteId: string;
24
- responseQuoteId: string;
23
+ quoteRequestId: string;
24
+ quoteResponseId: string;
25
25
  blockNumber?: number;
26
26
  blockHash?: string;
27
27
  hash: string;
@@ -46,12 +46,12 @@ export declare class ChainTransactionDto {
46
46
  * UUID of the request quote
47
47
  * @example 'a1b2c3d4-e5f6-7890-1234-56789abcdef0'
48
48
  */
49
- requestQuoteId: string;
49
+ quoteRequestId: string;
50
50
  /**
51
51
  * UUID of the response quote
52
52
  * @example 'f0e1d2c3-b4a5-6789-0123-456789abcdef'
53
53
  */
54
- responseQuoteId: string;
54
+ quoteResponseId: string;
55
55
  /**
56
56
  * Block number where the transaction was mined
57
57
  * @example 123456
@@ -23,8 +23,8 @@ class ChainTransactionDto {
23
23
  static from(tx) {
24
24
  const dto = new ChainTransactionDto();
25
25
  dto.id = tx.id;
26
- dto.requestQuoteId = tx.requestQuoteId;
27
- dto.responseQuoteId = tx.responseQuoteId;
26
+ dto.quoteRequestId = tx.quoteRequestId;
27
+ dto.quoteResponseId = tx.quoteResponseId;
28
28
  dto.blockNumber = tx.blockNumber;
29
29
  dto.blockHash = tx.blockHash;
30
30
  dto.hash = tx.hash;
@@ -50,12 +50,12 @@ __decorate([
50
50
  (0, class_validator_1.IsNotEmpty)(),
51
51
  (0, class_validator_1.IsUUID)(),
52
52
  __metadata("design:type", String)
53
- ], ChainTransactionDto.prototype, "requestQuoteId", void 0);
53
+ ], ChainTransactionDto.prototype, "quoteRequestId", void 0);
54
54
  __decorate([
55
55
  (0, class_validator_1.IsNotEmpty)(),
56
56
  (0, class_validator_1.IsUUID)(),
57
57
  __metadata("design:type", String)
58
- ], ChainTransactionDto.prototype, "responseQuoteId", void 0);
58
+ ], ChainTransactionDto.prototype, "quoteResponseId", void 0);
59
59
  __decorate([
60
60
  (0, class_validator_1.IsOptional)(),
61
61
  (0, class_validator_1.IsNumber)(),
@@ -2,7 +2,6 @@ export * from "./quote_base_intent_request.dto";
2
2
  export * from "./quote_bridge_intent_request.dto";
3
3
  export * from "./quote_bridge_intent_response.dto";
4
4
  export * from "./quote_estimate_bridge_intent_request.dto";
5
- export * from "./quote_estimate_bridge_intent_response.dto";
6
5
  export * from "./quote_intent_request.dto";
7
6
  export * from "./quote_intent_response.dto";
8
7
  export * from "./quote_request_lifecycle.dto";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/quote/domain/dto/quote/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAEhD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AAEnD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAE5D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AAEpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AAErC,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AAErD,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/quote/domain/dto/quote/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAEhD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AAEnD,cAAc,4CAA4C,CAAC;AAE3D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AAEpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AAErC,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AAErD,cAAc,aAAa,CAAC"}
@@ -18,7 +18,6 @@ __exportStar(require("./quote_base_intent_request.dto"), exports);
18
18
  __exportStar(require("./quote_bridge_intent_request.dto"), exports);
19
19
  __exportStar(require("./quote_bridge_intent_response.dto"), exports);
20
20
  __exportStar(require("./quote_estimate_bridge_intent_request.dto"), exports);
21
- __exportStar(require("./quote_estimate_bridge_intent_response.dto"), exports);
22
21
  __exportStar(require("./quote_intent_request.dto"), exports);
23
22
  __exportStar(require("./quote_intent_response.dto"), exports);
24
23
  __exportStar(require("./quote_request_lifecycle.dto"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/quote/domain/dto/quote/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAEhD,oEAAkD;AAClD,qEAAmD;AAEnD,6EAA2D;AAC3D,8EAA4D;AAE5D,6DAA2C;AAC3C,8DAA4C;AAE5C,gEAA8C;AAC9C,sDAAoC;AAEpC,iEAA+C;AAC/C,uDAAqC;AAErC,uEAAqD;AACrD,wEAAsD;AAEtD,sEAAoD;AACpD,uEAAqD;AAErD,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/quote/domain/dto/quote/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAEhD,oEAAkD;AAClD,qEAAmD;AAEnD,6EAA2D;AAE3D,6DAA2C;AAC3C,8DAA4C;AAE5C,gEAA8C;AAC9C,sDAAoC;AAEpC,iEAA+C;AAC/C,uDAAqC;AAErC,uEAAqD;AACrD,wEAAsD;AAEtD,sEAAoD;AACpD,uEAAqD;AAErD,8CAA4B"}
@@ -13,7 +13,7 @@ export declare class QuoteEstimateBridgeIntentRequestDto extends BaseQuoteIntent
13
13
  * @example '0xb44146014eD5f7001Ec9b03153950f4129ec7296'
14
14
  * @description address of token contract on source chain, empty if native token
15
15
  */
16
- sourceTokenAddress: string | null;
16
+ sourceTokenAddress?: string;
17
17
  /**
18
18
  * @example 1333
19
19
  */
@@ -26,7 +26,7 @@ export declare class QuoteEstimateBridgeIntentRequestDto extends BaseQuoteIntent
26
26
  * @example '0xb44146014eD5f7001Ec9b03153950f4129ec7296'
27
27
  * @description address of token contract on destination chain, empty if native token
28
28
  */
29
- destinationTokenAddress: string | null;
29
+ destinationTokenAddress?: string;
30
30
  /**
31
31
  * @example '1000'
32
32
  */
@@ -1 +1 @@
1
- {"version":3,"file":"quote_estimate_bridge_intent_request.dto.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/quote/domain/dto/quote/quote_estimate_bridge_intent_request.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,qBAAa,mCAAoC,SAAQ,yBAAyB;IAChF;;OAEG;IAEH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IAEH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC;;OAEG;IAEH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IAEH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvC;;OAEG;IAEH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IAEH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IAEH,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
1
+ {"version":3,"file":"quote_estimate_bridge_intent_request.dto.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/quote/domain/dto/quote/quote_estimate_bridge_intent_request.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,qBAAa,mCAAoC,SAAQ,yBAAyB;IAChF;;OAEG;IAEH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IAEH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IAEH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IAEH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;OAEG;IAEH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IAEH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IAEH,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
@@ -1,5 +1,4 @@
1
1
  import { QuoteBridgeIntentResponseDto } from './quote_bridge_intent_response.dto';
2
- import { QuoteEstimateBridgeIntentResponseDto } from './quote_estimate_bridge_intent_response.dto';
3
2
  import { IntentType } from '../../../../../common';
4
3
  import { SelectionStatus } from '../../enums';
5
4
  export declare class BaseQuoteIntentResponseDto {
@@ -9,7 +8,7 @@ export declare class BaseQuoteIntentResponseDto {
9
8
  selectionStatus: SelectionStatus;
10
9
  intentRequestId: string;
11
10
  }
12
- export type QuoteIntentResponseDto = QuoteBridgeIntentResponseDto | QuoteEstimateBridgeIntentResponseDto;
11
+ export type QuoteIntentResponseDto = QuoteBridgeIntentResponseDto;
13
12
  export type CreateQuoteIntentResponseDto = QuoteIntentResponseDto & {
14
13
  quoteResponseId: string;
15
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"quote_intent_response.dto.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/quote/domain/dto/quote/quote_intent_response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,oCAAoC,EAAE,MAAM,6CAA6C,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,qBAAa,0BAA0B;IAIrC,EAAE,EAAE,MAAM,CAAC;IAMX,QAAQ,EAAE,MAAM,CAAC;IAKjB,UAAU,EAAE,UAAU,CAAC;IAMvB,eAAe,EAAE,eAAe,CAAC;IAMjC,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,sBAAsB,GAC9B,4BAA4B,GAC5B,oCAAoC,CAAC;AAEzC,MAAM,MAAM,4BAA4B,GAAG,sBAAsB,GAAG;IAClE,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC"}
1
+ {"version":3,"file":"quote_intent_response.dto.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/quote/domain/dto/quote/quote_intent_response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,qBAAa,0BAA0B;IAIrC,EAAE,EAAE,MAAM,CAAC;IAMX,QAAQ,EAAE,MAAM,CAAC;IAKjB,UAAU,EAAE,UAAU,CAAC;IAMvB,eAAe,EAAE,eAAe,CAAC;IAMjC,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,sBAAsB,GAC9B,4BAA4B,CAAC;AAEjC,MAAM,MAAM,4BAA4B,GAAG,sBAAsB,GAAG;IAClE,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"quote_intent_response.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/quote/domain/dto/quote/quote_intent_response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAG/D,kDAAmD;AACnD,uCAA8C;AAE9C,MAAa,0BAA0B;CA4BtC;AA5BD,gEA4BC;AAxBC;IAHC,IAAA,wBAAM,GAAE;IACT,kDAAkD;IAClD,kDAAkD;;;sDACvC;AAMX;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;IACT,uEAAuE;IACvE,kDAAkD;;;4DACjC;AAKjB;IAHC,IAAA,4BAAU,GAAE;IACb,yBAAyB;IACzB,6BAA6B;;;8DACN;AAMvB;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACX,0EAA0E;IAC1E,aAAa;;;mEACoB;AAMjC;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;IACT,gEAAgE;IAChE,kDAAkD;;;mEAC1B"}
1
+ {"version":3,"file":"quote_intent_response.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/quote/domain/dto/quote/quote_intent_response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAE/D,kDAAmD;AACnD,uCAA8C;AAE9C,MAAa,0BAA0B;CA4BtC;AA5BD,gEA4BC;AAxBC;IAHC,IAAA,wBAAM,GAAE;IACT,kDAAkD;IAClD,kDAAkD;;;sDACvC;AAMX;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;IACT,uEAAuE;IACvE,kDAAkD;;;4DACjC;AAKjB;IAHC,IAAA,4BAAU,GAAE;IACb,yBAAyB;IACzB,6BAA6B;;;8DACN;AAMvB;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACX,0EAA0E;IAC1E,aAAa;;;mEACoB;AAMjC;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;IACT,gEAAgE;IAChE,kDAAkD;;;mEAC1B"}
package/package.json CHANGED
@@ -1,22 +1,25 @@
1
- {
2
- "name": "@plutonlabs/sdk",
3
- "version": "0.0.3-beta",
4
- "main": "dist/index.js",
5
- "types": "dist/index.d.ts",
6
- "files": ["dist"],
7
- "scripts": {
8
- "build": "tsc"
9
- },
10
- "keywords": [],
11
- "author": "",
12
- "license": "ISC",
13
- "description": "",
14
- "devDependencies": {
15
- "typescript": "^5.7.3"
16
- },
17
- "dependencies": {
18
- "bignumber.js": "^9.1.2",
19
- "class-transformer": "^0.5.1",
20
- "class-validator": "^0.14.1"
21
- }
22
- }
1
+ {
2
+ "name": "@plutonlabs/sdk",
3
+ "version": "0.0.4-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,8 +0,0 @@
1
- import { BaseQuoteIntentResponseDto } from './quote_intent_response.dto';
2
- export declare class QuoteEstimateBridgeIntentResponseDto extends BaseQuoteIntentResponseDto {
3
- /**
4
- * @example '1000'
5
- */
6
- amount: string;
7
- }
8
- //# sourceMappingURL=quote_estimate_bridge_intent_response.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quote_estimate_bridge_intent_response.dto.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/quote/domain/dto/quote/quote_estimate_bridge_intent_response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEzE,qBAAa,oCAAqC,SAAQ,0BAA0B;IAClF;;OAEG;IAEH,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -1,22 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.QuoteEstimateBridgeIntentResponseDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const quote_intent_response_dto_1 = require("./quote_intent_response.dto");
15
- class QuoteEstimateBridgeIntentResponseDto extends quote_intent_response_dto_1.BaseQuoteIntentResponseDto {
16
- }
17
- exports.QuoteEstimateBridgeIntentResponseDto = QuoteEstimateBridgeIntentResponseDto;
18
- __decorate([
19
- (0, class_validator_1.IsNotEmpty)(),
20
- __metadata("design:type", String)
21
- ], QuoteEstimateBridgeIntentResponseDto.prototype, "amount", void 0);
22
- //# sourceMappingURL=quote_estimate_bridge_intent_response.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quote_estimate_bridge_intent_response.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/quote/domain/dto/quote/quote_estimate_bridge_intent_response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6C;AAC7C,2EAAyE;AAEzE,MAAa,oCAAqC,SAAQ,sDAA0B;CAMnF;AAND,oFAMC;AADC;IADC,IAAA,4BAAU,GAAE;;oEACE"}