@thru/programs 0.2.30 → 0.2.31

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 (42) hide show
  1. package/dist/amm/index.cjs +6424 -0
  2. package/dist/amm/index.cjs.map +1 -0
  3. package/dist/amm/index.d.cts +1424 -0
  4. package/dist/amm/index.d.ts +1424 -0
  5. package/dist/amm/index.js +6360 -0
  6. package/dist/amm/index.js.map +1 -0
  7. package/dist/chunk-P5OABVJI.js +28 -0
  8. package/dist/chunk-P5OABVJI.js.map +1 -0
  9. package/dist/multicall/index.cjs +1 -1
  10. package/dist/multicall/index.cjs.map +1 -1
  11. package/dist/multicall/index.d.cts +2 -2
  12. package/dist/multicall/index.d.ts +2 -2
  13. package/dist/multicall/index.js +1 -1
  14. package/dist/multicall/index.js.map +1 -1
  15. package/dist/passkey-manager/index.cjs +33 -27
  16. package/dist/passkey-manager/index.cjs.map +1 -1
  17. package/dist/passkey-manager/index.d.cts +4 -3
  18. package/dist/passkey-manager/index.d.ts +4 -3
  19. package/dist/passkey-manager/index.js +9 -28
  20. package/dist/passkey-manager/index.js.map +1 -1
  21. package/dist/token/index.cjs +1760 -275
  22. package/dist/token/index.cjs.map +1 -1
  23. package/dist/token/index.d.cts +124 -20
  24. package/dist/token/index.d.ts +124 -20
  25. package/dist/token/index.js +1760 -275
  26. package/dist/token/index.js.map +1 -1
  27. package/package.json +9 -2
  28. package/src/amm/abi/thru/common/primitives/types.ts +2269 -0
  29. package/src/amm/abi/thru/program/amm/types.ts +5621 -0
  30. package/src/amm/index.test.ts +255 -0
  31. package/src/amm/index.ts +434 -0
  32. package/src/helpers/bytes.ts +25 -0
  33. package/src/multicall/abi/thru/common/primitives/types.ts +5 -6
  34. package/src/multicall/abi/thru/program/multicall/types.ts +1 -2
  35. package/src/passkey-manager/abi/thru/blockchain/state_proof/types.ts +0 -1
  36. package/src/passkey-manager/abi/thru/common/primitives/types.ts +0 -1
  37. package/src/passkey-manager/abi/thru/program/passkey_manager/types.ts +4 -5
  38. package/src/passkey-manager/encoding.ts +2 -26
  39. package/src/token/abi/thru/blockchain/state_proof/types.ts +101 -21
  40. package/src/token/abi/thru/common/primitives/types.ts +1295 -167
  41. package/src/token/abi/thru/program/token/types.ts +647 -237
  42. package/tsup.config.ts +1 -0
@@ -65,6 +65,7 @@ type __TnValidateResult$2 = {
65
65
  ok: boolean;
66
66
  code?: string;
67
67
  consumed?: bigint;
68
+ params?: Record<string, bigint>;
68
69
  };
69
70
  declare class Hash {
70
71
  private buffer;
@@ -145,6 +146,7 @@ type __TnValidateResult$1 = {
145
146
  ok: boolean;
146
147
  code?: string;
147
148
  consumed?: bigint;
149
+ params?: Record<string, bigint>;
148
150
  };
149
151
  type __TnBuilderLike$1 = {
150
152
  build(): Uint8Array;
@@ -200,7 +202,7 @@ declare class StateProofHeaderBuilder {
200
202
  private buffer;
201
203
  private view;
202
204
  constructor();
203
- set_type_slot(value: number): this;
205
+ set_type_slot(value: bigint): this;
204
206
  set_path_bitset(value: Uint8Array): this;
205
207
  build(): Uint8Array;
206
208
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
@@ -414,6 +416,7 @@ type __TnValidateResult = {
414
416
  ok: boolean;
415
417
  code?: string;
416
418
  consumed?: bigint;
419
+ params?: Record<string, bigint>;
417
420
  };
418
421
  type __TnBuilderLike = {
419
422
  build(): Uint8Array;
@@ -488,7 +491,7 @@ declare class BurnInstructionBuilder {
488
491
  set_token_account_index(value: number): this;
489
492
  set_mint_account_index(value: number): this;
490
493
  set_authority_account_index(value: number): this;
491
- set_amount(value: number): this;
494
+ set_amount(value: bigint): this;
492
495
  build(): Uint8Array;
493
496
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
494
497
  finish(): BurnInstruction;
@@ -637,7 +640,7 @@ declare class MintToInstructionBuilder {
637
640
  set_mint_account_index(value: number): this;
638
641
  set_dest_account_index(value: number): this;
639
642
  set_authority_account_index(value: number): this;
640
- set_amount(value: number): this;
643
+ set_amount(value: bigint): this;
641
644
  build(): Uint8Array;
642
645
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
643
646
  finish(): MintToInstruction;
@@ -802,7 +805,7 @@ declare class TokenAccountBuilder {
802
805
  constructor();
803
806
  set_mint(value: Uint8Array): this;
804
807
  set_owner(value: Uint8Array): this;
805
- set_amount(value: number): this;
808
+ set_amount(value: bigint): this;
806
809
  set_is_frozen(value: number): this;
807
810
  build(): Uint8Array;
808
811
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
@@ -865,7 +868,7 @@ declare class TokenMintAccountBuilder {
865
868
  private view;
866
869
  constructor();
867
870
  set_decimals(value: number): this;
868
- set_supply(value: number): this;
871
+ set_supply(value: bigint): this;
869
872
  set_creator(value: Uint8Array): this;
870
873
  set_mint_authority(value: Uint8Array): this;
871
874
  set_freeze_authority(value: Uint8Array): this;
@@ -918,7 +921,7 @@ declare class TransferInstructionBuilder {
918
921
  constructor();
919
922
  set_source_account_index(value: number): this;
920
923
  set_dest_account_index(value: number): this;
921
- set_amount(value: number): this;
924
+ set_amount(value: bigint): this;
922
925
  build(): Uint8Array;
923
926
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
924
927
  finish(): TransferInstruction;
@@ -926,12 +929,21 @@ declare class TransferInstructionBuilder {
926
929
  declare class InitializeAccountInstruction {
927
930
  private buffer;
928
931
  private view;
932
+ private __tnParams;
929
933
  private constructor();
930
934
  static __tnCreateView(buffer: Uint8Array, opts?: {
935
+ params?: InitializeAccountInstruction.Params;
931
936
  fieldContext?: Record<string, number | bigint>;
932
937
  }): InitializeAccountInstruction;
938
+ dynamicParams(): InitializeAccountInstruction.Params;
933
939
  static builder(): InitializeAccountInstructionBuilder;
934
940
  static fromBuilder(builder: InitializeAccountInstructionBuilder): InitializeAccountInstruction | null;
941
+ static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
942
+ params: Record<string, bigint> | null;
943
+ offsets: Record<string, number> | null;
944
+ derived: Record<string, bigint> | null;
945
+ } | null;
946
+ private static __tnExtractParams;
935
947
  get_token_account_index(): number;
936
948
  set_token_account_index(value: number): void;
937
949
  get token_account_index(): number;
@@ -956,21 +968,62 @@ declare class InitializeAccountInstruction {
956
968
  private static __tnValidateInternal;
957
969
  static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
958
970
  static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
959
- static footprintIr(): bigint;
960
- static footprint(): number;
961
- static validate(_buffer: Uint8Array, _opts?: {
962
- params?: never;
971
+ static footprintIr(proof_body_hdr_type_slot: number | bigint, proof_body_payload_size: number | bigint): bigint;
972
+ private static __tnPackParams;
973
+ static footprintIrFromParams(params: InitializeAccountInstruction.Params): bigint;
974
+ static footprintFromParams(params: InitializeAccountInstruction.Params): number;
975
+ static footprintFromValues(input: {
976
+ proof_body_hdr_type_slot: number | bigint;
977
+ proof_body_payload_size: number | bigint;
978
+ }): number;
979
+ static footprint(params: InitializeAccountInstruction.Params): number;
980
+ static validate(buffer: Uint8Array, opts?: {
981
+ params?: InitializeAccountInstruction.Params;
963
982
  }): {
964
983
  ok: boolean;
965
984
  code?: string;
966
985
  consumed?: number;
986
+ params?: InitializeAccountInstruction.Params;
967
987
  };
968
- static from_array(buffer: Uint8Array): InitializeAccountInstruction | null;
988
+ static from_array(buffer: Uint8Array, opts?: {
989
+ params?: InitializeAccountInstruction.Params;
990
+ }): InitializeAccountInstruction | null;
991
+ }
992
+ declare namespace InitializeAccountInstruction {
993
+ type Params = {
994
+ /** ABI path: proof_body.hdr.type_slot */
995
+ readonly proof_body_hdr_type_slot: bigint;
996
+ /** ABI path: proof_body.payload_size */
997
+ readonly proof_body_payload_size: bigint;
998
+ };
999
+ const ParamKeys: Readonly<{
1000
+ readonly proof_body_hdr_type_slot: "proof_body.hdr.type_slot";
1001
+ readonly proof_body_payload_size: "proof_body.payload_size";
1002
+ }>;
1003
+ const Params: {
1004
+ fromValues(input: {
1005
+ proof_body_hdr_type_slot: number | bigint;
1006
+ proof_body_payload_size: number | bigint;
1007
+ }): Params;
1008
+ fromBuilder(source: {
1009
+ dynamicParams(): Params;
1010
+ } | {
1011
+ params: Params;
1012
+ } | Params): Params;
1013
+ };
1014
+ function params(input: {
1015
+ proof_body_hdr_type_slot: number | bigint;
1016
+ proof_body_payload_size: number | bigint;
1017
+ }): Params;
969
1018
  }
970
1019
  declare class InitializeAccountInstructionBuilder {
971
1020
  private buffer;
972
1021
  private view;
1022
+ private __tnCachedParams;
1023
+ private __tnLastBuffer;
1024
+ private __tnLastParams;
973
1025
  private __tnTail_state_proof;
1026
+ private __tnTailParams_state_proof;
974
1027
  constructor();
975
1028
  private __tnInvalidate;
976
1029
  set_token_account_index(value: number): this;
@@ -982,20 +1035,29 @@ declare class InitializeAccountInstructionBuilder {
982
1035
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
983
1036
  finish(): InitializeAccountInstruction;
984
1037
  finishView(): InitializeAccountInstruction;
985
- private __tnCollectTailFragments;
986
- private __tnComputeSize;
1038
+ dynamicParams(): InitializeAccountInstruction.Params;
1039
+ private __tnComputeParams;
987
1040
  private __tnWriteInto;
988
1041
  private __tnValidateOrThrow;
989
1042
  }
990
1043
  declare class InitializeMintInstruction {
991
1044
  private buffer;
992
1045
  private view;
1046
+ private __tnParams;
993
1047
  private constructor();
994
1048
  static __tnCreateView(buffer: Uint8Array, opts?: {
1049
+ params?: InitializeMintInstruction.Params;
995
1050
  fieldContext?: Record<string, number | bigint>;
996
1051
  }): InitializeMintInstruction;
1052
+ dynamicParams(): InitializeMintInstruction.Params;
997
1053
  static builder(): InitializeMintInstructionBuilder;
998
1054
  static fromBuilder(builder: InitializeMintInstructionBuilder): InitializeMintInstruction | null;
1055
+ static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
1056
+ params: Record<string, bigint> | null;
1057
+ offsets: Record<string, number> | null;
1058
+ derived: Record<string, bigint> | null;
1059
+ } | null;
1060
+ private static __tnExtractParams;
999
1061
  get_mint_account_index(): number;
1000
1062
  set_mint_account_index(value: number): void;
1001
1063
  get mint_account_index(): number;
@@ -1036,21 +1098,62 @@ declare class InitializeMintInstruction {
1036
1098
  private static __tnValidateInternal;
1037
1099
  static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1038
1100
  static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1039
- static footprintIr(): bigint;
1040
- static footprint(): number;
1041
- static validate(_buffer: Uint8Array, _opts?: {
1042
- params?: never;
1101
+ static footprintIr(proof_body_hdr_type_slot: number | bigint, proof_body_payload_size: number | bigint): bigint;
1102
+ private static __tnPackParams;
1103
+ static footprintIrFromParams(params: InitializeMintInstruction.Params): bigint;
1104
+ static footprintFromParams(params: InitializeMintInstruction.Params): number;
1105
+ static footprintFromValues(input: {
1106
+ proof_body_hdr_type_slot: number | bigint;
1107
+ proof_body_payload_size: number | bigint;
1108
+ }): number;
1109
+ static footprint(params: InitializeMintInstruction.Params): number;
1110
+ static validate(buffer: Uint8Array, opts?: {
1111
+ params?: InitializeMintInstruction.Params;
1043
1112
  }): {
1044
1113
  ok: boolean;
1045
1114
  code?: string;
1046
1115
  consumed?: number;
1116
+ params?: InitializeMintInstruction.Params;
1117
+ };
1118
+ static from_array(buffer: Uint8Array, opts?: {
1119
+ params?: InitializeMintInstruction.Params;
1120
+ }): InitializeMintInstruction | null;
1121
+ }
1122
+ declare namespace InitializeMintInstruction {
1123
+ type Params = {
1124
+ /** ABI path: proof_body.hdr.type_slot */
1125
+ readonly proof_body_hdr_type_slot: bigint;
1126
+ /** ABI path: proof_body.payload_size */
1127
+ readonly proof_body_payload_size: bigint;
1047
1128
  };
1048
- static from_array(buffer: Uint8Array): InitializeMintInstruction | null;
1129
+ const ParamKeys: Readonly<{
1130
+ readonly proof_body_hdr_type_slot: "proof_body.hdr.type_slot";
1131
+ readonly proof_body_payload_size: "proof_body.payload_size";
1132
+ }>;
1133
+ const Params: {
1134
+ fromValues(input: {
1135
+ proof_body_hdr_type_slot: number | bigint;
1136
+ proof_body_payload_size: number | bigint;
1137
+ }): Params;
1138
+ fromBuilder(source: {
1139
+ dynamicParams(): Params;
1140
+ } | {
1141
+ params: Params;
1142
+ } | Params): Params;
1143
+ };
1144
+ function params(input: {
1145
+ proof_body_hdr_type_slot: number | bigint;
1146
+ proof_body_payload_size: number | bigint;
1147
+ }): Params;
1049
1148
  }
1050
1149
  declare class InitializeMintInstructionBuilder {
1051
1150
  private buffer;
1052
1151
  private view;
1152
+ private __tnCachedParams;
1153
+ private __tnLastBuffer;
1154
+ private __tnLastParams;
1053
1155
  private __tnTail_state_proof;
1156
+ private __tnTailParams_state_proof;
1054
1157
  constructor();
1055
1158
  private __tnInvalidate;
1056
1159
  set_mint_account_index(value: number): this;
@@ -1066,8 +1169,8 @@ declare class InitializeMintInstructionBuilder {
1066
1169
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
1067
1170
  finish(): InitializeMintInstruction;
1068
1171
  finishView(): InitializeMintInstruction;
1069
- private __tnCollectTailFragments;
1070
- private __tnComputeSize;
1172
+ dynamicParams(): InitializeMintInstruction.Params;
1173
+ private __tnComputeParams;
1071
1174
  private __tnWriteInto;
1072
1175
  private __tnValidateOrThrow;
1073
1176
  }
@@ -1097,6 +1200,7 @@ declare class TokenInstruction {
1097
1200
  private constructor();
1098
1201
  static __tnCreateView(buffer: Uint8Array, opts?: {
1099
1202
  params?: TokenInstruction.Params;
1203
+ fieldContext?: Record<string, number | bigint>;
1100
1204
  }): TokenInstruction;
1101
1205
  dynamicParams(): TokenInstruction.Params;
1102
1206
  static builder(): TokenInstructionBuilder;
@@ -65,6 +65,7 @@ type __TnValidateResult$2 = {
65
65
  ok: boolean;
66
66
  code?: string;
67
67
  consumed?: bigint;
68
+ params?: Record<string, bigint>;
68
69
  };
69
70
  declare class Hash {
70
71
  private buffer;
@@ -145,6 +146,7 @@ type __TnValidateResult$1 = {
145
146
  ok: boolean;
146
147
  code?: string;
147
148
  consumed?: bigint;
149
+ params?: Record<string, bigint>;
148
150
  };
149
151
  type __TnBuilderLike$1 = {
150
152
  build(): Uint8Array;
@@ -200,7 +202,7 @@ declare class StateProofHeaderBuilder {
200
202
  private buffer;
201
203
  private view;
202
204
  constructor();
203
- set_type_slot(value: number): this;
205
+ set_type_slot(value: bigint): this;
204
206
  set_path_bitset(value: Uint8Array): this;
205
207
  build(): Uint8Array;
206
208
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
@@ -414,6 +416,7 @@ type __TnValidateResult = {
414
416
  ok: boolean;
415
417
  code?: string;
416
418
  consumed?: bigint;
419
+ params?: Record<string, bigint>;
417
420
  };
418
421
  type __TnBuilderLike = {
419
422
  build(): Uint8Array;
@@ -488,7 +491,7 @@ declare class BurnInstructionBuilder {
488
491
  set_token_account_index(value: number): this;
489
492
  set_mint_account_index(value: number): this;
490
493
  set_authority_account_index(value: number): this;
491
- set_amount(value: number): this;
494
+ set_amount(value: bigint): this;
492
495
  build(): Uint8Array;
493
496
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
494
497
  finish(): BurnInstruction;
@@ -637,7 +640,7 @@ declare class MintToInstructionBuilder {
637
640
  set_mint_account_index(value: number): this;
638
641
  set_dest_account_index(value: number): this;
639
642
  set_authority_account_index(value: number): this;
640
- set_amount(value: number): this;
643
+ set_amount(value: bigint): this;
641
644
  build(): Uint8Array;
642
645
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
643
646
  finish(): MintToInstruction;
@@ -802,7 +805,7 @@ declare class TokenAccountBuilder {
802
805
  constructor();
803
806
  set_mint(value: Uint8Array): this;
804
807
  set_owner(value: Uint8Array): this;
805
- set_amount(value: number): this;
808
+ set_amount(value: bigint): this;
806
809
  set_is_frozen(value: number): this;
807
810
  build(): Uint8Array;
808
811
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
@@ -865,7 +868,7 @@ declare class TokenMintAccountBuilder {
865
868
  private view;
866
869
  constructor();
867
870
  set_decimals(value: number): this;
868
- set_supply(value: number): this;
871
+ set_supply(value: bigint): this;
869
872
  set_creator(value: Uint8Array): this;
870
873
  set_mint_authority(value: Uint8Array): this;
871
874
  set_freeze_authority(value: Uint8Array): this;
@@ -918,7 +921,7 @@ declare class TransferInstructionBuilder {
918
921
  constructor();
919
922
  set_source_account_index(value: number): this;
920
923
  set_dest_account_index(value: number): this;
921
- set_amount(value: number): this;
924
+ set_amount(value: bigint): this;
922
925
  build(): Uint8Array;
923
926
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
924
927
  finish(): TransferInstruction;
@@ -926,12 +929,21 @@ declare class TransferInstructionBuilder {
926
929
  declare class InitializeAccountInstruction {
927
930
  private buffer;
928
931
  private view;
932
+ private __tnParams;
929
933
  private constructor();
930
934
  static __tnCreateView(buffer: Uint8Array, opts?: {
935
+ params?: InitializeAccountInstruction.Params;
931
936
  fieldContext?: Record<string, number | bigint>;
932
937
  }): InitializeAccountInstruction;
938
+ dynamicParams(): InitializeAccountInstruction.Params;
933
939
  static builder(): InitializeAccountInstructionBuilder;
934
940
  static fromBuilder(builder: InitializeAccountInstructionBuilder): InitializeAccountInstruction | null;
941
+ static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
942
+ params: Record<string, bigint> | null;
943
+ offsets: Record<string, number> | null;
944
+ derived: Record<string, bigint> | null;
945
+ } | null;
946
+ private static __tnExtractParams;
935
947
  get_token_account_index(): number;
936
948
  set_token_account_index(value: number): void;
937
949
  get token_account_index(): number;
@@ -956,21 +968,62 @@ declare class InitializeAccountInstruction {
956
968
  private static __tnValidateInternal;
957
969
  static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
958
970
  static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
959
- static footprintIr(): bigint;
960
- static footprint(): number;
961
- static validate(_buffer: Uint8Array, _opts?: {
962
- params?: never;
971
+ static footprintIr(proof_body_hdr_type_slot: number | bigint, proof_body_payload_size: number | bigint): bigint;
972
+ private static __tnPackParams;
973
+ static footprintIrFromParams(params: InitializeAccountInstruction.Params): bigint;
974
+ static footprintFromParams(params: InitializeAccountInstruction.Params): number;
975
+ static footprintFromValues(input: {
976
+ proof_body_hdr_type_slot: number | bigint;
977
+ proof_body_payload_size: number | bigint;
978
+ }): number;
979
+ static footprint(params: InitializeAccountInstruction.Params): number;
980
+ static validate(buffer: Uint8Array, opts?: {
981
+ params?: InitializeAccountInstruction.Params;
963
982
  }): {
964
983
  ok: boolean;
965
984
  code?: string;
966
985
  consumed?: number;
986
+ params?: InitializeAccountInstruction.Params;
967
987
  };
968
- static from_array(buffer: Uint8Array): InitializeAccountInstruction | null;
988
+ static from_array(buffer: Uint8Array, opts?: {
989
+ params?: InitializeAccountInstruction.Params;
990
+ }): InitializeAccountInstruction | null;
991
+ }
992
+ declare namespace InitializeAccountInstruction {
993
+ type Params = {
994
+ /** ABI path: proof_body.hdr.type_slot */
995
+ readonly proof_body_hdr_type_slot: bigint;
996
+ /** ABI path: proof_body.payload_size */
997
+ readonly proof_body_payload_size: bigint;
998
+ };
999
+ const ParamKeys: Readonly<{
1000
+ readonly proof_body_hdr_type_slot: "proof_body.hdr.type_slot";
1001
+ readonly proof_body_payload_size: "proof_body.payload_size";
1002
+ }>;
1003
+ const Params: {
1004
+ fromValues(input: {
1005
+ proof_body_hdr_type_slot: number | bigint;
1006
+ proof_body_payload_size: number | bigint;
1007
+ }): Params;
1008
+ fromBuilder(source: {
1009
+ dynamicParams(): Params;
1010
+ } | {
1011
+ params: Params;
1012
+ } | Params): Params;
1013
+ };
1014
+ function params(input: {
1015
+ proof_body_hdr_type_slot: number | bigint;
1016
+ proof_body_payload_size: number | bigint;
1017
+ }): Params;
969
1018
  }
970
1019
  declare class InitializeAccountInstructionBuilder {
971
1020
  private buffer;
972
1021
  private view;
1022
+ private __tnCachedParams;
1023
+ private __tnLastBuffer;
1024
+ private __tnLastParams;
973
1025
  private __tnTail_state_proof;
1026
+ private __tnTailParams_state_proof;
974
1027
  constructor();
975
1028
  private __tnInvalidate;
976
1029
  set_token_account_index(value: number): this;
@@ -982,20 +1035,29 @@ declare class InitializeAccountInstructionBuilder {
982
1035
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
983
1036
  finish(): InitializeAccountInstruction;
984
1037
  finishView(): InitializeAccountInstruction;
985
- private __tnCollectTailFragments;
986
- private __tnComputeSize;
1038
+ dynamicParams(): InitializeAccountInstruction.Params;
1039
+ private __tnComputeParams;
987
1040
  private __tnWriteInto;
988
1041
  private __tnValidateOrThrow;
989
1042
  }
990
1043
  declare class InitializeMintInstruction {
991
1044
  private buffer;
992
1045
  private view;
1046
+ private __tnParams;
993
1047
  private constructor();
994
1048
  static __tnCreateView(buffer: Uint8Array, opts?: {
1049
+ params?: InitializeMintInstruction.Params;
995
1050
  fieldContext?: Record<string, number | bigint>;
996
1051
  }): InitializeMintInstruction;
1052
+ dynamicParams(): InitializeMintInstruction.Params;
997
1053
  static builder(): InitializeMintInstructionBuilder;
998
1054
  static fromBuilder(builder: InitializeMintInstructionBuilder): InitializeMintInstruction | null;
1055
+ static __tnComputeSequentialLayout(view: DataView, buffer: Uint8Array): {
1056
+ params: Record<string, bigint> | null;
1057
+ offsets: Record<string, number> | null;
1058
+ derived: Record<string, bigint> | null;
1059
+ } | null;
1060
+ private static __tnExtractParams;
999
1061
  get_mint_account_index(): number;
1000
1062
  set_mint_account_index(value: number): void;
1001
1063
  get mint_account_index(): number;
@@ -1036,21 +1098,62 @@ declare class InitializeMintInstruction {
1036
1098
  private static __tnValidateInternal;
1037
1099
  static __tnInvokeFootprint(__tnParams: Record<string, bigint>): bigint;
1038
1100
  static __tnInvokeValidate(buffer: Uint8Array, __tnParams: Record<string, bigint>): __TnValidateResult;
1039
- static footprintIr(): bigint;
1040
- static footprint(): number;
1041
- static validate(_buffer: Uint8Array, _opts?: {
1042
- params?: never;
1101
+ static footprintIr(proof_body_hdr_type_slot: number | bigint, proof_body_payload_size: number | bigint): bigint;
1102
+ private static __tnPackParams;
1103
+ static footprintIrFromParams(params: InitializeMintInstruction.Params): bigint;
1104
+ static footprintFromParams(params: InitializeMintInstruction.Params): number;
1105
+ static footprintFromValues(input: {
1106
+ proof_body_hdr_type_slot: number | bigint;
1107
+ proof_body_payload_size: number | bigint;
1108
+ }): number;
1109
+ static footprint(params: InitializeMintInstruction.Params): number;
1110
+ static validate(buffer: Uint8Array, opts?: {
1111
+ params?: InitializeMintInstruction.Params;
1043
1112
  }): {
1044
1113
  ok: boolean;
1045
1114
  code?: string;
1046
1115
  consumed?: number;
1116
+ params?: InitializeMintInstruction.Params;
1117
+ };
1118
+ static from_array(buffer: Uint8Array, opts?: {
1119
+ params?: InitializeMintInstruction.Params;
1120
+ }): InitializeMintInstruction | null;
1121
+ }
1122
+ declare namespace InitializeMintInstruction {
1123
+ type Params = {
1124
+ /** ABI path: proof_body.hdr.type_slot */
1125
+ readonly proof_body_hdr_type_slot: bigint;
1126
+ /** ABI path: proof_body.payload_size */
1127
+ readonly proof_body_payload_size: bigint;
1047
1128
  };
1048
- static from_array(buffer: Uint8Array): InitializeMintInstruction | null;
1129
+ const ParamKeys: Readonly<{
1130
+ readonly proof_body_hdr_type_slot: "proof_body.hdr.type_slot";
1131
+ readonly proof_body_payload_size: "proof_body.payload_size";
1132
+ }>;
1133
+ const Params: {
1134
+ fromValues(input: {
1135
+ proof_body_hdr_type_slot: number | bigint;
1136
+ proof_body_payload_size: number | bigint;
1137
+ }): Params;
1138
+ fromBuilder(source: {
1139
+ dynamicParams(): Params;
1140
+ } | {
1141
+ params: Params;
1142
+ } | Params): Params;
1143
+ };
1144
+ function params(input: {
1145
+ proof_body_hdr_type_slot: number | bigint;
1146
+ proof_body_payload_size: number | bigint;
1147
+ }): Params;
1049
1148
  }
1050
1149
  declare class InitializeMintInstructionBuilder {
1051
1150
  private buffer;
1052
1151
  private view;
1152
+ private __tnCachedParams;
1153
+ private __tnLastBuffer;
1154
+ private __tnLastParams;
1053
1155
  private __tnTail_state_proof;
1156
+ private __tnTailParams_state_proof;
1054
1157
  constructor();
1055
1158
  private __tnInvalidate;
1056
1159
  set_mint_account_index(value: number): this;
@@ -1066,8 +1169,8 @@ declare class InitializeMintInstructionBuilder {
1066
1169
  buildInto(target: Uint8Array, offset?: number): Uint8Array;
1067
1170
  finish(): InitializeMintInstruction;
1068
1171
  finishView(): InitializeMintInstruction;
1069
- private __tnCollectTailFragments;
1070
- private __tnComputeSize;
1172
+ dynamicParams(): InitializeMintInstruction.Params;
1173
+ private __tnComputeParams;
1071
1174
  private __tnWriteInto;
1072
1175
  private __tnValidateOrThrow;
1073
1176
  }
@@ -1097,6 +1200,7 @@ declare class TokenInstruction {
1097
1200
  private constructor();
1098
1201
  static __tnCreateView(buffer: Uint8Array, opts?: {
1099
1202
  params?: TokenInstruction.Params;
1203
+ fieldContext?: Record<string, number | bigint>;
1100
1204
  }): TokenInstruction;
1101
1205
  dynamicParams(): TokenInstruction.Params;
1102
1206
  static builder(): TokenInstructionBuilder;