@xoxno/types 1.0.113 → 1.0.115

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,6 +2,6 @@ import { ChatMessageContentType } from '../../../enums/chat-message-content-type
2
2
  import { ChatMessageReplyDto } from './chat-message-reply.dto';
3
3
  export declare class ChatMessageContentDto {
4
4
  readonly type: ChatMessageContentType;
5
- readonly value: string;
5
+ value: string;
6
6
  readonly replyTo?: ChatMessageReplyDto;
7
7
  }
@@ -0,0 +1,16 @@
1
+ export declare class MvxAccountDetails {
2
+ address: string;
3
+ nonce: number;
4
+ balance: string;
5
+ balanceShort: number;
6
+ username: string;
7
+ ownerAddress?: string;
8
+ isUpgradeable?: boolean;
9
+ isReadable?: boolean;
10
+ isGuarded?: boolean;
11
+ isPayable?: boolean;
12
+ isPayableBySmartContract?: boolean;
13
+ shard?: number;
14
+ usdValue?: number;
15
+ constructor(init?: any);
16
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MvxAccountDetails = void 0;
4
+ const sdk_nestjs_common_1 = require("@multiversx/sdk-nestjs-common");
5
+ class MvxAccountDetails {
6
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
+ constructor(init) {
8
+ this.address = '';
9
+ this.nonce = 0;
10
+ this.balanceShort = 0;
11
+ this.username = '';
12
+ delete init?.['code'];
13
+ delete init?.['codeHash'];
14
+ delete init?.['rootHash'];
15
+ delete init?.['developerReward'];
16
+ const codeMetadata = sdk_nestjs_common_1.AddressUtils.decodeCodeMetadata(init?.['codeMetadata'] ?? {});
17
+ if (codeMetadata) {
18
+ this.isUpgradeable = codeMetadata.isUpgradeable;
19
+ this.isReadable = codeMetadata.isReadable;
20
+ this.isGuarded = codeMetadata.isGuarded;
21
+ this.isPayable = codeMetadata.isPayable;
22
+ this.isPayableBySmartContract = codeMetadata.isPayableBySmartContract;
23
+ }
24
+ delete init?.['codeMetadata'];
25
+ Object.assign(this, init);
26
+ if (this.ownerAddress === '') {
27
+ delete this.ownerAddress;
28
+ }
29
+ this.shard = sdk_nestjs_common_1.AddressUtils.computeShard(sdk_nestjs_common_1.AddressUtils.bech32Decode(this.address), 3);
30
+ }
31
+ }
32
+ exports.MvxAccountDetails = MvxAccountDetails;
@@ -0,0 +1,26 @@
1
+ import { EsdtTokenType, EsdtTokenSubType } from '../../enums';
2
+ export declare class EsdtTokenProperties {
3
+ tokenIdentifier: string;
4
+ name: string;
5
+ type: EsdtTokenType;
6
+ subType: EsdtTokenSubType;
7
+ owner: string;
8
+ supply: number;
9
+ supplyLong: string;
10
+ burntValue: string;
11
+ decimals: number;
12
+ isPaused: boolean;
13
+ canUpgrade: boolean;
14
+ canMint: boolean;
15
+ canBurn: boolean;
16
+ canChangeOwner: boolean;
17
+ canPause: boolean;
18
+ canFreeze: boolean;
19
+ canWipe: boolean;
20
+ canAddSpecialRoles: boolean;
21
+ canTransferNFTCreateRole: boolean;
22
+ nftCreateStopped: boolean;
23
+ wipedQuantity: number;
24
+ canCreateMultiShard: boolean;
25
+ constructor(props?: Partial<EsdtTokenProperties>);
26
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EsdtTokenProperties = void 0;
4
+ class EsdtTokenProperties {
5
+ constructor(props) {
6
+ this.tokenIdentifier = '';
7
+ this.name = '';
8
+ this.owner = '';
9
+ this.supply = 0;
10
+ this.supplyLong = '0';
11
+ this.decimals = 0;
12
+ this.isPaused = false;
13
+ this.canUpgrade = false;
14
+ this.canMint = false;
15
+ this.canBurn = false;
16
+ this.canChangeOwner = false;
17
+ this.canPause = false;
18
+ this.canFreeze = false;
19
+ this.canWipe = false;
20
+ this.canAddSpecialRoles = false;
21
+ this.canTransferNFTCreateRole = false;
22
+ this.nftCreateStopped = false;
23
+ this.wipedQuantity = 0;
24
+ this.canCreateMultiShard = false;
25
+ Object.assign(this, props);
26
+ }
27
+ }
28
+ exports.EsdtTokenProperties = EsdtTokenProperties;
@@ -0,0 +1,12 @@
1
+ export declare class MvxGuardianData {
2
+ guarded: boolean;
3
+ activeGuardian?: Guardian;
4
+ pendingGuardian?: Guardian;
5
+ constructor(init?: Partial<MvxGuardianData>);
6
+ }
7
+ declare class Guardian {
8
+ activationEpoch: number;
9
+ address: string;
10
+ serviceUID: string;
11
+ }
12
+ export {};
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MvxGuardianData = void 0;
4
+ class MvxGuardianData {
5
+ constructor(init) {
6
+ this.guarded = false;
7
+ Object.assign(this, init);
8
+ }
9
+ }
10
+ exports.MvxGuardianData = MvxGuardianData;
11
+ class Guardian {
12
+ constructor() {
13
+ this.activationEpoch = 0;
14
+ this.address = '';
15
+ this.serviceUID = '';
16
+ }
17
+ }
@@ -0,0 +1,8 @@
1
+ export declare class SignableMessage {
2
+ private readonly message;
3
+ signature: any;
4
+ constructor(init: any);
5
+ serializeForSigning(): Buffer<ArrayBuffer | SharedArrayBuffer | Buffer<ArrayBufferLike>>;
6
+ getSignature(): any;
7
+ applySignature(signature: any): void;
8
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SignableMessage = void 0;
5
+ class SignableMessage {
6
+ constructor(init) {
7
+ this.message = Buffer.from([]);
8
+ Object.assign(this, init);
9
+ }
10
+ serializeForSigning() {
11
+ const messageSize = Buffer.from(this.message);
12
+ return messageSize;
13
+ }
14
+ getSignature() {
15
+ return this.signature;
16
+ }
17
+ applySignature(signature) {
18
+ this.signature = signature;
19
+ }
20
+ }
21
+ exports.SignableMessage = SignableMessage;
@@ -0,0 +1,12 @@
1
+ export declare enum MvxBuiltInEventIdentifier {
2
+ ESDT_NFT_CREATE = "ESDTNFTCreate",
3
+ ESDT_NFT_BURN = "ESDTNFTBurn",
4
+ ESDT_NFT_UPDATE_ATTRIBUTES = "ESDTNFTUpdateAttributes",
5
+ ESDT_NFT_TRANSFER = "ESDTNFTTransfer",
6
+ ESDT_NFT_MULTI_TRANSFER = "MultiESDTNFTTransfer",
7
+ ESDT_NFT_ADD_QUANTITY = "ESDTNFTAddQuantity",
8
+ ISSUE_NON_FUNGIBLE = "issueNonFungible",
9
+ ISSUE_SEMI_FUNGIBLE = "issueSemiFungible",
10
+ REGISTER_AND_SET_ALL_ROLES = "registerAndSetAllRoles",
11
+ TRANSFER_OWNERSHIP = "transferOwnership"
12
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MvxBuiltInEventIdentifier = void 0;
4
+ var MvxBuiltInEventIdentifier;
5
+ (function (MvxBuiltInEventIdentifier) {
6
+ MvxBuiltInEventIdentifier["ESDT_NFT_CREATE"] = "ESDTNFTCreate";
7
+ MvxBuiltInEventIdentifier["ESDT_NFT_BURN"] = "ESDTNFTBurn";
8
+ MvxBuiltInEventIdentifier["ESDT_NFT_UPDATE_ATTRIBUTES"] = "ESDTNFTUpdateAttributes";
9
+ MvxBuiltInEventIdentifier["ESDT_NFT_TRANSFER"] = "ESDTNFTTransfer";
10
+ MvxBuiltInEventIdentifier["ESDT_NFT_MULTI_TRANSFER"] = "MultiESDTNFTTransfer";
11
+ MvxBuiltInEventIdentifier["ESDT_NFT_ADD_QUANTITY"] = "ESDTNFTAddQuantity";
12
+ MvxBuiltInEventIdentifier["ISSUE_NON_FUNGIBLE"] = "issueNonFungible";
13
+ MvxBuiltInEventIdentifier["ISSUE_SEMI_FUNGIBLE"] = "issueSemiFungible";
14
+ MvxBuiltInEventIdentifier["REGISTER_AND_SET_ALL_ROLES"] = "registerAndSetAllRoles";
15
+ MvxBuiltInEventIdentifier["TRANSFER_OWNERSHIP"] = "transferOwnership";
16
+ })(MvxBuiltInEventIdentifier || (exports.MvxBuiltInEventIdentifier = MvxBuiltInEventIdentifier = {}));
@@ -3,6 +3,7 @@ export * from "./azure-ws-event-name.enum";
3
3
  export * from "./azure-ws-hub-name.enum";
4
4
  export * from "./binance.enum";
5
5
  export * from "./bober-battle-activity.enum";
6
+ export * from "./built-in-event-identifier.enum";
6
7
  export * from "./chat-data-type.enum";
7
8
  export * from "./chat-message-content-type.enum";
8
9
  export * from "./collection.enum";
@@ -19,6 +19,7 @@ __exportStar(require("./azure-ws-event-name.enum"), exports);
19
19
  __exportStar(require("./azure-ws-hub-name.enum"), exports);
20
20
  __exportStar(require("./binance.enum"), exports);
21
21
  __exportStar(require("./bober-battle-activity.enum"), exports);
22
+ __exportStar(require("./built-in-event-identifier.enum"), exports);
22
23
  __exportStar(require("./chat-data-type.enum"), exports);
23
24
  __exportStar(require("./chat-message-content-type.enum"), exports);
24
25
  __exportStar(require("./collection.enum"), exports);
package/dist/index.d.ts CHANGED
@@ -114,6 +114,10 @@ export * from './entities/auth/login-request.dto';
114
114
  export * from './entities/bober-battle/game-type';
115
115
  export * from './entities/delegation-data/delegation-data-output';
116
116
  export * from './entities/delegation-data/provider-data';
117
+ export * from './entities/mvx-built-in/account-on-network';
118
+ export * from './entities/mvx-built-in/esdt-token';
119
+ export * from './entities/mvx-built-in/mvx-guardian';
120
+ export * from './entities/mvx-built-in/signable-message';
117
121
  export * from './entities/notification-data/device-tag-storage.doc';
118
122
  export * from './entities/notification-data/event-notification.dto';
119
123
  export * from './entities/notification-data/mobile-device-registration.dto';
package/dist/index.js CHANGED
@@ -130,6 +130,10 @@ __exportStar(require("./entities/auth/login-request.dto"), exports);
130
130
  __exportStar(require("./entities/bober-battle/game-type"), exports);
131
131
  __exportStar(require("./entities/delegation-data/delegation-data-output"), exports);
132
132
  __exportStar(require("./entities/delegation-data/provider-data"), exports);
133
+ __exportStar(require("./entities/mvx-built-in/account-on-network"), exports);
134
+ __exportStar(require("./entities/mvx-built-in/esdt-token"), exports);
135
+ __exportStar(require("./entities/mvx-built-in/mvx-guardian"), exports);
136
+ __exportStar(require("./entities/mvx-built-in/signable-message"), exports);
133
137
  __exportStar(require("./entities/notification-data/device-tag-storage.doc"), exports);
134
138
  __exportStar(require("./entities/notification-data/event-notification.dto"), exports);
135
139
  __exportStar(require("./entities/notification-data/mobile-device-registration.dto"), exports);
@@ -174,6 +178,7 @@ __exportStar(require("./enums/azure-ws-event-name.enum"), exports);
174
178
  __exportStar(require("./enums/azure-ws-hub-name.enum"), exports);
175
179
  __exportStar(require("./enums/binance.enum"), exports);
176
180
  __exportStar(require("./enums/bober-battle-activity.enum"), exports);
181
+ __exportStar(require("./enums/built-in-event-identifier.enum"), exports);
177
182
  __exportStar(require("./enums/chat-data-type.enum"), exports);
178
183
  __exportStar(require("./enums/chat-message-content-type.enum"), exports);
179
184
  __exportStar(require("./enums/collection.enum"), exports);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.113",
3
+ "version": "1.0.115",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
- "exports": {
5
+ "exports": {
6
6
  ".": {
7
7
  "import": "./dist/index.js",
8
8
  "require": "./dist/index.js",