## Index

### Variables

- AUTH_CONTRACT
- contractAddress

### Functions

- makeAssignFuncsToRoleTx
- makeAssignOntIdsToRoleTx
- makeDelegateRoleTx
- makeInitContractAdminTx
- makeTransferAuthTx
- makeVerifyTokenTx
- makeWithdrawRoleTx

## Variables

### Const AUTH_CONTRACT

AUTH_CONTRACT: "0000000000000000000000000000000000000006" = "0000000000000000000000000000000000000006"

- Defined in smartcontract/nativevm/authContractTxBuilder.ts:30

Address of auth contract.

### Const contractAddress

contractAddress: Address = new Address(AUTH_CONTRACT)

- Defined in smartcontract/nativevm/authContractTxBuilder.ts:31

## Functions

### makeAssignFuncsToRoleTx

- makeAssignFuncsToRoleTx(contractAddr: Address, adminOntId: string, role: string, funcNames: string[], keyNo: number, payer: Address, gasPrice: string, gasLimit: string): Transaction

- - Defined in smartcontract/nativevm/authContractTxBuilder.ts:126

  assign functions to role. must be called by contract's admin

  #### Parameters

  - ##### contractAddr: Address

    target contract's address

  - ##### adminOntId: string

    admin's ONT ID.This id must be registered.

  - ##### role: string

    role name

  - ##### funcNames: string[]

    array of function name

  - ##### keyNo: number

    publicKey's id, use the pk to varify tx

  - ##### payer: Address

    Address to pay for the gas.

  - ##### gasPrice: string

    Gas price

  - ##### gasLimit: string

    Gas limit

  #### Returns Transaction

### makeAssignOntIdsToRoleTx

- makeAssignOntIdsToRoleTx(contractAddr: Address, adminOntId: string, role: string, ontIds: string[], keyNo: number, payer: Address, gasPrice: string, gasLimit: string): Transaction

- - Defined in smartcontract/nativevm/authContractTxBuilder.ts:163

  assign role to ONT IDs. must be called by contract's admin

  #### Parameters

  - ##### contractAddr: Address

    target contract's address

  - ##### adminOntId: string

    admin's ONT ID.This id must be registered.

  - ##### role: string

    role's name

  - ##### ontIds: string[]

    array of ONT ID

  - ##### keyNo: number

    admin's pk id.use to varify tx.

  - ##### payer: Address

    Address to pay for the gas.

  - ##### gasPrice: string

    Gas price

  - ##### gasLimit: string

    Gas limit

  #### Returns Transaction

### makeDelegateRoleTx

- makeDelegateRoleTx(contractAddr: Address, from: string, to: string, role: string, period: number, level?: number, keyNo: number, payer: Address, gasPrice: string, gasLimit: string): Transaction

- - Defined in smartcontract/nativevm/authContractTxBuilder.ts:206

  delegate role to others. Can't delegate repeatedly。

  #### Parameters

  - ##### contractAddr: Address

    target contract's address

  - ##### from: string

    ONT ID of user that wants to delegate role.This id must be registered.

  - ##### to: string

    ONT ID of user that will receive role.This id must be registered.

  - ##### role: string

    role name

  - ##### period: number

    time of delegate period in second

  - ##### Default value level: number = 1

    = 1 for now.

  - ##### keyNo: number

    The number of user's publick in the DDO.

  - ##### payer: Address

    Address to pay for the gas.

  - ##### gasPrice: string

    Gas price

  - ##### gasLimit: string

    Gas limit

  #### Returns Transaction

### makeInitContractAdminTx

- makeInitContractAdminTx(adminOntId: string, payer: Address, gasPrice: string, gasLimit: string): Transaction

- - Defined in smartcontract/nativevm/authContractTxBuilder.ts:40

  Creates transaction that initialize the admin of some contract.

  #### Parameters

  - ##### adminOntId: string

    Admin's ONT ID

  - ##### payer: Address

    Address to pay for the gas.

  - ##### gasPrice: string

    Gas price

  - ##### gasLimit: string

    Gas limit

  #### Returns Transaction

### makeTransferAuthTx

- makeTransferAuthTx(contractAddr: Address, newAdminOntid: string, keyNo: number, payer: Address, gasPrice: string, gasLimit: string): Transaction

- - Defined in smartcontract/nativevm/authContractTxBuilder.ts:63

  Transfer the authority to new admin

  #### Parameters

  - ##### contractAddr: Address

    Uer's contract address

  - ##### newAdminOntid: string

    New admin's ONT ID. This id must be registered.

  - ##### keyNo: number

    Original admin's public key id. Use this pk to varify tx.

  - ##### payer: Address

    Address to pay for the gas.

  - ##### gasPrice: string

    Gas price

  - ##### gasLimit: string

    Gas limit

  #### Returns Transaction

### makeVerifyTokenTx

- makeVerifyTokenTx(contractAddr: Address, callerOntId: string, funcName: string, keyNo: number, payer: Address, gasPrice: string, gasLimit: string): Transaction

- - Defined in smartcontract/nativevm/authContractTxBuilder.ts:94

  verify the user's token of target contract

  #### Parameters

  - ##### contractAddr: Address

    user's target contract address

  - ##### callerOntId: string

    caller's ONT ID.This id must be registered.

  - ##### funcName: string

    the function to call

  - ##### keyNo: number

    publicKey's id, use this pk to varify tx

  - ##### payer: Address

    Address to pay for the gas.

  - ##### gasPrice: string

    Gas price

  - ##### gasLimit: string

    Gas limit

  #### Returns Transaction

### makeWithdrawRoleTx

- makeWithdrawRoleTx(contractAddr: Address, initiator: string, delegate: string, role: string, keyNo: number, payer: Address, gasPrice: string, gasLimit: string): Transaction

- - Defined in smartcontract/nativevm/authContractTxBuilder.ts:245

  role's owner can withdraw the delegate in advance

  #### Parameters

  - ##### contractAddr: Address

    target contract's address

  - ##### initiator: string

    ONT ID of role's owner.This id must be registered.

  - ##### delegate: string

    ONT ID of role's agent.This id must be registered.

  - ##### role: string

    role's name

  - ##### keyNo: number

    The number of user's public key in the DDO

  - ##### payer: Address

    Address to pay for the gas.

  - ##### gasPrice: string

    Gas price

  - ##### gasLimit: string

    Gas limit

  #### Returns Transaction

Generated using TypeDoc