-
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.
Refactor nodes for consistency (#130)
* Rename StructFieldTypeNode.child to StructFieldTypeNode.type * Refactor StructFieldTypeNode.defaultTo into defaultValue and defaultValueStrategy * Refactor AmountTypeNode.identifier to an optional unit attribute * Rename ArrayTypeNode.child to item * Refactor mapTypeNode helper * Rename OptionTypeNode.child to item * Rename SetTypeNode.child to item * Rename TupleTypeNode.children to items * Refactor EnumValueNode * Remove getValueNodeFragment in favour of ValueNodeVisitor * Add GlobalFragmentScope in js-experimental render map * Rename DefinedTypeNode.data to type * Rename InstructionAccountNode.defaultsTo to defaultValue * Add comments * Refactor TypeNode registration * Refactor Node registration * Rename NODE_KEYS to NODE_KINDS * Refactor ValueNode registration * Update ValueNode.ts * Update SizeNode.ts * Use NodeKind instead of NodeKinds in types * Update PdaSeedNode.ts * Rename RegisteredNodes to NodeDictionary * Use NodeKind instead of keyof NodeDictionary * Update instructionBytesCreatedOnChain.ts * Update LinkNode.ts * Update ContextualValueNode.ts * Add PdaSeedValueNode * Add MapEntryValueNode * Add StructFieldValueNode * Add changeset
- Loading branch information
1 parent
b3ec72c
commit 3ef61bb
Showing
168 changed files
with
1,628 additions
and
1,340 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': minor | ||
--- | ||
|
||
Refactor nodes for consistency |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,21 @@ | ||
import { MainCaseString, mainCase } from '../../shared'; | ||
import { ValueNode } from '../valueNodes'; | ||
import { AccountValueNode } from './AccountValueNode'; | ||
import { ArgumentValueNode } from './ArgumentValueNode'; | ||
|
||
export type PdaSeedValueNode = { | ||
readonly kind: 'pdaSeedValueNode'; | ||
|
||
// Children. | ||
readonly value: ValueNode | AccountValueNode | ArgumentValueNode; | ||
|
||
// Data. | ||
readonly name: MainCaseString; | ||
}; | ||
|
||
export function pdaSeedValueNode( | ||
name: string, | ||
value: PdaSeedValueNode['value'] | ||
): PdaSeedValueNode { | ||
return { kind: 'pdaSeedValueNode', name: mainCase(name), value }; | ||
} |
Oops, something went wrong.