Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aarc-dev/core

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aarc-dev/core - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

3

dist/src/AarcCore.d.ts

@@ -1,2 +0,2 @@

import { ExecuteMigrationForwardDto, ExecuteMigrationGaslessDto, ExecuteMigrationNonGaslessDto, RelayedTxListResponse, BalancesResponse, DepositDto, BalancesData, IsTokenSupportedResponse, SupportedTokensResponse, SupportedChainInfo, TrxStatusResponse, DepositOnRampParams, CheckoutOnrampParams, CheckoutDto, DepositRouteDto, DepositCalldataResponse, CheckoutRouteDto } from "./utils/CoreTypes";
import { ExecuteMigrationForwardDto, ExecuteMigrationGaslessDto, ExecuteMigrationNonGaslessDto, RelayedTxListResponse, BalancesResponse, DepositDto, BalancesData, IsTokenSupportedResponse, SupportedTokensResponse, SupportedChainInfo, TrxStatusResponse, DepositOnRampParams, CheckoutOnrampParams, CheckoutDto, DepositRouteDto, DepositCalldataResponse, CheckoutRouteDto, PriceData } from "./utils/CoreTypes";
export declare class AarcCore {

@@ -12,2 +12,3 @@ apiKey: string;

fetchMultiChainBalances(eoaAddress: string, extendedBalances?: boolean): Promise<BalancesData>;
fetchTokenPrice(tokenSymbol: string): Promise<PriceData>;
isTokenSupported(chainId: number, tokenAddress: string): Promise<IsTokenSupportedResponse>;

@@ -14,0 +15,0 @@ getSupportedTokens(chainId: number): Promise<SupportedTokensResponse>;

@@ -27,2 +27,5 @@ "use strict";

}
async fetchTokenPrice(tokenSymbol) {
return await (0, Helper_1.getTokenPrice)(this.apiKey, tokenSymbol);
}
async isTokenSupported(chainId, tokenAddress) {

@@ -29,0 +32,0 @@ return await (0, Helper_1.IsTokenSupported)(this.apiKey, chainId, tokenAddress);

@@ -13,2 +13,3 @@ export declare const MIGRATE_BASE_URL = "https://migrator.staging.aarc.xyz";

export declare const MULTI_CHAIN_BALANCES_ENDPOINT = "https://bridge-swap.staging.aarc.xyz/bridge-swap/balances";
export declare const TOKEN_PRICE_ENDPOINT = "https://bridge-swap.staging.aarc.xyz/token-price";
export declare const IS_TOKEN_SUPPORTED_ENDPOINT = "https://bridge-swap.staging.aarc.xyz/bridge-swap/token-supported";

@@ -15,0 +16,0 @@ export declare const TOKENS_SUPPORTED_ENDPOINT = "https://bridge-swap.staging.aarc.xyz/bridge-swap/supported-tokens";

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ONRAMP_BASE_URL = exports.PERMIT2_CONTRACT_ADDRESS = exports.CHAINS_SUPPORTED_ENDPOINT = exports.TOKENS_SUPPORTED_ENDPOINT = exports.IS_TOKEN_SUPPORTED_ENDPOINT = exports.MULTI_CHAIN_BALANCES_ENDPOINT = exports.GENERATE_CHECKOUT_CALL_DATA_ENDPOINT = exports.GENERATE_DEPOSIT_CALL_DATA_ENDPOINT = exports.TRX_STATUS_ENDPOINT = exports.EXECUTE_FORWARD_CALL_DATA_ENDPOINT = exports.GENERATE_FORWARD_CALL_DATA_ENDPOINT = exports.EXECUTE_GASLESS_CALL_DATA_ENDPOINT = exports.GENERATE_GASLESS_CALL_DATA_ENDPOINT = exports.GENERATE_NON_GASLESS_CALL_DATA_ENDPOINT = exports.BALANCES_ENDPOINT = exports.BRIDGE_SWAP_BASE_URL = exports.MIGRATE_BASE_URL = void 0;
exports.ONRAMP_BASE_URL = exports.PERMIT2_CONTRACT_ADDRESS = exports.CHAINS_SUPPORTED_ENDPOINT = exports.TOKENS_SUPPORTED_ENDPOINT = exports.IS_TOKEN_SUPPORTED_ENDPOINT = exports.TOKEN_PRICE_ENDPOINT = exports.MULTI_CHAIN_BALANCES_ENDPOINT = exports.GENERATE_CHECKOUT_CALL_DATA_ENDPOINT = exports.GENERATE_DEPOSIT_CALL_DATA_ENDPOINT = exports.TRX_STATUS_ENDPOINT = exports.EXECUTE_FORWARD_CALL_DATA_ENDPOINT = exports.GENERATE_FORWARD_CALL_DATA_ENDPOINT = exports.EXECUTE_GASLESS_CALL_DATA_ENDPOINT = exports.GENERATE_GASLESS_CALL_DATA_ENDPOINT = exports.GENERATE_NON_GASLESS_CALL_DATA_ENDPOINT = exports.BALANCES_ENDPOINT = exports.BRIDGE_SWAP_BASE_URL = exports.MIGRATE_BASE_URL = void 0;
exports.MIGRATE_BASE_URL = "https://migrator.staging.aarc.xyz";

@@ -16,2 +16,3 @@ exports.BRIDGE_SWAP_BASE_URL = "https://bridge-swap.staging.aarc.xyz";

exports.MULTI_CHAIN_BALANCES_ENDPOINT = `${exports.BRIDGE_SWAP_BASE_URL}/bridge-swap/balances`;
exports.TOKEN_PRICE_ENDPOINT = `${exports.BRIDGE_SWAP_BASE_URL}/token-price`;
exports.IS_TOKEN_SUPPORTED_ENDPOINT = `${exports.BRIDGE_SWAP_BASE_URL}/bridge-swap/token-supported`;

@@ -18,0 +19,0 @@ exports.TOKENS_SUPPORTED_ENDPOINT = `${exports.BRIDGE_SWAP_BASE_URL}/bridge-swap/supported-tokens`;

@@ -350,2 +350,5 @@ import { BigNumberish, Signer } from "ethers";

};
export type PriceData = {
"tokenPrice": string;
};
export type IsTokenSupportedResponse = {

@@ -352,0 +355,0 @@ success: boolean;

@@ -1,2 +0,2 @@

import { BalancesData, BalancesResponse, CheckoutCallDataDto, CheckoutCalldataResponse, DepositCallDataDto, DepositCalldataResponse, ForwardCallDataDto, ForwardCalldataRes, GaslessCalldataResponse, IsTokenSupportedResponse, RelayedTxListResponse, SupportedChainInfo, SupportedTokensResponse, TRX_RESPONSE } from "./CoreTypes";
import { BalancesData, BalancesResponse, CheckoutCallDataDto, CheckoutCalldataResponse, DepositCallDataDto, DepositCalldataResponse, ForwardCallDataDto, ForwardCalldataRes, GaslessCalldataResponse, IsTokenSupportedResponse, PriceData, RelayedTxListResponse, SupportedChainInfo, SupportedTokensResponse, TRX_RESPONSE } from "./CoreTypes";
export declare const generateGaslessCallData: (forwardCallDataDto: ForwardCallDataDto, dappApiKey: string) => Promise<GaslessCalldataResponse>;

@@ -15,2 +15,3 @@ export declare const generateNonGaslessCallData: (forwardCallDataDto: ForwardCallDataDto, dappApiKey: string) => Promise<GaslessCalldataResponse>;

export declare const fetchBalances: (apiKey: string, chainId: number, eoaAddress: string, fetchBalancesOnly?: boolean, tokenAddresses?: string[]) => Promise<BalancesResponse>;
export declare const getTokenPrice: (apiKey: string, tokenSymbol: string) => Promise<PriceData>;
export declare const getMultiChainBalances: (apiKey: string, walletAddress: string, extendedBalances?: boolean) => Promise<BalancesData>;

@@ -17,0 +18,0 @@ export declare const IsTokenSupported: (apiKey: string, chainId: number, address: string) => Promise<IsTokenSupportedResponse>;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetTransactionStatus = exports.GetSupportedChains = exports.GetSupportedTokens = exports.IsTokenSupported = exports.getMultiChainBalances = exports.fetchBalances = exports.executeForwardCallData = exports.generateForwardCallData = exports.generateCheckoutCallData = exports.generateDepositCallData = exports.executeGaslessCallData = exports.generateNonGaslessCallData = exports.generateGaslessCallData = void 0;
exports.GetTransactionStatus = exports.GetSupportedChains = exports.GetSupportedTokens = exports.IsTokenSupported = exports.getMultiChainBalances = exports.getTokenPrice = exports.fetchBalances = exports.executeForwardCallData = exports.generateForwardCallData = exports.generateCheckoutCallData = exports.generateDepositCallData = exports.executeGaslessCallData = exports.generateNonGaslessCallData = exports.generateGaslessCallData = void 0;
const Constants_1 = require("./Constants");

@@ -192,2 +192,15 @@ const HttpRequest_1 = require("./HttpRequest");

exports.fetchBalances = fetchBalances;
const getTokenPrice = async (apiKey, tokenSymbol) => {
const response = await fetch(`${Constants_1.TOKEN_PRICE_ENDPOINT}/${tokenSymbol}`, {
method: "GET",
headers: {
"x-api-key": apiKey,
Accept: "application/json",
"Content-Type": "application/json",
},
});
const json = await response.json();
return json;
};
exports.getTokenPrice = getTokenPrice;
const getMultiChainBalances = async (apiKey, walletAddress, extendedBalances = false) => {

@@ -194,0 +207,0 @@ const response = await fetch(`${Constants_1.MULTI_CHAIN_BALANCES_ENDPOINT}/${walletAddress}/${extendedBalances}`, {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpMethod = void 0;
exports.sendRequest = sendRequest;
exports.sendRequest = exports.HttpMethod = void 0;
const Logger_1 = require("./Logger");

@@ -80,2 +79,3 @@ var HttpMethod;

}
exports.sendRequest = sendRequest;
//# sourceMappingURL=HttpRequest.js.map
{
"name": "@aarc-dev/core",
"version": "0.0.17",
"version": "0.0.18",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/src/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc