Variables
Const AGGRON4
AGGRON4: { PREFIX: string; SCRIPTS: S } = createConfig({PREFIX: "ckt",SCRIPTS: {SECP256K1_BLAKE160: {CODE_HASH:"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",HASH_TYPE: "type",TX_HASH:"0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37",INDEX: "0x0",DEP_TYPE: "depGroup",SHORT_ID: 0,},SECP256K1_BLAKE160_MULTISIG: {CODE_HASH:"0x5c5069eb0857efc65e1bca0c07df34c31663b3622fd3876c876320fc9634e2a8",HASH_TYPE: "type",TX_HASH:"0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37",INDEX: "0x1",DEP_TYPE: "depGroup",SHORT_ID: 1,},DAO: {CODE_HASH:"0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e",HASH_TYPE: "type",TX_HASH:"0x8f8c79eb6671709633fe6a46de93c0fedc9c1b8a6527a18d3983879542635c9f",INDEX: "0x2",DEP_TYPE: "code",},SUDT: {CODE_HASH:"0xc5e5dcf215925f7ef4dfaf5f4b4f105bc321c02776d6e7d52a1db3fcd9d011a4",HASH_TYPE: "type",TX_HASH:"0xe12877ebd2c3c364dc46c5c992bcfaf4fee33fa13eebdf82c591fc9825aab769",INDEX: "0x0",DEP_TYPE: "code",},ANYONE_CAN_PAY: {CODE_HASH:"0x3419a1c09eb2567f6552ee7a8ecffd64155cffe0f1796e6e61ec088d740c1356",HASH_TYPE: "type",TX_HASH:"0xec26b0f85ed839ece5f11c4c4e837ec359f5adc4420410f6453b1f6b60fb96a6",INDEX: "0x0",DEP_TYPE: "depGroup",SHORT_ID: 2,},},})
Type declaration
-
PREFIX: string
-
SCRIPTS: S
Const LINA
LINA: { PREFIX: string; SCRIPTS: S } = createConfig({PREFIX: "ckb",SCRIPTS: {SECP256K1_BLAKE160: {CODE_HASH:"0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",HASH_TYPE: "type",TX_HASH:"0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c",INDEX: "0x0",DEP_TYPE: "depGroup",SHORT_ID: 0,},SECP256K1_BLAKE160_MULTISIG: {CODE_HASH:"0x5c5069eb0857efc65e1bca0c07df34c31663b3622fd3876c876320fc9634e2a8",HASH_TYPE: "type",TX_HASH:"0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c",INDEX: "0x1",DEP_TYPE: "depGroup",SHORT_ID: 1,},DAO: {CODE_HASH:"0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e",HASH_TYPE: "type",TX_HASH:"0xe2fb199810d49a4d8beec56718ba2593b665db9d52299a0f9e6e75416d73ff5c",INDEX: "0x2",DEP_TYPE: "code",},SUDT: {CODE_HASH:"0x5e7a36a77e68eecc013dfa2fe6a23f3b6c344b04005808694ae6dd45eea4cfd5",HASH_TYPE: "type",TX_HASH:"0xc7813f6a415144643970c2e88e0bb6ca6a8edc5dd7c1022746f628284a9936d5",INDEX: "0x0",DEP_TYPE: "code",},ANYONE_CAN_PAY: {CODE_HASH:"0xd369597ff47f29fbc0d47d2e3775370d1250b85140c670e4718af712983a2354",HASH_TYPE: "type",TX_HASH:"0x4153a2014952d7cac45f285ce9a7c5c0c0e1b21f2d378b82ac1433cb11c25c4d",INDEX: "0x0",DEP_TYPE: "depGroup",SHORT_ID: 2,},},})
Type declaration
-
PREFIX: string
-
SCRIPTS: S
Let config
config
: Config = predefined.LINA
Const predefined
predefined: { AGGRON4: { PREFIX: string; SCRIPTS: { ANYONE_CAN_PAY: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; DAO: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string }; SECP256K1_BLAKE160: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; SECP256K1_BLAKE160_MULTISIG: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; SUDT: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string } } }; LINA: { PREFIX: string; SCRIPTS: { ANYONE_CAN_PAY: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; DAO: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string }; SECP256K1_BLAKE160: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; SECP256K1_BLAKE160_MULTISIG: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; SUDT: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string } } } }
Type declaration
-
AGGRON4: { PREFIX: string; SCRIPTS: { ANYONE_CAN_PAY: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; DAO: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string }; SECP256K1_BLAKE160: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; SECP256K1_BLAKE160_MULTISIG: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; SUDT: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string } } }
-
PREFIX: string
-
SCRIPTS: { ANYONE_CAN_PAY: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; DAO: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string }; SECP256K1_BLAKE160: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; SECP256K1_BLAKE160_MULTISIG: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; SUDT: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string } }
-
ANYONE_CAN_PAY: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }
-
CODE_HASH: string
-
DEP_TYPE: "depGroup"
-
HASH_TYPE: "type"
-
INDEX: string
-
SHORT_ID: number
-
TX_HASH: string
-
DAO: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string }
-
CODE_HASH: string
-
DEP_TYPE: "code"
-
HASH_TYPE: "type"
-
INDEX: string
-
TX_HASH: string
-
SECP256K1_BLAKE160: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }
-
CODE_HASH: string
-
DEP_TYPE: "depGroup"
-
HASH_TYPE: "type"
-
INDEX: string
-
SHORT_ID: number
-
TX_HASH: string
-
SECP256K1_BLAKE160_MULTISIG: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }
-
CODE_HASH: string
-
DEP_TYPE: "depGroup"
-
HASH_TYPE: "type"
-
INDEX: string
-
SHORT_ID: number
-
TX_HASH: string
-
SUDT: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string }
-
CODE_HASH: string
-
DEP_TYPE: "code"
-
HASH_TYPE: "type"
-
INDEX: string
-
TX_HASH: string
-
LINA: { PREFIX: string; SCRIPTS: { ANYONE_CAN_PAY: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; DAO: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string }; SECP256K1_BLAKE160: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; SECP256K1_BLAKE160_MULTISIG: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; SUDT: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string } } }
-
PREFIX: string
-
SCRIPTS: { ANYONE_CAN_PAY: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; DAO: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string }; SECP256K1_BLAKE160: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; SECP256K1_BLAKE160_MULTISIG: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }; SUDT: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string } }
-
ANYONE_CAN_PAY: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }
-
CODE_HASH: string
-
DEP_TYPE: "depGroup"
-
HASH_TYPE: "type"
-
INDEX: string
-
SHORT_ID: number
-
TX_HASH: string
-
DAO: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string }
-
CODE_HASH: string
-
DEP_TYPE: "code"
-
HASH_TYPE: "type"
-
INDEX: string
-
TX_HASH: string
-
SECP256K1_BLAKE160: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }
-
CODE_HASH: string
-
DEP_TYPE: "depGroup"
-
HASH_TYPE: "type"
-
INDEX: string
-
SHORT_ID: number
-
TX_HASH: string
-
SECP256K1_BLAKE160_MULTISIG: { CODE_HASH: string; DEP_TYPE: "depGroup"; HASH_TYPE: "type"; INDEX: string; SHORT_ID: number; TX_HASH: string }
-
CODE_HASH: string
-
DEP_TYPE: "depGroup"
-
HASH_TYPE: "type"
-
INDEX: string
-
SHORT_ID: number
-
TX_HASH: string
-
SUDT: { CODE_HASH: string; DEP_TYPE: "code"; HASH_TYPE: "type"; INDEX: string; TX_HASH: string }
-
CODE_HASH: string
-
DEP_TYPE: "code"
-
HASH_TYPE: "type"
-
INDEX: string
-
TX_HASH: string
@ckb-lumos/config-manager
Example
import { initializeConfig, predefined } from '@ckb-lumos/config'; import { generateAddress } from '@ckb-lumos/helper' initializeConfig(predefined.AGGRON); generateAddress({...}) // ckt1... initializeConfig(predefined.LINA); generateAddress({...}) // ckb1...