Skip to content
New issue

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

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

Already on GitHub? # to your account

Add simple API for making Transfer deploys enhancement proposal #79

Open
Volodymyr-Kuchinskyi opened this issue Feb 29, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Volodymyr-Kuchinskyi
Copy link
Contributor

It would be a very good extension for the existing functionality to have a method that creates a transfer deploy from basic parameters:

type TransferDeployParams struct {
  Account       keypair.PublicKey
  Sender         keypair.PublicKey
  Recipient     keypair.PublicKey
  Amount.       uint64
  ChainName string
}
func MakeTransferDeploy(params TransferDeployParams) types.Deploy

Example of a use case:

deploy := casper.MakeTransferDeploy(casper.TransferDeployParams{
  Account:       key.PublicKey(),
  Sender:         key.PublicKey(),
  Recipient:     recipientPublicKey,
  Amount:       10000,
  ChainName: "casper-test",
})
deploy.SignDeploy(key)
casperClient.PutDeploy(deploy)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants