@codama/renderers-js 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +54 -0
  3. package/dist/index.node.cjs +2733 -0
  4. package/dist/index.node.cjs.map +1 -0
  5. package/dist/index.node.mjs +2700 -0
  6. package/dist/index.node.mjs.map +1 -0
  7. package/dist/templates/fragments/accountFetchHelpers.njk +43 -0
  8. package/dist/templates/fragments/accountPdaHelpers.njk +25 -0
  9. package/dist/templates/fragments/accountSizeHelpers.njk +3 -0
  10. package/dist/templates/fragments/instructionExtraArgs.njk +4 -0
  11. package/dist/templates/fragments/instructionFunction.njk +62 -0
  12. package/dist/templates/fragments/instructionInputType.njk +16 -0
  13. package/dist/templates/fragments/instructionParseFunction.njk +81 -0
  14. package/dist/templates/fragments/instructionType.njk +18 -0
  15. package/dist/templates/fragments/pdaFunction.njk +32 -0
  16. package/dist/templates/fragments/program.njk +3 -0
  17. package/dist/templates/fragments/programErrors.njk +36 -0
  18. package/dist/templates/fragments/type.njk +12 -0
  19. package/dist/templates/fragments/typeCodec.njk +6 -0
  20. package/dist/templates/fragments/typeDecoder.njk +6 -0
  21. package/dist/templates/fragments/typeDiscriminatedUnionHelpers.njk +23 -0
  22. package/dist/templates/fragments/typeEncoder.njk +6 -0
  23. package/dist/templates/layout.njk +9 -0
  24. package/dist/templates/macros.njk +12 -0
  25. package/dist/templates/pages/accountsIndex.njk +9 -0
  26. package/dist/templates/pages/accountsPage.njk +12 -0
  27. package/dist/templates/pages/definedTypesIndex.njk +9 -0
  28. package/dist/templates/pages/definedTypesPage.njk +9 -0
  29. package/dist/templates/pages/errorsIndex.njk +9 -0
  30. package/dist/templates/pages/errorsPage.njk +8 -0
  31. package/dist/templates/pages/instructionsIndex.njk +9 -0
  32. package/dist/templates/pages/instructionsPage.njk +14 -0
  33. package/dist/templates/pages/pdasIndex.njk +9 -0
  34. package/dist/templates/pages/pdasPage.njk +8 -0
  35. package/dist/templates/pages/programsIndex.njk +9 -0
  36. package/dist/templates/pages/programsPage.njk +10 -0
  37. package/dist/templates/pages/rootIndex.njk +26 -0
  38. package/dist/templates/pages/sharedPage.njk +106 -0
  39. package/dist/types/ImportMap.d.ts +15 -0
  40. package/dist/types/ImportMap.d.ts.map +1 -0
  41. package/dist/types/TypeManifest.d.ts +16 -0
  42. package/dist/types/TypeManifest.d.ts.map +1 -0
  43. package/dist/types/fragments/accountFetchHelpers.d.ts +9 -0
  44. package/dist/types/fragments/accountFetchHelpers.d.ts.map +1 -0
  45. package/dist/types/fragments/accountPdaHelpers.d.ts +10 -0
  46. package/dist/types/fragments/accountPdaHelpers.d.ts.map +1 -0
  47. package/dist/types/fragments/accountSizeHelpers.d.ts +7 -0
  48. package/dist/types/fragments/accountSizeHelpers.d.ts.map +1 -0
  49. package/dist/types/fragments/accountType.d.ts +9 -0
  50. package/dist/types/fragments/accountType.d.ts.map +1 -0
  51. package/dist/types/fragments/common.d.ts +25 -0
  52. package/dist/types/fragments/common.d.ts.map +1 -0
  53. package/dist/types/fragments/discriminatorCondition.d.ts +26 -0
  54. package/dist/types/fragments/discriminatorCondition.d.ts.map +1 -0
  55. package/dist/types/fragments/discriminatorConstants.d.ts +22 -0
  56. package/dist/types/fragments/discriminatorConstants.d.ts.map +1 -0
  57. package/dist/types/fragments/index.d.ts +31 -0
  58. package/dist/types/fragments/index.d.ts.map +1 -0
  59. package/dist/types/fragments/instructionAccountMeta.d.ts +4 -0
  60. package/dist/types/fragments/instructionAccountMeta.d.ts.map +1 -0
  61. package/dist/types/fragments/instructionAccountTypeParam.d.ts +10 -0
  62. package/dist/types/fragments/instructionAccountTypeParam.d.ts.map +1 -0
  63. package/dist/types/fragments/instructionByteDelta.d.ts +8 -0
  64. package/dist/types/fragments/instructionByteDelta.d.ts.map +1 -0
  65. package/dist/types/fragments/instructionData.d.ts +9 -0
  66. package/dist/types/fragments/instructionData.d.ts.map +1 -0
  67. package/dist/types/fragments/instructionExtraArgs.d.ts +9 -0
  68. package/dist/types/fragments/instructionExtraArgs.d.ts.map +1 -0
  69. package/dist/types/fragments/instructionFunction.d.ts +15 -0
  70. package/dist/types/fragments/instructionFunction.d.ts.map +1 -0
  71. package/dist/types/fragments/instructionInputDefault.d.ts +9 -0
  72. package/dist/types/fragments/instructionInputDefault.d.ts.map +1 -0
  73. package/dist/types/fragments/instructionInputResolved.d.ts +10 -0
  74. package/dist/types/fragments/instructionInputResolved.d.ts.map +1 -0
  75. package/dist/types/fragments/instructionInputType.d.ts +13 -0
  76. package/dist/types/fragments/instructionInputType.d.ts.map +1 -0
  77. package/dist/types/fragments/instructionParseFunction.d.ts +10 -0
  78. package/dist/types/fragments/instructionParseFunction.d.ts.map +1 -0
  79. package/dist/types/fragments/instructionRemainingAccounts.d.ts +8 -0
  80. package/dist/types/fragments/instructionRemainingAccounts.d.ts.map +1 -0
  81. package/dist/types/fragments/instructionType.d.ts +8 -0
  82. package/dist/types/fragments/instructionType.d.ts.map +1 -0
  83. package/dist/types/fragments/pdaFunction.d.ts +8 -0
  84. package/dist/types/fragments/pdaFunction.d.ts.map +1 -0
  85. package/dist/types/fragments/program.d.ts +7 -0
  86. package/dist/types/fragments/program.d.ts.map +1 -0
  87. package/dist/types/fragments/programAccounts.d.ts +7 -0
  88. package/dist/types/fragments/programAccounts.d.ts.map +1 -0
  89. package/dist/types/fragments/programErrors.d.ts +7 -0
  90. package/dist/types/fragments/programErrors.d.ts.map +1 -0
  91. package/dist/types/fragments/programInstructions.d.ts +7 -0
  92. package/dist/types/fragments/programInstructions.d.ts.map +1 -0
  93. package/dist/types/fragments/type.d.ts +9 -0
  94. package/dist/types/fragments/type.d.ts.map +1 -0
  95. package/dist/types/fragments/typeCodec.d.ts +11 -0
  96. package/dist/types/fragments/typeCodec.d.ts.map +1 -0
  97. package/dist/types/fragments/typeDecoder.d.ts +9 -0
  98. package/dist/types/fragments/typeDecoder.d.ts.map +1 -0
  99. package/dist/types/fragments/typeDiscriminatedUnionHelpers.d.ts +8 -0
  100. package/dist/types/fragments/typeDiscriminatedUnionHelpers.d.ts.map +1 -0
  101. package/dist/types/fragments/typeEncoder.d.ts +9 -0
  102. package/dist/types/fragments/typeEncoder.d.ts.map +1 -0
  103. package/dist/types/fragments/typeWithCodec.d.ts +12 -0
  104. package/dist/types/fragments/typeWithCodec.d.ts.map +1 -0
  105. package/dist/types/getRenderMapVisitor.d.ts +31 -0
  106. package/dist/types/getRenderMapVisitor.d.ts.map +1 -0
  107. package/dist/types/getTypeManifestVisitor.d.ts +19 -0
  108. package/dist/types/getTypeManifestVisitor.d.ts.map +1 -0
  109. package/dist/types/index.d.ts +7 -0
  110. package/dist/types/index.d.ts.map +1 -0
  111. package/dist/types/nameTransformers.d.ts +15 -0
  112. package/dist/types/nameTransformers.d.ts.map +1 -0
  113. package/dist/types/renderVisitor.d.ts +11 -0
  114. package/dist/types/renderVisitor.d.ts.map +1 -0
  115. package/dist/types/utils/async.d.ts +7 -0
  116. package/dist/types/utils/async.d.ts.map +1 -0
  117. package/dist/types/utils/codecs.d.ts +3 -0
  118. package/dist/types/utils/codecs.d.ts.map +1 -0
  119. package/dist/types/utils/customData.d.ts +18 -0
  120. package/dist/types/utils/customData.d.ts.map +1 -0
  121. package/dist/types/utils/index.d.ts +6 -0
  122. package/dist/types/utils/index.d.ts.map +1 -0
  123. package/dist/types/utils/linkOverrides.d.ts +15 -0
  124. package/dist/types/utils/linkOverrides.d.ts.map +1 -0
  125. package/dist/types/utils/render.d.ts +4 -0
  126. package/dist/types/utils/render.d.ts.map +1 -0
  127. package/package.json +70 -0
@@ -0,0 +1,106 @@
1
+ {% extends "layout.njk" %}
2
+ {% import "macros.njk" as macros %}
3
+
4
+ {% block main %}
5
+ {{ imports }}
6
+
7
+ /**
8
+ * Asserts that the given value is not null or undefined.
9
+ * @internal
10
+ */
11
+ export function expectSome<T>(value: T | null | undefined): T {
12
+ if (value == null) {
13
+ throw new Error('Expected a value but received null or undefined.');
14
+ }
15
+ return value;
16
+ }
17
+
18
+ /**
19
+ * Asserts that the given value is a PublicKey.
20
+ * @internal
21
+ */
22
+ export function expectAddress<T extends string = string>(
23
+ value: Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null | undefined
24
+ ): Address<T> {
25
+ if (!value) {
26
+ throw new Error('Expected a Address.');
27
+ }
28
+ if (typeof value === 'object' && "address" in value) {
29
+ return value.address;
30
+ }
31
+ if (Array.isArray(value)) {
32
+ return value[0];
33
+ }
34
+ return value as Address<T>;
35
+ }
36
+
37
+ /**
38
+ * Asserts that the given value is a PDA.
39
+ * @internal
40
+ */
41
+ export function expectProgramDerivedAddress<T extends string = string>(
42
+ value: Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null | undefined
43
+ ): ProgramDerivedAddress<T> {
44
+ if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {
45
+ throw new Error('Expected a ProgramDerivedAddress.');
46
+ }
47
+ return value;
48
+ }
49
+
50
+ /**
51
+ * Asserts that the given value is a TransactionSigner.
52
+ * @internal
53
+ */
54
+ export function expectTransactionSigner<T extends string = string>(
55
+ value: Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null | undefined
56
+ ): TransactionSigner<T> {
57
+ if (!value || !isTransactionSigner(value)) {
58
+ throw new Error('Expected a TransactionSigner.');
59
+ }
60
+ return value;
61
+ }
62
+
63
+ /**
64
+ * Defines an instruction account to resolve.
65
+ * @internal
66
+ */
67
+ export type ResolvedAccount<T extends string = string, U extends Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null = Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null> = {
68
+ isWritable: boolean;
69
+ value: U;
70
+ };
71
+
72
+ /**
73
+ * Defines an instruction that stores additional bytes on-chain.
74
+ * @internal
75
+ */
76
+ export type IInstructionWithByteDelta = {
77
+ byteDelta: number;
78
+ };
79
+
80
+ /**
81
+ * Get account metas and signers from resolved accounts.
82
+ * @internal
83
+ */
84
+ export function getAccountMetaFactory(
85
+ programAddress: Address,
86
+ optionalAccountStrategy: 'omitted' | 'programId',
87
+ ) {
88
+ return (account: ResolvedAccount): IAccountMeta | IAccountSignerMeta | undefined => {
89
+ if (!account.value) {
90
+ if (optionalAccountStrategy === 'omitted') return;
91
+ return Object.freeze({ address: programAddress, role: AccountRole.READONLY });
92
+ }
93
+
94
+ const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
95
+ return Object.freeze({
96
+ address: expectAddress(account.value),
97
+ role: isTransactionSigner(account.value) ? upgradeRoleToSigner(writableRole) : writableRole,
98
+ ...(isTransactionSigner(account.value) ? { signer: account.value } : {})
99
+ });
100
+ };
101
+ }
102
+
103
+ export function isTransactionSigner<TAddress extends string = string>(value: Address<TAddress> | ProgramDerivedAddress<TAddress> | TransactionSigner<TAddress>): value is TransactionSigner<TAddress> {
104
+ return !!value && typeof value === 'object' && 'address' in value && web3JsIsTransactionSigner(value);
105
+ }
106
+ {% endblock %}
@@ -0,0 +1,15 @@
1
+ import { Fragment } from './fragments';
2
+ import { TypeManifest } from './TypeManifest';
3
+ export declare class ImportMap {
4
+ protected readonly _imports: Map<string, Set<string>>;
5
+ protected readonly _aliases: Map<string, Record<string, string>>;
6
+ add(module: string, imports: Set<string> | string[] | string): ImportMap;
7
+ remove(module: string, imports: Set<string> | string[] | string): ImportMap;
8
+ mergeWith(...others: (Fragment | ImportMap)[]): ImportMap;
9
+ mergeWithManifest(manifest: TypeManifest): ImportMap;
10
+ addAlias(module: string, name: string, alias: string): ImportMap;
11
+ isEmpty(): boolean;
12
+ resolve(dependencies?: Record<string, string>, useGranularImports?: boolean): Map<string, Set<string>>;
13
+ toString(dependencies?: Record<string, string>, useGranularImports?: boolean): string;
14
+ }
15
+ //# sourceMappingURL=ImportMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImportMap.d.ts","sourceRoot":"","sources":["../../src/ImportMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA8C9C,qBAAa,SAAS;IAClB,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAa;IAElE,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAa;IAE7E,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS;IASxE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS;IAa3E,SAAS,CAAC,GAAG,MAAM,EAAE,CAAC,QAAQ,GAAG,SAAS,CAAC,EAAE,GAAG,SAAS;IAezD,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,SAAS;IAIpD,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;IAOhE,OAAO,IAAI,OAAO;IAIlB,OAAO,CAAC,YAAY,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EAAE,kBAAkB,UAAQ,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IA2BxG,QAAQ,CAAC,YAAY,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EAAE,kBAAkB,UAAQ,GAAG,MAAM;CA0B1F"}
@@ -0,0 +1,16 @@
1
+ import { Fragment } from './fragments';
2
+ export type TypeManifest = {
3
+ decoder: Fragment;
4
+ encoder: Fragment;
5
+ isEnum: boolean;
6
+ looseType: Fragment;
7
+ strictType: Fragment;
8
+ value: Fragment;
9
+ };
10
+ export declare function typeManifest(): TypeManifest;
11
+ export declare function mergeManifests(manifests: TypeManifest[], options?: {
12
+ mergeCodecs?: (renders: string[]) => string;
13
+ mergeTypes?: (renders: string[]) => string;
14
+ mergeValues?: (renders: string[]) => string;
15
+ }): TypeManifest;
16
+ //# sourceMappingURL=TypeManifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypeManifest.d.ts","sourceRoot":"","sources":["../../src/TypeManifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA4B,MAAM,aAAa,CAAC;AAEjE,MAAM,MAAM,YAAY,GAAG;IACvB,OAAO,EAAE,QAAQ,CAAC;IAClB,OAAO,EAAE,QAAQ,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,QAAQ,CAAC;IACpB,UAAU,EAAE,QAAQ,CAAC;IACrB,KAAK,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,wBAAgB,YAAY,IAAI,YAAY,CAS3C;AAED,wBAAgB,cAAc,CAC1B,SAAS,EAAE,YAAY,EAAE,EACzB,OAAO,GAAE;IACL,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;IAC5C,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;IAC3C,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;CAC1C,GACP,YAAY,CAYd"}
@@ -0,0 +1,9 @@
1
+ import { AccountNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { TypeManifest } from '../TypeManifest';
4
+ import { Fragment } from './common';
5
+ export declare function getAccountFetchHelpersFragment(scope: Pick<GlobalFragmentScope, 'customAccountData' | 'nameApi'> & {
6
+ accountNode: AccountNode;
7
+ typeManifest: TypeManifest;
8
+ }): Fragment;
9
+ //# sourceMappingURL=accountFetchHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountFetchHelpers.d.ts","sourceRoot":"","sources":["../../../src/fragments/accountFetchHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAkC,MAAM,UAAU,CAAC;AAEpE,wBAAgB,8BAA8B,CAC1C,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,mBAAmB,GAAG,SAAS,CAAC,GAAG;IAChE,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,YAAY,CAAC;CAC9B,GACF,QAAQ,CAkCV"}
@@ -0,0 +1,10 @@
1
+ import { AccountNode, ProgramNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import type { TypeManifest } from '../TypeManifest';
4
+ import { Fragment } from './common';
5
+ export declare function getAccountPdaHelpersFragment(scope: Pick<GlobalFragmentScope, 'customAccountData' | 'linkables' | 'nameApi'> & {
6
+ accountNode: AccountNode;
7
+ programNode: ProgramNode;
8
+ typeManifest: TypeManifest;
9
+ }): Fragment;
10
+ //# sourceMappingURL=accountPdaHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountPdaHelpers.d.ts","sourceRoot":"","sources":["../../../src/fragments/accountPdaHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAgB,WAAW,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAkC,MAAM,UAAU,CAAC;AAEpE,wBAAgB,4BAA4B,CACxC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,mBAAmB,GAAG,WAAW,GAAG,SAAS,CAAC,GAAG;IAC9E,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,YAAY,CAAC;CAC9B,GACF,QAAQ,CAuCV"}
@@ -0,0 +1,7 @@
1
+ import { AccountNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ export declare function getAccountSizeHelpersFragment(scope: Pick<GlobalFragmentScope, 'nameApi'> & {
5
+ accountNode: AccountNode;
6
+ }): Fragment;
7
+ //# sourceMappingURL=accountSizeHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountSizeHelpers.d.ts","sourceRoot":"","sources":["../../../src/fragments/accountSizeHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAkC,MAAM,UAAU,CAAC;AAEpE,wBAAgB,6BAA6B,CACzC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAAG;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,GAC3E,QAAQ,CAUV"}
@@ -0,0 +1,9 @@
1
+ import { AccountNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { TypeManifest } from '../TypeManifest';
4
+ import { Fragment } from './common';
5
+ export declare function getAccountTypeFragment(scope: Pick<GlobalFragmentScope, 'customAccountData' | 'nameApi'> & {
6
+ accountNode: AccountNode;
7
+ typeManifest: TypeManifest;
8
+ }): Fragment;
9
+ //# sourceMappingURL=accountType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountType.d.ts","sourceRoot":"","sources":["../../../src/fragments/accountType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAY,MAAM,UAAU,CAAC;AAG9C,wBAAgB,sBAAsB,CAClC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,mBAAmB,GAAG,SAAS,CAAC,GAAG;IAChE,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,YAAY,CAAC;CAC9B,GACF,QAAQ,CAYV"}
@@ -0,0 +1,25 @@
1
+ import { ConfigureOptions } from 'nunjucks';
2
+ import { ImportMap } from '../ImportMap';
3
+ export declare function fragment(render: string, imports?: ImportMap): Fragment;
4
+ export declare function fragmentFromTemplate(fragmentFile: string, context?: object, options?: ConfigureOptions): Fragment;
5
+ export declare function mergeFragments(fragments: Fragment[], mergeRenders: (renders: string[]) => string): Fragment;
6
+ export declare class Fragment {
7
+ render: string;
8
+ imports: ImportMap;
9
+ features: Set<FragmentFeature>;
10
+ constructor(render: string, imports?: ImportMap, features?: Set<FragmentFeature>);
11
+ setRender(render: string): this;
12
+ mapRender(fn: (render: string) => string): this;
13
+ addImports(module: string, imports: Set<string> | string[] | string): this;
14
+ removeImports(module: string, imports: Set<string> | string[] | string): this;
15
+ mergeImportsWith(...others: (Fragment | ImportMap)[]): this;
16
+ addImportAlias(module: string, name: string, alias: string): this;
17
+ addFeatures(features: FragmentFeature | FragmentFeature[]): this;
18
+ removeFeatures(features: FragmentFeature | FragmentFeature[]): this;
19
+ hasFeatures(features: FragmentFeature | FragmentFeature[]): boolean;
20
+ mergeFeaturesWith(...others: Fragment[]): this;
21
+ clone(): Fragment;
22
+ toString(): string;
23
+ }
24
+ export type FragmentFeature = 'instruction:resolverScopeVariable';
25
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/fragments/common.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAEtE;AAED,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ,CAEjH;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,GAAG,QAAQ,CAM3G;AAED,qBAAa,QAAQ;IACV,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,SAAS,CAAC;IAEnB,QAAQ,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;gBAE1B,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC;IAMhF,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK/B,SAAS,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI;IAK/C,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI;IAK1E,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI;IAK7E,gBAAgB,CAAC,GAAG,MAAM,EAAE,CAAC,QAAQ,GAAG,SAAS,CAAC,EAAE,GAAG,IAAI;IAK3D,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAKjE,WAAW,CAAC,QAAQ,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,IAAI;IAMhE,cAAc,CAAC,QAAQ,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,IAAI;IAMnE,WAAW,CAAC,QAAQ,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,OAAO;IAKnE,iBAAiB,CAAC,GAAG,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI;IAK9C,KAAK,IAAI,QAAQ;IAIjB,QAAQ,IAAI,MAAM;CAGrB;AAED,MAAM,MAAM,eAAe,GAAG,mCAAmC,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type DiscriminatorNode, type ProgramNode, type StructTypeNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ /**
5
+ * ```
6
+ * if (data.length === 72) {
7
+ * return splTokenAccounts.TOKEN;
8
+ * }
9
+ *
10
+ * if (containsBytes(data, getU32Encoder().encode(42), offset)) {
11
+ * return splTokenAccounts.TOKEN;
12
+ * }
13
+ *
14
+ * if (containsBytes(data, new Uint8Array([1, 2, 3]), offset)) {
15
+ * return splTokenAccounts.TOKEN;
16
+ * }
17
+ * ```
18
+ */
19
+ export declare function getDiscriminatorConditionFragment(scope: Pick<GlobalFragmentScope, 'nameApi' | 'typeManifestVisitor'> & {
20
+ dataName: string;
21
+ discriminators: DiscriminatorNode[];
22
+ ifTrue: string;
23
+ programNode: ProgramNode;
24
+ struct: StructTypeNode;
25
+ }): Fragment;
26
+ //# sourceMappingURL=discriminatorCondition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discriminatorCondition.d.ts","sourceRoot":"","sources":["../../../src/fragments/discriminatorCondition.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,KAAK,iBAAiB,EAItB,KAAK,WAAW,EAEhB,KAAK,cAAc,EACtB,MAAM,eAAe,CAAC;AAIvB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAA4B,MAAM,UAAU,CAAC;AAE9D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iCAAiC,CAC7C,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,qBAAqB,CAAC,GAAG;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,iBAAiB,EAAE,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,cAAc,CAAC;CAC1B,GACF,QAAQ,CAgBV"}
@@ -0,0 +1,22 @@
1
+ import { ConstantDiscriminatorNode, DiscriminatorNode, FieldDiscriminatorNode, InstructionArgumentNode, StructFieldTypeNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ export declare function getDiscriminatorConstantsFragment(scope: Pick<GlobalFragmentScope, 'nameApi' | 'typeManifestVisitor'> & {
5
+ discriminatorNodes: DiscriminatorNode[];
6
+ fields: InstructionArgumentNode[] | StructFieldTypeNode[];
7
+ prefix: string;
8
+ }): Fragment;
9
+ export declare function getDiscriminatorConstantFragment(discriminatorNode: DiscriminatorNode, scope: Pick<GlobalFragmentScope, 'nameApi' | 'typeManifestVisitor'> & {
10
+ discriminatorNodes: DiscriminatorNode[];
11
+ fields: InstructionArgumentNode[] | StructFieldTypeNode[];
12
+ prefix: string;
13
+ }): Fragment | null;
14
+ export declare function getConstantDiscriminatorConstantFragment(discriminatorNode: ConstantDiscriminatorNode, scope: Pick<GlobalFragmentScope, 'nameApi' | 'typeManifestVisitor'> & {
15
+ discriminatorNodes: DiscriminatorNode[];
16
+ prefix: string;
17
+ }): Fragment | null;
18
+ export declare function getFieldDiscriminatorConstantFragment(discriminatorNode: FieldDiscriminatorNode, scope: Pick<GlobalFragmentScope, 'nameApi' | 'typeManifestVisitor'> & {
19
+ fields: InstructionArgumentNode[] | StructFieldTypeNode[];
20
+ prefix: string;
21
+ }): Fragment | null;
22
+ //# sourceMappingURL=discriminatorConstants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discriminatorConstants.d.ts","sourceRoot":"","sources":["../../../src/fragments/discriminatorConstants.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,yBAAyB,EACzB,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EAGvB,mBAAmB,EAEtB,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAkB,MAAM,UAAU,CAAC;AAEpD,wBAAgB,iCAAiC,CAC7C,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,qBAAqB,CAAC,GAAG;IAClE,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,MAAM,EAAE,uBAAuB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAC1D,MAAM,EAAE,MAAM,CAAC;CAClB,GACF,QAAQ,CAMV;AAED,wBAAgB,gCAAgC,CAC5C,iBAAiB,EAAE,iBAAiB,EACpC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,qBAAqB,CAAC,GAAG;IAClE,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,MAAM,EAAE,uBAAuB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAC1D,MAAM,EAAE,MAAM,CAAC;CAClB,GACF,QAAQ,GAAG,IAAI,CASjB;AAED,wBAAgB,wCAAwC,CACpD,iBAAiB,EAAE,yBAAyB,EAC5C,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,qBAAqB,CAAC,GAAG;IAClE,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC;CAClB,GACF,QAAQ,GAAG,IAAI,CAUjB;AAED,wBAAgB,qCAAqC,CACjD,iBAAiB,EAAE,sBAAsB,EACzC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,qBAAqB,CAAC,GAAG;IAClE,MAAM,EAAE,uBAAuB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAC1D,MAAM,EAAE,MAAM,CAAC;CAClB,GACF,QAAQ,GAAG,IAAI,CAYjB"}
@@ -0,0 +1,31 @@
1
+ export * from './accountFetchHelpers';
2
+ export * from './accountPdaHelpers';
3
+ export * from './accountSizeHelpers';
4
+ export * from './accountType';
5
+ export * from './common';
6
+ export * from './discriminatorCondition';
7
+ export * from './instructionAccountMeta';
8
+ export * from './instructionAccountTypeParam';
9
+ export * from './instructionByteDelta';
10
+ export * from './instructionData';
11
+ export * from './discriminatorConstants';
12
+ export * from './instructionExtraArgs';
13
+ export * from './instructionFunction';
14
+ export * from './instructionInputDefault';
15
+ export * from './instructionInputResolved';
16
+ export * from './instructionInputType';
17
+ export * from './instructionParseFunction';
18
+ export * from './instructionRemainingAccounts';
19
+ export * from './instructionType';
20
+ export * from './pdaFunction';
21
+ export * from './program';
22
+ export * from './programAccounts';
23
+ export * from './programErrors';
24
+ export * from './programInstructions';
25
+ export * from './type';
26
+ export * from './typeCodec';
27
+ export * from './typeDecoder';
28
+ export * from './typeDiscriminatedUnionHelpers';
29
+ export * from './typeEncoder';
30
+ export * from './typeWithCodec';
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fragments/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { InstructionAccountNode } from '@codama/nodes';
2
+ import { Fragment } from './common';
3
+ export declare function getInstructionAccountMetaFragment(instructionAccountNode: InstructionAccountNode): Fragment;
4
+ //# sourceMappingURL=instructionAccountMeta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructionAccountMeta.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionAccountMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAc,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAY,MAAM,UAAU,CAAC;AAE9C,wBAAgB,iCAAiC,CAAC,sBAAsB,EAAE,sBAAsB,GAAG,QAAQ,CAwB1G"}
@@ -0,0 +1,10 @@
1
+ import { InstructionAccountNode, InstructionNode, ProgramNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ export declare function getInstructionAccountTypeParamFragment(scope: Pick<GlobalFragmentScope, 'linkables'> & {
5
+ allowAccountMeta: boolean;
6
+ instructionAccountNode: InstructionAccountNode;
7
+ instructionNode: InstructionNode;
8
+ programNode: ProgramNode;
9
+ }): Fragment;
10
+ //# sourceMappingURL=instructionAccountTypeParam.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructionAccountTypeParam.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionAccountTypeParam.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,sBAAsB,EAEtB,eAAe,EAEf,WAAW,EACd,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAE,QAAQ,EAAY,MAAM,UAAU,CAAC;AAE9C,wBAAgB,sCAAsC,CAClD,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC,GAAG;IAC5C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,WAAW,CAAC;CAC5B,GACF,QAAQ,CAgBV"}
@@ -0,0 +1,8 @@
1
+ import { InstructionNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ export declare function getInstructionByteDeltaFragment(scope: Pick<GlobalFragmentScope, 'asyncResolvers' | 'getImportFrom' | 'nameApi'> & {
5
+ instructionNode: InstructionNode;
6
+ useAsync: boolean;
7
+ }): Fragment;
8
+ //# sourceMappingURL=instructionByteDelta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructionByteDelta.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionByteDelta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqD,eAAe,EAAU,MAAM,eAAe,CAAC;AAE3G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAA4B,MAAM,UAAU,CAAC;AAE9D,wBAAgB,+BAA+B,CAC3C,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,GAAG,eAAe,GAAG,SAAS,CAAC,GAAG;IAC/E,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;CACrB,GACF,QAAQ,CAUV"}
@@ -0,0 +1,9 @@
1
+ import { InstructionNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { TypeManifest } from '../TypeManifest';
4
+ import { Fragment } from './common';
5
+ export declare function getInstructionDataFragment(scope: Pick<GlobalFragmentScope, 'customInstructionData' | 'nameApi'> & {
6
+ dataArgsManifest: TypeManifest;
7
+ instructionNode: InstructionNode;
8
+ }): Fragment;
9
+ //# sourceMappingURL=instructionData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructionData.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAY,MAAM,UAAU,CAAC;AAG9C,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,uBAAuB,GAAG,SAAS,CAAC,GAAG;IACpE,gBAAgB,EAAE,YAAY,CAAC;IAC/B,eAAe,EAAE,eAAe,CAAC;CACpC,GACF,QAAQ,CAYV"}
@@ -0,0 +1,9 @@
1
+ import { InstructionNode } from '@codama/nodes';
2
+ import { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { TypeManifest } from '../TypeManifest';
4
+ import { Fragment } from './common';
5
+ export declare function getInstructionExtraArgsFragment(scope: Pick<GlobalFragmentScope, 'nameApi'> & {
6
+ extraArgsManifest: TypeManifest;
7
+ instructionNode: InstructionNode;
8
+ }): Fragment;
9
+ //# sourceMappingURL=instructionExtraArgs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructionExtraArgs.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionExtraArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAkC,MAAM,UAAU,CAAC;AAEpE,wBAAgB,+BAA+B,CAC3C,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAAG;IAC1C,iBAAiB,EAAE,YAAY,CAAC;IAChC,eAAe,EAAE,eAAe,CAAC;CACpC,GACF,QAAQ,CAYV"}
@@ -0,0 +1,15 @@
1
+ import { InstructionNode, ProgramNode } from '@codama/nodes';
2
+ import { ResolvedInstructionInput } from '@codama/visitors-core';
3
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
4
+ import { TypeManifest } from '../TypeManifest';
5
+ import { Fragment } from './common';
6
+ export declare function getInstructionFunctionFragment(scope: Pick<GlobalFragmentScope, 'asyncResolvers' | 'customInstructionData' | 'getImportFrom' | 'nameApi' | 'typeManifestVisitor'> & {
7
+ dataArgsManifest: TypeManifest;
8
+ extraArgsManifest: TypeManifest;
9
+ instructionNode: InstructionNode;
10
+ programNode: ProgramNode;
11
+ renamedArgs: Map<string, string>;
12
+ resolvedInputs: ResolvedInstructionInput[];
13
+ useAsync: boolean;
14
+ }): Fragment;
15
+ //# sourceMappingURL=instructionFunction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructionFunction.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,eAAe,EAIf,WAAW,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAkD,MAAM,UAAU,CAAC;AAMpF,wBAAgB,8BAA8B,CAC1C,KAAK,EAAE,IAAI,CACP,mBAAmB,EACnB,gBAAgB,GAAG,uBAAuB,GAAG,eAAe,GAAG,SAAS,GAAG,qBAAqB,CACnG,GAAG;IACA,gBAAgB,EAAE,YAAY,CAAC;IAC/B,iBAAiB,EAAE,YAAY,CAAC;IAChC,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,cAAc,EAAE,wBAAwB,EAAE,CAAC;IAC3C,QAAQ,EAAE,OAAO,CAAC;CACrB,GACF,QAAQ,CAgIV"}
@@ -0,0 +1,9 @@
1
+ import { ResolvedInstructionInput } from '@codama/visitors-core';
2
+ import { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ export declare function getInstructionInputDefaultFragment(scope: Pick<GlobalFragmentScope, 'asyncResolvers' | 'getImportFrom' | 'nameApi' | 'typeManifestVisitor'> & {
5
+ input: ResolvedInstructionInput;
6
+ optionalAccountStrategy: 'omitted' | 'programId';
7
+ useAsync: boolean;
8
+ }): Fragment;
9
+ //# sourceMappingURL=instructionInputDefault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructionInputDefault.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionInputDefault.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAS,MAAM,uBAAuB,CAAC;AAExE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAA4B,MAAM,UAAU,CAAC;AAE9D,wBAAgB,kCAAkC,CAC9C,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,GAAG,eAAe,GAAG,SAAS,GAAG,qBAAqB,CAAC,GAAG;IACvG,KAAK,EAAE,wBAAwB,CAAC;IAChC,uBAAuB,EAAE,SAAS,GAAG,WAAW,CAAC;IACjD,QAAQ,EAAE,OAAO,CAAC;CACrB,GACF,QAAQ,CA0OV"}
@@ -0,0 +1,10 @@
1
+ import { InstructionNode } from '@codama/nodes';
2
+ import { ResolvedInstructionInput } from '@codama/visitors-core';
3
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
4
+ import { Fragment } from './common';
5
+ export declare function getInstructionInputResolvedFragment(scope: Pick<GlobalFragmentScope, 'asyncResolvers' | 'getImportFrom' | 'nameApi' | 'typeManifestVisitor'> & {
6
+ instructionNode: InstructionNode;
7
+ resolvedInputs: ResolvedInstructionInput[];
8
+ useAsync: boolean;
9
+ }): Fragment;
10
+ //# sourceMappingURL=instructionInputResolved.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructionInputResolved.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionInputResolved.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,eAAe,EAAU,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAA4B,MAAM,UAAU,CAAC;AAG9D,wBAAgB,mCAAmC,CAC/C,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,GAAG,eAAe,GAAG,SAAS,GAAG,qBAAqB,CAAC,GAAG;IACvG,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,wBAAwB,EAAE,CAAC;IAC3C,QAAQ,EAAE,OAAO,CAAC;CACrB,GACF,QAAQ,CAyBV"}
@@ -0,0 +1,13 @@
1
+ import { InstructionNode } from '@codama/nodes';
2
+ import { ResolvedInstructionInput } from '@codama/visitors-core';
3
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
4
+ import { TypeManifest } from '../TypeManifest';
5
+ import { Fragment } from './common';
6
+ export declare function getInstructionInputTypeFragment(scope: Pick<GlobalFragmentScope, 'asyncResolvers' | 'customInstructionData' | 'nameApi'> & {
7
+ dataArgsManifest: TypeManifest;
8
+ instructionNode: InstructionNode;
9
+ renamedArgs: Map<string, string>;
10
+ resolvedInputs: ResolvedInstructionInput[];
11
+ useAsync: boolean;
12
+ }): Fragment;
13
+ //# sourceMappingURL=instructionInputType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructionInputType.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionInputType.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,eAAe,EAGlB,MAAM,eAAe,CAAC;AACvB,OAAO,EAGH,wBAAwB,EAC3B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAkD,MAAM,UAAU,CAAC;AAEpF,wBAAgB,+BAA+B,CAC3C,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,GAAG,uBAAuB,GAAG,SAAS,CAAC,GAAG;IACvF,gBAAgB,EAAE,YAAY,CAAC;IAC/B,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,cAAc,EAAE,wBAAwB,EAAE,CAAC;IAC3C,QAAQ,EAAE,OAAO,CAAC;CACrB,GACF,QAAQ,CA4BV"}
@@ -0,0 +1,10 @@
1
+ import { InstructionNode, ProgramNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { TypeManifest } from '../TypeManifest';
4
+ import { Fragment } from './common';
5
+ export declare function getInstructionParseFunctionFragment(scope: Pick<GlobalFragmentScope, 'customInstructionData' | 'nameApi'> & {
6
+ dataArgsManifest: TypeManifest;
7
+ instructionNode: InstructionNode;
8
+ programNode: ProgramNode;
9
+ }): Fragment;
10
+ //# sourceMappingURL=instructionParseFunction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructionParseFunction.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionParseFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAkC,MAAM,UAAU,CAAC;AAEpE,wBAAgB,mCAAmC,CAC/C,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,uBAAuB,GAAG,SAAS,CAAC,GAAG;IACpE,gBAAgB,EAAE,YAAY,CAAC;IAC/B,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,WAAW,CAAC;CAC5B,GACF,QAAQ,CA4CV"}
@@ -0,0 +1,8 @@
1
+ import { InstructionNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ export declare function getInstructionRemainingAccountsFragment(scope: Pick<GlobalFragmentScope, 'asyncResolvers' | 'getImportFrom' | 'nameApi'> & {
5
+ instructionNode: InstructionNode;
6
+ useAsync: boolean;
7
+ }): Fragment;
8
+ //# sourceMappingURL=instructionRemainingAccounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructionRemainingAccounts.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionRemainingAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,eAAe,EAGlB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAA4B,MAAM,UAAU,CAAC;AAE9D,wBAAgB,uCAAuC,CACnD,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,GAAG,eAAe,GAAG,SAAS,CAAC,GAAG;IAC/E,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;CACrB,GACF,QAAQ,CAUV"}
@@ -0,0 +1,8 @@
1
+ import { InstructionNode, ProgramNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ export declare function getInstructionTypeFragment(scope: Pick<GlobalFragmentScope, 'customInstructionData' | 'linkables' | 'nameApi'> & {
5
+ instructionNode: InstructionNode;
6
+ programNode: ProgramNode;
7
+ }): Fragment;
8
+ //# sourceMappingURL=instructionType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructionType.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAc,WAAW,EAAE,MAAM,eAAe,CAAC;AAEzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAwC,MAAM,UAAU,CAAC;AAI1E,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,uBAAuB,GAAG,WAAW,GAAG,SAAS,CAAC,GAAG;IAClF,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,WAAW,CAAC;CAC5B,GACF,QAAQ,CAsDV"}
@@ -0,0 +1,8 @@
1
+ import { PdaNode, ProgramNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ export declare function getPdaFunctionFragment(scope: Pick<GlobalFragmentScope, 'nameApi' | 'typeManifestVisitor'> & {
5
+ pdaNode: PdaNode;
6
+ programNode: ProgramNode;
7
+ }): Fragment;
8
+ //# sourceMappingURL=pdaFunction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pdaFunction.d.ts","sourceRoot":"","sources":["../../../src/fragments/pdaFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAE,QAAQ,EAAwB,MAAM,UAAU,CAAC;AAE1D,wBAAgB,sBAAsB,CAClC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,qBAAqB,CAAC,GAAG;IAClE,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;CAC5B,GACF,QAAQ,CAgCV"}
@@ -0,0 +1,7 @@
1
+ import { ProgramNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ export declare function getProgramFragment(scope: Pick<GlobalFragmentScope, 'nameApi'> & {
5
+ programNode: ProgramNode;
6
+ }): Fragment;
7
+ //# sourceMappingURL=program.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../../src/fragments/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAwB,MAAM,UAAU,CAAC;AAE1D,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAAG;IAC1C,WAAW,EAAE,WAAW,CAAC;CAC5B,GACF,QAAQ,CAOV"}
@@ -0,0 +1,7 @@
1
+ import { ProgramNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ export declare function getProgramAccountsFragment(scope: Pick<GlobalFragmentScope, 'nameApi' | 'typeManifestVisitor'> & {
5
+ programNode: ProgramNode;
6
+ }): Fragment;
7
+ //# sourceMappingURL=programAccounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"programAccounts.d.ts","sourceRoot":"","sources":["../../../src/fragments/programAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC;AAEnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAA4B,MAAM,UAAU,CAAC;AAG9D,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,qBAAqB,CAAC,GAAG;IAClE,WAAW,EAAE,WAAW,CAAC;CAC5B,GACF,QAAQ,CAMV"}
@@ -0,0 +1,7 @@
1
+ import { ProgramNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ export declare function getProgramErrorsFragment(scope: Pick<GlobalFragmentScope, 'nameApi'> & {
5
+ programNode: ProgramNode;
6
+ }): Fragment;
7
+ //# sourceMappingURL=programErrors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"programErrors.d.ts","sourceRoot":"","sources":["../../../src/fragments/programErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAwB,MAAM,UAAU,CAAC;AAE1D,wBAAgB,wBAAwB,CACpC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAAG;IAC1C,WAAW,EAAE,WAAW,CAAC;CAC5B,GACF,QAAQ,CAiBV"}
@@ -0,0 +1,7 @@
1
+ import { ProgramNode } from '@codama/nodes';
2
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
3
+ import { Fragment } from './common';
4
+ export declare function getProgramInstructionsFragment(scope: Pick<GlobalFragmentScope, 'nameApi' | 'renderParentInstructions' | 'typeManifestVisitor'> & {
5
+ programNode: ProgramNode;
6
+ }): Fragment;
7
+ //# sourceMappingURL=programInstructions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"programInstructions.d.ts","sourceRoot":"","sources":["../../../src/fragments/programInstructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,WAAW,EAEd,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAA4B,MAAM,UAAU,CAAC;AAG9D,wBAAgB,8BAA8B,CAC1C,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,0BAA0B,GAAG,qBAAqB,CAAC,GAAG;IAC/F,WAAW,EAAE,WAAW,CAAC;CAC5B,GACF,QAAQ,CAeV"}
@@ -0,0 +1,9 @@
1
+ import type { GlobalFragmentScope } from '../getRenderMapVisitor';
2
+ import { TypeManifest } from '../TypeManifest';
3
+ import { Fragment } from './common';
4
+ export declare function getTypeFragment(scope: Pick<GlobalFragmentScope, 'nameApi'> & {
5
+ docs?: string[];
6
+ manifest: TypeManifest;
7
+ name: string;
8
+ }): Fragment;
9
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/fragments/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAwB,MAAM,UAAU,CAAC;AAE1D,wBAAgB,eAAe,CAC3B,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAAG;IAC1C,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,YAAY,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CAChB,GACF,QAAQ,CAcV"}