import {z} from 'zod' export type CoreV0AcknowledgeBackup = {backupId: string, type: 'v0_AcknowledgeBackup'}; export type CoreEntityIdAndRevision = {id: string, revision: number}; export type CoreV0AddAccountLedgers = {reference: CoreEntityIdAndRevision, ledgerIds?: Array | undefined, type: 'v0_AddAccountLedgers'}; export type CoreV0AddTrustedPublicKeysForMigration = {newCollectionSigningPublicKey: unknown, newMessageSigningPublicKey: unknown, newApiSigningPublicKey: unknown, newKeyMaterial: string, currentCollectionSigningPublicKey: unknown, currentCollectionSigningPublicKeySignature: unknown, type: 'v0_AddTrustedPublicKeysForMigration'}; export type CoreV0AttemptTransactionOrderCancellation = {targetTransactionOrderId: string, replacementTransactionOrderId: string, reason: string, maximumFee?: string | undefined, type: 'v0_AttemptTransactionOrderCancellation'}; export type CoreAccountKeyStrategy = 'VaultHard' | 'VaultSoft' | 'Random'; export type CoreV0CreateAccountProviderDetailsPayload = {vaultId: string, keyStrategy: CoreAccountKeyStrategy, type: 'Vault'}; export type CoreIntentLockStatus = 'Unlocked' | 'Locked'; export type CoreStringsMap = {[key: string]: string}; export type CoreV0CreateAccount = {id: string, alias: string, providerDetails: CoreV0CreateAccountProviderDetailsPayload, ledgerId?: string | undefined, ledgerIds?: Array | undefined, lock: CoreIntentLockStatus, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_CreateAccount'}; export type CoreVaultBackupParametersVaultHsm = {vaultId: string, type: 'VaultHsm'}; export type CoreVaultBackupParametersVaultMpc = {vaultId: string, type: 'VaultMpc'}; export type CoreVaultBackupParameters = CoreVaultBackupParametersVaultHsm | CoreVaultBackupParametersVaultMpc; export type CoreV0CreateBackup = {id: string, parameters: CoreVaultBackupParameters, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_CreateBackup'}; export type CoreGoverningStrategy = 'ConsiderDescendants' | 'CoerceDescendants'; export type CoreReadAccess = {domains: Array, users: Array, endpoints: Array, policies: Array, accounts: Array, transactions: Array, requests: Array, events: Array}; export type CorePermissions = {readAccess: CoreReadAccess}; export type CoreLoginId = {id: string, providerId: string}; export type CoreCreateDomainGenesisUser = {id: string, alias: string, publicKey: unknown, roles: Array, lock: CoreIntentLockStatus, description?: string | undefined, customProperties: CoreStringsMap, loginIds?: Array | undefined}; export type CoreIntentType = 'v0_NotarizeData' | 'v0_ExecuteExtension' | 'v0_CreateDomain' | 'v0_UpdateDomain' | 'v0_UpdateDomainPermissions' | 'v0_UnlockDomain' | 'v0_LockDomain' | 'v0_CreateUser' | 'v0_UpdateUser' | 'v0_UnlockUser' | 'v0_LockUser' | 'v0_CreatePolicy' | 'v0_UpdatePolicy' | 'v0_UnlockPolicy' | 'v0_LockPolicy' | 'v0_CreateVault' | 'v0_UpdateVault' | 'v0_UnlockVault' | 'v0_LockVault' | 'v0_RewrapVaultKeyMaterial' | 'v0_UnlockTicker' | 'v0_LockTicker' | 'v0_CreateEndpoint' | 'v0_UpdateEndpoint' | 'v0_UnlockEndpoint' | 'v0_LockEndpoint' | 'v0_CreateAccount' | 'v0_MigrateSilo3AccountBatch' | 'v0_UpdateAccount' | 'v0_UnlockAccount' | 'v0_LockAccount' | 'v0_AddAccountLedgers' | 'v0_CreateTransactionOrder' | 'v0_ReleaseQuarantinedTransfers' | 'v0_CreateTicker' | 'v0_AttemptTransactionOrderCancellation' | 'v0_ValidateTickers' | 'v0_UpdateTicker' | 'v0_CreateTransferOrder' | 'v0_SignManifest' | 'v0_SetSystemProperty' | 'v0_CreateLedger' | 'v0_UpdateLedger' | 'v0_AddTrustedPublicKeysForMigration' | 'v0_RegisterTrustedPublicKey' | 'v0_CreateBackup' | 'v0_AcknowledgeBackup'; export type CorePolicyScope = 'Self' | 'Descendants' | 'SelfAndDescendants'; export type CoreScriptingEngine = 'Javascript_v0'; export type CorePolicyConditionAnd = {left: CorePolicyCondition, right: CorePolicyCondition, type: 'And'}; export type CorePolicyConditionExpression = {expression: string, type: 'Expression'}; export type CorePolicyConditionOr = {left: CorePolicyCondition, right: CorePolicyCondition, type: 'Or'}; export type CorePolicyCondition = CorePolicyConditionAnd | CorePolicyConditionExpression | CorePolicyConditionOr; export type CoreWorkflowConditionAnd = {left: CoreWorkflowCondition, right: CoreWorkflowCondition, type: 'And'}; export type CoreWorkflowConditionOr = {left: CoreWorkflowCondition, right: CoreWorkflowCondition, type: 'Or'}; export type CoreWorkflowConditionRoleQuorum = {role: string, quorum: number, type: 'RoleQuorum'}; export type CoreWorkflowCondition = CoreWorkflowConditionAnd | CoreWorkflowConditionOr | CoreWorkflowConditionRoleQuorum; export type CoreIntentOrigin = 'UserSigned' | 'SystemSigned'; export type CoreCreateDomainGenesisPolicy = {id: string, alias: string, rank: number, intentTypes?: Array | undefined, scope: CorePolicyScope, scriptingEngine: CoreScriptingEngine, condition?: CorePolicyCondition | undefined, workflow?: Array | undefined, lock: CoreIntentLockStatus, description?: string | undefined, customProperties: CoreStringsMap, intentOrigin?: CoreIntentOrigin | undefined}; export type CoreV0CreateDomain = {id: string, alias: string, lock: CoreIntentLockStatus, governingStrategy?: CoreGoverningStrategy | undefined, permissions: CorePermissions, description?: string | undefined, customProperties: CoreStringsMap, users: Array, policies: Array, childrenDomainIds?: Array | undefined, type: 'v0_CreateDomain'}; export type CoreEndpointLedgerParameters = {ABI?: string | undefined, type: 'Ethereum'}; export type CoreV0CreateEndpoint = {id: string, address: string, trustScore: number, ledgerId: string, parameters?: CoreEndpointLedgerParameters | undefined, alias: string, lock: CoreIntentLockStatus, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_CreateEndpoint'}; export type CoreLedgerParametersAlgorand = {genesisId: string, genesisHash: string, nativeTickerSymbol: string, nativeTickerName: string, nativeTickerDecimals: number, type: 'Algorand'}; export type CoreBitcoinLikeVaultLedgerIdentifier = 'btc' | 'ltc' | 'bch' | 'doge' | 'dash'; export type CoreNetwork = 'mainnet' | 'testnet' | 'regtest'; export type CoreLedgerParametersBitcoin = {supportsSegWit: boolean, vaultLedgerIdentifier: CoreBitcoinLikeVaultLedgerIdentifier, network: CoreNetwork, tickerSymbol: string, tickerName: string, dustLimit: string, type: 'Bitcoin'}; export type CoreLedgerParametersCardano = {nativeTickerSymbol: string, nativeTickerName: string, testnetMagic?: number | undefined, type: 'Cardano'}; export type CoreEthereumLikeVaultLedgerIdentifier = 'eth' | 'etc'; export type CoreLedgerParametersEthereum = {chainId: number, vaultLedgerIdentifier: CoreEthereumLikeVaultLedgerIdentifier, nativeTickerSymbol: string, nativeTickerName: string, supportsEIP1559: boolean, type: 'Ethereum'}; export type CoreLedgerParametersHedera = {nativeTickerSymbol: string, nativeTickerName: string, type: 'Hedera'}; export type CoreLedgerParametersSolana = {nativeTickerSymbol: string, nativeTickerName: string, lamportsPerSignature: string, type: 'Solana'}; export type CoreLedgerParametersStellar = {nativeTickerSymbol: string, nativeTickerName: string, networkPassphrase: string, type: 'Stellar'}; export type CoreSubstrateFeeParameters = {baseExtrinsic: number, readWeight: number, writeWeight: number, transactionByteFee: string, weightToFeePolynomial: Array, type: 'TransactionPayment'}; export type CoreSubstrateMethodFeeParameters = {base: number, reads: number, writes: number, type: 'MethodWeight'}; export type CoreSubstrateMethodInfo = {name: string, methodId: number, feeParameters: CoreSubstrateMethodFeeParameters}; export type CoreSubstratePalletInfo = {name: string, moduleId: number, methods: Array}; export type CoreSubstrateChainType = 'RelayChain' | 'AssetHub'; export type CoreSubstrateRuntimeInfo = {transactionVersion: number, feeParameters: CoreSubstrateFeeParameters, pallets: Array, chainType?: CoreSubstrateChainType | undefined}; export type CoreLedgerParametersSubstrate = {genesisHash: unknown, addressPrefix: number, nativeTickerSymbol: string, nativeTickerName: string, nativeTickerDecimals: number, supportedRuntimeVersions: Array, type: 'Substrate'}; export type CoreLedgerParametersTezos = {nativeTickerSymbol: string, nativeTickerName: string, chainId: string, type: 'Tezos'}; export type CoreLedgerParametersTron = {nativeTickerSymbol: string, nativeTickerName: string, type: 'Tron'}; export type CoreLedgerParametersXRPL = {nativeTickerSymbol: string, nativeTickerName: string, networkId: number, type: 'XRPL'}; export type CoreLedgerParameters = CoreLedgerParametersAlgorand | CoreLedgerParametersBitcoin | CoreLedgerParametersCardano | CoreLedgerParametersEthereum | CoreLedgerParametersHedera | CoreLedgerParametersSolana | CoreLedgerParametersStellar | CoreLedgerParametersSubstrate | CoreLedgerParametersTezos | CoreLedgerParametersTron | CoreLedgerParametersXRPL; export type CoreV0CreateLedger = {id: string, alias: string, parameters: CoreLedgerParameters, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_CreateLedger'}; export type CoreV0CreatePolicy = {id: string, alias: string, rank: number, intentTypes?: Array | undefined, scope: CorePolicyScope, scriptingEngine: CoreScriptingEngine, condition?: CorePolicyCondition | undefined, workflow?: Array | undefined, lock: CoreIntentLockStatus, description?: string | undefined, customProperties: CoreStringsMap, intentOrigin?: CoreIntentOrigin | undefined, type: 'v0_CreatePolicy'}; export type CoreTickerKind = 'Native' | 'Contract' | 'Token'; export type CoreAlgorandTickerProperties = {type: 'Native'}; export type CoreTickerLedgerDetailsAlgorand = {properties: CoreAlgorandTickerProperties, type: 'Algorand'}; export type CoreBitcoinTickerProperties = {type: 'Native'}; export type CoreTickerLedgerDetailsBitcoin = {properties: CoreBitcoinTickerProperties, type: 'Bitcoin'}; export type CoreCardanoTickerProperties = {type: 'Native'}; export type CoreTickerLedgerDetailsCardano = {properties: CoreCardanoTickerProperties, type: 'Cardano'}; export type CoreEthereumTickerPropertiesERC1155 = {address: string, tokenId: string, type: 'ERC1155'}; export type CoreEthereumTickerPropertiesERC20 = {address: string, type: 'ERC20'}; export type CoreEthereumTickerPropertiesERC721 = {address: string, tokenId: string, type: 'ERC721'}; export type CoreEthereumTickerPropertiesNative = {type: 'Native'}; export type CoreEthereumTickerProperties = CoreEthereumTickerPropertiesERC1155 | CoreEthereumTickerPropertiesERC20 | CoreEthereumTickerPropertiesERC721 | CoreEthereumTickerPropertiesNative; export type CoreTickerLedgerDetailsEthereum = {properties: CoreEthereumTickerProperties, type: 'Ethereum'}; export type CoreHederaTickerPropertiesFungibleToken = {id: string, type: 'FungibleToken'}; export type CoreHederaTickerPropertiesNative = {type: 'Native'}; export type CoreHederaTickerPropertiesNonFungibleToken = {id: string, serialNumber: number, type: 'NonFungibleToken'}; export type CoreHederaTickerProperties = CoreHederaTickerPropertiesFungibleToken | CoreHederaTickerPropertiesNative | CoreHederaTickerPropertiesNonFungibleToken; export type CoreTickerLedgerDetailsHedera = {properties: CoreHederaTickerProperties, type: 'Hedera'}; export type CoreSolanaTickerPropertiesNative = {type: 'Native'}; export type CoreSolanaTokenType = 'SPL' | 'SPL2022'; export type CoreSolanaTickerPropertiesToken = {mint: string, tokenType: CoreSolanaTokenType, type: 'Token'}; export type CoreSolanaTickerProperties = CoreSolanaTickerPropertiesNative | CoreSolanaTickerPropertiesToken; export type CoreTickerLedgerDetailsSolana = {properties: CoreSolanaTickerProperties, type: 'Solana'}; export type CoreStellarTickerPropertiesNative = {type: 'Native'}; export type CoreStellarTickerPropertiesToken = {code: string, issuer: string, type: 'Token'}; export type CoreStellarTickerProperties = CoreStellarTickerPropertiesNative | CoreStellarTickerPropertiesToken; export type CoreTickerLedgerDetailsStellar = {properties: CoreStellarTickerProperties, type: 'Stellar'}; export type CoreSubstrateTickerProperties = {type: 'Native'}; export type CoreTickerLedgerDetailsSubstrate = {properties: CoreSubstrateTickerProperties, type: 'Substrate'}; export type CoreTezosTickerProperties = {type: 'Native'}; export type CoreTickerLedgerDetailsTezos = {properties: CoreTezosTickerProperties, type: 'Tezos'}; export type CoreTronTickerPropertiesNative = {type: 'Native'}; export type CoreTronTickerPropertiesTRC20 = {contractAddress: string, type: 'TRC20'}; export type CoreTronTickerProperties = CoreTronTickerPropertiesNative | CoreTronTickerPropertiesTRC20; export type CoreTickerLedgerDetailsTron = {properties: CoreTronTickerProperties, type: 'Tron'}; export type CoreXrplTickerPropertiesFungibleToken = {currencyCode: string, issuer: string, type: 'FungibleToken'}; export type CoreXrplTickerPropertiesMultiPurposeToken = {issuanceId: string, type: 'MultiPurposeToken'}; export type CoreXrplTickerPropertiesNative = {type: 'Native'}; export type CoreXrplTickerProperties = CoreXrplTickerPropertiesFungibleToken | CoreXrplTickerPropertiesMultiPurposeToken | CoreXrplTickerPropertiesNative; export type CoreTickerLedgerDetailsXRPL = {properties: CoreXrplTickerProperties, type: 'XRPL'}; export type CoreTickerLedgerDetails = CoreTickerLedgerDetailsAlgorand | CoreTickerLedgerDetailsBitcoin | CoreTickerLedgerDetailsCardano | CoreTickerLedgerDetailsEthereum | CoreTickerLedgerDetailsHedera | CoreTickerLedgerDetailsSolana | CoreTickerLedgerDetailsStellar | CoreTickerLedgerDetailsSubstrate | CoreTickerLedgerDetailsTezos | CoreTickerLedgerDetailsTron | CoreTickerLedgerDetailsXRPL; export type CoreV0CreateTicker = {ledgerId: string, kind: CoreTickerKind, name: string, decimals?: number | undefined, symbol?: string | undefined, ledgerDetails: CoreTickerLedgerDetails, type: 'v0_CreateTicker'}; export type CoreTransactionDestinationAccount = {accountId: string, type: 'Account'}; export type CoreTransactionDestinationAddress = {address: string, type: 'Address'}; export type CoreTransactionDestinationEndpoint = {endpointId: string, type: 'Endpoint'}; export type CoreTransactionDestination = CoreTransactionDestinationAccount | CoreTransactionDestinationAddress | CoreTransactionDestinationEndpoint; export type CoreAlgorandOperation = {destination: CoreTransactionDestination, amount: string, type: 'Payment'}; export type CoreFeePriority = 'High' | 'Medium' | 'Low'; export type CoreAlgorandFeeStrategy = {priority: CoreFeePriority, type: 'Priority'}; export type CoreTransactionOrderParametersAlgorand = {operation: CoreAlgorandOperation, note?: string | undefined, feeStrategy: CoreAlgorandFeeStrategy, maximumFee?: string | undefined, type: 'Algorand'}; export type CoreBitcoinOutputParameters = {destination: CoreTransactionDestination, amount: string, paysFee?: boolean | undefined}; export type CoreBitcoinFeeStrategyPriority = {priority: CoreFeePriority, type: 'Priority'}; export type CoreBitcoinFeeStrategySpecifiedRate = {satoshiPerVbyte: string, type: 'SpecifiedRate'}; export type CoreBitcoinFeeStrategy = CoreBitcoinFeeStrategyPriority | CoreBitcoinFeeStrategySpecifiedRate; export type CoreBitcoinResourceStrategy = {transactionOrderId: string, reason?: string | undefined, type: 'OrderReplacement'}; export type CoreAddressForChange = 'GenerateNewAddress' | 'PrimaryAddress'; export type CoreTransactionOrderParametersBitcoin = {outputs: Array, feeStrategy: CoreBitcoinFeeStrategy, maximumFee?: string | undefined, resourceStrategy?: CoreBitcoinResourceStrategy | undefined, addressForChange?: CoreAddressForChange | undefined, type: 'Bitcoin'}; export type CoreTransactionOrderParametersBitcoinRedirect = {transferIds: Array, outputs: Array, feeStrategy: CoreBitcoinFeeStrategy, maximumFee?: string | undefined, type: 'BitcoinRedirect'}; export type CoreDelegateRepresentativeParameters = {type: 'AlwaysAbstain'}; export type CoreCardanoOperationDelegateRepresentative = {parameters: CoreDelegateRepresentativeParameters, type: 'DelegateRepresentative'}; export type CoreCardanoOperationDelegateStaking = {poolId: string, type: 'DelegateStaking'}; export type CoreCardanoOperationRegisterStaking = {type: 'RegisterStaking'}; export type CoreCardanoOutputParameters = {destination: CoreTransactionDestination, amount: string, paysFee?: boolean | undefined}; export type CoreCardanoOperationTransfer = {outputs: Array, type: 'Transfer'}; export type CoreCardanoOperationUnregisterStaking = {type: 'UnregisterStaking'}; export type CoreCardanoOperationWithdrawRewards = {amount: string, type: 'WithdrawRewards'}; export type CoreCardanoOperation = CoreCardanoOperationDelegateRepresentative | CoreCardanoOperationDelegateStaking | CoreCardanoOperationRegisterStaking | CoreCardanoOperationTransfer | CoreCardanoOperationUnregisterStaking | CoreCardanoOperationWithdrawRewards; export type CoreCardanoFeeStrategy = {priority: CoreFeePriority, type: 'Priority'}; export type CoreTransactionOrderParametersCardano = {operation: CoreCardanoOperation, feeStrategy: CoreCardanoFeeStrategy, maximumFee?: string | undefined, type: 'Cardano'}; export type CoreEthereumFeeStrategyPriority = {priority: CoreFeePriority, type: 'Priority'}; export type CoreEthereumFeeStrategySpecifiedRate = {gasPrice: string, type: 'SpecifiedRate'}; export type CoreEthereumFeeStrategySpecifiedRateEIP1559 = {maxFeePerGas: string, maxPriorityFeePerGas: string, type: 'SpecifiedRateEIP1559'}; export type CoreEthereumFeeStrategy = CoreEthereumFeeStrategyPriority | CoreEthereumFeeStrategySpecifiedRate | CoreEthereumFeeStrategySpecifiedRateEIP1559; export type CoreEthereumResourceStrategy = {transactionOrderId: string, reason?: string | undefined, type: 'OrderReplacement'}; export type CoreTransactionOrderParametersEthereum = {destination?: CoreTransactionDestination | undefined, amount: string, feeStrategy: CoreEthereumFeeStrategy, maximumFee?: string | undefined, data?: string | undefined, resourceStrategy?: CoreEthereumResourceStrategy | undefined, type: 'Ethereum'}; export type CoreHederaOperationAccountUpdate = {maxAutomaticTokenAssociations: number, type: 'AccountUpdate'}; export type CoreTokenDestinationTicker = {tickerId: string, type: 'Ticker'}; export type CoreTokenDestinationTokenId = {tokenId: string, type: 'TokenId'}; export type CoreTokenDestination = CoreTokenDestinationTicker | CoreTokenDestinationTokenId; export type CoreHederaOperationTokenAssociate = {tokens: Array, type: 'TokenAssociate'}; export type CoreHederaOperationTokenDissociate = {tokens: Array, type: 'TokenDissociate'}; export type CoreHederaTransferOutput = {destination: CoreTransactionDestination, amount: string}; export type CoreTokenOutputHederaFungibleTokenOutput = {token: CoreTokenDestination, destination: CoreTransactionDestination, amount: string, type: 'HederaFungibleTokenOutput'}; export type CoreNonFungibleTokenDestinationNftTokenId = {tokenId: string, serialNumber: number, type: 'NftTokenId'}; export type CoreNonFungibleTokenDestinationTicker = {tickerId: string, type: 'Ticker'}; export type CoreNonFungibleTokenDestination = CoreNonFungibleTokenDestinationNftTokenId | CoreNonFungibleTokenDestinationTicker; export type CoreTokenOutputHederaNonFungibleTokenOutput = {token: CoreNonFungibleTokenDestination, destination: CoreTransactionDestination, type: 'HederaNonFungibleTokenOutput'}; export type CoreTokenOutput = CoreTokenOutputHederaFungibleTokenOutput | CoreTokenOutputHederaNonFungibleTokenOutput; export type CoreHederaOperationTransfer = {outputs?: Array | undefined, tokenOutputs?: Array | undefined, type: 'Transfer'}; export type CoreHederaOperation = CoreHederaOperationAccountUpdate | CoreHederaOperationTokenAssociate | CoreHederaOperationTokenDissociate | CoreHederaOperationTransfer; export type CoreHederaFeeStrategy = {priority: CoreFeePriority, type: 'Priority'}; export type CoreTransactionOrderParametersHedera = {operation: CoreHederaOperation, memo?: string | undefined, feeStrategy: CoreHederaFeeStrategy, maximumFee?: string | undefined, type: 'Hedera'}; export type CoreSolanaMintAccountDestination = {destination: CoreTransactionDestination, type: 'Destination'}; export type CoreSolanaMintAccountTicker = {tickerId: string, type: 'Ticker'}; export type CoreSolanaMintAccount = CoreSolanaMintAccountDestination | CoreSolanaMintAccountTicker; export type CoreSolanaOperationBurn = {mintAccount: CoreSolanaMintAccount, amount: string, type: 'Burn'}; export type CoreSolanaOperationCreateNonceAccount = {createOnAccount: string, type: 'CreateNonceAccount'}; export type CoreSolanaOperationFundAtaAccount = {destination?: CoreTransactionDestination | undefined, mintAccount: CoreSolanaMintAccount, type: 'FundAtaAccount'}; export type CoreSolanaOperationInitializeMint = {mintAccount: string, decimals: number, tokenType: CoreSolanaTokenType, type: 'InitializeMint'}; export type CoreSolanaOperationMintTo = {destination: CoreTransactionDestination, mintAccount: CoreSolanaMintAccount, amount: string, type: 'MintTo'}; export type CoreSolanaTransferOutput = {destination: CoreTransactionDestination, amount: string}; export type CoreSolanaOperationTransfer = {outputs: Array, type: 'Transfer'}; export type CoreSolanaOperationTransferToken = {outputs: Array, mintAccount: CoreSolanaMintAccount, type: 'TransferToken'}; export type CoreSolanaOperation = CoreSolanaOperationBurn | CoreSolanaOperationCreateNonceAccount | CoreSolanaOperationFundAtaAccount | CoreSolanaOperationInitializeMint | CoreSolanaOperationMintTo | CoreSolanaOperationTransfer | CoreSolanaOperationTransferToken; export type CoreSolanaFeeStrategy = {priority: CoreFeePriority, type: 'Priority'}; export type CoreTransactionOrderParametersSolana = {operation: CoreSolanaOperation, memos: Array, feeStrategy: CoreSolanaFeeStrategy, maximumFee?: string | undefined, nonceAccount?: CoreTransactionDestination | undefined, type: 'Solana'}; export type CoreStellarOperationAccountMerge = {destination: CoreTransactionDestination, type: 'AccountMerge'}; export type CoreStellarAsset = {code: string, issuer: string}; export type CoreStellarOperationChangeTrust = {limit: string, asset: CoreStellarAsset, type: 'ChangeTrust'}; export type CoreStellarOperationCreateAccount = {destination: CoreTransactionDestination, startingBalance: string, type: 'CreateAccount'}; export type CoreStellarOperationPayment = {destination: CoreTransactionDestination, amount: string, asset?: CoreStellarAsset | undefined, type: 'Payment'}; export type CoreStellarOptionOptionHomeDomain = {homeDomain: string, type: 'OptionHomeDomain'}; export type CoreStellarOptionFlag = 'AuthImmutable'; export type CoreStellarOptionOptionSetFlag = {setFlag: CoreStellarOptionFlag, type: 'OptionSetFlag'}; export type CoreStellarOption = CoreStellarOptionOptionHomeDomain | CoreStellarOptionOptionSetFlag; export type CoreStellarOperationSetOptions = {option: CoreStellarOption, type: 'SetOptions'}; export type CoreStellarOperation = CoreStellarOperationAccountMerge | CoreStellarOperationChangeTrust | CoreStellarOperationCreateAccount | CoreStellarOperationPayment | CoreStellarOperationSetOptions; export type CoreStellarMemoHash = {value: string, type: 'Hash'}; export type CoreStellarMemoId = {value: string, type: 'Id'}; export type CoreStellarMemoReturn = {value: string, type: 'Return'}; export type CoreStellarMemoText = {value: string, type: 'Text'}; export type CoreStellarMemo = CoreStellarMemoHash | CoreStellarMemoId | CoreStellarMemoReturn | CoreStellarMemoText; export type CoreStellarFeeStrategyPriority = {priority: CoreFeePriority, type: 'Priority'}; export type CoreStellarFeeStrategySpecifiedRate = {baseFee: string, type: 'SpecifiedRate'}; export type CoreStellarFeeStrategy = CoreStellarFeeStrategyPriority | CoreStellarFeeStrategySpecifiedRate; export type CoreTransactionOrderParametersStellar = {operation: CoreStellarOperation, memo?: CoreStellarMemo | undefined, feeStrategy: CoreStellarFeeStrategy, maximumFee?: string | undefined, type: 'Stellar'}; export type CoreSubstrateBalancesMethod = {destination: CoreTransactionDestination, amount: string, type: 'TransferKeepAlive'}; export type CoreSubstratePalletBalances = {method: CoreSubstrateBalancesMethod, type: 'Balances'}; export type CoreSubstrateStakingPayeeAccount = {destination: CoreTransactionDestination, type: 'Account'}; export type CoreSubstrateStakingPayeeController = {type: 'Controller'}; export type CoreSubstrateStakingPayeeStaked = {type: 'Staked'}; export type CoreSubstrateStakingPayeeStash = {type: 'Stash'}; export type CoreSubstrateStakingPayee = CoreSubstrateStakingPayeeAccount | CoreSubstrateStakingPayeeController | CoreSubstrateStakingPayeeStaked | CoreSubstrateStakingPayeeStash; export type CoreSubstrateStakingMethodBond = {controller?: CoreTransactionDestination | undefined, value: string, payee: CoreSubstrateStakingPayee, type: 'Bond'}; export type CoreSubstrateStakingMethodBondExtra = {maxAdditional: string, type: 'BondExtra'}; export type CoreSubstrateStakingMethodChill = {type: 'Chill'}; export type CoreSubstrateStakingMethodNominate = {targets: Array, type: 'Nominate'}; export type CoreSubstrateStakingMethodRebond = {value: string, type: 'Rebond'}; export type CoreSubstrateStakingMethodSetController = {controller?: CoreTransactionDestination | undefined, type: 'SetController'}; export type CoreSubstrateStakingMethodSetPayee = {payee: CoreSubstrateStakingPayee, type: 'SetPayee'}; export type CoreSubstrateStakingMethodUnbond = {value: string, type: 'Unbond'}; export type CoreSubstrateStakingMethodWithdrawUnbonded = {numSlashingSpans: number, type: 'WithdrawUnbonded'}; export type CoreSubstrateStakingMethod = CoreSubstrateStakingMethodBond | CoreSubstrateStakingMethodBondExtra | CoreSubstrateStakingMethodChill | CoreSubstrateStakingMethodNominate | CoreSubstrateStakingMethodRebond | CoreSubstrateStakingMethodSetController | CoreSubstrateStakingMethodSetPayee | CoreSubstrateStakingMethodUnbond | CoreSubstrateStakingMethodWithdrawUnbonded; export type CoreSubstratePalletStaking = {method: CoreSubstrateStakingMethod, type: 'Staking'}; export type CoreSubstratePallet = CoreSubstratePalletBalances | CoreSubstratePalletStaking; export type CoreSubstrateFeeStrategy = {priority: CoreFeePriority, type: 'Priority'}; export type CoreTransactionOrderParametersSubstrate = {pallet: CoreSubstratePallet, feeStrategy: CoreSubstrateFeeStrategy, maximumFee?: string | undefined, type: 'Substrate'}; export type CoreTezosOperationDelegation = {destination: CoreTransactionDestination, type: 'Delegation'}; export type CoreTezosOperationReveal = {type: 'Reveal'}; export type CoreContractParameters = {value: string, type: 'Raw'}; export type CoreTezosOperationTransaction = {destination: CoreTransactionDestination, amount: string, contractParameters?: CoreContractParameters | undefined, type: 'Transaction'}; export type CoreTezosOperationUndelegation = {type: 'Undelegation'}; export type CoreTezosOperation = CoreTezosOperationDelegation | CoreTezosOperationReveal | CoreTezosOperationTransaction | CoreTezosOperationUndelegation; export type CoreTezosFeeStrategy = {priority: CoreFeePriority, type: 'Priority'}; export type CoreTransactionOrderParametersTezos = {operation: CoreTezosOperation, feeStrategy: CoreTezosFeeStrategy, maximumFee?: string | undefined, type: 'Tezos'}; export type CoreTronFeeStrategy = {priority: CoreFeePriority, type: 'Priority'}; export type CoreTronOperationNativeTransfer = {destination: CoreTransactionDestination, amount: string, type: 'NativeTransfer'}; export type CoreTronOperationTRC20Transfer = {destination: CoreTransactionDestination, amount: string, contractAddress: string, type: 'TRC20Transfer'}; export type CoreTronOperation = CoreTronOperationNativeTransfer | CoreTronOperationTRC20Transfer; export type CoreTransactionOrderParametersTron = {feeStrategy: CoreTronFeeStrategy, maximumFee?: string | undefined, operation: CoreTronOperation, type: 'Tron'}; export type CoreXrplFeeStrategyPriority = {priority: CoreFeePriority, type: 'Priority'}; export type CoreXrplFeeStrategySpecifiedAdditionalFee = {drops: string, type: 'SpecifiedAdditionalFee'}; export type CoreXrplFeeStrategy = CoreXrplFeeStrategyPriority | CoreXrplFeeStrategySpecifiedAdditionalFee; export type CoreXrplMemo = {memoData?: string | undefined, memoFormat?: string | undefined, memoType?: string | undefined}; export type CoreXrplAccountSetFlag = 'asfGlobalFreeze' | 'asfNoFreeze' | 'asfRequireAuth' | 'asfAllowTrustLineClawback' | 'asfAccountTxnID' | 'asfDepositAuth' | 'asfRequireDest' | 'asfDefaultRipple'; export type CoreXrplOperationAccountSet = {setFlag?: CoreXrplAccountSetFlag | undefined, clearFlag?: CoreXrplAccountSetFlag | undefined, transferRate?: number | undefined, type: 'AccountSet'}; export type CoreXrplClawbackCurrencyCurrency = {code: string, issuer: string, type: 'Currency'}; export type CoreXrplClawbackCurrencyMultiPurposeToken = {issuanceId: string, type: 'MultiPurposeToken'}; export type CoreXrplClawbackCurrencyTickerId = {tickerId: string, type: 'TickerId'}; export type CoreXrplClawbackCurrency = CoreXrplClawbackCurrencyCurrency | CoreXrplClawbackCurrencyMultiPurposeToken | CoreXrplClawbackCurrencyTickerId; export type CoreXrplOperationClawback = {currency: CoreXrplClawbackCurrency, holder: CoreTransactionDestination, value: string, type: 'Clawback'}; export type CoreXrplOperationDepositPreauth = {authorize?: CoreTransactionDestination | undefined, unauthorize?: CoreTransactionDestination | undefined, type: 'DepositPreauth'}; export type CoreXrplOperationEscrowFinish = {owner: CoreTransactionDestination, offerSequence: number, condition?: string | undefined, credentialIds?: Array | undefined, fulfillment?: string | undefined, type: 'EscrowFinish'}; export type CoreXrplMPTokenIdentifierMPTokenIssuanceId = {issuanceId: string, type: 'MPTokenIssuanceId'}; export type CoreXrplMPTokenIdentifierTickerId = {tickerId: string, type: 'TickerId'}; export type CoreXrplMPTokenIdentifier = CoreXrplMPTokenIdentifierMPTokenIssuanceId | CoreXrplMPTokenIdentifierTickerId; export type CoreXrplMPTokenAuthorizeFlag = 'tfMPTUnauthorize'; export type CoreXrplOperationMPTokenAuthorize = {tokenIdentifier: CoreXrplMPTokenIdentifier, flags: Array, holder?: CoreTransactionDestination | undefined, type: 'MPTokenAuthorize'}; export type CoreXrplMPTokenIssuanceCreateFlag = 'tfMPTRequireAuth' | 'tfMPTCanClawback' | 'tfMPTCanTransfer' | 'tfMPTCanEscrow' | 'tfMPTCanLock' | 'tfMPTCanTrade'; export type CoreMPTokenIssuanceMetadata = {value: string, type: 'HexEncodedMetadata'}; export type CoreXrplOperationMPTokenIssuanceCreate = {flags: Array, assetScale?: number | undefined, transferFee?: number | undefined, maximumAmount?: string | undefined, metadata?: CoreMPTokenIssuanceMetadata | undefined, type: 'MPTokenIssuanceCreate'}; export type CoreXrplOperationMPTokenIssuanceDestroy = {tokenIdentifier: CoreXrplMPTokenIdentifier, type: 'MPTokenIssuanceDestroy'}; export type CoreXrplMPTokenIssuanceSetFlag = 'tfMPTLock' | 'tfMPTUnlock'; export type CoreXrplOperationMPTokenIssuanceSet = {tokenIdentifier: CoreXrplMPTokenIdentifier, holder?: CoreTransactionDestination | undefined, flags: Array, type: 'MPTokenIssuanceSet'}; export type CoreXrplOfferCreateFlag = 'tfImmediateOrCancel' | 'tfFillOrKill' | 'tfSell'; export type CoreXrplIouCurrencyCurrency = {code: string, issuer: string, type: 'Currency'}; export type CoreXrplIouCurrencyTickerId = {tickerId: string, type: 'TickerId'}; export type CoreXrplIouCurrency = CoreXrplIouCurrencyCurrency | CoreXrplIouCurrencyTickerId; export type CoreXrplAssetQuantity = {currency?: CoreXrplIouCurrency | undefined, amount: string}; export type CoreXrplOperationOfferCreate = {flags: Array, takerGets: CoreXrplAssetQuantity, takerPays: CoreXrplAssetQuantity, type: 'OfferCreate'}; export type CoreXrplPaymentCurrencyCurrency = {code: string, issuer: string, type: 'Currency'}; export type CoreXrplPaymentCurrencyMultiPurposeToken = {issuanceId: string, type: 'MultiPurposeToken'}; export type CoreXrplPaymentCurrencyTickerId = {tickerId: string, type: 'TickerId'}; export type CoreXrplPaymentCurrency = CoreXrplPaymentCurrencyCurrency | CoreXrplPaymentCurrencyMultiPurposeToken | CoreXrplPaymentCurrencyTickerId; export type CoreXrplOperationPayment = {destination: CoreTransactionDestination, amount: string, destinationTag?: number | undefined, currency?: CoreXrplPaymentCurrency | undefined, type: 'Payment'}; export type CoreXrplTrustSetFlag = 'tfSetFreeze' | 'tfClearFreeze' | 'tfSetfAuth'; export type CoreXrplLimitAmount = {currency: CoreXrplIouCurrency, value: string}; export type CoreXrplOperationTrustSet = {flags: Array, limitAmount: CoreXrplLimitAmount, enableRippling?: boolean | undefined, type: 'TrustSet'}; export type CoreXrplOperation = CoreXrplOperationAccountSet | CoreXrplOperationClawback | CoreXrplOperationDepositPreauth | CoreXrplOperationEscrowFinish | CoreXrplOperationMPTokenAuthorize | CoreXrplOperationMPTokenIssuanceCreate | CoreXrplOperationMPTokenIssuanceDestroy | CoreXrplOperationMPTokenIssuanceSet | CoreXrplOperationOfferCreate | CoreXrplOperationPayment | CoreXrplOperationTrustSet; export type CoreTransactionOrderParametersXRPL = {destination?: CoreTransactionDestination | undefined, amount?: string | undefined, feeStrategy: CoreXrplFeeStrategy, maximumFee?: string | undefined, sourceTag?: number | undefined, destinationTag?: number | undefined, memos: Array, operation?: CoreXrplOperation | undefined, type: 'XRPL'}; export type CoreTransactionOrderParameters = CoreTransactionOrderParametersAlgorand | CoreTransactionOrderParametersBitcoin | CoreTransactionOrderParametersBitcoinRedirect | CoreTransactionOrderParametersCardano | CoreTransactionOrderParametersEthereum | CoreTransactionOrderParametersHedera | CoreTransactionOrderParametersSolana | CoreTransactionOrderParametersStellar | CoreTransactionOrderParametersSubstrate | CoreTransactionOrderParametersTezos | CoreTransactionOrderParametersTron | CoreTransactionOrderParametersXRPL; export type CoreV0CreateTransactionOrder = {id: string, accountId: string, ledgerId?: string | undefined, parameters: CoreTransactionOrderParameters, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_CreateTransactionOrder'}; export type CoreCreateTransferOrderOutput = {destination: CoreTransactionDestination, amount: string, paysFee?: boolean | undefined}; export type CorePreferredAddressForChange = 'PrimaryAddress'; export type CoreV0CreateTransferOrder = {id: string, accountId: string, tickerId: string, outputs: Array, feeStrategy: CoreFeePriority, maximumFee?: string | undefined, preferredAddressForChange?: CorePreferredAddressForChange | undefined, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_CreateTransferOrder'}; export type CoreV0CreateUser = {id: string, alias: string, publicKey: unknown, roles: Array, lock: CoreIntentLockStatus, description?: string | undefined, customProperties: CoreStringsMap, loginIds?: Array | undefined, type: 'v0_CreateUser'}; export type CoreVaultParametersHSM = {type: 'HSM'}; export type CoreVaultParametersMPC = {backupEncryptionKey?: string | undefined, type: 'MPC'}; export type CoreVaultParameters = CoreVaultParametersHSM | CoreVaultParametersMPC; export type CoreV0CreateVault = {id: string, alias: string, parameters?: CoreVaultParameters | undefined, publicKey: unknown, lock: CoreIntentLockStatus, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_CreateVault'}; export type CoreV0ExecuteExtension = {payload: {[key: string]: Record}, type: 'v0_ExecuteExtension'}; export type CoreV0LockAccount = {reference: CoreEntityIdAndRevision, type: 'v0_LockAccount'}; export type CoreV0LockDomain = {reference: CoreEntityIdAndRevision, type: 'v0_LockDomain'}; export type CoreV0LockEndpoint = {reference: CoreEntityIdAndRevision, type: 'v0_LockEndpoint'}; export type CoreV0LockPolicy = {reference: CoreEntityIdAndRevision, type: 'v0_LockPolicy'}; export type CoreV0LockTicker = {reference: CoreEntityIdAndRevision, type: 'v0_LockTicker'}; export type CoreV0LockUser = {reference: CoreEntityIdAndRevision, type: 'v0_LockUser'}; export type CoreV0LockVault = {reference: CoreEntityIdAndRevision, type: 'v0_LockVault'}; export type CoreV3AccountToMigrate = {id: string, alias: string, description?: string | undefined, ledgerId: string, lockStatus: CoreIntentLockStatus, publicId: string, customProperties: CoreStringsMap}; export type CoreV0MigrateSilo3AccountBatch = {vaultId: string, wasColdSilo: boolean, wasTestSilo: boolean, accounts: Array, type: 'v0_MigrateSilo3AccountBatch'}; export type CoreV0NotarizeData = {data: string, type: 'v0_NotarizeData'}; export type CoreTrustedPublicKeyPurpose = 'ApiSignatures' | 'TrustedCollectionSignatures' | 'MessagingSignatures' | 'SystemSignatures'; export type CoreV0RegisterTrustedPublicKey = {publicKey: unknown, purpose: CoreTrustedPublicKeyPurpose, type: 'v0_RegisterTrustedPublicKey'}; export type CoreV0ReleaseQuarantinedTransfers = {accountId: string, transferIds: Array, type: 'v0_ReleaseQuarantinedTransfers'}; export type CoreV0RewrapVaultKeyMaterial = {vaultId: string, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_RewrapVaultKeyMaterial'}; export type CoreNotarySystemSignedIntentsEnabledValue = {enabled: boolean}; export type CoreReadWriteSystemPropertyKeyValueNotarySystemSignedIntentsEnabledProperty = {value: CoreNotarySystemSignedIntentsEnabledValue, type: 'NotarySystemSignedIntentsEnabledProperty'}; export type CoreAccountPublicKeyOnly = {value: unknown, type: 'PublicKey'}; export type CoreStateReviewAuthorityValue = {publicKey: CoreAccountPublicKeyOnly}; export type CoreReadWriteSystemPropertyKeyValueStateReviewAuthorityProperty = {value: CoreStateReviewAuthorityValue, type: 'StateReviewAuthorityProperty'}; export type CoreReadWriteSystemPropertyKeyValue = CoreReadWriteSystemPropertyKeyValueNotarySystemSignedIntentsEnabledProperty | CoreReadWriteSystemPropertyKeyValueStateReviewAuthorityProperty; export type CoreV0SetSystemProperty = {revision?: number | undefined, value: CoreReadWriteSystemPropertyKeyValue, type: 'v0_SetSystemProperty'}; export type CoreManifestContentEIP191 = {value: string, type: 'EIP-191'}; export type CoreManifestContentJWTHeader = {type?: string | undefined, algorithm?: string | undefined, additionalParameters?: CoreStringsMap | undefined}; export type CoreManifestContentJWTPayload = {issuer?: string | undefined, subject?: string | undefined, audience?: string | undefined, expiration?: number | undefined, notBefore?: number | undefined, issuedAt?: number | undefined, jwtId?: string | undefined, additionalClaims?: CoreStringsMap | undefined}; export type CoreManifestContentJWT = {header: CoreManifestContentJWTHeader, payload: CoreManifestContentJWTPayload, type: 'JWT'}; export type CoreManifestContentUnsafe = {value: unknown, type: 'Unsafe'}; export type CoreManifestContent = CoreManifestContentEIP191 | CoreManifestContentJWT | CoreManifestContentUnsafe; export type CoreV0SignManifest = {id: string, accountId: string, ledgerId?: string | undefined, content: CoreManifestContent, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_SignManifest'}; export type CoreV0UnlockAccount = {reference: CoreEntityIdAndRevision, type: 'v0_UnlockAccount'}; export type CoreV0UnlockDomain = {reference: CoreEntityIdAndRevision, type: 'v0_UnlockDomain'}; export type CoreV0UnlockEndpoint = {reference: CoreEntityIdAndRevision, type: 'v0_UnlockEndpoint'}; export type CoreV0UnlockPolicy = {reference: CoreEntityIdAndRevision, type: 'v0_UnlockPolicy'}; export type CoreV0UnlockTicker = {reference: CoreEntityIdAndRevision, type: 'v0_UnlockTicker'}; export type CoreV0UnlockUser = {reference: CoreEntityIdAndRevision, type: 'v0_UnlockUser'}; export type CoreV0UnlockVault = {reference: CoreEntityIdAndRevision, type: 'v0_UnlockVault'}; export type CoreV0UpdateAccount = {reference: CoreEntityIdAndRevision, alias: string, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_UpdateAccount'}; export type CoreV0UpdateDomain = {reference: CoreEntityIdAndRevision, alias: string, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_UpdateDomain'}; export type CoreV0UpdateDomainPermissions = {reference: CoreEntityIdAndRevision, permissions: CorePermissions, type: 'v0_UpdateDomainPermissions'}; export type CoreV0UpdateEndpoint = {reference: CoreEntityIdAndRevision, address: string, trustScore: number, ledgerId?: string | undefined, parameters?: CoreEndpointLedgerParameters | undefined, alias: string, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_UpdateEndpoint'}; export type CoreEntityStringIdAndRevision = {id: string, revision: number}; export type CoreV0UpdateLedger = {reference: CoreEntityStringIdAndRevision, alias: string, parameters: CoreLedgerParameters, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_UpdateLedger'}; export type CoreV0UpdatePolicy = {reference: CoreEntityIdAndRevision, alias: string, rank: number, intentTypes?: Array | undefined, scope: CorePolicyScope, scriptingEngine: CoreScriptingEngine, condition?: CorePolicyCondition | undefined, workflow?: Array | undefined, description?: string | undefined, customProperties: CoreStringsMap, intentOrigin?: CoreIntentOrigin | undefined, type: 'v0_UpdatePolicy'}; export type CoreV0UpdateTicker = {reference: CoreEntityIdAndRevision, name: string, decimals?: number | undefined, symbol?: string | undefined, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_UpdateTicker'}; export type CoreV0UpdateUser = {reference: CoreEntityIdAndRevision, alias: string, roles: Array, description?: string | undefined, customProperties: CoreStringsMap, loginIds?: Array | undefined, type: 'v0_UpdateUser'}; export type CoreV0UpdateVault = {reference: CoreEntityIdAndRevision, alias: string, parameters?: CoreVaultParameters | undefined, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_UpdateVault'}; export type CoreValidatedTickerKind = 'Native' | 'Contract' | 'Token'; export type CoreTickerToValidate = {id: string, ledgerId: string, kind: CoreValidatedTickerKind, name: string, decimals?: number | undefined, symbol?: string | undefined, ledgerDetails: CoreTickerLedgerDetails, lock: CoreIntentLockStatus, description?: string | undefined, customProperties: CoreStringsMap}; export type CoreV0ValidateTickers = {tickers: Array, type: 'v0_ValidateTickers'}; export type CoreUserIntentPayload = CoreV0AcknowledgeBackup | CoreV0AddAccountLedgers | CoreV0AddTrustedPublicKeysForMigration | CoreV0AttemptTransactionOrderCancellation | CoreV0CreateAccount | CoreV0CreateBackup | CoreV0CreateDomain | CoreV0CreateEndpoint | CoreV0CreateLedger | CoreV0CreatePolicy | CoreV0CreateTicker | CoreV0CreateTransactionOrder | CoreV0CreateTransferOrder | CoreV0CreateUser | CoreV0CreateVault | CoreV0ExecuteExtension | CoreV0LockAccount | CoreV0LockDomain | CoreV0LockEndpoint | CoreV0LockPolicy | CoreV0LockTicker | CoreV0LockUser | CoreV0LockVault | CoreV0MigrateSilo3AccountBatch | CoreV0NotarizeData | CoreV0RegisterTrustedPublicKey | CoreV0ReleaseQuarantinedTransfers | CoreV0RewrapVaultKeyMaterial | CoreV0SetSystemProperty | CoreV0SignManifest | CoreV0UnlockAccount | CoreV0UnlockDomain | CoreV0UnlockEndpoint | CoreV0UnlockPolicy | CoreV0UnlockTicker | CoreV0UnlockUser | CoreV0UnlockVault | CoreV0UpdateAccount | CoreV0UpdateDomain | CoreV0UpdateDomainPermissions | CoreV0UpdateEndpoint | CoreV0UpdateLedger | CoreV0UpdatePolicy | CoreV0UpdateTicker | CoreV0UpdateUser | CoreV0UpdateVault | CoreV0ValidateTickers; export type CoreSystemSignedRequest = {targetDomainId: string, id: string, expiryAt: string, payload: CoreUserIntentPayload, description?: string | undefined, customProperties: CoreStringsMap, type: 'SystemSigned'}; export type CoreSystemSigned = {request: CoreSystemSignedRequest}; export type CoreUserReference = {id: string, domainId: string}; export type CoreProposeTransactionOrderParameters = CoreTransactionOrderParametersAlgorand | CoreTransactionOrderParametersBitcoin | CoreTransactionOrderParametersCardano | CoreTransactionOrderParametersEthereum | CoreTransactionOrderParametersHedera | CoreTransactionOrderParametersSolana | CoreTransactionOrderParametersStellar | CoreTransactionOrderParametersSubstrate | CoreTransactionOrderParametersTezos | CoreTransactionOrderParametersTron | CoreTransactionOrderParametersXRPL; export type CoreProposeV0CreateTransactionOrder = {id: string, accountId: string, ledgerId?: string | undefined, parameters: CoreProposeTransactionOrderParameters, description?: string | undefined, customProperties: CoreStringsMap, type: 'v0_CreateTransactionOrder'}; export type CoreProposeUserIntentPayload = CoreProposeV0CreateTransactionOrder | CoreV0AcknowledgeBackup | CoreV0AddAccountLedgers | CoreV0AddTrustedPublicKeysForMigration | CoreV0AttemptTransactionOrderCancellation | CoreV0CreateAccount | CoreV0CreateBackup | CoreV0CreateDomain | CoreV0CreateEndpoint | CoreV0CreateLedger | CoreV0CreatePolicy | CoreV0CreateTicker | CoreV0CreateTransferOrder | CoreV0CreateUser | CoreV0CreateVault | CoreV0ExecuteExtension | CoreV0LockAccount | CoreV0LockDomain | CoreV0LockEndpoint | CoreV0LockPolicy | CoreV0LockTicker | CoreV0LockUser | CoreV0LockVault | CoreV0MigrateSilo3AccountBatch | CoreV0NotarizeData | CoreV0RegisterTrustedPublicKey | CoreV0ReleaseQuarantinedTransfers | CoreV0RewrapVaultKeyMaterial | CoreV0SetSystemProperty | CoreV0SignManifest | CoreV0UnlockAccount | CoreV0UnlockDomain | CoreV0UnlockEndpoint | CoreV0UnlockPolicy | CoreV0UnlockTicker | CoreV0UnlockUser | CoreV0UnlockVault | CoreV0UpdateAccount | CoreV0UpdateDomain | CoreV0UpdateDomainPermissions | CoreV0UpdateEndpoint | CoreV0UpdateLedger | CoreV0UpdatePolicy | CoreV0UpdateTicker | CoreV0UpdateUser | CoreV0UpdateVault | CoreV0ValidateTickers; export type CorePropose = {author: CoreUserReference, expiryAt: string, targetDomainId: string, id: string, payload: CoreProposeUserIntentPayload, description?: string | undefined, customProperties: CoreStringsMap, type: 'Propose'}; export type CoreUserSigned = {request: CorePropose, signature: unknown}; export type CoreIntentBody = CoreSystemSigned | CoreUserSigned; export type CreateApiV1IntentsArgs = {requestId?: string | undefined, body: CoreIntentBody}; export type CreateApiV1IntentsOptions = {baseUrl: string, httpAuth?: string | undefined, fetch?: typeof fetch | undefined}; export const coreIntentResponse = z.object({requestId: z.string()}); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * Propose an intent * * POST /v1/intents */ export const createApiV1Intents = async (args: CreateApiV1IntentsArgs, options: CreateApiV1IntentsOptions) => { const {baseUrl, fetch: fetchFn = fetch, httpAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (args.requestId != null) headers.set("requestId", String(args.requestId)) if (httpAuth !== undefined) headers.set('authorization', `Bearer ${httpAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/intents${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(coreIntentResponse, await res.json()) };