@defuse-protocol/intents-sdk 0.16.4 → 0.17.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.
- package/dist/index.cjs +414 -264
- package/dist/index.d.cts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +359 -213
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -238,7 +238,7 @@ interface FeeEstimation {
|
|
|
238
238
|
}
|
|
239
239
|
interface Bridge {
|
|
240
240
|
is(routeConfig: RouteConfig): boolean;
|
|
241
|
-
supports(params: Pick<WithdrawalParams, "assetId" | "routeConfig">): boolean
|
|
241
|
+
supports(params: Pick<WithdrawalParams, "assetId" | "routeConfig">): Promise<boolean>;
|
|
242
242
|
parseAssetId(assetId: string): ParsedAssetInfo | null;
|
|
243
243
|
/**
|
|
244
244
|
* Validates withdrawal constraints for the bridge.
|
|
@@ -427,7 +427,7 @@ declare function createIntentSignerViem(config: IntentSignerViemConfig): IIntent
|
|
|
427
427
|
|
|
428
428
|
declare function createInternalTransferRoute(): InternalTransferRouteConfig;
|
|
429
429
|
declare function createNearWithdrawalRoute(msg?: string): NearWithdrawalRouteConfig;
|
|
430
|
-
declare function
|
|
430
|
+
declare function createOmniBridgeRoute(): OmniBridgeRouteConfig;
|
|
431
431
|
declare function createVirtualChainRoute(auroraEngineContractId: string, proxyTokenContractId: string | null): VirtualChainRouteConfig;
|
|
432
432
|
declare function createPoaBridgeRoute(chain: Chain): PoaBridgeRouteConfig;
|
|
433
433
|
declare function createHotBridgeRoute(chain: Chain): HotBridgeRouteConfig;
|
|
@@ -468,6 +468,13 @@ declare class TrustlineNotFoundError extends BaseError {
|
|
|
468
468
|
tokenAddress: string;
|
|
469
469
|
constructor(destinationAddress: string, assetId: string, blockchain: string, tokenAddress: string);
|
|
470
470
|
}
|
|
471
|
+
type UnsupportedAssetIdErrorType = UnsupportedAssetIdError & {
|
|
472
|
+
name: "UnsupportedAssetIdError";
|
|
473
|
+
};
|
|
474
|
+
declare class UnsupportedAssetIdError extends BaseError {
|
|
475
|
+
assetId: string;
|
|
476
|
+
constructor(assetId: string, details: string);
|
|
477
|
+
}
|
|
471
478
|
|
|
472
479
|
type HotWithdrawalPendingErrorType = HotWithdrawalPendingError & {
|
|
473
480
|
name: "HotWithdrawalPendingError";
|
|
@@ -524,4 +531,4 @@ declare class TokenNotFoundInDestinationChainError extends BaseError {
|
|
|
524
531
|
constructor(token: string, chainKind: Chain);
|
|
525
532
|
}
|
|
526
533
|
|
|
527
|
-
export { type BatchWithdrawalResult, BridgeNameEnum, type BridgeNameEnumValues, type Chain, Chains, type FeeEstimation, FeeExceedsAmountError, type FeeExceedsAmountErrorType, type HotBridgeRouteConfig, HotWithdrawalCancelledError, type HotWithdrawalCancelledErrorType, HotWithdrawalNotFoundError, type HotWithdrawalNotFoundErrorType, HotWithdrawalPendingError, type HotWithdrawalPendingErrorType, type IIntentSigner, type IntentPayload, type IntentPayloadFactory, type IntentPrimitive, type IntentPublishResult, type IntentRelayParamsFactory, type IntentSettlementStatus, IntentsSDK, type IntentsSDKConfig, type InternalTransferRouteConfig, MinWithdrawalAmountError, type MinWithdrawalAmountErrorType, type NearTxInfo, type NearWithdrawalRouteConfig, type OmniBridgeRouteConfig, OmniTransferDestinationChainHashNotFoundError, type OmniTransferDestinationChainHashNotFoundErrorType, OmniTransferNotFoundError, type OmniTransferNotFoundErrorType, type OnBeforePublishIntentHook, type ParsedAssetInfo, type PoaBridgeRouteConfig, type ProcessWithdrawalArgs, type RouteConfig, RouteEnum, type RouteEnumValues, type SignAndSendWithdrawalArgs, TokenNotFoundInDestinationChainError, type TokenNotFoundInDestinationChainErrorType, TokenNotSupportedByOmniRelayerError, type TokenNotSupportedByOmniRelayerErrorType, TrustlineNotFoundError, type TrustlineNotFoundErrorType, type TxInfo, type TxNoInfo, UnsupportedDestinationMemoError, type UnsupportedDestinationMemoErrorType, type VirtualChainRouteConfig, type WithdrawalIdentifier, type WithdrawalParams, type WithdrawalResult, createDefaultRoute, createHotBridgeRoute, createIntentSignerNEP413, createIntentSignerNearKeyPair, createIntentSignerViem, createInternalTransferRoute, createNearWithdrawalRoute,
|
|
534
|
+
export { type BatchWithdrawalResult, BridgeNameEnum, type BridgeNameEnumValues, type Chain, Chains, type FeeEstimation, FeeExceedsAmountError, type FeeExceedsAmountErrorType, type HotBridgeRouteConfig, HotWithdrawalCancelledError, type HotWithdrawalCancelledErrorType, HotWithdrawalNotFoundError, type HotWithdrawalNotFoundErrorType, HotWithdrawalPendingError, type HotWithdrawalPendingErrorType, type IIntentSigner, type IntentPayload, type IntentPayloadFactory, type IntentPrimitive, type IntentPublishResult, type IntentRelayParamsFactory, type IntentSettlementStatus, IntentsSDK, type IntentsSDKConfig, type InternalTransferRouteConfig, MinWithdrawalAmountError, type MinWithdrawalAmountErrorType, type NearTxInfo, type NearWithdrawalRouteConfig, type OmniBridgeRouteConfig, OmniTransferDestinationChainHashNotFoundError, type OmniTransferDestinationChainHashNotFoundErrorType, OmniTransferNotFoundError, type OmniTransferNotFoundErrorType, type OnBeforePublishIntentHook, type ParsedAssetInfo, type PoaBridgeRouteConfig, type ProcessWithdrawalArgs, type RouteConfig, RouteEnum, type RouteEnumValues, type SignAndSendWithdrawalArgs, TokenNotFoundInDestinationChainError, type TokenNotFoundInDestinationChainErrorType, TokenNotSupportedByOmniRelayerError, type TokenNotSupportedByOmniRelayerErrorType, TrustlineNotFoundError, type TrustlineNotFoundErrorType, type TxInfo, type TxNoInfo, UnsupportedAssetIdError, type UnsupportedAssetIdErrorType, UnsupportedDestinationMemoError, type UnsupportedDestinationMemoErrorType, type VirtualChainRouteConfig, type WithdrawalIdentifier, type WithdrawalParams, type WithdrawalResult, createDefaultRoute, createHotBridgeRoute, createIntentSignerNEP413, createIntentSignerNearKeyPair, createIntentSignerViem, createInternalTransferRoute, createNearWithdrawalRoute, createOmniBridgeRoute, createPoaBridgeRoute, createVirtualChainRoute };
|
package/dist/index.d.ts
CHANGED
|
@@ -238,7 +238,7 @@ interface FeeEstimation {
|
|
|
238
238
|
}
|
|
239
239
|
interface Bridge {
|
|
240
240
|
is(routeConfig: RouteConfig): boolean;
|
|
241
|
-
supports(params: Pick<WithdrawalParams, "assetId" | "routeConfig">): boolean
|
|
241
|
+
supports(params: Pick<WithdrawalParams, "assetId" | "routeConfig">): Promise<boolean>;
|
|
242
242
|
parseAssetId(assetId: string): ParsedAssetInfo | null;
|
|
243
243
|
/**
|
|
244
244
|
* Validates withdrawal constraints for the bridge.
|
|
@@ -427,7 +427,7 @@ declare function createIntentSignerViem(config: IntentSignerViemConfig): IIntent
|
|
|
427
427
|
|
|
428
428
|
declare function createInternalTransferRoute(): InternalTransferRouteConfig;
|
|
429
429
|
declare function createNearWithdrawalRoute(msg?: string): NearWithdrawalRouteConfig;
|
|
430
|
-
declare function
|
|
430
|
+
declare function createOmniBridgeRoute(): OmniBridgeRouteConfig;
|
|
431
431
|
declare function createVirtualChainRoute(auroraEngineContractId: string, proxyTokenContractId: string | null): VirtualChainRouteConfig;
|
|
432
432
|
declare function createPoaBridgeRoute(chain: Chain): PoaBridgeRouteConfig;
|
|
433
433
|
declare function createHotBridgeRoute(chain: Chain): HotBridgeRouteConfig;
|
|
@@ -468,6 +468,13 @@ declare class TrustlineNotFoundError extends BaseError {
|
|
|
468
468
|
tokenAddress: string;
|
|
469
469
|
constructor(destinationAddress: string, assetId: string, blockchain: string, tokenAddress: string);
|
|
470
470
|
}
|
|
471
|
+
type UnsupportedAssetIdErrorType = UnsupportedAssetIdError & {
|
|
472
|
+
name: "UnsupportedAssetIdError";
|
|
473
|
+
};
|
|
474
|
+
declare class UnsupportedAssetIdError extends BaseError {
|
|
475
|
+
assetId: string;
|
|
476
|
+
constructor(assetId: string, details: string);
|
|
477
|
+
}
|
|
471
478
|
|
|
472
479
|
type HotWithdrawalPendingErrorType = HotWithdrawalPendingError & {
|
|
473
480
|
name: "HotWithdrawalPendingError";
|
|
@@ -524,4 +531,4 @@ declare class TokenNotFoundInDestinationChainError extends BaseError {
|
|
|
524
531
|
constructor(token: string, chainKind: Chain);
|
|
525
532
|
}
|
|
526
533
|
|
|
527
|
-
export { type BatchWithdrawalResult, BridgeNameEnum, type BridgeNameEnumValues, type Chain, Chains, type FeeEstimation, FeeExceedsAmountError, type FeeExceedsAmountErrorType, type HotBridgeRouteConfig, HotWithdrawalCancelledError, type HotWithdrawalCancelledErrorType, HotWithdrawalNotFoundError, type HotWithdrawalNotFoundErrorType, HotWithdrawalPendingError, type HotWithdrawalPendingErrorType, type IIntentSigner, type IntentPayload, type IntentPayloadFactory, type IntentPrimitive, type IntentPublishResult, type IntentRelayParamsFactory, type IntentSettlementStatus, IntentsSDK, type IntentsSDKConfig, type InternalTransferRouteConfig, MinWithdrawalAmountError, type MinWithdrawalAmountErrorType, type NearTxInfo, type NearWithdrawalRouteConfig, type OmniBridgeRouteConfig, OmniTransferDestinationChainHashNotFoundError, type OmniTransferDestinationChainHashNotFoundErrorType, OmniTransferNotFoundError, type OmniTransferNotFoundErrorType, type OnBeforePublishIntentHook, type ParsedAssetInfo, type PoaBridgeRouteConfig, type ProcessWithdrawalArgs, type RouteConfig, RouteEnum, type RouteEnumValues, type SignAndSendWithdrawalArgs, TokenNotFoundInDestinationChainError, type TokenNotFoundInDestinationChainErrorType, TokenNotSupportedByOmniRelayerError, type TokenNotSupportedByOmniRelayerErrorType, TrustlineNotFoundError, type TrustlineNotFoundErrorType, type TxInfo, type TxNoInfo, UnsupportedDestinationMemoError, type UnsupportedDestinationMemoErrorType, type VirtualChainRouteConfig, type WithdrawalIdentifier, type WithdrawalParams, type WithdrawalResult, createDefaultRoute, createHotBridgeRoute, createIntentSignerNEP413, createIntentSignerNearKeyPair, createIntentSignerViem, createInternalTransferRoute, createNearWithdrawalRoute,
|
|
534
|
+
export { type BatchWithdrawalResult, BridgeNameEnum, type BridgeNameEnumValues, type Chain, Chains, type FeeEstimation, FeeExceedsAmountError, type FeeExceedsAmountErrorType, type HotBridgeRouteConfig, HotWithdrawalCancelledError, type HotWithdrawalCancelledErrorType, HotWithdrawalNotFoundError, type HotWithdrawalNotFoundErrorType, HotWithdrawalPendingError, type HotWithdrawalPendingErrorType, type IIntentSigner, type IntentPayload, type IntentPayloadFactory, type IntentPrimitive, type IntentPublishResult, type IntentRelayParamsFactory, type IntentSettlementStatus, IntentsSDK, type IntentsSDKConfig, type InternalTransferRouteConfig, MinWithdrawalAmountError, type MinWithdrawalAmountErrorType, type NearTxInfo, type NearWithdrawalRouteConfig, type OmniBridgeRouteConfig, OmniTransferDestinationChainHashNotFoundError, type OmniTransferDestinationChainHashNotFoundErrorType, OmniTransferNotFoundError, type OmniTransferNotFoundErrorType, type OnBeforePublishIntentHook, type ParsedAssetInfo, type PoaBridgeRouteConfig, type ProcessWithdrawalArgs, type RouteConfig, RouteEnum, type RouteEnumValues, type SignAndSendWithdrawalArgs, TokenNotFoundInDestinationChainError, type TokenNotFoundInDestinationChainErrorType, TokenNotSupportedByOmniRelayerError, type TokenNotSupportedByOmniRelayerErrorType, TrustlineNotFoundError, type TrustlineNotFoundErrorType, type TxInfo, type TxNoInfo, UnsupportedAssetIdError, type UnsupportedAssetIdErrorType, UnsupportedDestinationMemoError, type UnsupportedDestinationMemoErrorType, type VirtualChainRouteConfig, type WithdrawalIdentifier, type WithdrawalParams, type WithdrawalResult, createDefaultRoute, createHotBridgeRoute, createIntentSignerNEP413, createIntentSignerNearKeyPair, createIntentSignerViem, createInternalTransferRoute, createNearWithdrawalRoute, createOmniBridgeRoute, createPoaBridgeRoute, createVirtualChainRoute };
|