submitOwnerOperation https://docs.hazbase.com/reference/http/submitOwnerOperation/ HTTP API / WALLET CLIENT submitOwnerOperation @hazbase/kit/walletが呼び出すHTTP APIのパス・引数・レスポンスを確認できます。認証・パスキーなどの追加APIは、認証SDKのリファレンスと実装ガイドで扱います。 https://api.hazbase.com @hazbase/kit 0.9.0 JSON APIごとに、利用者セッション・署名・操作権限の要件が異なります。以下の仕様と、利用するAPI環境の接続条件を確認してください。 APIの利用方法を確認 ← HTTP API一覧 POST /api/wallet/operation/submit リクエスト @hazbase/kit/wallet submitOwnerOperation ( input : SubmitOwnerOperationInput ) : Promise < SubmitOwnerOperationResult > emailSessionをAuthorization: Bearerヘッダーに設定します。 deviceBindingIdとhighTrustTokenによる操作承認が必要です。 項目 型 必須 送信先 chainId number 必須 JSON body account string 必須 JSON body policyKey string 必須 JSON body calls OwnerOperationCall[] 必須 JSON body grantToken string 必須 JSON body metadata Record 任意 JSON body endpoint string 任意 SDKの接続パス上書き emailSession string 必須 Authorization header deviceBindingId string 必須 JSON body highTrustToken string 必須 JSON body accountSalt string 任意 JSON body paymasterValiditySec string 任意 JSON body waitForReceipt boolean 任意 JSON body POSTではContent-Type: application/jsonとx-request-idを付与します。x-request-idは処理の追跡用で、API全体の冪等性を保証するものではありません。 レスポンス typescript 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 export type SubmitOwnerOperationResult = { chainId : number ; operation : PrepareOwnerOperationResult [ 'operation' ] ; policy : PrepareOwnerOperationResult [ 'policy' ] ; relayMode ? : string ; bundlerRpcUrl ? : string | null ; entryPointAddress ? : string ; smartAccountAddress : string ; nonce : string ; initCode : string ; localUserOpHash ? : string | null ; submittedUserOpHash ? : string | null ; transactionHash ? : string | null ; gasEstimate ? : Record < string , unknown > ; receipt ? : Record < string , unknown > | null ; metadata ? : Record < string , unknown > ; status ? : string ; } ; ネストした型はSDKリファレンスで確認できます。SDKはトップレベルの応答と、dataで包まれた応答を処理します。 SubmitOwnerOperationResult 失敗時の確認 非2xxの応答はHazbaseWalletApiErrorとして扱われます。status、code、messageを記録し、機能固有のエラーとネットワーク障害を区別してください。秘密情報をログに出さないようにしてください。 エラーとトラブル対応 実装ソースを確認