@bitgo/public-types 6.83.0 → 6.84.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.
@@ -102,6 +102,8 @@ export declare const CantonAllocationAllocateIntent: t.IntersectionC<[t.Intersec
102
102
  receiveAmount: t.StringC;
103
103
  allocateBefore: t.StringC;
104
104
  settleBefore: t.StringC;
105
+ legType: t.UnionC<[t.LiteralC<"trade">, t.LiteralC<"fee">]>;
106
+ parentTradeId: t.StringC;
105
107
  comment: t.StringC;
106
108
  requestedAt: t.StringC;
107
109
  }>]>;
@@ -47,6 +47,8 @@ exports.CantonAllocationAllocateIntent = t.intersection([
47
47
  receiveAmount: t.string,
48
48
  allocateBefore: t.string,
49
49
  settleBefore: t.string,
50
+ legType: t.union([t.literal("trade"), t.literal("fee")]),
51
+ parentTradeId: t.string,
50
52
  comment: t.string,
51
53
  requestedAt: t.string,
52
54
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"cantonAllocationAllocateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/cantonAllocationAllocateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;AAa9B,QAAA,8BAA8B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3D,uBAAU;IACV,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,kBAAkB;QAC1C,WAAW,EAAE,CAAC,CAAC,MAAM;KACtB,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,QAAQ,EAAE,CAAC,CAAC,MAAM;QAClB,UAAU,EAAE,CAAC,CAAC,MAAM;QACpB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACvC,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,eAAe,EAAE,CAAC,CAAC,MAAM;QACzB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM;QACf,YAAY,EAAE,CAAC,CAAC,MAAM;QACtB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,cAAc,EAAE,CAAC,CAAC,MAAM;QACxB,YAAY,EAAE,CAAC,CAAC,MAAM;QACtB,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,WAAW,EAAE,CAAC,CAAC,MAAM;KACtB,CAAC;CACH,CAAC,CAAC"}
1
+ {"version":3,"file":"cantonAllocationAllocateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/cantonAllocationAllocateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;AAe9B,QAAA,8BAA8B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3D,uBAAU;IACV,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,kBAAkB;QAC1C,WAAW,EAAE,CAAC,CAAC,MAAM;KACtB,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,QAAQ,EAAE,CAAC,CAAC,MAAM;QAClB,UAAU,EAAE,CAAC,CAAC,MAAM;QACpB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACvC,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,eAAe,EAAE,CAAC,CAAC,MAAM;QACzB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM;QACf,YAAY,EAAE,CAAC,CAAC,MAAM;QACtB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,cAAc,EAAE,CAAC,CAAC,MAAM;QACxB,YAAY,EAAE,CAAC,CAAC,MAAM;QACtB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QACxD,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,WAAW,EAAE,CAAC,CAAC,MAAM;KACtB,CAAC;CACH,CAAC,CAAC"}
@@ -96,12 +96,14 @@ export declare const CantonAllocationRequestIntent: t.IntersectionC<[t.Intersect
96
96
  receiverPartyId: t.StringC;
97
97
  amount: t.StringC;
98
98
  token: t.StringC;
99
- receiveToken: t.StringC;
100
- receiveAmount: t.StringC;
101
99
  allocateBefore: t.StringC;
102
100
  settleBefore: t.StringC;
103
101
  }>, t.PartialC<{
104
102
  comment: t.StringC;
105
103
  requestedAt: t.StringC;
104
+ receiveToken: t.StringC;
105
+ receiveAmount: t.StringC;
106
+ legType: t.UnionC<[t.LiteralC<"trade">, t.LiteralC<"fee">]>;
107
+ parentTradeId: t.StringC;
106
108
  }>]>;
107
109
  export type CantonAllocationRequestIntent = t.TypeOf<typeof CantonAllocationRequestIntent>;
@@ -40,14 +40,16 @@ exports.CantonAllocationRequestIntent = t.intersection([
40
40
  receiverPartyId: t.string,
41
41
  amount: t.string,
42
42
  token: t.string,
43
- receiveToken: t.string,
44
- receiveAmount: t.string,
45
43
  allocateBefore: t.string,
46
44
  settleBefore: t.string,
47
45
  }),
48
46
  t.partial({
49
47
  comment: t.string,
50
48
  requestedAt: t.string,
49
+ receiveToken: t.string,
50
+ receiveAmount: t.string,
51
+ legType: t.union([t.literal("trade"), t.literal("fee")]),
52
+ parentTradeId: t.string,
51
53
  }),
52
54
  ]);
53
55
  //# sourceMappingURL=cantonAllocationRequestIntent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cantonAllocationRequestIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/cantonAllocationRequestIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;AA+B9B,QAAA,6BAA6B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC1D,uBAAU;IACV,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,iBAAiB;QACzC,QAAQ,EAAE,CAAC,CAAC,MAAM;QAClB,UAAU,EAAE,CAAC,CAAC,MAAM;QACpB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACvC,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,eAAe,EAAE,CAAC,CAAC,MAAM;QACzB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM;QACf,YAAY,EAAE,CAAC,CAAC,MAAM;QACtB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,cAAc,EAAE,CAAC,CAAC,MAAM;QACxB,YAAY,EAAE,CAAC,CAAC,MAAM;KACvB,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,WAAW,EAAE,CAAC,CAAC,MAAM;KACtB,CAAC;CACH,CAAC,CAAC"}
1
+ {"version":3,"file":"cantonAllocationRequestIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/cantonAllocationRequestIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;AAsC9B,QAAA,6BAA6B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC1D,uBAAU;IACV,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,iBAAiB;QACzC,QAAQ,EAAE,CAAC,CAAC,MAAM;QAClB,UAAU,EAAE,CAAC,CAAC,MAAM;QACpB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACvC,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,eAAe,EAAE,CAAC,CAAC,MAAM;QACzB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM;QACf,cAAc,EAAE,CAAC,CAAC,MAAM;QACxB,YAAY,EAAE,CAAC,CAAC,MAAM;KACvB,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,WAAW,EAAE,CAAC,CAAC,MAAM;QACrB,YAAY,EAAE,CAAC,CAAC,MAAM;QACtB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QACxD,aAAa,EAAE,CAAC,CAAC,MAAM;KACxB,CAAC;CACH,CAAC,CAAC"}
@@ -2029,6 +2029,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
2029
2029
  receiveAmount: t.StringC;
2030
2030
  allocateBefore: t.StringC;
2031
2031
  settleBefore: t.StringC;
2032
+ legType: t.UnionC<[t.LiteralC<"trade">, t.LiteralC<"fee">]>;
2033
+ parentTradeId: t.StringC;
2032
2034
  comment: t.StringC;
2033
2035
  requestedAt: t.StringC;
2034
2036
  }>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
@@ -2324,13 +2326,15 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
2324
2326
  receiverPartyId: t.StringC;
2325
2327
  amount: t.StringC;
2326
2328
  token: t.StringC;
2327
- receiveToken: t.StringC;
2328
- receiveAmount: t.StringC;
2329
2329
  allocateBefore: t.StringC;
2330
2330
  settleBefore: t.StringC;
2331
2331
  }>, t.PartialC<{
2332
2332
  comment: t.StringC;
2333
2333
  requestedAt: t.StringC;
2334
+ receiveToken: t.StringC;
2335
+ receiveAmount: t.StringC;
2336
+ legType: t.UnionC<[t.LiteralC<"trade">, t.LiteralC<"fee">]>;
2337
+ parentTradeId: t.StringC;
2334
2338
  }>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
2335
2339
  intentType: t.KeyofC<{
2336
2340
  payment: t.LiteralC<"payment">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "6.83.0",
3
+ "version": "6.84.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -12,6 +12,8 @@ import { intentTypes } from "./intentType";
12
12
  *
13
13
  * @param {String} intentType - The type of intent (always set to allocationAllocate)
14
14
  * @param {String} txRequestId - The allocationRequest txRequestId to allocate against
15
+ * @param {String} [legType] - The leg category: "trade" for a DvP delivery leg, "fee" for a payment-only operator-fee leg; mirrors the parent allocationRequest intent
16
+ * @param {String} [parentTradeId] - For fee legs, the trade identifier of the parent trade this fee belongs to
15
17
  */
16
18
  export const CantonAllocationAllocateIntent = t.intersection([
17
19
  BaseIntent,
@@ -33,6 +35,8 @@ export const CantonAllocationAllocateIntent = t.intersection([
33
35
  receiveAmount: t.string,
34
36
  allocateBefore: t.string,
35
37
  settleBefore: t.string,
38
+ legType: t.union([t.literal("trade"), t.literal("fee")]),
39
+ parentTradeId: t.string,
36
40
  comment: t.string,
37
41
  requestedAt: t.string,
38
42
  }),
@@ -10,9 +10,14 @@ import { intentTypes } from "./intentType";
10
10
  * (Delivery vs Payment) trade. The operator emits an AllocationRequest instructing both
11
11
  * parties to lock their respective assets before atomic settlement can proceed.
12
12
  *
13
- * Each intent covers one party's allocation leg. The `receiveToken` / `receiveAmount` fields
14
- * show what the allocating party will receive upon successful settlement, giving the user full
15
- * visibility into the trade terms before acting.
13
+ * Each intent covers one party's allocation leg. For a trade leg (`legType` "trade"), the
14
+ * `receiveToken` / `receiveAmount` fields show what the allocating party will receive upon
15
+ * successful settlement, giving the user full visibility into the trade terms before acting.
16
+ *
17
+ * A fee leg (`legType` "fee") is payment-only: the fee payer sends the operator fee and
18
+ * receives nothing, so the receive fields are absent. `parentTradeId` carries the trade
19
+ * identifier of the parent trade the fee belongs to (the fee trade's own `tradeId` is
20
+ * suffixed, e.g. "TC-1234:fee").
16
21
  *
17
22
  * @param {String} intentType - The type of intent (always set to allocationRequest)
18
23
  * @param {String} updateId - The transaction update id of the AllocationRequest event
@@ -24,8 +29,10 @@ import { intentTypes } from "./intentType";
24
29
  * @param {String} receiverPartyId - The counterparty receiving the allocated asset
25
30
  * @param {String} amount - Quantity to allocate (decimal string, e.g. "70.0000000000")
26
31
  * @param {String} token - BitGo token identifier for the asset being allocated
27
- * @param {String} receiveToken - BitGo token identifier the allocating party will receive on settlement
28
- * @param {String} receiveAmount - Quantity the allocating party will receive on settlement
32
+ * @param {String} [receiveToken] - BitGo token identifier the allocating party will receive on settlement; required for trade legs, absent for fee legs
33
+ * @param {String} [receiveAmount] - Quantity the allocating party will receive on settlement; required for trade legs, absent for fee legs
34
+ * @param {String} [legType] - The leg category: "trade" for a DvP delivery leg, "fee" for a payment-only operator-fee leg; absent for legacy trade intents
35
+ * @param {String} [parentTradeId] - For fee legs, the trade identifier of the parent trade this fee belongs to
29
36
  * @param {String} allocateBefore - ISO 8601 deadline by which allocation must be submitted
30
37
  * @param {String} settleBefore - ISO 8601 deadline by which settlement must complete
31
38
  * @param {String} [comment] - Optional free-form note
@@ -44,14 +51,16 @@ export const CantonAllocationRequestIntent = t.intersection([
44
51
  receiverPartyId: t.string,
45
52
  amount: t.string,
46
53
  token: t.string,
47
- receiveToken: t.string,
48
- receiveAmount: t.string,
49
54
  allocateBefore: t.string,
50
55
  settleBefore: t.string,
51
56
  }),
52
57
  t.partial({
53
58
  comment: t.string,
54
59
  requestedAt: t.string,
60
+ receiveToken: t.string,
61
+ receiveAmount: t.string,
62
+ legType: t.union([t.literal("trade"), t.literal("fee")]),
63
+ parentTradeId: t.string,
55
64
  }),
56
65
  ]);
57
66