@typus/typus-perp-sdk 1.1.28 → 1.1.29-codegen-test

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.
Files changed (60) hide show
  1. package/dist/src/_dependencies/source/0x1/ascii/structs.d.ts +7 -11
  2. package/dist/src/_dependencies/source/0x1/option/structs.d.ts +4 -6
  3. package/dist/src/_dependencies/source/0x1/string/structs.d.ts +4 -6
  4. package/dist/src/_dependencies/source/0x1/type-name/structs.d.ts +6 -10
  5. package/dist/src/_dependencies/source/0x2/bag/structs.d.ts +8 -15
  6. package/dist/src/_dependencies/source/0x2/balance/structs.d.ts +6 -10
  7. package/dist/src/_dependencies/source/0x2/coin/structs.d.ts +85 -139
  8. package/dist/src/_dependencies/source/0x2/linked-table/structs.d.ts +27 -48
  9. package/dist/src/_dependencies/source/0x2/object/structs.d.ts +8 -14
  10. package/dist/src/_dependencies/source/0x2/object-table/structs.d.ts +8 -15
  11. package/dist/src/_dependencies/source/0x2/sui/structs.d.ts +3 -5
  12. package/dist/src/_dependencies/source/0x2/table/structs.d.ts +8 -15
  13. package/dist/src/_dependencies/source/0x2/table-vec/structs.d.ts +10 -19
  14. package/dist/src/_dependencies/source/0x2/token/structs.d.ts +90 -118
  15. package/dist/src/_dependencies/source/0x2/transfer-policy/structs.d.ts +70 -92
  16. package/dist/src/_dependencies/source/0x2/url/structs.d.ts +6 -10
  17. package/dist/src/_dependencies/source/0x2/vec-map/structs.d.ts +13 -18
  18. package/dist/src/_dependencies/source/0x2/vec-set/structs.d.ts +4 -6
  19. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.d.ts +86 -153
  20. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.d.ts +21 -38
  21. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.d.ts +34 -65
  22. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.d.ts +58 -101
  23. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.d.ts +36 -61
  24. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.d.ts +125 -224
  25. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.d.ts +31 -56
  26. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.d.ts +26 -46
  27. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.d.ts +186 -300
  28. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.d.ts +43 -78
  29. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.d.ts +48 -82
  30. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.d.ts +18 -33
  31. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.d.ts +65 -118
  32. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.d.ts +10 -19
  33. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.d.ts +133 -253
  34. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.d.ts +3 -5
  35. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.d.ts +26 -46
  36. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.d.ts +433 -713
  37. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.d.ts +69 -125
  38. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.d.ts +7 -12
  39. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.d.ts +87 -155
  40. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.d.ts +10 -19
  41. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.d.ts +183 -326
  42. package/dist/src/_framework/util.d.ts +1 -1
  43. package/dist/src/_framework/vector.d.ts +12 -5
  44. package/dist/src/index.js +16 -15
  45. package/dist/src/typus_perp/admin/structs.d.ts +85 -147
  46. package/dist/src/typus_perp/competition/structs.d.ts +16 -28
  47. package/dist/src/typus_perp/escrow/structs.d.ts +20 -32
  48. package/dist/src/typus_perp/lp-pool/structs.d.ts +736 -1299
  49. package/dist/src/typus_perp/position/structs.d.ts +236 -395
  50. package/dist/src/typus_perp/symbol/structs.d.ts +14 -25
  51. package/dist/src/typus_perp/tlp/structs.d.ts +42 -18
  52. package/dist/src/typus_perp/tlp/structs.js +53 -2
  53. package/dist/src/typus_perp/trading/structs.d.ts +714 -1267
  54. package/dist/src/typus_perp/treasury-caps/structs.d.ts +7 -13
  55. package/dist/src/typus_perp/user-account/structs.d.ts +27 -47
  56. package/dist/src/typus_stake_pool/admin/structs.d.ts +67 -115
  57. package/dist/src/typus_stake_pool/stake-pool/structs.d.ts +371 -649
  58. package/dist/src/user/history.js +1 -1
  59. package/dist/src/user/orderWithBidReceipt.d.ts +1 -0
  60. package/package.json +13 -4
@@ -25,33 +25,22 @@ export declare class Symbol implements StructClass {
25
25
  static get r(): import("../../_framework/reified").StructClassReified<Symbol, SymbolFields>;
26
26
  static phantom(): PhantomReified<ToTypeStr<Symbol>>;
27
27
  static get p(): PhantomReified<"0xe27969a70f93034de9ce16e6ad661b480324574e68d15a64b513fd90eb2423e5::symbol::Symbol" | "0x585924f160f83ef16f8927ec117e4d740abb6f4e571ecfa89ff3e973042cb1b9::symbol::Symbol">;
28
- static get bcs(): import("@mysten/sui/bcs").BcsType<{
29
- base_token: {
30
- name: {
31
- bytes: number[];
32
- };
33
- };
34
- quote_token: {
35
- name: {
36
- bytes: number[];
37
- };
38
- };
39
- }, {
40
- base_token: {
41
- name: {
42
- bytes: Iterable<number> & {
28
+ static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
29
+ base_token: import("@mysten/sui/bcs").BcsStruct<{
30
+ name: import("@mysten/sui/bcs").BcsStruct<{
31
+ bytes: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
43
32
  length: number;
44
- };
45
- };
46
- };
47
- quote_token: {
48
- name: {
49
- bytes: Iterable<number> & {
33
+ }, string>;
34
+ }, string>;
35
+ }, string>;
36
+ quote_token: import("@mysten/sui/bcs").BcsStruct<{
37
+ name: import("@mysten/sui/bcs").BcsStruct<{
38
+ bytes: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
50
39
  length: number;
51
- };
52
- };
53
- };
54
- }>;
40
+ }, string>;
41
+ }, string>;
42
+ }, string>;
43
+ }, string>;
55
44
  static fromFields(fields: Record<string, any>): Symbol;
56
45
  static fromFieldsWithTypes(item: FieldsWithTypes): Symbol;
57
46
  static fromBcs(data: Uint8Array): Symbol;
@@ -3,6 +3,7 @@ import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../
3
3
  import { FieldsWithTypes } from "../../_framework/util";
4
4
  import { PKG_V1 } from "../index";
5
5
  import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
6
+ import { BcsType, BcsStruct } from "@mysten/sui/bcs";
6
7
  export declare function isLpRegistry(type: string): boolean;
7
8
  export interface LpRegistryFields {
8
9
  id: ToField<UID>;
@@ -23,19 +24,13 @@ export declare class LpRegistry implements StructClass {
23
24
  static get r(): import("../../_framework/reified").StructClassReified<LpRegistry, LpRegistryFields>;
24
25
  static phantom(): PhantomReified<ToTypeStr<LpRegistry>>;
25
26
  static get p(): PhantomReified<"0xe27969a70f93034de9ce16e6ad661b480324574e68d15a64b513fd90eb2423e5::tlp::LpRegistry" | "0x585924f160f83ef16f8927ec117e4d740abb6f4e571ecfa89ff3e973042cb1b9::tlp::LpRegistry">;
26
- static get bcs(): import("@mysten/sui/bcs").BcsType<{
27
- id: {
28
- id: {
29
- bytes: string;
30
- };
31
- };
32
- }, {
33
- id: {
34
- id: {
35
- bytes: string;
36
- };
37
- };
38
- }>;
27
+ static get bcs(): BcsStruct<{
28
+ id: BcsStruct<{
29
+ id: BcsStruct<{
30
+ bytes: BcsType<string, string, string>;
31
+ }, string>;
32
+ }, string>;
33
+ }, string>;
39
34
  static fromFields(fields: Record<string, any>): LpRegistry;
40
35
  static fromFieldsWithTypes(item: FieldsWithTypes): LpRegistry;
41
36
  static fromBcs(data: Uint8Array): LpRegistry;
@@ -73,11 +68,9 @@ export declare class TLP implements StructClass {
73
68
  static get r(): import("../../_framework/reified").StructClassReified<TLP, TLPFields>;
74
69
  static phantom(): PhantomReified<ToTypeStr<TLP>>;
75
70
  static get p(): PhantomReified<"0xe27969a70f93034de9ce16e6ad661b480324574e68d15a64b513fd90eb2423e5::tlp::TLP" | "0x585924f160f83ef16f8927ec117e4d740abb6f4e571ecfa89ff3e973042cb1b9::tlp::TLP">;
76
- static get bcs(): import("@mysten/sui/bcs").BcsType<{
77
- dummy_field: boolean;
78
- }, {
79
- dummy_field: boolean;
80
- }>;
71
+ static get bcs(): BcsStruct<{
72
+ dummy_field: BcsType<boolean, boolean, "bool">;
73
+ }, string>;
81
74
  static fromFields(fields: Record<string, any>): TLP;
82
75
  static fromFieldsWithTypes(item: FieldsWithTypes): TLP;
83
76
  static fromBcs(data: Uint8Array): TLP;
@@ -95,3 +88,34 @@ export declare class TLP implements StructClass {
95
88
  static fromSuiObjectData(data: SuiObjectData): TLP;
96
89
  static fetch(client: SuiClient, id: string): Promise<TLP>;
97
90
  }
91
+ export declare class MoveStruct<T extends Record<string, BcsType<any>>, const Name extends string = string> extends BcsStruct<T, Name> {
92
+ }
93
+ export type UnsettledBidReceiptType = typeof UnsettledBidReceipt.$inferType;
94
+ export declare const UnsettledBidReceipt: MoveStruct<{
95
+ /** A vector of `TypusBidReceipt` structs. */
96
+ receipt: BcsType<boolean[], Iterable<boolean> & {
97
+ length: number;
98
+ }, string>;
99
+ /** The ID of the position. */
100
+ position_id: BcsType<string, string | number | bigint, "u64">;
101
+ /** The address of the user. */
102
+ user: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
103
+ /** A vector of the token types. */
104
+ token_types: BcsType<boolean[], Iterable<boolean> & {
105
+ length: number;
106
+ }, string>;
107
+ /** The sign of the unrealized PNL. */
108
+ unrealized_pnl_sign: BcsType<boolean, boolean, "bool">;
109
+ /** The unrealized PNL. */
110
+ unrealized_pnl: BcsType<string, string | number | bigint, "u64">;
111
+ /** The unrealized trading fee. */
112
+ unrealized_trading_fee: BcsType<string, string | number | bigint, "u64">;
113
+ /** The unrealized borrow fee. */
114
+ unrealized_borrow_fee: BcsType<string, string | number | bigint, "u64">;
115
+ /** The sign of the unrealized funding fee. */
116
+ unrealized_funding_fee_sign: BcsType<boolean, boolean, "bool">;
117
+ /** The unrealized funding fee. */
118
+ unrealized_funding_fee: BcsType<string, string | number | bigint, "u64">;
119
+ /** The unrealized liquidator fee. */
120
+ unrealized_liquidator_fee: BcsType<string, string | number | bigint, "u64">;
121
+ }, "@typus/perp::escrow::UnsettledBidReceipt">;
@@ -1,4 +1,19 @@
1
1
  "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
2
17
  var __assign = (this && this.__assign) || function () {
3
18
  __assign = Object.assign || function(t) {
4
19
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -72,15 +87,15 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
72
87
  return to.concat(ar || Array.prototype.slice.call(from));
73
88
  };
74
89
  Object.defineProperty(exports, "__esModule", { value: true });
75
- exports.TLP = exports.LpRegistry = void 0;
90
+ exports.UnsettledBidReceipt = exports.MoveStruct = exports.TLP = exports.LpRegistry = void 0;
76
91
  exports.isLpRegistry = isLpRegistry;
77
92
  exports.isTLP = isTLP;
78
93
  var structs_1 = require("../../_dependencies/source/0x2/object/structs");
79
94
  var reified_1 = require("../../_framework/reified");
80
95
  var util_1 = require("../../_framework/util");
81
96
  var index_1 = require("../index");
82
- var bcs_1 = require("@mysten/sui/bcs");
83
97
  var utils_1 = require("@mysten/sui/utils");
98
+ var bcs_1 = require("@mysten/sui/bcs");
84
99
  /* ============================== LpRegistry =============================== */
85
100
  function isLpRegistry(type) {
86
101
  type = (0, util_1.compressSuiType)(type);
@@ -363,3 +378,39 @@ var TLP = /** @class */ (function () {
363
378
  return TLP;
364
379
  }());
365
380
  exports.TLP = TLP;
381
+ var $moduleName = "@typus/perp::escrow";
382
+ var MoveStruct = /** @class */ (function (_super) {
383
+ __extends(MoveStruct, _super);
384
+ function MoveStruct() {
385
+ return _super !== null && _super.apply(this, arguments) || this;
386
+ }
387
+ return MoveStruct;
388
+ }(bcs_1.BcsStruct));
389
+ exports.MoveStruct = MoveStruct;
390
+ exports.UnsettledBidReceipt = new MoveStruct({
391
+ name: "".concat($moduleName, "::UnsettledBidReceipt"),
392
+ fields: {
393
+ /** A vector of `TypusBidReceipt` structs. */
394
+ receipt: bcs_1.bcs.vector(bcs_1.bcs.Bool),
395
+ /** The ID of the position. */
396
+ position_id: bcs_1.bcs.u64(),
397
+ /** The address of the user. */
398
+ user: bcs_1.bcs.Address,
399
+ /** A vector of the token types. */
400
+ token_types: bcs_1.bcs.vector(bcs_1.bcs.Bool),
401
+ /** The sign of the unrealized PNL. */
402
+ unrealized_pnl_sign: bcs_1.bcs.bool(),
403
+ /** The unrealized PNL. */
404
+ unrealized_pnl: bcs_1.bcs.u64(),
405
+ /** The unrealized trading fee. */
406
+ unrealized_trading_fee: bcs_1.bcs.u64(),
407
+ /** The unrealized borrow fee. */
408
+ unrealized_borrow_fee: bcs_1.bcs.u64(),
409
+ /** The sign of the unrealized funding fee. */
410
+ unrealized_funding_fee_sign: bcs_1.bcs.bool(),
411
+ /** The unrealized funding fee. */
412
+ unrealized_funding_fee: bcs_1.bcs.u64(),
413
+ /** The unrealized liquidator fee. */
414
+ unrealized_liquidator_fee: bcs_1.bcs.u64(),
415
+ },
416
+ });