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.15 to 0.0.16

4

dist/src/AarcCore.d.ts

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

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

@@ -17,3 +17,3 @@ apiKey: string;

performDeposit(depositDto: DepositDto): Promise<RelayedTxListResponse[]>;
performCheckout(depositDto: CheckoutDto): Promise<RelayedTxListResponse[]>;
performContractDeposit(depositDto: ContractCallDepositDto): Promise<RelayedTxListResponse[]>;
executeMigrationForward(executeMigrationForwardDto: ExecuteMigrationForwardDto): Promise<RelayedTxListResponse[]>;

@@ -20,0 +20,0 @@ executeMigrationGasless(executeMigrationGaslessDto: ExecuteMigrationGaslessDto): Promise<RelayedTxListResponse[]>;

@@ -234,3 +234,3 @@ "use strict";

}
async performCheckout(depositDto) {
async performContractDeposit(depositDto) {
var _a, _b, _c;

@@ -249,3 +249,3 @@ let callDataResultSet = [];

}
const depositResponse = await (0, Helper_1.generateCheckoutCallData)(depositDto, this.apiKey);
const depositResponse = await (0, Helper_1.generateDepositContractCallData)(depositDto, this.apiKey);
const approvalTxs = depositResponse.data.approvalTxs;

@@ -252,0 +252,0 @@ const executionTxs = depositResponse.data.executionTxs;

@@ -1,17 +0,16 @@

export declare const MIGRATE_BASE_URL = "https://migrator.staging.aarc.xyz";
export declare const BRIDGE_SWAP_BASE_URL = "https://bridge-swap.staging.aarc.xyz";
export declare const BALANCES_ENDPOINT = "https://migrator.staging.aarc.xyz/migrator/balances";
export declare const GENERATE_NON_GASLESS_CALL_DATA_ENDPOINT = "https://migrator.staging.aarc.xyz/migrate/non-gasless-calldata";
export declare const GENERATE_GASLESS_CALL_DATA_ENDPOINT = "https://migrator.staging.aarc.xyz/migrate/gasless-calldata";
export declare const EXECUTE_GASLESS_CALL_DATA_ENDPOINT = "https://migrator.staging.aarc.xyz/migrate/gasless-calldata-trx";
export declare const GENERATE_FORWARD_CALL_DATA_ENDPOINT = "https://migrator.staging.aarc.xyz/migrate/forward-calldata";
export declare const EXECUTE_FORWARD_CALL_DATA_ENDPOINT = "https://migrator.staging.aarc.xyz/migrate/forward-calldata-trx";
export declare const TRX_STATUS_ENDPOINT = "https://migrator.staging.aarc.xyz/migrator/tx/status";
export declare const GENERATE_DEPOSIT_CALL_DATA_ENDPOINT = "https://bridge-swap.staging.aarc.xyz/deposit-calldata";
export declare const GENERATE_CHECKOUT_CALL_DATA_ENDPOINT = "https://bridge-swap.staging.aarc.xyz/checkout-contract-calldata";
export declare const MULTI_CHAIN_BALANCES_ENDPOINT = "https://bridge-swap.staging.aarc.xyz/bridge-swap/balances";
export declare const IS_TOKEN_SUPPORTED_ENDPOINT = "https://bridge-swap.staging.aarc.xyz/bridge-swap/token-supported";
export declare const TOKENS_SUPPORTED_ENDPOINT = "https://bridge-swap.staging.aarc.xyz/bridge-swap/supported-tokens";
export declare const CHAINS_SUPPORTED_ENDPOINT = "https://bridge-swap.staging.aarc.xyz/bridge-swap/supported-chains";
export declare const MIGRATE_BASE_URL = "https://migrator.aarc.xyz";
export declare const BRIDGE_SWAP_BASE_URL = "http://localhost:40001/";
export declare const BALANCES_ENDPOINT = "https://migrator.aarc.xyz/migrator/balances";
export declare const GENERATE_NON_GASLESS_CALL_DATA_ENDPOINT = "https://migrator.aarc.xyz/migrate/non-gasless-calldata";
export declare const GENERATE_GASLESS_CALL_DATA_ENDPOINT = "https://migrator.aarc.xyz/migrate/gasless-calldata";
export declare const EXECUTE_GASLESS_CALL_DATA_ENDPOINT = "https://migrator.aarc.xyz/migrate/gasless-calldata-trx";
export declare const GENERATE_FORWARD_CALL_DATA_ENDPOINT = "https://migrator.aarc.xyz/migrate/forward-calldata";
export declare const EXECUTE_FORWARD_CALL_DATA_ENDPOINT = "https://migrator.aarc.xyz/migrate/forward-calldata-trx";
export declare const TRX_STATUS_ENDPOINT = "https://migrator.aarc.xyz/migrator/tx/status";
export declare const GENERATE_DEPOSIT_CALL_DATA_ENDPOINT = "http://localhost:40001//deposit-calldata";
export declare const MULTI_CHAIN_BALANCES_ENDPOINT = "http://localhost:40001//bridge-swap/balances";
export declare const IS_TOKEN_SUPPORTED_ENDPOINT = "http://localhost:40001//bridge-swap/token-supported";
export declare const TOKENS_SUPPORTED_ENDPOINT = "http://localhost:40001//bridge-swap/supported-tokens";
export declare const CHAINS_SUPPORTED_ENDPOINT = "http://localhost:40001//bridge-swap/supported-chains";
export declare const PERMIT2_CONTRACT_ADDRESS = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
export declare const ONRAMP_BASE_URL = "https://onramp.aarc.xyz";
"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.MIGRATE_BASE_URL = "https://migrator.staging.aarc.xyz";
exports.BRIDGE_SWAP_BASE_URL = "https://bridge-swap.staging.aarc.xyz";
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_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.aarc.xyz";
exports.BRIDGE_SWAP_BASE_URL = "http://localhost:40001/";
exports.BALANCES_ENDPOINT = `${exports.MIGRATE_BASE_URL}/migrator/balances`;

@@ -14,3 +14,2 @@ exports.GENERATE_NON_GASLESS_CALL_DATA_ENDPOINT = `${exports.MIGRATE_BASE_URL}/migrate/non-gasless-calldata`;

exports.GENERATE_DEPOSIT_CALL_DATA_ENDPOINT = `${exports.BRIDGE_SWAP_BASE_URL}/deposit-calldata`;
exports.GENERATE_CHECKOUT_CALL_DATA_ENDPOINT = `${exports.BRIDGE_SWAP_BASE_URL}/checkout-contract-calldata`;
exports.MULTI_CHAIN_BALANCES_ENDPOINT = `${exports.BRIDGE_SWAP_BASE_URL}/bridge-swap/balances`;

@@ -17,0 +16,0 @@ exports.IS_TOKEN_SUPPORTED_ENDPOINT = `${exports.BRIDGE_SWAP_BASE_URL}/bridge-swap/token-supported`;

@@ -152,12 +152,2 @@ import { BigNumberish, Signer } from "ethers";

};
export type CheckoutCalldataResponse = {
success: boolean;
data: {
approvalTxs: ApprovalTransaction[];
executionTxs: ExecutionTransaction[];
source: string;
gasFee: number;
executionTime: number;
};
};
export type TransferTokenDetails = {

@@ -193,6 +183,6 @@ tokenAddress: string;

export type OutputTokenPreferences = {
receipient?: string;
receipient: string;
outputTokenAddress?: string;
};
export type CheckoutDto = {
export type ContractCallDepositDto = {
senderSigner: Signer;

@@ -205,3 +195,3 @@ fromChainId: number;

targetContractAddress: string;
checkoutIndex?: number;
checkoutIndex: number;
fromAddress: string;

@@ -208,0 +198,0 @@ destinationPayload: string;

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

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

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

export declare const generateDepositCallData: (depositCallDataDto: DepositCallDataDto, dappApiKey: string) => Promise<DepositCalldataResponse>;
export declare const generateCheckoutCallData: (depositCallDataDto: CheckoutDto, dappApiKey: string) => Promise<CheckoutCalldataResponse>;
export declare const generateDepositContractCallData: (depositCallDataDto: ContractCallDepositDto, dappApiKey: string) => Promise<DepositCalldataResponse>;
export declare const generateForwardCallData: (forwardCallDataDto: ForwardCallDataDto, dappApiKey: string) => Promise<ForwardCalldataRes>;

@@ -9,0 +9,0 @@ export declare const executeForwardCallData: (chainId: string, forwardCalldataSet: ForwardCalldataRes, dappApiKey: string) => Promise<RelayedTxListResponse[]>;

"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.fetchBalances = exports.executeForwardCallData = exports.generateForwardCallData = exports.generateDepositContractCallData = exports.generateDepositCallData = exports.executeGaslessCallData = exports.generateNonGaslessCallData = exports.generateGaslessCallData = void 0;
const Constants_1 = require("./Constants");

@@ -90,3 +90,3 @@ const HttpRequest_1 = require("./HttpRequest");

exports.generateDepositCallData = generateDepositCallData;
const generateCheckoutCallData = async (depositCallDataDto, dappApiKey) => {
const generateDepositContractCallData = async (depositCallDataDto, dappApiKey) => {
try {

@@ -102,3 +102,3 @@ // Destructure checkoutPreferences and other properties from depositDto

// Append query string to the endpoint URL
const url = `${Constants_1.GENERATE_CHECKOUT_CALL_DATA_ENDPOINT}?${queryString}`;
const url = `${Constants_1.GENERATE_DEPOSIT_CALL_DATA_ENDPOINT}?${queryString}`;
const txResponse = await (0, HttpRequest_1.sendRequest)({

@@ -120,3 +120,3 @@ url,

};
exports.generateCheckoutCallData = generateCheckoutCallData;
exports.generateDepositContractCallData = generateDepositContractCallData;
const generateForwardCallData = async (forwardCallDataDto, dappApiKey) => {

@@ -123,0 +123,0 @@ try {

{
"name": "@aarc-dev/core",
"version": "0.0.15",
"version": "0.0.16",
"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

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