Function updateWitnessLayout
- updateWitnessLayout(buildingPacket, index, update): WritableDraft<{ 
 type: "BuildingPacketV1";
 value: InferShape<{
 change_output: OptionCodec<FixedSizeCodec<number, string | number>>;
 lock_actions: DynvecCodec<TableCodec<{
 data: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 script_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 script_info_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>>;
 message: TableCodec<{
 actions: DynvecCodec<TableCodec<{
 data: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 script_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 script_info_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>>;
 }>;
 payload: DynamicSizeCodec<{
 cell_deps: InferShape<{
 dep_type: FixedSizeCodec<"code" | "dep_group", code | dep_group | "code" | "dep_group">;
 out_point: StructCodec<{
 index: FixedSizeCodec<number, string | number>;
 tx_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>;
 }>[];
 hash: Uint8Array;
 header_deps: Uint8Array[];
 inputs: InferShape<{
 previous_output: StructCodec<{
 index: FixedSizeCodec<number, string | number>;
 tx_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>;
 since: FixedSizeCodec<bigint, string | bigint>;
 }>[];
 outputs: InferShape<{
 capacity: FixedSizeCodec<bigint, string | bigint>;
 lock: TableCodec<{
 args: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 code_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 hash_type: FixedSizeCodec<"data" | "type" | "data1" | "data2", "data" | data | type | data1 | data2 | "type" | "data1" | "data2">;
 }>;
 type: OptionCodec<TableCodec<{
 args: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 code_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 hash_type: FixedSizeCodec<"data" | "type" | "data1" | "data2", "data" | data | type | data1 | data2 | "type" | "data1" | "data2">;
 }>>;
 }>[];
 outputs_data: Uint8Array[];
 version: number;
 witnesses: Uint8Array[];
 }, TransactionParseInput>;
 resolved_inputs: TableCodec<{
 outputs: DynvecCodec<TableCodec<{
 capacity: FixedSizeCodec<bigint, string | bigint>;
 lock: TableCodec<{
 args: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 code_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 hash_type: FixedSizeCodec<"data" | "type" | "data1" | "data2", "data" | data | type | data1 | data2 | "type" | "data1" | "data2">;
 }>;
 type: OptionCodec<TableCodec<{
 args: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 code_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 hash_type: FixedSizeCodec<"data" | "type" | "data1" | "data2", "data" | data | type | data1 | data2 | "type" | "data1" | "data2">;
 }>>;
 }>>;
 outputs_data: DynvecCodec<DynamicSizeCodec<Uint8Array, string | Uint8Array>>;
 }>;
 script_infos: DynvecCodec<TableCodec<{
 message_type: DynamicSizeCodec<string, string>;
 name: DynamicSizeCodec<string, string>;
 schema: DynamicSizeCodec<string, string>;
 script_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 url: DynamicSizeCodec<string, string>;
 }>>;
 }>;
 }>
- Parameters- buildingPacket: WritableDraft<{ 
 type: "BuildingPacketV1";
 value: InferShape<{
 change_output: OptionCodec<FixedSizeCodec<number, string | number>>;
 lock_actions: DynvecCodec<TableCodec<{
 data: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 script_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 script_info_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>>;
 message: TableCodec<{
 actions: DynvecCodec<TableCodec<{
 data: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 script_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 script_info_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>>;
 }>;
 payload: DynamicSizeCodec<{
 cell_deps: InferShape<{
 dep_type: FixedSizeCodec<"code" | "dep_group", code | dep_group | "code" | "dep_group">;
 out_point: StructCodec<{
 index: FixedSizeCodec<number, string | number>;
 tx_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>;
 }>[];
 hash: Uint8Array;
 header_deps: Uint8Array[];
 inputs: InferShape<{
 previous_output: StructCodec<{
 index: FixedSizeCodec<number, string | number>;
 tx_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>;
 since: FixedSizeCodec<bigint, string | bigint>;
 }>[];
 outputs: InferShape<{
 capacity: FixedSizeCodec<bigint, string | bigint>;
 lock: TableCodec<{
 args: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 code_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 hash_type: FixedSizeCodec<"data" | "type" | "data1" | "data2", "data" | data | type | data1 | data2 | "type" | "data1" | "data2">;
 }>;
 type: OptionCodec<TableCodec<{
 args: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 code_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 hash_type: FixedSizeCodec<"data" | "type" | "data1" | "data2", "data" | data | type | data1 | data2 | "type" | "data1" | "data2">;
 }>>;
 }>[];
 outputs_data: Uint8Array[];
 version: number;
 witnesses: Uint8Array[];
 }, TransactionParseInput>;
 resolved_inputs: TableCodec<{
 outputs: DynvecCodec<TableCodec<{
 capacity: FixedSizeCodec<bigint, string | bigint>;
 lock: TableCodec<{
 args: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 code_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 hash_type: FixedSizeCodec<"data" | "type" | "data1" | "data2", "data" | data | type | data1 | data2 | "type" | "data1" | "data2">;
 }>;
 type: OptionCodec<TableCodec<{
 args: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 code_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 hash_type: FixedSizeCodec<"data" | "type" | "data1" | "data2", "data" | data | type | data1 | data2 | "type" | "data1" | "data2">;
 }>>;
 }>>;
 outputs_data: DynvecCodec<DynamicSizeCodec<Uint8Array, string | Uint8Array>>;
 }>;
 script_infos: DynvecCodec<TableCodec<{
 message_type: DynamicSizeCodec<string, string>;
 name: DynamicSizeCodec<string, string>;
 schema: DynamicSizeCodec<string, string>;
 script_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 url: DynamicSizeCodec<string, string>;
 }>>;
 }>;
 }>
- index: number
- update: ((args) => undefined | { 
 type: "SighashAll";
 value: InferShape<{
 message: TableCodec<{
 actions: DynvecCodec<TableCodec<{
 data: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 script_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 script_info_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>>;
 }>;
 seal: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 }>;
 } | {
 type: "SighashAllOnly";
 value: InferShape<{
 seal: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 }>;
 } | {
 type: "OtxStart";
 value: InferShape<{}>;
 } | {
 type: "Otx";
 value: InferShape<{}>;
 })
- (args): undefined | { 
 type: "SighashAll";
 value: InferShape<{
 message: TableCodec<{
 actions: DynvecCodec<TableCodec<{
 data: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 script_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 script_info_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>>;
 }>;
 seal: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 }>;
 } | {
 type: "SighashAllOnly";
 value: InferShape<{
 seal: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 }>;
 } | {
 type: "OtxStart";
 value: InferShape<{}>;
 } | {
 type: "Otx";
 value: InferShape<{}>;
 }
- Returns undefined | { 
 type: "SighashAll";
 value: InferShape<{
 message: TableCodec<{
 actions: DynvecCodec<TableCodec<{
 data: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 script_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 script_info_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>>;
 }>;
 seal: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 }>;
 } | {
 type: "SighashAllOnly";
 value: InferShape<{
 seal: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 }>;
 } | {
 type: "OtxStart";
 value: InferShape<{}>;
 } | {
 type: "Otx";
 value: InferShape<{}>;
 }
 
 
 
- Returns WritableDraft<{ 
 type: "BuildingPacketV1";
 value: InferShape<{
 change_output: OptionCodec<FixedSizeCodec<number, string | number>>;
 lock_actions: DynvecCodec<TableCodec<{
 data: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 script_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 script_info_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>>;
 message: TableCodec<{
 actions: DynvecCodec<TableCodec<{
 data: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 script_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 script_info_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>>;
 }>;
 payload: DynamicSizeCodec<{
 cell_deps: InferShape<{
 dep_type: FixedSizeCodec<"code" | "dep_group", code | dep_group | "code" | "dep_group">;
 out_point: StructCodec<{
 index: FixedSizeCodec<number, string | number>;
 tx_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>;
 }>[];
 hash: Uint8Array;
 header_deps: Uint8Array[];
 inputs: InferShape<{
 previous_output: StructCodec<{
 index: FixedSizeCodec<number, string | number>;
 tx_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 }>;
 since: FixedSizeCodec<bigint, string | bigint>;
 }>[];
 outputs: InferShape<{
 capacity: FixedSizeCodec<bigint, string | bigint>;
 lock: TableCodec<{
 args: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 code_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 hash_type: FixedSizeCodec<"data" | "type" | "data1" | "data2", "data" | data | type | data1 | data2 | "type" | "data1" | "data2">;
 }>;
 type: OptionCodec<TableCodec<{
 args: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 code_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 hash_type: FixedSizeCodec<"data" | "type" | "data1" | "data2", "data" | data | type | data1 | data2 | "type" | "data1" | "data2">;
 }>>;
 }>[];
 outputs_data: Uint8Array[];
 version: number;
 witnesses: Uint8Array[];
 }, TransactionParseInput>;
 resolved_inputs: TableCodec<{
 outputs: DynvecCodec<TableCodec<{
 capacity: FixedSizeCodec<bigint, string | bigint>;
 lock: TableCodec<{
 args: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 code_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 hash_type: FixedSizeCodec<"data" | "type" | "data1" | "data2", "data" | data | type | data1 | data2 | "type" | "data1" | "data2">;
 }>;
 type: OptionCodec<TableCodec<{
 args: DynamicSizeCodec<Uint8Array, string | Uint8Array>;
 code_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 hash_type: FixedSizeCodec<"data" | "type" | "data1" | "data2", "data" | data | type | data1 | data2 | "type" | "data1" | "data2">;
 }>>;
 }>>;
 outputs_data: DynvecCodec<DynamicSizeCodec<Uint8Array, string | Uint8Array>>;
 }>;
 script_infos: DynvecCodec<TableCodec<{
 message_type: DynamicSizeCodec<string, string>;
 name: DynamicSizeCodec<string, string>;
 schema: DynamicSizeCodec<string, string>;
 script_hash: FixedSizeCodec<Uint8Array, string | Uint8Array>;
 url: DynamicSizeCodec<string, string>;
 }>>;
 }>;
 }>
Update the witness as a WitnessLayout.
Empty witness is considered as a default SighashAll.