@trustware/sdk-staging 1.1.8-staging.3 → 1.1.8-staging.5
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/README.md +27 -0
- package/dist/blockchain-BONedEsU.d.cts +110 -0
- package/dist/blockchain-BONedEsU.d.ts +110 -0
- package/dist/constants.cjs +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/{core-u95iahDO.d.cts → core-BcoaMbJ6.d.cts} +3 -2
- package/dist/{core-CVbN3gJy.d.ts → core-BqqBQ5nF.d.ts} +3 -2
- package/dist/core.cjs +2290 -2247
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +4 -3
- package/dist/core.d.ts +4 -3
- package/dist/core.mjs +2277 -2244
- package/dist/core.mjs.map +1 -1
- package/dist/{detect-6MRR4B7g.d.ts → detect-F6garpnf.d.ts} +2 -2
- package/dist/{detect-DVIWcXpl.d.cts → detect-srLQtIzU.d.cts} +2 -2
- package/dist/index.cjs +22382 -3552
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -10
- package/dist/index.d.ts +28 -10
- package/dist/index.mjs +28327 -9497
- package/dist/index.mjs.map +1 -1
- package/dist/{manager-CXSw1h5e.d.cts → manager-BWmNEeZb.d.cts} +72 -121
- package/dist/{manager-CXSw1h5e.d.ts → manager-BojJyYIt.d.ts} +72 -121
- package/dist/smart-account.cjs +14707 -0
- package/dist/smart-account.cjs.map +1 -0
- package/dist/smart-account.d.cts +3962 -0
- package/dist/smart-account.d.ts +3962 -0
- package/dist/smart-account.mjs +14686 -0
- package/dist/smart-account.mjs.map +1 -0
- package/dist/types-B3nKHW6H.d.cts +32 -0
- package/dist/types-MtdjJgwT.d.ts +32 -0
- package/dist/wallet.cjs +29 -9
- package/dist/wallet.cjs.map +1 -1
- package/dist/wallet.d.cts +4 -3
- package/dist/wallet.d.ts +4 -3
- package/dist/wallet.mjs +16 -6
- package/dist/wallet.mjs.map +1 -1
- package/dist/widget.cjs +33067 -14246
- package/dist/widget.cjs.map +1 -1
- package/dist/widget.d.cts +5 -4
- package/dist/widget.d.ts +5 -4
- package/dist/widget.mjs +33007 -14182
- package/dist/widget.mjs.map +1 -1
- package/package.json +17 -4
- package/dist/types-BrVfNxND.d.cts +0 -14
- package/dist/types-BrVfNxND.d.ts +0 -14
package/dist/wallet.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
import { s as SolanaProviderLike, U as WalletMeta, f as DetectedWallet, M as WalletId, t as SolanaWalletInterface } from './manager-BWmNEeZb.cjs';
|
|
2
|
+
export { W as WagmiBridge, C as WagmiConnector, V as WalletSnapshot, a4 as useWalletConnectConnect, a5 as useWalletExternalDisconnect, a6 as useWalletInfo, a7 as useWireDetectionIntoManager, a8 as walletManager } from './manager-BWmNEeZb.cjs';
|
|
3
|
+
export { a as autoDetectWallet, b as buildDetectedWalletFromProvider, c as connectDetectedWallet, d as createWalletConnectEntry, t as toWalletInterfaceFromDetected, u as useEIP1193, e as useIsMobile, f as useWagmi, g as useWalletDetection } from './detect-srLQtIzU.cjs';
|
|
4
|
+
import './blockchain-BONedEsU.cjs';
|
|
4
5
|
|
|
5
6
|
type SolanaEventHandlers = {
|
|
6
7
|
onConnect?: () => void;
|
package/dist/wallet.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
import { s as SolanaProviderLike, U as WalletMeta, f as DetectedWallet, M as WalletId, t as SolanaWalletInterface } from './manager-BojJyYIt.js';
|
|
2
|
+
export { W as WagmiBridge, C as WagmiConnector, V as WalletSnapshot, a4 as useWalletConnectConnect, a5 as useWalletExternalDisconnect, a6 as useWalletInfo, a7 as useWireDetectionIntoManager, a8 as walletManager } from './manager-BojJyYIt.js';
|
|
3
|
+
export { a as autoDetectWallet, b as buildDetectedWalletFromProvider, c as connectDetectedWallet, d as createWalletConnectEntry, t as toWalletInterfaceFromDetected, u as useEIP1193, e as useIsMobile, f as useWagmi, g as useWalletDetection } from './detect-F6garpnf.js';
|
|
4
|
+
import './blockchain-BONedEsU.js';
|
|
4
5
|
|
|
5
6
|
type SolanaEventHandlers = {
|
|
6
7
|
onConnect?: () => void;
|
package/dist/wallet.mjs
CHANGED
|
@@ -224,7 +224,7 @@ var init_constants = __esm({
|
|
|
224
224
|
"src/constants.ts"() {
|
|
225
225
|
"use strict";
|
|
226
226
|
SDK_NAME = "@trustware/sdk";
|
|
227
|
-
SDK_VERSION = "1.1.8-staging.
|
|
227
|
+
SDK_VERSION = "1.1.8-staging.5";
|
|
228
228
|
API_ROOT = "https://bv-staging-api.trustware.io";
|
|
229
229
|
API_PREFIX = "/api";
|
|
230
230
|
WALLETCONNECT_PROJECT_ID = "72ea74c400f5111d43aea638d7d83a24";
|
|
@@ -268,7 +268,11 @@ var init_config = __esm({
|
|
|
268
268
|
DEFAULT_FEATURE_FLAGS = {
|
|
269
269
|
tokensPagination: true,
|
|
270
270
|
balanceStreaming: false,
|
|
271
|
-
shouldAllowGA4: true
|
|
271
|
+
shouldAllowGA4: true,
|
|
272
|
+
swapMode: false,
|
|
273
|
+
swapDefaultDestToken: null,
|
|
274
|
+
swapLockDestToken: false,
|
|
275
|
+
swapAllowedDestTokens: null
|
|
272
276
|
};
|
|
273
277
|
}
|
|
274
278
|
});
|
|
@@ -3437,7 +3441,11 @@ function resolveConfig(input) {
|
|
|
3437
3441
|
const features = {
|
|
3438
3442
|
tokensPagination: input.features?.tokensPagination ?? DEFAULT_FEATURE_FLAGS.tokensPagination,
|
|
3439
3443
|
balanceStreaming: input.features?.balanceStreaming ?? DEFAULT_FEATURE_FLAGS.balanceStreaming,
|
|
3440
|
-
shouldAllowGA4: input.features?.shouldAllowGA4 ?? DEFAULT_FEATURE_FLAGS.shouldAllowGA4
|
|
3444
|
+
shouldAllowGA4: input.features?.shouldAllowGA4 ?? DEFAULT_FEATURE_FLAGS.shouldAllowGA4,
|
|
3445
|
+
swapMode: input.features?.swapMode ?? DEFAULT_FEATURE_FLAGS.swapMode,
|
|
3446
|
+
swapDefaultDestToken: input.features?.swapDefaultDestToken ?? DEFAULT_FEATURE_FLAGS.swapDefaultDestToken,
|
|
3447
|
+
swapLockDestToken: input.features?.swapLockDestToken ?? DEFAULT_FEATURE_FLAGS.swapLockDestToken,
|
|
3448
|
+
swapAllowedDestTokens: input.features?.swapAllowedDestTokens ?? DEFAULT_FEATURE_FLAGS.swapAllowedDestTokens
|
|
3441
3449
|
};
|
|
3442
3450
|
return {
|
|
3443
3451
|
apiKey: input.apiKey,
|
|
@@ -3639,7 +3647,6 @@ var init_sdkRpc = __esm({
|
|
|
3639
3647
|
});
|
|
3640
3648
|
|
|
3641
3649
|
// src/wallets/solana.ts
|
|
3642
|
-
import { Transaction, VersionedTransaction } from "@solana/web3.js";
|
|
3643
3650
|
function getPublicKeyString(provider) {
|
|
3644
3651
|
const publicKey = provider?.publicKey;
|
|
3645
3652
|
if (!publicKey) return null;
|
|
@@ -3654,8 +3661,9 @@ function decodeBase64(serializedTransaction) {
|
|
|
3654
3661
|
const binary = globalThis.atob(trimmed);
|
|
3655
3662
|
return Uint8Array.from(binary, (char) => char.charCodeAt(0));
|
|
3656
3663
|
}
|
|
3657
|
-
function decodeBase64Transaction(serializedTransaction) {
|
|
3664
|
+
async function decodeBase64Transaction(serializedTransaction) {
|
|
3658
3665
|
const bytes = decodeBase64(serializedTransaction);
|
|
3666
|
+
const { Transaction, VersionedTransaction } = await import("@solana/web3.js");
|
|
3659
3667
|
try {
|
|
3660
3668
|
return VersionedTransaction.deserialize(bytes);
|
|
3661
3669
|
} catch {
|
|
@@ -3745,7 +3753,9 @@ function toSolanaWalletInterface(provider) {
|
|
|
3745
3753
|
return "solana-mainnet-beta";
|
|
3746
3754
|
},
|
|
3747
3755
|
async sendSerializedTransaction(serializedTransactionBase64, chainId) {
|
|
3748
|
-
const transaction = decodeBase64Transaction(
|
|
3756
|
+
const transaction = await decodeBase64Transaction(
|
|
3757
|
+
serializedTransactionBase64
|
|
3758
|
+
);
|
|
3749
3759
|
if (provider.signAndSendTransaction) {
|
|
3750
3760
|
const result = await provider.signAndSendTransaction(transaction, {
|
|
3751
3761
|
preflightCommitment: "confirmed"
|