@talismn/balances 0.0.0-pr2091-20250716130722 → 0.0.0-pr2091-20250717014619
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.
@@ -1557,13 +1557,25 @@ const getMiniMetadata$6 = () => {
|
|
1557
1557
|
};
|
1558
1558
|
|
1559
1559
|
const getTransferCallData$6 = ({
|
1560
|
-
|
1560
|
+
from,
|
1561
1561
|
// to,
|
1562
|
-
|
1562
|
+
value,
|
1563
1563
|
token
|
1564
1564
|
}) => {
|
1565
1565
|
if (!chaindataProvider.isTokenOfType(token, MODULE_TYPE$6)) throw new Error(`Token type ${token.type} is not ${MODULE_TYPE$6}.`);
|
1566
|
-
|
1566
|
+
const fromPubkey = new web3_js.PublicKey(from);
|
1567
|
+
const transferIx = web3_js.SystemProgram.transfer({
|
1568
|
+
fromPubkey,
|
1569
|
+
toPubkey: new web3_js.PublicKey(from),
|
1570
|
+
lamports: Number(value)
|
1571
|
+
});
|
1572
|
+
const tx = new web3_js.Transaction().add(transferIx);
|
1573
|
+
tx.feePayer = fromPubkey;
|
1574
|
+
return tx.serialize({
|
1575
|
+
// its not signed yet so we need to toggle these flags to false
|
1576
|
+
requireAllSignatures: false,
|
1577
|
+
verifySignatures: false
|
1578
|
+
}).toString("base64");
|
1567
1579
|
};
|
1568
1580
|
|
1569
1581
|
const SUBSCRIPTION_INTERVAL$2 = 6_000;
|
@@ -1557,13 +1557,25 @@ const getMiniMetadata$6 = () => {
|
|
1557
1557
|
};
|
1558
1558
|
|
1559
1559
|
const getTransferCallData$6 = ({
|
1560
|
-
|
1560
|
+
from,
|
1561
1561
|
// to,
|
1562
|
-
|
1562
|
+
value,
|
1563
1563
|
token
|
1564
1564
|
}) => {
|
1565
1565
|
if (!chaindataProvider.isTokenOfType(token, MODULE_TYPE$6)) throw new Error(`Token type ${token.type} is not ${MODULE_TYPE$6}.`);
|
1566
|
-
|
1566
|
+
const fromPubkey = new web3_js.PublicKey(from);
|
1567
|
+
const transferIx = web3_js.SystemProgram.transfer({
|
1568
|
+
fromPubkey,
|
1569
|
+
toPubkey: new web3_js.PublicKey(from),
|
1570
|
+
lamports: Number(value)
|
1571
|
+
});
|
1572
|
+
const tx = new web3_js.Transaction().add(transferIx);
|
1573
|
+
tx.feePayer = fromPubkey;
|
1574
|
+
return tx.serialize({
|
1575
|
+
// its not signed yet so we need to toggle these flags to false
|
1576
|
+
requireAllSignatures: false,
|
1577
|
+
verifySignatures: false
|
1578
|
+
}).toString("base64");
|
1567
1579
|
};
|
1568
1580
|
|
1569
1581
|
const SUBSCRIPTION_INTERVAL$2 = 6_000;
|
@@ -7,7 +7,7 @@ import z from 'zod/v4';
|
|
7
7
|
import anylogger from 'anylogger';
|
8
8
|
import { of, Observable, distinctUntilChanged, map, timer, switchMap, from, firstValueFrom, combineLatest, BehaviorSubject, shareReplay, startWith, filter, defer, catchError, EMPTY, tap } from 'rxjs';
|
9
9
|
import BigNumber from 'bignumber.js';
|
10
|
-
import { PublicKey } from '@solana/web3.js';
|
10
|
+
import { PublicKey, SystemProgram, Transaction } from '@solana/web3.js';
|
11
11
|
import { isNotNil, BigMath, isArrayOf, isBigInt, planckToTokens, isAbortError, getSharedObservable, keepAlive, isTruthy } from '@talismn/util';
|
12
12
|
import { parseMetadataRpc, toHex, unifyMetadata, decAnyMetadata, getDynamicBuilder, getLookupFn, decodeScale, getStorageKeyPrefix, Twox128, compactMetadata, encodeMetadata, papiParse, papiStringify } from '@talismn/scale';
|
13
13
|
import { newTokenRates } from '@talismn/token-rates';
|
@@ -1548,13 +1548,25 @@ const getMiniMetadata$6 = () => {
|
|
1548
1548
|
};
|
1549
1549
|
|
1550
1550
|
const getTransferCallData$6 = ({
|
1551
|
-
|
1551
|
+
from,
|
1552
1552
|
// to,
|
1553
|
-
|
1553
|
+
value,
|
1554
1554
|
token
|
1555
1555
|
}) => {
|
1556
1556
|
if (!isTokenOfType(token, MODULE_TYPE$6)) throw new Error(`Token type ${token.type} is not ${MODULE_TYPE$6}.`);
|
1557
|
-
|
1557
|
+
const fromPubkey = new PublicKey(from);
|
1558
|
+
const transferIx = SystemProgram.transfer({
|
1559
|
+
fromPubkey,
|
1560
|
+
toPubkey: new PublicKey(from),
|
1561
|
+
lamports: Number(value)
|
1562
|
+
});
|
1563
|
+
const tx = new Transaction().add(transferIx);
|
1564
|
+
tx.feePayer = fromPubkey;
|
1565
|
+
return tx.serialize({
|
1566
|
+
// its not signed yet so we need to toggle these flags to false
|
1567
|
+
requireAllSignatures: false,
|
1568
|
+
verifySignatures: false
|
1569
|
+
}).toString("base64");
|
1558
1570
|
};
|
1559
1571
|
|
1560
1572
|
const SUBSCRIPTION_INTERVAL$2 = 6_000;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@talismn/balances",
|
3
|
-
"version": "0.0.0-pr2091-
|
3
|
+
"version": "0.0.0-pr2091-20250717014619",
|
4
4
|
"author": "Talisman",
|
5
5
|
"homepage": "https://talisman.xyz",
|
6
6
|
"license": "GPL-3.0-or-later",
|
@@ -35,14 +35,14 @@
|
|
35
35
|
"scale-ts": "^1.6.1",
|
36
36
|
"viem": "^2.27.3",
|
37
37
|
"zod": "^3.25.62",
|
38
|
-
"@talismn/chain-connector": "0.0.0-pr2091-
|
39
|
-
"@talismn/chain-connector-evm": "0.0.0-pr2091-
|
40
|
-
"@talismn/
|
41
|
-
"@talismn/
|
42
|
-
"@talismn/
|
43
|
-
"@talismn/scale": "0.0.0-pr2091-
|
44
|
-
"@talismn/token-rates": "0.0.0-pr2091-
|
45
|
-
"@talismn/util": "0.0.0-pr2091-
|
38
|
+
"@talismn/chain-connector": "0.0.0-pr2091-20250717014619",
|
39
|
+
"@talismn/chain-connector-evm": "0.0.0-pr2091-20250717014619",
|
40
|
+
"@talismn/chain-connector-sol": "0.0.0-pr2091-20250717014619",
|
41
|
+
"@talismn/chaindata-provider": "0.0.0-pr2091-20250717014619",
|
42
|
+
"@talismn/sapi": "0.0.0-pr2091-20250717014619",
|
43
|
+
"@talismn/scale": "0.0.0-pr2091-20250717014619",
|
44
|
+
"@talismn/token-rates": "0.0.0-pr2091-20250717014619",
|
45
|
+
"@talismn/util": "0.0.0-pr2091-20250717014619",
|
46
46
|
"@talismn/crypto": "0.1.5"
|
47
47
|
},
|
48
48
|
"devDependencies": {
|
@@ -58,8 +58,8 @@
|
|
58
58
|
"jest": "^29.7.0",
|
59
59
|
"ts-jest": "^29.2.5",
|
60
60
|
"typescript": "^5.6.3",
|
61
|
-
"@talismn/
|
62
|
-
"@talismn/
|
61
|
+
"@talismn/tsconfig": "0.0.2",
|
62
|
+
"@talismn/eslint-config": "0.0.3"
|
63
63
|
},
|
64
64
|
"peerDependencies": {
|
65
65
|
"@polkadot/api-contract": "*",
|