@metaplex-foundation/kinobi 0.3.0 → 0.3.1

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.
@@ -84,15 +84,9 @@ export async function safeFetchAll{{ account.name | pascalCase }}(
84
84
  {% endif %}
85
85
 
86
86
  {% if account.metadata.size !== null %}
87
- export function get{{ account.name | pascalCase }}Size(_context = {}): number {
87
+ export function get{{ account.name | pascalCase }}Size(): number {
88
88
  return {{ account.metadata.size }};
89
89
  }
90
- {% else %}
91
- export function get{{ account.name | pascalCase }}Size(
92
- context: Pick<Context, 'serializer'>
93
- ): number | null {
94
- return get{{ account.name | pascalCase }}AccountDataSerializer(context).fixedSize;
95
- }
96
90
  {% endif %}
97
91
 
98
92
  {% if seeds.length > 0 %}
@@ -80,7 +80,7 @@ export function {{ instruction.name | camelCase }}(
80
80
  {% elif bytes.kind === 'arg' %}
81
81
  const bytesCreatedOnChain = Number({{ argsObj }}.{{ bytes.name }}){% if bytes.includeHeader %} + ACCOUNT_HEADER_SIZE{% endif %};
82
82
  {% elif bytes.kind === 'account' %}
83
- const bytesCreatedOnChain = (get{{ bytes.name | pascalCase }}Size(context) ?? 0){% if bytes.includeHeader %} + ACCOUNT_HEADER_SIZE{% endif %};
83
+ const bytesCreatedOnChain = get{{ bytes.name | pascalCase }}Size(){% if bytes.includeHeader %} + ACCOUNT_HEADER_SIZE{% endif %};
84
84
  {% else %}
85
85
  const bytesCreatedOnChain = 0;
86
86
  {% endif %}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metaplex-foundation/kinobi",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Generate powerful clients for your Solana programs",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -84,15 +84,9 @@ export async function safeFetchAll{{ account.name | pascalCase }}(
84
84
  {% endif %}
85
85
 
86
86
  {% if account.metadata.size !== null %}
87
- export function get{{ account.name | pascalCase }}Size(_context = {}): number {
87
+ export function get{{ account.name | pascalCase }}Size(): number {
88
88
  return {{ account.metadata.size }};
89
89
  }
90
- {% else %}
91
- export function get{{ account.name | pascalCase }}Size(
92
- context: Pick<Context, 'serializer'>
93
- ): number | null {
94
- return get{{ account.name | pascalCase }}AccountDataSerializer(context).fixedSize;
95
- }
96
90
  {% endif %}
97
91
 
98
92
  {% if seeds.length > 0 %}
@@ -80,7 +80,7 @@ export function {{ instruction.name | camelCase }}(
80
80
  {% elif bytes.kind === 'arg' %}
81
81
  const bytesCreatedOnChain = Number({{ argsObj }}.{{ bytes.name }}){% if bytes.includeHeader %} + ACCOUNT_HEADER_SIZE{% endif %};
82
82
  {% elif bytes.kind === 'account' %}
83
- const bytesCreatedOnChain = (get{{ bytes.name | pascalCase }}Size(context) ?? 0){% if bytes.includeHeader %} + ACCOUNT_HEADER_SIZE{% endif %};
83
+ const bytesCreatedOnChain = get{{ bytes.name | pascalCase }}Size(){% if bytes.includeHeader %} + ACCOUNT_HEADER_SIZE{% endif %};
84
84
  {% else %}
85
85
  const bytesCreatedOnChain = 0;
86
86
  {% endif %}