@dynamic-labs/client 4.79.2 → 4.80.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 +9 -9
- package/src/client/client.cjs +6 -0
- package/src/client/client.d.ts +18 -1
- package/src/client/client.js +6 -0
- package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.cjs +4 -1
- package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.d.ts +1 -1
- package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.js +4 -1
- package/src/modules/bitcoinModule/bitcoinModule.cjs +21 -0
- package/src/modules/bitcoinModule/bitcoinModule.d.ts +19 -0
- package/src/modules/bitcoinModule/bitcoinModule.js +17 -0
- package/src/modules/bitcoinModule/index.d.ts +1 -0
- package/src/modules/tonModule/index.d.ts +1 -0
- package/src/modules/tonModule/tonModule.cjs +19 -0
- package/src/modules/tonModule/tonModule.d.ts +15 -0
- package/src/modules/tonModule/tonModule.js +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.80.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.79.2...v4.80.0) (2026-05-05)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **aleo:** Aleo wallet connectors + send/shield token registries + UI transaction type ([#11101](https://github.com/dynamic-labs/dynamic-auth/issues/11101)) ([5478d9c](https://github.com/dynamic-labs/dynamic-auth/commit/5478d9c21ee065e2e6c8e96d37ab17b74c5aa0f8))
|
|
8
|
+
* **midnight:** add address query methods and getProvider to InjectedWalletBase ([#11082](https://github.com/dynamic-labs/dynamic-auth/issues/11082)) ([9b6a870](https://github.com/dynamic-labs/dynamic-auth/commit/9b6a8709f83d04673e9dbe23bb0caae5827b036c))
|
|
9
|
+
* **ton:** recognize v3R1/v3R2/v4 wallets in TonConnect proof verification ([#11130](https://github.com/dynamic-labs/dynamic-auth/issues/11130)) ([6c40ab1](https://github.com/dynamic-labs/dynamic-auth/commit/6c40ab11e56d56e278aeb5ee2ae982a42767b5cb))
|
|
10
|
+
|
|
2
11
|
### [4.79.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.79.1...v4.79.2) (2026-05-04)
|
|
3
12
|
|
|
4
13
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/client",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.80.0",
|
|
4
4
|
"description": "Core package for utilizing Dynamic's sdk",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@vue/reactivity": "^3.4.21",
|
|
22
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
23
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
24
|
-
"@dynamic-labs/locale": "4.
|
|
25
|
-
"@dynamic-labs/logger": "4.
|
|
26
|
-
"@dynamic-labs/message-transport": "4.
|
|
27
|
-
"@dynamic-labs/types": "4.
|
|
28
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
29
|
-
"@dynamic-labs/webview-messages": "4.
|
|
22
|
+
"@dynamic-labs/sdk-api-core": "0.0.964",
|
|
23
|
+
"@dynamic-labs/assert-package-version": "4.80.0",
|
|
24
|
+
"@dynamic-labs/locale": "4.80.0",
|
|
25
|
+
"@dynamic-labs/logger": "4.80.0",
|
|
26
|
+
"@dynamic-labs/message-transport": "4.80.0",
|
|
27
|
+
"@dynamic-labs/types": "4.80.0",
|
|
28
|
+
"@dynamic-labs/wallet-connector-core": "4.80.0",
|
|
29
|
+
"@dynamic-labs/webview-messages": "4.80.0",
|
|
30
30
|
"eventemitter3": "5.0.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {}
|
package/src/client/client.cjs
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var logger = require('@dynamic-labs/logger');
|
|
7
7
|
var messageTransport = require('@dynamic-labs/message-transport');
|
|
8
8
|
var authModule = require('../modules/authModule/authModule.cjs');
|
|
9
|
+
var bitcoinModule = require('../modules/bitcoinModule/bitcoinModule.cjs');
|
|
9
10
|
var deviceRegistrationModule = require('../modules/deviceRegistrationModule/deviceRegistrationModule.cjs');
|
|
10
11
|
var instrumentationModule = require('../modules/instrumentationModule/instrumentationModule.cjs');
|
|
11
12
|
var localeModule = require('../modules/localeModule/localeModule.cjs');
|
|
@@ -14,6 +15,7 @@ var networksModule = require('../modules/networksModule/networksModule.cjs');
|
|
|
14
15
|
var passkeysModule = require('../modules/passkeysModule/passkeysModule.cjs');
|
|
15
16
|
var sdkModule = require('../modules/sdkModule/sdkModule.cjs');
|
|
16
17
|
var stepUpAuthModule = require('../modules/stepUpAuthModule/stepUpAuthModule.cjs');
|
|
18
|
+
var tonModule = require('../modules/tonModule/tonModule.cjs');
|
|
17
19
|
var userInterfaceModule = require('../modules/userInterfaceModule/userInterfaceModule.cjs');
|
|
18
20
|
var walletsModule = require('../modules/walletsModule/walletsModule.cjs');
|
|
19
21
|
var Extendable = require('../utils/Extendable/Extendable.cjs');
|
|
@@ -42,6 +44,8 @@ const createClient = (props) => {
|
|
|
42
44
|
return {
|
|
43
45
|
/** Module that gives access over authentication state, such as the auth token and user */
|
|
44
46
|
auth: authModule.createAuthModule(core$1),
|
|
47
|
+
/** Module for Bitcoin-specific operations (sign, PSBT, send, balance) */
|
|
48
|
+
bitcoin: bitcoinModule.createBitcoinModule(core$1),
|
|
45
49
|
/** Module that provides access to device registration features */
|
|
46
50
|
deviceRegistration: deviceRegistrationModule.createDeviceRegistrationModule(core$1),
|
|
47
51
|
/** Module that provides locale/translation features */
|
|
@@ -56,6 +60,8 @@ const createClient = (props) => {
|
|
|
56
60
|
sdk: sdkModule.createSdkModule(core$1),
|
|
57
61
|
/** Module that provides access to step-up authentication features */
|
|
58
62
|
stepUpAuth: stepUpAuthModule.createStepUpAuthModule(core$1),
|
|
63
|
+
/** Module for TON-specific operations (sign, send TON, Jettons, balance, network) */
|
|
64
|
+
ton: tonModule.createTonModule(core$1),
|
|
59
65
|
/** Module that provide access to UI features */
|
|
60
66
|
ui: userInterfaceModule.createUserInterfaceModule(core$1),
|
|
61
67
|
/** Module that provides access to user's wallets */
|
package/src/client/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EvmNetwork } from '@dynamic-labs/types';
|
|
1
|
+
import type { EvmNetwork, GenericNetwork } from '@dynamic-labs/types';
|
|
2
2
|
import { ClientManifest } from '@dynamic-labs/webview-messages';
|
|
3
3
|
import { Extendable } from '../utils/Extendable';
|
|
4
4
|
export declare const baseClientExtensionName = "base";
|
|
@@ -10,6 +10,19 @@ export type ClientProps = {
|
|
|
10
10
|
appLogoUrl?: string;
|
|
11
11
|
cssOverrides?: string;
|
|
12
12
|
evmNetworks?: EvmNetwork[];
|
|
13
|
+
/**
|
|
14
|
+
* Overrides for Bitcoin networks. When provided, merges with the dashboard
|
|
15
|
+
* networks (custom entries win on chainId conflicts).
|
|
16
|
+
*/
|
|
17
|
+
bitcoinNetworks?: GenericNetwork[];
|
|
18
|
+
/**
|
|
19
|
+
* Overrides for Solana networks. See `bitcoinNetworks` for merge semantics.
|
|
20
|
+
*/
|
|
21
|
+
solNetworks?: GenericNetwork[];
|
|
22
|
+
/**
|
|
23
|
+
* Overrides for TON networks. See `bitcoinNetworks` for merge semantics.
|
|
24
|
+
*/
|
|
25
|
+
tonNetworks?: GenericNetwork[];
|
|
13
26
|
debug?: ClientManifest['debug'];
|
|
14
27
|
globalWallets?: ClientManifest['globalWallets'];
|
|
15
28
|
locale?: ClientManifest['locale'];
|
|
@@ -46,6 +59,8 @@ export type ClientProps = {
|
|
|
46
59
|
export declare const createClient: (props: ClientProps) => {
|
|
47
60
|
/** Module that gives access over authentication state, such as the auth token and user */
|
|
48
61
|
auth: import("../modules/authModule").AuthModule;
|
|
62
|
+
/** Module for Bitcoin-specific operations (sign, PSBT, send, balance) */
|
|
63
|
+
bitcoin: import("../modules/bitcoinModule").BitcoinModule;
|
|
49
64
|
/** Module that provides access to device registration features */
|
|
50
65
|
deviceRegistration: import("../modules/deviceRegistrationModule").DeviceRegistrationModule;
|
|
51
66
|
/** Module that provides locale/translation features */
|
|
@@ -72,6 +87,8 @@ export declare const createClient: (props: ClientProps) => {
|
|
|
72
87
|
sdk: import("../modules/sdkModule").SdkModule;
|
|
73
88
|
/** Module that provides access to step-up authentication features */
|
|
74
89
|
stepUpAuth: import("../modules/stepUpAuthModule").StepUpAuthModule;
|
|
90
|
+
/** Module for TON-specific operations (sign, send TON, Jettons, balance, network) */
|
|
91
|
+
ton: import("../modules/tonModule").TonModule;
|
|
75
92
|
/** Module that provide access to UI features */
|
|
76
93
|
ui: import("../modules/userInterfaceModule/userInterfaceModule").UserInterfaceModule;
|
|
77
94
|
/** Module that provides access to user's wallets */
|
package/src/client/client.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { Logger } from '@dynamic-labs/logger';
|
|
3
3
|
import { setGlobalDebugEnabled } from '@dynamic-labs/message-transport';
|
|
4
4
|
import { createAuthModule } from '../modules/authModule/authModule.js';
|
|
5
|
+
import { createBitcoinModule } from '../modules/bitcoinModule/bitcoinModule.js';
|
|
5
6
|
import { createDeviceRegistrationModule } from '../modules/deviceRegistrationModule/deviceRegistrationModule.js';
|
|
6
7
|
import { setupInstrumentationModule } from '../modules/instrumentationModule/instrumentationModule.js';
|
|
7
8
|
import { createLocaleModule } from '../modules/localeModule/localeModule.js';
|
|
@@ -10,6 +11,7 @@ import { createNetworksModule } from '../modules/networksModule/networksModule.j
|
|
|
10
11
|
import { createPasskeysModule } from '../modules/passkeysModule/passkeysModule.js';
|
|
11
12
|
import { createSdkModule } from '../modules/sdkModule/sdkModule.js';
|
|
12
13
|
import { createStepUpAuthModule } from '../modules/stepUpAuthModule/stepUpAuthModule.js';
|
|
14
|
+
import { createTonModule } from '../modules/tonModule/tonModule.js';
|
|
13
15
|
import { createUserInterfaceModule } from '../modules/userInterfaceModule/userInterfaceModule.js';
|
|
14
16
|
import { createWalletsModule } from '../modules/walletsModule/walletsModule.js';
|
|
15
17
|
import { Extendable } from '../utils/Extendable/Extendable.js';
|
|
@@ -38,6 +40,8 @@ const createClient = (props) => {
|
|
|
38
40
|
return {
|
|
39
41
|
/** Module that gives access over authentication state, such as the auth token and user */
|
|
40
42
|
auth: createAuthModule(core),
|
|
43
|
+
/** Module for Bitcoin-specific operations (sign, PSBT, send, balance) */
|
|
44
|
+
bitcoin: createBitcoinModule(core),
|
|
41
45
|
/** Module that provides access to device registration features */
|
|
42
46
|
deviceRegistration: createDeviceRegistrationModule(core),
|
|
43
47
|
/** Module that provides locale/translation features */
|
|
@@ -52,6 +56,8 @@ const createClient = (props) => {
|
|
|
52
56
|
sdk: createSdkModule(core),
|
|
53
57
|
/** Module that provides access to step-up authentication features */
|
|
54
58
|
stepUpAuth: createStepUpAuthModule(core),
|
|
59
|
+
/** Module for TON-specific operations (sign, send TON, Jettons, balance, network) */
|
|
60
|
+
ton: createTonModule(core),
|
|
55
61
|
/** Module that provide access to UI features */
|
|
56
62
|
ui: createUserInterfaceModule(core),
|
|
57
63
|
/** Module that provides access to user's wallets */
|
package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.cjs
CHANGED
|
@@ -5,10 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var _package = require('../../../../../../package.cjs');
|
|
7
7
|
|
|
8
|
-
const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, evmNetworks, debug, globalWallets, locale, connectOnly, deviceRegistrationModal, useMetamaskSdk, }) => ({
|
|
8
|
+
const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, evmNetworks, bitcoinNetworks, solNetworks, tonNetworks, debug, globalWallets, locale, connectOnly, deviceRegistrationModal, useMetamaskSdk, }) => ({
|
|
9
9
|
apiBaseUrl,
|
|
10
10
|
appLogoUrl,
|
|
11
11
|
appName,
|
|
12
|
+
bitcoinNetworks,
|
|
12
13
|
clientVersion: _package.version,
|
|
13
14
|
connectOnly,
|
|
14
15
|
cssOverrides,
|
|
@@ -18,6 +19,8 @@ const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName,
|
|
|
18
19
|
evmNetworks,
|
|
19
20
|
globalWallets,
|
|
20
21
|
locale,
|
|
22
|
+
solNetworks,
|
|
23
|
+
tonNetworks,
|
|
21
24
|
useMetamaskSdk,
|
|
22
25
|
});
|
|
23
26
|
|
package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ClientManifest } from '@dynamic-labs/webview-messages';
|
|
2
2
|
import { ClientProps } from '../../../../client';
|
|
3
|
-
export declare const createPartialManifest: ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, evmNetworks, debug, globalWallets, locale, connectOnly, deviceRegistrationModal, useMetamaskSdk, }: ClientProps) => Partial<ClientManifest>;
|
|
3
|
+
export declare const createPartialManifest: ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, evmNetworks, bitcoinNetworks, solNetworks, tonNetworks, debug, globalWallets, locale, connectOnly, deviceRegistrationModal, useMetamaskSdk, }: ClientProps) => Partial<ClientManifest>;
|
package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { version } from '../../../../../../package.js';
|
|
3
3
|
|
|
4
|
-
const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, evmNetworks, debug, globalWallets, locale, connectOnly, deviceRegistrationModal, useMetamaskSdk, }) => ({
|
|
4
|
+
const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, evmNetworks, bitcoinNetworks, solNetworks, tonNetworks, debug, globalWallets, locale, connectOnly, deviceRegistrationModal, useMetamaskSdk, }) => ({
|
|
5
5
|
apiBaseUrl,
|
|
6
6
|
appLogoUrl,
|
|
7
7
|
appName,
|
|
8
|
+
bitcoinNetworks,
|
|
8
9
|
clientVersion: version,
|
|
9
10
|
connectOnly,
|
|
10
11
|
cssOverrides,
|
|
@@ -14,6 +15,8 @@ const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName,
|
|
|
14
15
|
evmNetworks,
|
|
15
16
|
globalWallets,
|
|
16
17
|
locale,
|
|
18
|
+
solNetworks,
|
|
19
|
+
tonNetworks,
|
|
17
20
|
useMetamaskSdk,
|
|
18
21
|
});
|
|
19
22
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var messageTransport = require('@dynamic-labs/message-transport');
|
|
7
|
+
|
|
8
|
+
const createBitcoinModule = (core) => {
|
|
9
|
+
const requestChannel = messageTransport.createRequestChannel(core.messageTransport);
|
|
10
|
+
return {
|
|
11
|
+
buildPsbt: (args) => requestChannel.request('bitcoin_buildPsbt', args),
|
|
12
|
+
getBalance: (args) => requestChannel.request('bitcoin_getBalance', args),
|
|
13
|
+
sendBitcoin: (args) => requestChannel.request('bitcoin_sendBitcoin', args),
|
|
14
|
+
sendRawTransaction: (args) => requestChannel.request('bitcoin_sendRawTransaction', args),
|
|
15
|
+
signMessage: (args) => requestChannel.request('bitcoin_signMessage', args),
|
|
16
|
+
signPsbt: (args) => requestChannel.request('bitcoin_signPsbt', args),
|
|
17
|
+
signPsbts: (args) => requestChannel.request('bitcoin_signPsbts', args),
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.createBitcoinModule = createBitcoinModule;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BitcoinMessages } from '@dynamic-labs/webview-messages';
|
|
2
|
+
import { Core } from '../../client/core';
|
|
3
|
+
export type BitcoinModule = {
|
|
4
|
+
/** Signs a message with the specified Bitcoin wallet. */
|
|
5
|
+
signMessage: BitcoinMessages['bitcoin_signMessage'];
|
|
6
|
+
/** Signs a single PSBT with the specified Bitcoin wallet. */
|
|
7
|
+
signPsbt: BitcoinMessages['bitcoin_signPsbt'];
|
|
8
|
+
/** Signs multiple PSBTs with the specified Bitcoin wallet. */
|
|
9
|
+
signPsbts: BitcoinMessages['bitcoin_signPsbts'];
|
|
10
|
+
/** Sends Bitcoin to a recipient address. */
|
|
11
|
+
sendBitcoin: BitcoinMessages['bitcoin_sendBitcoin'];
|
|
12
|
+
/** Builds an unsigned PSBT for a Bitcoin transfer. */
|
|
13
|
+
buildPsbt: BitcoinMessages['bitcoin_buildPsbt'];
|
|
14
|
+
/** Broadcasts a raw Bitcoin transaction to the network. */
|
|
15
|
+
sendRawTransaction: BitcoinMessages['bitcoin_sendRawTransaction'];
|
|
16
|
+
/** Returns the balance (in satoshis, as string) of the specified Bitcoin wallet. */
|
|
17
|
+
getBalance: BitcoinMessages['bitcoin_getBalance'];
|
|
18
|
+
};
|
|
19
|
+
export declare const createBitcoinModule: (core: Core) => BitcoinModule;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { createRequestChannel } from '@dynamic-labs/message-transport';
|
|
3
|
+
|
|
4
|
+
const createBitcoinModule = (core) => {
|
|
5
|
+
const requestChannel = createRequestChannel(core.messageTransport);
|
|
6
|
+
return {
|
|
7
|
+
buildPsbt: (args) => requestChannel.request('bitcoin_buildPsbt', args),
|
|
8
|
+
getBalance: (args) => requestChannel.request('bitcoin_getBalance', args),
|
|
9
|
+
sendBitcoin: (args) => requestChannel.request('bitcoin_sendBitcoin', args),
|
|
10
|
+
sendRawTransaction: (args) => requestChannel.request('bitcoin_sendRawTransaction', args),
|
|
11
|
+
signMessage: (args) => requestChannel.request('bitcoin_signMessage', args),
|
|
12
|
+
signPsbt: (args) => requestChannel.request('bitcoin_signPsbt', args),
|
|
13
|
+
signPsbts: (args) => requestChannel.request('bitcoin_signPsbts', args),
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { createBitcoinModule };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createBitcoinModule, type BitcoinModule } from './bitcoinModule';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createTonModule, type TonModule } from './tonModule';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var messageTransport = require('@dynamic-labs/message-transport');
|
|
7
|
+
|
|
8
|
+
const createTonModule = (core) => {
|
|
9
|
+
const requestChannel = messageTransport.createRequestChannel(core.messageTransport);
|
|
10
|
+
return {
|
|
11
|
+
getBalance: (args) => requestChannel.request('ton_getBalance', args),
|
|
12
|
+
getNetworkDetails: (args) => requestChannel.request('ton_getNetworkDetails', args),
|
|
13
|
+
sendJetton: (args) => requestChannel.request('ton_sendJetton', args),
|
|
14
|
+
sendTon: (args) => requestChannel.request('ton_sendTon', args),
|
|
15
|
+
signMessage: (args) => requestChannel.request('ton_signMessage', args),
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.createTonModule = createTonModule;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TonMessages } from '@dynamic-labs/webview-messages';
|
|
2
|
+
import { Core } from '../../client/core';
|
|
3
|
+
export type TonModule = {
|
|
4
|
+
/** Signs a message with the specified TON wallet. */
|
|
5
|
+
signMessage: TonMessages['ton_signMessage'];
|
|
6
|
+
/** Sends TON to a recipient address. */
|
|
7
|
+
sendTon: TonMessages['ton_sendTon'];
|
|
8
|
+
/** Sends a Jetton (TON-native token) to a recipient address. */
|
|
9
|
+
sendJetton: TonMessages['ton_sendJetton'];
|
|
10
|
+
/** Returns the balance of the specified TON wallet. */
|
|
11
|
+
getBalance: TonMessages['ton_getBalance'];
|
|
12
|
+
/** Returns the network details (chainId + name) for the specified TON wallet. */
|
|
13
|
+
getNetworkDetails: TonMessages['ton_getNetworkDetails'];
|
|
14
|
+
};
|
|
15
|
+
export declare const createTonModule: (core: Core) => TonModule;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { createRequestChannel } from '@dynamic-labs/message-transport';
|
|
3
|
+
|
|
4
|
+
const createTonModule = (core) => {
|
|
5
|
+
const requestChannel = createRequestChannel(core.messageTransport);
|
|
6
|
+
return {
|
|
7
|
+
getBalance: (args) => requestChannel.request('ton_getBalance', args),
|
|
8
|
+
getNetworkDetails: (args) => requestChannel.request('ton_getNetworkDetails', args),
|
|
9
|
+
sendJetton: (args) => requestChannel.request('ton_sendJetton', args),
|
|
10
|
+
sendTon: (args) => requestChannel.request('ton_sendTon', args),
|
|
11
|
+
signMessage: (args) => requestChannel.request('ton_signMessage', args),
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { createTonModule };
|