Key UpdateSEALED
●╲█▓~@^▓◇■#~○╳▓╱@╱@▪╱●?!╱@○&▪▫○█▒!▫◇~#╲■▪~█!░╱▫?◇▫▒&?█▓■◇▓◆▒*○▪■
Transaction ID
Execution Fee
0.00078 FLOWTransaction Summary
Key UpdateUpdated account key
Script Arguments
0publicKeys[String]
[ "6b7e1a93ee29bc93e9f5466fd40c696233274c9b929e2cbabe966ec4d014ab5455275b8dafa6f2347399b6097c0cb63a0291355c4cec26627088db4923f068b8" ]
1revokeKeyIndexs[Int]
[ "0", "1", "2" ]
Cadence Script
1// Flow Wallet - mainnet Script - addAndRevokeKeys - React Native - 3.1.0
2// Platform: ios - 3.1.0 - 471
3
4import Crypto
5
6transaction(publicKeys: [String], revokeKeyIndexs: [Int]) {
7 prepare(signer: auth(Keys) &Account) {
8
9 for publicKey in publicKeys {
10 let signatureAlgorithm = SignatureAlgorithm.ECDSA_secp256k1
11 let hashAlgorithm = HashAlgorithm.SHA2_256
12 let weight = 1000.0
13
14 let key = PublicKey(
15 publicKey: publicKey.decodeHex(),
16 signatureAlgorithm: signatureAlgorithm
17 )
18
19 signer.keys.add(
20 publicKey: key,
21 hashAlgorithm: hashAlgorithm,
22 weight: weight
23 )
24 }
25
26 for revokeKeyIndex in revokeKeyIndexs {
27 signer.keys.revoke(keyIndex: revokeKeyIndex)
28 }
29 }
30}