@dynamic-labs/waas-ton 4.51.2 → 4.52.0
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 +9 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +12 -5
- package/src/DynamicWaasTonConnectors.cjs +12 -0
- package/src/DynamicWaasTonConnectors.d.ts +2 -0
- package/src/DynamicWaasTonConnectors.js +8 -0
- package/src/connector/DynamicWaasTonConnector.cjs +282 -0
- package/src/connector/DynamicWaasTonConnector.d.ts +153 -0
- package/src/connector/DynamicWaasTonConnector.js +278 -0
- package/src/connector/TonWalletConnector.cjs +41 -0
- package/src/connector/TonWalletConnector.d.ts +29 -0
- package/src/connector/TonWalletConnector.js +37 -0
- package/src/index.cjs +21 -15
- package/src/index.d.ts +6 -6
- package/src/index.js +12 -3
- package/src/signer/DynamicWaasTonSigner.cjs +61 -0
- package/src/signer/DynamicWaasTonSigner.d.ts +20 -0
- package/src/signer/DynamicWaasTonSigner.js +57 -0
- package/src/types/index.cjs +13 -0
- package/src/types/index.d.ts +35 -1
- package/src/types/index.js +11 -0
- package/src/utils/convertSendTransactionRequest/convertSendTransactionRequest.cjs +117 -0
- package/src/utils/convertSendTransactionRequest/convertSendTransactionRequest.d.ts +9 -0
- package/src/utils/convertSendTransactionRequest/convertSendTransactionRequest.js +113 -0
- package/src/utils/convertSendTransactionRequest/index.d.ts +1 -0
- package/src/utils/executeTransaction/executeTransaction.cjs +55 -0
- package/src/utils/executeTransaction/executeTransaction.d.ts +25 -0
- package/src/utils/executeTransaction/executeTransaction.js +51 -0
- package/src/utils/extractDisplayInfoFromRequest/extractDisplayInfoFromRequest.cjs +51 -0
- package/src/utils/extractDisplayInfoFromRequest/extractDisplayInfoFromRequest.d.ts +18 -0
- package/src/utils/extractDisplayInfoFromRequest/extractDisplayInfoFromRequest.js +47 -0
- package/src/utils/extractDisplayInfoFromRequest/index.d.ts +1 -0
- package/src/utils/generateTonConnectProofHash/generateTonConnectProofHash.cjs +89 -0
- package/src/utils/generateTonConnectProofHash/generateTonConnectProofHash.d.ts +24 -0
- package/src/utils/generateTonConnectProofHash/generateTonConnectProofHash.js +85 -0
- package/src/utils/getJettonWalletAddress/getJettonWalletAddress.cjs +32 -0
- package/src/utils/getJettonWalletAddress/getJettonWalletAddress.d.ts +17 -0
- package/src/utils/getJettonWalletAddress/getJettonWalletAddress.js +28 -0
- package/src/utils/index.d.ts +8 -0
- package/src/utils/logger/logger.cjs +4 -3
- package/src/utils/logger/logger.js +3 -1
- package/src/utils/prepareJettonTransfer/prepareJettonTransfer.cjs +78 -0
- package/src/utils/prepareJettonTransfer/prepareJettonTransfer.d.ts +31 -0
- package/src/utils/prepareJettonTransfer/prepareJettonTransfer.js +74 -0
- package/src/utils/prepareTonTransfer/prepareTonTransfer.cjs +45 -0
- package/src/utils/prepareTonTransfer/prepareTonTransfer.d.ts +23 -0
- package/src/utils/prepareTonTransfer/prepareTonTransfer.js +41 -0
- package/src/utils/prepareTransaction/prepareTransaction.cjs +65 -0
- package/src/utils/prepareTransaction/prepareTransaction.d.ts +32 -0
- package/src/utils/prepareTransaction/prepareTransaction.js +61 -0
- package/src/wallet/WaasTonWallet.cjs +31 -0
- package/src/wallet/WaasTonWallet.d.ts +10 -0
- package/src/wallet/WaasTonWallet.js +27 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var _tslib = require('../../_virtual/_tslib.cjs');
|
|
7
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
8
|
+
|
|
9
|
+
// Needs to extend TonWallet when ton-core package is ready
|
|
10
|
+
class WaasTonWallet extends walletConnectorCore.Wallet {
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12
|
+
sendBalance(params) {
|
|
13
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
throw new Error('Not implemented');
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
getSigner() {
|
|
18
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield this._connector.getWalletClientByAddress({
|
|
20
|
+
accountAddress: this.address,
|
|
21
|
+
});
|
|
22
|
+
const signer = yield this._connector.getSigner();
|
|
23
|
+
if (!signer) {
|
|
24
|
+
throw new Error('Unable to retrieve TON signer');
|
|
25
|
+
}
|
|
26
|
+
return signer;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
exports.WaasTonWallet = WaasTonWallet;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Wallet } from '@dynamic-labs/wallet-connector-core';
|
|
2
|
+
import { DynamicWaasTonConnector } from '../connector/DynamicWaasTonConnector';
|
|
3
|
+
import { DynamicWaasTonSigner } from '../signer/DynamicWaasTonSigner';
|
|
4
|
+
export declare class WaasTonWallet extends Wallet<DynamicWaasTonConnector> {
|
|
5
|
+
sendBalance(params: {
|
|
6
|
+
amount: string;
|
|
7
|
+
toAddress: string;
|
|
8
|
+
}): Promise<string | undefined>;
|
|
9
|
+
getSigner(): Promise<DynamicWaasTonSigner>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { __awaiter } from '../../_virtual/_tslib.js';
|
|
3
|
+
import { Wallet } from '@dynamic-labs/wallet-connector-core';
|
|
4
|
+
|
|
5
|
+
// Needs to extend TonWallet when ton-core package is ready
|
|
6
|
+
class WaasTonWallet extends Wallet {
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
+
sendBalance(params) {
|
|
9
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10
|
+
throw new Error('Not implemented');
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
getSigner() {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
yield this._connector.getWalletClientByAddress({
|
|
16
|
+
accountAddress: this.address,
|
|
17
|
+
});
|
|
18
|
+
const signer = yield this._connector.getSigner();
|
|
19
|
+
if (!signer) {
|
|
20
|
+
throw new Error('Unable to retrieve TON signer');
|
|
21
|
+
}
|
|
22
|
+
return signer;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { WaasTonWallet };
|