UNPKG

@bnb-chain/greenfield-js-sdk

Version:
28 lines (27 loc) 1.91 kB
import { AuthType, ReqMeta } from '@/types/auth'; import { Headers } from 'cross-fetch'; export declare const getCanonicalHeaders: (reqMeta: Partial<ReqMeta>, reqHeaders: Headers) => string; export declare const getCanonicalRequest: (reqMeta: Partial<ReqMeta>, reqHeaders: Headers) => string; export declare const getAuthorization: (canonicalRequest: string, authType: AuthType) => string; export declare const newRequestHeadersByMeta: (meta: Partial<ReqMeta>) => Headers; export declare const HTTPHeaderAuthorization = "Authorization"; export declare const HTTPHeaderContentSHA256 = "X-Gnfd-Content-Sha256"; export declare const HTTPHeaderTransactionHash = "X-Gnfd-Txn-Hash"; export declare const HTTPHeaderObjectID = "X-Gnfd-Object-ID"; export declare const HTTPHeaderRedundancyIndex = "X-Gnfd-Redundancy-Index"; export declare const HTTPHeaderResource = "X-Gnfd-Resource"; export declare const HTTPHeaderDate = "X-Gnfd-Date"; export declare const HTTPHeaderExpiryTimestamp = "X-Gnfd-Expiry-Timestamp"; export declare const HTTPHeaderRange = "Range"; export declare const HTTPHeaderPieceIndex = "X-Gnfd-Piece-Index"; export declare const HTTPHeaderContentType = "Content-Type"; export declare const HTTPHeaderContentMD5 = "Content-MD5"; export declare const HTTPHeaderUnsignedMsg = "X-Gnfd-Unsigned-Msg"; export declare const HTTPHeaderUserAddress = "X-Gnfd-User-Address"; export declare const HTTPHeaderAppDomain = "X-Gnfd-App-Domain"; export declare const HTTPHeaderRegPubKey = "X-Gnfd-App-Reg-Public-Key"; export declare const secpSign: (digestBz: Uint8Array, privateKey: string) => string; export declare const getMsgToSign: (unsignedBytes: Uint8Array) => Uint8Array; export declare const encodePath: (pathName: string) => string; export declare const getSortQuery: (queryMap: Record<string, string>) => string; export declare const getSortQueryParams: (url: URL, queryMap: Record<string, string>) => URL;