-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for remaining account signers in JS experimental (#183)
- Loading branch information
1 parent
5929361
commit 0873088
Showing
15 changed files
with
313 additions
and
143 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@metaplex-foundation/kinobi": patch | ||
--- | ||
|
||
Add support for remaining account signers in JS experimental |
This file contains 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
24 changes: 8 additions & 16 deletions
24
src/renderers/js-experimental/fragments/instructionInputType.njk
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,16 @@ | ||
{% import "templates/macros.njk" as macros %} | ||
|
||
export type {{ instructionInputType }} | ||
{%- if accounts.length > 0 -%} | ||
{%- if instruction.accounts.length > 0 -%} | ||
< | ||
{%- for account in accounts -%} | ||
{{ account.typeParam }} extends string = string, | ||
{%- for account in instruction.accounts -%} | ||
TAccount{{ account.name | pascalCase }} extends string = string, | ||
{% endfor %} | ||
> | ||
{% endif %} | ||
= { | ||
{% for account in accounts %} | ||
{% if account.docs.length > 0 %} | ||
{{ macros.docblock(account.docs) }} | ||
{% endif %} | ||
{{ account.name | camelCase }}{{ account.optionalSign }}: {{ account.type }}, | ||
{% endfor %} | ||
{% for dataArg in dataArgs %} | ||
{{ dataArg.renamedName | camelCase }}{{ dataArg.optionalSign }}: {{ dataArgsType }}["{{ dataArg.name | camelCase }}"], | ||
{% endfor %} | ||
{% for extraArg in extraArgs %} | ||
{{ extraArg.renamedName | camelCase }}{{ extraArg.optionalSign }}: {{ extraArgsType }}["{{ extraArg.name | camelCase }}"], | ||
{% endfor %} | ||
= {{ customDataArgumentsFragment }} { | ||
{{ accountsFragment -}} | ||
{{ dataArgumentsFragment -}} | ||
{{ extraArgumentsFragment -}} | ||
{{ remainingAccountsFragment }} | ||
} |
This file contains 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
Oops, something went wrong.