sushi 6.5.4 → 6.6.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/_cjs/generic/currency/serialized-currency.js +4 -2
- package/_cjs/generic/currency/serialized-currency.js.map +1 -1
- package/_cjs/generic/currency/unwrap-token.js +10 -0
- package/_cjs/generic/currency/unwrap-token.js.map +1 -1
- package/_cjs/stellar/address.js +8 -4
- package/_cjs/stellar/address.js.map +1 -1
- package/_cjs/stellar/config/index.js +1 -0
- package/_cjs/stellar/config/index.js.map +1 -1
- package/_cjs/stellar/config/simple-constants.js +5 -5
- package/_cjs/stellar/config/simple-constants.js.map +1 -1
- package/_cjs/stellar/config/tokens/index.js +19 -0
- package/_cjs/stellar/config/tokens/index.js.map +1 -0
- package/_cjs/stellar/config/tokens/token-maps/default-bases.js +27 -0
- package/_cjs/stellar/config/tokens/token-maps/default-bases.js.map +1 -0
- package/_cjs/stellar/config/tokens/token-maps/default-quote.js +13 -0
- package/_cjs/stellar/config/tokens/token-maps/default-quote.js.map +1 -0
- package/_cjs/stellar/config/tokens/token-maps/index.js +20 -0
- package/_cjs/stellar/config/tokens/token-maps/index.js.map +1 -0
- package/_cjs/stellar/config/tokens/token-maps/stables.js +15 -0
- package/_cjs/stellar/config/tokens/token-maps/stables.js.map +1 -0
- package/_cjs/stellar/config/tokens/tokens/CETES.js +23 -0
- package/_cjs/stellar/config/tokens/tokens/CETES.js.map +1 -0
- package/_cjs/stellar/config/tokens/tokens/EURC.js +23 -0
- package/_cjs/stellar/config/tokens/tokens/EURC.js.map +1 -0
- package/_cjs/stellar/config/tokens/tokens/PYUSD.js +23 -0
- package/_cjs/stellar/config/tokens/tokens/PYUSD.js.map +1 -0
- package/_cjs/stellar/config/tokens/tokens/SolvBTC.js +23 -0
- package/_cjs/stellar/config/tokens/tokens/SolvBTC.js.map +1 -0
- package/_cjs/stellar/config/tokens/tokens/USDC.js +23 -0
- package/_cjs/stellar/config/tokens/tokens/USDC.js.map +1 -0
- package/_cjs/stellar/config/tokens/tokens/USDY.js +23 -0
- package/_cjs/stellar/config/tokens/tokens/USDY.js.map +1 -0
- package/_cjs/stellar/config/tokens/tokens/USTRY.js +23 -0
- package/_cjs/stellar/config/tokens/tokens/USTRY.js.map +1 -0
- package/_cjs/stellar/config/tokens/tokens/XLM.js +23 -0
- package/_cjs/stellar/config/tokens/tokens/XLM.js.map +1 -0
- package/_cjs/stellar/config/tokens/tokens/index.js +26 -0
- package/_cjs/stellar/config/tokens/tokens/index.js.map +1 -0
- package/_cjs/stellar/config/tokens/tokens/xSolvBTC.js +23 -0
- package/_cjs/stellar/config/tokens/tokens/xSolvBTC.js.map +1 -0
- package/_cjs/stellar/currency/currency.js +45 -0
- package/_cjs/stellar/currency/currency.js.map +1 -0
- package/_cjs/stellar/currency/deserialize-currency.js +8 -0
- package/_cjs/stellar/currency/deserialize-currency.js.map +1 -0
- package/_cjs/stellar/currency/index.js +21 -0
- package/_cjs/stellar/currency/index.js.map +1 -0
- package/_cjs/stellar/currency/token.js +94 -0
- package/_cjs/stellar/currency/token.js.map +1 -0
- package/_cjs/stellar/currency/unwrap-token.js +7 -0
- package/_cjs/stellar/currency/unwrap-token.js.map +1 -0
- package/_cjs/stellar/index.js +1 -0
- package/_cjs/stellar/index.js.map +1 -1
- package/_cjs/stellar/types/id.js +3 -0
- package/_cjs/stellar/types/id.js.map +1 -0
- package/_cjs/stellar/types/index.js +3 -0
- package/_cjs/stellar/types/index.js.map +1 -0
- package/_cjs/stellar/utils/normalize-address.js.map +1 -1
- package/_esm/generic/currency/serialized-currency.js +2 -0
- package/_esm/generic/currency/serialized-currency.js.map +1 -1
- package/_esm/generic/currency/unwrap-token.js +10 -0
- package/_esm/generic/currency/unwrap-token.js.map +1 -1
- package/_esm/stellar/address.js +6 -3
- package/_esm/stellar/address.js.map +1 -1
- package/_esm/stellar/config/index.js +1 -0
- package/_esm/stellar/config/index.js.map +1 -1
- package/_esm/stellar/config/simple-constants.js +5 -5
- package/_esm/stellar/config/simple-constants.js.map +1 -1
- package/_esm/stellar/config/tokens/index.js +3 -0
- package/_esm/stellar/config/tokens/index.js.map +1 -0
- package/_esm/stellar/config/tokens/token-maps/default-bases.js +24 -0
- package/_esm/stellar/config/tokens/token-maps/default-bases.js.map +1 -0
- package/_esm/stellar/config/tokens/token-maps/default-quote.js +10 -0
- package/_esm/stellar/config/tokens/token-maps/default-quote.js.map +1 -0
- package/_esm/stellar/config/tokens/token-maps/index.js +4 -0
- package/_esm/stellar/config/tokens/token-maps/index.js.map +1 -0
- package/_esm/stellar/config/tokens/token-maps/stables.js +11 -0
- package/_esm/stellar/config/tokens/token-maps/stables.js.map +1 -0
- package/_esm/stellar/config/tokens/tokens/CETES.js +20 -0
- package/_esm/stellar/config/tokens/tokens/CETES.js.map +1 -0
- package/_esm/stellar/config/tokens/tokens/EURC.js +20 -0
- package/_esm/stellar/config/tokens/tokens/EURC.js.map +1 -0
- package/_esm/stellar/config/tokens/tokens/PYUSD.js +20 -0
- package/_esm/stellar/config/tokens/tokens/PYUSD.js.map +1 -0
- package/_esm/stellar/config/tokens/tokens/SolvBTC.js +20 -0
- package/_esm/stellar/config/tokens/tokens/SolvBTC.js.map +1 -0
- package/_esm/stellar/config/tokens/tokens/USDC.js +20 -0
- package/_esm/stellar/config/tokens/tokens/USDC.js.map +1 -0
- package/_esm/stellar/config/tokens/tokens/USDY.js +20 -0
- package/_esm/stellar/config/tokens/tokens/USDY.js.map +1 -0
- package/_esm/stellar/config/tokens/tokens/USTRY.js +20 -0
- package/_esm/stellar/config/tokens/tokens/USTRY.js.map +1 -0
- package/_esm/stellar/config/tokens/tokens/XLM.js +20 -0
- package/_esm/stellar/config/tokens/tokens/XLM.js.map +1 -0
- package/_esm/stellar/config/tokens/tokens/index.js +10 -0
- package/_esm/stellar/config/tokens/tokens/index.js.map +1 -0
- package/_esm/stellar/config/tokens/tokens/xSolvBTC.js +20 -0
- package/_esm/stellar/config/tokens/tokens/xSolvBTC.js.map +1 -0
- package/_esm/stellar/currency/currency.js +7 -0
- package/_esm/stellar/currency/currency.js.map +1 -0
- package/_esm/stellar/currency/deserialize-currency.js +6 -0
- package/_esm/stellar/currency/deserialize-currency.js.map +1 -0
- package/_esm/stellar/currency/index.js +5 -0
- package/_esm/stellar/currency/index.js.map +1 -0
- package/_esm/stellar/currency/token.js +56 -0
- package/_esm/stellar/currency/token.js.map +1 -0
- package/_esm/stellar/currency/unwrap-token.js +4 -0
- package/_esm/stellar/currency/unwrap-token.js.map +1 -0
- package/_esm/stellar/index.js +1 -0
- package/_esm/stellar/index.js.map +1 -1
- package/_esm/stellar/types/id.js +2 -0
- package/_esm/stellar/types/id.js.map +1 -0
- package/_esm/stellar/types/index.js +2 -0
- package/_esm/stellar/types/index.js.map +1 -0
- package/_esm/stellar/utils/normalize-address.js.map +1 -1
- package/_types/generic/currency/serialized-currency.d.ts +12 -1
- package/_types/generic/currency/serialized-currency.d.ts.map +1 -1
- package/_types/generic/currency/unwrap-token.d.ts +1 -1
- package/_types/generic/currency/unwrap-token.d.ts.map +1 -1
- package/_types/generic/types/for-chain.d.ts +6 -3
- package/_types/generic/types/for-chain.d.ts.map +1 -1
- package/_types/stellar/address.d.ts +4 -2
- package/_types/stellar/address.d.ts.map +1 -1
- package/_types/stellar/config/index.d.ts +1 -0
- package/_types/stellar/config/index.d.ts.map +1 -1
- package/_types/stellar/config/simple-constants.d.ts.map +1 -1
- package/_types/stellar/config/tokens/index.d.ts +3 -0
- package/_types/stellar/config/tokens/index.d.ts.map +1 -0
- package/_types/stellar/config/tokens/token-maps/default-bases.d.ts +4 -0
- package/_types/stellar/config/tokens/token-maps/default-bases.d.ts.map +1 -0
- package/_types/stellar/config/tokens/token-maps/default-quote.d.ts +7 -0
- package/_types/stellar/config/tokens/token-maps/default-quote.d.ts.map +1 -0
- package/_types/stellar/config/tokens/token-maps/index.d.ts +4 -0
- package/_types/stellar/config/tokens/token-maps/index.d.ts.map +1 -0
- package/_types/stellar/config/tokens/token-maps/stables.d.ts +7 -0
- package/_types/stellar/config/tokens/token-maps/stables.d.ts.map +1 -0
- package/_types/stellar/config/tokens/tokens/CETES.d.ts +7 -0
- package/_types/stellar/config/tokens/tokens/CETES.d.ts.map +1 -0
- package/_types/stellar/config/tokens/tokens/EURC.d.ts +7 -0
- package/_types/stellar/config/tokens/tokens/EURC.d.ts.map +1 -0
- package/_types/stellar/config/tokens/tokens/PYUSD.d.ts +7 -0
- package/_types/stellar/config/tokens/tokens/PYUSD.d.ts.map +1 -0
- package/_types/stellar/config/tokens/tokens/SolvBTC.d.ts +7 -0
- package/_types/stellar/config/tokens/tokens/SolvBTC.d.ts.map +1 -0
- package/_types/stellar/config/tokens/tokens/USDC.d.ts +7 -0
- package/_types/stellar/config/tokens/tokens/USDC.d.ts.map +1 -0
- package/_types/stellar/config/tokens/tokens/USDY.d.ts +7 -0
- package/_types/stellar/config/tokens/tokens/USDY.d.ts.map +1 -0
- package/_types/stellar/config/tokens/tokens/USTRY.d.ts +7 -0
- package/_types/stellar/config/tokens/tokens/USTRY.d.ts.map +1 -0
- package/_types/stellar/config/tokens/tokens/XLM.d.ts +7 -0
- package/_types/stellar/config/tokens/tokens/XLM.d.ts.map +1 -0
- package/_types/stellar/config/tokens/tokens/index.d.ts +10 -0
- package/_types/stellar/config/tokens/tokens/index.d.ts.map +1 -0
- package/_types/stellar/config/tokens/tokens/xSolvBTC.d.ts +7 -0
- package/_types/stellar/config/tokens/tokens/xSolvBTC.d.ts.map +1 -0
- package/_types/stellar/currency/currency.d.ts +19 -0
- package/_types/stellar/currency/currency.d.ts.map +1 -0
- package/_types/stellar/currency/deserialize-currency.d.ts +4 -0
- package/_types/stellar/currency/deserialize-currency.d.ts.map +1 -0
- package/_types/stellar/currency/index.d.ts +5 -0
- package/_types/stellar/currency/index.d.ts.map +1 -0
- package/_types/stellar/currency/token.d.ts +32 -0
- package/_types/stellar/currency/token.d.ts.map +1 -0
- package/_types/stellar/currency/unwrap-token.d.ts +3 -0
- package/_types/stellar/currency/unwrap-token.d.ts.map +1 -0
- package/_types/stellar/index.d.ts +2 -0
- package/_types/stellar/index.d.ts.map +1 -1
- package/_types/stellar/types/id.d.ts +5 -0
- package/_types/stellar/types/id.d.ts.map +1 -0
- package/_types/stellar/types/index.d.ts +2 -0
- package/_types/stellar/types/index.d.ts.map +1 -0
- package/_types/stellar/utils/normalize-address.d.ts +1 -1
- package/_types/stellar/utils/normalize-address.d.ts.map +1 -1
- package/generic/currency/serialized-currency.ts +5 -0
- package/generic/currency/unwrap-token.test.ts +23 -0
- package/generic/currency/unwrap-token.ts +12 -0
- package/generic/types/for-chain.test-d.ts +30 -0
- package/generic/types/for-chain.ts +15 -6
- package/package.json +1 -1
- package/stellar/address.test.ts +47 -0
- package/stellar/address.ts +11 -4
- package/stellar/config/index.ts +1 -0
- package/stellar/config/simple-constants.ts +10 -7
- package/stellar/config/tokens/index.ts +2 -0
- package/stellar/config/tokens/token-maps/default-bases.ts +25 -0
- package/stellar/config/tokens/token-maps/default-quote.ts +12 -0
- package/stellar/config/tokens/token-maps/index.ts +3 -0
- package/stellar/config/tokens/token-maps/stables.test.ts +22 -0
- package/stellar/config/tokens/token-maps/stables.ts +17 -0
- package/stellar/config/tokens/tokens/CETES.ts +22 -0
- package/stellar/config/tokens/tokens/EURC.ts +22 -0
- package/stellar/config/tokens/tokens/PYUSD.ts +22 -0
- package/stellar/config/tokens/tokens/SolvBTC.ts +22 -0
- package/stellar/config/tokens/tokens/USDC.ts +22 -0
- package/stellar/config/tokens/tokens/USDY.ts +22 -0
- package/stellar/config/tokens/tokens/USTRY.ts +22 -0
- package/stellar/config/tokens/tokens/XLM.ts +22 -0
- package/stellar/config/tokens/tokens/index.ts +9 -0
- package/stellar/config/tokens/tokens/xSolvBTC.ts +22 -0
- package/stellar/currency/currency.ts +21 -0
- package/stellar/currency/deserialize-currency.ts +7 -0
- package/stellar/currency/index.ts +4 -0
- package/stellar/currency/token.ts +93 -0
- package/stellar/currency/unwrap-token.ts +5 -0
- package/stellar/index.ts +2 -0
- package/stellar/types/id.ts +9 -0
- package/stellar/types/index.ts +1 -0
- package/stellar/utils/normalize-address.ts +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../stellar/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../stellar/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,mBAAmB,kBAAkB,CAAA;AACrC,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ID } from '../../generic/types/id.js';
|
|
2
|
+
import type { StellarAddress } from '../address.js';
|
|
3
|
+
import type { StellarChainId } from '../chain/chains.js';
|
|
4
|
+
export type StellarID<TIncludeNative extends boolean = false> = ID<StellarChainId, StellarAddress, TIncludeNative>;
|
|
5
|
+
//# sourceMappingURL=id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../stellar/types/id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,MAAM,MAAM,SAAS,CAAC,cAAc,SAAS,OAAO,GAAG,KAAK,IAAI,EAAE,CAChE,cAAc,EACd,cAAc,EACd,cAAc,CACf,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../stellar/types/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { StellarAddress } from '../address.js';
|
|
2
|
-
export declare function normalizeStellarAddress(address:
|
|
2
|
+
export declare function normalizeStellarAddress<TAddress extends StellarAddress>(address: TAddress): TAddress;
|
|
3
3
|
//# sourceMappingURL=normalize-address.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-address.d.ts","sourceRoot":"","sources":["../../../stellar/utils/normalize-address.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,wBAAgB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"normalize-address.d.ts","sourceRoot":"","sources":["../../../stellar/utils/normalize-address.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,wBAAgB,uBAAuB,CAAC,QAAQ,SAAS,cAAc,EACrE,OAAO,EAAE,QAAQ,GAChB,QAAQ,CAEV"}
|
|
@@ -3,6 +3,8 @@ import { serializedEvmCurrencySchema } from '../../evm/currency/currency.js'
|
|
|
3
3
|
import type { serializedEvmNativeSchema } from '../../evm/currency/native.js'
|
|
4
4
|
import type { serializedEvmTokenSchema } from '../../evm/currency/token.js'
|
|
5
5
|
import { serializedMvmTokenSchema } from '../../mvm/currency/token.js'
|
|
6
|
+
import { serializedStellarCurrencySchema } from '../../stellar/currency/currency.js'
|
|
7
|
+
import type { serializedStellarTokenSchema } from '../../stellar/index.js'
|
|
6
8
|
import { serializedSvmCurrencySchema } from '../../svm/currency/currency.js'
|
|
7
9
|
import type { serializedSvmNativeSchema } from '../../svm/currency/native.js'
|
|
8
10
|
import type { serializedSvmTokenSchema } from '../../svm/index.js'
|
|
@@ -19,6 +21,8 @@ export type SerializedCurrencySchema<
|
|
|
19
21
|
| typeof serializedSvmNativeSchema<TMetadata>
|
|
20
22
|
| typeof serializedSvmTokenSchema<TMetadata>
|
|
21
23
|
| typeof serializedSvmCurrencySchema<TMetadata>
|
|
24
|
+
| typeof serializedStellarCurrencySchema<TMetadata>
|
|
25
|
+
| typeof serializedStellarTokenSchema<TMetadata>
|
|
22
26
|
>
|
|
23
27
|
|
|
24
28
|
export const serializedCurrencySchema = <
|
|
@@ -30,6 +34,7 @@ export const serializedCurrencySchema = <
|
|
|
30
34
|
serializedEvmCurrencySchema(opts),
|
|
31
35
|
serializedMvmTokenSchema(opts),
|
|
32
36
|
serializedSvmCurrencySchema(opts),
|
|
37
|
+
serializedStellarCurrencySchema(opts),
|
|
33
38
|
])
|
|
34
39
|
|
|
35
40
|
export type SerializedCurrency<
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { StellarChainId } from '../../stellar/chain/chains.js'
|
|
3
|
+
import { STELLAR_USDC } from '../../stellar/config/tokens/tokens/USDC.js'
|
|
4
|
+
import { SvmChainId } from '../../svm/chain/chains.js'
|
|
5
|
+
import { SVM_WNATIVE } from '../../svm/config/tokens/wrapped-native.js'
|
|
6
|
+
import { SvmNative } from '../../svm/currency/native.js'
|
|
7
|
+
import { unwrapToken } from './unwrap-token.js'
|
|
8
|
+
|
|
9
|
+
describe('unwrapToken', () => {
|
|
10
|
+
it('unwraps SVM wrapped native tokens', () => {
|
|
11
|
+
const unwrapped = unwrapToken(SVM_WNATIVE[SvmChainId.SOLANA])
|
|
12
|
+
|
|
13
|
+
expect(unwrapped).toBeInstanceOf(SvmNative)
|
|
14
|
+
expect(unwrapped.chainId).toBe(SvmChainId.SOLANA)
|
|
15
|
+
expect(unwrapped.type).toBe('native')
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('returns Stellar tokens without throwing', () => {
|
|
19
|
+
const token = STELLAR_USDC[StellarChainId.STELLAR]
|
|
20
|
+
|
|
21
|
+
expect(unwrapToken(token)).toBe(token)
|
|
22
|
+
})
|
|
23
|
+
})
|
|
@@ -2,6 +2,10 @@ import invariant from 'tiny-invariant'
|
|
|
2
2
|
import { EvmToken } from '../../evm/currency/token.js'
|
|
3
3
|
import { unwrapEvmToken } from '../../evm/currency/unwrap-token.js'
|
|
4
4
|
import { MvmToken } from '../../mvm/currency/token.js'
|
|
5
|
+
import { StellarToken } from '../../stellar/currency/token.js'
|
|
6
|
+
import { unwrapStellarToken } from '../../stellar/currency/unwrap-token.js'
|
|
7
|
+
import { SvmToken } from '../../svm/currency/token.js'
|
|
8
|
+
import { unwrapSvmToken } from '../../svm/currency/unwrap-token.js'
|
|
5
9
|
import type { Currency } from './currency.js'
|
|
6
10
|
|
|
7
11
|
export function unwrapToken<TCurrency extends Currency>(currency: TCurrency) {
|
|
@@ -17,5 +21,13 @@ export function unwrapToken<TCurrency extends Currency>(currency: TCurrency) {
|
|
|
17
21
|
return currency
|
|
18
22
|
}
|
|
19
23
|
|
|
24
|
+
if (currency instanceof SvmToken) {
|
|
25
|
+
return unwrapSvmToken(currency)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (currency instanceof StellarToken) {
|
|
29
|
+
return unwrapStellarToken(currency)
|
|
30
|
+
}
|
|
31
|
+
|
|
20
32
|
throw invariant(false, 'Unsupported currency type')
|
|
21
33
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { describe, expectTypeOf, it } from 'vitest'
|
|
2
|
+
import type { StellarAddress } from '../../stellar/address.js'
|
|
3
|
+
import type { StellarChainId } from '../../stellar/chain/chains.js'
|
|
4
|
+
import type { StellarID } from '../../stellar/types/id.js'
|
|
5
|
+
import type { SvmChainId } from '../../svm/index.js'
|
|
6
|
+
import type { SvmID } from '../../svm/types/id.js'
|
|
7
|
+
import type { IDFor } from './for-chain.js'
|
|
8
|
+
|
|
9
|
+
describe('generic/types/for-chain.ts types', () => {
|
|
10
|
+
describe('IDFor', () => {
|
|
11
|
+
it('should return the correct id type for SVM chains', () => {
|
|
12
|
+
expectTypeOf<IDFor<SvmChainId>>().toEqualTypeOf<SvmID>()
|
|
13
|
+
expectTypeOf<IDFor<SvmChainId, true>>().toEqualTypeOf<SvmID<true>>()
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
it('should return the correct id type for Stellar chains', () => {
|
|
17
|
+
expectTypeOf<IDFor<StellarChainId>>().toEqualTypeOf<StellarID>()
|
|
18
|
+
expectTypeOf<IDFor<StellarChainId, true>>().toEqualTypeOf<
|
|
19
|
+
StellarID<true>
|
|
20
|
+
>()
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
it('should use Stellar addresses in Stellar ids', () => {
|
|
24
|
+
expectTypeOf<StellarID>().toEqualTypeOf<`${StellarChainId}:${StellarAddress}`>()
|
|
25
|
+
expectTypeOf<StellarID<true>>().toEqualTypeOf<
|
|
26
|
+
`${StellarChainId}:${StellarAddress}` | `${StellarChainId}:NATIVE`
|
|
27
|
+
>()
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
})
|
|
@@ -14,6 +14,9 @@ import type {
|
|
|
14
14
|
} from '../../mvm/currency/token.js'
|
|
15
15
|
import type { StellarAddress, StellarTxHash } from '../../stellar/address.js'
|
|
16
16
|
import type { StellarChainId } from '../../stellar/chain/chains.js'
|
|
17
|
+
import type { StellarCurrency } from '../../stellar/currency/currency.js'
|
|
18
|
+
import type { StellarToken } from '../../stellar/currency/token.js'
|
|
19
|
+
import type { StellarID } from '../../stellar/types/id.js'
|
|
17
20
|
import type { SvmChainId } from '../../svm/chain/chains.js'
|
|
18
21
|
import type { SvmCurrency } from '../../svm/currency/currency.js'
|
|
19
22
|
import type {
|
|
@@ -26,7 +29,7 @@ import type { ChainId } from '../chain/chains.js'
|
|
|
26
29
|
import type { CurrencyMetadata } from '../currency/currency.js'
|
|
27
30
|
|
|
28
31
|
export type TokenFor<
|
|
29
|
-
TChainId extends
|
|
32
|
+
TChainId extends ChainId,
|
|
30
33
|
Metadata extends CurrencyMetadata = CurrencyMetadata,
|
|
31
34
|
> = TChainId extends EvmChainId
|
|
32
35
|
? EvmToken<Metadata>
|
|
@@ -34,10 +37,12 @@ export type TokenFor<
|
|
|
34
37
|
? MvmToken<Metadata>
|
|
35
38
|
: TChainId extends SvmChainId
|
|
36
39
|
? SvmToken<Metadata>
|
|
37
|
-
:
|
|
40
|
+
: TChainId extends StellarChainId
|
|
41
|
+
? StellarToken<Metadata>
|
|
42
|
+
: never
|
|
38
43
|
|
|
39
44
|
export type CurrencyFor<
|
|
40
|
-
TChainId extends
|
|
45
|
+
TChainId extends ChainId,
|
|
41
46
|
Metadata extends CurrencyMetadata = CurrencyMetadata,
|
|
42
47
|
> = TChainId extends EvmChainId
|
|
43
48
|
? EvmCurrency<Metadata>
|
|
@@ -45,7 +50,9 @@ export type CurrencyFor<
|
|
|
45
50
|
? MvmToken<Metadata>
|
|
46
51
|
: TChainId extends SvmChainId
|
|
47
52
|
? SvmCurrency<Metadata>
|
|
48
|
-
:
|
|
53
|
+
: TChainId extends StellarChainId
|
|
54
|
+
? StellarCurrency<Metadata>
|
|
55
|
+
: never
|
|
49
56
|
|
|
50
57
|
export type AddressFor<TChainId extends ChainId> = TChainId extends EvmChainId
|
|
51
58
|
? EvmAddress
|
|
@@ -68,10 +75,12 @@ export type TxHashFor<TChainId extends ChainId> = TChainId extends EvmChainId
|
|
|
68
75
|
: never
|
|
69
76
|
|
|
70
77
|
export type IDFor<
|
|
71
|
-
TChainId extends EvmChainId | SvmChainId,
|
|
78
|
+
TChainId extends EvmChainId | SvmChainId | StellarChainId,
|
|
72
79
|
TIncludeNative extends boolean = false,
|
|
73
80
|
> = TChainId extends EvmChainId
|
|
74
81
|
? EvmID<TIncludeNative>
|
|
75
82
|
: TChainId extends SvmChainId
|
|
76
83
|
? SvmID<TIncludeNative>
|
|
77
|
-
:
|
|
84
|
+
: TChainId extends StellarChainId
|
|
85
|
+
? StellarID<TIncludeNative>
|
|
86
|
+
: never
|
package/package.json
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import {
|
|
3
|
+
isStellarAccountAddress,
|
|
4
|
+
isStellarAddress,
|
|
5
|
+
isStellarContractAddress,
|
|
6
|
+
type StellarAccountAddress,
|
|
7
|
+
type StellarContractAddress,
|
|
8
|
+
} from './address.js'
|
|
9
|
+
import { normalizeStellarAddress } from './utils/normalize-address.js'
|
|
10
|
+
|
|
11
|
+
describe('stellar addresses', () => {
|
|
12
|
+
const accountAddress =
|
|
13
|
+
'GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7'
|
|
14
|
+
const contractAddress =
|
|
15
|
+
'CCRSMJDITH3VK5QOGYCVZDAKIY5GL3RCG4TCVLIAVB662IW2V5KJGZGF'
|
|
16
|
+
|
|
17
|
+
it('distinguishes account and contract addresses', () => {
|
|
18
|
+
expect(isStellarAccountAddress(accountAddress)).toBe(true)
|
|
19
|
+
expect(isStellarAccountAddress(contractAddress)).toBe(false)
|
|
20
|
+
expect(isStellarContractAddress(accountAddress)).toBe(false)
|
|
21
|
+
expect(isStellarContractAddress(contractAddress)).toBe(true)
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
it('accepts both account and contract addresses as Stellar addresses', () => {
|
|
25
|
+
expect(isStellarAddress(accountAddress)).toBe(true)
|
|
26
|
+
expect(isStellarAddress(contractAddress)).toBe(true)
|
|
27
|
+
expect(isStellarAddress('0x1234')).toBe(false)
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('normalizes account, contract, and chain addresses', () => {
|
|
31
|
+
expect(
|
|
32
|
+
normalizeStellarAddress(
|
|
33
|
+
accountAddress.toLowerCase() as StellarAccountAddress,
|
|
34
|
+
),
|
|
35
|
+
).toBe(accountAddress)
|
|
36
|
+
expect(
|
|
37
|
+
normalizeStellarAddress(
|
|
38
|
+
contractAddress.toLowerCase() as StellarContractAddress,
|
|
39
|
+
),
|
|
40
|
+
).toBe(contractAddress)
|
|
41
|
+
expect(
|
|
42
|
+
normalizeStellarAddress(
|
|
43
|
+
contractAddress.toLowerCase() as StellarContractAddress,
|
|
44
|
+
),
|
|
45
|
+
).toBe(contractAddress)
|
|
46
|
+
})
|
|
47
|
+
})
|
package/stellar/address.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type StellarAccountAddress = `G${string}`
|
|
2
2
|
export type StellarContractAddress = `C${string}`
|
|
3
|
+
export type StellarAddress = StellarAccountAddress | StellarContractAddress
|
|
3
4
|
export type StellarTxHash = string
|
|
4
5
|
|
|
5
|
-
const
|
|
6
|
+
const stellarAccountAddressRegex = /^G[A-Z2-7]{55}$/
|
|
6
7
|
|
|
7
|
-
export function
|
|
8
|
-
|
|
8
|
+
export function isStellarAccountAddress(
|
|
9
|
+
address: string,
|
|
10
|
+
): address is StellarAccountAddress {
|
|
11
|
+
return stellarAccountAddressRegex.test(address)
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
const stellarContractAddressRegex = /^C[A-Z2-7]{55}$/
|
|
@@ -15,3 +18,7 @@ export function isStellarContractAddress(
|
|
|
15
18
|
): address is StellarContractAddress {
|
|
16
19
|
return stellarContractAddressRegex.test(address)
|
|
17
20
|
}
|
|
21
|
+
|
|
22
|
+
export function isStellarAddress(address: string): address is StellarAddress {
|
|
23
|
+
return isStellarAccountAddress(address) || isStellarContractAddress(address)
|
|
24
|
+
}
|
package/stellar/config/index.ts
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
StellarAccountAddress,
|
|
3
|
+
StellarContractAddress,
|
|
4
|
+
} from '../address.js'
|
|
2
5
|
import { StellarChainId } from '../chain/chains.js'
|
|
3
6
|
|
|
4
7
|
export const stellarNativeAddress =
|
|
5
|
-
'GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' as const
|
|
8
|
+
'GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' as const satisfies StellarAccountAddress
|
|
6
9
|
|
|
7
10
|
export const SUSHISWAP_V3_FACTORY_ADDRESS: Record<
|
|
8
11
|
StellarChainId,
|
|
9
12
|
StellarContractAddress
|
|
10
13
|
> = {
|
|
11
14
|
[StellarChainId.STELLAR]:
|
|
12
|
-
'
|
|
15
|
+
'CD3KRKGDRVWPXVB3VXLUMQKMX6XZ6Q2H334IVZD4XXNAMKSRVQL5GLYF',
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
export const SUSHISWAP_V3_INIT_CODE_HASH: Record<StellarChainId, string> = {
|
|
16
19
|
[StellarChainId.STELLAR]:
|
|
17
|
-
'
|
|
20
|
+
'48b28121451497952c1c35d58d4556f315a5b468ccde9fcd03f510aefa07c117',
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
export const SUSHISWAP_V3_POSITION_MANAGER: Record<
|
|
@@ -22,7 +25,7 @@ export const SUSHISWAP_V3_POSITION_MANAGER: Record<
|
|
|
22
25
|
StellarContractAddress
|
|
23
26
|
> = {
|
|
24
27
|
[StellarChainId.STELLAR]:
|
|
25
|
-
'
|
|
28
|
+
'CARTUL5AWDZYBSN7HUUJZSKCAKCIAKM7M54Z76G6KRYCK4XPR3OHUQZ4',
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
export const SUSHISWAP_V3_TICK_LENS: Record<
|
|
@@ -30,7 +33,7 @@ export const SUSHISWAP_V3_TICK_LENS: Record<
|
|
|
30
33
|
StellarContractAddress
|
|
31
34
|
> = {
|
|
32
35
|
[StellarChainId.STELLAR]:
|
|
33
|
-
'
|
|
36
|
+
'CASKWJSINHFW7BF7RUOA4E2FP6B2TYRKFX2UOPWLCPOOPUR6UU3G2RWC',
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
export const SUSHISWAP_V3_QUOTER: Record<
|
|
@@ -38,5 +41,5 @@ export const SUSHISWAP_V3_QUOTER: Record<
|
|
|
38
41
|
StellarContractAddress
|
|
39
42
|
> = {
|
|
40
43
|
[StellarChainId.STELLAR]:
|
|
41
|
-
'
|
|
44
|
+
'CDMIM23WOUL5CZBKX3GOA3V5R5AMVIMTCP52KCDQORWELAPLJ27WZCHL',
|
|
42
45
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StellarChainId } from '../../../../stellar/chain/index.js'
|
|
2
|
+
import type { StellarCurrency } from '../../../../stellar/currency/currency.js'
|
|
3
|
+
import { STELLAR_CETES } from '../tokens/CETES.js'
|
|
4
|
+
import { STELLAR_EURC } from '../tokens/EURC.js'
|
|
5
|
+
import { STELLAR_PYUSD } from '../tokens/PYUSD.js'
|
|
6
|
+
import { STELLAR_SOLVBTC } from '../tokens/SolvBTC.js'
|
|
7
|
+
import { STELLAR_USDC } from '../tokens/USDC.js'
|
|
8
|
+
import { STELLAR_USDY } from '../tokens/USDY.js'
|
|
9
|
+
import { STELLAR_USTRY } from '../tokens/USTRY.js'
|
|
10
|
+
import { STELLAR_XLM } from '../tokens/XLM.js'
|
|
11
|
+
import { STELLAR_XSOLVBTC } from '../tokens/xSolvBTC.js'
|
|
12
|
+
|
|
13
|
+
export const STELLAR_DEFAULT_BASES = {
|
|
14
|
+
[StellarChainId.STELLAR]: [
|
|
15
|
+
STELLAR_CETES[StellarChainId.STELLAR],
|
|
16
|
+
STELLAR_EURC[StellarChainId.STELLAR],
|
|
17
|
+
STELLAR_PYUSD[StellarChainId.STELLAR],
|
|
18
|
+
STELLAR_SOLVBTC[StellarChainId.STELLAR],
|
|
19
|
+
STELLAR_USDC[StellarChainId.STELLAR],
|
|
20
|
+
STELLAR_USDY[StellarChainId.STELLAR],
|
|
21
|
+
STELLAR_USTRY[StellarChainId.STELLAR],
|
|
22
|
+
STELLAR_XLM[StellarChainId.STELLAR],
|
|
23
|
+
STELLAR_XSOLVBTC[StellarChainId.STELLAR],
|
|
24
|
+
],
|
|
25
|
+
} as const satisfies Record<StellarChainId, Readonly<StellarCurrency[]>>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StellarChainId } from '../../../../stellar/chain/index.js'
|
|
2
|
+
import type { StellarCurrency } from '../../../../stellar/currency/currency.js'
|
|
3
|
+
import { STELLAR_USDC } from '../tokens/USDC.js'
|
|
4
|
+
import { STELLAR_XLM } from '../tokens/XLM.js'
|
|
5
|
+
|
|
6
|
+
export const stellarDefaultCurrency = {
|
|
7
|
+
[StellarChainId.STELLAR]: STELLAR_XLM[StellarChainId.STELLAR],
|
|
8
|
+
} as const satisfies Record<StellarChainId, StellarCurrency>
|
|
9
|
+
|
|
10
|
+
export const stellarDefaultQuoteCurrency = {
|
|
11
|
+
[StellarChainId.STELLAR]: STELLAR_USDC[StellarChainId.STELLAR],
|
|
12
|
+
} as const satisfies Record<StellarChainId, StellarCurrency>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { StellarChainId } from '../../../chain/chains.js'
|
|
3
|
+
import type { StellarCurrency } from '../../../currency/currency.js'
|
|
4
|
+
import { STELLAR_USDC } from '../tokens/USDC.js'
|
|
5
|
+
import { STELLAR_XLM } from '../tokens/XLM.js'
|
|
6
|
+
import { isStellarStable } from './stables.js'
|
|
7
|
+
|
|
8
|
+
describe('isStellarStable', () => {
|
|
9
|
+
it('identifies Stellar stable tokens', () => {
|
|
10
|
+
expect(isStellarStable(STELLAR_USDC[StellarChainId.STELLAR])).toBe(true)
|
|
11
|
+
expect(isStellarStable(STELLAR_XLM[StellarChainId.STELLAR])).toBe(false)
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
it('normalizes Stellar addresses before comparing', () => {
|
|
15
|
+
const currency = {
|
|
16
|
+
...STELLAR_USDC[StellarChainId.STELLAR],
|
|
17
|
+
address: STELLAR_USDC[StellarChainId.STELLAR].address.toLowerCase(),
|
|
18
|
+
} as StellarCurrency
|
|
19
|
+
|
|
20
|
+
expect(isStellarStable(currency)).toBe(true)
|
|
21
|
+
})
|
|
22
|
+
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StellarChainId } from '../../../../stellar/chain/index.js'
|
|
2
|
+
import type { StellarCurrency } from '../../../../stellar/currency/currency.js'
|
|
3
|
+
import type { StellarToken } from '../../../../stellar/currency/token.js'
|
|
4
|
+
import { normalizeStellarAddress } from '../../../../stellar/utils/normalize-address.js'
|
|
5
|
+
import { STELLAR_USDC } from '../tokens/USDC.js'
|
|
6
|
+
|
|
7
|
+
export const STELLAR_STABLES = {
|
|
8
|
+
[StellarChainId.STELLAR]: [STELLAR_USDC[StellarChainId.STELLAR]],
|
|
9
|
+
} as const satisfies Record<StellarChainId, StellarToken[]>
|
|
10
|
+
|
|
11
|
+
export function isStellarStable(currency: StellarCurrency): boolean {
|
|
12
|
+
return STELLAR_STABLES[currency.chainId]?.some(
|
|
13
|
+
(stable) =>
|
|
14
|
+
normalizeStellarAddress(stable.address) ===
|
|
15
|
+
normalizeStellarAddress(currency.address),
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StellarChainId } from '../../../chain/chains.js'
|
|
2
|
+
import { StellarToken } from '../../../currency/token.js'
|
|
3
|
+
|
|
4
|
+
export const STELLAR_CETES_ADDRESS = {
|
|
5
|
+
[StellarChainId.STELLAR]:
|
|
6
|
+
'CAL6ER2TI6CTRAY6BFXWNWA7WTYXUXTQCHUBCIBU5O6KM3HJFG6Z6VXV',
|
|
7
|
+
} as const
|
|
8
|
+
|
|
9
|
+
export const STELLAR_CETES: Record<StellarChainId, StellarToken> = {
|
|
10
|
+
[StellarChainId.STELLAR]: new StellarToken({
|
|
11
|
+
chainId: StellarChainId.STELLAR,
|
|
12
|
+
address: STELLAR_CETES_ADDRESS[StellarChainId.STELLAR],
|
|
13
|
+
issuer: 'GCRYUGD5NVARGXT56XEZI5CIFCQETYHAPQQTHO2O3IQZTHDH4LATMYWC',
|
|
14
|
+
decimals: 7,
|
|
15
|
+
symbol: 'CETES',
|
|
16
|
+
name: 'CETES',
|
|
17
|
+
origin: 'etherfuse.com',
|
|
18
|
+
metadata: {
|
|
19
|
+
icon: 'https://assets.coingecko.com/coins/images/37855/standard/cetes.png',
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StellarChainId } from '../../../chain/chains.js'
|
|
2
|
+
import { StellarToken } from '../../../currency/token.js'
|
|
3
|
+
|
|
4
|
+
export const STELLAR_EURC_ADDRESS = {
|
|
5
|
+
[StellarChainId.STELLAR]:
|
|
6
|
+
'CDTKPWPLOURQA2SGTKTUQOWRCBZEORB4BWBOMJ3D3ZTQQSGE5F6JBQLV',
|
|
7
|
+
} as const
|
|
8
|
+
|
|
9
|
+
export const STELLAR_EURC: Record<StellarChainId, StellarToken> = {
|
|
10
|
+
[StellarChainId.STELLAR]: new StellarToken({
|
|
11
|
+
chainId: StellarChainId.STELLAR,
|
|
12
|
+
address: STELLAR_EURC_ADDRESS[StellarChainId.STELLAR],
|
|
13
|
+
issuer: 'GDHU6WRG4IEQXM5NZ4BMPKOXHW76MZM4Y2IEMFDVXBSDP6SJY4ITNPP2',
|
|
14
|
+
decimals: 7,
|
|
15
|
+
symbol: 'EURC',
|
|
16
|
+
name: 'EURC',
|
|
17
|
+
origin: 'circle.com',
|
|
18
|
+
metadata: {
|
|
19
|
+
icon: 'https://stellar.myfilebase.com/ipfs/QmeRk7LG85cozSNey9QGARgbxYi1cG1dA1G6SNJGMTMdF2',
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StellarChainId } from '../../../chain/chains.js'
|
|
2
|
+
import { StellarToken } from '../../../currency/token.js'
|
|
3
|
+
|
|
4
|
+
export const STELLAR_PYUSD_ADDRESS = {
|
|
5
|
+
[StellarChainId.STELLAR]:
|
|
6
|
+
'CCCRWH6Q3FNP3I2I57BDLM5AFAT7O6OF6GKQOC6SSJNDAVRZ57SPHGU2',
|
|
7
|
+
} as const
|
|
8
|
+
|
|
9
|
+
export const STELLAR_PYUSD: Record<StellarChainId, StellarToken> = {
|
|
10
|
+
[StellarChainId.STELLAR]: new StellarToken({
|
|
11
|
+
chainId: StellarChainId.STELLAR,
|
|
12
|
+
address: STELLAR_PYUSD_ADDRESS[StellarChainId.STELLAR],
|
|
13
|
+
issuer: 'GDQE7IXJ4HUHV6RQHIUPRJSEZE4DRS5WY577O2FY6YQ5LVWZ7JZTU2V5',
|
|
14
|
+
decimals: 7,
|
|
15
|
+
symbol: 'PYUSD',
|
|
16
|
+
name: 'PYUSD',
|
|
17
|
+
origin: 'paxos.com',
|
|
18
|
+
metadata: {
|
|
19
|
+
icon: 'https://assets.coingecko.com/coins/images/31212/standard/PYUSD_Token_Logo_2x.png',
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StellarChainId } from '../../../chain/chains.js'
|
|
2
|
+
import { StellarToken } from '../../../currency/token.js'
|
|
3
|
+
|
|
4
|
+
export const STELLAR_SOLVBTC_ADDRESS = {
|
|
5
|
+
[StellarChainId.STELLAR]:
|
|
6
|
+
'CBIJBDNZNF4X35BJ4FFZWCDBSCKOP5NB4PLG4SNENRMLAPYG4P5FM6VN',
|
|
7
|
+
} as const
|
|
8
|
+
|
|
9
|
+
export const STELLAR_SOLVBTC: Record<StellarChainId, StellarToken> = {
|
|
10
|
+
[StellarChainId.STELLAR]: new StellarToken({
|
|
11
|
+
chainId: StellarChainId.STELLAR,
|
|
12
|
+
address: STELLAR_SOLVBTC_ADDRESS[StellarChainId.STELLAR],
|
|
13
|
+
issuer: undefined,
|
|
14
|
+
decimals: 8,
|
|
15
|
+
symbol: 'SolvBTC',
|
|
16
|
+
name: 'Solv BTC',
|
|
17
|
+
origin: 'solv.finance',
|
|
18
|
+
metadata: {
|
|
19
|
+
icon: 'https://raw.githubusercontent.com/solv-finance/solv-resources/main/SolvBTC/SolvBTC.svg',
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StellarChainId } from '../../../chain/chains.js'
|
|
2
|
+
import { StellarToken } from '../../../currency/token.js'
|
|
3
|
+
|
|
4
|
+
export const STELLAR_USDC_ADDRESS = {
|
|
5
|
+
[StellarChainId.STELLAR]:
|
|
6
|
+
'CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75',
|
|
7
|
+
} as const
|
|
8
|
+
|
|
9
|
+
export const STELLAR_USDC: Record<StellarChainId, StellarToken> = {
|
|
10
|
+
[StellarChainId.STELLAR]: new StellarToken({
|
|
11
|
+
chainId: StellarChainId.STELLAR,
|
|
12
|
+
address: STELLAR_USDC_ADDRESS[StellarChainId.STELLAR],
|
|
13
|
+
issuer: 'GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN',
|
|
14
|
+
decimals: 7,
|
|
15
|
+
symbol: 'USDC',
|
|
16
|
+
name: 'USDC',
|
|
17
|
+
origin: 'centre.io',
|
|
18
|
+
metadata: {
|
|
19
|
+
icon: 'https://stellar.myfilebase.com/ipfs/QmNcfZxs8e9uVyhEa3xoPWCsj3ZogGirtixMEC9Km4Fjm2',
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StellarChainId } from '../../../chain/chains.js'
|
|
2
|
+
import { StellarToken } from '../../../currency/token.js'
|
|
3
|
+
|
|
4
|
+
export const STELLAR_USDY_ADDRESS = {
|
|
5
|
+
[StellarChainId.STELLAR]:
|
|
6
|
+
'CB3YA656OYIHU57657I5KGSBRHE5I3OZU4VFC22PYAOANFZHEWNYGAGP',
|
|
7
|
+
} as const
|
|
8
|
+
|
|
9
|
+
export const STELLAR_USDY: Record<StellarChainId, StellarToken> = {
|
|
10
|
+
[StellarChainId.STELLAR]: new StellarToken({
|
|
11
|
+
chainId: StellarChainId.STELLAR,
|
|
12
|
+
address: STELLAR_USDY_ADDRESS[StellarChainId.STELLAR],
|
|
13
|
+
issuer: 'GAJMPX5NBOG6TQFPQGRABJEEB2YE7RFRLUKJDZAZGAD5GFX4J7TADAZ6',
|
|
14
|
+
decimals: 7,
|
|
15
|
+
symbol: 'USDY',
|
|
16
|
+
name: 'USDY',
|
|
17
|
+
origin: 'ondo.finance',
|
|
18
|
+
metadata: {
|
|
19
|
+
icon: 'https://assets.coingecko.com/coins/images/31700/standard/usdy_(1).png',
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StellarChainId } from '../../../chain/chains.js'
|
|
2
|
+
import { StellarToken } from '../../../currency/token.js'
|
|
3
|
+
|
|
4
|
+
export const STELLAR_USTRY_ADDRESS = {
|
|
5
|
+
[StellarChainId.STELLAR]:
|
|
6
|
+
'CBLV4ATSIWU67CFSQU2NVRKINQIKUZ2ODSZBUJTJ43VJVRSBTZYOPNUR',
|
|
7
|
+
} as const
|
|
8
|
+
|
|
9
|
+
export const STELLAR_USTRY: Record<StellarChainId, StellarToken> = {
|
|
10
|
+
[StellarChainId.STELLAR]: new StellarToken({
|
|
11
|
+
chainId: StellarChainId.STELLAR,
|
|
12
|
+
address: STELLAR_USTRY_ADDRESS[StellarChainId.STELLAR],
|
|
13
|
+
issuer: 'GCRYUGD5NVARGXT56XEZI5CIFCQETYHAPQQTHO2O3IQZTHDH4LATMYWC',
|
|
14
|
+
decimals: 7,
|
|
15
|
+
symbol: 'USTRY',
|
|
16
|
+
name: 'USTRY',
|
|
17
|
+
origin: 'etherfuse.com',
|
|
18
|
+
metadata: {
|
|
19
|
+
icon: 'https://assets.coingecko.com/coins/images/52361/standard/-STABLEBOND-06.jpg',
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StellarChainId } from '../../../chain/chains.js'
|
|
2
|
+
import { StellarToken } from '../../../currency/token.js'
|
|
3
|
+
|
|
4
|
+
export const STELLAR_XLM_ADDRESS = {
|
|
5
|
+
[StellarChainId.STELLAR]:
|
|
6
|
+
'CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA',
|
|
7
|
+
} as const
|
|
8
|
+
|
|
9
|
+
export const STELLAR_XLM: Record<StellarChainId, StellarToken> = {
|
|
10
|
+
[StellarChainId.STELLAR]: new StellarToken({
|
|
11
|
+
chainId: StellarChainId.STELLAR,
|
|
12
|
+
address: STELLAR_XLM_ADDRESS[StellarChainId.STELLAR],
|
|
13
|
+
issuer: 'GDMTVHLWJTHSUDMZVVMXXH6VJHA2ZV3HNG5LYNAZ6RTWB7GISM6PGTUV',
|
|
14
|
+
decimals: 7,
|
|
15
|
+
symbol: 'XLM',
|
|
16
|
+
name: 'XLM',
|
|
17
|
+
origin: 'stellar.org',
|
|
18
|
+
metadata: {
|
|
19
|
+
icon: 'https://assets.coingecko.com/coins/images/100/large/Stellar_symbol_black_RGB.png',
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
22
|
+
}
|