@safe-global/safe-gateway-typescript-sdk
Advanced tools
Comparing version 3.22.4-beta.0 to 3.22.4-beta.1
@@ -8,3 +8,3 @@ import type { operations } from './types/api'; | ||
import type { MasterCopyReponse } from './types/master-copies'; | ||
import type { AnyConfirmationView, DecodedDataResponse } from './types/decoded-data'; | ||
import type { BaselineConfirmationView, OrderConfirmationView, DecodedDataResponse } from './types/decoded-data'; | ||
import type { SafeMessage, SafeMessageListPage } from './types/safe-messages'; | ||
@@ -106,3 +106,3 @@ import type { DelegateResponse, DelegatesRequest } from './types/delegates'; | ||
*/ | ||
export declare function getConfirmationView(chainId: string, safeAddress: string, data: operations['data_decoder']['parameters']['body']['data'], to?: operations['data_decoder']['parameters']['body']['to'], value?: operations['data_decoder']['parameters']['body']['value']): Promise<AnyConfirmationView>; | ||
export declare function getConfirmationView(chainId: string, safeAddress: string, encodedData: operations['data_decoder']['parameters']['body']['data'], to?: operations['data_decoder']['parameters']['body']['to']): Promise<BaselineConfirmationView | OrderConfirmationView>; | ||
/** | ||
@@ -109,0 +109,0 @@ * Returns all defined chain configs |
@@ -202,6 +202,6 @@ "use strict"; | ||
*/ | ||
function getConfirmationView(chainId, safeAddress, data, to, value) { | ||
function getConfirmationView(chainId, safeAddress, encodedData, to) { | ||
return (0, endpoint_1.postEndpoint)(baseUrl, '/v1/chains/{chainId}/safes/{safe_address}/views/transaction-confirmation', { | ||
path: { chainId, safe_address: safeAddress }, | ||
body: { data, to, value }, | ||
path: { chainId: chainId, safe_address: safeAddress }, | ||
body: { data: encodedData, to }, | ||
}); | ||
@@ -208,0 +208,0 @@ } |
@@ -6,3 +6,3 @@ import type { AllOwnedSafes, FiatCurrencies, OwnedSafes, SafeBalanceResponse, SafeCollectibleResponse, SafeCollectiblesPage } from './common'; | ||
import type { SafeAppsResponse } from './safe-apps'; | ||
import type { AnyConfirmationView, DecodedDataRequest, DecodedDataResponse } from './decoded-data'; | ||
import type { BaselineConfirmationView, OrderConfirmationView, DecodedDataRequest, DecodedDataResponse } from './decoded-data'; | ||
import type { MasterCopyReponse } from './master-copies'; | ||
@@ -797,3 +797,3 @@ import type { ConfirmSafeMessageRequest, ProposeSafeMessageRequest, SafeMessage, SafeMessageListPage } from './safe-messages'; | ||
200: { | ||
schema: AnyConfirmationView; | ||
schema: BaselineConfirmationView | OrderConfirmationView; | ||
}; | ||
@@ -800,0 +800,0 @@ }; |
@@ -1,8 +0,5 @@ | ||
import type { TokenInfo } from './common'; | ||
import type { SwapOrder, TwapOrder } from './transactions'; | ||
export declare enum ConfirmationViewTypes { | ||
GENERIC = "GENERIC", | ||
COW_SWAP_ORDER = "COW_SWAP_ORDER", | ||
COW_SWAP_TWAP_ORDER = "COW_SWAP_TWAP_ORDER", | ||
KILN_NATIVE_STAKING_DEPOSIT = "KILN_NATIVE_STAKING_DEPOSIT" | ||
COW_SWAP_TWAP_ORDER = "COW_SWAP_TWAP_ORDER" | ||
} | ||
@@ -12,3 +9,2 @@ export type DecodedDataRequest = { | ||
to?: string; | ||
value?: string; | ||
}; | ||
@@ -39,3 +35,3 @@ type ParamValue = string | ParamValue[]; | ||
export type BaselineConfirmationView = { | ||
type: ConfirmationViewTypes.GENERIC; | ||
type: 'GENERIC'; | ||
} & DecodedDataResponse; | ||
@@ -48,30 +44,3 @@ export type SwapOrderConfirmationView = { | ||
} & DecodedDataResponse & Omit<TwapOrder, 'type' | 'humanDescription' | 'richDecodedInfo'>; | ||
export type AnySwapOrderConfirmationView = SwapOrderConfirmationView | TwapOrderConfirmationView; | ||
export declare enum NativeStakingStatus { | ||
AWAITING_ENTRY = "AWAITING_ENTRY", | ||
REQUESTED_EXIT = "REQUESTED_EXIT", | ||
SIGNATURE_NEEDED = "SIGNATURE_NEEDED", | ||
AWAITING_EXECUTION = "AWAITING_EXECUTION", | ||
VALIDATION_STARTED = "VALIDATION_STARTED", | ||
WITHDRAWN = "WITHDRAWN", | ||
UNKNOWN = "UNKNOWN" | ||
} | ||
export type NativeStakingDepositConfirmationView = { | ||
type: ConfirmationViewTypes.KILN_NATIVE_STAKING_DEPOSIT; | ||
status: NativeStakingStatus; | ||
estimatedEntryTime: number; | ||
estimatedExitTime: number; | ||
estimatedWithdrawalTime: number; | ||
fee: number; | ||
monthlyNrr: number; | ||
annualNrr: number; | ||
tokenInfo: TokenInfo; | ||
value: string; | ||
expectedAnnualReward: string; | ||
expectedMonthlyReward: string; | ||
expectedFiatAnnualReward: number; | ||
expectedFiatMonthlyReward: number; | ||
numValidators: number; | ||
} & DecodedDataResponse; | ||
export type AnyConfirmationView = BaselineConfirmationView | SwapOrderConfirmationView | TwapOrderConfirmationView | NativeStakingDepositConfirmationView; | ||
export type OrderConfirmationView = SwapOrderConfirmationView | TwapOrderConfirmationView; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.NativeStakingStatus = exports.ConfirmationViewTypes = void 0; | ||
exports.ConfirmationViewTypes = void 0; | ||
var ConfirmationViewTypes; | ||
(function (ConfirmationViewTypes) { | ||
ConfirmationViewTypes["GENERIC"] = "GENERIC"; | ||
ConfirmationViewTypes["COW_SWAP_ORDER"] = "COW_SWAP_ORDER"; | ||
ConfirmationViewTypes["COW_SWAP_TWAP_ORDER"] = "COW_SWAP_TWAP_ORDER"; | ||
ConfirmationViewTypes["KILN_NATIVE_STAKING_DEPOSIT"] = "KILN_NATIVE_STAKING_DEPOSIT"; | ||
})(ConfirmationViewTypes = exports.ConfirmationViewTypes || (exports.ConfirmationViewTypes = {})); | ||
var NativeStakingStatus; | ||
(function (NativeStakingStatus) { | ||
NativeStakingStatus["AWAITING_ENTRY"] = "AWAITING_ENTRY"; | ||
NativeStakingStatus["REQUESTED_EXIT"] = "REQUESTED_EXIT"; | ||
NativeStakingStatus["SIGNATURE_NEEDED"] = "SIGNATURE_NEEDED"; | ||
NativeStakingStatus["AWAITING_EXECUTION"] = "AWAITING_EXECUTION"; | ||
NativeStakingStatus["VALIDATION_STARTED"] = "VALIDATION_STARTED"; | ||
NativeStakingStatus["WITHDRAWN"] = "WITHDRAWN"; | ||
NativeStakingStatus["UNKNOWN"] = "UNKNOWN"; | ||
})(NativeStakingStatus = exports.NativeStakingStatus || (exports.NativeStakingStatus = {})); | ||
//# sourceMappingURL=decoded-data.js.map |
import type { AddressEx, Page, TokenInfo } from './common'; | ||
import type { NativeStakingDepositConfirmationView } from './decoded-data'; | ||
import type { RichDecodedInfo } from './human-description'; | ||
@@ -63,4 +62,3 @@ export type ParamValue = string | ParamValue[]; | ||
TWAP_ORDER = "TwapOrder", | ||
SWAP_TRANSFER = "SwapTransfer", | ||
NATIVE_STAKING_DEPOSIT = "NativeStakingDeposit" | ||
SWAP_TRANSFER = "SwapTransfer" | ||
} | ||
@@ -292,7 +290,3 @@ export declare enum ConflictType { | ||
export type Order = SwapOrder | SwapTransferOrder | TwapOrder; | ||
export type StakingTxInfo = { | ||
type: TransactionInfoType.NATIVE_STAKING_DEPOSIT; | ||
humanDescription?: string; | ||
} & Omit<NativeStakingDepositConfirmationView, 'type'>; | ||
export type TransactionInfo = Transfer | SettingsChange | Custom | MultiSend | Cancellation | Creation | Order | StakingTxInfo; | ||
export type TransactionInfo = Transfer | SettingsChange | Custom | MultiSend | Cancellation | Creation | Order; | ||
export type ModuleExecutionInfo = { | ||
@@ -299,0 +293,0 @@ type: DetailedExecutionInfoType.MODULE; |
@@ -51,3 +51,2 @@ "use strict"; | ||
TransactionInfoType["SWAP_TRANSFER"] = "SwapTransfer"; | ||
TransactionInfoType["NATIVE_STAKING_DEPOSIT"] = "NativeStakingDeposit"; | ||
})(TransactionInfoType = exports.TransactionInfoType || (exports.TransactionInfoType = {})); | ||
@@ -54,0 +53,0 @@ var ConflictType; |
{ | ||
"name": "@safe-global/safe-gateway-typescript-sdk", | ||
"version": "3.22.4-beta.0", | ||
"version": "3.22.4-beta.1", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137737
3362