@suilend/sui-fe 0.3.33 → 0.3.35
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/lib/keypair.d.ts +3 -2
- package/lib/keypair.js +2 -5
- package/package.json +1 -1
package/lib/keypair.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { SuiClient, SuiTransactionBlockResponse } from "@mysten/sui/client";
|
|
|
2
2
|
import { SignatureWithBytes } from "@mysten/sui/cryptography";
|
|
3
3
|
import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519";
|
|
4
4
|
import { Transaction } from "@mysten/sui/transactions";
|
|
5
|
-
import { SuiSignPersonalMessageMethod, WalletAccount } from "@mysten/wallet-standard";
|
|
6
5
|
import BigNumber from "bignumber.js";
|
|
7
6
|
import { Token } from "./coinMetadata";
|
|
8
7
|
export declare class TransactionStatusError extends Error {
|
|
@@ -16,7 +15,9 @@ export type LastSignedTransaction<T> = {
|
|
|
16
15
|
};
|
|
17
16
|
export declare const checkLastTransactionSignature: <T>(type: T, lastCurrentFlowTransaction: SuiTransactionBlockResponse | undefined, lastSignedTransaction: LastSignedTransaction<T> | undefined, setLastSignedTransaction: (value: LastSignedTransaction<T> | undefined) => void, suiClient: SuiClient, validCallback: (res: SuiTransactionBlockResponse) => Promise<void>, invalidCallback: () => Promise<void>) => Promise<void>;
|
|
18
17
|
export declare const onSign: <T>(type: T, setLastSignedTransaction: (value: LastSignedTransaction<T> | undefined) => void, index?: number) => (signedTransaction: SignatureWithBytes) => void;
|
|
19
|
-
export declare const createKeypair: (
|
|
18
|
+
export declare const createKeypair: (signPersonalMessage: (message: Uint8Array) => Promise<{
|
|
19
|
+
signature: string;
|
|
20
|
+
}>) => Promise<{
|
|
20
21
|
keypair: Ed25519Keypair;
|
|
21
22
|
address: string;
|
|
22
23
|
privateKey: string;
|
package/lib/keypair.js
CHANGED
|
@@ -108,12 +108,9 @@ const onSign = (type, setLastSignedTransaction, index) => {
|
|
|
108
108
|
exports.onSign = onSign;
|
|
109
109
|
// CREATE KEYPAIR
|
|
110
110
|
const KEYPAIR_SEED_MESSAGE = "send:wallet-connect";
|
|
111
|
-
const createKeypair = (
|
|
111
|
+
const createKeypair = (signPersonalMessage) => __awaiter(void 0, void 0, void 0, function* () {
|
|
112
112
|
const message = Buffer.from(KEYPAIR_SEED_MESSAGE);
|
|
113
|
-
const { signature } = yield signPersonalMessage(
|
|
114
|
-
message,
|
|
115
|
-
account,
|
|
116
|
-
});
|
|
113
|
+
const { signature } = yield signPersonalMessage(message);
|
|
117
114
|
const signatureBytes = (0, utils_1.fromBase64)(signature);
|
|
118
115
|
const signatureHex = (0, utils_1.toHex)(signatureBytes);
|
|
119
116
|
const keypair = ed25519_1.Ed25519Keypair.deriveKeypairFromSeed(signatureHex);
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@suilend/sui-fe","version":"0.3.
|
|
1
|
+
{"name":"@suilend/sui-fe","version":"0.3.35","private":false,"description":"A collection of TypeScript frontend libraries","author":"Suilend","license":"MIT","main":"./index.js","exports":{".":"./index.js","./lib/api":"./lib/api.js","./lib/coin":"./lib/coin.js","./lib/coinMetadata":"./lib/coinMetadata.js","./lib/coinType":"./lib/coinType.js","./lib/constants":"./lib/constants.js","./lib/format":"./lib/format.js","./lib":"./lib/index.js","./lib/indexedDB":"./lib/indexedDB.js","./lib/keypair":"./lib/keypair.js","./lib/ledger":"./lib/ledger.js","./lib/msafe":"./lib/msafe.js","./lib/track":"./lib/track.js","./lib/transactions":"./lib/transactions.js"},"types":"./index.js","scripts":{"build":"rm -rf ./dist && bun tsc","eslint":"eslint --fix \"./src/**/*.ts\"","prettier":"prettier --write \"./src/**/*\"","lint":"bun eslint && bun prettier && bun tsc --noEmit","release":"bun run build && bun ts-node ./release.ts && cd ./dist && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/suilend/sui-fe.git"},"bugs":{"url":"https://github.com/suilend/sui-fe/issues"},"dependencies":{"@mysten/wallet-standard":"0.19.2","bignumber.js":"^9.1.2","blake2b":"^2.1.4","lodash":"^4.17.21","mixpanel-browser":"^2.71.0","next":"^15.0.3","p-limit":"3.1.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.8","@types/blake2b":"^2.1.3","@types/lodash":"^4.17.13","@types/node":"^22.9.0","@typescript-eslint/eslint-plugin":"^8.14.0","@typescript-eslint/parser":"^8.14.0","eslint":"^9.14.0","eslint-config-next":"^15.0.3","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.31.0","eslint-plugin-prettier":"^5.2.1","prettier":"^3.3.3","ts-node":"^10.9.2","typescript":"^5.6.3"},"peerDependencies":{"@mysten/sui":"1.42.0","date-fns":"^4.1.0"}}
|