TransactionSEALED
○╲■◆&!●^$^█*╱###◆?#▫^◇█~*▒■▒!▫╳▒╳~■&▒?●!▪╲▒▫?▪#░╲■?%█◆□*?█◆@░●%▪
Transaction ID
Transaction Summary
TransactionScript Arguments
0publicKeys[Crypto.KeyListEntry]
[
{
"keyIndex": "1000",
"publicKey": {
"publicKey": [
"28",
"90",
"127",
"104",
"57",
"123",
"161",
"151",
"121",
"180",
"54",
"220",
"222",
"94",
"56",
"32",
"76",
"47",
"188",
"107",
"129",
"218",
"203",
"83",
"245",
"61",
"6",
"67",
"98",
"173",
"92",
"26",
"67",
"32",
"17",
"171",
"89",
"142",
"107",
"139",
"215",
"74",
"210",
"142",
"189",
"77",
"192",
"6",
"25",
"59",
"49",
"59",
"39",
"92",
"193",
"24",
"122",
"20",
"240",
"28",
"126",
"216",
"119",
"36"
],
"signatureAlgorithm": {
"id": "SignatureAlgorithm",
"fields": [
{
"name": "rawValue",
"value": {
"type": "UInt8",
"value": "1"
}
}
]
}
},
"hashAlgorithm": {
"id": "HashAlgorithm",
"fields": [
{
"name": "rawValue",
"value": {
"type": "UInt8",
"value": "3"
}
}
]
},
"weight": "1000.00000000",
"isRevoked": false
}
]1contracts{String
{}Cadence Script
1import Crypto
2
3transaction(publicKeys: [Crypto.KeyListEntry], contracts: {String: String}) {
4 prepare(signer: AuthAccount) {
5 let account = AuthAccount(payer: signer)
6
7 // add all the keys to the account
8 for key in publicKeys {
9 account.keys.add(publicKey: key.publicKey, hashAlgorithm: key.hashAlgorithm, weight: key.weight)
10 }
11
12 // add contracts if provided
13 for contract in contracts.keys {
14 account.contracts.add(name: contract, code: contracts[contract]!.decodeHex())
15 }
16 }
17}