Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optional simulate & wallet, editable TransactionBuilder #921

Merged
merged 37 commits into from
Mar 12, 2024

Commits on Jan 9, 2024

  1. Update examples to use new module and package structure. (stellar#900)

    * Fixup deprecation to specify exact version
    * Upgrade references to use latest modules
    Shaptic authored Jan 9, 2024
    Configuration menu
    Copy the full SHA
    4214a1c View commit details
    Browse the repository at this point in the history
  2. Bump follow-redirects from 1.15.3 to 1.15.4 (stellar#906)

    Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
    - [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
    - [Commits](follow-redirects/follow-redirects@v1.15.3...v1.15.4)
    
    ---
    updated-dependencies:
    - dependency-name: follow-redirects
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 9, 2024
    Configuration menu
    Copy the full SHA
    d2cf06b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fbcb184 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2024

  1. Add support for new sendTransaction response field (stellar#905)

    * Add checks to ensure incorrect fields don't sneak in
    Shaptic authored Jan 10, 2024
    Configuration menu
    Copy the full SHA
    82d0dfb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    547b360 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2024

  1. Prepare v11.2.0 for release (stellar#908)

    * Upgrade all dependencies besides chai
    * Add changelog entries
    Shaptic authored Jan 11, 2024
    Configuration menu
    Copy the full SHA
    77d7de6 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Eliminating utility-types dependency entirely (stellar#912)

    Eliminated the 'utility-types' package since its functionalities are likely
    replaced by native TypeScript features. This change includes cleaning up imports
    and references in the codebase and updating the package.json and yarn.lock
    accordingly, resulting in a leaner dependency graph and potentially reducing
    installation times and package size.
    
    Co-authored-by: Sérgio Luis <sergiocl@airtm.io>
    sergiolclem and Sérgio Luis authored Jan 23, 2024
    Configuration menu
    Copy the full SHA
    e2722f6 View commit details
    Browse the repository at this point in the history
  2. Release v11.2.1 (stellar#913)

    * Upgrade dependencies and stellar-base
    Shaptic authored Jan 23, 2024
    Configuration menu
    Copy the full SHA
    bacbf8e View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2024

  1. Configuration menu
    Copy the full SHA
    ac5545b View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2024

  1. optional simulate & wallet, editable TransactionBuilder

    - Can now pass an `account` OR `wallet` when constructing the
      ContractClient, or none! If you pass none, you can still make view
      calls, since they don't need a signer. You will need to pass a
      `wallet` when calling things that need it, like `signAndSend`.
    
    - You can now pass `simulate: false` when first creating your
      transaction to skip simulation. You can then modify the transaction
      using the TransactionBuilder at `tx.raw` before manually calling
      `simulate`. Example:
    
          const tx = await myContract.myMethod(
            { args: 'for', my: 'method', ... },
            { simulate: false }
          );
          tx.raw.addMemo(Memo.text('Nice memo, friend!'))
          await tx.simulate();
    
    - Error types are now collected under `AssembledTransaction.Errors` and
      `SentTransaction.Errors`.
    chadoh committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    b22af74 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. Ensure that event streaming tests write a valid stream (stellar#917)

    * Add valid response to not error in tests
    Shaptic authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    d6f50e7 View commit details
    Browse the repository at this point in the history
  2. Release v11.2.2 (stellar#918)

    * Add README entry about React-Native compiler requirements
    * Fixup the jsdoc for an entry
    * Upgrade stellar-base
    * Update all dependencies to their latest compatible versions
    Shaptic authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    4c42a4d View commit details
    Browse the repository at this point in the history
  3. export ExampleNodeWallet from lib

    Tyler van der Hoeven thought this would be useful.
    
    The current place it's exported from is surpassingly silly. But it
    functions properly and the tests fail the same way they failed before.
    chadoh committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    134fcae View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. Configuration menu
    Copy the full SHA
    0e4a0b0 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2024

  1. feat(e2e-tests): new account & contract per test

    - New `clientFor` that instantiates a ContractClient for given
      contract, as well as initializes a new account, funding it with
      friendbot
    - Can also use `generateFundedKeypair` directly, as with test-swap
    - Stop generating anything in initialize.sh. Just check that the network
      is running and the pinned binary is installed, and fund the
      `$SOROBAN_ACCOUNT`.
    
      Ideally we wouldn't use the binary at all, but for now the tests are
      still shelling out to the CLI, so it's worth keeping the pinning
      around
    chadoh committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    c1f3efd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    159e69e View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2024

  1. feat: no more Wallet interface

    Instead, just accept the things that Wallet contained.
    
    This avoids the conundrum of what to call the thing.
    
    - `Wallet` seems too high-level. Too high-level to be the concern of
      stellar-sdk, and too high-level for the thing being described here.
      It's really just two functions: `signTransaction` and `signAuthEntry`.
    - No need for this thing to defined `getPublicKey`, let alone any of the
      more complicated wrappers around it that it used to. Just have people
      pass in a `publicKey`. For convenience' sake, I also allowed this to
      be a Promise of a string, so that you don't need to instantiate
      ContractClient asynchronously, instead doing something like:
    
          new ContractClient({
            publicKey: asyncPublicKeyLookupFromWallet(),
            ...
          })
    
      This helps when getting public keys in a browser environment, where
      public key lookup is async, and adds little complexity to the logic
      here.
    chadoh committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    a2945f9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5369ed6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    29efe06 View commit details
    Browse the repository at this point in the history
  4. explicit allowHttp

    chadoh committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    1ef0600 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2024

  1. test(ava): set timeout to 2m

    chadoh committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    93e0b2f View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into feat/more-better

    * master:
      Drop all usage of array-based passing (stellar#924)
      Release v11.2.2 (stellar#918)
      Ensure that event streaming tests write a valid stream (stellar#917)
      Release v11.2.1 (stellar#913)
      Eliminating `utility-types` dependency entirely (stellar#912)
      Prepare v11.2.0 for release (stellar#908)
      Update README to flow better (stellar#907)
      Add support for new `sendTransaction` response field (stellar#905)
      Export the individual event response instance (stellar#904)
      Bump follow-redirects from 1.15.3 to 1.15.4 (stellar#906)
      Update examples to use new module and package structure. (stellar#900)
    chadoh committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    523812e View commit details
    Browse the repository at this point in the history
  3. build: move ExampleNodeWallet to own entrypoint

    No need to pollute the global API or bundle size with this.
    chadoh committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    561eee3 View commit details
    Browse the repository at this point in the history
  4. build: move ContractClient & AssembledTransaction

    These are a bit higher-level and experimental, at this point, so let's
    not clutter the global API or the bundle size unless people really want
    it.
    chadoh committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    cdbeb81 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2024

  1. Configuration menu
    Copy the full SHA
    81d554f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    807fcc6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a4c738d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4a98cb5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8505316 View commit details
    Browse the repository at this point in the history
  6. typo

    chadoh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    4318df0 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2024

  1. Configuration menu
    Copy the full SHA
    ac83856 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    76cb907 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2024

  1. Configuration menu
    Copy the full SHA
    ac7e891 View commit details
    Browse the repository at this point in the history
  2. feat: don't make people import and use Networks enum

    I personally find TS enums a little surprising to work with, and my own
    codebases already have network passphrases littered throughout. I think
    we can upgrade to use the enum later, after more discussion about the
    exact interface. Let's not tangle that up in this change.
    chadoh committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    e10461a View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2024

  1. doc: include rust_types readme info in build

    the README.md file is not included in the `lib/rust_types` built
    version, so it's better to include it in a file that people can find by
    using the go-to-definition function in their editor, such as a
    `rust_types.ts` file directly, which gets built as
    `lib/rust_types.d.ts`.
    chadoh committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    3cadcba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cf0a384 View commit details
    Browse the repository at this point in the history
  3. feat: basicNodeSigner as a plain-object factory

    Our suggested approach of spreading `signer` into `ContractClient`
    constructors causes typing issues, since `networkPassphrase` is a
    private field inside BasicNodeSigner. This means the `signer` needs to
    be spread in before the inclusion of `networkPassphrase`, otherwise it
    gets overwritten with `undefined` (or maybe TypeScript just thinks it
    will get overwritten).
    chadoh committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    740a887 View commit details
    Browse the repository at this point in the history