@sodax/types 2.0.0 → 2.1.0-rc.1

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.
@@ -6,4 +6,4 @@
6
6
  * per-feature analytics toggles). It lives in `@sodax/types`, the lowest layer, so every package
7
7
  * shares one source of truth instead of redefining the list; `@sodax/sdk` re-exports it.
8
8
  */
9
- export type SodaxFeature = 'swap' | 'moneyMarket' | 'bridge' | 'staking' | 'migration' | 'dex' | 'partner' | 'recovery' | 'backend' | 'leverageYield';
9
+ export type SodaxFeature = 'swap' | 'moneyMarket' | 'bridge' | 'staking' | 'migration' | 'dex' | 'partner' | 'recovery' | 'backend' | 'sponsoring' | 'leverageYield';
@@ -90,7 +90,13 @@ export type StellarRawTransaction = {
90
90
  export type StellarReturnType<Raw extends boolean> = Raw extends true ? StellarRawTransaction : Raw extends false ? string : StellarRawTransaction | string;
91
91
  export interface IStellarWalletProvider extends ICoreWallet {
92
92
  readonly chainType: 'STELLAR';
93
- signTransaction: (tx: XDR) => Promise<XDR>;
93
+ /**
94
+ * Sign without broadcasting. Pass `options.address` when a specific
95
+ * account must sign; browser wallets otherwise use their active account.
96
+ */
97
+ signTransaction: (tx: XDR, options?: {
98
+ address?: string;
99
+ }) => Promise<XDR>;
94
100
  waitForTransactionReceipt: (txHash: string) => Promise<StellarRawTransactionReceipt>;
95
101
  /** Broadcast an already-signed XDR transaction via the Soroban RPC server. Returns the tx hash. */
96
102
  sendTransaction?: (signedTx: XDR) => Promise<string>;
@@ -86,7 +86,7 @@ export function isLegacybnUSDToken(token) {
86
86
  return bnUSDLegacyTokens.some(t => t.address.toLowerCase() === token.address.toLowerCase());
87
87
  }
88
88
  export function getbnUSDToken(chainId) {
89
- if ("bnUSD" in spokeChainConfig[chainId].supportedTokens) {
89
+ if ('bnUSD' in spokeChainConfig[chainId].supportedTokens) {
90
90
  return spokeChainConfig[chainId].supportedTokens.bnUSD;
91
91
  }
92
92
  return undefined;
@@ -1,5 +1,5 @@
1
- import type { ChainType } from "../chains/chain-keys.js";
2
- import type { XToken } from "../chains/tokens.js";
1
+ import type { ChainType } from '../chains/chain-keys.js';
2
+ import type { XToken } from '../chains/tokens.js';
3
3
  export interface WalletAddressProvider {
4
4
  getWalletAddress(): Promise<string>;
5
5
  getPublicKey?: () => Promise<string>;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "2.0.0",
7
+ "version": "2.1.0-rc.1",
8
8
  "description": "Sodax Common Types",
9
9
  "main": "dist/index.js",
10
10
  "homepage": "https://github.com/icon-project/sodax-sdks/tree/main/packages/types",
@@ -61,7 +61,7 @@
61
61
  ],
62
62
  "license": "MIT",
63
63
  "scripts": {
64
- "build": "tsc",
64
+ "build": "rm -rf dist && tsc",
65
65
  "dev": "tsc --watch",
66
66
  "ci": "pnpm run pretty && pnpm run build && pnpm run test",
67
67
  "checkTs": "tsc",