You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There are a lot of ways to represent an account on the Stellar network. You could use a Keypair, an Account, a MuxedAccount, or even just a string. When we move to the higher-level SDK, there's even an AccountResponse object that's also Account-like.
This is confusing and bug-prone (e.g. stellar/js-stellar-sdk#653): these objects are sometimes interchangeable and other times not, and violating compatibility expectations is too easy.
Describe the solution you'd like
I'd like to introduce an Accountinterface rather than an object, in order to facilitate Typescript-side enforcement of compatibility.
On Muxed Accounts
This underlying issue reared its head when we introduced support for muxed accounts. I believe we should treat them as first-class citizens in the SDK, and this would help facilitate that.
Compatibility
We may be able to avoid breaking backwards compatibility with naming clashes if we name it AccountInterface instead of Account.
Is your feature request related to a problem? Please describe.
There are a lot of ways to represent an account on the Stellar network. You could use a
Keypair
, anAccount
, aMuxedAccount
, or even just a string. When we move to the higher-level SDK, there's even anAccountResponse
object that's alsoAccount
-like.This is confusing and bug-prone (e.g. stellar/js-stellar-sdk#653): these objects are sometimes interchangeable and other times not, and violating compatibility expectations is too easy.
Describe the solution you'd like
I'd like to introduce an
Account
interface rather than an object, in order to facilitate Typescript-side enforcement of compatibility.On Muxed Accounts
This underlying issue reared its head when we introduced support for muxed accounts. I believe we should treat them as first-class citizens in the SDK, and this would help facilitate that.
Compatibility
We may be able to avoid breaking backwards compatibility with naming clashes if we name it
AccountInterface
instead ofAccount
.Additional context
An API proposal follows:
These are the three fundamental things any proper account should be able to provide.
This would be the interface-compatible version of the current
Account
object.This would be the interface-compatible upgrade to the current
MuxedAccount
object.The text was updated successfully, but these errors were encountered: