Skip to content

Add concrete type for legacy transaction signing #3

@h33p

Description

@h33p

https://github.com/nockbox/iris/blob/7a5109949963e132283a5b8347670e83893745d8/extension/background/index.ts#L675

should use guards

You probably want to define a struct for LegacySignRawTxRequest:

Type names not exact:

export interface LegacySignRawTxRequest {
  /** Raw transaction protobuf */
  rawTx: PbCom2RawTransaction;
  /** Input notes (protobuf) */
  notes: PbCom2Note[];
  /** Spend conditions (protobuf) */
  spendConditions: PbCom2SpendCondition[];
}

Define isLegacySignRawTxRequest:

function isLegacySignRawTxRequest(obj: unknown): obj is LegacySignRawTxRequest {
   // ...
} 

Corresponds to part of https://github.com/nockbox/iris/blob/7a5109949963e132283a5b8347670e83893745d8/extension/shared/types.ts#L152

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions