@shapeshiftoss/unchained-client 10.14.6 → 10.14.7-alpha.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/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/cosmossdk/mayachain/parser/__tests__/mockData/mayachainStreamingSwapOutbound.d.ts +1 -1
- package/dist/cjs/cosmossdk/mayachain/parser/__tests__/mockData/mayachainSwapOutbound.d.ts +1 -1
- package/dist/cjs/cosmossdk/mayachain/parser/__tests__/mockData/mayachainSwapRefund.d.ts +1 -1
- package/dist/cjs/evm/bnbsmartchain/parser/__tests__/bnbsmartchain.test.js +32 -32
- package/dist/cjs/evm/bnbsmartchain/parser/__tests__/mockData/{bep1155.js → erc1155.js} +4 -4
- package/dist/cjs/evm/bnbsmartchain/parser/__tests__/mockData/{bep20Approve.js → erc20Approve.js} +3 -3
- package/dist/cjs/evm/bnbsmartchain/parser/__tests__/mockData/{bep721.js → erc721.js} +4 -4
- package/dist/cjs/evm/bnbsmartchain/parser/__tests__/mockData/tokenSelfSend.js +1 -1
- package/dist/cjs/evm/bnbsmartchain/parser/__tests__/mockData/tokenStandard.js +1 -1
- package/dist/cjs/evm/bnbsmartchain/parser/__tests__/mockData/zrxTradeBnbToBusd.js +3 -3
- package/dist/cjs/evm/bnbsmartchain/parser/__tests__/mockData/zrxTradeBusdToBnb.js +2 -2
- package/dist/cjs/evm/bnbsmartchain/parser/__tests__/mockData/zrxTradeUsdtToBusd.js +4 -4
- package/dist/cjs/evm/bnbsmartchain/parser/index.js +2 -2
- package/dist/cjs/evm/parser/index.js +0 -6
- package/dist/cjs/evm/parser/types.d.ts +1 -2
- package/dist/cjs/generated/arbitrum/apis/V1Api.d.ts +15 -0
- package/dist/cjs/generated/arbitrum/apis/V1Api.js +24 -0
- package/dist/cjs/generated/solana/apis/V1Api.d.ts +3 -3
- package/dist/cjs/generated/solana/apis/V1Api.js +1 -1
- package/dist/cjs/generated/solana/models/Token.d.ts +5 -22
- package/dist/cjs/generated/solana/models/Token.js +7 -15
- package/dist/cjs/generated/solana/models/TokenDetails.d.ts +55 -0
- package/dist/cjs/generated/solana/models/TokenDetails.js +63 -0
- package/dist/cjs/generated/solana/models/index.d.ts +1 -0
- package/dist/cjs/generated/solana/models/index.js +1 -0
- package/dist/cjs/generated/thorchain/apis/ProxyApi.d.ts +8 -0
- package/dist/cjs/generated/thorchain/apis/ProxyApi.js +20 -0
- package/dist/cjs/solana/parser/__tests__/mockData/tokens.d.ts +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/cosmossdk/mayachain/parser/__tests__/mockData/mayachainStreamingSwapOutbound.d.ts +1 -1
- package/dist/esm/cosmossdk/mayachain/parser/__tests__/mockData/mayachainSwapOutbound.d.ts +1 -1
- package/dist/esm/cosmossdk/mayachain/parser/__tests__/mockData/mayachainSwapRefund.d.ts +1 -1
- package/dist/esm/evm/bnbsmartchain/parser/__tests__/bnbsmartchain.test.js +32 -32
- package/dist/esm/evm/bnbsmartchain/parser/__tests__/mockData/{bep1155.js → erc1155.js} +4 -4
- package/dist/esm/evm/bnbsmartchain/parser/__tests__/mockData/{bep20Approve.js → erc20Approve.js} +3 -3
- package/dist/esm/evm/bnbsmartchain/parser/__tests__/mockData/{bep721.js → erc721.js} +4 -4
- package/dist/esm/evm/bnbsmartchain/parser/__tests__/mockData/tokenSelfSend.js +1 -1
- package/dist/esm/evm/bnbsmartchain/parser/__tests__/mockData/tokenStandard.js +1 -1
- package/dist/esm/evm/bnbsmartchain/parser/__tests__/mockData/zrxTradeBnbToBusd.js +3 -3
- package/dist/esm/evm/bnbsmartchain/parser/__tests__/mockData/zrxTradeBusdToBnb.js +2 -2
- package/dist/esm/evm/bnbsmartchain/parser/__tests__/mockData/zrxTradeUsdtToBusd.js +4 -4
- package/dist/esm/evm/bnbsmartchain/parser/index.js +2 -2
- package/dist/esm/evm/parser/index.js +0 -6
- package/dist/esm/evm/parser/types.d.ts +1 -2
- package/dist/esm/generated/arbitrum/apis/V1Api.d.ts +15 -0
- package/dist/esm/generated/arbitrum/apis/V1Api.js +24 -0
- package/dist/esm/generated/solana/apis/V1Api.d.ts +3 -3
- package/dist/esm/generated/solana/apis/V1Api.js +2 -2
- package/dist/esm/generated/solana/models/Token.d.ts +5 -22
- package/dist/esm/generated/solana/models/Token.js +7 -15
- package/dist/esm/generated/solana/models/TokenDetails.d.ts +55 -0
- package/dist/esm/generated/solana/models/TokenDetails.js +56 -0
- package/dist/esm/generated/solana/models/index.d.ts +1 -0
- package/dist/esm/generated/solana/models/index.js +1 -0
- package/dist/esm/generated/thorchain/apis/ProxyApi.d.ts +8 -0
- package/dist/esm/generated/thorchain/apis/ProxyApi.js +20 -0
- package/dist/esm/solana/parser/__tests__/mockData/tokens.d.ts +1 -1
- package/package.json +9 -6
- package/CHANGELOG.md +0 -409
- package/dist/cjs/evm/bnbsmartchain/parser/bep20.d.ts +0 -22
- package/dist/cjs/evm/bnbsmartchain/parser/bep20.js +0 -56
- package/dist/esm/evm/bnbsmartchain/parser/bep20.d.ts +0 -22
- package/dist/esm/evm/bnbsmartchain/parser/bep20.js +0 -52
- /package/dist/cjs/evm/bnbsmartchain/parser/__tests__/mockData/{bep1155.d.ts → erc1155.d.ts} +0 -0
- /package/dist/cjs/evm/bnbsmartchain/parser/__tests__/mockData/{bep20Approve.d.ts → erc20Approve.d.ts} +0 -0
- /package/dist/cjs/evm/bnbsmartchain/parser/__tests__/mockData/{bep721.d.ts → erc721.d.ts} +0 -0
- /package/dist/esm/evm/bnbsmartchain/parser/__tests__/mockData/{bep1155.d.ts → erc1155.d.ts} +0 -0
- /package/dist/esm/evm/bnbsmartchain/parser/__tests__/mockData/{bep20Approve.d.ts → erc20Approve.d.ts} +0 -0
- /package/dist/esm/evm/bnbsmartchain/parser/__tests__/mockData/{bep721.d.ts → erc721.d.ts} +0 -0
|
@@ -9,11 +9,11 @@ const vitest_1 = require("vitest");
|
|
|
9
9
|
const types_1 = require("../../../../types");
|
|
10
10
|
const index_1 = require("../../index");
|
|
11
11
|
const index_2 = require("../index");
|
|
12
|
-
const bep20Approve_1 = __importDefault(require("./mockData/bep20Approve"));
|
|
13
|
-
const bep721_1 = __importDefault(require("./mockData/bep721"));
|
|
14
|
-
const bep1155_1 = __importDefault(require("./mockData/bep1155"));
|
|
15
12
|
const bnbSelfSend_1 = __importDefault(require("./mockData/bnbSelfSend"));
|
|
16
13
|
const bnbStandard_1 = __importDefault(require("./mockData/bnbStandard"));
|
|
14
|
+
const erc20Approve_1 = __importDefault(require("./mockData/erc20Approve"));
|
|
15
|
+
const erc721_1 = __importDefault(require("./mockData/erc721"));
|
|
16
|
+
const erc1155_1 = __importDefault(require("./mockData/erc1155"));
|
|
17
17
|
const tokens_1 = require("./mockData/tokens");
|
|
18
18
|
const tokenSelfSend_1 = __importDefault(require("./mockData/tokenSelfSend"));
|
|
19
19
|
const tokenStandard_1 = __importDefault(require("./mockData/tokenStandard"));
|
|
@@ -176,7 +176,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
176
176
|
type: types_1.TransferType.Send,
|
|
177
177
|
from: address,
|
|
178
178
|
to: '0xC66bfff5C2ec26F60542bD3C862d7846F0783fdf',
|
|
179
|
-
assetId: 'eip155:56/
|
|
179
|
+
assetId: 'eip155:56/erc20:0x55d398326f99059ff775485246999027b3197955',
|
|
180
180
|
totalValue: '200000000000000000000',
|
|
181
181
|
components: [{ value: '200000000000000000000' }],
|
|
182
182
|
token: tokens_1.usdtToken,
|
|
@@ -219,7 +219,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
219
219
|
type: types_1.TransferType.Receive,
|
|
220
220
|
from: '0xc4178B5673633c15c3a2077A1D7f0fF1Be8a4a44',
|
|
221
221
|
to: address,
|
|
222
|
-
assetId: 'eip155:56/
|
|
222
|
+
assetId: 'eip155:56/erc20:0x55d398326f99059ff775485246999027b3197955',
|
|
223
223
|
totalValue: '200000000000000000000',
|
|
224
224
|
components: [{ value: '200000000000000000000' }],
|
|
225
225
|
token: tokens_1.usdtToken,
|
|
@@ -230,9 +230,9 @@ const txParser = new index_2.TransactionParser({
|
|
|
230
230
|
(0, vitest_1.expect)(expected).toEqual(actual);
|
|
231
231
|
});
|
|
232
232
|
});
|
|
233
|
-
(0, vitest_1.describe)('
|
|
233
|
+
(0, vitest_1.describe)('erc721', () => {
|
|
234
234
|
(0, vitest_1.it)('should be able to parse mempool send', async () => {
|
|
235
|
-
const { txMempool } =
|
|
235
|
+
const { txMempool } = erc721_1.default;
|
|
236
236
|
const address = '0xc86d6a700B82C62A14458858d17d0e6a3942f424';
|
|
237
237
|
const expected = {
|
|
238
238
|
txid: txMempool.txid,
|
|
@@ -248,7 +248,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
248
248
|
(0, vitest_1.expect)(actual).toEqual(expected);
|
|
249
249
|
});
|
|
250
250
|
(0, vitest_1.it)('should be able to parse send', async () => {
|
|
251
|
-
const { tx } =
|
|
251
|
+
const { tx } = erc721_1.default;
|
|
252
252
|
const address = '0xc86d6a700B82C62A14458858d17d0e6a3942f424';
|
|
253
253
|
const expected = {
|
|
254
254
|
txid: tx.txid,
|
|
@@ -268,7 +268,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
268
268
|
type: types_1.TransferType.Send,
|
|
269
269
|
to: '0x26bCA820c78DDe0349960457960e7b80548E37e3',
|
|
270
270
|
from: address,
|
|
271
|
-
assetId: 'eip155:56/
|
|
271
|
+
assetId: 'eip155:56/erc721:0xd7c79abeb8d8b21e7638a8aadfdcc1438d24b483/6201612',
|
|
272
272
|
totalValue: '1',
|
|
273
273
|
components: [{ value: '1' }],
|
|
274
274
|
id: '6201612',
|
|
@@ -285,7 +285,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
285
285
|
(0, vitest_1.expect)(actual).toEqual(expected);
|
|
286
286
|
});
|
|
287
287
|
(0, vitest_1.it)('should be able to parse mempool receive', async () => {
|
|
288
|
-
const { txMempool } =
|
|
288
|
+
const { txMempool } = erc721_1.default;
|
|
289
289
|
const address = '0x26bCA820c78DDe0349960457960e7b80548E37e3';
|
|
290
290
|
const expected = {
|
|
291
291
|
txid: txMempool.txid,
|
|
@@ -301,7 +301,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
301
301
|
(0, vitest_1.expect)(actual).toEqual(expected);
|
|
302
302
|
});
|
|
303
303
|
(0, vitest_1.it)('should be able to parse receive', async () => {
|
|
304
|
-
const { tx } =
|
|
304
|
+
const { tx } = erc721_1.default;
|
|
305
305
|
const address = '0x26bCA820c78DDe0349960457960e7b80548E37e3';
|
|
306
306
|
const expected = {
|
|
307
307
|
txid: tx.txid,
|
|
@@ -317,7 +317,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
317
317
|
type: types_1.TransferType.Receive,
|
|
318
318
|
to: address,
|
|
319
319
|
from: '0xc86d6a700B82C62A14458858d17d0e6a3942f424',
|
|
320
|
-
assetId: 'eip155:56/
|
|
320
|
+
assetId: 'eip155:56/erc721:0xd7c79abeb8d8b21e7638a8aadfdcc1438d24b483/6201612',
|
|
321
321
|
totalValue: '1',
|
|
322
322
|
components: [{ value: '1' }],
|
|
323
323
|
id: '6201612',
|
|
@@ -334,9 +334,9 @@ const txParser = new index_2.TransactionParser({
|
|
|
334
334
|
(0, vitest_1.expect)(actual).toEqual(expected);
|
|
335
335
|
});
|
|
336
336
|
});
|
|
337
|
-
(0, vitest_1.describe)('
|
|
337
|
+
(0, vitest_1.describe)('erc1155', () => {
|
|
338
338
|
(0, vitest_1.it)('should be able to parse mempool send', async () => {
|
|
339
|
-
const { txMempool } =
|
|
339
|
+
const { txMempool } = erc1155_1.default;
|
|
340
340
|
const address = '0x606a712666DD5EeF29d2F0360874C8ED1E72A007';
|
|
341
341
|
const expected = {
|
|
342
342
|
txid: txMempool.txid,
|
|
@@ -352,7 +352,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
352
352
|
(0, vitest_1.expect)(actual).toEqual(expected);
|
|
353
353
|
});
|
|
354
354
|
(0, vitest_1.it)('should be able to parse send', async () => {
|
|
355
|
-
const { tx } =
|
|
355
|
+
const { tx } = erc1155_1.default;
|
|
356
356
|
const address = '0x606a712666DD5EeF29d2F0360874C8ED1E72A007';
|
|
357
357
|
const expected = {
|
|
358
358
|
txid: tx.txid,
|
|
@@ -372,7 +372,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
372
372
|
type: types_1.TransferType.Send,
|
|
373
373
|
to: '0xD3106B990148CFED6D36eaC4E2066B9356dB423b',
|
|
374
374
|
from: address,
|
|
375
|
-
assetId: 'eip155:56/
|
|
375
|
+
assetId: 'eip155:56/erc1155:0xe4395bd1dae0687dcf6bfbafdaa8edb5a2065eef/550',
|
|
376
376
|
totalValue: '1',
|
|
377
377
|
components: [{ value: '1' }],
|
|
378
378
|
id: '550',
|
|
@@ -389,7 +389,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
389
389
|
(0, vitest_1.expect)(actual).toEqual(expected);
|
|
390
390
|
});
|
|
391
391
|
(0, vitest_1.it)('should be able to parse mempool receive', async () => {
|
|
392
|
-
const { txMempool } =
|
|
392
|
+
const { txMempool } = erc1155_1.default;
|
|
393
393
|
const address = '0xD3106B990148CFED6D36eaC4E2066B9356dB423b';
|
|
394
394
|
const expected = {
|
|
395
395
|
txid: txMempool.txid,
|
|
@@ -405,7 +405,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
405
405
|
(0, vitest_1.expect)(actual).toEqual(expected);
|
|
406
406
|
});
|
|
407
407
|
(0, vitest_1.it)('should be able to parse receive', async () => {
|
|
408
|
-
const { tx } =
|
|
408
|
+
const { tx } = erc1155_1.default;
|
|
409
409
|
const address = '0xD3106B990148CFED6D36eaC4E2066B9356dB423b';
|
|
410
410
|
const expected = {
|
|
411
411
|
txid: tx.txid,
|
|
@@ -421,7 +421,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
421
421
|
type: types_1.TransferType.Receive,
|
|
422
422
|
to: address,
|
|
423
423
|
from: '0x606a712666DD5EeF29d2F0360874C8ED1E72A007',
|
|
424
|
-
assetId: 'eip155:56/
|
|
424
|
+
assetId: 'eip155:56/erc1155:0xe4395bd1dae0687dcf6bfbafdaa8edb5a2065eef/550',
|
|
425
425
|
totalValue: '1',
|
|
426
426
|
components: [{ value: '1' }],
|
|
427
427
|
id: '550',
|
|
@@ -548,7 +548,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
548
548
|
type: types_1.TransferType.Send,
|
|
549
549
|
from: address,
|
|
550
550
|
to: address,
|
|
551
|
-
assetId: 'eip155:56/
|
|
551
|
+
assetId: 'eip155:56/erc20:0x55d398326f99059ff775485246999027b3197955',
|
|
552
552
|
totalValue: '200000000000000000000',
|
|
553
553
|
components: [{ value: '200000000000000000000' }],
|
|
554
554
|
token: tokens_1.usdtToken,
|
|
@@ -557,7 +557,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
557
557
|
type: types_1.TransferType.Receive,
|
|
558
558
|
from: address,
|
|
559
559
|
to: address,
|
|
560
|
-
assetId: 'eip155:56/
|
|
560
|
+
assetId: 'eip155:56/erc20:0x55d398326f99059ff775485246999027b3197955',
|
|
561
561
|
totalValue: '200000000000000000000',
|
|
562
562
|
components: [{ value: '200000000000000000000' }],
|
|
563
563
|
token: tokens_1.usdtToken,
|
|
@@ -568,9 +568,9 @@ const txParser = new index_2.TransactionParser({
|
|
|
568
568
|
(0, vitest_1.expect)(expected).toEqual(actual);
|
|
569
569
|
});
|
|
570
570
|
});
|
|
571
|
-
(0, vitest_1.describe)('
|
|
571
|
+
(0, vitest_1.describe)('erc20', () => {
|
|
572
572
|
(0, vitest_1.it)('should be able to parse approve mempool', async () => {
|
|
573
|
-
const { txMempool } =
|
|
573
|
+
const { txMempool } = erc20Approve_1.default;
|
|
574
574
|
const address = '0xeFcdFc962cf71Da4D147aA42A72C106d557Ae7Fe';
|
|
575
575
|
const expected = {
|
|
576
576
|
txid: txMempool.txid,
|
|
@@ -582,9 +582,9 @@ const txParser = new index_2.TransactionParser({
|
|
|
582
582
|
status: types_1.TxStatus.Pending,
|
|
583
583
|
transfers: [],
|
|
584
584
|
data: {
|
|
585
|
-
assetId: 'eip155:56/
|
|
585
|
+
assetId: 'eip155:56/erc20:0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c',
|
|
586
586
|
method: 'approve',
|
|
587
|
-
parser: '
|
|
587
|
+
parser: 'erc20',
|
|
588
588
|
value: '115792089237316195423570985008687907853269984665640564039457584007913129639935',
|
|
589
589
|
},
|
|
590
590
|
};
|
|
@@ -592,7 +592,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
592
592
|
(0, vitest_1.expect)(expected).toEqual(actual);
|
|
593
593
|
});
|
|
594
594
|
(0, vitest_1.it)('should be able to parse approve', async () => {
|
|
595
|
-
const { tx } =
|
|
595
|
+
const { tx } = erc20Approve_1.default;
|
|
596
596
|
const address = '0xeFcdFc962cf71Da4D147aA42A72C106d557Ae7Fe';
|
|
597
597
|
const expected = {
|
|
598
598
|
txid: tx.txid,
|
|
@@ -609,9 +609,9 @@ const txParser = new index_2.TransactionParser({
|
|
|
609
609
|
},
|
|
610
610
|
transfers: [],
|
|
611
611
|
data: {
|
|
612
|
-
assetId: 'eip155:56/
|
|
612
|
+
assetId: 'eip155:56/erc20:0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c',
|
|
613
613
|
method: 'approve',
|
|
614
|
-
parser: '
|
|
614
|
+
parser: 'erc20',
|
|
615
615
|
value: '115792089237316195423570985008687907853269984665640564039457584007913129639935',
|
|
616
616
|
},
|
|
617
617
|
};
|
|
@@ -633,7 +633,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
633
633
|
type: types_1.TransferType.Receive,
|
|
634
634
|
};
|
|
635
635
|
const sellTransfer = {
|
|
636
|
-
assetId: 'eip155:56/
|
|
636
|
+
assetId: 'eip155:56/erc20:0xe9e7cea3dedca5984780bafc599bd69add087d56',
|
|
637
637
|
components: [{ value: '1489033385864185057' }],
|
|
638
638
|
from: address,
|
|
639
639
|
to: '0x51e6D27FA57373d8d4C256231241053a70Cb1d93',
|
|
@@ -666,7 +666,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
666
666
|
const address = '0xb8687c5f88399b0E70DD69F2fBd2200957cDaf38';
|
|
667
667
|
const trade = { dexName: types_1.Dex.Zrx, type: types_1.TradeType.Trade };
|
|
668
668
|
const buyTransfer = {
|
|
669
|
-
assetId: 'eip155:56/
|
|
669
|
+
assetId: 'eip155:56/erc20:0xe9e7cea3dedca5984780bafc599bd69add087d56',
|
|
670
670
|
components: [{ value: '326087208829856917029' }],
|
|
671
671
|
from: '0xdB6f1920A889355780aF7570773609Bd8Cb1f498',
|
|
672
672
|
to: address,
|
|
@@ -707,7 +707,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
707
707
|
const address = '0xba599D1526952c14779e6A9D31D912C6A02f5B9C';
|
|
708
708
|
const trade = { dexName: types_1.Dex.Zrx, type: types_1.TradeType.Trade };
|
|
709
709
|
const buyTransfer = {
|
|
710
|
-
assetId: 'eip155:56/
|
|
710
|
+
assetId: 'eip155:56/erc20:0xe9e7cea3dedca5984780bafc599bd69add087d56',
|
|
711
711
|
components: [{ value: '1918012446944444331677' }],
|
|
712
712
|
from: '0xdB6f1920A889355780aF7570773609Bd8Cb1f498',
|
|
713
713
|
to: address,
|
|
@@ -716,7 +716,7 @@ const txParser = new index_2.TransactionParser({
|
|
|
716
716
|
type: types_1.TransferType.Receive,
|
|
717
717
|
};
|
|
718
718
|
const sellTransfer = {
|
|
719
|
-
assetId: 'eip155:56/
|
|
719
|
+
assetId: 'eip155:56/erc20:0x55d398326f99059ff775485246999027b3197955',
|
|
720
720
|
components: [{ value: '1917821751000000000000' }],
|
|
721
721
|
from: address,
|
|
722
722
|
to: '0xdB6f1920A889355780aF7570773609Bd8Cb1f498',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mempoolMock_1 = require("./mempoolMock");
|
|
4
|
-
const
|
|
4
|
+
const erc1155 = {
|
|
5
5
|
txid: '0x2b63ef5aaf9292023be8936646de66bc389c1c984928a79c93a632e391e8c00e',
|
|
6
6
|
blockHash: '0x3e0a62ba74234949370c2f7d85c15397fb2c61e34de6375227de9dff162e9e48',
|
|
7
7
|
blockHeight: 28094651,
|
|
@@ -22,7 +22,7 @@ const bep1155 = {
|
|
|
22
22
|
decimals: 18,
|
|
23
23
|
name: 'Nfterrium Nomad',
|
|
24
24
|
symbol: 'NTMN',
|
|
25
|
-
type: '
|
|
25
|
+
type: 'ERC1155',
|
|
26
26
|
from: '0x606a712666DD5EeF29d2F0360874C8ED1E72A007',
|
|
27
27
|
to: '0xD3106B990148CFED6D36eaC4E2066B9356dB423b',
|
|
28
28
|
value: '1',
|
|
@@ -32,6 +32,6 @@ const bep1155 = {
|
|
|
32
32
|
internalTxs: [],
|
|
33
33
|
};
|
|
34
34
|
exports.default = {
|
|
35
|
-
tx:
|
|
36
|
-
txMempool: (0, mempoolMock_1.mempoolMock)(
|
|
35
|
+
tx: erc1155,
|
|
36
|
+
txMempool: (0, mempoolMock_1.mempoolMock)(erc1155),
|
|
37
37
|
};
|
package/dist/cjs/evm/bnbsmartchain/parser/__tests__/mockData/{bep20Approve.js → erc20Approve.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mempoolMock_1 = require("./mempoolMock");
|
|
4
|
-
const
|
|
4
|
+
const erc20Approve = {
|
|
5
5
|
txid: '0x75df3a69247731e8e4596ff7f03a3e0ec2cdbc0623eeceb165c3ffad3f3ec839',
|
|
6
6
|
blockHash: '0x091b34962754244418133697658b48bcf8036a6e440af358a951f8dba00a6a16',
|
|
7
7
|
blockHeight: 25865860,
|
|
@@ -19,6 +19,6 @@ const bep20Approve = {
|
|
|
19
19
|
internalTxs: [],
|
|
20
20
|
};
|
|
21
21
|
exports.default = {
|
|
22
|
-
tx:
|
|
23
|
-
txMempool: (0, mempoolMock_1.mempoolMock)(
|
|
22
|
+
tx: erc20Approve,
|
|
23
|
+
txMempool: (0, mempoolMock_1.mempoolMock)(erc20Approve),
|
|
24
24
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mempoolMock_1 = require("./mempoolMock");
|
|
4
|
-
const
|
|
4
|
+
const erc721 = {
|
|
5
5
|
txid: '0x807e3c2dca5c00e0e33a1765ac6c78d5ffe4973ef74522902edda4d1d705a38d',
|
|
6
6
|
blockHash: '0xeae71d46c74f4088f0ac47463d82bd00b23fef0150e086248701a6c46c40211f',
|
|
7
7
|
blockHeight: 28094889,
|
|
@@ -22,7 +22,7 @@ const bep721 = {
|
|
|
22
22
|
decimals: 18,
|
|
23
23
|
name: 'TAP FANTASY SKIN',
|
|
24
24
|
symbol: 'TFSKIN',
|
|
25
|
-
type: '
|
|
25
|
+
type: 'ERC721',
|
|
26
26
|
from: '0xc86d6a700B82C62A14458858d17d0e6a3942f424',
|
|
27
27
|
to: '0x26bCA820c78DDe0349960457960e7b80548E37e3',
|
|
28
28
|
value: '1',
|
|
@@ -32,6 +32,6 @@ const bep721 = {
|
|
|
32
32
|
internalTxs: [],
|
|
33
33
|
};
|
|
34
34
|
exports.default = {
|
|
35
|
-
tx:
|
|
36
|
-
txMempool: (0, mempoolMock_1.mempoolMock)(
|
|
35
|
+
tx: erc721,
|
|
36
|
+
txMempool: (0, mempoolMock_1.mempoolMock)(erc721),
|
|
37
37
|
};
|
|
@@ -23,7 +23,7 @@ exports.tokenSelfSend = {
|
|
|
23
23
|
decimals: 18,
|
|
24
24
|
name: 'Tether USD',
|
|
25
25
|
symbol: 'USDT',
|
|
26
|
-
type: '
|
|
26
|
+
type: 'ERC20',
|
|
27
27
|
from: '0xc4178B5673633c15c3a2077A1D7f0fF1Be8a4a44',
|
|
28
28
|
to: '0xc4178B5673633c15c3a2077A1D7f0fF1Be8a4a44',
|
|
29
29
|
value: '200000000000000000000',
|
|
@@ -23,7 +23,7 @@ exports.tokenStandard = {
|
|
|
23
23
|
decimals: 18,
|
|
24
24
|
name: 'Tether USD',
|
|
25
25
|
symbol: 'USDT',
|
|
26
|
-
type: '
|
|
26
|
+
type: 'ERC20',
|
|
27
27
|
from: '0xc4178B5673633c15c3a2077A1D7f0fF1Be8a4a44',
|
|
28
28
|
to: '0xC66bfff5C2ec26F60542bD3C862d7846F0783fdf',
|
|
29
29
|
value: '200000000000000000000',
|
|
@@ -22,7 +22,7 @@ exports.default = {
|
|
|
22
22
|
decimals: 18,
|
|
23
23
|
name: 'Wrapped BNB',
|
|
24
24
|
symbol: 'WBNB',
|
|
25
|
-
type: '
|
|
25
|
+
type: 'ERC20',
|
|
26
26
|
from: '0xdB6f1920A889355780aF7570773609Bd8Cb1f498',
|
|
27
27
|
to: '0x0fe261aeE0d1C4DFdDee4102E82Dd425999065F4',
|
|
28
28
|
value: '1077638000000000000',
|
|
@@ -32,7 +32,7 @@ exports.default = {
|
|
|
32
32
|
decimals: 18,
|
|
33
33
|
name: 'BUSD Token',
|
|
34
34
|
symbol: 'BUSD',
|
|
35
|
-
type: '
|
|
35
|
+
type: 'ERC20',
|
|
36
36
|
from: '0x0fe261aeE0d1C4DFdDee4102E82Dd425999065F4',
|
|
37
37
|
to: '0xdB6f1920A889355780aF7570773609Bd8Cb1f498',
|
|
38
38
|
value: '326087208829856917029',
|
|
@@ -42,7 +42,7 @@ exports.default = {
|
|
|
42
42
|
decimals: 18,
|
|
43
43
|
name: 'BUSD Token',
|
|
44
44
|
symbol: 'BUSD',
|
|
45
|
-
type: '
|
|
45
|
+
type: 'ERC20',
|
|
46
46
|
from: '0xdB6f1920A889355780aF7570773609Bd8Cb1f498',
|
|
47
47
|
to: '0xb8687c5f88399b0E70DD69F2fBd2200957cDaf38',
|
|
48
48
|
value: '326087208829856917029',
|
|
@@ -22,7 +22,7 @@ exports.default = {
|
|
|
22
22
|
decimals: 18,
|
|
23
23
|
name: 'BUSD Token',
|
|
24
24
|
symbol: 'BUSD',
|
|
25
|
-
type: '
|
|
25
|
+
type: 'ERC20',
|
|
26
26
|
from: '0x1bE0Db7727c53b16a22af5Cb12F4680e784cf7eF',
|
|
27
27
|
to: '0x51e6D27FA57373d8d4C256231241053a70Cb1d93',
|
|
28
28
|
value: '1489033385864185057',
|
|
@@ -32,7 +32,7 @@ exports.default = {
|
|
|
32
32
|
decimals: 18,
|
|
33
33
|
name: 'Wrapped BNB',
|
|
34
34
|
symbol: 'WBNB',
|
|
35
|
-
type: '
|
|
35
|
+
type: 'ERC20',
|
|
36
36
|
from: '0x51e6D27FA57373d8d4C256231241053a70Cb1d93',
|
|
37
37
|
to: '0xDef1C0ded9bec7F1a1670819833240f027b25EfF',
|
|
38
38
|
value: '4904343838640863',
|
|
@@ -22,7 +22,7 @@ exports.default = {
|
|
|
22
22
|
decimals: 18,
|
|
23
23
|
name: 'Tether USD',
|
|
24
24
|
symbol: 'USDT',
|
|
25
|
-
type: '
|
|
25
|
+
type: 'ERC20',
|
|
26
26
|
from: '0xba599D1526952c14779e6A9D31D912C6A02f5B9C',
|
|
27
27
|
to: '0xdB6f1920A889355780aF7570773609Bd8Cb1f498',
|
|
28
28
|
value: '1917821751000000000000',
|
|
@@ -32,7 +32,7 @@ exports.default = {
|
|
|
32
32
|
decimals: 18,
|
|
33
33
|
name: 'Tether USD',
|
|
34
34
|
symbol: 'USDT',
|
|
35
|
-
type: '
|
|
35
|
+
type: 'ERC20',
|
|
36
36
|
from: '0xdB6f1920A889355780aF7570773609Bd8Cb1f498',
|
|
37
37
|
to: '0x28ec0B36F0819ecB5005cAB836F4ED5a2eCa4D13',
|
|
38
38
|
value: '1917821751000000000000',
|
|
@@ -42,7 +42,7 @@ exports.default = {
|
|
|
42
42
|
decimals: 18,
|
|
43
43
|
name: 'BUSD Token',
|
|
44
44
|
symbol: 'BUSD',
|
|
45
|
-
type: '
|
|
45
|
+
type: 'ERC20',
|
|
46
46
|
from: '0x28ec0B36F0819ecB5005cAB836F4ED5a2eCa4D13',
|
|
47
47
|
to: '0xdB6f1920A889355780aF7570773609Bd8Cb1f498',
|
|
48
48
|
value: '1918012446944444331677',
|
|
@@ -52,7 +52,7 @@ exports.default = {
|
|
|
52
52
|
decimals: 18,
|
|
53
53
|
name: 'BUSD Token',
|
|
54
54
|
symbol: 'BUSD',
|
|
55
|
-
type: '
|
|
55
|
+
type: 'ERC20',
|
|
56
56
|
from: '0xdB6f1920A889355780aF7570773609Bd8Cb1f498',
|
|
57
57
|
to: '0xba599D1526952c14779e6A9D31D912C6A02f5B9C',
|
|
58
58
|
value: '1918012446944444331677',
|
|
@@ -26,14 +26,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.TransactionParser = void 0;
|
|
27
27
|
const contracts_1 = require("@shapeshiftoss/contracts");
|
|
28
28
|
const parser_1 = require("../../parser");
|
|
29
|
+
const erc20 = __importStar(require("../../parser/erc20"));
|
|
29
30
|
const thorchain = __importStar(require("../../parser/thorchain"));
|
|
30
31
|
const zrx = __importStar(require("../../parser/zrx"));
|
|
31
|
-
const bep20 = __importStar(require("./bep20"));
|
|
32
32
|
class TransactionParser extends parser_1.BaseTransactionParser {
|
|
33
33
|
constructor(args) {
|
|
34
34
|
super(args);
|
|
35
35
|
this.registerParsers([
|
|
36
|
-
new
|
|
36
|
+
new erc20.Parser({ chainId: this.chainId, provider: this.provider }),
|
|
37
37
|
new thorchain.Parser({
|
|
38
38
|
chainId: this.chainId,
|
|
39
39
|
midgardUrl: args.midgardUrl,
|
|
@@ -142,12 +142,6 @@ class BaseTransactionParser {
|
|
|
142
142
|
return caip_1.ASSET_NAMESPACE.erc721;
|
|
143
143
|
case 'ERC1155':
|
|
144
144
|
return caip_1.ASSET_NAMESPACE.erc1155;
|
|
145
|
-
case 'BEP20':
|
|
146
|
-
return caip_1.ASSET_NAMESPACE.bep20;
|
|
147
|
-
case 'BEP721':
|
|
148
|
-
return caip_1.ASSET_NAMESPACE.bep721;
|
|
149
|
-
case 'BEP1155':
|
|
150
|
-
return caip_1.ASSET_NAMESPACE.bep1155;
|
|
151
145
|
default:
|
|
152
146
|
return;
|
|
153
147
|
}
|
|
@@ -2,7 +2,6 @@ import type { evm } from '@shapeshiftoss/common-api';
|
|
|
2
2
|
import type * as mayachain from '../../parser/mayachain';
|
|
3
3
|
import type * as thorchain from '../../parser/thorchain';
|
|
4
4
|
import type { StandardTx } from '../../types';
|
|
5
|
-
import type * as bep20 from '../bnbsmartchain/parser/bep20';
|
|
6
5
|
import type * as cowswap from '../ethereum/parser/cowswap';
|
|
7
6
|
import type * as foxy from '../ethereum/parser/foxy';
|
|
8
7
|
import type * as uniV2 from '../ethereum/parser/uniV2';
|
|
@@ -12,7 +11,7 @@ import type * as erc20 from '../parser/erc20';
|
|
|
12
11
|
import type * as rfox from '../parser/rfox';
|
|
13
12
|
import type * as zrx from '../parser/zrx';
|
|
14
13
|
export type Tx = evm.Tx;
|
|
15
|
-
export type TxMetadata =
|
|
14
|
+
export type TxMetadata = cowswap.TxMetadata | erc20.TxMetadata | foxy.TxMetadata | thorchain.TxMetadata | mayachain.TxMetadata | uniV2.TxMetadata | weth.TxMetadata | zrx.TxMetadata | rfox.TxMetadata | arbitrumBridge.TxMetadata;
|
|
16
15
|
export interface ParsedTx extends StandardTx {
|
|
17
16
|
data?: TxMetadata;
|
|
18
17
|
}
|
|
@@ -20,6 +20,9 @@ export interface EstimateGasRequest {
|
|
|
20
20
|
export interface GetAccountRequest {
|
|
21
21
|
pubkey: string;
|
|
22
22
|
}
|
|
23
|
+
export interface GetRfoxStakingDurationRequest {
|
|
24
|
+
address: string;
|
|
25
|
+
}
|
|
23
26
|
export interface GetTokenMetadataRequest {
|
|
24
27
|
contract: string;
|
|
25
28
|
id: string;
|
|
@@ -82,6 +85,18 @@ export declare class V1Api extends runtime.BaseAPI {
|
|
|
82
85
|
* Get information about the running coinstack
|
|
83
86
|
*/
|
|
84
87
|
getInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseInfo>;
|
|
88
|
+
/**
|
|
89
|
+
* Get rFOX staking duration by contract address
|
|
90
|
+
*/
|
|
91
|
+
getRfoxStakingDurationRaw(requestParameters: GetRfoxStakingDurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
92
|
+
[key: string]: number;
|
|
93
|
+
}>>;
|
|
94
|
+
/**
|
|
95
|
+
* Get rFOX staking duration by contract address
|
|
96
|
+
*/
|
|
97
|
+
getRfoxStakingDuration(requestParameters: GetRfoxStakingDurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
98
|
+
[key: string]: number;
|
|
99
|
+
}>;
|
|
85
100
|
/**
|
|
86
101
|
* Get token metadata
|
|
87
102
|
*/
|
|
@@ -162,6 +162,30 @@ class V1Api extends runtime.BaseAPI {
|
|
|
162
162
|
const response = await this.getInfoRaw(initOverrides);
|
|
163
163
|
return await response.value();
|
|
164
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Get rFOX staking duration by contract address
|
|
167
|
+
*/
|
|
168
|
+
async getRfoxStakingDurationRaw(requestParameters, initOverrides) {
|
|
169
|
+
if (requestParameters.address === null || requestParameters.address === undefined) {
|
|
170
|
+
throw new runtime.RequiredError('address', 'Required parameter requestParameters.address was null or undefined when calling getRfoxStakingDuration.');
|
|
171
|
+
}
|
|
172
|
+
const queryParameters = {};
|
|
173
|
+
const headerParameters = {};
|
|
174
|
+
const response = await this.request({
|
|
175
|
+
path: `/api/v1/rfox/staking-duration/{address}`.replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
|
|
176
|
+
method: 'GET',
|
|
177
|
+
headers: headerParameters,
|
|
178
|
+
query: queryParameters,
|
|
179
|
+
}, initOverrides);
|
|
180
|
+
return new runtime.JSONApiResponse(response);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get rFOX staking duration by contract address
|
|
184
|
+
*/
|
|
185
|
+
async getRfoxStakingDuration(requestParameters, initOverrides) {
|
|
186
|
+
const response = await this.getRfoxStakingDurationRaw(requestParameters, initOverrides);
|
|
187
|
+
return await response.value();
|
|
188
|
+
}
|
|
165
189
|
/**
|
|
166
190
|
* Get token metadata
|
|
167
191
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { Account, BaseInfo, BaseTxHistoryTx, DoRpcRequest200Response, DoRpcRequestRequest, EstimateFeesBody, PriorityFees, SendTxBody,
|
|
13
|
+
import type { Account, BaseInfo, BaseTxHistoryTx, DoRpcRequest200Response, DoRpcRequestRequest, EstimateFeesBody, PriorityFees, SendTxBody, TokenDetails, Tx } from '../models';
|
|
14
14
|
export interface DoRpcRequestOperationRequest {
|
|
15
15
|
doRpcRequestRequest: DoRpcRequestRequest;
|
|
16
16
|
}
|
|
@@ -81,11 +81,11 @@ export declare class V1Api extends runtime.BaseAPI {
|
|
|
81
81
|
/**
|
|
82
82
|
* Get token details
|
|
83
83
|
*/
|
|
84
|
-
getTokenRaw(requestParameters: GetTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
84
|
+
getTokenRaw(requestParameters: GetTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TokenDetails>>;
|
|
85
85
|
/**
|
|
86
86
|
* Get token details
|
|
87
87
|
*/
|
|
88
|
-
getToken(requestParameters: GetTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
88
|
+
getToken(requestParameters: GetTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TokenDetails>;
|
|
89
89
|
/**
|
|
90
90
|
* Get transaction details
|
|
91
91
|
*/
|
|
@@ -177,7 +177,7 @@ class V1Api extends runtime.BaseAPI {
|
|
|
177
177
|
headers: headerParameters,
|
|
178
178
|
query: queryParameters,
|
|
179
179
|
}, initOverrides);
|
|
180
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.
|
|
180
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.TokenDetailsFromJSON)(jsonValue));
|
|
181
181
|
}
|
|
182
182
|
/**
|
|
183
183
|
* Get token details
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { TokenStandard } from './TokenStandard';
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
*
|
|
14
15
|
* @export
|
|
15
16
|
* @interface Token
|
|
16
17
|
*/
|
|
@@ -20,31 +21,13 @@ export interface Token {
|
|
|
20
21
|
* @type {string}
|
|
21
22
|
* @memberof Token
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @type {number}
|
|
27
|
-
* @memberof Token
|
|
28
|
-
*/
|
|
29
|
-
decimals: number;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @type {string}
|
|
33
|
-
* @memberof Token
|
|
34
|
-
*/
|
|
35
|
-
name: string;
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
* @type {string}
|
|
39
|
-
* @memberof Token
|
|
40
|
-
*/
|
|
41
|
-
symbol: string;
|
|
24
|
+
mint: string;
|
|
42
25
|
/**
|
|
43
26
|
*
|
|
44
|
-
* @type {
|
|
27
|
+
* @type {TokenStandard}
|
|
45
28
|
* @memberof Token
|
|
46
29
|
*/
|
|
47
|
-
|
|
30
|
+
tokenStandard: TokenStandard;
|
|
48
31
|
}
|
|
49
32
|
/**
|
|
50
33
|
* Check if a given object implements the Token interface.
|