user418: I was wondering if there was an ability to store secrets, such as an API credential within a smart contract. When the contract gets executed it checks something remote. Maybe a weird example, but for example my paypal balance. Under certain conditions maybe even execute certain API functions (send money) if certain conditions are met.
To do that some sort of secret needs to be stored and associated with a wallet address.
I know it sounds crazy, but I'm interested in the technical ability of Cardano/Plutus.
Thanks

user2537: I think, this I not possible. If you want your smart contract to know about your balance or any off-chain fact (including random numbers), then you need to push this fact either to the blockchain or give it as an input to the smart contract.
This former is done by oracles. The operator of the oracle regularly pushes information (such as exchange rates, random numbers...) to the smart contract which stores this information on the blockchain. Other smart contracts can then query the oracle (usually paying a fee) to obtain this information.
For storing credentials or your PayPal balance this is obviously a bad solution. Here it would be better to use the second approach and give the balance as input to the smart contract. Here, you want of course the input to be 'validable' by the smart contract - otherwise you could hand over any value to the smart contract. To achieve this, what you can do is to require that the balance is signed by the third party (Paypal). The smart contract stores the public key of Paypal and checks the signature of the input before using it.

418: <p>I was wondering if there was an ability to store secrets, such as an API credential within a smart contract. When the contract gets executed it checks something remote. Maybe a weird example, but for example my paypal balance. Under certain conditions maybe even execute certain API functions (send money) if certain conditions are met.</p>
<p>To do that some sort of secret needs to be stored and associated with a wallet address.</p>
<p>I know it sounds crazy, but I'm interested in the technical ability of Cardano/Plutus.</p>
<p>Thanks</p>
 2537: <p>I think, this I not possible. If you want your smart contract to know about your balance or any off-chain fact (including random numbers), then you need to push this fact either to the blockchain or give it as an input to the smart contract.</p>
<p>This former is done by oracles. The operator of the oracle regularly pushes information (such as exchange rates, random numbers...) to the smart contract which stores this information on the blockchain. Other smart contracts can then query the oracle (usually paying a fee) to obtain this information.</p>
<p>For storing credentials or your PayPal balance this is obviously a bad solution. Here it would be better to use the second approach and give the balance as input to the smart contract. Here, you want of course the input to be 'validable' by the smart contract - otherwise you could hand over any value to the smart contract. To achieve this, what you can do is to require that the balance is signed by the third party (Paypal). The smart contract stores the public key of Paypal and checks the signature of the input before using it.</p>
