Skip to content

Client signatures expects Pubkey|Keypair for signer accounts #55

@julianzamt

Description

@julianzamt

Describe the bug
The generated program client "sendAndConfirm" signatures expect a Union Type defined as (Publickey | Keypair) for params that later are used to sign the tx. Therefore, a TS error is not raised when passing a Pubkey as arg, but the tx will fail with "signature verification failed", since the private key was not provided.

To Reproduce

- name: add_lamports_direct_mode
    solana:
      signers:
        - name: fee_payer
        - name: sender
    inputs:
      - name: sender
        type: sol:account_info
        solana:
          attributes: [ mut ]

image

Expected behavior
To produce a signature with type PublicKey when the signature is not required, and Keypair when it does.

Platform version:

  • CLI Version [e.g. v0.1.0]
  • GenService Version v0.8

Extension (mark with an X the extension):

  • Solana Native [ ]
  • Solana Anchor [x]

Metadata

Metadata

Assignees

Labels

BugThis is an item that causes unwanted behaviorTodoThis item hasn't been started

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions