토큰 분류법 프레임워크의 향상된 기능
향상된 버전의 Blockchain App Builder에는 확장된 토큰 분류법 프레임워크 표준과 관련된 새로운 기능이 포함되어 있습니다.
일일 트랜잭션 한도
계정에서 매일 완료할 수 있는 트랜잭션 수와 작업할 수 있는 토큰 수를 제한할 수 있습니다. createAccount
메소드에 대한 max_daily_amount
및 max_daily_transactions
입력 매개변수는 이 동작을 제어합니다. 이러한 매개변수는 선택사항입니다.
계정에 대한 일별 트랜잭션 제한을 설정하지 않으면 처리량이 더 높아질 수 있습니다.
-
createAccount (TypeScript)
@Validator(yup.string(), yup.string(), yup.string(), yup.object().nullable()) public async createAccount(org_id: string, user_id: string, token_type: string, daily_limits: DailyLimits) { await this.Ctx.Auth.checkAuthorization("ACCOUNT.createAccount", "TOKEN", { org_id }); return await this.Ctx.Account.createAccount(org_id, user_id, token_type, daily_limits); }
-
CreateAccount (Go)
func (t *Controller) CreateAccount(org_id string, user_id string, token_type string, daily_limits ...account.AccountDailyLimits) (interface{}, error) { auth, err := t.Ctx.Auth.CheckAuthorization("Account.CreateAccount", "TOKEN", map[string]string{"org_id": org_id}) if err != nil && !auth { return nil, fmt.Errorf("error in authorizing the caller %s", err.Error()) } return t.Ctx.Account.CreateAccount(org_id, user_id, token_type, daily_limits...) }
조폐 및 연소에 대한 승인 요구 사항
조폐 및 연소 토큰에 대한 승인을 설정할 수 있으므로 채광자 또는 버너 역할을 가진 사용자가 토큰을 직접 연소하거나 연소하는 대신 승인자에게 요청을 제출해야 합니다. 승인자는 민트 또는 레코딩 토큰에 대한 요청을 수락하거나 거부할 수 있습니다. 민트 및 레코딩에 대한 승인을 사용으로 설정하려면 mint_approval_required
및 burn_approval_required
매개변수를 사용합니다. 다음 예와 같이 mint_approver_role_name
및 burn_approval_role_name
에 대한 값도 지정해야 합니다.
behavior: # Token behaviors
- divisible:
decimal: 2
- mintable:
max_mint_quantity: 1000
mint_approval_required: true
- transferable
- burnable
burn_approval_required: true
- holdable
- roles:
minter_role_name: minter
notary_role_name: notary
mint_approver_role_name: minter_notary
burn_approver_role_name: burner_notary
다음 방법은 민트 및 레코딩 토큰에 대한 승인 요청, 수락 및 거부를 지원합니다.TypeScript 조폐 및 연소 승인 방법
-
requestMint
- 이 메서드는 지정된 양의 토큰을 만들기 위해 minter 공증인에게 요청을 보내기 위해 minter에 의해 호출될 수 있습니다.
-
approveMint
- 이 메서드는 민팅 요청을 승인하기 위해 minter 공증에 의해 호출될 수 있습니다.
-
rejectMint
- 이 메서드는 민팅 요청을 거부하기 위해 minter 공증에 의해 호출될 수 있습니다.
-
requestBurn
- 이 방법은 버너가 지정된 양의 토큰을 파괴하기 위해 버너 공증인에게 요청을 보내기 위해 호출 할 수 있습니다.
-
approveBurn
- 이 방법은 버너 공증인이 불타는 요청을 승인하기 위해 호출 할 수 있습니다.
-
rejectBurn
- 이 방법은 불타는 요청을 거부하기 위해 버너 공증인이 호출 할 수 있습니다.
연마 및 연소 승인에 대한 이동 방법
-
RequestMint
- 이 메서드는 지정된 양의 토큰을 만들기 위해 minter 공증인에게 요청을 보내기 위해 minter에 의해 호출될 수 있습니다.
-
ApproveMint
- 이 메서드는 민팅 요청을 승인하기 위해 minter 공증에 의해 호출될 수 있습니다.
-
RejectMint
- 이 메서드는 민팅 요청을 거부하기 위해 minter 공증에 의해 호출될 수 있습니다.
-
RequestBurn
- 이 방법은 버너가 지정된 양의 토큰을 파괴하기 위해 버너 공증인에게 요청을 보내기 위해 호출 할 수 있습니다.
-
ApproveBurn
- 이 방법은 버너 공증인이 불타는 요청을 승인하기 위해 호출 할 수 있습니다.
-
RejectBurn
- 이 방법은 불타는 요청을 거부하기 위해 버너 공증인이 호출 할 수 있습니다.
서식 있는 내역 데이터베이스에서 트랜잭션 내역 인출
데이터를 리치 내역 데이터베이스와 동기화한 다음 체인코드 API 호출을 사용하여 데이터를 인출할 수 있습니다. TypeScript 및 [실행]에 표시된 다음 메소드는 리치 내역 데이터베이스에서 트랜잭션 내역을 인출합니다. 이러한 방법을 사용하려면 Oracle Database View Definitions for Wholesale CBDC에 설명된 대로 ORDS(Oracle REST Data Services) 및 OAuth가 활성화된 상태로 Oracle Autonomous Database를 실행해야 합니다.-
getAccountTransactionHistoryWithFiltersFromRichHistDB (TypeScript)
@GetMethod() @Validator(yup.string(), yup.string(), yup.string(), yup.string(), yup.string(), yup.object().nullable()) public async getAccountTransactionHistoryWithFiltersFromRichHistDB(token_id: string, org_id: string, user_id: string, custom_endpoint: string, bearer_token: string, filters?: Filters) { const account_id = await this.Ctx.Account.generateAccountId(token_id, org_id, user_id); await this.Ctx.Auth.checkAuthorization("ACCOUNT.getAccountTransactionHistoryWithFilters", "TOKEN", { account_id }); return await this.Ctx.Account.getAccountTrxHistoryWithFiltersFromRichHistDB(account_id, org_id, user_id.toLowerCase(), custom_endpoint, bearer_token, filters); }
-
GetAccountTransactionHistoryWithFiltersFromRichHistDB (Go)
func (t *Controller) GetAccountTransactionHistoryWithFiltersFromRichHistDB(token_id string, org_id string, user_id string, custom_endPoint string, bearer_token string, filters ...account.AccountHistoryFilters) (interface{}, error) { account_id, err := t.Ctx.Account.GenerateAccountId(token_id, org_id, user_id) if err != nil { return nil, err } auth, err := t.Ctx.Auth.CheckAuthorization("Account.GetAccountTransactionHistoryWithFilters", "TOKEN", map[string]string{"account_id": account_id}) if err != nil && !auth { return nil, fmt.Errorf("error in authorizing the caller %s", err.Error()) } // sample format of filter: []string{"3", "", "2022-01-16T15:16:36+00:00", "2022-01-17T15:16:36+00:00"} transactionArray, err := t.Ctx.Account.GetAccountTransactionHistoryWithFiltersFromRichHistDB(account_id, org_id, user_id, custom_endPoint, bearer_token, filters...) return transactionArray, err }
트랜잭션 객체의 범주 및 설명 속성
- 범주 및 설명 속성은 컨트롤러 파일의
transferTokens
,holdTokens
,issueTokens
,requestMint
,requestBurn
,burnTokens
및rejectBurn
메소드에 포함되어야 합니다. 해당 SDK 메소드에는 범주 및 설명 속성도 포함되어야 합니다. - 범주 및 설명 속성 입력은 다음 예제에 표시된 것처럼
info_details
라는 JSON 객체 형식입니다.{ "category" : "category input", "description" : "description input" }
info_details
필드는 선택적 필드입니다. 필요에 따라 범주만 전달하거나 설명만 전달할 수 있습니다.transferTokens
,holdTokens
,executeHold
,releaseHold
,requestMint
,approveMint
,rejectMint
,requestBurn
,approveBurn
및rejectBurn
에 대한 모든 트랜잭션과 관련된 GET 메소드는 페이로드 응답에 범주 및 설명 속성을 포함해야 합니다(있는 경우).- 범주 필드는 20자로 제한되며 설명 필드는 250자로 제한됩니다.
TypeScript 입력이 수정된 메소드
다음 방법은 향상된 버전의 Blockchain App Builder를 사용할 때 선택적 범주 및 설명 속성을 지원합니다.
수정된 입력이 있는 이동 메소드
다음 방법은 향상된 버전의 Blockchain App Builder를 사용할 때 선택적 범주 및 설명 속성을 지원합니다.
수정된 출력이 있는 TypeScript 메소드
다음 방법은 향상된 버전의 Blockchain App Builder를 사용할 때 관련 조직 및 사용자 ID를 반환합니다.