本文へ移動
    hazBasehazBaseDocs
    HTTP API / WALLET CLIENT

    submitOwnerOperation

    @hazbase/kit/walletが呼び出すHTTP APIのパス・引数・レスポンスを確認できます。認証・パスキーなどの追加APIは、認証SDKのリファレンスと実装ガイドで扱います。

    https://api.hazbase.com@hazbase/kit 0.9.0JSON

    APIごとに、利用者セッション・署名・操作権限の要件が異なります。以下の仕様と、利用するAPI環境の接続条件を確認してください。 APIの利用方法を確認

    POST /api/wallet/operation/submit

    リクエスト

    @hazbase/kit/wallet
    submitOwnerOperation(input: SubmitOwnerOperationInput): Promise<SubmitOwnerOperationResult>
    emailSessionをAuthorization: Bearerヘッダーに設定します。

    deviceBindingIdとhighTrustTokenによる操作承認が必要です。

    項目必須送信先
    chainIdnumber必須JSON body
    accountstring必須JSON body
    policyKeystring必須JSON body
    callsOwnerOperationCall[]必須JSON body
    grantTokenstring必須JSON body
    metadataRecord<string, unknown>任意JSON body
    endpointstring任意SDKの接続パス上書き
    emailSessionstring必須Authorization header
    deviceBindingIdstring必須JSON body
    highTrustTokenstring必須JSON body
    accountSaltstring任意JSON body
    paymasterValiditySecstring任意JSON body
    waitForReceiptboolean任意JSON body

    POSTではContent-Type: application/jsonとx-request-idを付与します。x-request-idは処理の追跡用で、API全体の冪等性を保証するものではありません。

    レスポンス

    typescript
    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を記録し、機能固有のエラーとネットワーク障害を区別してください。秘密情報をログに出さないようにしてください。

    エラーとトラブル対応
    実装ソースを確認