@kontor/kontor-sdk 1.0.0-alpha.15 → 1.0.0-alpha.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/exports/index.js +17 -1
- package/dist/cjs/exports/index.js.map +1 -1
- package/dist/cjs/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/exports/index.js +8 -0
- package/dist/esm/exports/index.js.map +1 -1
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/exports/index.d.ts +8 -0
- package/dist/types/exports/index.d.ts.map +1 -1
- package/package.json +2 -6
- package/src/exports/index.ts +44 -0
- package/dist/src/exports/index.js +0 -11
- package/dist/src/exports/index.js.map +0 -1
- package/dist/src/exports/index.test.js +0 -10
- package/dist/src/exports/index.test.js.map +0 -1
- package/dist/src/sdk/accounts/hd-key-to-account.js +0 -20
- package/dist/src/sdk/accounts/hd-key-to-account.js.map +0 -1
- package/dist/src/sdk/accounts/mnemonic-to-account.js +0 -16
- package/dist/src/sdk/accounts/mnemonic-to-account.js.map +0 -1
- package/dist/src/sdk/accounts/mnemonic-to-account.test.js +0 -96
- package/dist/src/sdk/accounts/mnemonic-to-account.test.js.map +0 -1
- package/dist/src/sdk/accounts/private-key-to-account.js +0 -42
- package/dist/src/sdk/accounts/private-key-to-account.js.map +0 -1
- package/dist/src/sdk/accounts/to-local-account.js +0 -28
- package/dist/src/sdk/accounts/to-local-account.js.map +0 -1
- package/dist/src/sdk/accounts/types.js +0 -2
- package/dist/src/sdk/accounts/types.js.map +0 -1
- package/dist/src/sdk/accounts/utils/parse-account.js +0 -10
- package/dist/src/sdk/accounts/utils/parse-account.js.map +0 -1
- package/dist/src/sdk/accounts/utils/public-key-to-p2tr-payment.js +0 -14
- package/dist/src/sdk/accounts/utils/public-key-to-p2tr-payment.js.map +0 -1
- package/dist/src/sdk/accounts/utils/sign-psbt.js +0 -17
- package/dist/src/sdk/accounts/utils/sign-psbt.js.map +0 -1
- package/dist/src/sdk/actions/get-contract.js +0 -50
- package/dist/src/sdk/actions/get-contract.js.map +0 -1
- package/dist/src/sdk/actions/get-contract.test-d.js +0 -43
- package/dist/src/sdk/actions/get-contract.test-d.js.map +0 -1
- package/dist/src/sdk/actions/kontor/public/build-compose-query.js +0 -30
- package/dist/src/sdk/actions/kontor/public/build-compose-query.js.map +0 -1
- package/dist/src/sdk/actions/kontor/public/build-instruction-query.js +0 -45
- package/dist/src/sdk/actions/kontor/public/build-instruction-query.js.map +0 -1
- package/dist/src/sdk/actions/kontor/public/call-compose.js +0 -38
- package/dist/src/sdk/actions/kontor/public/call-compose.js.map +0 -1
- package/dist/src/sdk/actions/kontor/public/call-view.js +0 -21
- package/dist/src/sdk/actions/kontor/public/call-view.js.map +0 -1
- package/dist/src/sdk/actions/kontor/public/inspect.js +0 -20
- package/dist/src/sdk/actions/kontor/public/inspect.js.map +0 -1
- package/dist/src/sdk/actions/kontor/public/proc-contract.js +0 -54
- package/dist/src/sdk/actions/kontor/public/proc-contract.js.map +0 -1
- package/dist/src/sdk/actions/kontor/public/proc-contract.test.js +0 -47
- package/dist/src/sdk/actions/kontor/public/proc-contract.test.js.map +0 -1
- package/dist/src/sdk/actions/kontor/public/view-contract.js +0 -43
- package/dist/src/sdk/actions/kontor/public/view-contract.js.map +0 -1
- package/dist/src/sdk/actions/kontor/public/view-contract.test-d.js +0 -43
- package/dist/src/sdk/actions/kontor/public/view-contract.test-d.js.map +0 -1
- package/dist/src/sdk/actions/kontor/wallet/sign-commit.js +0 -34
- package/dist/src/sdk/actions/kontor/wallet/sign-commit.js.map +0 -1
- package/dist/src/sdk/actions/kontor/wallet/sign-reveal.js +0 -88
- package/dist/src/sdk/actions/kontor/wallet/sign-reveal.js.map +0 -1
- package/dist/src/sdk/actions/public/send-raw-transaction.js +0 -7
- package/dist/src/sdk/actions/public/send-raw-transaction.js.map +0 -1
- package/dist/src/sdk/actions/public/test-mempool-accept.js +0 -20
- package/dist/src/sdk/actions/public/test-mempool-accept.js.map +0 -1
- package/dist/src/sdk/actions/wallet/get-addresses.js +0 -20
- package/dist/src/sdk/actions/wallet/get-addresses.js.map +0 -1
- package/dist/src/sdk/actions/wallet/sign-psbt.js +0 -28
- package/dist/src/sdk/actions/wallet/sign-psbt.js.map +0 -1
- package/dist/src/sdk/chains/definitions/index.js +0 -2
- package/dist/src/sdk/chains/definitions/index.js.map +0 -1
- package/dist/src/sdk/chains/definitions/signet.js +0 -36
- package/dist/src/sdk/chains/definitions/signet.js.map +0 -1
- package/dist/src/sdk/clients/base/create-http-client.js +0 -41
- package/dist/src/sdk/clients/base/create-http-client.js.map +0 -1
- package/dist/src/sdk/clients/base/create-rpc-client.js +0 -41
- package/dist/src/sdk/clients/base/create-rpc-client.js.map +0 -1
- package/dist/src/sdk/clients/base/create-rpc-client.test.js +0 -145
- package/dist/src/sdk/clients/base/create-rpc-client.test.js.map +0 -1
- package/dist/src/sdk/clients/create-public-client.js +0 -13
- package/dist/src/sdk/clients/create-public-client.js.map +0 -1
- package/dist/src/sdk/clients/create-public-client.test.js +0 -113
- package/dist/src/sdk/clients/create-public-client.test.js.map +0 -1
- package/dist/src/sdk/clients/create-wallet-client.js +0 -14
- package/dist/src/sdk/clients/create-wallet-client.js.map +0 -1
- package/dist/src/sdk/clients/decorators/kontor/public.js +0 -19
- package/dist/src/sdk/clients/decorators/kontor/public.js.map +0 -1
- package/dist/src/sdk/clients/decorators/kontor/wallet.js +0 -13
- package/dist/src/sdk/clients/decorators/kontor/wallet.js.map +0 -1
- package/dist/src/sdk/clients/decorators/public.js +0 -9
- package/dist/src/sdk/clients/decorators/public.js.map +0 -1
- package/dist/src/sdk/clients/decorators/wallet.js +0 -9
- package/dist/src/sdk/clients/decorators/wallet.js.map +0 -1
- package/dist/src/sdk/clients/kontor/create-public-client.js +0 -14
- package/dist/src/sdk/clients/kontor/create-public-client.js.map +0 -1
- package/dist/src/sdk/clients/kontor/create-public-client.test.js +0 -44
- package/dist/src/sdk/clients/kontor/create-public-client.test.js.map +0 -1
- package/dist/src/sdk/clients/kontor/create-wallet-client.js +0 -14
- package/dist/src/sdk/clients/kontor/create-wallet-client.js.map +0 -1
- package/dist/src/sdk/clients/transports/create-http-transport.js +0 -25
- package/dist/src/sdk/clients/transports/create-http-transport.js.map +0 -1
- package/dist/src/sdk/clients/transports/create-rpc-transport.js +0 -36
- package/dist/src/sdk/clients/transports/create-rpc-transport.js.map +0 -1
- package/dist/src/sdk/clients/transports/create-rpc-transport.test.js +0 -58
- package/dist/src/sdk/clients/transports/create-rpc-transport.test.js.map +0 -1
- package/dist/src/sdk/clients/transports/custom.js +0 -14
- package/dist/src/sdk/clients/transports/custom.js.map +0 -1
- package/dist/src/sdk/clients/transports/http-rpc.js +0 -84
- package/dist/src/sdk/clients/transports/http-rpc.js.map +0 -1
- package/dist/src/sdk/clients/transports/http-rpc.test.js +0 -147
- package/dist/src/sdk/clients/transports/http-rpc.test.js.map +0 -1
- package/dist/src/sdk/clients/transports/http.js +0 -45
- package/dist/src/sdk/clients/transports/http.js.map +0 -1
- package/dist/src/sdk/contracts/wits.js +0 -26
- package/dist/src/sdk/contracts/wits.js.map +0 -1
- package/dist/src/sdk/errors/address.js +0 -13
- package/dist/src/sdk/errors/address.js.map +0 -1
- package/dist/src/sdk/errors/base.js +0 -92
- package/dist/src/sdk/errors/base.js.map +0 -1
- package/dist/src/sdk/errors/request.js +0 -100
- package/dist/src/sdk/errors/request.js.map +0 -1
- package/dist/src/sdk/errors/rpc.js +0 -30
- package/dist/src/sdk/errors/rpc.js.map +0 -1
- package/dist/src/sdk/errors/transport.js +0 -10
- package/dist/src/sdk/errors/transport.js.map +0 -1
- package/dist/src/sdk/errors/utils.js +0 -2
- package/dist/src/sdk/errors/utils.js.map +0 -1
- package/dist/src/sdk/errors/version.js +0 -2
- package/dist/src/sdk/errors/version.js.map +0 -1
- package/dist/src/sdk/errors/wit.js +0 -19
- package/dist/src/sdk/errors/wit.js.map +0 -1
- package/dist/src/sdk/test/e2e.test.js +0 -166
- package/dist/src/sdk/test/e2e.test.js.map +0 -1
- package/dist/src/sdk/types/account.js +0 -2
- package/dist/src/sdk/types/account.js.map +0 -1
- package/dist/src/sdk/types/btc-rpc.js +0 -2
- package/dist/src/sdk/types/btc-rpc.js.map +0 -1
- package/dist/src/sdk/types/chain.js +0 -2
- package/dist/src/sdk/types/chain.js.map +0 -1
- package/dist/src/sdk/types/contract.js +0 -2
- package/dist/src/sdk/types/contract.js.map +0 -1
- package/dist/src/sdk/types/contract.test-d.js +0 -35
- package/dist/src/sdk/types/contract.test-d.js.map +0 -1
- package/dist/src/sdk/types/http-schema.js +0 -73
- package/dist/src/sdk/types/http-schema.js.map +0 -1
- package/dist/src/sdk/types/http-schema.test-d.js +0 -133
- package/dist/src/sdk/types/http-schema.test-d.js.map +0 -1
- package/dist/src/sdk/types/kontor.js +0 -28
- package/dist/src/sdk/types/kontor.js.map +0 -1
- package/dist/src/sdk/types/misc.js +0 -2
- package/dist/src/sdk/types/misc.js.map +0 -1
- package/dist/src/sdk/types/rpc-schema.js +0 -2
- package/dist/src/sdk/types/rpc-schema.js.map +0 -1
- package/dist/src/sdk/types/rpc.js +0 -19
- package/dist/src/sdk/types/rpc.js.map +0 -1
- package/dist/src/sdk/types/utils.js +0 -2
- package/dist/src/sdk/types/utils.js.map +0 -1
- package/dist/src/sdk/types/wbip001.js +0 -3
- package/dist/src/sdk/types/wbip001.js.map +0 -1
- package/dist/src/sdk/utils/build-http-request.js +0 -55
- package/dist/src/sdk/utils/build-http-request.js.map +0 -1
- package/dist/src/sdk/utils/build-request.js +0 -35
- package/dist/src/sdk/utils/build-request.js.map +0 -1
- package/dist/src/sdk/utils/build-rpc-request.js +0 -84
- package/dist/src/sdk/utils/build-rpc-request.js.map +0 -1
- package/dist/src/sdk/utils/chain/defineChain.js +0 -9
- package/dist/src/sdk/utils/chain/defineChain.js.map +0 -1
- package/dist/src/sdk/utils/encoding/to-hex.js +0 -23
- package/dist/src/sdk/utils/encoding/to-hex.js.map +0 -1
- package/dist/src/sdk/utils/get-action.js +0 -27
- package/dist/src/sdk/utils/get-action.js.map +0 -1
- package/dist/src/sdk/utils/http.js +0 -137
- package/dist/src/sdk/utils/http.js.map +0 -1
- package/dist/src/sdk/utils/lru.js +0 -35
- package/dist/src/sdk/utils/lru.js.map +0 -1
- package/dist/src/sdk/utils/promise/create-batch-scheduler.js +0 -49
- package/dist/src/sdk/utils/promise/create-batch-scheduler.js.map +0 -1
- package/dist/src/sdk/utils/promise/with-dedupe.js +0 -14
- package/dist/src/sdk/utils/promise/with-dedupe.js.map +0 -1
- package/dist/src/sdk/utils/promise/with-resolvers.js +0 -10
- package/dist/src/sdk/utils/promise/with-resolvers.js.map +0 -1
- package/dist/src/sdk/utils/promise/with-retry.js +0 -25
- package/dist/src/sdk/utils/promise/with-retry.js.map +0 -1
- package/dist/src/sdk/utils/promise/with-timeout.js +0 -30
- package/dist/src/sdk/utils/promise/with-timeout.js.map +0 -1
- package/dist/src/sdk/utils/rpc/http.js +0 -86
- package/dist/src/sdk/utils/rpc/http.js.map +0 -1
- package/dist/src/sdk/utils/rpc/id.js +0 -13
- package/dist/src/sdk/utils/rpc/id.js.map +0 -1
- package/dist/src/sdk/utils/stringify.js +0 -5
- package/dist/src/sdk/utils/stringify.js.map +0 -1
- package/dist/src/sdk/utils/uid.js +0 -14
- package/dist/src/sdk/utils/uid.js.map +0 -1
- package/dist/src/sdk/utils/wait.js +0 -4
- package/dist/src/sdk/utils/wait.js.map +0 -1
- package/dist/src/sdk/utils/wit/codecs/decimal.js +0 -165
- package/dist/src/sdk/utils/wit/codecs/decimal.js.map +0 -1
- package/dist/src/sdk/utils/wit/codecs/enum.js +0 -104
- package/dist/src/sdk/utils/wit/codecs/enum.js.map +0 -1
- package/dist/src/sdk/utils/wit/codecs/integer.js +0 -167
- package/dist/src/sdk/utils/wit/codecs/integer.js.map +0 -1
- package/dist/src/sdk/utils/wit/codecs/list.js +0 -117
- package/dist/src/sdk/utils/wit/codecs/list.js.map +0 -1
- package/dist/src/sdk/utils/wit/codecs/option.js +0 -91
- package/dist/src/sdk/utils/wit/codecs/option.js.map +0 -1
- package/dist/src/sdk/utils/wit/codecs/string.js +0 -27
- package/dist/src/sdk/utils/wit/codecs/string.js.map +0 -1
- package/dist/src/sdk/utils/wit/codecs/types.js +0 -45
- package/dist/src/sdk/utils/wit/codecs/types.js.map +0 -1
- package/dist/src/sdk/utils/wit/codecs/unit.js +0 -22
- package/dist/src/sdk/utils/wit/codecs/unit.js.map +0 -1
- package/dist/src/sdk/utils/wit/decode-function-result.js +0 -36
- package/dist/src/sdk/utils/wit/decode-function-result.js.map +0 -1
- package/dist/src/sdk/utils/wit/decode-wit-parameter.js +0 -286
- package/dist/src/sdk/utils/wit/decode-wit-parameter.js.map +0 -1
- package/dist/src/sdk/utils/wit/decode-wit-parameter.test.js +0 -75
- package/dist/src/sdk/utils/wit/decode-wit-parameter.test.js.map +0 -1
- package/dist/src/sdk/utils/wit/encode-function-data.js +0 -17
- package/dist/src/sdk/utils/wit/encode-function-data.js.map +0 -1
- package/dist/src/sdk/utils/wit/encode-function-data.test-d.js +0 -21
- package/dist/src/sdk/utils/wit/encode-function-data.test-d.js.map +0 -1
- package/dist/src/sdk/utils/wit/encode-function-data.test.js +0 -91
- package/dist/src/sdk/utils/wit/encode-function-data.test.js.map +0 -1
- package/dist/src/sdk/utils/wit/encode-wit-parameters.js +0 -250
- package/dist/src/sdk/utils/wit/encode-wit-parameters.js.map +0 -1
- package/dist/src/sdk/utils/wit/encode-wit-parameters.test.js +0 -62
- package/dist/src/sdk/utils/wit/encode-wit-parameters.test.js.map +0 -1
- package/dist/src/sdk/utils/wit/get-wit-item.js +0 -15
- package/dist/src/sdk/utils/wit/get-wit-item.js.map +0 -1
- package/dist/src/sdk/utils/wit/get-wit-item.test.js +0 -118
- package/dist/src/sdk/utils/wit/get-wit-item.test.js.map +0 -1
- package/dist/src/sdk/utils/wit/prepare-encode-function-data.js +0 -24
- package/dist/src/sdk/utils/wit/prepare-encode-function-data.js.map +0 -1
- package/dist/src/wit/error.js +0 -59
- package/dist/src/wit/error.js.map +0 -1
- package/dist/src/wit/narrow.js +0 -14
- package/dist/src/wit/narrow.js.map +0 -1
- package/dist/src/wit/regex.js +0 -6
- package/dist/src/wit/regex.js.map +0 -1
- package/dist/src/wit/register.js +0 -2
- package/dist/src/wit/register.js.map +0 -1
- package/dist/src/wit/type-utils.js +0 -2
- package/dist/src/wit/type-utils.js.map +0 -1
- package/dist/src/wit/utils.js +0 -2
- package/dist/src/wit/utils.js.map +0 -1
- package/dist/src/wit/utils.test-d.js +0 -16
- package/dist/src/wit/utils.test-d.js.map +0 -1
- package/dist/src/wit/version.js +0 -2
- package/dist/src/wit/version.js.map +0 -1
- package/dist/src/wit/wit-parser/core/errors/signature.js +0 -42
- package/dist/src/wit/wit-parser/core/errors/signature.js.map +0 -1
- package/dist/src/wit/wit-parser/core/errors/splitParameters.js +0 -18
- package/dist/src/wit/wit-parser/core/errors/splitParameters.js.map +0 -1
- package/dist/src/wit/wit-parser/core/errors/wit-parameter.js +0 -29
- package/dist/src/wit/wit-parser/core/errors/wit-parameter.js.map +0 -1
- package/dist/src/wit/wit-parser/core/records.js +0 -73
- package/dist/src/wit/wit-parser/core/records.js.map +0 -1
- package/dist/src/wit/wit-parser/core/records.test.js +0 -53
- package/dist/src/wit/wit-parser/core/records.test.js.map +0 -1
- package/dist/src/wit/wit-parser/core/signatures.js +0 -32
- package/dist/src/wit/wit-parser/core/signatures.js.map +0 -1
- package/dist/src/wit/wit-parser/core/signatures.test.js +0 -54
- package/dist/src/wit/wit-parser/core/signatures.test.js.map +0 -1
- package/dist/src/wit/wit-parser/core/types/records.js +0 -2
- package/dist/src/wit/wit-parser/core/types/records.js.map +0 -1
- package/dist/src/wit/wit-parser/core/types/records.test-d.js +0 -19
- package/dist/src/wit/wit-parser/core/types/records.test-d.js.map +0 -1
- package/dist/src/wit/wit-parser/core/types/signatures.js +0 -3
- package/dist/src/wit/wit-parser/core/types/signatures.js.map +0 -1
- package/dist/src/wit/wit-parser/core/types/signatures.test-d.js +0 -18
- package/dist/src/wit/wit-parser/core/types/signatures.test-d.js.map +0 -1
- package/dist/src/wit/wit-parser/core/types/utils.js +0 -2
- package/dist/src/wit/wit-parser/core/types/utils.js.map +0 -1
- package/dist/src/wit/wit-parser/core/types/utils.test-d.js +0 -138
- package/dist/src/wit/wit-parser/core/types/utils.test-d.js.map +0 -1
- package/dist/src/wit/wit-parser/core/utils.js +0 -212
- package/dist/src/wit/wit-parser/core/utils.js.map +0 -1
- package/dist/src/wit/wit-parser/core/utils.test.js +0 -302
- package/dist/src/wit/wit-parser/core/utils.test.js.map +0 -1
- package/dist/src/wit/wit-parser/parse-wit-parameter.js +0 -26
- package/dist/src/wit/wit-parser/parse-wit-parameter.js.map +0 -1
- package/dist/src/wit/wit-parser/parse-wit-parameter.test.js +0 -77
- package/dist/src/wit/wit-parser/parse-wit-parameter.test.js.map +0 -1
- package/dist/src/wit/wit-parser/parse-wit.js +0 -16
- package/dist/src/wit/wit-parser/parse-wit.js.map +0 -1
- package/dist/src/wit/wit-parser/parse-wit.test.js +0 -78
- package/dist/src/wit/wit-parser/parse-wit.test.js.map +0 -1
- package/dist/src/wit/wit.js +0 -2
- package/dist/src/wit/wit.js.map +0 -1
- package/dist/src/wit/wit.test.js +0 -6
- package/dist/src/wit/wit.test.js.map +0 -1
- package/dist/test/globalSetup.js +0 -14
- package/dist/test/globalSetup.js.map +0 -1
- package/dist/test/src/wits.js +0 -21
- package/dist/test/src/wits.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../../src/sdk/errors/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,gBAAgB,GAAG,CAAC,CAAC,CAAC;AAyB5B,MAAM,OAAO,QAA8C,SAAQ,SAAS;IAG1E,YACE,KAAY,EACZ,EACE,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,IAAI,EACJ,YAAY,GACW;QAEzB,KAAK,CAAC,YAAY,EAAE;YAClB,KAAK;YACL,QAAQ;YACR,YAAY,EACV,YAAY,IAAK,KAAqC,EAAE,YAAY;YACtE,IAAI,EAAE,IAAI,IAAI,UAAU;SACzB,CAAC,CAAC;QAlBL;;;;;WAA4B;QAmB1B,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,CACV,KAAK,YAAY,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,gBAAgB,CAAC,CAClE,CAAC;IACb,CAAC;CACF;AAID,MAAM,OAAO,eAAgB,SAAQ,QAAQ;IAC3C,YAAY,KAAY;QACtB,KAAK,CAAC,KAAK,EAAE;YACX,IAAI,EAAE,iBAAiB;YACvB,YAAY,EAAE,gCAAgC;SAC/C,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseError } from "./base.js";
|
|
2
|
-
export class UrlRequiredError extends BaseError {
|
|
3
|
-
constructor() {
|
|
4
|
-
super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.", {
|
|
5
|
-
docsPath: "/docs/clients/intro",
|
|
6
|
-
name: "UrlRequiredError",
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=transport.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../../src/sdk/errors/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAKtC,MAAM,OAAO,gBAAiB,SAAQ,SAAS;IAC7C;QACE,KAAK,CACH,wFAAwF,EACxF;YACE,QAAQ,EAAE,qBAAqB;YAC/B,IAAI,EAAE,kBAAkB;SACzB,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/sdk/errors/utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../src/sdk/errors/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { BaseError } from "./base.js";
|
|
2
|
-
export class WitEncodingLengthMismatchError extends BaseError {
|
|
3
|
-
constructor({ expectedLength, givenLength, }) {
|
|
4
|
-
super([
|
|
5
|
-
"WIT encoding params/values length mismatch.",
|
|
6
|
-
`Expected length (params): ${expectedLength}`,
|
|
7
|
-
`Given length (values): ${givenLength}`,
|
|
8
|
-
].join("\n"), { name: "WitEncodingLengthMismatchError" });
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export class InvalidWitEncodingTypeError extends BaseError {
|
|
12
|
-
constructor(type, { docsPath }) {
|
|
13
|
-
super([
|
|
14
|
-
`Type "${type}" is not a valid encoding type.`,
|
|
15
|
-
"Please provide a valid WIT type.",
|
|
16
|
-
].join("\n"), { docsPath, name: "InvalidWitEncodingType" });
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=wit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wit.js","sourceRoot":"","sources":["../../../../src/sdk/errors/wit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAMtC,MAAM,OAAO,8BAA+B,SAAQ,SAAS;IAC3D,YAAY,EACV,cAAc,EACd,WAAW,GAIZ;QACC,KAAK,CACH;YACE,6CAA6C;YAC7C,6BAA6B,cAAc,EAAE;YAC7C,0BAA0B,WAAW,EAAE;SACxC,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ,EAAE,IAAI,EAAE,gCAAgC,EAAE,CAC3C,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,2BAA4B,SAAQ,SAAS;IACxD,YAAY,IAAY,EAAE,EAAE,QAAQ,EAAwB;QAC1D,KAAK,CACH;YACE,SAAS,IAAI,iCAAiC;YAC9C,kCAAkC;SACnC,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ,EAAE,QAAQ,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAC7C,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { test } from "vitest";
|
|
2
|
-
// import { procContract } from "./proc-contract.js";
|
|
3
|
-
import { parseWit } from "../../wit/wit-parser/parse-wit.js";
|
|
4
|
-
import { createPublicClient as createKontorPublicClient } from "../clients/kontor/create-public-client.js";
|
|
5
|
-
import { http } from "../clients/transports/http.js";
|
|
6
|
-
import { mnemonicToAccount } from "../accounts/mnemonic-to-account.js";
|
|
7
|
-
import { createWalletClient as createKontorWalletClient } from "../clients/kontor/create-wallet-client.js";
|
|
8
|
-
import { custom } from "../clients/transports/custom.js";
|
|
9
|
-
import { Transaction } from "@scure/btc-signer";
|
|
10
|
-
import { hex } from "@scure/base";
|
|
11
|
-
import { signet } from "../chains/definitions/signet.js";
|
|
12
|
-
import { Instruction } from "../types/kontor.js";
|
|
13
|
-
export const nativeTokenRaw = [
|
|
14
|
-
"record balance { acc: string, amt: decimal }",
|
|
15
|
-
"record transfer { src: string, dst: string, amt: decimal }",
|
|
16
|
-
"record burn { src: string, amt: decimal }",
|
|
17
|
-
"record mint { dst: string, amt: decimal }",
|
|
18
|
-
"export issuance: func(ctx: borrow<core-context>, amt: decimal) -> result<mint, error>;",
|
|
19
|
-
"export hold: func(ctx: borrow<core-context>, amt: decimal) -> result<transfer, error>;",
|
|
20
|
-
"export release: func(ctx: borrow<core-context>, burn-amt: decimal) -> result<burn, error>;",
|
|
21
|
-
"export init: func(ctx: borrow<proc-context>);",
|
|
22
|
-
"export mint: func(ctx: borrow<proc-context>, amt: decimal) -> result<mint, error>;",
|
|
23
|
-
"export burn: func(ctx: borrow<proc-context>, amt: decimal) -> result<burn, error>;",
|
|
24
|
-
"export transfer: func(ctx: borrow<proc-context>, dst: string, amt: decimal) -> result<transfer, error>;",
|
|
25
|
-
"export balance: func(ctx: borrow<view-context>, acc: string) -> option<decimal>;",
|
|
26
|
-
"export balances: func(ctx: borrow<view-context>) -> list<balance>;",
|
|
27
|
-
"export total-supply: func(ctx: borrow<view-context>) -> decimal;",
|
|
28
|
-
"export attach: func(ctx: borrow<proc-context>, vout: u64, amt: decimal) -> result<transfer, error>;",
|
|
29
|
-
"export detach: func(ctx: borrow<proc-context>) -> result<transfer, error>;",
|
|
30
|
-
];
|
|
31
|
-
export const wit = parseWit(nativeTokenRaw);
|
|
32
|
-
// test("e2e kontor wallet client", async () => {
|
|
33
|
-
// const account = mnemonicToAccount(process.env.TEST_MNEMONIC!);
|
|
34
|
-
//
|
|
35
|
-
// const kontorPublicClient = createKontorPublicClient({
|
|
36
|
-
// transport: http("https://signet-staging.kontor.network:35000/api"),
|
|
37
|
-
// account,
|
|
38
|
-
// chain: signet,
|
|
39
|
-
// });
|
|
40
|
-
//
|
|
41
|
-
// const kontorWalletClient = createKontorWalletClient({
|
|
42
|
-
// account,
|
|
43
|
-
// // TODO: transport is not used for local account.
|
|
44
|
-
// transport: custom({
|
|
45
|
-
// request: async (_args: any) => null,
|
|
46
|
-
// }),
|
|
47
|
-
// });
|
|
48
|
-
//
|
|
49
|
-
// const res = await kontorPublicClient.procContract({
|
|
50
|
-
// wit: wit,
|
|
51
|
-
// // TODO: add optional account override
|
|
52
|
-
//
|
|
53
|
-
// functionName: "mint", // functin name is only valid if it's got a proc-context
|
|
54
|
-
// contractAddress: "token_0_0",
|
|
55
|
-
// args: [[7n, 18]],
|
|
56
|
-
// satsPerVByte: 1,
|
|
57
|
-
// utxos: [
|
|
58
|
-
// "641c40edf4cf0f1cdaea5c259bf50267bd8743dbade84c98bb9e360c2d0e2a33:1",
|
|
59
|
-
// ],
|
|
60
|
-
// gas: 10n,
|
|
61
|
-
// });
|
|
62
|
-
//
|
|
63
|
-
// const commit: Transaction = await kontorWalletClient.signCommit({
|
|
64
|
-
// account: account,
|
|
65
|
-
// chain: signet,
|
|
66
|
-
// psbt: res.result.commit_psbt_hex,
|
|
67
|
-
// });
|
|
68
|
-
//
|
|
69
|
-
// const reveal: Transaction = await kontorWalletClient.signReveal({
|
|
70
|
-
// account: account,
|
|
71
|
-
// chain: signet,
|
|
72
|
-
// psbt: res.result.reveal_psbt_hex,
|
|
73
|
-
// parcipantScripts: res.result.per_participant,
|
|
74
|
-
// });
|
|
75
|
-
//
|
|
76
|
-
// const commitExtracted = commit.extract();
|
|
77
|
-
// const revealExtracted = reveal.extract();
|
|
78
|
-
//
|
|
79
|
-
// // const m = await btcPublicClient.testMempoolAccept({
|
|
80
|
-
// // rawtx: [hex.encode(commitExtracted), hex.encode(revealExtracted)],
|
|
81
|
-
// // options: {},
|
|
82
|
-
// // });
|
|
83
|
-
// //
|
|
84
|
-
//
|
|
85
|
-
// const r = await fetch("https://signet.kontor.network:38332", {
|
|
86
|
-
// method: "POST",
|
|
87
|
-
// headers: {
|
|
88
|
-
// "Content-Type": "application/json",
|
|
89
|
-
// Authorization: `Basic ${Buffer.from("rpc:rpc").toString("base64")}`,
|
|
90
|
-
// },
|
|
91
|
-
// body: JSON.stringify({
|
|
92
|
-
// method: "testmempoolaccept",
|
|
93
|
-
// params: [[hex.encode(commitExtracted), hex.encode(revealExtracted)]],
|
|
94
|
-
// }),
|
|
95
|
-
// });
|
|
96
|
-
// console.log({
|
|
97
|
-
// r,
|
|
98
|
-
// reveal: [hex.encode(commitExtracted), hex.encode(revealExtracted)],
|
|
99
|
-
// });
|
|
100
|
-
//
|
|
101
|
-
// const j = await r.json();
|
|
102
|
-
//
|
|
103
|
-
// console.log(j);
|
|
104
|
-
// //
|
|
105
|
-
// // const op = await kontorPublicClient.inspect({
|
|
106
|
-
// // hex: hex.encode(revealExtracted),
|
|
107
|
-
// // });
|
|
108
|
-
//
|
|
109
|
-
// // console.log(JSON.stringify(op.result[0]!.op));
|
|
110
|
-
// //
|
|
111
|
-
// });
|
|
112
|
-
test("e2e kontor wallet client", async () => {
|
|
113
|
-
const account = mnemonicToAccount(process.env.TEST_MNEMONIC);
|
|
114
|
-
const kontorPublicClient = createKontorPublicClient({
|
|
115
|
-
transport: http("https://signet-staging.kontor.network:35000/api"),
|
|
116
|
-
account,
|
|
117
|
-
chain: signet,
|
|
118
|
-
});
|
|
119
|
-
const res = await kontorPublicClient.callCompose({
|
|
120
|
-
utxos: [
|
|
121
|
-
"641c40edf4cf0f1cdaea5c259bf50267bd8743dbade84c98bb9e360c2d0e2a33:1",
|
|
122
|
-
],
|
|
123
|
-
instruction: Instruction.issuance(),
|
|
124
|
-
satsPerVByte: 1,
|
|
125
|
-
});
|
|
126
|
-
const kontorWalletClient = createKontorWalletClient({
|
|
127
|
-
account,
|
|
128
|
-
// TODO: transport is not used for local account.
|
|
129
|
-
transport: custom({
|
|
130
|
-
request: async (_args) => null,
|
|
131
|
-
}),
|
|
132
|
-
});
|
|
133
|
-
const commit = await kontorWalletClient.signCommit({
|
|
134
|
-
account: account,
|
|
135
|
-
chain: signet,
|
|
136
|
-
psbt: res.result.commit_psbt_hex,
|
|
137
|
-
});
|
|
138
|
-
const reveal = await kontorWalletClient.signReveal({
|
|
139
|
-
account: account,
|
|
140
|
-
chain: signet,
|
|
141
|
-
psbt: res.result.reveal_psbt_hex,
|
|
142
|
-
parcipantScripts: res.result.per_participant,
|
|
143
|
-
});
|
|
144
|
-
const commitExtracted = commit.extract();
|
|
145
|
-
const revealExtracted = reveal.extract();
|
|
146
|
-
const r = await fetch("https://signet.kontor.network:38332", {
|
|
147
|
-
method: "POST",
|
|
148
|
-
headers: {
|
|
149
|
-
"Content-Type": "application/json",
|
|
150
|
-
Authorization: `Basic ${Buffer.from("rpc:rpc").toString("base64")}`,
|
|
151
|
-
},
|
|
152
|
-
body: JSON.stringify({
|
|
153
|
-
method: "testmempoolaccept",
|
|
154
|
-
params: [[hex.encode(commitExtracted), hex.encode(revealExtracted)]],
|
|
155
|
-
}),
|
|
156
|
-
});
|
|
157
|
-
const mempoolAccept = await r.json();
|
|
158
|
-
console.log({ mempoolAccept: mempoolAccept.result });
|
|
159
|
-
//
|
|
160
|
-
const op = await kontorPublicClient.inspect({
|
|
161
|
-
hex: hex.encode(revealExtracted),
|
|
162
|
-
});
|
|
163
|
-
console.log(JSON.stringify(op.result[0].op));
|
|
164
|
-
//
|
|
165
|
-
});
|
|
166
|
-
//# sourceMappingURL=e2e.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"e2e.test.js","sourceRoot":"","sources":["../../../../src/sdk/test/e2e.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,IAAI,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC3G,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,kBAAkB,IAAI,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAE3G,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CA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1
|
-
{"version":3,"file":"btc-rpc.js","sourceRoot":"","sources":["../../../../src/sdk/types/btc-rpc.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../../src/sdk/types/chain.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../../src/sdk/types/contract.ts"],"names":[],"mappings":""}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { expectTypeOf, test } from "vitest";
|
|
2
|
-
import { nativeToken } from "~test/src/wits.js";
|
|
3
|
-
test("ContractFunctionName", () => {
|
|
4
|
-
expectTypeOf().toEqualTypeOf;
|
|
5
|
-
expectTypeOf().toEqualTypeOf;
|
|
6
|
-
expectTypeOf().toEqualTypeOf;
|
|
7
|
-
expectTypeOf().toEqualTypeOf;
|
|
8
|
-
});
|
|
9
|
-
test("ContractFunctionArgs", () => {
|
|
10
|
-
expectTypeOf().toEqualTypeOf;
|
|
11
|
-
expectTypeOf().toEqualTypeOf;
|
|
12
|
-
expectTypeOf().toEqualTypeOf;
|
|
13
|
-
expectTypeOf().toEqualTypeOf;
|
|
14
|
-
expectTypeOf().toEqualTypeOf;
|
|
15
|
-
expectTypeOf().toEqualTypeOf;
|
|
16
|
-
expectTypeOf().toEqualTypeOf;
|
|
17
|
-
expectTypeOf().toEqualTypeOf;
|
|
18
|
-
expectTypeOf().toEqualTypeOf;
|
|
19
|
-
expectTypeOf().toEqualTypeOf;
|
|
20
|
-
expectTypeOf().toEqualTypeOf;
|
|
21
|
-
});
|
|
22
|
-
test("ContractFunctionReturnType", () => {
|
|
23
|
-
expectTypeOf().toEqualTypeOf;
|
|
24
|
-
expectTypeOf().toEqualTypeOf;
|
|
25
|
-
expectTypeOf().toEqualTypeOf;
|
|
26
|
-
expectTypeOf().toEqualTypeOf;
|
|
27
|
-
expectTypeOf().toEqualTypeOf;
|
|
28
|
-
expectTypeOf().toEqualTypeOf;
|
|
29
|
-
expectTypeOf().toEqualTypeOf;
|
|
30
|
-
expectTypeOf().toEqualTypeOf;
|
|
31
|
-
expectTypeOf().toEqualTypeOf;
|
|
32
|
-
expectTypeOf().toEqualTypeOf;
|
|
33
|
-
expectTypeOf().toEqualTypeOf;
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=contract.test-d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contract.test-d.js","sourceRoot":"","sources":["../../../../src/sdk/types/contract.test-d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAO5C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,IAAI,CAAC,sBAAsB,EAAE,GAAG,EAAE;IAEhC,YAAY,EAAO,CAAC,aAanB,CAAC;IAGF,YAAY,EAAQ,CAAC,aAA8C,CAAC;IAGpE,YAAY,EAAQ,CAAC,aAAsD,CAAC;IAG5E,YAAY,EAAQ,CAAC,aAEpB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,sBAAsB,EAAE,GAAG,EAAE;IAEhC,YAAY,EAAY,CAAC,aAA0C,CAAC;IAGpE,YAAY,EAAQ,CAAC,aAA0C,CAAC;IAGhE,YAAY,EAAW,CAAC,aAA0C,CAAC;IAGnE,YAAY,EAAQ,CAAC,aAA0C,CAAC;IAGhE,YAAY,EAAQ,CAAC,aAA0C,CAAC;IAGhE,YAAY,EAAY,CAAC,aAAkD,CAAC;IAG5E,YAAY,EAAW,CAAC,aAAgC,CAAC;IAGzD,YAAY,EAAY,CAAC,aAA0B,CAAC;IAOpD,YAAY,EAAe,CAAC,aAA0B,CAAC;IAGvD,YAAY,EAAU,CAAC,aAAkD,CAAC;IAG1E,YAAY,EAAU,CAAC,aAA0B,CAAC;AACpD,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAMtC,YAAY,EAAY,CAAC,aAYxB,CAAC;IAGF,YAAY,EAAQ,CAAC,aAapB,CAAC;IAOF,YAAY,EAAW,CAAC,aAYvB,CAAC;IAGF,YAAY,EAAQ,CAAC,aAYpB,CAAC;IAEF,YAAY,EAAQ,CAAC,aAYpB,CAAC;IAOF,YAAY,EAAY,CAAC,aAaxB,CAAC;IAMF,YAAY,EAAW,CAAC,aAQvB,CAAC;IAOF,YAAY,EAAY,CAAC,aAExB,CAAC;IAOF,YAAY,EAAe,CAAC,aAA+B,CAAC;IAO5D,YAAY,EAAU,CAAC,aAatB,CAAC;IAOF,YAAY,EAAU,CAAC,aAatB,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
/**
|
|
3
|
-
* Example usage:
|
|
4
|
-
*
|
|
5
|
-
* type MySchema = [
|
|
6
|
-
* {
|
|
7
|
-
* Route: "/users/:userId";
|
|
8
|
-
* Method: "GET";
|
|
9
|
-
* Parameters: HttpParameters<
|
|
10
|
-
* readonly [readonly ["userId", string]],
|
|
11
|
-
* { include?: string[] },
|
|
12
|
-
* never
|
|
13
|
-
* >;
|
|
14
|
-
* ReturnType: { id: string; name: string };
|
|
15
|
-
* },
|
|
16
|
-
* {
|
|
17
|
-
* Route: "/users/:userId/posts/:postId";
|
|
18
|
-
* Method: "GET";
|
|
19
|
-
* Parameters: HttpParameters<
|
|
20
|
-
* readonly [
|
|
21
|
-
* readonly ["userId", string],
|
|
22
|
-
* readonly ["postId", string]
|
|
23
|
-
* ],
|
|
24
|
-
* never,
|
|
25
|
-
* never
|
|
26
|
-
* >;
|
|
27
|
-
* ReturnType: { id: string; title: string };
|
|
28
|
-
* },
|
|
29
|
-
* {
|
|
30
|
-
* Route: "/users";
|
|
31
|
-
* Method: "POST";
|
|
32
|
-
* Parameters: HttpParameters<never, never, { name: string; email: string }>;
|
|
33
|
-
* ReturnType: { id: string };
|
|
34
|
-
* },
|
|
35
|
-
* {
|
|
36
|
-
* Route: "/users/:userId";
|
|
37
|
-
* Method: "PATCH";
|
|
38
|
-
* Parameters: HttpParameters<
|
|
39
|
-
* readonly [readonly ["userId", string]],
|
|
40
|
-
* never,
|
|
41
|
-
* { name?: string }
|
|
42
|
-
* >;
|
|
43
|
-
* ReturnType: { id: string; name: string };
|
|
44
|
-
* },
|
|
45
|
-
* ];
|
|
46
|
-
*
|
|
47
|
-
* const request: HttpRequestFn<MySchema> = async (args) => {
|
|
48
|
-
* // Implementation can access the method via schema
|
|
49
|
-
* // Path params maintain their order for URL construction
|
|
50
|
-
* };
|
|
51
|
-
*
|
|
52
|
-
* // Usage with ordered path params converted to object for convenience:
|
|
53
|
-
* await request({
|
|
54
|
-
* route: "/users/:userId",
|
|
55
|
-
* path: { userId: "123" },
|
|
56
|
-
* query: { include: ["posts"] }
|
|
57
|
-
* });
|
|
58
|
-
*
|
|
59
|
-
* await request({
|
|
60
|
-
* route: "/users/:userId/posts/:postId",
|
|
61
|
-
* path: { userId: "123", postId: "456" }
|
|
62
|
-
* });
|
|
63
|
-
*
|
|
64
|
-
* await request({
|
|
65
|
-
* route: "/users",
|
|
66
|
-
* body: { name: "John", email: "john@example.com" }
|
|
67
|
-
* });
|
|
68
|
-
*
|
|
69
|
-
* // Type helpers:
|
|
70
|
-
* type GetUserMethod = ExtractMethod<MySchema, "/users/:userId">; // "GET" | "PATCH"
|
|
71
|
-
* type CreateUserBody = ExtractBodyParams<MySchema, "/users">; // { name: string; email: string }
|
|
72
|
-
*/
|
|
73
|
-
//# sourceMappingURL=http-schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-schema.js","sourceRoot":"","sources":["../../../../src/sdk/types/http-schema.ts"],"names":[],"mappings":";AAoUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG"}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
// tests/http-schema.types.test.ts
|
|
2
|
-
import { test, describe, expectTypeOf } from "vitest";
|
|
3
|
-
describe("Http schema type helpers", () => {
|
|
4
|
-
test("ExtractMethod returns correct methods for a route", () => {
|
|
5
|
-
// There are two entries for "/users/:userId": GET + PATCH
|
|
6
|
-
expectTypeOf().toEqualTypeOf();
|
|
7
|
-
});
|
|
8
|
-
test("ExtractPathParams converts ordered tuples to a record", () => {
|
|
9
|
-
// Path params for "/users/:userId"
|
|
10
|
-
expectTypeOf().toEqualTypeOf();
|
|
11
|
-
// Path params for "/users/:userId/posts/:postId"
|
|
12
|
-
expectTypeOf().toEqualTypeOf();
|
|
13
|
-
});
|
|
14
|
-
test("ExtractQueryParams returns the right query type", () => {
|
|
15
|
-
expectTypeOf().toEqualTypeOf();
|
|
16
|
-
expectTypeOf().toEqualTypeOf(); // route has `never` query
|
|
17
|
-
});
|
|
18
|
-
test("ExtractBodyParams returns the right body type", () => {
|
|
19
|
-
expectTypeOf().toEqualTypeOf();
|
|
20
|
-
expectTypeOf().toEqualTypeOf();
|
|
21
|
-
// no body for this GET route
|
|
22
|
-
expectTypeOf().toEqualTypeOf();
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
describe("HttpRequestFn", () => {
|
|
26
|
-
const request = async (args) => {
|
|
27
|
-
// We don't care about runtime here; just satisfy the type.
|
|
28
|
-
// Narrow return type based on `args.route` (not required for the tests).
|
|
29
|
-
switch (args.route) {
|
|
30
|
-
case "/users/:userId":
|
|
31
|
-
return { id: "123", name: "John Doe" };
|
|
32
|
-
case "/users/:userId/posts/:postId":
|
|
33
|
-
return { id: "1", title: "Post" };
|
|
34
|
-
case "/users":
|
|
35
|
-
return { id: "123" };
|
|
36
|
-
default:
|
|
37
|
-
throw new Error("Unknown route");
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
test("typed call for GET /users/:userId with path & query", async () => {
|
|
41
|
-
const user = await request({
|
|
42
|
-
method: "PATCH",
|
|
43
|
-
route: "/users/:userId",
|
|
44
|
-
path: { userId: "123" }, // Path is normalized to record
|
|
45
|
-
body: { name: "foo" },
|
|
46
|
-
});
|
|
47
|
-
// Both GET and PATCH return the same shape for this route.
|
|
48
|
-
expectTypeOf(user).toEqualTypeOf();
|
|
49
|
-
});
|
|
50
|
-
test("typed call for GET /users/:userId/posts/:postId", async () => {
|
|
51
|
-
const post = await request({
|
|
52
|
-
method: "GET",
|
|
53
|
-
route: "/users/:userId/posts/:postId",
|
|
54
|
-
path: { userId: "123", postId: "456" },
|
|
55
|
-
});
|
|
56
|
-
expectTypeOf(post).toEqualTypeOf();
|
|
57
|
-
});
|
|
58
|
-
test("typed call for POST /users with required body", async () => {
|
|
59
|
-
const created = await request({
|
|
60
|
-
method: "POST",
|
|
61
|
-
route: "/users",
|
|
62
|
-
body: { name: "Jane", email: "jane@example.com" },
|
|
63
|
-
});
|
|
64
|
-
expectTypeOf(created).toEqualTypeOf();
|
|
65
|
-
});
|
|
66
|
-
test("missing required body for POST /users should be an error", async () => {
|
|
67
|
-
// @ts-expect-error body is required for /users
|
|
68
|
-
await request({
|
|
69
|
-
route: "/users",
|
|
70
|
-
});
|
|
71
|
-
await request({
|
|
72
|
-
route: "/users",
|
|
73
|
-
// @ts-expect-error body is required (shape mismatch)
|
|
74
|
-
body: { wrong: "shape" },
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
test("path is required where schema has path params", async () => {
|
|
78
|
-
await request({
|
|
79
|
-
method: "GET",
|
|
80
|
-
route: "/users/:userId",
|
|
81
|
-
path: { userId: "123" },
|
|
82
|
-
query: { verbose: true },
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
test("query is optional when underlying type is optional", async () => {
|
|
86
|
-
await request({
|
|
87
|
-
method: "GET",
|
|
88
|
-
route: "/users/:userId",
|
|
89
|
-
path: { userId: "123" },
|
|
90
|
-
query: { verbose: false },
|
|
91
|
-
});
|
|
92
|
-
await request({
|
|
93
|
-
method: "GET",
|
|
94
|
-
route: "/users/:userId",
|
|
95
|
-
path: { userId: "123" },
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
test("default / loose mode when Schema is undefined", async () => {
|
|
99
|
-
const looseRequest = async (args) => {
|
|
100
|
-
return args;
|
|
101
|
-
};
|
|
102
|
-
// Any route string is allowed
|
|
103
|
-
await looseRequest({
|
|
104
|
-
method: "GET",
|
|
105
|
-
route: "/anything",
|
|
106
|
-
path: { foo: "bar" },
|
|
107
|
-
query: { x: 1 },
|
|
108
|
-
body: { whatever: true },
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
describe("HttpRequestOptions.routes OneOf", () => {
|
|
113
|
-
test("routes can have include", () => {
|
|
114
|
-
const opts = {
|
|
115
|
-
routes: { include: ["/users", "/posts"] },
|
|
116
|
-
};
|
|
117
|
-
expectTypeOf(opts.routes).toMatchTypeOf();
|
|
118
|
-
});
|
|
119
|
-
test("routes can have exclude", () => {
|
|
120
|
-
const opts = {
|
|
121
|
-
routes: { exclude: ["/health"] },
|
|
122
|
-
};
|
|
123
|
-
expectTypeOf(opts.routes).toMatchTypeOf();
|
|
124
|
-
});
|
|
125
|
-
test("routes cannot have both include and exclude", () => {
|
|
126
|
-
const bad = {
|
|
127
|
-
// @ts-expect-error OneOf should not allow both include and exclude
|
|
128
|
-
routes: { include: ["/users"], exclude: ["/posts"] },
|
|
129
|
-
};
|
|
130
|
-
void bad;
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
//# sourceMappingURL=http-schema.test-d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-schema.test-d.js","sourceRoot":"","sources":["../../../../src/sdk/types/http-schema.test-d.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAyDtD,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,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B,EAAE,GAAG,EAAE;QACnC,MAAM,IAAI,GAAuB;YAC/B,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;SAC1C,CAAC;QACF,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,aAAa,EAIpC,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACnC,MAAM,IAAI,GAAuB;YAC/B,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,CAAC,EAAE;SACjC,CAAC;QACF,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,aAAa,EAIpC,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACvD,MAAM,GAAG,GAAuB;YAC9B,mEAAmE;YACnE,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE;SACrD,CAAC;QAEF,KAAK,GAAG,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export var Instruction;
|
|
2
|
-
(function (Instruction) {
|
|
3
|
-
function publish(params) {
|
|
4
|
-
return {
|
|
5
|
-
Publish: {
|
|
6
|
-
gas_limit: Number(params.gasLimit),
|
|
7
|
-
name: params.name,
|
|
8
|
-
bytes: params.bytes,
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
Instruction.publish = publish;
|
|
13
|
-
function call(params) {
|
|
14
|
-
return {
|
|
15
|
-
Call: {
|
|
16
|
-
gas_limit: Number(params.gasLimit),
|
|
17
|
-
contract: params.contract,
|
|
18
|
-
expr: params.expr,
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
Instruction.call = call;
|
|
23
|
-
function issuance() {
|
|
24
|
-
return "Issuance";
|
|
25
|
-
}
|
|
26
|
-
Instruction.issuance = issuance;
|
|
27
|
-
})(Instruction || (Instruction = {}));
|
|
28
|
-
//# sourceMappingURL=kontor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kontor.js","sourceRoot":"","sources":["../../../../src/sdk/types/kontor.ts"],"names":[],"mappings":"AAqCA,MAAM,KAAW,WAAW,CAgC3B;AAhCD,WAAiB,WAAW;IAC1B,SAAgB,OAAO,CAAC,MAIvB;QACC,OAAO;YACL,OAAO,EAAE;gBACP,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;gBAClC,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,KAAK,EAAE,MAAM,CAAC,KAAK;aACpB;SACF,CAAC;IACJ,CAAC;IAZe,mBAAO,UAYtB,CAAA;IAED,SAAgB,IAAI,CAAC,MAIpB;QACC,OAAO;YACL,IAAI,EAAE;gBACJ,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;gBAClC,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,IAAI,EAAE,MAAM,CAAC,IAAI;aAClB;SACF,CAAC;IACJ,CAAC;IAZe,gBAAI,OAYnB,CAAA;IAED,SAAgB,QAAQ;QACtB,OAAO,UAAU,CAAC;IACpB,CAAC;IAFe,oBAAQ,WAEvB,CAAA;AACH,CAAC,EAhCgB,WAAW,KAAX,WAAW,QAgC3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"misc.js","sourceRoot":"","sources":["../../../../src/sdk/types/misc.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-schema.js","sourceRoot":"","sources":["../../../../src/sdk/types/rpc-schema.ts"],"names":[],"mappings":""}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
// Subscription<result, error>);
|
|
3
|
-
// type Subscription<result, error> = {
|
|
4
|
-
// method: "eth_subscription";
|
|
5
|
-
// error?: undefined;
|
|
6
|
-
// result?: undefined;
|
|
7
|
-
// params:
|
|
8
|
-
// | {
|
|
9
|
-
// subscription: string;
|
|
10
|
-
// result: result;
|
|
11
|
-
// error?: undefined;
|
|
12
|
-
// }
|
|
13
|
-
// | {
|
|
14
|
-
// subscription: string;
|
|
15
|
-
// result?: undefined;
|
|
16
|
-
// error: error;
|
|
17
|
-
// };
|
|
18
|
-
// };
|
|
19
|
-
//# sourceMappingURL=rpc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../../src/sdk/types/rpc.ts"],"names":[],"mappings":";AAsBA,gCAAgC;AAEhC,uCAAuC;AACvC,gCAAgC;AAChC,uBAAuB;AACvB,wBAAwB;AACxB,YAAY;AACZ,UAAU;AACV,gCAAgC;AAChC,0BAA0B;AAC1B,6BAA6B;AAC7B,UAAU;AACV,UAAU;AACV,gCAAgC;AAChC,8BAA8B;AAC9B,wBAAwB;AACxB,WAAW;AACX,KAAK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/sdk/types/utils.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wbip001.js","sourceRoot":"","sources":["../../../../src/sdk/types/wbip001.ts"],"names":[],"mappings":"AAAA,sBAAsB"}
|