-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add join_identity_as_key (#11)
Description To accept a request to be added as secondary to an existing and verified account on polymesh the secondary account needs to submit the extrinsic join_identity_as_key. Implementation Details: - Add identity pallet - Add function join_identity_as_key to identity pallet - Add `IDENTITY_PALLET_IDX` to `SubstrateNetwork` trait, default = 7 - Add `IDENTITY_JOIN_AS_KEY` to `SubstrateNetwork` trait, default = 5
- Loading branch information
1 parent
fb0f816
commit e1cd764
Showing
3 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use crate::client::{Api, Result, Signer}; | ||
use crate::network::SubstrateNetwork; | ||
use crate::pallets::CallIndex; | ||
use crate::rpc::RpcClient; | ||
use crate::UncheckedExtrinsic; | ||
|
||
pub type ComposedJoinIdentity = (CallIndex, u64); | ||
|
||
impl<S: Signer, Client: RpcClient, N: SubstrateNetwork> Api<'_, S, Client, N> { | ||
pub fn join_identity_as_key( | ||
&self, | ||
auth_id: u64, | ||
nonce: Option<u32>, | ||
) -> Result<UncheckedExtrinsic<ComposedJoinIdentity>> { | ||
let call = ([N::IDENTITY_PALLET_IDX, N::IDENTITY_JOIN_AS_KEY], auth_id); | ||
self._create_xt(call, nonce) | ||
} | ||
} |