@secondlayer/stacks 2.16.0 → 2.18.0
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/README.md +1 -1
- package/dist/shared/{stacks-ggxnnph5.cjs → stacks-bq0weg6n.js} +46 -2
- package/dist/shared/stacks-bq0weg6n.js.map +11 -0
- package/dist/shared/{stacks-58e4vbaw.js → stacks-fjrpnkt3.cjs} +15 -20
- package/dist/shared/stacks-fjrpnkt3.cjs.map +11 -0
- package/dist/shared/{stacks-srvk63qq.js → stacks-rb9shyk8.js} +4 -6
- package/dist/shared/{stacks-srvk63qq.js.map → stacks-rb9shyk8.js.map} +2 -2
- package/dist/src/actions/index.js +4 -6
- package/dist/src/actions/index.js.map +1 -1
- package/dist/src/bns/index.js +3 -4
- package/dist/src/bns/index.js.map +2 -2
- package/dist/src/index.js +3 -5
- package/dist/src/index.js.map +2 -2
- package/dist/src/pox/index.js +3 -4
- package/dist/src/pox/index.js.map +2 -2
- package/dist/src/pox5/index.cjs +678 -116
- package/dist/src/pox5/index.cjs.map +7 -6
- package/dist/src/pox5/index.d.cts +71 -30
- package/dist/src/pox5/index.d.ts +71 -30
- package/dist/src/pox5/index.js +686 -123
- package/dist/src/pox5/index.js.map +7 -6
- package/dist/src/sbtc/index.js +3 -4
- package/dist/src/sbtc/index.js.map +2 -2
- package/dist/src/stackingdao/index.js +3 -4
- package/dist/src/stackingdao/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/shared/stacks-58e4vbaw.js.map +0 -10
- package/dist/shared/stacks-ggxnnph5.cjs.map +0 -10
- package/dist/shared/stacks-pdcz1w1d.js +0 -33
- package/dist/shared/stacks-pdcz1w1d.js.map +0 -10
- package/dist/shared/stacks-yetejw9x.cjs +0 -16
- package/dist/shared/stacks-yetejw9x.cjs.map +0 -10
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// src/actions/public/getMapEntry.ts
|
|
2
|
-
async function getMapEntry(client, params) {
|
|
3
|
-
const [address, name] = parseContractId(params.contract);
|
|
4
|
-
const serializedKey = with0x(bytesToHex(serializeCVBytes(params.key)));
|
|
5
|
-
const data = await client.request(`/v2/map_entry/${address}/${name}/${params.mapName}`, {
|
|
6
|
-
method: "POST",
|
|
7
|
-
body: serializedKey
|
|
8
|
-
});
|
|
9
|
-
if (typeof data?.data !== "string") {
|
|
10
|
-
throw new MalformedResponseError(`getMapEntry: /v2/map_entry/${address}/${name}/${params.mapName} response is missing "data"`);
|
|
11
|
-
}
|
|
12
|
-
return deserializeCVBytes(data.data);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//# debugId=8FF1E30688CBB1D764756E2164756E21
|
|
16
|
-
//# sourceMappingURL=stacks-yetejw9x.cjs.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/actions/public/getMapEntry.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { deserializeCVBytes } from \"../../clarity/deserialize.ts\";\nimport { serializeCVBytes } from \"../../clarity/serialize.ts\";\nimport type { ClarityValue } from \"../../clarity/types.ts\";\nimport type { Client } from \"../../clients/types.ts\";\nimport { MalformedResponseError } from \"../../errors/response.ts\";\nimport { parseContractId } from \"../../utils/address.ts\";\nimport { bytesToHex, with0x } from \"../../utils/encoding.ts\";\n\nexport type GetMapEntryParams = {\n\tcontract: string; // \"address.name\"\n\tmapName: string;\n\tkey: ClarityValue;\n};\n\nexport async function getMapEntry<T extends ClarityValue = ClarityValue>(\n\tclient: Client,\n\tparams: GetMapEntryParams,\n): Promise<T> {\n\tconst [address, name] = parseContractId(params.contract);\n\tconst serializedKey = with0x(bytesToHex(serializeCVBytes(params.key)));\n\n\tconst data = await client.request(\n\t\t`/v2/map_entry/${address}/${name}/${params.mapName}`,\n\t\t{\n\t\t\tmethod: \"POST\",\n\t\t\tbody: serializedKey,\n\t\t},\n\t);\n\n\tif (typeof data?.data !== \"string\") {\n\t\tthrow new MalformedResponseError(\n\t\t\t`getMapEntry: /v2/map_entry/${address}/${name}/${params.mapName} response is missing \"data\"`,\n\t\t);\n\t}\n\treturn deserializeCVBytes<T>(data.data);\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";AAcA,eAAsB,WAAkD,CACvE,QACA,QACa;AAAA,EACb,OAAO,SAAS,QAAQ,gBAAgB,OAAO,QAAQ;AAAA,EACvD,MAAM,gBAAgB,OAAO,WAAW,iBAAiB,OAAO,GAAG,CAAC,CAAC;AAAA,EAErE,MAAM,OAAO,MAAM,OAAO,QACzB,iBAAiB,WAAW,QAAQ,OAAO,WAC3C;AAAA,IACC,QAAQ;AAAA,IACR,MAAM;AAAA,EACP,CACD;AAAA,EAEA,IAAI,OAAO,MAAM,SAAS,UAAU;AAAA,IACnC,MAAM,IAAI,uBACT,8BAA8B,WAAW,QAAQ,OAAO,oCACzD;AAAA,EACD;AAAA,EACA,OAAO,mBAAsB,KAAK,IAAI;AAAA;",
|
|
8
|
-
"debugId": "8FF1E30688CBB1D764756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|