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

transaction signing support without agd #5912

Open
turadg opened this issue Aug 8, 2022 · 1 comment
Open

transaction signing support without agd #5912

turadg opened this issue Aug 8, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request wallet

Comments

@turadg
Copy link
Member

turadg commented Aug 8, 2022

What is the Problem Being Solved?

We have interfaces to support clients reading from the chain without spawning a process (@agoric/client-utils) but to sign they need to spawn to agd.

Description of the Design

It could use signAndBroadcast like Keplr's API, which could be implemented by an agd interface too:

makeAgd({execFile}).withOpts({keyringBackend: 'test'}).account('gov1').signAndBroadcast(...)

Requirements if using Casting .

  • Given key material, Casting should provide an API to send CosmJS transactions to the leader.

  • When you ask Casting to do something, you don't get any state from that call

  • New state is propagated through RPC so that all consumers get the same.

  • You can evaluate and tell me the results of (with an ACK or a NACK)
    Publishing is how we get the side-effects

Alternately client-utils or rpc.

Should probably make use of,

Security Considerations

Test Plan

@michaelfig
Copy link
Member

Current meet-in-the-middle brainstorm:

test('oracle uses transaction client', async t => {
  const PORT = await t.context.startServer(t, []);
  const leader = makeLeader(`http://localhost:${PORT}/network-config`, {
    retryCallback: null,
    jitter: null,
  });
  /** @type {import('@cosmjs/stargate').SigningStargateClient} */
  const client = leader.makeClient({
    seed: new Uint8Array([0, 1, 2, 3, 3, 2, 1, 0]),
  });
  client.sendAction({
    type: 'applyMethod',
    body: JSON.stringify([
      { '@qclass': 'slot', index: 0 },
      'pushResult',
      [
        {
          numerator: {
            value: { '@qclass': 'bigint', digits: '12345' },
            brand: { '@qclass': 'slot', index: 1 },
          },
          denominator: {
            value: { '@qclass': 'bigint', digits: '67890' },
            brand: { '@qclass': 'slot', index: 2 },
          },
        },
      ],
    ]),
    slots: ['offerResult:3', 'board0133', 'board244'],
  });
});

@turadg turadg self-assigned this Aug 18, 2022
@Tartuffo Tartuffo removed this from the Mainnet 1 RC0 milestone Sep 21, 2022
@turadg turadg changed the title Transactions support in Casting package transaction signing support without agd Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wallet
Projects
None yet
Development

No branches or pull requests

3 participants