@layerzerolabs/move-definitions 2.3.45-initia-oft.5
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/CHANGELOG.md +73 -0
- package/README.md +0 -0
- package/dist/index.cjs +58 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +60 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.mjs +49 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +44 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# @layerzerolabs/move-definitions
|
|
2
|
+
|
|
3
|
+
## 2.3.45-initia-oft.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Build Initia,aptos,movement,bsc snapshot images with newest images
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @layerzerolabs/lz-definitions@2.3.45-initia-oft.5
|
|
10
|
+
|
|
11
|
+
## 2.3.45-initia-oft.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Build initia images with newest contracts
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @layerzerolabs/lz-definitions@2.3.45-initia-oft.4
|
|
18
|
+
|
|
19
|
+
## 2.3.45-initia-oft.3
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Fix Aptos OFT SDK to fit newest contracts
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @layerzerolabs/lz-definitions@2.3.45-initia-oft.3
|
|
26
|
+
|
|
27
|
+
## 2.3.45-initia-oft.2
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Fix bug in Initia OFT sdk
|
|
32
|
+
- Updated dependencies
|
|
33
|
+
- @layerzerolabs/lz-definitions@2.3.45-initia-oft.2
|
|
34
|
+
|
|
35
|
+
## 2.3.45-initia-oft.1
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Build new initia images with newest contracts
|
|
40
|
+
- Updated dependencies
|
|
41
|
+
- @layerzerolabs/lz-definitions@2.3.45-initia-oft.1
|
|
42
|
+
|
|
43
|
+
## 2.3.45-initia-oft.0
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Build new initia images with testnet deployments
|
|
48
|
+
- Updated dependencies
|
|
49
|
+
- @layerzerolabs/lz-definitions@2.3.45-initia-oft.0
|
|
50
|
+
|
|
51
|
+
## 2.3.43-initia-oft.2
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Build new Initia snapshot images with multi tokens
|
|
56
|
+
- Updated dependencies
|
|
57
|
+
- @layerzerolabs/lz-definitions@2.3.43-initia-oft.2
|
|
58
|
+
|
|
59
|
+
## 2.3.43-initia-oft.1
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- Update Initia Snapshot image with newest contracts
|
|
64
|
+
- Updated dependencies
|
|
65
|
+
- @layerzerolabs/lz-definitions@2.3.43-initia-oft.1
|
|
66
|
+
|
|
67
|
+
## 2.3.43-initia-oft.0
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- Building new Initia snapshot image, including OFT TokenOne
|
|
72
|
+
- Updated dependencies
|
|
73
|
+
- @layerzerolabs/lz-definitions@2.3.43-initia-oft.0
|
package/README.md
ADDED
|
File without changes
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var lzDefinitions = require('@layerzerolabs/lz-definitions');
|
|
4
|
+
|
|
5
|
+
// src/sdk.ts
|
|
6
|
+
function isMnemonicAndPath(signer) {
|
|
7
|
+
if (signer === void 0 || signer === null || typeof signer !== "object") {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
return "mnemonic" in signer && "path" in signer;
|
|
11
|
+
}
|
|
12
|
+
function isPrivateKey(signer) {
|
|
13
|
+
return typeof signer === "string";
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// src/types.ts
|
|
17
|
+
var MOVE_OFT_TYPE = /* @__PURE__ */ ((MOVE_OFT_TYPE2) => {
|
|
18
|
+
MOVE_OFT_TYPE2["OFTAdapterFa"] = "OFTAdapterFa";
|
|
19
|
+
MOVE_OFT_TYPE2["OFTNativeFa"] = "OFTNativeFa";
|
|
20
|
+
MOVE_OFT_TYPE2["OFTAdapterCoin"] = "OFTAdapterCoin";
|
|
21
|
+
MOVE_OFT_TYPE2["OFTNativeCoin"] = "OFTNativeCoin";
|
|
22
|
+
return MOVE_OFT_TYPE2;
|
|
23
|
+
})(MOVE_OFT_TYPE || {});
|
|
24
|
+
|
|
25
|
+
// src/errors.ts
|
|
26
|
+
var MoveTableItemNotFoundError = class extends Error {
|
|
27
|
+
constructor(rawMsg) {
|
|
28
|
+
super(`Table item not found. Raw error message: ${rawMsg}`);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var MoveResourceNotFoundError = class extends Error {
|
|
32
|
+
constructor(rawMsg) {
|
|
33
|
+
super(`Resource not found. Raw error message: ${rawMsg}`);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var MoveAbortError = class extends Error {
|
|
37
|
+
constructor(abortCode, rawMsg) {
|
|
38
|
+
super(`Move abort with code: ${abortCode}. Raw error message: ${rawMsg}`);
|
|
39
|
+
this.abortCode = abortCode;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var UnclassifiedError = class extends Error {
|
|
43
|
+
};
|
|
44
|
+
function isMoveChain(chain) {
|
|
45
|
+
const validChains = [...Object.values(lzDefinitions.AptosChain), lzDefinitions.Chain.INITIA];
|
|
46
|
+
return validChains.includes(chain);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
exports.MOVE_OFT_TYPE = MOVE_OFT_TYPE;
|
|
50
|
+
exports.MoveAbortError = MoveAbortError;
|
|
51
|
+
exports.MoveResourceNotFoundError = MoveResourceNotFoundError;
|
|
52
|
+
exports.MoveTableItemNotFoundError = MoveTableItemNotFoundError;
|
|
53
|
+
exports.UnclassifiedError = UnclassifiedError;
|
|
54
|
+
exports.isMnemonicAndPath = isMnemonicAndPath;
|
|
55
|
+
exports.isMoveChain = isMoveChain;
|
|
56
|
+
exports.isPrivateKey = isPrivateKey;
|
|
57
|
+
//# sourceMappingURL=out.js.map
|
|
58
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sdk.ts","../src/types.ts","../src/errors.ts","../src/utils/is_move_chain.ts"],"names":["MOVE_OFT_TYPE"],"mappings":";AAOO,SAAS,kBAAkB,QAA4C;AAC1E,MAAI,WAAW,UAAa,WAAW,QAAQ,OAAO,WAAW,UAAU;AACvE,WAAO;AAAA,EACX;AACA,SAAO,cAAc,UAAU,UAAU;AAC7C;AAEO,SAAS,aAAa,QAAuC;AAChE,SAAO,OAAO,WAAW;AAC7B;;;ACoCO,IAAK,gBAAL,kBAAKA,mBAAL;AACH,EAAAA,eAAA,kBAAe;AACf,EAAAA,eAAA,iBAAc;AACd,EAAAA,eAAA,oBAAiB;AACjB,EAAAA,eAAA,mBAAgB;AAJR,SAAAA;AAAA,GAAA;;;ACpDL,IAAM,6BAAN,cAAyC,MAAM;AAAA,EAClD,YAAY,QAAgB;AACxB,UAAM,4CAA4C,MAAM,EAAE;AAAA,EAC9D;AACJ;AAEO,IAAM,4BAAN,cAAwC,MAAM;AAAA,EACjD,YAAY,QAAgB;AACxB,UAAM,0CAA0C,MAAM,EAAE;AAAA,EAC5D;AACJ;AAEO,IAAM,iBAAN,cAA6B,MAAM;AAAA,EAEtC,YAAY,WAAmB,QAAgB;AAC3C,UAAM,yBAAyB,SAAS,wBAAwB,MAAM,EAAE;AACxE,SAAK,YAAY;AAAA,EACrB;AACJ;AAEO,IAAM,oBAAN,cAAgC,MAAM;AAAC;;;ACpB9C,SAAS,YAAY,aAAa;AAE3B,SAAS,YAAY,OAAuB;AAC/C,QAAM,cAAc,CAAC,GAAG,OAAO,OAAO,UAAU,GAAG,MAAM,MAAM;AAC/D,SAAO,YAAY,SAAS,KAAK;AACrC","sourcesContent":["import { MnemonicAndPath, PrivateKey } from './types'\n\nexport interface GasOptions {\n gasPrice?: string\n gasLimit?: string\n}\n\nexport function isMnemonicAndPath(signer: unknown): signer is MnemonicAndPath {\n if (signer === undefined || signer === null || typeof signer !== 'object') {\n return false\n }\n return 'mnemonic' in signer && 'path' in signer\n}\n\nexport function isPrivateKey(signer: unknown): signer is PrivateKey {\n return typeof signer === 'string'\n}\n","export type PrivateKey = string\nexport interface MnemonicAndPath {\n path: string\n mnemonic: string\n}\n\nexport type MoveFunction = `${string}::${string}::${string}`\nexport type MoveStructId = MoveFunction\nexport type EntryFunctionArgumentTypes =\n | boolean\n | number\n | bigint\n | string\n | null\n | undefined\n | Uint8Array\n | ArrayBuffer\n | EntryFunctionArgumentTypes[]\n\nexport interface InputEntryFunctionData {\n function: MoveFunction\n functionArgumentTypes?: string[]\n functionArguments: EntryFunctionArgumentTypes[]\n typeArguments?: string[]\n}\n\nexport interface TransactionResponse {\n hash: string\n sender: string\n raw: unknown\n}\n\nexport type MoveValue =\n | boolean\n | number\n | bigint\n | string\n | null\n | undefined\n | NonNullable<unknown>\n | Uint8Array\n | MoveValue[]\n\nexport interface TableItemRequest {\n key_type: MoveValue\n value_type: MoveValue\n /**\n * The value of the table item's key\n */\n key: any\n}\n\nexport enum MOVE_OFT_TYPE {\n OFTAdapterFa = 'OFTAdapterFa',\n OFTNativeFa = 'OFTNativeFa',\n OFTAdapterCoin = 'OFTAdapterCoin',\n OFTNativeCoin = 'OFTNativeCoin',\n}\n","export class MoveTableItemNotFoundError extends Error {\n constructor(rawMsg: string) {\n super(`Table item not found. Raw error message: ${rawMsg}`)\n }\n}\n\nexport class MoveResourceNotFoundError extends Error {\n constructor(rawMsg: string) {\n super(`Resource not found. Raw error message: ${rawMsg}`)\n }\n}\n\nexport class MoveAbortError extends Error {\n readonly abortCode: number\n constructor(abortCode: number, rawMsg: string) {\n super(`Move abort with code: ${abortCode}. Raw error message: ${rawMsg}`)\n this.abortCode = abortCode\n }\n}\n\nexport class UnclassifiedError extends Error {}\n","import { AptosChain, Chain } from '@layerzerolabs/lz-definitions'\n\nexport function isMoveChain(chain: Chain): boolean {\n const validChains = [...Object.values(AptosChain), Chain.INITIA] as Chain[]\n return validChains.includes(chain)\n}\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Chain } from '@layerzerolabs/lz-definitions';
|
|
2
|
+
|
|
3
|
+
type PrivateKey = string;
|
|
4
|
+
interface MnemonicAndPath {
|
|
5
|
+
path: string;
|
|
6
|
+
mnemonic: string;
|
|
7
|
+
}
|
|
8
|
+
type MoveFunction = `${string}::${string}::${string}`;
|
|
9
|
+
type MoveStructId = MoveFunction;
|
|
10
|
+
type EntryFunctionArgumentTypes = boolean | number | bigint | string | null | undefined | Uint8Array | ArrayBuffer | EntryFunctionArgumentTypes[];
|
|
11
|
+
interface InputEntryFunctionData {
|
|
12
|
+
function: MoveFunction;
|
|
13
|
+
functionArgumentTypes?: string[];
|
|
14
|
+
functionArguments: EntryFunctionArgumentTypes[];
|
|
15
|
+
typeArguments?: string[];
|
|
16
|
+
}
|
|
17
|
+
interface TransactionResponse {
|
|
18
|
+
hash: string;
|
|
19
|
+
sender: string;
|
|
20
|
+
raw: unknown;
|
|
21
|
+
}
|
|
22
|
+
type MoveValue = boolean | number | bigint | string | null | undefined | NonNullable<unknown> | Uint8Array | MoveValue[];
|
|
23
|
+
interface TableItemRequest {
|
|
24
|
+
key_type: MoveValue;
|
|
25
|
+
value_type: MoveValue;
|
|
26
|
+
/**
|
|
27
|
+
* The value of the table item's key
|
|
28
|
+
*/
|
|
29
|
+
key: any;
|
|
30
|
+
}
|
|
31
|
+
declare enum MOVE_OFT_TYPE {
|
|
32
|
+
OFTAdapterFa = "OFTAdapterFa",
|
|
33
|
+
OFTNativeFa = "OFTNativeFa",
|
|
34
|
+
OFTAdapterCoin = "OFTAdapterCoin",
|
|
35
|
+
OFTNativeCoin = "OFTNativeCoin"
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface GasOptions {
|
|
39
|
+
gasPrice?: string;
|
|
40
|
+
gasLimit?: string;
|
|
41
|
+
}
|
|
42
|
+
declare function isMnemonicAndPath(signer: unknown): signer is MnemonicAndPath;
|
|
43
|
+
declare function isPrivateKey(signer: unknown): signer is PrivateKey;
|
|
44
|
+
|
|
45
|
+
declare class MoveTableItemNotFoundError extends Error {
|
|
46
|
+
constructor(rawMsg: string);
|
|
47
|
+
}
|
|
48
|
+
declare class MoveResourceNotFoundError extends Error {
|
|
49
|
+
constructor(rawMsg: string);
|
|
50
|
+
}
|
|
51
|
+
declare class MoveAbortError extends Error {
|
|
52
|
+
readonly abortCode: number;
|
|
53
|
+
constructor(abortCode: number, rawMsg: string);
|
|
54
|
+
}
|
|
55
|
+
declare class UnclassifiedError extends Error {
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare function isMoveChain(chain: Chain): boolean;
|
|
59
|
+
|
|
60
|
+
export { type EntryFunctionArgumentTypes, type GasOptions, type InputEntryFunctionData, MOVE_OFT_TYPE, type MnemonicAndPath, MoveAbortError, type MoveFunction, MoveResourceNotFoundError, type MoveStructId, MoveTableItemNotFoundError, type MoveValue, type PrivateKey, type TableItemRequest, type TransactionResponse, UnclassifiedError, isMnemonicAndPath, isMoveChain, isPrivateKey };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Chain } from '@layerzerolabs/lz-definitions';
|
|
2
|
+
|
|
3
|
+
type PrivateKey = string;
|
|
4
|
+
interface MnemonicAndPath {
|
|
5
|
+
path: string;
|
|
6
|
+
mnemonic: string;
|
|
7
|
+
}
|
|
8
|
+
type MoveFunction = `${string}::${string}::${string}`;
|
|
9
|
+
type MoveStructId = MoveFunction;
|
|
10
|
+
type EntryFunctionArgumentTypes = boolean | number | bigint | string | null | undefined | Uint8Array | ArrayBuffer | EntryFunctionArgumentTypes[];
|
|
11
|
+
interface InputEntryFunctionData {
|
|
12
|
+
function: MoveFunction;
|
|
13
|
+
functionArgumentTypes?: string[];
|
|
14
|
+
functionArguments: EntryFunctionArgumentTypes[];
|
|
15
|
+
typeArguments?: string[];
|
|
16
|
+
}
|
|
17
|
+
interface TransactionResponse {
|
|
18
|
+
hash: string;
|
|
19
|
+
sender: string;
|
|
20
|
+
raw: unknown;
|
|
21
|
+
}
|
|
22
|
+
type MoveValue = boolean | number | bigint | string | null | undefined | NonNullable<unknown> | Uint8Array | MoveValue[];
|
|
23
|
+
interface TableItemRequest {
|
|
24
|
+
key_type: MoveValue;
|
|
25
|
+
value_type: MoveValue;
|
|
26
|
+
/**
|
|
27
|
+
* The value of the table item's key
|
|
28
|
+
*/
|
|
29
|
+
key: any;
|
|
30
|
+
}
|
|
31
|
+
declare enum MOVE_OFT_TYPE {
|
|
32
|
+
OFTAdapterFa = "OFTAdapterFa",
|
|
33
|
+
OFTNativeFa = "OFTNativeFa",
|
|
34
|
+
OFTAdapterCoin = "OFTAdapterCoin",
|
|
35
|
+
OFTNativeCoin = "OFTNativeCoin"
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface GasOptions {
|
|
39
|
+
gasPrice?: string;
|
|
40
|
+
gasLimit?: string;
|
|
41
|
+
}
|
|
42
|
+
declare function isMnemonicAndPath(signer: unknown): signer is MnemonicAndPath;
|
|
43
|
+
declare function isPrivateKey(signer: unknown): signer is PrivateKey;
|
|
44
|
+
|
|
45
|
+
declare class MoveTableItemNotFoundError extends Error {
|
|
46
|
+
constructor(rawMsg: string);
|
|
47
|
+
}
|
|
48
|
+
declare class MoveResourceNotFoundError extends Error {
|
|
49
|
+
constructor(rawMsg: string);
|
|
50
|
+
}
|
|
51
|
+
declare class MoveAbortError extends Error {
|
|
52
|
+
readonly abortCode: number;
|
|
53
|
+
constructor(abortCode: number, rawMsg: string);
|
|
54
|
+
}
|
|
55
|
+
declare class UnclassifiedError extends Error {
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare function isMoveChain(chain: Chain): boolean;
|
|
59
|
+
|
|
60
|
+
export { type EntryFunctionArgumentTypes, type GasOptions, type InputEntryFunctionData, MOVE_OFT_TYPE, type MnemonicAndPath, MoveAbortError, type MoveFunction, MoveResourceNotFoundError, type MoveStructId, MoveTableItemNotFoundError, type MoveValue, type PrivateKey, type TableItemRequest, type TransactionResponse, UnclassifiedError, isMnemonicAndPath, isMoveChain, isPrivateKey };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AptosChain, Chain } from '@layerzerolabs/lz-definitions';
|
|
2
|
+
|
|
3
|
+
// src/sdk.ts
|
|
4
|
+
function isMnemonicAndPath(signer) {
|
|
5
|
+
if (signer === void 0 || signer === null || typeof signer !== "object") {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
return "mnemonic" in signer && "path" in signer;
|
|
9
|
+
}
|
|
10
|
+
function isPrivateKey(signer) {
|
|
11
|
+
return typeof signer === "string";
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// src/types.ts
|
|
15
|
+
var MOVE_OFT_TYPE = /* @__PURE__ */ ((MOVE_OFT_TYPE2) => {
|
|
16
|
+
MOVE_OFT_TYPE2["OFTAdapterFa"] = "OFTAdapterFa";
|
|
17
|
+
MOVE_OFT_TYPE2["OFTNativeFa"] = "OFTNativeFa";
|
|
18
|
+
MOVE_OFT_TYPE2["OFTAdapterCoin"] = "OFTAdapterCoin";
|
|
19
|
+
MOVE_OFT_TYPE2["OFTNativeCoin"] = "OFTNativeCoin";
|
|
20
|
+
return MOVE_OFT_TYPE2;
|
|
21
|
+
})(MOVE_OFT_TYPE || {});
|
|
22
|
+
|
|
23
|
+
// src/errors.ts
|
|
24
|
+
var MoveTableItemNotFoundError = class extends Error {
|
|
25
|
+
constructor(rawMsg) {
|
|
26
|
+
super(`Table item not found. Raw error message: ${rawMsg}`);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var MoveResourceNotFoundError = class extends Error {
|
|
30
|
+
constructor(rawMsg) {
|
|
31
|
+
super(`Resource not found. Raw error message: ${rawMsg}`);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var MoveAbortError = class extends Error {
|
|
35
|
+
constructor(abortCode, rawMsg) {
|
|
36
|
+
super(`Move abort with code: ${abortCode}. Raw error message: ${rawMsg}`);
|
|
37
|
+
this.abortCode = abortCode;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var UnclassifiedError = class extends Error {
|
|
41
|
+
};
|
|
42
|
+
function isMoveChain(chain) {
|
|
43
|
+
const validChains = [...Object.values(AptosChain), Chain.INITIA];
|
|
44
|
+
return validChains.includes(chain);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { MOVE_OFT_TYPE, MoveAbortError, MoveResourceNotFoundError, MoveTableItemNotFoundError, UnclassifiedError, isMnemonicAndPath, isMoveChain, isPrivateKey };
|
|
48
|
+
//# sourceMappingURL=out.js.map
|
|
49
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sdk.ts","../src/types.ts","../src/errors.ts","../src/utils/is_move_chain.ts"],"names":["MOVE_OFT_TYPE"],"mappings":";AAOO,SAAS,kBAAkB,QAA4C;AAC1E,MAAI,WAAW,UAAa,WAAW,QAAQ,OAAO,WAAW,UAAU;AACvE,WAAO;AAAA,EACX;AACA,SAAO,cAAc,UAAU,UAAU;AAC7C;AAEO,SAAS,aAAa,QAAuC;AAChE,SAAO,OAAO,WAAW;AAC7B;;;ACoCO,IAAK,gBAAL,kBAAKA,mBAAL;AACH,EAAAA,eAAA,kBAAe;AACf,EAAAA,eAAA,iBAAc;AACd,EAAAA,eAAA,oBAAiB;AACjB,EAAAA,eAAA,mBAAgB;AAJR,SAAAA;AAAA,GAAA;;;ACpDL,IAAM,6BAAN,cAAyC,MAAM;AAAA,EAClD,YAAY,QAAgB;AACxB,UAAM,4CAA4C,MAAM,EAAE;AAAA,EAC9D;AACJ;AAEO,IAAM,4BAAN,cAAwC,MAAM;AAAA,EACjD,YAAY,QAAgB;AACxB,UAAM,0CAA0C,MAAM,EAAE;AAAA,EAC5D;AACJ;AAEO,IAAM,iBAAN,cAA6B,MAAM;AAAA,EAEtC,YAAY,WAAmB,QAAgB;AAC3C,UAAM,yBAAyB,SAAS,wBAAwB,MAAM,EAAE;AACxE,SAAK,YAAY;AAAA,EACrB;AACJ;AAEO,IAAM,oBAAN,cAAgC,MAAM;AAAC;;;ACpB9C,SAAS,YAAY,aAAa;AAE3B,SAAS,YAAY,OAAuB;AAC/C,QAAM,cAAc,CAAC,GAAG,OAAO,OAAO,UAAU,GAAG,MAAM,MAAM;AAC/D,SAAO,YAAY,SAAS,KAAK;AACrC","sourcesContent":["import { MnemonicAndPath, PrivateKey } from './types'\n\nexport interface GasOptions {\n gasPrice?: string\n gasLimit?: string\n}\n\nexport function isMnemonicAndPath(signer: unknown): signer is MnemonicAndPath {\n if (signer === undefined || signer === null || typeof signer !== 'object') {\n return false\n }\n return 'mnemonic' in signer && 'path' in signer\n}\n\nexport function isPrivateKey(signer: unknown): signer is PrivateKey {\n return typeof signer === 'string'\n}\n","export type PrivateKey = string\nexport interface MnemonicAndPath {\n path: string\n mnemonic: string\n}\n\nexport type MoveFunction = `${string}::${string}::${string}`\nexport type MoveStructId = MoveFunction\nexport type EntryFunctionArgumentTypes =\n | boolean\n | number\n | bigint\n | string\n | null\n | undefined\n | Uint8Array\n | ArrayBuffer\n | EntryFunctionArgumentTypes[]\n\nexport interface InputEntryFunctionData {\n function: MoveFunction\n functionArgumentTypes?: string[]\n functionArguments: EntryFunctionArgumentTypes[]\n typeArguments?: string[]\n}\n\nexport interface TransactionResponse {\n hash: string\n sender: string\n raw: unknown\n}\n\nexport type MoveValue =\n | boolean\n | number\n | bigint\n | string\n | null\n | undefined\n | NonNullable<unknown>\n | Uint8Array\n | MoveValue[]\n\nexport interface TableItemRequest {\n key_type: MoveValue\n value_type: MoveValue\n /**\n * The value of the table item's key\n */\n key: any\n}\n\nexport enum MOVE_OFT_TYPE {\n OFTAdapterFa = 'OFTAdapterFa',\n OFTNativeFa = 'OFTNativeFa',\n OFTAdapterCoin = 'OFTAdapterCoin',\n OFTNativeCoin = 'OFTNativeCoin',\n}\n","export class MoveTableItemNotFoundError extends Error {\n constructor(rawMsg: string) {\n super(`Table item not found. Raw error message: ${rawMsg}`)\n }\n}\n\nexport class MoveResourceNotFoundError extends Error {\n constructor(rawMsg: string) {\n super(`Resource not found. Raw error message: ${rawMsg}`)\n }\n}\n\nexport class MoveAbortError extends Error {\n readonly abortCode: number\n constructor(abortCode: number, rawMsg: string) {\n super(`Move abort with code: ${abortCode}. Raw error message: ${rawMsg}`)\n this.abortCode = abortCode\n }\n}\n\nexport class UnclassifiedError extends Error {}\n","import { AptosChain, Chain } from '@layerzerolabs/lz-definitions'\n\nexport function isMoveChain(chain: Chain): boolean {\n const validChains = [...Object.values(AptosChain), Chain.INITIA] as Chain[]\n return validChains.includes(chain)\n}\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@layerzerolabs/move-definitions",
|
|
3
|
+
"version": "2.3.45-initia-oft.5",
|
|
4
|
+
"description": "move base definitions",
|
|
5
|
+
"license": "BUSL-1.1",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.cjs"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"main": "./dist/index.cjs",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist/**/*"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "$npm_execpath clean-prebuild && $npm_execpath build-ts",
|
|
22
|
+
"build-ts": "$npm_execpath tsc --noEmit && $npm_execpath tsup",
|
|
23
|
+
"clean": "$npm_execpath clean-prebuild && rimraf .turbo",
|
|
24
|
+
"clean-prebuild": "rimraf dist"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@layerzerolabs/lz-definitions": "^2.3.45-initia-oft.5",
|
|
28
|
+
"tiny-invariant": "^1.3.1"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@jest/globals": "^29.7.0",
|
|
32
|
+
"@layerzerolabs/tsup-config-next": "^2.3.45-initia-oft.5",
|
|
33
|
+
"@layerzerolabs/typescript-config-next": "^2.3.45-initia-oft.5",
|
|
34
|
+
"@types/jest": "^29.5.10",
|
|
35
|
+
"jest": "^29.7.0",
|
|
36
|
+
"rimraf": "^5.0.5",
|
|
37
|
+
"ts-jest": "^29.1.1",
|
|
38
|
+
"tsup": "^8.0.1",
|
|
39
|
+
"typescript": "~5.2.2"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "restricted"
|
|
43
|
+
}
|
|
44
|
+
}
|