@suilend/sui-fe 0.4.6 → 0.4.7

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 CHANGED
@@ -13,14 +13,14 @@ export declare const keypairWaitForTransaction: (digest: string, suiClient: SuiG
13
13
  balanceChanges: true;
14
14
  effects: true;
15
15
  events: true;
16
- objectChanges: true;
16
+ objectTypes: true;
17
17
  }>>;
18
- export declare const keypairSignExecuteAndWaitForTransaction: (transaction: Transaction, keypair: Ed25519Keypair, suiClient: SuiGrpcClient, onSign?: (signedTransaction: SignatureWithBytes) => void, onExecute?: (res: SuiClientTypes.TransactionResult) => void) => Promise<SuiClientTypes.TransactionResult>;
18
+ export declare const keypairSignExecuteAndWaitForTransaction: (transaction: Transaction, keypair: Ed25519Keypair, suiClient: SuiGrpcClient, onSign?: (signedTransaction: SignatureWithBytes) => void, onExecute?: (res: SuiClientTypes.TransactionResult) => void) => Promise<Awaited<ReturnType<typeof keypairWaitForTransaction>>>;
19
19
  export type LastSignedTransaction<T> = {
20
20
  signedTransaction: SignatureWithBytes;
21
21
  type: T;
22
22
  };
23
- export declare const checkLastTransactionSignature: <T>(type: T, lastCurrentFlowTransaction: SuiClientTypes.TransactionResult | undefined, lastSignedTransaction: LastSignedTransaction<T> | undefined, setLastSignedTransaction: (value: LastSignedTransaction<T> | undefined) => void, suiClient: SuiGrpcClient, validCallback: (res: SuiClientTypes.TransactionResult) => Promise<void>, invalidCallback: () => Promise<void>) => Promise<void>;
23
+ export declare const checkLastTransactionSignature: <T>(type: T, lastCurrentFlowTransaction: SuiClientTypes.TransactionResult | undefined, lastSignedTransaction: LastSignedTransaction<T> | undefined, setLastSignedTransaction: (value: LastSignedTransaction<T> | undefined) => void, suiClient: SuiGrpcClient, validCallback: (res: Awaited<ReturnType<typeof keypairWaitForTransaction>>) => Promise<void>, invalidCallback: () => Promise<void>) => Promise<void>;
24
24
  export declare const onSign: <T>(type: T, setLastSignedTransaction: (value: LastSignedTransaction<T> | undefined) => void, index?: number) => (signedTransaction: SignatureWithBytes) => void;
25
25
  export declare const KEYPAIR_SEED_MESSAGE = "send:wallet-connect";
26
26
  export declare const createKeypair: (signature: string) => Promise<{
@@ -32,17 +32,25 @@ export declare const checkIfKeypairCanBeUsed: (lastSignedTransaction: SignatureW
32
32
  lastCurrentFlowTransaction: SuiTransactionBlockResponse | undefined;
33
33
  }>;
34
34
  export type FundKeypairResult = {
35
- res: SuiClientTypes.TransactionResult;
35
+ res: SuiClientTypes.TransactionResult<{
36
+ balanceChanges: true;
37
+ effects: true;
38
+ events: true;
39
+ objectTypes: true;
40
+ }>;
36
41
  };
37
42
  export declare const fundKeypair: (tokens: (Token & {
38
43
  amount: BigNumber;
39
44
  })[], address: string, keypair: Ed25519Keypair, suiClient: SuiGrpcClient, signExecuteAndWaitForTransaction: (transaction: Transaction, options?: {
40
45
  auction?: boolean;
41
- }, onSetGasBudget?: (transaction: Transaction) => void, onSign?: (signedTransaction: SignatureWithBytes) => void, onExecute?: (res: SuiClientTypes.TransactionResult) => void) => Promise<SuiClientTypes.TransactionResult>, // From WalletContext
42
- onSign?: (signedTransaction: SignatureWithBytes) => void, onExecute?: (res: SuiClientTypes.TransactionResult) => void) => Promise<{
43
- res: SuiClientTypes.TransactionResult<{}>;
44
- }>;
46
+ }, onSetGasBudget?: (transaction: Transaction) => void, onSign?: (signedTransaction: SignatureWithBytes) => void, onExecute?: (res: SuiClientTypes.TransactionResult) => void) => Promise<SuiClientTypes.TransactionResult<{
47
+ balanceChanges: true;
48
+ effects: true;
49
+ events: true;
50
+ objectTypes: true;
51
+ }>>, // From WalletContext
52
+ onSign?: (signedTransaction: SignatureWithBytes) => void, onExecute?: (res: SuiClientTypes.TransactionResult) => void) => Promise<FundKeypairResult>;
45
53
  export type ReturnAllOwnedObjectsAndSuiToUserResult = {
46
- res: SuiClientTypes.TransactionResult;
54
+ res: Awaited<ReturnType<typeof keypairSignExecuteAndWaitForTransaction>>;
47
55
  };
48
56
  export declare const returnAllOwnedObjectsAndSuiToUser: (address: string, keypair: Ed25519Keypair, suiClient: SuiGrpcClient, onSign?: (signedTransaction: SignatureWithBytes) => void, onExecute?: (res: SuiClientTypes.TransactionResult) => void) => Promise<ReturnAllOwnedObjectsAndSuiToUserResult>;
package/lib/keypair.js CHANGED
@@ -29,7 +29,7 @@ export const keypairWaitForTransaction = (digest, suiClient) => __awaiter(void 0
29
29
  balanceChanges: true,
30
30
  effects: true,
31
31
  events: true,
32
- objectChanges: true,
32
+ objectTypes: true,
33
33
  },
34
34
  });
35
35
  const txResult = (_a = res.Transaction) !== null && _a !== void 0 ? _a : res.FailedTransaction;
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@suilend/sui-fe","version":"0.4.6","private":false,"description":"A collection of TypeScript frontend libraries","author":"Suilend","license":"MIT","main":"./index.js","exports":{".":"./index.js","./lib/constants":"./lib/constants.js","./lib/transactions":"./lib/transactions.js","./lib/format":"./lib/format.js","./lib/ledger":"./lib/ledger.js","./lib/coinMetadata":"./lib/coinMetadata.js","./lib":"./lib/index.js","./lib/indexedDB":"./lib/indexedDB.js","./lib/coinType":"./lib/coinType.js","./lib/coin":"./lib/coin.js","./lib/msafe":"./lib/msafe.js","./lib/keypair":"./lib/keypair.js","./lib/api":"./lib/api.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 ./release.js && 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.20.0","bignumber.js":"^9.1.2","blake2b":"^2.1.4","lodash":"^4.17.21","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-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":"2.3.1"}}
1
+ {"name":"@suilend/sui-fe","version":"0.4.7","private":false,"description":"A collection of TypeScript frontend libraries","author":"Suilend","license":"MIT","main":"./index.js","exports":{".":"./index.js","./lib/constants":"./lib/constants.js","./lib/transactions":"./lib/transactions.js","./lib/format":"./lib/format.js","./lib/ledger":"./lib/ledger.js","./lib/coinMetadata":"./lib/coinMetadata.js","./lib":"./lib/index.js","./lib/indexedDB":"./lib/indexedDB.js","./lib/coinType":"./lib/coinType.js","./lib/coin":"./lib/coin.js","./lib/msafe":"./lib/msafe.js","./lib/keypair":"./lib/keypair.js","./lib/api":"./lib/api.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 ./release.js && 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.20.0","bignumber.js":"^9.1.2","blake2b":"^2.1.4","lodash":"^4.17.21","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-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":"2.3.1"}}