@7kprotocol/sdk-ts 3.6.1-beta.0 → 3.6.1-beta.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../../src/utils/sui.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../../src/utils/sui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAqB5E,eAAO,MAAM,QAAQ;uBAET,MAAM,GAAG,mBAAmB,OAC/B,WAAW,GACf,mBAAmB;2BAMV,MAAM,cACJ,MAAM,GAAG,mBAAmB,OACnC,WAAW,GACf,mBAAmB;4BAWE,MAAM;oBAQd,WAAW,YAAY,MAAM;;;;iBAQhC,WAAW,YAAY,MAAM;;;;wBASpC,WAAW,YACL,MAAM,cACJ,mBAAmB;;;;wBAU3B,WAAW,YACL,MAAM,WACP,mBAAmB;;;;2BAUxB,WAAW,YACL,MAAM,WACP,mBAAmB;oBASd,WAAW,YAAY,MAAM,QAAQ,mBAAmB;kCASlE,WAAW,YACL,MAAM,QACV,mBAAmB,WAChB,MAAM;CAQlB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,YAiB9C,CAAC"}
|
package/lib/cjs/utils/sui.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isSystemAddress = exports.SuiUtils = void 0;
|
|
4
|
-
const aggregator_sdk_1 = require("@cetusprotocol/aggregator-sdk");
|
|
5
4
|
const utils_1 = require("@mysten/sui/utils");
|
|
6
5
|
const _7k_1 = require("../constants/_7k");
|
|
7
6
|
exports.SuiUtils = {
|
|
@@ -79,13 +78,18 @@ exports.SuiUtils = {
|
|
|
79
78
|
const isSystemAddress = (address) => {
|
|
80
79
|
const addr = (0, utils_1.normalizeSuiAddress)(address);
|
|
81
80
|
const addresses = [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
81
|
+
"0x0", // zero
|
|
82
|
+
"0x1", // std
|
|
83
|
+
"0x2", // sui framework
|
|
84
|
+
"0x3", // unkown but we reserved to be safe
|
|
85
|
+
"0x4", // unknown but we reserved to be safe
|
|
86
|
+
"0x5", // system state
|
|
87
|
+
"0x6", // time
|
|
88
|
+
"0x7", // unknown but we reserved to be safe
|
|
89
|
+
"0x8", // random
|
|
90
|
+
"0x9", // unknown but we reserved to be safe
|
|
91
|
+
"0x403", // coin deny list
|
|
92
|
+
"0xc", // coin registry
|
|
89
93
|
].map((v) => (0, utils_1.normalizeSuiAddress)(v));
|
|
90
94
|
return addresses.includes(addr);
|
|
91
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../../src/utils/sui.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../../src/utils/sui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAqB5E,eAAO,MAAM,QAAQ;uBAET,MAAM,GAAG,mBAAmB,OAC/B,WAAW,GACf,mBAAmB;2BAMV,MAAM,cACJ,MAAM,GAAG,mBAAmB,OACnC,WAAW,GACf,mBAAmB;4BAWE,MAAM;oBAQd,WAAW,YAAY,MAAM;;;;iBAQhC,WAAW,YAAY,MAAM;;;;wBASpC,WAAW,YACL,MAAM,cACJ,mBAAmB;;;;wBAU3B,WAAW,YACL,MAAM,WACP,mBAAmB;;;;2BAUxB,WAAW,YACL,MAAM,WACP,mBAAmB;oBASd,WAAW,YAAY,MAAM,QAAQ,mBAAmB;kCASlE,WAAW,YACL,MAAM,QACV,mBAAmB,WAChB,MAAM;CAQlB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,YAiB9C,CAAC"}
|
package/lib/esm/utils/sui.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MOVE_STDLIB_ADDRESS, normalizeSuiAddress, parseStructTag, SUI_CLOCK_OBJECT_ID, SUI_FRAMEWORK_ADDRESS, SUI_RANDOM_OBJECT_ID, SUI_SYSTEM_ADDRESS, } from "@mysten/sui/utils";
|
|
1
|
+
import { normalizeSuiAddress, parseStructTag } from "@mysten/sui/utils";
|
|
3
2
|
import { _7K_META_CONFIG, _7K_META_PACKAGE_ID, _7K_META_VAULT, } from "../constants/_7k";
|
|
4
3
|
export const SuiUtils = {
|
|
5
4
|
getSuiCoin(amount, txb) {
|
|
@@ -76,13 +75,18 @@ export const SuiUtils = {
|
|
|
76
75
|
export const isSystemAddress = (address) => {
|
|
77
76
|
const addr = normalizeSuiAddress(address);
|
|
78
77
|
const addresses = [
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
78
|
+
"0x0", // zero
|
|
79
|
+
"0x1", // std
|
|
80
|
+
"0x2", // sui framework
|
|
81
|
+
"0x3", // unkown but we reserved to be safe
|
|
82
|
+
"0x4", // unknown but we reserved to be safe
|
|
83
|
+
"0x5", // system state
|
|
84
|
+
"0x6", // time
|
|
85
|
+
"0x7", // unknown but we reserved to be safe
|
|
86
|
+
"0x8", // random
|
|
87
|
+
"0x9", // unknown but we reserved to be safe
|
|
88
|
+
"0x403", // coin deny list
|
|
89
|
+
"0xc", // coin registry
|
|
86
90
|
].map((v) => normalizeSuiAddress(v));
|
|
87
91
|
return addresses.includes(addr);
|
|
88
92
|
};
|