feat(escrow): implement createEscrowAccount function#140
Open
opratem wants to merge 1 commit intoamina69:developfrom
Open
feat(escrow): implement createEscrowAccount function#140opratem wants to merge 1 commit intoamina69:developfrom
opratem wants to merge 1 commit intoamina69:developfrom
Conversation
- Add full validation for adopterPublicKey, ownerPublicKey, depositAmount - Implement idempotency check with caching - Execute complete lifecycle: keypair → fund → multisig → memo - Return complete EscrowAccount object - Add typed error handling (ValidationError, FriendbotError, SdkError) - Add comprehensive JSDoc documentation - Add unit tests with all steps mocked Fixes amina69#75
Owner
|
@opratem failed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the complete
createEscrowAccount()function for the Escrow lifecycle SDK. This function assembles all creation steps into a final exported function with full validation, error handling, idempotency checks, and comprehensive documentation.Related Issue
Fixes #75
Type of Change
Changes Made
createEscrowAccount()function with complete lifecycle:adopterPublicKeywithisValidPublicKey()ownerPublicKeywithisValidPublicKey()depositAmountwithisValidAmount()EscrowAccountobjectSdkErrorsubclasses:ValidationErrorfor invalid input parametersFriendbotErrorfor funding failures (retryable)SdkErrorwrapper for unknown errors@param,@returns,@throws,@exampleclearEscrowCache()helper for testing purposesclearEscrowCachefrom main indexTesting
@stellar/stellar-sdk(Keypair, Horizon, TransactionBuilder, Operation)fetchfor Friendbot API callsChecklist
Screenshots (if applicable)
N/A - SDK function, no UI changes
Additional Notes
Function Signature
CreateEscrowParams Interface
EscrowAccount Response
Usage Example