Skip to content

Commit

Permalink
Merge pull request #90 from subquery/update/delegate-types
Browse files Browse the repository at this point in the history
udpate signed delegate types
  • Loading branch information
bz888 authored Dec 12, 2023
2 parents 447d7c5 + a754297 commit 11e35c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/types/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Updated `SignedDelegateAction` types in accordance to near-docs (#90)

## [3.1.1] - 2023-11-30
### Changed
Expand Down
6 changes: 4 additions & 2 deletions packages/types/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,18 @@ export interface DeleteAccount {

export interface SignedDelegate {
delegate_action: DelegateAction;
signature: {signature: Uint8Array; public_key: string};
signature: string;
}

export type NonDelegateAction = Record<Exclude<ActionType, 'SignedDelegate'>, Exclude<Action, SignedDelegate>>;

export interface DelegateAction {
/// Signer of the delegated actions
sender_id: string;
/// Receiver of the delegated actions.
receiver_id: string;
/// List of actions to be executed.
actions: NearAction[];
actions: NonDelegateAction[];
/// Nonce to ensure that the same delegate action is not sent twice by a relayer and should match for given account's `public_key`.
/// After this action is processed it will increment.
nonce: BN;
Expand Down

0 comments on commit 11e35c8

Please sign in to comment.