@chainflip/sdk 0.2.6 → 0.2.8
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/dist/swap.d.mts +8 -1
- package/dist/swap.d.ts +8 -1
- package/dist/swap.js +6136 -129
- package/dist/swap.mjs +6037 -30
- package/package.json +2 -3
package/dist/swap.d.mts
CHANGED
|
@@ -415,6 +415,7 @@ interface DepositAddressRequest extends QuoteRequest {
|
|
|
415
415
|
interface DepositAddressResponse extends DepositAddressRequest {
|
|
416
416
|
depositChannelId: string;
|
|
417
417
|
depositAddress: string;
|
|
418
|
+
sourceChainExpiryBlock: bigint;
|
|
418
419
|
}
|
|
419
420
|
interface SwapStatusRequest {
|
|
420
421
|
id: string;
|
|
@@ -514,16 +515,22 @@ type SwapSDKOptions = {
|
|
|
514
515
|
network?: Exclude<ChainflipNetwork, 'mainnet'>;
|
|
515
516
|
signer?: Signer;
|
|
516
517
|
backendUrl?: string;
|
|
518
|
+
broker?: {
|
|
519
|
+
url: string;
|
|
520
|
+
commissionBps: number;
|
|
521
|
+
};
|
|
517
522
|
};
|
|
518
523
|
declare class SwapSDK {
|
|
519
524
|
private readonly baseUrl;
|
|
520
525
|
private readonly network;
|
|
521
526
|
private readonly signer?;
|
|
527
|
+
private readonly trpc;
|
|
528
|
+
private readonly brokerConfig?;
|
|
522
529
|
constructor(options?: SwapSDKOptions);
|
|
523
530
|
getChains(sourceChain?: Chain): Promise<ChainData[]>;
|
|
524
531
|
getAssets(chain: Chain): Promise<AssetData[]>;
|
|
525
532
|
getQuote(quoteRequest: QuoteRequest, options?: RequestOptions): Promise<QuoteResponse>;
|
|
526
|
-
requestDepositAddress(depositAddressRequest: DepositAddressRequest
|
|
533
|
+
requestDepositAddress(depositAddressRequest: DepositAddressRequest): Promise<DepositAddressResponse>;
|
|
527
534
|
getStatus(swapStatusRequest: SwapStatusRequest, options?: RequestOptions): Promise<SwapStatusResponse>;
|
|
528
535
|
executeSwap(params: ExecuteSwapParams, txOpts?: TransactionOptions): Promise<TransactionHash>;
|
|
529
536
|
approveVault(params: Pick<TokenSwapParams, 'srcAsset' | 'amount'>, txOpts?: TransactionOptions): Promise<TransactionHash | null>;
|
package/dist/swap.d.ts
CHANGED
|
@@ -415,6 +415,7 @@ interface DepositAddressRequest extends QuoteRequest {
|
|
|
415
415
|
interface DepositAddressResponse extends DepositAddressRequest {
|
|
416
416
|
depositChannelId: string;
|
|
417
417
|
depositAddress: string;
|
|
418
|
+
sourceChainExpiryBlock: bigint;
|
|
418
419
|
}
|
|
419
420
|
interface SwapStatusRequest {
|
|
420
421
|
id: string;
|
|
@@ -514,16 +515,22 @@ type SwapSDKOptions = {
|
|
|
514
515
|
network?: Exclude<ChainflipNetwork, 'mainnet'>;
|
|
515
516
|
signer?: Signer;
|
|
516
517
|
backendUrl?: string;
|
|
518
|
+
broker?: {
|
|
519
|
+
url: string;
|
|
520
|
+
commissionBps: number;
|
|
521
|
+
};
|
|
517
522
|
};
|
|
518
523
|
declare class SwapSDK {
|
|
519
524
|
private readonly baseUrl;
|
|
520
525
|
private readonly network;
|
|
521
526
|
private readonly signer?;
|
|
527
|
+
private readonly trpc;
|
|
528
|
+
private readonly brokerConfig?;
|
|
522
529
|
constructor(options?: SwapSDKOptions);
|
|
523
530
|
getChains(sourceChain?: Chain): Promise<ChainData[]>;
|
|
524
531
|
getAssets(chain: Chain): Promise<AssetData[]>;
|
|
525
532
|
getQuote(quoteRequest: QuoteRequest, options?: RequestOptions): Promise<QuoteResponse>;
|
|
526
|
-
requestDepositAddress(depositAddressRequest: DepositAddressRequest
|
|
533
|
+
requestDepositAddress(depositAddressRequest: DepositAddressRequest): Promise<DepositAddressResponse>;
|
|
527
534
|
getStatus(swapStatusRequest: SwapStatusRequest, options?: RequestOptions): Promise<SwapStatusResponse>;
|
|
528
535
|
executeSwap(params: ExecuteSwapParams, txOpts?: TransactionOptions): Promise<TransactionHash>;
|
|
529
536
|
approveVault(params: Pick<TokenSwapParams, 'srcAsset' | 'amount'>, txOpts?: TransactionOptions): Promise<TransactionHash | null>;
|