@alpha-arcade/sdk 0.1.1 → 0.1.2

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 CHANGED
@@ -32,9 +32,8 @@ const client = new AlphaClient({
32
32
  indexerClient,
33
33
  signer,
34
34
  activeAddress: account.addr,
35
- matcherAppId: 741347297,
35
+ matcherAppId: 3078581851,
36
36
  usdcAssetId: 31566704,
37
- feeAddress: 'YOUR_FEE_ADDRESS',
38
37
  apiKey: 'YOUR_API_KEY',
39
38
  });
40
39
 
@@ -71,9 +70,8 @@ new AlphaClient(config: AlphaClientConfig)
71
70
  | `indexerClient` | `algosdk.Indexer` | Yes | Algorand indexer client |
72
71
  | `signer` | `TransactionSigner` | Yes | Transaction signer |
73
72
  | `activeAddress` | `string` | Yes | Your Algorand address |
74
- | `matcherAppId` | `number` | Yes | Matcher contract app ID (mainnet: `741347297`) |
73
+ | `matcherAppId` | `number` | Yes | Matcher contract app ID (mainnet: `3078581851`) |
75
74
  | `usdcAssetId` | `number` | Yes | USDC ASA ID (mainnet: `31566704`) |
76
- | `feeAddress` | `string` | Yes | Platform fee address |
77
75
  | `apiKey` | `string` | Yes | Alpha partners API key (x-api-key header) |
78
76
  | `apiBaseUrl` | `string` | No | API base URL (default: `https://partners.alphaarcade.com/api`) |
79
77
 
@@ -296,10 +294,9 @@ const setup = () => {
296
294
  indexerClient,
297
295
  signer: algosdk.makeBasicAccountTransactionSigner(account),
298
296
  activeAddress: account.addr,
299
- matcherAppId: 741347297,
297
+ matcherAppId: 3078581851,
300
298
  usdcAssetId: 31566704,
301
- feeAddress: 'YOUR_FEE_ADDRESS',
302
- apiKey: 'YOUR_API_KEY',
299
+ apiKey: 'YOUR_API_KEY',
303
300
  });
304
301
  };
305
302
 
package/dist/index.cjs CHANGED
@@ -1566,13 +1566,13 @@ var createMarketOrder = async (config, params) => {
1566
1566
  return { ...result, matchedQuantity: totalMatchedQuantity };
1567
1567
  };
1568
1568
  var createOrder = async (config, params) => {
1569
- const { algodClient, indexerClient, signer, activeAddress, matcherAppId, usdcAssetId, feeAddress } = config;
1569
+ const { algodClient, indexerClient, signer, activeAddress, matcherAppId, usdcAssetId } = config;
1570
1570
  const { marketAppId, position, price, quantity, isBuying, slippage, matchingOrders } = params;
1571
1571
  const globalState = await getMarketGlobalState(algodClient, marketAppId);
1572
1572
  const yesAssetId = globalState.yes_asset_id;
1573
1573
  const noAssetId = globalState.no_asset_id;
1574
1574
  const feeBase = params.feeBase ?? globalState.fee_base_percent;
1575
- const marketFeeAddress = globalState.fee_address || feeAddress;
1575
+ const marketFeeAddress = globalState.fee_address;
1576
1576
  const signerAccount = { signer, addr: activeAddress };
1577
1577
  const marketClient = new MarketAppClient(
1578
1578
  { resolveBy: "id", id: marketAppId, sender: signerAccount },
@@ -1699,12 +1699,12 @@ var cancelOrder = async (config, params) => {
1699
1699
  };
1700
1700
  };
1701
1701
  var proposeMatch = async (config, params) => {
1702
- const { algodClient, signer, activeAddress, matcherAppId, usdcAssetId, feeAddress } = config;
1702
+ const { algodClient, signer, activeAddress, matcherAppId, usdcAssetId } = config;
1703
1703
  const { marketAppId, makerEscrowAppId, makerAddress, quantityMatched } = params;
1704
1704
  const globalState = await getMarketGlobalState(algodClient, marketAppId);
1705
1705
  const yesAssetId = globalState.yes_asset_id;
1706
1706
  const noAssetId = globalState.no_asset_id;
1707
- const marketFeeAddress = globalState.fee_address || feeAddress;
1707
+ const marketFeeAddress = globalState.fee_address;
1708
1708
  const signerAccount = { signer, addr: activeAddress };
1709
1709
  const matcherClient = new MatcherAppClient(
1710
1710
  { resolveBy: "id", id: matcherAppId, sender: signerAccount },
@@ -2006,7 +2006,6 @@ var AlphaClient = class {
2006
2006
  if (!config.activeAddress) throw new Error("activeAddress is required");
2007
2007
  if (!config.matcherAppId) throw new Error("matcherAppId is required");
2008
2008
  if (!config.usdcAssetId) throw new Error("usdcAssetId is required");
2009
- if (!config.feeAddress) throw new Error("feeAddress is required");
2010
2009
  if (!config.apiKey) throw new Error("apiKey is required");
2011
2010
  this.config = {
2012
2011
  ...config,