@codama/renderers-js 1.2.13 → 1.3.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.
@@ -3,7 +3,7 @@
3
3
  export type {{ instructionParsedType }}<
4
4
  TProgram extends string = typeof {{ programAddressConstant }},
5
5
  {% if hasAccounts %}
6
- TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[],
6
+ TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
7
7
  {% endif %}
8
8
  > = {
9
9
  programAddress: Address<TProgram>;
@@ -25,15 +25,15 @@ export type {{ instructionParsedType }}<
25
25
  export function {{ instructionParseFunction }}<
26
26
  TProgram extends string,
27
27
  {% if hasAccounts %}
28
- TAccountMetas extends readonly IAccountMeta[],
28
+ TAccountMetas extends readonly AccountMeta[],
29
29
  {% endif %}
30
30
  >(
31
- instruction: IInstruction<TProgram>
31
+ instruction: Instruction<TProgram>
32
32
  {% if hasAccounts %}
33
- & IInstructionWithAccounts<TAccountMetas>
33
+ & InstructionWithAccounts<TAccountMetas>
34
34
  {% endif %}
35
35
  {% if hasData %}
36
- & IInstructionWithData<Uint8Array>
36
+ & InstructionWithData<ReadonlyUint8Array>
37
37
  {% endif %}
38
38
  ): {{ instructionParsedType }}<TProgram {{ ', TAccountMetas' if hasAccounts }}> {
39
39
  {% if hasAccounts %}
@@ -5,14 +5,14 @@ export type {{ instructionType }}<
5
5
  {% if hasAccounts %}
6
6
  {{ accountTypeParams }},
7
7
  {% endif %}
8
- TRemainingAccounts extends readonly IAccountMeta<string>[] = [],
9
- > = IInstruction<TProgram>
8
+ TRemainingAccounts extends readonly AccountMeta<string>[] = [],
9
+ > = Instruction<TProgram>
10
10
  {% if hasData %}
11
- & IInstructionWithData<Uint8Array>
11
+ & InstructionWithData<ReadonlyUint8Array>
12
12
  {% endif %}
13
13
  {% if hasAccounts %}
14
- & IInstructionWithAccounts<[{{ accountMetas }}, ...TRemainingAccounts]>
14
+ & InstructionWithAccounts<[{{ accountMetas }}, ...TRemainingAccounts]>
15
15
  {% else %}
16
- & IInstructionWithAccounts<TRemainingAccounts>
16
+ & InstructionWithAccounts<TRemainingAccounts>
17
17
  {% endif %}
18
18
  ;
@@ -73,7 +73,7 @@ export type ResolvedAccount<T extends string = string, U extends Address<T> | Pr
73
73
  * Defines an instruction that stores additional bytes on-chain.
74
74
  * @internal
75
75
  */
76
- export type IInstructionWithByteDelta = {
76
+ export type InstructionWithByteDelta = {
77
77
  byteDelta: number;
78
78
  };
79
79
 
@@ -85,7 +85,7 @@ export function getAccountMetaFactory(
85
85
  programAddress: Address,
86
86
  optionalAccountStrategy: 'omitted' | 'programId',
87
87
  ) {
88
- return (account: ResolvedAccount): IAccountMeta | IAccountSignerMeta | undefined => {
88
+ return (account: ResolvedAccount): AccountMeta | AccountSignerMeta | undefined => {
89
89
  if (!account.value) {
90
90
  if (optionalAccountStrategy === 'omitted') return;
91
91
  return Object.freeze({ address: programAddress, role: AccountRole.READONLY });
@@ -1 +1 @@
1
- {"version":3,"file":"instructionParseFunction.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionParseFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAgD,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE/F,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,QAAQ,CAAC,eAAe,CAAC,CAAC;CAC9C,GACF,QAAQ,CA0CV"}
1
+ {"version":3,"file":"instructionParseFunction.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionParseFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAgD,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE/F,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,QAAQ,CAAC,eAAe,CAAC,CAAC;CAC9C,GACF,QAAQ,CA2CV"}
@@ -1 +1 @@
1
- {"version":3,"file":"instructionType.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAc,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAgD,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE/F,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,QAAQ,CAAC,eAAe,CAAC,CAAC;CAC9C,GACF,QAAQ,CAwDV"}
1
+ {"version":3,"file":"instructionType.d.ts","sourceRoot":"","sources":["../../../src/fragments/instructionType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAc,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAgD,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE/F,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,QAAQ,CAAC,eAAe,CAAC,CAAC;CAC9C,GACF,QAAQ,CAyDV"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codama/renderers-js",
3
- "version": "1.2.13",
3
+ "version": "1.3.0",
4
4
  "description": "JavaScript renderer compatible with the Solana Kit library",
5
5
  "exports": {
6
6
  "types": "./dist/types/index.d.ts",
@@ -28,17 +28,17 @@
28
28
  "client"
29
29
  ],
30
30
  "dependencies": {
31
- "@solana/codecs-strings": "rc",
31
+ "@solana/codecs-strings": "^2.3.0",
32
32
  "nunjucks": "^3.2.4",
33
- "prettier": "^3.5.3",
33
+ "prettier": "^3.6.2",
34
34
  "@codama/errors": "1.3.0",
35
35
  "@codama/nodes": "1.3.0",
36
- "@codama/nodes-from-anchor": "1.1.14",
37
36
  "@codama/renderers-core": "1.0.16",
38
37
  "@codama/visitors-core": "1.3.0"
39
38
  },
40
39
  "devDependencies": {
41
- "@types/nunjucks": "^3.2.6"
40
+ "@types/nunjucks": "^3.2.6",
41
+ "@codama/nodes-from-anchor": "1.2.2"
42
42
  },
43
43
  "license": "MIT",
44
44
  "repository": {